code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public static <T> Single<T> fromFuture(Future<? extends T> future, long timeout, TimeUnit unit, Scheduler scheduler) { return toSingle(Flowable.<T>fromFuture(future, timeout, unit, scheduler)); }
class class_name[name] begin[{] method[fromFuture, return_type[type[Single]], modifier[public static], parameter[future, timeout, unit, scheduler]] begin[{] return[call[.toSingle, parameter[call[.Flowable, parameter[member[.future], member[.timeout], member[.unit], member[.scheduler]]]]]] end[}] EN...
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[CUSTOM] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Single] operator[<] identifier[T] operator[>] identifier[fromFu...
private void calcCurrentItem() { int pointerAngle; // calculate the correct pointer angle, depending on clockwise drawing or not if(mOpenClockwise) { pointerAngle = (mIndicatorAngle + 360 - mPieRotation) % 360; } else { pointerAngle = (mIndicatorAngle + 1...
class class_name[name] begin[{] method[calcCurrentItem, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], pointerAngle] if[member[.mOpenClockwise]] begin[{] assign[member[.pointerAngle], binary_operation[binary_operation[binary...
Keyword[private] Keyword[void] identifier[calcCurrentItem] operator[SEP] operator[SEP] { Keyword[int] identifier[pointerAngle] operator[SEP] Keyword[if] operator[SEP] identifier[mOpenClockwise] operator[SEP] { identifier[pointerAngle] operator[=] operator[SEP] identifier[mIndicatorAngle] operator[+] O...
@FFDCIgnore(NamingException.class) private NamingEnumeration<SearchResult> updateSearchCache(String searchBase, String key, NamingEnumeration<SearchResult> neu, String[] reqAttrIds) throws WIMSystemException { final String METHODNAME = "updateSea...
class class_name[name] begin[{] method[updateSearchCache, return_type[type[NamingEnumeration]], modifier[private], parameter[searchBase, key, neu, reqAttrIds]] begin[{] local_variable[type[String], METHODNAME] local_variable[type[CachedNamingEnumeration], clone1] local_variable[type[Cac...
annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[NamingException] operator[SEP] Keyword[class] operator[SEP] Keyword[private] identifier[NamingEnumeration] operator[<] identifier[SearchResult] operator[>] identifier[updateSearchCache] operator[SEP] identifier[String] identifier[searchBase] , identifier[St...
public static <T, D, A> Collector<T, ?, Map<Boolean, D>> partitioningBy(Predicate<? super T> predicate, Collector<? super T, A, D> downstream) { Predicate<A> finished = finished(downstream); if (finished != null) { BiConsumer<A, ? super T> accumulator = downstream.accumulator...
class class_name[name] begin[{] method[partitioningBy, return_type[type[Collector]], modifier[public static], parameter[predicate, downstream]] begin[{] local_variable[type[Predicate], finished] if[binary_operation[member[.finished], !=, literal[null]]] begin[{] local_variab...
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[D] , identifier[A] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[Map] operator[<] identifier[Boolean] , identifier[D] operator[>] operator[>] identifier[partitioningBy] operator[SEP] identifier[Predicate...
public static <T> BeanQuery<T> select(Class<T> beanClass) { return new BeanQuery<T>(new BeanSelector<T>(beanClass)); }
class class_name[name] begin[{] method[select, return_type[type[BeanQuery]], modifier[public static], parameter[beanClass]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=beanClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None,...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[BeanQuery] operator[<] identifier[T] operator[>] identifier[select] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[beanClass] operator[SEP] { Keyword[return] Keyword[new] identifier[BeanQuery] opera...
public static Exception checkFile(final File file) { Exception ex = null; String error = null; // check if the file does not exists... if (!file.exists()) { error = "The " + file + " does not exists."; ex = new FileDoesNotExistException(error); return ex; } // check if the file is not a director...
class class_name[name] begin[{] method[checkFile, return_type[type[Exception]], modifier[public static], parameter[file]] begin[{] local_variable[type[Exception], ex] local_variable[type[String], error] if[call[file.exists, parameter[]]] begin[{] assign[m...
Keyword[public] Keyword[static] identifier[Exception] identifier[checkFile] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[SEP] { identifier[Exception] identifier[ex] operator[=] Other[null] operator[SEP] identifier[String] identifier[error] operator[=] Other[null] operator[SEP] Keyword[...
public static <T, F> FieldAugment<T, F> augment(Class<T> type, Class<? super F> fieldType, String name) { checkNotNull(type, "type"); checkNotNull(fieldType, "fieldType"); checkNotNull(name, "name"); @SuppressWarnings("unchecked") F defaultValue = (F) getDefaultValue(fieldType); FieldAugment<T, F> ret = ...
class class_name[name] begin[{] method[augment, return_type[type[FieldAugment]], modifier[public static], parameter[type, fieldType, name]] begin[{] call[.checkNotNull, parameter[member[.type], literal["type"]]] call[.checkNotNull, parameter[member[.fieldType], literal["fieldTyp...
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[F] operator[>] identifier[FieldAugment] operator[<] identifier[T] , identifier[F] operator[>] identifier[augment] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[Class] operator[<] operator[?] K...
public int prepare(TxXATerminator xat) throws XAException { if (tc.isEntryEnabled()) Tr.entry(tc, "prepare", _txn); // replay must have finished if (_tranManager.isReplayComplete()) { // Suspend local transaction if present suspend(); try ...
class class_name[name] begin[{] method[prepare, return_type[type[int]], modifier[public], parameter[xat]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["prepare"], member[._txn]]] else begin[{] None end[}] ...
Keyword[public] Keyword[int] identifier[prepare] operator[SEP] identifier[TxXATerminator] identifier[xat] operator[SEP] Keyword[throws] identifier[XAException] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP...
@Pure @Override public FunctionalPoint3D getClosestPointTo(Point3D p) { Vector3f v = new Vector3f(p); v.sub(this.getX(), this.getY(), this.getZ()); double l = v.lengthSquared(); if (l<=(this.getRadius()*this.getRadius())) { if (p instanceof Point3f) return (Point3f)p; return new Point3f(p); } double...
class class_name[name] begin[{] method[getClosestPointTo, return_type[type[FunctionalPoint3D]], modifier[public], parameter[p]] begin[{] local_variable[type[Vector3f], v] call[v.sub, parameter[THIS[call[None.getX, parameter[]]], THIS[call[None.getY, parameter[]]], THIS[call[None.getZ, p...
annotation[@] identifier[Pure] annotation[@] identifier[Override] Keyword[public] identifier[FunctionalPoint3D] identifier[getClosestPointTo] operator[SEP] identifier[Point3D] identifier[p] operator[SEP] { identifier[Vector3f] identifier[v] operator[=] Keyword[new] identifier[Vector3f] operator[SEP] identifier[p...
public AsyncQueryRunnerService override(String operation, Object value) { this.queryRunner.override(operation, value); return this; }
class class_name[name] begin[{] method[override, return_type[type[AsyncQueryRunnerService]], modifier[public], parameter[operation, value]] begin[{] THIS[member[None.queryRunner]call[None.override, parameter[member[.operation], member[.value]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[AsyncQueryRunnerService] identifier[override] operator[SEP] identifier[String] identifier[operation] , identifier[Object] identifier[value] operator[SEP] { Keyword[this] operator[SEP] identifier[queryRunner] operator[SEP] identifier[override] operator[SEP] identifier[operation] , ide...
public T allocate() { while (true) { SoftReference<T> ref; ref = _ringQueue.poll(); if (ref == null) { return null; } T value = ref.get(); if (value != null) { return value; } } }
class class_name[name] begin[{] method[allocate, return_type[type[T]], modifier[public], parameter[]] begin[{] while[literal[true]] begin[{] local_variable[type[SoftReference], ref] assign[member[.ref], call[_ringQueue.poll, parameter[]]] ...
Keyword[public] identifier[T] identifier[allocate] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[SoftReference] operator[<] identifier[T] operator[>] identifier[ref] operator[SEP] identifier[ref] operator[=] identifier[_ringQueue] operator[SEP] ...
public static long decodeTimestamp(long seconds, long serializedNanos, long baseTimestampInSeconds) { long millis = (seconds + baseTimestampInSeconds) * MILLIS_PER_SECOND; long nanos = parseNanos(serializedNanos); if (nanos > 999999999 || nanos < 0) { throw new IllegalArgumentExc...
class class_name[name] begin[{] method[decodeTimestamp, return_type[type[long]], modifier[public static], parameter[seconds, serializedNanos, baseTimestampInSeconds]] begin[{] local_variable[type[long], millis] local_variable[type[long], nanos] if[binary_operation[binary_operati...
Keyword[public] Keyword[static] Keyword[long] identifier[decodeTimestamp] operator[SEP] Keyword[long] identifier[seconds] , Keyword[long] identifier[serializedNanos] , Keyword[long] identifier[baseTimestampInSeconds] operator[SEP] { Keyword[long] identifier[millis] operator[=] operator[SEP] identifier[seconds]...
public Object truncate() { Object value = navigatePath(); if (maxDepth == 0) { return value; } if (! (value instanceof JSONObject)) { return value; } else { // Truncate all levels below return truncateJSONObject((JSONObject) value, ...
class class_name[name] begin[{] method[truncate, return_type[type[Object]], modifier[public], parameter[]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.maxDepth], ==, literal[0]]] begin[{] return[member[.value]] else begin[{] None ...
Keyword[public] identifier[Object] identifier[truncate] operator[SEP] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[navigatePath] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[maxDepth] operator[==] Other[0] operator[SEP] { Keyword[return]...
@Override public XMLValidationSchema createSchema(InputStream in, String encoding, String publicId, String systemId) throws XMLStreamException { InputSource src = new InputSource(in); src.setEncoding(encoding); src.setPublicId(publicId);...
class class_name[name] begin[{] method[createSchema, return_type[type[XMLValidationSchema]], modifier[public], parameter[in, encoding, publicId, systemId]] begin[{] local_variable[type[InputSource], src] call[src.setEncoding, parameter[member[.encoding]]] call[src.setPub...
annotation[@] identifier[Override] Keyword[public] identifier[XMLValidationSchema] identifier[createSchema] operator[SEP] identifier[InputStream] identifier[in] , identifier[String] identifier[encoding] , identifier[String] identifier[publicId] , identifier[String] identifier[systemId] operator[SEP] Keyword[throws] ...
public void setInProgressJobs(java.util.Collection<JobExecutionSummary> inProgressJobs) { if (inProgressJobs == null) { this.inProgressJobs = null; return; } this.inProgressJobs = new java.util.ArrayList<JobExecutionSummary>(inProgressJobs); }
class class_name[name] begin[{] method[setInProgressJobs, return_type[void], modifier[public], parameter[inProgressJobs]] begin[{] if[binary_operation[member[.inProgressJobs], ==, literal[null]]] begin[{] assign[THIS[member[None.inProgressJobs]], literal[null]] ...
Keyword[public] Keyword[void] identifier[setInProgressJobs] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[JobExecutionSummary] operator[>] identifier[inProgressJobs] operator[SEP] { Keyword[if] operator[SEP] identifier[inProgressJobs] op...
private static void definePrepareBridge(ClassFile cf, Class leaf, Class returnClass) { TypeDesc returnType = TypeDesc.forClass(returnClass); if (isPublicMethodFinal(leaf, PREPARE_METHOD_NAME, returnType, null)) { // Cannot override. return; } MethodInfo ...
class class_name[name] begin[{] method[definePrepareBridge, return_type[void], modifier[private static], parameter[cf, leaf, returnClass]] begin[{] local_variable[type[TypeDesc], returnType] if[call[.isPublicMethodFinal, parameter[member[.leaf], member[.PREPARE_METHOD_NAME], member[.ret...
Keyword[private] Keyword[static] Keyword[void] identifier[definePrepareBridge] operator[SEP] identifier[ClassFile] identifier[cf] , identifier[Class] identifier[leaf] , identifier[Class] identifier[returnClass] operator[SEP] { identifier[TypeDesc] identifier[returnType] operator[=] identifier[TypeDesc] operato...
public void set(TafResp tafResp, Lur lur) { principal = tafResp.getPrincipal(); access = tafResp.getAccess(); this.lur = lur; }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[tafResp, lur]] begin[{] assign[member[.principal], call[tafResp.getPrincipal, parameter[]]] assign[member[.access], call[tafResp.getAccess, parameter[]]] assign[THIS[member...
Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[TafResp] identifier[tafResp] , identifier[Lur] identifier[lur] operator[SEP] { identifier[principal] operator[=] identifier[tafResp] operator[SEP] identifier[getPrincipal] operator[SEP] operator[SEP] operator[SEP] identifier[access] operator...
public static RoaringBitmap bitmapOf(final int... dat) { final RoaringBitmap ans = new RoaringBitmap(); ans.add(dat); return ans; }
class class_name[name] begin[{] method[bitmapOf, return_type[type[RoaringBitmap]], modifier[public static], parameter[dat]] begin[{] local_variable[type[RoaringBitmap], ans] call[ans.add, parameter[member[.dat]]] return[member[.ans]] end[}] END[}]
Keyword[public] Keyword[static] identifier[RoaringBitmap] identifier[bitmapOf] operator[SEP] Keyword[final] Keyword[int] operator[...] identifier[dat] operator[SEP] { Keyword[final] identifier[RoaringBitmap] identifier[ans] operator[=] Keyword[new] identifier[RoaringBitmap] operator[SEP] operator[SEP] operator[S...
public void realForward(double[] a) { // handle special case if( rows == 1 || columns == 1 ) { if( rows > 1 ) fftRows.realForward(a); else fftColumns.realForward(a); return; } if (isPowerOfTwo == false) { throw new IllegalArgumentException("rows and columns must be power of two numbers"); ...
class class_name[name] begin[{] method[realForward, return_type[void], modifier[public], parameter[a]] begin[{] if[binary_operation[binary_operation[member[.rows], ==, literal[1]], ||, binary_operation[member[.columns], ==, literal[1]]]] begin[{] if[binary_operation[memb...
Keyword[public] Keyword[void] identifier[realForward] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[a] operator[SEP] { Keyword[if] operator[SEP] identifier[rows] operator[==] Other[1] operator[||] identifier[columns] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP...
public Observable<ServiceResponse<CertificateBundle>> restoreCertificateWithServiceResponseAsync(String vaultBaseUrl, byte[] certificateBundleBackup) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null."); } if (this...
class class_name[name] begin[{] method[restoreCertificateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[vaultBaseUrl, certificateBundleBackup]] begin[{] if[binary_operation[member[.vaultBaseUrl], ==, literal[null]]] begin[{] ThrowStatement(expre...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[CertificateBundle] operator[>] operator[>] identifier[restoreCertificateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[vaultBaseUrl] , Keyword[byte] operator[SEP] operator[SEP] identifier[certif...
public EEnum getIfcElectricHeaterTypeEnum() { if (ifcElectricHeaterTypeEnumEEnum == null) { ifcElectricHeaterTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(827); } return ifcElectricHeaterTypeEnumEEnum; }
class class_name[name] begin[{] method[getIfcElectricHeaterTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcElectricHeaterTypeEnumEEnum], ==, literal[null]]] begin[{] assign[member[.ifcElectricHeaterTypeEnumEEnum]...
Keyword[public] identifier[EEnum] identifier[getIfcElectricHeaterTypeEnum] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcElectricHeaterTypeEnumEEnum] operator[==] Other[null] operator[SEP] { identifier[ifcElectricHeaterTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] ...
public static <T> T checkPostconditionV( final T value, final boolean condition, final String format, final Object... objects) { if (!condition) { throw failed( null, value, singleViolation(String.format(format, objects))); } return value; }
class class_name[name] begin[{] method[checkPostconditionV, return_type[type[T]], modifier[public static], parameter[value, condition, format, objects]] begin[{] if[member[.condition]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefi...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[checkPostconditionV] operator[SEP] Keyword[final] identifier[T] identifier[value] , Keyword[final] Keyword[boolean] identifier[condition] , Keyword[final] identifier[String] identifier[format] , Keyword[final] identifier[O...
private void prefetch(long storageIndex) { long startIndex = storageIndex / BYTES_IN_DATA; // Inc to next bucket startIndex += 128; if (mPrefetchedBuckets.contains(startIndex)) { mPrefetchedBuckets.remove(startIndex); return; } for (int...
class class_name[name] begin[{] method[prefetch, return_type[void], modifier[private], parameter[storageIndex]] begin[{] local_variable[type[long], startIndex] assign[member[.startIndex], literal[128]] if[call[mPrefetchedBuckets.contains, parameter[member[.startIndex]]]]...
Keyword[private] Keyword[void] identifier[prefetch] operator[SEP] Keyword[long] identifier[storageIndex] operator[SEP] { Keyword[long] identifier[startIndex] operator[=] identifier[storageIndex] operator[/] identifier[BYTES_IN_DATA] operator[SEP] identifier[startIndex] operator[+=] Other[128] operator[SEP] Keywo...
public List<Orbit> calculateOrbits() { List<Orbit> orbits = new ArrayList<Orbit>(); List<SymmetryClass> symmetryClasses = super.getSymmetryClasses(); for (SymmetryClass symmetryClass : symmetryClasses) { Orbit orbit = new Orbit(symmetryClass.getSignatureString(), -1); for...
class class_name[name] begin[{] method[calculateOrbits, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], orbits] local_variable[type[List], symmetryClasses] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annot...
Keyword[public] identifier[List] operator[<] identifier[Orbit] operator[>] identifier[calculateOrbits] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Orbit] operator[>] identifier[orbits] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Orbit] operator[>] operator[SEP]...
@Override public boolean validate(final Problems problems, final String compName, final String model) { final char[] c = model.toCharArray(); boolean result = true; String curr; for (final char element : c) { curr = new String(new char[] { element }); try { final String nue = new String(curr.getBytes...
class class_name[name] begin[{] method[validate, return_type[type[boolean]], modifier[public], parameter[problems, compName, model]] begin[{] local_variable[type[char], c] local_variable[type[boolean], result] local_variable[type[String], curr] ForStatement(body=BlockStatement(l...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[validate] operator[SEP] Keyword[final] identifier[Problems] identifier[problems] , Keyword[final] identifier[String] identifier[compName] , Keyword[final] identifier[String] identifier[model] operator[SEP] { Keyword[final] Keyword[c...
public static int copy(Reader reader, Writer writer, boolean closeWriter) { if (closeWriter) { return write(reader).ensureCloseSink().to(writer); } else { return write(reader).to(writer); } }
class class_name[name] begin[{] method[copy, return_type[type[int]], modifier[public static], parameter[reader, writer, closeWriter]] begin[{] if[member[.closeWriter]] begin[{] return[call[.write, parameter[member[.reader]]]] else begin[{] return[call[.write, par...
Keyword[public] Keyword[static] Keyword[int] identifier[copy] operator[SEP] identifier[Reader] identifier[reader] , identifier[Writer] identifier[writer] , Keyword[boolean] identifier[closeWriter] operator[SEP] { Keyword[if] operator[SEP] identifier[closeWriter] operator[SEP] { Keyword[return] ident...
@Nullable public static String getFileNameFromUri(URI uri) { if (!uri.getScheme().equals("jar")) { return uri.getPath(); } try { String jarEntryFileName = ((JarURLConnection) uri.toURL().openConnection()).getEntryName(); // It's possible (though it violates the zip file spec) for paths ...
class class_name[name] begin[{] method[getFileNameFromUri, return_type[type[String]], modifier[public static], parameter[uri]] begin[{] if[call[uri.getScheme, parameter[]]] begin[{] return[call[uri.getPath, parameter[]]] else begin[{] None end[}] TryStatement...
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getFileNameFromUri] operator[SEP] identifier[URI] identifier[uri] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[uri] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] operator[SEP] id...
public SqlBuilder select(final String what) { if (null == what) { this.select = null; } else { if (Strings.contains(what.toLowerCase(), "select")) { this.select = what; } else { this.select = "select " + what; } } return this; }
class class_name[name] begin[{] method[select, return_type[type[SqlBuilder]], modifier[public], parameter[what]] begin[{] if[binary_operation[literal[null], ==, member[.what]]] begin[{] assign[THIS[member[None.select]], literal[null]] else begin[{] ...
Keyword[public] identifier[SqlBuilder] identifier[select] operator[SEP] Keyword[final] identifier[String] identifier[what] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[what] operator[SEP] { Keyword[this] operator[SEP] identifier[select] operator[=] Other[null] operator...
public <T extends RestTemplate> T configure(T restTemplate) { configureRequestFactory(restTemplate); if (!CollectionUtils.isEmpty(this.messageConverters)) { restTemplate.setMessageConverters(new ArrayList<>(this.messageConverters)); } if (this.uriTemplateHandler != null) { restTemplate.setUriTemplateHandl...
class class_name[name] begin[{] method[configure, return_type[type[T]], modifier[public], parameter[restTemplate]] begin[{] call[.configureRequestFactory, parameter[member[.restTemplate]]] if[call[CollectionUtils.isEmpty, parameter[THIS[member[None.messageConverters]]]]] begin[{...
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[RestTemplate] operator[>] identifier[T] identifier[configure] operator[SEP] identifier[T] identifier[restTemplate] operator[SEP] { identifier[configureRequestFactory] operator[SEP] identifier[restTemplate] operator[SEP] operator[SEP] Keyword[i...
public static void addCharges(Structure structure) { // Loop through the models for(int i=0; i<structure.nrModels(); i++){ for(Chain c: structure.getChains(i)){ for(Group g: c.getAtomGroups()){ ChemComp thisChemComp = ChemCompGroupFactory.getChemComp(g.getPDBName()); List<ChemCompAtom> chemAtoms = ...
class class_name[name] begin[{] method[addCharges, return_type[void], modifier[public static], parameter[structure]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalV...
Keyword[public] Keyword[static] Keyword[void] identifier[addCharges] operator[SEP] identifier[Structure] identifier[structure] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[structure] operator[SEP] identifier[nrModels...
public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException { if (hasUseBean(jspElement)) { out.println("HttpSession session = "+pageContextVar+".getSession();"); out.println("ServletContext application = "+pageContextV...
class class_name[name] begin[{] method[generateLocalVariables, return_type[void], modifier[public static], parameter[out, jspElement, pageContextVar]] begin[{] if[call[.hasUseBean, parameter[member[.jspElement]]]] begin[{] call[out.println, parameter[binary_operation[bin...
Keyword[public] Keyword[static] Keyword[void] identifier[generateLocalVariables] operator[SEP] identifier[JavaCodeWriter] identifier[out] , identifier[Element] identifier[jspElement] , identifier[String] identifier[pageContextVar] operator[SEP] Keyword[throws] identifier[JspCoreException] { Keyword[if] operato...
public void marshall(CreateAssessmentTargetRequest createAssessmentTargetRequest, ProtocolMarshaller protocolMarshaller) { if (createAssessmentTargetRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.m...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[createAssessmentTargetRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createAssessmentTargetRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreato...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateAssessmentTargetRequest] identifier[createAssessmentTargetRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createAssessmentTargetRequest] operator[==] Ot...
public static Bbox buffer(Bbox bbox, double range) { if (range >= 0) { double r2 = range * 2; return new Bbox(bbox.getX() - range, bbox.getY() - range, bbox.getWidth() + r2, bbox.getHeight() + r2); } throw new IllegalArgumentException("Buffer range must always be positive."); }
class class_name[name] begin[{] method[buffer, return_type[type[Bbox]], modifier[public static], parameter[bbox, range]] begin[{] if[binary_operation[member[.range], >=, literal[0]]] begin[{] local_variable[type[double], r2] return[ClassCreator(arguments=[BinaryOperation...
Keyword[public] Keyword[static] identifier[Bbox] identifier[buffer] operator[SEP] identifier[Bbox] identifier[bbox] , Keyword[double] identifier[range] operator[SEP] { Keyword[if] operator[SEP] identifier[range] operator[>=] Other[0] operator[SEP] { Keyword[double] identifier[r2] operator[=] identifi...
public WebhookBuilder setAvatar(BufferedImage avatar, String fileType) { delegate.setAvatar(avatar, fileType); return this; }
class class_name[name] begin[{] method[setAvatar, return_type[type[WebhookBuilder]], modifier[public], parameter[avatar, fileType]] begin[{] call[delegate.setAvatar, parameter[member[.avatar], member[.fileType]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[WebhookBuilder] identifier[setAvatar] operator[SEP] identifier[BufferedImage] identifier[avatar] , identifier[String] identifier[fileType] operator[SEP] { identifier[delegate] operator[SEP] identifier[setAvatar] operator[SEP] identifier[avatar] , identifier[fileType] operator[SEP] op...
public OvhDomain serviceName_zone_domains_POST(String serviceName, String domain) throws IOException { String qPath = "/cdn/website/{serviceName}/zone/domains"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "domain", domain); String resp = ex...
class class_name[name] begin[{] method[serviceName_zone_domains_POST, return_type[type[OvhDomain]], modifier[public], parameter[serviceName, domain]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o] cal...
Keyword[public] identifier[OvhDomain] identifier[serviceName_zone_domains_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[domain] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] ...
public Observable<ServiceResponse<String>> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and c...
class class_name[name] begin[{] method[generatevpnclientpackageWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, virtualNetworkGatewayName, parameters]] begin[{] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[String] operator[>] operator[>] identifier[generatevpnclientpackageWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkGatewayName] , ...
protected Response.ResponseType getWebApplicationServiceResponseType(final WebApplicationService finalService) { val request = HttpRequestUtils.getHttpServletRequestFromRequestAttributes(); val methodRequest = request != null ? request.getParameter(CasProtocolConstants.PARAMETER_METHOD) : null; ...
class class_name[name] begin[{] method[getWebApplicationServiceResponseType, return_type[type[Response]], modifier[protected], parameter[finalService]] begin[{] local_variable[type[val], request] local_variable[type[val], methodRequest] local_variable[type[Function], func] local...
Keyword[protected] identifier[Response] operator[SEP] identifier[ResponseType] identifier[getWebApplicationServiceResponseType] operator[SEP] Keyword[final] identifier[WebApplicationService] identifier[finalService] operator[SEP] { identifier[val] identifier[request] operator[=] identifier[HttpRequestUtils] oper...
public void addMissingNodeFactoryError(final String type) throws ValidationException { addError(StringFormatter.format(MessageConstants.MESSAGES.missingNodeFactory(), type)); }
class class_name[name] begin[{] method[addMissingNodeFactoryError, return_type[void], modifier[public], parameter[type]] begin[{] call[.addError, parameter[call[StringFormatter.format, parameter[call[MessageConstants.MESSAGES.missingNodeFactory, parameter[]], member[.type]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addMissingNodeFactoryError] operator[SEP] Keyword[final] identifier[String] identifier[type] operator[SEP] Keyword[throws] identifier[ValidationException] { identifier[addError] operator[SEP] identifier[StringFormatter] operator[SEP] identifier[format] operator[SEP] ident...
private static void getTreeFormat(StringBuffer sb, Event event, Boolean includeContextInfo, int noOfTabs, long currentNanoTime, int spacesRequiredForDuration) { //Defect 166820 //Check for events that got added after we started dumping the tree. //We ignore these events. if(currentNanoTime < event.getStartTi...
class class_name[name] begin[{] method[getTreeFormat, return_type[void], modifier[private static], parameter[sb, event, includeContextInfo, noOfTabs, currentNanoTime, spacesRequiredForDuration]] begin[{] if[binary_operation[member[.currentNanoTime], <, call[event.getStartTime, parameter[]]]] be...
Keyword[private] Keyword[static] Keyword[void] identifier[getTreeFormat] operator[SEP] identifier[StringBuffer] identifier[sb] , identifier[Event] identifier[event] , identifier[Boolean] identifier[includeContextInfo] , Keyword[int] identifier[noOfTabs] , Keyword[long] identifier[currentNanoTime] , Keyword[int] id...
private MtasParserObject[] computeObjectFromMappingValue( MtasParserObject object, Map<String, String> mappingValue, Map<String, List<MtasParserObject>> currentList) throws MtasParserException { MtasParserObject[] checkObjects = null; MtasParserObject checkObject; Integer ancestorNumber = ...
class class_name[name] begin[{] method[computeObjectFromMappingValue, return_type[type[MtasParserObject]], modifier[private], parameter[object, mappingValue, currentList]] begin[{] local_variable[type[MtasParserObject], checkObjects] local_variable[type[MtasParserObject], checkObject] l...
Keyword[private] identifier[MtasParserObject] operator[SEP] operator[SEP] identifier[computeObjectFromMappingValue] operator[SEP] identifier[MtasParserObject] identifier[object] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[mappingValue] , identifier[Map] operator[<] id...
public static boolean isFixedDelay(final Object task) { if (task instanceof Task) { final Task ltask = (Task) task; return (!ltask.relative && ltask.period > 0); } else { return false; } }
class class_name[name] begin[{] method[isFixedDelay, return_type[type[boolean]], modifier[public static], parameter[task]] begin[{] if[binary_operation[member[.task], instanceof, type[Task]]] begin[{] local_variable[type[Task], ltask] return[binary_operation[member[ltask...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isFixedDelay] operator[SEP] Keyword[final] identifier[Object] identifier[task] operator[SEP] { Keyword[if] operator[SEP] identifier[task] Keyword[instanceof] identifier[Task] operator[SEP] { Keyword[final] identifier[Task] identifier[ltask] o...
@Override public void onStartup(Set<Class<?>> clazzes, ServletContext servletContext) throws ServletException { try { WsocHandlerImpl wsocServletHandler = new WsocHandlerImpl(); ((WebApp31) servletContext).registerWebSocketHandler(wsocServletHandler); ServerContainerExt...
class class_name[name] begin[{] method[onStartup, return_type[void], modifier[public], parameter[clazzes, servletContext]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_t...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onStartup] operator[SEP] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[clazzes] , identifier[ServletContext] identifier[servletContext] operator[SEP] Keyword[throws] identifier[Servlet...
private void registerMismatchAndReport( Node n, DiagnosticType diagnostic, String msg, JSType found, JSType required, Set<String> missing, Set<String> mismatch) { String foundRequiredFormatted = formatFoundRequired(msg, found, required, missing, mismatch); JSError err =...
class class_name[name] begin[{] method[registerMismatchAndReport, return_type[void], modifier[private], parameter[n, diagnostic, msg, found, required, missing, mismatch]] begin[{] local_variable[type[String], foundRequiredFormatted] local_variable[type[JSError], err] call[.regis...
Keyword[private] Keyword[void] identifier[registerMismatchAndReport] operator[SEP] identifier[Node] identifier[n] , identifier[DiagnosticType] identifier[diagnostic] , identifier[String] identifier[msg] , identifier[JSType] identifier[found] , identifier[JSType] identifier[required] , identifier[Set] operator[<] i...
@Override public ReadStream<Buffer> handler(Handler<Buffer> handler) { if (handler == null) { throw new IllegalArgumentException("handler"); } this.dataHandler = handler; doRead(); return this; }
class class_name[name] begin[{] method[handler, return_type[type[ReadStream]], modifier[public], parameter[handler]] begin[{] if[binary_operation[member[.handler], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_ope...
annotation[@] identifier[Override] Keyword[public] identifier[ReadStream] operator[<] identifier[Buffer] operator[>] identifier[handler] operator[SEP] identifier[Handler] operator[<] identifier[Buffer] operator[>] identifier[handler] operator[SEP] { Keyword[if] operator[SEP] identifier[handler] operator[==] Othe...
@SuppressWarnings("unchecked") @Override public <K extends TServiceClient> K getClient(String serviceName, Class<K> clazz) { T serviceClient = this.clients.get(serviceName); if (serviceClient == null) { throw new IllegalArgumentException("未知的服务名称:" + serviceName); } return (K) serviceClient; }
class class_name[name] begin[{] method[getClient, return_type[type[K]], modifier[public], parameter[serviceName, clazz]] begin[{] local_variable[type[T], serviceClient] if[binary_operation[member[.serviceClient], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCr...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] operator[<] identifier[K] Keyword[extends] identifier[TServiceClient] operator[>] identifier[K] identifier[getClient] operator[SEP] identifier[String] identifier[serviceName] , iden...
public static long getTimestamp(final MessageOrBuilder messageOrBuilder, final TimeUnit timeUnit) throws NotAvailableException { final FieldDescriptor timeStampFieldDescriptor = ProtoBufFieldProcessor.getFieldDescriptor(messageOrBuilder, TIMESTAMP_NAME.toLowerCase()); if (timeStampFieldDescriptor == nul...
class class_name[name] begin[{] method[getTimestamp, return_type[type[long]], modifier[public static], parameter[messageOrBuilder, timeUnit]] begin[{] local_variable[type[FieldDescriptor], timeStampFieldDescriptor] if[binary_operation[binary_operation[member[.timeStampFieldDescriptor], ...
Keyword[public] Keyword[static] Keyword[long] identifier[getTimestamp] operator[SEP] Keyword[final] identifier[MessageOrBuilder] identifier[messageOrBuilder] , Keyword[final] identifier[TimeUnit] identifier[timeUnit] operator[SEP] Keyword[throws] identifier[NotAvailableException] { Keyword[final] identifier[Fie...
public OvhOrder hosting_web_serviceName_changeMainDomain_duration_GET(String serviceName, String duration, String domain, OvhMxPlanEnum mxplan) throws IOException { String qPath = "/order/hosting/web/{serviceName}/changeMainDomain/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "doma...
class class_name[name] begin[{] method[hosting_web_serviceName_changeMainDomain_duration_GET, return_type[type[OvhOrder]], modifier[public], parameter[serviceName, duration, domain, mxplan]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] cal...
Keyword[public] identifier[OvhOrder] identifier[hosting_web_serviceName_changeMainDomain_duration_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[duration] , identifier[String] identifier[domain] , identifier[OvhMxPlanEnum] identifier[mxplan] operator[SEP] Keyword[throws...
public Object invokeAndClose(ManagementDelegate delegate, JournalWriter writer) throws ServerException, JournalException { Object result = invokeMethod(delegate, writer); close(); return result; }
class class_name[name] begin[{] method[invokeAndClose, return_type[type[Object]], modifier[public], parameter[delegate, writer]] begin[{] local_variable[type[Object], result] call[.close, parameter[]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Object] identifier[invokeAndClose] operator[SEP] identifier[ManagementDelegate] identifier[delegate] , identifier[JournalWriter] identifier[writer] operator[SEP] Keyword[throws] identifier[ServerException] , identifier[JournalException] { identifier[Object] identifier[result] operato...
public void jmolColorByChain(){ String script = "function color_by_chain(objtype, color_list) {"+ String.format("%n") + ""+ String.format("%n") + " if (color_list) {"+ String.format("%n") + " if (color_list.type == \"string\") {"+ String.format("%n") + " color_list = color_list.split(\...
class class_name[name] begin[{] method[jmolColorByChain, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[String], script] call[.executeCmd, parameter[member[.script]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[jmolColorByChain] operator[SEP] operator[SEP] { identifier[String] identifier[script] operator[=] literal[String] operator[+] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier...
@Deprecated public void weakAddWatcher(Path file, Watcher watcher) { weakAddWatcher(file, (Listener) watcher); }
class class_name[name] begin[{] method[weakAddWatcher, return_type[void], modifier[public], parameter[file, watcher]] begin[{] call[.weakAddWatcher, parameter[member[.file], Cast(expression=MemberReference(member=watcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), typ...
annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[weakAddWatcher] operator[SEP] identifier[Path] identifier[file] , identifier[Watcher] identifier[watcher] operator[SEP] { identifier[weakAddWatcher] operator[SEP] identifier[file] , operator[SEP] identifier[Listener] operator[SEP] id...
public TextMatchBinding setText( final Collection<String> text ) { if (text == null || text.size() == 0) { clearText(); return this; } synchronized (text) { for (String pattern : text) { if (patte...
class class_name[name] begin[{] method[setText, return_type[type[TextMatchBinding]], modifier[public], parameter[text]] begin[{] if[binary_operation[binary_operation[member[.text], ==, literal[null]], ||, binary_operation[call[text.size, parameter[]], ==, literal[0]]]] begin[{] ...
Keyword[public] identifier[TextMatchBinding] identifier[setText] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[String] operator[>] identifier[text] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[||] identifier[text] operator[SEP] identifi...
public final AntlrDatatypeRuleToken ruleNumber() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token this_HEX_0=null; Token this_INT_1=null; Token this_DECIMAL_2=null; Token kw=null; Token this_INT_4=null; Token this...
class class_name[name] begin[{] method[ruleNumber, return_type[type[AntlrDatatypeRuleToken]], modifier[final public], parameter[]] begin[{] local_variable[type[AntlrDatatypeRuleToken], current] local_variable[type[Token], this_HEX_0] local_variable[type[Token], this_INT_1] local...
Keyword[public] Keyword[final] identifier[AntlrDatatypeRuleToken] identifier[ruleNumber] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[AntlrDatatypeRuleToken] identifier[current] operator[=] Keyword[new] identifier[AntlrDatatypeRuleToken] operator[SEP] operator[SEP] op...
public static <T> Level0ArrayOperator<Timestamp[],Timestamp> onArray(final Timestamp[] target) { return onArrayOf(Types.forClass(Timestamp.class), target); }
class class_name[name] begin[{] method[onArray, return_type[type[Level0ArrayOperator]], modifier[public static], parameter[target]] begin[{] return[call[.onArrayOf, parameter[call[Types.forClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=Referenc...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Level0ArrayOperator] operator[<] identifier[Timestamp] operator[SEP] operator[SEP] , identifier[Timestamp] operator[>] identifier[onArray] operator[SEP] Keyword[final] identifier[Timestamp] operator[SEP] operator[SEP] identifier[target] o...
public DatasetState newDatasetState(boolean fullCopy) { DatasetState datasetState = new DatasetState(this.jobName, this.jobId); datasetState.setStartTime(this.startTime); datasetState.setEndTime(this.endTime); datasetState.setDuration(this.duration); if (fullCopy) { datasetState.setState(this....
class class_name[name] begin[{] method[newDatasetState, return_type[type[DatasetState]], modifier[public], parameter[fullCopy]] begin[{] local_variable[type[DatasetState], datasetState] call[datasetState.setStartTime, parameter[THIS[member[None.startTime]]]] call[dataset...
Keyword[public] identifier[DatasetState] identifier[newDatasetState] operator[SEP] Keyword[boolean] identifier[fullCopy] operator[SEP] { identifier[DatasetState] identifier[datasetState] operator[=] Keyword[new] identifier[DatasetState] operator[SEP] Keyword[this] operator[SEP] identifier[jobName] , Keyword[thi...
public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" meta check - Check if metadata is consistent across all nodes"); stream.println(); stream.println("SYNOPSIS"); stream....
class class_name[name] begin[{] method[printHelp, return_type[void], modifier[public static], parameter[stream]] begin[{] call[stream.println, parameter[]] call[stream.println, parameter[literal["NAME"]]] call[stream.println, parameter[literal[" meta check - Che...
Keyword[public] Keyword[static] Keyword[void] identifier[printHelp] operator[SEP] identifier[PrintStream] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] { identifier[stream] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] iden...
static BindTransform getTransform(TypeName typeName) { if (typeName.isPrimitive()) { return getPrimitiveTransform(typeName); } if (typeName instanceof ArrayTypeName) { ArrayTypeName typeNameArray = (ArrayTypeName) typeName; if (TypeUtility.isEquals(typeNameArray.componentType, Byte.TYPE.toString())) { ...
class class_name[name] begin[{] method[getTransform, return_type[type[BindTransform]], modifier[static], parameter[typeName]] begin[{] if[call[typeName.isPrimitive, parameter[]]] begin[{] return[call[.getPrimitiveTransform, parameter[member[.typeName]]]] else begin[{] None ...
Keyword[static] identifier[BindTransform] identifier[getTransform] operator[SEP] identifier[TypeName] identifier[typeName] operator[SEP] { Keyword[if] operator[SEP] identifier[typeName] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[getPrim...
static void printClassTaxonomy(Taxonomy<ElkClass> taxonomy, File out) throws IOException { FileWriter fstream = null; BufferedWriter writer = null; try { fstream = new FileWriter(out); writer = new BufferedWriter(fstream); writer.append("Ontology(\n"); processTaxomomy(taxonomy, writer); writ...
class class_name[name] begin[{] method[printClassTaxonomy, return_type[void], modifier[static], parameter[taxonomy, out]] begin[{] local_variable[type[FileWriter], fstream] local_variable[type[BufferedWriter], writer] TryStatement(block=[StatementExpression(expression=Assignment(express...
Keyword[static] Keyword[void] identifier[printClassTaxonomy] operator[SEP] identifier[Taxonomy] operator[<] identifier[ElkClass] operator[>] identifier[taxonomy] , identifier[File] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[FileWriter] identifier[fstream] operator[=] Othe...
private void createPageControls() { WizardPage[] pages = wizard.getPages(); for (int i = 0; i < pages.length; i++) { JComponent c = pages[i].getControl(); GuiStandardUtils.attachDialogBorder(c); Dimension size = c.getPreferredSize(); if (size.width > large...
class class_name[name] begin[{] method[createPageControls, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[WizardPage], pages] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimens...
Keyword[private] Keyword[void] identifier[createPageControls] operator[SEP] operator[SEP] { identifier[WizardPage] operator[SEP] operator[SEP] identifier[pages] operator[=] identifier[wizard] operator[SEP] identifier[getPages] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] iden...
public Task removeSnapshot_Task(boolean removeChildren, Boolean consolidate) throws TaskInProgress, RuntimeFault, RemoteException { return new Task(getServerConnection(), getVimService().removeSnapshot_Task(getMOR(), removeChildren, consolidate)); }
class class_name[name] begin[{] method[removeSnapshot_Task, return_type[type[Task]], modifier[public], parameter[removeChildren, consolidate]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getServerConnection, postfix_operators=[], prefix_operators=[], qualifier=, select...
Keyword[public] identifier[Task] identifier[removeSnapshot_Task] operator[SEP] Keyword[boolean] identifier[removeChildren] , identifier[Boolean] identifier[consolidate] operator[SEP] Keyword[throws] identifier[TaskInProgress] , identifier[RuntimeFault] , identifier[RemoteException] { Keyword[return] Keyword[n...
void expectNumberOrSymbol(Node n, JSType type, String msg) { if (!type.matchesNumberContext() && !type.matchesSymbolContext()) { mismatch(n, msg, type, NUMBER_SYMBOL); } }
class class_name[name] begin[{] method[expectNumberOrSymbol, return_type[void], modifier[default], parameter[n, type, msg]] begin[{] if[binary_operation[call[type.matchesNumberContext, parameter[]], &&, call[type.matchesSymbolContext, parameter[]]]] begin[{] call[.mismat...
Keyword[void] identifier[expectNumberOrSymbol] operator[SEP] identifier[Node] identifier[n] , identifier[JSType] identifier[type] , identifier[String] identifier[msg] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[type] operator[SEP] identifier[matchesNumberContext] operator[SEP] operator[SEP...
public int readInt(int word) throws IOException { if (rf == null) { throw new IOException("no file to read from"); } rf.seek(word * 4); // set the order if (needToSwap) { rf.order(RandomAccessFile.LITTLE_ENDIAN); // swap } else { rf.order(RandomAccessFile.BIG_ENDIAN); } ...
class class_name[name] begin[{] method[readInt, return_type[type[int]], modifier[public], parameter[word]] begin[{] if[binary_operation[member[.rf], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qual...
Keyword[public] Keyword[int] identifier[readInt] operator[SEP] Keyword[int] identifier[word] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[rf] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] liter...
private long mixInHash(long hash, StorableProperty<?> property, int multiplier) { hash = mixInHash(hash, property.getName(), multiplier); hash = mixInHash(hash, property.getType().getName(), multiplier); hash = hash * multiplier + (property.isNullable() ? 1 : 2); hash = hash * multip...
class class_name[name] begin[{] method[mixInHash, return_type[type[long]], modifier[private], parameter[hash, property, multiplier]] begin[{] assign[member[.hash], call[.mixInHash, parameter[member[.hash], call[property.getName, parameter[]], member[.multiplier]]]] assign[member...
Keyword[private] Keyword[long] identifier[mixInHash] operator[SEP] Keyword[long] identifier[hash] , identifier[StorableProperty] operator[<] operator[?] operator[>] identifier[property] , Keyword[int] identifier[multiplier] operator[SEP] { identifier[hash] operator[=] identifier[mixInHash] operator[SEP] identi...
Dispatcher subscribeImpl(String subject, String queueName) { if (!this.running.get()) { throw new IllegalStateException("Dispatcher is closed"); } if (this.isDraining()) { throw new IllegalStateException("Dispatcher is draining"); } NatsSubscript...
class class_name[name] begin[{] method[subscribeImpl, return_type[type[Dispatcher]], modifier[default], parameter[subject, queueName]] begin[{] if[THIS[member[None.running]call[None.get, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operat...
identifier[Dispatcher] identifier[subscribeImpl] operator[SEP] identifier[String] identifier[subject] , identifier[String] identifier[queueName] operator[SEP] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[running] operator[SEP] identifier[get] operator[SEP] operator[SEP] operato...
static public double rastrigin(double[] x) { double sum = 0.0; for (int i = 0; i < x.length; i++) { sum += (x[i] * x[i]) - (10.0 * Math.cos(PIx2 * x[i])) + 10.0; } return (sum); }
class class_name[name] begin[{] method[rastrigin, return_type[type[double]], modifier[public static], parameter[x]] begin[{] local_variable[type[double], sum] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=su...
Keyword[static] Keyword[public] Keyword[double] identifier[rastrigin] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[x] operator[SEP] { Keyword[double] identifier[sum] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operato...
public IPv4AddressSection mask(IPv4AddressSection mask, boolean retainPrefix) throws IncompatibleAddressException, PrefixLenException, SizeMismatchException { checkMaskSectionCount(mask); return getSubnetSegments( this, retainPrefix ? getPrefixLength() : null, getAddressCreator(), true, this::ge...
class class_name[name] begin[{] method[mask, return_type[type[IPv4AddressSection]], modifier[public], parameter[mask, retainPrefix]] begin[{] call[.checkMaskSectionCount, parameter[member[.mask]]] return[call[.getSubnetSegments, parameter[THIS[], TernaryExpression(condition=MemberRefere...
Keyword[public] identifier[IPv4AddressSection] identifier[mask] operator[SEP] identifier[IPv4AddressSection] identifier[mask] , Keyword[boolean] identifier[retainPrefix] operator[SEP] Keyword[throws] identifier[IncompatibleAddressException] , identifier[PrefixLenException] , identifier[SizeMismatchException] { ...
@SuppressWarnings("null") // gadgetBytes will be null only if gadget_ == null AND empty == true public byte[] toByteArray(final ArrayOfItemsSerDe<T> serDe, final Class<?> clazz) { final int preLongs, outBytes; final boolean empty = gadget_.getNumSamples() == 0; final byte[] gadgetBytes = (empty ? null : g...
class class_name[name] begin[{] method[toByteArray, return_type[type[byte]], modifier[public], parameter[serDe, clazz]] begin[{] local_variable[type[int], preLongs] local_variable[type[boolean], empty] local_variable[type[byte], gadgetBytes] if[member[.empty]] begin[{] ...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] Keyword[final] identifier[ArrayOfItemsSerDe] operator[<] identifier[T] operator[>] identifier[serDe] , Keyword[final] identifier[Class] ...
private static int checkWildCard(final SearchableString value, final Literal suffix, final int start) { for (final int index : value.getIndices(suffix)) { if (index >= start) { return index; } } return -1; }
class class_name[name] begin[{] method[checkWildCard, return_type[type[int]], modifier[private static], parameter[value, suffix, start]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], p...
Keyword[private] Keyword[static] Keyword[int] identifier[checkWildCard] operator[SEP] Keyword[final] identifier[SearchableString] identifier[value] , Keyword[final] identifier[Literal] identifier[suffix] , Keyword[final] Keyword[int] identifier[start] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] K...
private void initButtonColor(TypedArray attrs) { int index = R.styleable.ActionButton_button_color; if (attrs.hasValue(index)) { buttonColor = attrs.getColor(index, buttonColor); LOGGER.trace("Initialized Action Button color: {}", getButtonColor()); } }
class class_name[name] begin[{] method[initButtonColor, return_type[void], modifier[private], parameter[attrs]] begin[{] local_variable[type[int], index] if[call[attrs.hasValue, parameter[member[.index]]]] begin[{] assign[member[.buttonColor], call[attrs.getColor...
Keyword[private] Keyword[void] identifier[initButtonColor] operator[SEP] identifier[TypedArray] identifier[attrs] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[R] operator[SEP] identifier[styleable] operator[SEP] identifier[ActionButton_button_color] operator[SEP] Keyword[if] operator[SEP...
public TemplateFilter nameContains(String... names) { allItemsNotNull(names, "Name substrings"); predicate = predicate.and(combine( TemplateMetadata::getName, in(asList(names), Predicates::containsIgnoreCase) )); return this; }
class class_name[name] begin[{] method[nameContains, return_type[type[TemplateFilter]], modifier[public], parameter[names]] begin[{] call[.allItemsNotNull, parameter[member[.names], literal["Name substrings"]]] assign[member[.predicate], call[predicate.and, parameter[call[.combi...
Keyword[public] identifier[TemplateFilter] identifier[nameContains] operator[SEP] identifier[String] operator[...] identifier[names] operator[SEP] { identifier[allItemsNotNull] operator[SEP] identifier[names] , literal[String] operator[SEP] operator[SEP] identifier[predicate] operator[=] identifier[predicate] o...
@Override public synchronized void delete(long historyId, String tag) throws DatabaseException { try { psDeleteTag.setLong(1, historyId); psDeleteTag.setString(2, tag); psDeleteTag.executeUpdate(); } catch (SQLException e) { throw new DatabaseException(e); } }
class class_name[name] begin[{] method[delete, return_type[void], modifier[synchronized public], parameter[historyId, tag]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), ...
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[delete] operator[SEP] Keyword[long] identifier[historyId] , identifier[String] identifier[tag] operator[SEP] Keyword[throws] identifier[DatabaseException] { Keyword[try] { identifier[psDeleteTag] operato...
private void categoryTreeToList(List<CmsCategoryBean> categoryList, List<CmsCategoryTreeEntry> entries) { if (entries == null) { return; } // skipping the root tree entry where the path property is empty for (CmsCategoryTreeEntry entry : entries) { CmsCategoryBea...
class class_name[name] begin[{] method[categoryTreeToList, return_type[void], modifier[private], parameter[categoryList, entries]] begin[{] if[binary_operation[member[.entries], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] ForStatement(...
Keyword[private] Keyword[void] identifier[categoryTreeToList] operator[SEP] identifier[List] operator[<] identifier[CmsCategoryBean] operator[>] identifier[categoryList] , identifier[List] operator[<] identifier[CmsCategoryTreeEntry] operator[>] identifier[entries] operator[SEP] { Keyword[if] operator[SEP] iden...
public static Method resolveMethod(Class<?> type, String methodName, Class<?>[] parameterTypes, Object[] arguments, Class<?> returnType) { try { return getMethod(type, methodName, parameterTypes); } catch (MethodNotFoundException cause) { Method method = findMethod(type, methodName, argu...
class class_name[name] begin[{] method[resolveMethod, return_type[type[Method]], modifier[public static], parameter[type, methodName, parameterTypes, arguments, returnType]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operator...
Keyword[public] Keyword[static] identifier[Method] identifier[resolveMethod] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[String] identifier[methodName] , identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[parameterTypes] ,...
private static int getBOMType(byte[] _bomBytes, int _length) { for (int i = 0; i < BOMBYTES.length; i++) { for (int j = 0; j < _length && j < BOMBYTES[i].length; j++) { if (_bomBytes[j] != BOMBYTES[i][j]) break; if (_bomBytes[j] == BOMBYTES[i][j] && j == BOMBYTES[i].length - 1) retur...
class class_name[name] begin[{] method[getBOMType, return_type[type[int]], modifier[private static], parameter[_bomBytes, _length]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=M...
Keyword[private] Keyword[static] Keyword[int] identifier[getBOMType] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[_bomBytes] , Keyword[int] identifier[_length] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<]...
private static byte[] decode(String s, int options) { byte[] bytes; try { bytes = s.getBytes(PREFERRED_ENCODING); } catch (java.io.UnsupportedEncodingException uee) { bytes = s.getBytes(); // Uses native encoding // CHECKME: Is this correct? I think it should be a warning instead of an error since...
class class_name[name] begin[{] method[decode, return_type[type[byte]], modifier[private static], parameter[s, options]] begin[{] local_variable[type[byte], bytes] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytes, postfix_operators=[], prefi...
Keyword[private] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decode] operator[SEP] identifier[String] identifier[s] , Keyword[int] identifier[options] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Keyword[try] { identifier[bytes] op...
public Printer visitLocalVariableAnnotation(final int typeRef, final TypePath typePath, final Label[] start, final Label[] end, final int[] index, final String desc, final boolean visible) { throw new RuntimeException("Must be overriden"); }
class class_name[name] begin[{] method[visitLocalVariableAnnotation, return_type[type[Printer]], modifier[public], parameter[typeRef, typePath, start, end, index, desc, visible]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None...
Keyword[public] identifier[Printer] identifier[visitLocalVariableAnnotation] operator[SEP] Keyword[final] Keyword[int] identifier[typeRef] , Keyword[final] identifier[TypePath] identifier[typePath] , Keyword[final] identifier[Label] operator[SEP] operator[SEP] identifier[start] , Keyword[final] identifier[Label] ope...
public Observable<OperationStatusResponseInner> cancelAsync(String resourceGroupName, String vmScaleSetName) { return cancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
class class_name[name] begin[{] method[cancelAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, vmScaleSetName]] begin[{] return[call[.cancelWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.vmScaleSetName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[OperationStatusResponseInner] operator[>] identifier[cancelAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vmScaleSetName] operator[SEP] { Keyword[return] identifier[cancelWithServiceResponseAsync...
protected Scale to(float x, float y, float z) { toX = x; toY = y; toZ = z; return this; }
class class_name[name] begin[{] method[to, return_type[type[Scale]], modifier[protected], parameter[x, y, z]] begin[{] assign[member[.toX], member[.x]] assign[member[.toY], member[.y]] assign[member[.toZ], member[.z]] return[THIS[]] end[}] END[}]
Keyword[protected] identifier[Scale] identifier[to] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[z] operator[SEP] { identifier[toX] operator[=] identifier[x] operator[SEP] identifier[toY] operator[=] identifier[y] operator[SEP] identifier[toZ] operator[=...
public static void copyXMLStream( final XMLStreamReader reader, final XMLStreamWriter writer, final StringBuilder textBuilder, final int flags, final boolean indentParentElementText, final String parentElement) throws XMLStreamException { i...
class class_name[name] begin[{] method[copyXMLStream, return_type[void], modifier[public static], parameter[reader, writer, textBuilder, flags, indentParentElementText, parentElement]] begin[{] local_variable[type[int], depth] ForStatement(body=BlockStatement(label=None, statements=[SwitchState...
Keyword[public] Keyword[static] Keyword[void] identifier[copyXMLStream] operator[SEP] Keyword[final] identifier[XMLStreamReader] identifier[reader] , Keyword[final] identifier[XMLStreamWriter] identifier[writer] , Keyword[final] identifier[StringBuilder] identifier[textBuilder] , Keyword[final] Keyword[int] identifi...
private void prepareRequestBody() throws IOException { if (bodyByteArray != null) { setByteArrayBody(); } else if (bodyString != null) { setStringBody(); } else if (bodyObject != null) { setTypedBody(); } }
class class_name[name] begin[{] method[prepareRequestBody, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.bodyByteArray], !=, literal[null]]] begin[{] call[.setByteArrayBody, parameter[]] else begin[{] if[binar...
Keyword[private] Keyword[void] identifier[prepareRequestBody] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[bodyByteArray] operator[!=] Other[null] operator[SEP] { identifier[setByteArrayBody] operator[SEP] operator[SEP] operator[SEP] ...
private Object getAtRow(int iRowIndex) throws DBException { try { Utility.getLogger().info("get row " + iRowIndex); GridTable gridTable = this.getGridTable(this.getMainRecord()); gridTable.getCurrentTable().getRecord().setEditMode(Constants.EDIT_NONE); Rec...
class class_name[name] begin[{] method[getAtRow, return_type[type[Object]], modifier[private], parameter[iRowIndex]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=Utility, selectors=[Meth...
Keyword[private] identifier[Object] identifier[getAtRow] operator[SEP] Keyword[int] identifier[iRowIndex] operator[SEP] Keyword[throws] identifier[DBException] { Keyword[try] { identifier[Utility] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[S...
public static final <T> boolean contains(T[] array, T item) { for (T b : array) { if (b.equals(item)) { return true; } } return false; }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[final public static], parameter[array, item]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], pref...
Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[contains] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[array] , identifier[T] identifier[item] operator[SEP] { Keyword[for] operator[SEP] identifier[T] identifier[b] operator[:]...
public static void deleteRelatedTablesExtension(GeoPackageCore geoPackage) { RelatedTablesCoreExtension relatedTablesExtension = getRelatedTableExtension(geoPackage); if (relatedTablesExtension.has()) { relatedTablesExtension.removeExtension(); } }
class class_name[name] begin[{] method[deleteRelatedTablesExtension, return_type[void], modifier[public static], parameter[geoPackage]] begin[{] local_variable[type[RelatedTablesCoreExtension], relatedTablesExtension] if[call[relatedTablesExtension.has, parameter[]]] begin[{] ...
Keyword[public] Keyword[static] Keyword[void] identifier[deleteRelatedTablesExtension] operator[SEP] identifier[GeoPackageCore] identifier[geoPackage] operator[SEP] { identifier[RelatedTablesCoreExtension] identifier[relatedTablesExtension] operator[=] identifier[getRelatedTableExtension] operator[SEP] identifie...
public Iterator<V> values() { final Iterator<ByteSource> iter = binaryValues(); return new Iterator() { @Override public boolean hasNext() { return iter.hasNext(); } @Override public V next() { BytezByteSource n...
class class_name[name] begin[{] method[values, return_type[type[Iterator]], modifier[public], parameter[]] begin[{] local_variable[type[Iterator], iter] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(express...
Keyword[public] identifier[Iterator] operator[<] identifier[V] operator[>] identifier[values] operator[SEP] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[ByteSource] operator[>] identifier[iter] operator[=] identifier[binaryValues] operator[SEP] operator[SEP] operator[SEP] Keyword[re...
protected void downloadTemplates(ProgressMonitor... monitors) throws IOException { File templateDir = getTemplateDir(); if (!templateDir.exists()) { if (!templateDir.mkdirs()) throw new IOException("Unable to create directory: " + templateDir.getAbsolutePath()); S...
class class_name[name] begin[{] method[downloadTemplates, return_type[void], modifier[protected], parameter[monitors]] begin[{] local_variable[type[File], templateDir] if[call[templateDir.exists, parameter[]]] begin[{] if[call[templateDir.mkdirs, parameter[]]] be...
Keyword[protected] Keyword[void] identifier[downloadTemplates] operator[SEP] identifier[ProgressMonitor] operator[...] identifier[monitors] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[templateDir] operator[=] identifier[getTemplateDir] operator[SEP] operator[SEP] operator[...
public ViewQuery groupLevel(final int grouplevel) { params[PARAM_GROUPLEVEL_OFFSET] = "group_level"; params[PARAM_GROUPLEVEL_OFFSET+1] = Integer.toString(grouplevel); return this; }
class class_name[name] begin[{] method[groupLevel, return_type[type[ViewQuery]], modifier[public], parameter[grouplevel]] begin[{] assign[member[.params], literal["group_level"]] assign[member[.params], call[Integer.toString, parameter[member[.grouplevel]]]] return[THIS[...
Keyword[public] identifier[ViewQuery] identifier[groupLevel] operator[SEP] Keyword[final] Keyword[int] identifier[grouplevel] operator[SEP] { identifier[params] operator[SEP] identifier[PARAM_GROUPLEVEL_OFFSET] operator[SEP] operator[=] literal[String] operator[SEP] identifier[params] operator[SEP] identifier[PA...
public static FeatureCollection fromFeatures(@NonNull Feature[] features) { return new FeatureCollection(TYPE, null, Arrays.asList(features)); }
class class_name[name] begin[{] method[fromFeatures, return_type[type[FeatureCollection]], modifier[public static], parameter[features]] begin[{] return[ClassCreator(arguments=[MemberReference(member=TYPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[...
Keyword[public] Keyword[static] identifier[FeatureCollection] identifier[fromFeatures] operator[SEP] annotation[@] identifier[NonNull] identifier[Feature] operator[SEP] operator[SEP] identifier[features] operator[SEP] { Keyword[return] Keyword[new] identifier[FeatureCollection] operator[SEP] identifier[TYPE] , ...
private <E extends Edge> MultiMap<Integer,Integer> singleLink( final Graph<E> g, int numClusters) { final int numEdges = g.size(); if (numClusters < 1 || numClusters > numEdges) throw new IllegalArgumentException( "Invalid range for number of clusters:...
class class_name[name] begin[{] method[singleLink, return_type[type[MultiMap]], modifier[private], parameter[g, numClusters]] begin[{] local_variable[type[int], numEdges] if[binary_operation[binary_operation[member[.numClusters], <, literal[1]], ||, binary_operation[member[.numClusters]...
Keyword[private] operator[<] identifier[E] Keyword[extends] identifier[Edge] operator[>] identifier[MultiMap] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[singleLink] operator[SEP] Keyword[final] identifier[Graph] operator[<] identifier[E] operator[>] identifier[g] , Keyword[int] ident...
protected synchronized Collection<WriterPoolMember> drainAllWriters() { LinkedList<WriterPoolMember> writers = new LinkedList<WriterPoolMember>(); availableWriters.drainTo(writers); while (writers.size() < currentActive) { try { WriterPoolMember w = availableWriters....
class class_name[name] begin[{] method[drainAllWriters, return_type[type[Collection]], modifier[synchronized protected], parameter[]] begin[{] local_variable[type[LinkedList], writers] call[availableWriters.drainTo, parameter[member[.writers]]] while[binary_operation[cal...
Keyword[protected] Keyword[synchronized] identifier[Collection] operator[<] identifier[WriterPoolMember] operator[>] identifier[drainAllWriters] operator[SEP] operator[SEP] { identifier[LinkedList] operator[<] identifier[WriterPoolMember] operator[>] identifier[writers] operator[=] Keyword[new] identifier[Linked...
private int _readChar () { try { final int c = m_aReader.read (); if (m_bTrackPosition) { if (m_nBackupChars > 0) { // If previously a char was backed up, don't increase the position! m_nBackupChars--; } else m_aPos.updatePositio...
class class_name[name] begin[{] method[_readChar, return_type[type[int]], modifier[private], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=read, postfix_operators=[], pr...
Keyword[private] Keyword[int] identifier[_readChar] operator[SEP] operator[SEP] { Keyword[try] { Keyword[final] Keyword[int] identifier[c] operator[=] identifier[m_aReader] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_bTrackPosition] o...
private boolean run(final Namespace options, final Target target, final PrintStream out, final PrintStream err, final String username, final boolean json, final BufferedReader stdin) throws Exception { final HeliosClient client = Utils.getClient(target, err, userna...
class class_name[name] begin[{] method[run, return_type[type[boolean]], modifier[private], parameter[options, target, out, err, username, json, stdin]] begin[{] local_variable[type[HeliosClient], client] if[binary_operation[member[.client], ==, literal[null]]] begin[{] retur...
Keyword[private] Keyword[boolean] identifier[run] operator[SEP] Keyword[final] identifier[Namespace] identifier[options] , Keyword[final] identifier[Target] identifier[target] , Keyword[final] identifier[PrintStream] identifier[out] , Keyword[final] identifier[PrintStream] identifier[err] , Keyword[final] identifie...
public boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException { if (status == Status.STATUS_UNKNOWN) throw new IllegalStateException("Status unknown"); if (status != Status.STATUS_ACTIV...
class class_name[name] begin[{] method[delistResource, return_type[type[boolean]], modifier[public], parameter[xaRes, flag]] begin[{] if[binary_operation[member[.status], ==, member[Status.STATUS_UNKNOWN]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[],...
Keyword[public] Keyword[boolean] identifier[delistResource] operator[SEP] identifier[XAResource] identifier[xaRes] , Keyword[int] identifier[flag] operator[SEP] Keyword[throws] identifier[IllegalStateException] , identifier[SystemException] { Keyword[if] operator[SEP] identifier[status] operator[==] identifier...
@Transactional public List<Role> authenticate(DataBinder parameters) throws AuthorizationException { try { long now = System.currentTimeMillis(); Credential credential = collectCredential(parameters); if (credential != null) { _logger.log(Level.FINE, "credential: {0}", or...
class class_name[name] begin[{] method[authenticate, return_type[type[List]], modifier[public], parameter[parameters]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentTimeMillis...
annotation[@] identifier[Transactional] Keyword[public] identifier[List] operator[<] identifier[Role] operator[>] identifier[authenticate] operator[SEP] identifier[DataBinder] identifier[parameters] operator[SEP] Keyword[throws] identifier[AuthorizationException] { Keyword[try] { Keyword[long] identif...
public void add(Collection<NrqlAlertCondition> conditions) { for(NrqlAlertCondition condition : conditions) this.conditions.put(condition.getId(), condition); }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[conditions]] begin[{] ForStatement(body=StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=conditions, postfix_operators=None, prefix_...
Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Collection] operator[<] identifier[NrqlAlertCondition] operator[>] identifier[conditions] operator[SEP] { Keyword[for] operator[SEP] identifier[NrqlAlertCondition] identifier[condition] operator[:] identifier[conditions] operator[SEP] Keywor...
public static boolean isSameDay(Calendar cal1, Calendar cal2) { if (cal1 == null || cal2 == null) { throw new IllegalArgumentException("The date must not be null"); } return cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR) && // cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && // ...
class class_name[name] begin[{] method[isSameDay, return_type[type[boolean]], modifier[public static], parameter[cal1, cal2]] begin[{] if[binary_operation[binary_operation[member[.cal1], ==, literal[null]], ||, binary_operation[member[.cal2], ==, literal[null]]]] begin[{] ThrowState...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isSameDay] operator[SEP] identifier[Calendar] identifier[cal1] , identifier[Calendar] identifier[cal2] operator[SEP] { Keyword[if] operator[SEP] identifier[cal1] operator[==] Other[null] operator[||] identifier[cal2] operator[==] Other[null] operator[S...
public void close() throws IOException { ServerSocketChannel ss = _ss; _ss = ss; if (ss != null) { try { ss.close(); } catch (Exception e) { } } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[ServerSocketChannel], ss] assign[member[._ss], member[.ss]] if[binary_operation[member[.ss], !=, literal[null]]] begin[{] TryStatement...
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ServerSocketChannel] identifier[ss] operator[=] identifier[_ss] operator[SEP] identifier[_ss] operator[=] identifier[ss] operator[SEP] Keyword[if] operator[SEP] identifier[ss] operator...
@Override public void updateMembers() throws GroupsException { // Track objects to invalidate Set<IGroupMember> invalidate = new HashSet<>(); invalidate.addAll(getAddedMembers().values()); invalidate.addAll(getRemovedMembers().values()); getLocalGroupService().updateGroupMe...
class class_name[name] begin[{] method[updateMembers, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Set], invalidate] call[invalidate.addAll, parameter[call[.getAddedMembers, parameter[]]]] call[invalidate.addAll, parameter[call[.getRemov...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[updateMembers] operator[SEP] operator[SEP] Keyword[throws] identifier[GroupsException] { identifier[Set] operator[<] identifier[IGroupMember] operator[>] identifier[invalidate] operator[=] Keyword[new] identifier[HashSet] operator[<] ope...
@Service public Map<String, Integer> getTaskQueueSizes(List<String> taskTypes) { return executionService.getTaskQueueSizes(taskTypes); }
class class_name[name] begin[{] method[getTaskQueueSizes, return_type[type[Map]], modifier[public], parameter[taskTypes]] begin[{] return[call[executionService.getTaskQueueSizes, parameter[member[.taskTypes]]]] end[}] END[}]
annotation[@] identifier[Service] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[getTaskQueueSizes] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[taskTypes] operator[SEP] { Keyword[return] identifier[executionSer...
@Override public boolean isEquivalentTo(TimeZoneRule other) { if (!(other instanceof AnnualTimeZoneRule)) { return false; } AnnualTimeZoneRule otherRule = (AnnualTimeZoneRule)other; if (startYear == otherRule.startYear && endYear == otherRule.endYear ...
class class_name[name] begin[{] method[isEquivalentTo, return_type[type[boolean]], modifier[public], parameter[other]] begin[{] if[binary_operation[member[.other], instanceof, type[AnnualTimeZoneRule]]] begin[{] return[literal[false]] else begin[{] None end[}] ...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isEquivalentTo] operator[SEP] identifier[TimeZoneRule] identifier[other] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[other] Keyword[instanceof] identifier[AnnualTimeZoneRule] operator[SEP] operator[S...
private static boolean generateAsResource(MetaDataObject metaDataObject) { if (metaDataObject instanceof MetaResource) { return true; } List<MetaDataObject> subTypes = metaDataObject.getSubTypes(true, false); if (!subTypes.isEmpty()) { for (MetaDataObject subType : subTypes) { if (generateAsResource(s...
class class_name[name] begin[{] method[generateAsResource, return_type[type[boolean]], modifier[private static], parameter[metaDataObject]] begin[{] if[binary_operation[member[.metaDataObject], instanceof, type[MetaResource]]] begin[{] return[literal[true]] else begin[{] Non...
Keyword[private] Keyword[static] Keyword[boolean] identifier[generateAsResource] operator[SEP] identifier[MetaDataObject] identifier[metaDataObject] operator[SEP] { Keyword[if] operator[SEP] identifier[metaDataObject] Keyword[instanceof] identifier[MetaResource] operator[SEP] { Keyword[return] literal...
private void addTermColumns(String fieldValue) { Set<String> termSet = tokenize(fieldValue); indexTerms(termSet); addFieldTermReferences(termSet); addFieldReference(); }
class class_name[name] begin[{] method[addTermColumns, return_type[void], modifier[private], parameter[fieldValue]] begin[{] local_variable[type[Set], termSet] call[.indexTerms, parameter[member[.termSet]]] call[.addFieldTermReferences, parameter[member[.termSet]]] ...
Keyword[private] Keyword[void] identifier[addTermColumns] operator[SEP] identifier[String] identifier[fieldValue] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[termSet] operator[=] identifier[tokenize] operator[SEP] identifier[fieldValue] operator[SEP] operator[SEP] identi...