code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@SuppressWarnings("unchecked") public List<Tuple2<RetrievableStateHandle<T>, String>> getAllAndLock() throws Exception { final List<Tuple2<RetrievableStateHandle<T>, String>> stateHandles = new ArrayList<>(); boolean success = false; retry: while (!success) { stateHandles.clear(); Stat stat = client.c...
class class_name[name] begin[{] method[getAllAndLock, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], stateHandles] local_variable[type[boolean], success] while[member[.success]] begin[{] call[stateHandles.clear...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[Tuple2] operator[<] identifier[RetrievableStateHandle] operator[<] identifier[T] operator[>] , identifier[String] operator[>] operator[>] identifier[getAllAndLock] operator[SEP...
public void append(final NamespaceEntry e) throws IOException { final byte[] ebytes = nsrec.write(e); append(ebytes); }
class class_name[name] begin[{] method[append, return_type[void], modifier[public], parameter[e]] begin[{] local_variable[type[byte], ebytes] call[.append, parameter[member[.ebytes]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[append] operator[SEP] Keyword[final] identifier[NamespaceEntry] identifier[e] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[ebytes] operator[=] identifier[nsrec] operator[SEP] identifier[write] ...
private List<IDirectory> addFromManifestClassPath( List<IDirectory> classpath ) { if( classpath == null ) { return classpath; } ArrayList<IDirectory> newClasspath = new ArrayList<>(); for( IDirectory root : classpath ) { //add the root JAR itself first, preserving ordering i...
class class_name[name] begin[{] method[addFromManifestClassPath, return_type[type[List]], modifier[private], parameter[classpath]] begin[{] if[binary_operation[member[.classpath], ==, literal[null]]] begin[{] return[member[.classpath]] else begin[{] None end[}] ...
Keyword[private] identifier[List] operator[<] identifier[IDirectory] operator[>] identifier[addFromManifestClassPath] operator[SEP] identifier[List] operator[<] identifier[IDirectory] operator[>] identifier[classpath] operator[SEP] { Keyword[if] operator[SEP] identifier[classpath] operator[==] Other[null] operat...
@Override public final void visit(final PersonDocumentMongo document) { gedObject = new Person(parent, new ObjectId(document.getString())); }
class class_name[name] begin[{] method[visit, return_type[void], modifier[final public], parameter[document]] begin[{] assign[member[.gedObject], ClassCreator(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[...
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[PersonDocumentMongo] identifier[document] operator[SEP] { identifier[gedObject] operator[=] Keyword[new] identifier[Person] operator[SEP] identifier[parent] , Keyword[new] id...
protected static void checkAndFixType(ParaObject obj) { if (obj != null) { if (StringUtils.startsWith(obj.getType(), SPECIAL_PREFIX)) { obj.setType(obj.getType().replaceAll("^[" + SPECIAL_PREFIX + "]*", "")); } if (StringUtils.contains(obj.getType(), "#")) { // ElasticSearch doesn't allow # in type m...
class class_name[name] begin[{] method[checkAndFixType, return_type[void], modifier[static protected], parameter[obj]] begin[{] if[binary_operation[member[.obj], !=, literal[null]]] begin[{] if[call[StringUtils.startsWith, parameter[call[obj.getType, parameter[]], member...
Keyword[protected] Keyword[static] Keyword[void] identifier[checkAndFixType] operator[SEP] identifier[ParaObject] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifie...
public static Field[] getFields(Class<?> beanClass) throws SecurityException { Field[] allFields = FIELDS_CACHE.get(beanClass); if (null != allFields) { return allFields; } allFields = getFieldsDirectly(beanClass, true); return FIELDS_CACHE.put(beanClass, allFields); }
class class_name[name] begin[{] method[getFields, return_type[type[Field]], modifier[public static], parameter[beanClass]] begin[{] local_variable[type[Field], allFields] if[binary_operation[literal[null], !=, member[.allFields]]] begin[{] return[member[.allFields]] ...
Keyword[public] Keyword[static] identifier[Field] operator[SEP] operator[SEP] identifier[getFields] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[beanClass] operator[SEP] Keyword[throws] identifier[SecurityException] { identifier[Field] operator[SEP] operator[SEP] identifier[allF...
@Override public void visit(NodeVisitor v) { if (v.visit(this)) { getTarget().visit(v); getProperty().visit(v); } }
class class_name[name] begin[{] method[visit, return_type[void], modifier[public], parameter[v]] begin[{] if[call[v.visit, parameter[THIS[]]]] begin[{] call[.getTarget, parameter[]] call[.getProperty, parameter[]] else begin[{] None ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[NodeVisitor] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[v] operator[SEP] identifier[visit] operator[SEP] Keyword[this] operator[SEP] operator[SEP] { identifier[getTarget]...
public int getColumnDisplaySize(int column) throws SQLException { sourceResultSet.checkColumnBounds(column); VoltType type = sourceResultSet.table.getColumnType(column - 1); switch(type) { case TINYINT: return (new Byte(Byte.MIN_VALUE)).toString().length()...
class class_name[name] begin[{] method[getColumnDisplaySize, return_type[type[int]], modifier[public], parameter[column]] begin[{] call[sourceResultSet.checkColumnBounds, parameter[member[.column]]] local_variable[type[VoltType], type] SwitchStatement(cases=[SwitchStatementCase(...
Keyword[public] Keyword[int] identifier[getColumnDisplaySize] operator[SEP] Keyword[int] identifier[column] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[sourceResultSet] operator[SEP] identifier[checkColumnBounds] operator[SEP] identifier[column] operator[SEP] operator[SEP] identifier[Volt...
@Override public CommerceShippingMethod fetchByPrimaryKey(Serializable primaryKey) { Serializable serializable = entityCache.getResult(CommerceShippingMethodModelImpl.ENTITY_CACHE_ENABLED, CommerceShippingMethodImpl.class, primaryKey); if (serializable == nullModel) { return null; } CommerceShippingMe...
class class_name[name] begin[{] method[fetchByPrimaryKey, return_type[type[CommerceShippingMethod]], modifier[public], parameter[primaryKey]] begin[{] local_variable[type[Serializable], serializable] if[binary_operation[member[.serializable], ==, member[.nullModel]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] identifier[CommerceShippingMethod] identifier[fetchByPrimaryKey] operator[SEP] identifier[Serializable] identifier[primaryKey] operator[SEP] { identifier[Serializable] identifier[serializable] operator[=] identifier[entityCache] operator[SEP] identifier[getResul...
private void configureTag(Tag tag, Map attributes) throws JellyException { if ( tag instanceof DynaTag ) { DynaTag dynaTag = (DynaTag) tag; for (Object o : attributes.entrySet()) { Entry entry = (Entry) o; String name = (String) entry.getKey(); ...
class class_name[name] begin[{] method[configureTag, return_type[void], modifier[private], parameter[tag, attributes]] begin[{] if[binary_operation[member[.tag], instanceof, type[DynaTag]]] begin[{] local_variable[type[DynaTag], dynaTag] ForStatement(body=BlockStatement(...
Keyword[private] Keyword[void] identifier[configureTag] operator[SEP] identifier[Tag] identifier[tag] , identifier[Map] identifier[attributes] operator[SEP] Keyword[throws] identifier[JellyException] { Keyword[if] operator[SEP] identifier[tag] Keyword[instanceof] identifier[DynaTag] operator[SEP] { i...
public RadarSeries setLineStyle(BasicStroke basicStroke) { stroke = basicStroke; if (this.lineWidth > 0.0f) { stroke = new BasicStroke( lineWidth, this.stroke.getEndCap(), this.stroke.getLineJoin(), this.stroke.getMiterLimit(), ...
class class_name[name] begin[{] method[setLineStyle, return_type[type[RadarSeries]], modifier[public], parameter[basicStroke]] begin[{] assign[member[.stroke], member[.basicStroke]] if[binary_operation[THIS[member[None.lineWidth]], >, literal[0.0f]]] begin[{] ...
Keyword[public] identifier[RadarSeries] identifier[setLineStyle] operator[SEP] identifier[BasicStroke] identifier[basicStroke] operator[SEP] { identifier[stroke] operator[=] identifier[basicStroke] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[lineWidth] operator[>] literal[Float...
protected void renderARIAInvalid(FacesContext context, UIInput component) throws IOException { if (!component.isValid()) { ResponseWriter writer = context.getResponseWriter(); writer.writeAttribute(HTML.ARIA_INVALID, "true", null); } }
class class_name[name] begin[{] method[renderARIAInvalid, return_type[void], modifier[protected], parameter[context, component]] begin[{] if[call[component.isValid, parameter[]]] begin[{] local_variable[type[ResponseWriter], writer] call[writer.writeAttribute...
Keyword[protected] Keyword[void] identifier[renderARIAInvalid] operator[SEP] identifier[FacesContext] identifier[context] , identifier[UIInput] identifier[component] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[component] operator[SEP] identifier[isVal...
public static l2param get(nitro_service service) throws Exception{ l2param obj = new l2param(); l2param[] response = (l2param[])obj.get_resources(service); return response[0]; }
class class_name[name] begin[{] method[get, return_type[type[l2param]], modifier[public static], parameter[service]] begin[{] local_variable[type[l2param], obj] local_variable[type[l2param], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[l2param] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] { identifier[l2param] identifier[obj] operator[=] Keyword[new] identifier[l2param] operator[SEP] operator[SEP] operator[SEP] identifi...
public List<Object> getEntities() { List<Object> entitiesList = new LinkedList<Object>(); for (Result result : results) { entitiesList.add(result.getObject()); } return entitiesList; }
class class_name[name] begin[{] method[getEntities, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], entitiesList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(argu...
Keyword[public] identifier[List] operator[<] identifier[Object] operator[>] identifier[getEntities] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Object] operator[>] identifier[entitiesList] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Object] operator[>] operato...
@Nonnull @Override public AffinityGroup create(@Nonnull AffinityGroupCreateOptions options) throws InternalException, CloudException { if(options == null || options.getName() == null) throw new InternalException("Cannot create AffinityGroup. Create options or affinity group name cannot be n...
class class_name[name] begin[{] method[create, return_type[type[AffinityGroup]], modifier[public], parameter[options]] begin[{] if[binary_operation[binary_operation[member[.options], ==, literal[null]], ||, binary_operation[call[options.getName, parameter[]], ==, literal[null]]]] begin[{] Throw...
annotation[@] identifier[Nonnull] annotation[@] identifier[Override] Keyword[public] identifier[AffinityGroup] identifier[create] operator[SEP] annotation[@] identifier[Nonnull] identifier[AffinityGroupCreateOptions] identifier[options] operator[SEP] Keyword[throws] identifier[InternalException] , identifier[CloudExce...
public void unsubscribeAllDeletedResources(CmsObject cms, long deletedTo) throws CmsException { if (!isEnabled()) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0)); } m_securityManager.unsubscribeAllDeletedResources(cms.getReques...
class class_name[name] begin[{] method[unsubscribeAllDeletedResources, return_type[void], modifier[public], parameter[cms, deletedTo]] begin[{] if[call[.isEnabled, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, pos...
Keyword[public] Keyword[void] identifier[unsubscribeAllDeletedResources] operator[SEP] identifier[CmsObject] identifier[cms] , Keyword[long] identifier[deletedTo] operator[SEP] Keyword[throws] identifier[CmsException] { Keyword[if] operator[SEP] operator[!] identifier[isEnabled] operator[SEP] operator[SEP] oper...
public EnvironmentPlatform withLanguages(EnvironmentLanguage... languages) { if (this.languages == null) { setLanguages(new java.util.ArrayList<EnvironmentLanguage>(languages.length)); } for (EnvironmentLanguage ele : languages) { this.languages.add(ele); } ...
class class_name[name] begin[{] method[withLanguages, return_type[type[EnvironmentPlatform]], modifier[public], parameter[languages]] begin[{] if[binary_operation[THIS[member[None.languages]], ==, literal[null]]] begin[{] call[.setLanguages, parameter[ClassCreator(argume...
Keyword[public] identifier[EnvironmentPlatform] identifier[withLanguages] operator[SEP] identifier[EnvironmentLanguage] operator[...] identifier[languages] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[languages] operator[==] Other[null] operator[SEP] { identifier[se...
public void info(Throwable error, Map<String, Object> custom, String description) { log(error, custom, description, Level.INFO); }
class class_name[name] begin[{] method[info, return_type[void], modifier[public], parameter[error, custom, description]] begin[{] call[.log, parameter[member[.error], member[.custom], member[.description], member[Level.INFO]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[info] operator[SEP] identifier[Throwable] identifier[error] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[custom] , identifier[String] identifier[description] operator[SEP] { identifier[log] operator[SEP] identifier[error]...
public static void printNodes(Document doc) { NodeList children = doc.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node node = children.item(i); if (node instanceof Element) printNode((Element) node); } }
class class_name[name] begin[{] method[printNodes, return_type[void], modifier[public static], parameter[doc]] begin[{] local_variable[type[NodeList], children] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dime...
Keyword[public] Keyword[static] Keyword[void] identifier[printNodes] operator[SEP] identifier[Document] identifier[doc] operator[SEP] { identifier[NodeList] identifier[children] operator[=] identifier[doc] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP...
public void loadVfsEntryBean( final String siteRoot, final String filter, final AsyncCallback<CmsVfsEntryBean> asyncCallback) { CmsRpcAction<CmsVfsEntryBean> action = new CmsRpcAction<CmsVfsEntryBean>() { @Override public void execute() { start...
class class_name[name] begin[{] method[loadVfsEntryBean, return_type[void], modifier[public], parameter[siteRoot, filter, asyncCallback]] begin[{] local_variable[type[CmsRpcAction], action] call[action.execute, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[loadVfsEntryBean] operator[SEP] Keyword[final] identifier[String] identifier[siteRoot] , Keyword[final] identifier[String] identifier[filter] , Keyword[final] identifier[AsyncCallback] operator[<] identifier[CmsVfsEntryBean] operator[>] identifier[asyncCallback] operator[SEP] ...
@Override public DisableRuleResult disableRule(DisableRuleRequest request) { request = beforeClientExecution(request); return executeDisableRule(request); }
class class_name[name] begin[{] method[disableRule, return_type[type[DisableRuleResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDisableRule, parameter[member[.request]]]] ...
annotation[@] identifier[Override] Keyword[public] identifier[DisableRuleResult] identifier[disableRule] operator[SEP] identifier[DisableRuleRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP]...
static String getAccessDevname() { // Check if already done if (access_devname==null) if ((access_devname=System.getProperty("ACCESS_DEVNAME"))==null) // From JVM property if ((access_devname=System.getenv("ACCESS_DEVNAME"))==null) // From Environment property access_devname = getFromEnvFile("ACCESS_D...
class class_name[name] begin[{] method[getAccessDevname, return_type[type[String]], modifier[static], parameter[]] begin[{] if[binary_operation[member[.access_devname], ==, literal[null]]] begin[{] if[binary_operation[assign[member[.access_devname], call[System.getProperty, paramete...
Keyword[static] identifier[String] identifier[getAccessDevname] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[access_devname] operator[==] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[access_devname] operator[=] identifier[System] operator[SEP] identifier[getP...
@Override public GetSegmentResult getSegment(GetSegmentRequest request) { request = beforeClientExecution(request); return executeGetSegment(request); }
class class_name[name] begin[{] method[getSegment, return_type[type[GetSegmentResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetSegment, parameter[member[.request]]]] en...
annotation[@] identifier[Override] Keyword[public] identifier[GetSegmentResult] identifier[getSegment] operator[SEP] identifier[GetSegmentRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Ke...
public static BigInteger factorial(BigInteger n) { BigInteger nFac = BigInteger.ONE; while(n.compareTo(BigInteger.ONE) > 0) { nFac = nFac.multiply(n); n = n.subtract(BigInteger.ONE); } return nFac; }
class class_name[name] begin[{] method[factorial, return_type[type[BigInteger]], modifier[public static], parameter[n]] begin[{] local_variable[type[BigInteger], nFac] while[binary_operation[call[n.compareTo, parameter[member[BigInteger.ONE]]], >, literal[0]]] begin[{] ...
Keyword[public] Keyword[static] identifier[BigInteger] identifier[factorial] operator[SEP] identifier[BigInteger] identifier[n] operator[SEP] { identifier[BigInteger] identifier[nFac] operator[=] identifier[BigInteger] operator[SEP] identifier[ONE] operator[SEP] Keyword[while] operator[SEP] identifier[n] operato...
public LibraryTypeEnum getType() { if (isReference()) { final LibrarySet master = (LibrarySet) getCheckedRef(LibrarySet.class, "LibrarySet"); return master.getType(); } return this.libraryType; }
class class_name[name] begin[{] method[getType, return_type[type[LibraryTypeEnum]], modifier[public], parameter[]] begin[{] if[call[.isReference, parameter[]]] begin[{] local_variable[type[LibrarySet], master] return[call[master.getType, parameter[]]] else begin[...
Keyword[public] identifier[LibraryTypeEnum] identifier[getType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isReference] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[LibrarySet] identifier[master] operator[=] operator[SEP] identifier[LibrarySet] operator...
public static void shuffleSelectedLeftRowsToRightTableModel(final JTable table, final GenericShuffleTableModel<?> shuffleTableModel) throws NoRowsSelectedException { final int[] selectedRows = table.getSelectedRows(); if (selectedRows.length != 0) { shuffleTableModel.shuffleSelectedLeftRowsToRightTabl...
class class_name[name] begin[{] method[shuffleSelectedLeftRowsToRightTableModel, return_type[void], modifier[public static], parameter[table, shuffleTableModel]] begin[{] local_variable[type[int], selectedRows] if[binary_operation[member[selectedRows.length], !=, literal[0]]] begin[{] ...
Keyword[public] Keyword[static] Keyword[void] identifier[shuffleSelectedLeftRowsToRightTableModel] operator[SEP] Keyword[final] identifier[JTable] identifier[table] , Keyword[final] identifier[GenericShuffleTableModel] operator[<] operator[?] operator[>] identifier[shuffleTableModel] operator[SEP] Keyword[throws] iden...
private boolean setUnauthenticatedSubjectIfNeeded(Subject invokedSubject, Subject receivedSubject) { if ((invokedSubject == null) && (receivedSubject == null)) { // create the unauthenticated subject and set as the invocation subject subjectManager.setInvocationSubject(unauthenticatedSub...
class class_name[name] begin[{] method[setUnauthenticatedSubjectIfNeeded, return_type[type[boolean]], modifier[private], parameter[invokedSubject, receivedSubject]] begin[{] if[binary_operation[binary_operation[member[.invokedSubject], ==, literal[null]], &&, binary_operation[member[.receivedSu...
Keyword[private] Keyword[boolean] identifier[setUnauthenticatedSubjectIfNeeded] operator[SEP] identifier[Subject] identifier[invokedSubject] , identifier[Subject] identifier[receivedSubject] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[invokedSubject] operator[==] Other[null] operator[SEP]...
public Token next() throws IOException { // skip whitespace while (Character.isWhitespace((char)lastChar)) { readChar(); } // handle punctuation switch (lastChar) { case -1: readChar(); return Token.TokenEOF; case '{': readCh...
class class_name[name] begin[{] method[next, return_type[type[Token]], modifier[public], parameter[]] begin[{] while[call[Character.isWhitespace, parameter[Cast(expression=MemberReference(member=lastChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimen...
Keyword[public] identifier[Token] identifier[next] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[while] operator[SEP] identifier[Character] operator[SEP] identifier[isWhitespace] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[lastChar] operator[SEP] operator[SE...
public java.util.List<ResourceComplianceSummaryItem> getResourceComplianceSummaryItems() { if (resourceComplianceSummaryItems == null) { resourceComplianceSummaryItems = new com.amazonaws.internal.SdkInternalList<ResourceComplianceSummaryItem>(); } return resourceComplianceSummaryIte...
class class_name[name] begin[{] method[getResourceComplianceSummaryItems, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.resourceComplianceSummaryItems], ==, literal[null]]] begin[{] assign[member[.resourceComplianceSummaryIt...
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ResourceComplianceSummaryItem] operator[>] identifier[getResourceComplianceSummaryItems] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceComplianceSummaryItems] operato...
public MMAXAnnotation getTargetList(int i) { if (MMAXPointer_Type.featOkTst && ((MMAXPointer_Type)jcasType).casFeat_targetList == null) jcasType.jcas.throwFeatMissing("targetList", "de.julielab.jules.types.mmax.MMAXPointer"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((MMAXPointe...
class class_name[name] begin[{] method[getTargetList, return_type[type[MMAXAnnotation]], modifier[public], parameter[i]] begin[{] if[binary_operation[member[MMAXPointer_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=...
Keyword[public] identifier[MMAXAnnotation] identifier[getTargetList] operator[SEP] Keyword[int] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[MMAXPointer_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[MMAXPointer_Type] operator[SEP] identifier[j...
public CloseableHttpResponse copyHeaders(OutgoingRequest outgoingRequest, HttpEntityEnclosingRequest incomingRequest, HttpResponse httpClientResponse) { HttpResponse result = new BasicHttpResponse(httpClientResponse.getStatusLine()); result.setEntity(httpClientResponse.getEntity()); ...
class class_name[name] begin[{] method[copyHeaders, return_type[type[CloseableHttpResponse]], modifier[public], parameter[outgoingRequest, incomingRequest, httpClientResponse]] begin[{] local_variable[type[HttpResponse], result] call[result.setEntity, parameter[call[httpClientResponse.g...
Keyword[public] identifier[CloseableHttpResponse] identifier[copyHeaders] operator[SEP] identifier[OutgoingRequest] identifier[outgoingRequest] , identifier[HttpEntityEnclosingRequest] identifier[incomingRequest] , identifier[HttpResponse] identifier[httpClientResponse] operator[SEP] { identifier[HttpResponse]...
private double naiveQueryDense(NumberVector obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) { double len = 0.; // Length of query object, for final normalization for(int dim = 0, max = obj.getDimensionality(); dim < max; dim++) { final double val = obj.doubleValue(dim); if(val == ...
class class_name[name] begin[{] method[naiveQueryDense, return_type[type[double]], modifier[private], parameter[obj, scores, cands]] begin[{] local_variable[type[double], len] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Variable...
Keyword[private] Keyword[double] identifier[naiveQueryDense] operator[SEP] identifier[NumberVector] identifier[obj] , identifier[WritableDoubleDataStore] identifier[scores] , identifier[HashSetModifiableDBIDs] identifier[cands] operator[SEP] { Keyword[double] identifier[len] operator[=] literal[Float] operator...
private static String trim(String string) { String result = string.trim(); if (result.startsWith("\"") && result.endsWith("\"") && result.length() > 1) { result = result.substring(1, result.length() - 1); } return result; }
class class_name[name] begin[{] method[trim, return_type[type[String]], modifier[private static], parameter[string]] begin[{] local_variable[type[String], result] if[binary_operation[binary_operation[call[result.startsWith, parameter[literal["\""]]], &&, call[result.endsWith, parameter[...
Keyword[private] Keyword[static] identifier[String] identifier[trim] operator[SEP] identifier[String] identifier[string] operator[SEP] { identifier[String] identifier[result] operator[=] identifier[string] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifi...
public static float[] toFloat(int[] array) { float[] n = new float[array.length]; for (int i = 0; i < array.length; i++) { n[i] = (float) array[i]; } return n; }
class class_name[name] begin[{] method[toFloat, return_type[type[float]], modifier[public static], parameter[array]] begin[{] local_variable[type[float], n] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, p...
Keyword[public] Keyword[static] Keyword[float] operator[SEP] operator[SEP] identifier[toFloat] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] operator[SEP] { Keyword[float] operator[SEP] operator[SEP] identifier[n] operator[=] Keyword[new] Keyword[float] operator[SEP] identifier[array] ...
@Pure public static Point2d L4_EL2(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_4_N, LAMBERT_4_C, LAMBERT_4_XS, LAMBERT_4_YS); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_2E_N, LAMBERT_2E_C, LAMBERT_2E...
class class_name[name] begin[{] method[L4_EL2, return_type[type[Point2d]], modifier[public static], parameter[x, y]] begin[{] local_variable[type[Point2d], ntfLambdaPhi] return[call[.NTFLambdaPhi_NTFLambert, parameter[call[ntfLambdaPhi.getX, parameter[]], call[ntfLambdaPhi.getY, parameter[]], m...
annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[Point2d] identifier[L4_EL2] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] operator[SEP] { Keyword[final] identifier[Point2d] identifier[ntfLambdaPhi] operator[=] identifier[NTFLambert_NTFLambdaPhi] operator[S...
private List<String> pruneSuggestions(final List<String> suggestions) { List<String> prunedSuggestions = new ArrayList<>(suggestions.size()); for (final String suggestion : suggestions) { if (suggestion.indexOf(' ') == -1) { prunedSuggestions.add(suggestion); } else { Str...
class class_name[name] begin[{] method[pruneSuggestions, return_type[type[List]], modifier[private], parameter[suggestions]] begin[{] local_variable[type[List], prunedSuggestions] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvoc...
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[pruneSuggestions] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[suggestions] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[prunedS...
public void initialize() { if (cacheSize <= 0) {// 不考虑cacheSize为0的情况,强制使用LRU cache机制 cacheSize = DEFAULT_CACHE_SIZE; } functions = new HashMap<String, Object>(); engine = new ScriptJexlEngine(); engine.setCache(cacheSize); engine.setSilent(true); engi...
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.cacheSize], <=, literal[0]]] begin[{] assign[member[.cacheSize], member[.DEFAULT_CACHE_SIZE]] else begin[{] None end[...
Keyword[public] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[cacheSize] operator[<=] Other[0] operator[SEP] { identifier[cacheSize] operator[=] identifier[DEFAULT_CACHE_SIZE] operator[SEP] } identifier[functions] operator[=] Keyw...
@Override public Daft toObject() throws JAXBException { this.upgradeToLatestVersion(); return (Daft) DaftIeUtils.createUnmarshaller().unmarshal(this.getDocument()); }
class class_name[name] begin[{] method[toObject, return_type[type[Daft]], modifier[public], parameter[]] begin[{] THIS[call[None.upgradeToLatestVersion, parameter[]]] return[Cast(expression=MethodInvocation(arguments=[], member=createUnmarshaller, postfix_operators=[], prefix_operators=...
annotation[@] identifier[Override] Keyword[public] identifier[Daft] identifier[toObject] operator[SEP] operator[SEP] Keyword[throws] identifier[JAXBException] { Keyword[this] operator[SEP] identifier[upgradeToLatestVersion] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Daft] ...
protected void put(ParameterizedType type, T result) { Class<?> rawType = (Class<?>) type.getRawType(); ClassLoader cl = SecurityActions.getClassLoader(rawType); Map<String, T> classLoaderCache = getClassLoaderCache(cl); synchronized (classLoaderCache) { // TODO JBMICROCONT-13...
class class_name[name] begin[{] method[put, return_type[void], modifier[protected], parameter[type, result]] begin[{] local_variable[type[Class], rawType] local_variable[type[ClassLoader], cl] local_variable[type[Map], classLoaderCache] SYNCHRONIZED[member[.classLoaderCa...
Keyword[protected] Keyword[void] identifier[put] operator[SEP] identifier[ParameterizedType] identifier[type] , identifier[T] identifier[result] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[rawType] operator[=] operator[SEP] identifier[Class] operator[<] operator[?] operator[...
public static MozuUrl updateProductVariationLocalizedDeltaPriceUrl(String currencyCode, String productCode, String responseFields, String variationKey) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice/{currencyCode}?respon...
class class_name[name] begin[{] method[updateProductVariationLocalizedDeltaPriceUrl, return_type[type[MozuUrl]], modifier[public static], parameter[currencyCode, productCode, responseFields, variationKey]] begin[{] local_variable[type[UrlFormatter], formatter] call[formatter.formatUrl, ...
Keyword[public] Keyword[static] identifier[MozuUrl] identifier[updateProductVariationLocalizedDeltaPriceUrl] operator[SEP] identifier[String] identifier[currencyCode] , identifier[String] identifier[productCode] , identifier[String] identifier[responseFields] , identifier[String] identifier[variationKey] operator[SE...
public static ServerSocket createSocketFromPorts(Iterator<Integer> portsIterator, SocketFactory factory) { while (portsIterator.hasNext()) { int port = portsIterator.next(); LOG.debug("Trying to open socket on port {}", port); try { return factory.createSocket(port); } catch (IOException | IllegalArgu...
class class_name[name] begin[{] method[createSocketFromPorts, return_type[type[ServerSocket]], modifier[public static], parameter[portsIterator, factory]] begin[{] while[call[portsIterator.hasNext, parameter[]]] begin[{] local_variable[type[int], port] call[L...
Keyword[public] Keyword[static] identifier[ServerSocket] identifier[createSocketFromPorts] operator[SEP] identifier[Iterator] operator[<] identifier[Integer] operator[>] identifier[portsIterator] , identifier[SocketFactory] identifier[factory] operator[SEP] { Keyword[while] operator[SEP] identifier[portsIterato...
@Override public <T> T asObject(String string, Class<T> valueType) { // at this point value type is guaranteed to be a File return (T) new File(string); }
class class_name[name] begin[{] method[asObject, return_type[type[T]], modifier[public], parameter[string, valueType]] begin[{] return[Cast(expression=ClassCreator(arguments=[MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_typ...
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[asObject] operator[SEP] identifier[String] identifier[string] , identifier[Class] operator[<] identifier[T] operator[>] identifier[valueType] operator[SEP] { Keyword[return] operator[SEP] identifier...
public void add(Date date) { final Calendar cal = Calendar.getInstance(); cal.setTime(date); add(cal); date.setTime(cal.getTime().getTime()); }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[date]] begin[{] local_variable[type[Calendar], cal] call[cal.setTime, parameter[member[.date]]] call[.add, parameter[member[.cal]]] call[date.setTime, parameter[cal...
Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Date] identifier[date] operator[SEP] { Keyword[final] identifier[Calendar] identifier[cal] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[cal] operator[SEP] identifi...
public WvWMatch getWvWMatchInfo(int worldID, WvWMatch.Endpoint type) throws GuildWars2Exception { if (type == null) return getWvWMatchInfoUsingWorld(worldID); try { switch (type) { case All: return getWvWMatchInfoUsingWorld(worldID); case Overview: Response<WvWMatchOverview> overview = gw2API.g...
class class_name[name] begin[{] method[getWvWMatchInfo, return_type[type[WvWMatch]], modifier[public], parameter[worldID, type]] begin[{] if[binary_operation[member[.type], ==, literal[null]]] begin[{] return[call[.getWvWMatchInfoUsingWorld, parameter[member[.worldID]]]] else begin[{] N...
Keyword[public] identifier[WvWMatch] identifier[getWvWMatchInfo] operator[SEP] Keyword[int] identifier[worldID] , identifier[WvWMatch] operator[SEP] identifier[Endpoint] identifier[type] operator[SEP] Keyword[throws] identifier[GuildWars2Exception] { Keyword[if] operator[SEP] identifier[type] operator[==] Other...
private void resolveTableColumns(Table table) { HsqlList set = new HsqlArrayList(); collectAllColumnExpressions(set); for (int i = 0; i < set.size(); i++) { ExpressionColumn array_element = (ExpressionColumn)set.get(i); ColumnSchema column = table.getColumn(table.getColum...
class class_name[name] begin[{] method[resolveTableColumns, return_type[void], modifier[private], parameter[table]] begin[{] local_variable[type[HsqlList], set] call[.collectAllColumnExpressions, parameter[member[.set]]] ForStatement(body=BlockStatement(label=None, statements=[L...
Keyword[private] Keyword[void] identifier[resolveTableColumns] operator[SEP] identifier[Table] identifier[table] operator[SEP] { identifier[HsqlList] identifier[set] operator[=] Keyword[new] identifier[HsqlArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[collectAllColumnExpressions] operator[SEP] ...
private double handleCase4() { if( bracket ) { return SearchInterpolate.cubic2(fp, gp, stp, fy, gy, sty); } else if( stp > stx ) { return stmax; // see comment in case 3 about stmax and stmin } else { return stmin; } }
class class_name[name] begin[{] method[handleCase4, return_type[type[double]], modifier[private], parameter[]] begin[{] if[member[.bracket]] begin[{] return[call[SearchInterpolate.cubic2, parameter[member[.fp], member[.gp], member[.stp], member[.fy], member[.gy], member[.sty]]]] ...
Keyword[private] Keyword[double] identifier[handleCase4] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[bracket] operator[SEP] { Keyword[return] identifier[SearchInterpolate] operator[SEP] identifier[cubic2] operator[SEP] identifier[fp] , identifier[gp] , identifier[stp] , ident...
protected boolean canBeUTF8( String str) { for (int i = str.length() - 1; i >= 0; i--) { if (str.charAt(i) > 0x00ff) { return false; } } return true; }
class class_name[name] begin[{] method[canBeUTF8, return_type[type[boolean]], modifier[protected], parameter[str]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[],...
Keyword[protected] Keyword[boolean] identifier[canBeUTF8] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[i...
@Override public boolean execute(String sql) throws SQLException { checkClosed(); VoltSQL query = VoltSQL.parseSQL(sql); return this.execute(query); }
class class_name[name] begin[{] method[execute, return_type[type[boolean]], modifier[public], parameter[sql]] begin[{] call[.checkClosed, parameter[]] local_variable[type[VoltSQL], query] return[THIS[call[None.execute, parameter[member[.query]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[execute] operator[SEP] identifier[String] identifier[sql] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] identifier[VoltSQL] identifier[query] operator[=] ide...
public static void appendTo(Formatter formatter, int width, int precision, boolean leftJustified, String out) { try { Appendable appendable = formatter.out(); if (precision > -1 && out.length() > precision) { appendable.append(Helpers.truncate(out,...
class class_name[name] begin[{] method[appendTo, return_type[void], modifier[public static], parameter[formatter, width, precision, leftJustified, out]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argu...
Keyword[public] Keyword[static] Keyword[void] identifier[appendTo] operator[SEP] identifier[Formatter] identifier[formatter] , Keyword[int] identifier[width] , Keyword[int] identifier[precision] , Keyword[boolean] identifier[leftJustified] , identifier[String] identifier[out] operator[SEP] { Keyword[try] { ...
private void percolateDown(int pos) { int p = pos; int y = this.heap.get(p); while (left(p) < this.heap.size()) { int child = right(p) < this.heap.size() && this.s.lt(this.heap.get(right(p)), this.heap.get(left(p))) ? right(p) : left(p); if (!this.s.lt(this.heap.get(child), y)) break; ...
class class_name[name] begin[{] method[percolateDown, return_type[void], modifier[private], parameter[pos]] begin[{] local_variable[type[int], p] local_variable[type[int], y] while[binary_operation[call[.left, parameter[member[.p]]], <, THIS[member[None.heap]call[None.size, para...
Keyword[private] Keyword[void] identifier[percolateDown] operator[SEP] Keyword[int] identifier[pos] operator[SEP] { Keyword[int] identifier[p] operator[=] identifier[pos] operator[SEP] Keyword[int] identifier[y] operator[=] Keyword[this] operator[SEP] identifier[heap] operator[SEP] identifier[get] operator[SEP] ...
public double getConditionalProbability(A first, B second) { return getCount(first, second) / conditionalCounts.get(first); }
class class_name[name] begin[{] method[getConditionalProbability, return_type[type[double]], modifier[public], parameter[first, second]] begin[{] return[binary_operation[call[.getCount, parameter[member[.first], member[.second]]], /, call[conditionalCounts.get, parameter[member[.first]]]]] end[}] E...
Keyword[public] Keyword[double] identifier[getConditionalProbability] operator[SEP] identifier[A] identifier[first] , identifier[B] identifier[second] operator[SEP] { Keyword[return] identifier[getCount] operator[SEP] identifier[first] , identifier[second] operator[SEP] operator[/] identifier[conditionalCounts...
public static boolean isCallableConstructor(ExecutableElement constructor) { if (constructor.getModifiers().contains(Modifier.PRIVATE)) { return false; } TypeElement type = (TypeElement) constructor.getEnclosingElement(); return type.getEnclosingElement().getKind() == ElementKind.PACKAGE |...
class class_name[name] begin[{] method[isCallableConstructor, return_type[type[boolean]], modifier[public static], parameter[constructor]] begin[{] if[call[constructor.getModifiers, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] local...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isCallableConstructor] operator[SEP] identifier[ExecutableElement] identifier[constructor] operator[SEP] { Keyword[if] operator[SEP] identifier[constructor] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] identifier[cont...
@SuppressWarnings("unchecked") public void restoreState(FacesContext context, Object state) { if (context == null) { throw new NullPointerException(); } if (state != null) { // Unchecked cast from Object to List<BehaviorListener> listeners = (List<Behav...
class class_name[name] begin[{] method[restoreState, return_type[void], modifier[public], parameter[context, state]] begin[{] if[binary_operation[member[.context], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[restoreState] operator[SEP] identifier[FacesContext] identifier[context] , identifier[Object] identifier[state] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[=...
public static <D> File toJsonFile(D dataObject, File returnJsonFile) { try { jsonMapper.writeValue(returnJsonFile, dataObject); return returnJsonFile; } catch (Exception e) { return JMExceptionManager.handleExceptionAndReturnNull(log, e, "toJsonFil...
class class_name[name] begin[{] method[toJsonFile, return_type[type[File]], modifier[public static], parameter[dataObject, returnJsonFile]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=returnJsonFile, postfix_operators=[], prefix_operato...
Keyword[public] Keyword[static] operator[<] identifier[D] operator[>] identifier[File] identifier[toJsonFile] operator[SEP] identifier[D] identifier[dataObject] , identifier[File] identifier[returnJsonFile] operator[SEP] { Keyword[try] { identifier[jsonMapper] operator[SEP] identifier[writeValue] ope...
@Override public long[] executeLargeBatch() throws SQLException { checkClose(); int size; if (batchQueries == null || (size = batchQueries.size()) == 0) { return new long[0]; } lock.lock(); try { internalBatchExecution(size); return results.getCmdInformation().getLargeUpdate...
class class_name[name] begin[{] method[executeLargeBatch, return_type[type[long]], modifier[public], parameter[]] begin[{] call[.checkClose, parameter[]] local_variable[type[int], size] if[binary_operation[binary_operation[member[.batchQueries], ==, literal[null]], ||, b...
annotation[@] identifier[Override] Keyword[public] Keyword[long] operator[SEP] operator[SEP] identifier[executeLargeBatch] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[checkClose] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[size] operator[SEP] Keyword[if...
@Override public void clearCache() { entityCache.clearCache(CommercePaymentMethodGroupRelImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
class class_name[name] begin[{] method[clearCache, return_type[void], modifier[public], parameter[]] begin[{] call[entityCache.clearCache, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Comme...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clearCache] operator[SEP] operator[SEP] { identifier[entityCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[CommercePaymentMethodGroupRelImpl] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[finder...
public static CertStore fromSignedData(final CMSSignedData signedData) { CertificateFactory factory; try { factory = CertificateFactory.getInstance("X509"); } catch (CertificateException e) { throw new RuntimeException(e); } Store certStore = signedData.g...
class class_name[name] begin[{] method[fromSignedData, return_type[type[CertStore]], modifier[public static], parameter[signedData]] begin[{] local_variable[type[CertificateFactory], factory] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=factor...
Keyword[public] Keyword[static] identifier[CertStore] identifier[fromSignedData] operator[SEP] Keyword[final] identifier[CMSSignedData] identifier[signedData] operator[SEP] { identifier[CertificateFactory] identifier[factory] operator[SEP] Keyword[try] { identifier[factory] operator[=] identifier[Cert...
public Key getKey(String alias, String password) { try { return keyStore.getKey(alias, password.toCharArray()); } catch (GeneralSecurityException e) { throw new IllegalStateException(e); } }
class class_name[name] begin[{] method[getKey, return_type[type[Key]], modifier[public], parameter[alias, password]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=alias, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Me...
Keyword[public] identifier[Key] identifier[getKey] operator[SEP] identifier[String] identifier[alias] , identifier[String] identifier[password] operator[SEP] { Keyword[try] { Keyword[return] identifier[keyStore] operator[SEP] identifier[getKey] operator[SEP] identifier[alias] , identifier[password] ...
private void startElementNode(final Attributes attributes) { LOG.debug("Found node"); try { this.nodeStack.push(this.newNode(this.nodeStack.peek(), attributes)); } catch (final RepositoryException e) { throw new AssertionError("Could not create node", e); } }
class class_name[name] begin[{] method[startElementNode, return_type[void], modifier[private], parameter[attributes]] begin[{] call[LOG.debug, parameter[literal["Found node"]]] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=N...
Keyword[private] Keyword[void] identifier[startElementNode] operator[SEP] Keyword[final] identifier[Attributes] identifier[attributes] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[this] operator[SEP] id...
public boolean block(long time) { synchronized (this.lock) { // see if we've already canceled the IO if (!this.active) { return true; } // see if the cancel missed and the IO complete path was triggered if (this.failed) { ...
class class_name[name] begin[{] method[block, return_type[type[boolean]], modifier[public], parameter[time]] begin[{] SYNCHRONIZED[THIS[member[None.lock]]] BEGIN[{] if[THIS[member[None.active]]] begin[{] return[literal[true]] else begin[{] Non...
Keyword[public] Keyword[boolean] identifier[block] operator[SEP] Keyword[long] identifier[time] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[lock] operator[SEP] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[active] operator...
protected static String reportURL(String type) throws EasyPostException { try { String urlType = URLEncoder.encode(type, "UTF-8").toLowerCase(); return String.format("%s/reports/%s/", EasyPost.API_BASE, urlType); } catch (java.io.UnsupportedEncodingException e) { throw new EasyPostException("U...
class class_name[name] begin[{] method[reportURL, return_type[type[String]], modifier[static protected], parameter[type]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=t...
Keyword[protected] Keyword[static] identifier[String] identifier[reportURL] operator[SEP] identifier[String] identifier[type] operator[SEP] Keyword[throws] identifier[EasyPostException] { Keyword[try] { identifier[String] identifier[urlType] operator[=] identifier[URLEncoder] operator[SEP] identifier[...
@Override public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) { logger.entering(new Object[] { resource, dataFilter }); List<Object[]> allObjs = getDataListByFilter(dataFilter); return allObjs.iterator(); }
class class_name[name] begin[{] method[getDataByFilter, return_type[type[Iterator]], modifier[public], parameter[dataFilter]] begin[{] call[logger.entering, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=resource, postfix_operators=[]...
annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[Object] operator[SEP] operator[SEP] operator[>] identifier[getDataByFilter] operator[SEP] identifier[DataProviderFilter] identifier[dataFilter] operator[SEP] { identifier[logger] operator[SEP] identifier[entering] oper...
protected void unlockAbandonedLock(final String mutexName) { this.executeIgnoreRollback( new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus status) { final EntityManager ...
class class_name[name] begin[{] method[unlockAbandonedLock, return_type[void], modifier[protected], parameter[mutexName]] begin[{] THIS[call[None.executeIgnoreRollback, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[Loca...
Keyword[protected] Keyword[void] identifier[unlockAbandonedLock] operator[SEP] Keyword[final] identifier[String] identifier[mutexName] operator[SEP] { Keyword[this] operator[SEP] identifier[executeIgnoreRollback] operator[SEP] Keyword[new] identifier[TransactionCallbackWithoutResult] operator[SEP] operator[SEP] ...
public static Object withOutputStream(File file, @ClosureParams(value = SimpleType.class, options = "java.io.OutputStream") Closure closure) throws IOException { return IOGroovyMethods.withStream(newOutputStream(file), closure); }
class class_name[name] begin[{] method[withOutputStream, return_type[type[Object]], modifier[public static], parameter[file, closure]] begin[{] return[call[IOGroovyMethods.withStream, parameter[call[.newOutputStream, parameter[member[.file]]], member[.closure]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[withOutputStream] operator[SEP] identifier[File] identifier[file] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[value] operator[=] identifier[SimpleType] operator[SEP] Keyword[class] , identifier[options] operator[=] literal[String] op...
@Override public Properties getConfiguration(Environment environment) { if (cachedConfigurationPerEnvironment.containsKey(environment.getName())) { return cachedConfigurationPerEnvironment.get(environment.getName()); } else { throw new MissingEnvironmentException(environment.getName()); } }
class class_name[name] begin[{] method[getConfiguration, return_type[type[Properties]], modifier[public], parameter[environment]] begin[{] if[call[cachedConfigurationPerEnvironment.containsKey, parameter[call[environment.getName, parameter[]]]]] begin[{] return[call[cachedConfigurat...
annotation[@] identifier[Override] Keyword[public] identifier[Properties] identifier[getConfiguration] operator[SEP] identifier[Environment] identifier[environment] operator[SEP] { Keyword[if] operator[SEP] identifier[cachedConfigurationPerEnvironment] operator[SEP] identifier[containsKey] operator[SEP] identifi...
public CMAArray<CMAApiKey> fetchAll(String spaceId, Map<String, String> query) { assertNotNull(spaceId, "spaceId"); return service.fetchAll(spaceId, query).blockingFirst(); }
class class_name[name] begin[{] method[fetchAll, return_type[type[CMAArray]], modifier[public], parameter[spaceId, query]] begin[{] call[.assertNotNull, parameter[member[.spaceId], literal["spaceId"]]] return[call[service.fetchAll, parameter[member[.spaceId], member[.query]]]] end[}...
Keyword[public] identifier[CMAArray] operator[<] identifier[CMAApiKey] operator[>] identifier[fetchAll] operator[SEP] identifier[String] identifier[spaceId] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[query] operator[SEP] { identifier[assertNotNull] operator[SEP...
public Weight invertSign() { if (isInfinity) { if (posOrNeg) { return WeightFactory.NEG_INFINITY; } else { return WeightFactory.POS_INFINITY; } } return new Weight(-val); }
class class_name[name] begin[{] method[invertSign, return_type[type[Weight]], modifier[public], parameter[]] begin[{] if[member[.isInfinity]] begin[{] if[member[.posOrNeg]] begin[{] return[member[WeightFactory.NEG_INFINITY]] else begin[{] ...
Keyword[public] identifier[Weight] identifier[invertSign] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isInfinity] operator[SEP] { Keyword[if] operator[SEP] identifier[posOrNeg] operator[SEP] { Keyword[return] identifier[WeightFactory] operator[SEP] identifier[NEG_...
public Vertigo undeployNetwork(String cluster, NetworkConfig network) { return undeployNetwork(cluster, network, null); }
class class_name[name] begin[{] method[undeployNetwork, return_type[type[Vertigo]], modifier[public], parameter[cluster, network]] begin[{] return[call[.undeployNetwork, parameter[member[.cluster], member[.network], literal[null]]]] end[}] END[}]
Keyword[public] identifier[Vertigo] identifier[undeployNetwork] operator[SEP] identifier[String] identifier[cluster] , identifier[NetworkConfig] identifier[network] operator[SEP] { Keyword[return] identifier[undeployNetwork] operator[SEP] identifier[cluster] , identifier[network] , Other[null] operator[SEP] o...
private void init (String publicId, String systemId, int lineNumber, int columnNumber) { this.publicId = publicId; this.systemId = systemId; this.lineNumber = lineNumber; this.columnNumber = columnNumber; }
class class_name[name] begin[{] method[init, return_type[void], modifier[private], parameter[publicId, systemId, lineNumber, columnNumber]] begin[{] assign[THIS[member[None.publicId]], member[.publicId]] assign[THIS[member[None.systemId]], member[.systemId]] assi...
Keyword[private] Keyword[void] identifier[init] operator[SEP] identifier[String] identifier[publicId] , identifier[String] identifier[systemId] , Keyword[int] identifier[lineNumber] , Keyword[int] identifier[columnNumber] operator[SEP] { Keyword[this] operator[SEP] identifier[publicId] operator[=] identifier[...
public void marshall(CommandInvocation commandInvocation, ProtocolMarshaller protocolMarshaller) { if (commandInvocation == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(commandInvocation.getCommand...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[commandInvocation, protocolMarshaller]] begin[{] if[binary_operation[member[.commandInvocation], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(pos...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CommandInvocation] identifier[commandInvocation] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[commandInvocation] operator[==] Other[null] operator[SEP] { ...
public List<Export> getExports(UUID projectId, UUID iterationId) { return getExportsWithServiceResponseAsync(projectId, iterationId).toBlocking().single().body(); }
class class_name[name] begin[{] method[getExports, return_type[type[List]], modifier[public], parameter[projectId, iterationId]] begin[{] return[call[.getExportsWithServiceResponseAsync, parameter[member[.projectId], member[.iterationId]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Export] operator[>] identifier[getExports] operator[SEP] identifier[UUID] identifier[projectId] , identifier[UUID] identifier[iterationId] operator[SEP] { Keyword[return] identifier[getExportsWithServiceResponseAsync] operator[SEP] identifier[projectId] , ...
@Trivial public static String typeToString(MediaType type, List<String> ignoreParams) { if (type == null) { throw new IllegalArgumentException("MediaType parameter is null"); } StringBuilder sb = new StringBuilder(); sb.append(type.getType()).append('/').append(type.getSu...
class class_name[name] begin[{] method[typeToString, return_type[type[String]], modifier[public static], parameter[type, ignoreParams]] begin[{] if[binary_operation[member[.type], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operator...
annotation[@] identifier[Trivial] Keyword[public] Keyword[static] identifier[String] identifier[typeToString] operator[SEP] identifier[MediaType] identifier[type] , identifier[List] operator[<] identifier[String] operator[>] identifier[ignoreParams] operator[SEP] { Keyword[if] operator[SEP] identifier[type] ope...
public void setUserDateCreated(String userDateCreated) { try { m_userDateCreated = convertTimestamp(userDateCreated); } catch (Throwable e) { setThrowable(e); } }
class class_name[name] begin[{] method[setUserDateCreated, return_type[void], modifier[public], parameter[userDateCreated]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_userDateCreated, postfix_operators=[], prefix_operators=[], qualifier=,...
Keyword[public] Keyword[void] identifier[setUserDateCreated] operator[SEP] identifier[String] identifier[userDateCreated] operator[SEP] { Keyword[try] { identifier[m_userDateCreated] operator[=] identifier[convertTimestamp] operator[SEP] identifier[userDateCreated] operator[SEP] operator[SEP] }...
@Override public <T> List<T> executeSelect(IRowMapper<T> rowMapper, Connection conn, String sql, Object... bindValues) { long timestampStart = System.currentTimeMillis(); try { try (PreparedStatement pstm = conn.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ...
class class_name[name] begin[{] method[executeSelect, return_type[type[List]], modifier[public], parameter[rowMapper, conn, sql, bindValues]] begin[{] local_variable[type[long], timestampStart] TryStatement(block=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[Variabl...
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[executeSelect] operator[SEP] identifier[IRowMapper] operator[<] identifier[T] operator[>] identifier[rowMapper] , identifier[Connection] identifier[conn] , identif...
static int getArrayLengthOfTheField(FieldDefinition fd, BufferObjectDataInput in, int offset) throws IOException { int originalPos = in.position(); try { int pos = getStreamPositionOfTheField(fd, in, offset); in.position(pos); return in.readInt(); } finally { ...
class class_name[name] begin[{] method[getArrayLengthOfTheField, return_type[type[int]], modifier[static], parameter[fd, in, offset]] begin[{] local_variable[type[int], originalPos] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initi...
Keyword[static] Keyword[int] identifier[getArrayLengthOfTheField] operator[SEP] identifier[FieldDefinition] identifier[fd] , identifier[BufferObjectDataInput] identifier[in] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[originalPos] operator[=...
public void setLinearLowerLimits(float limitX, float limitY, float limitZ) { Native3DGenericConstraint.setLinearLowerLimits(getNative(), limitX, limitY, limitZ); }
class class_name[name] begin[{] method[setLinearLowerLimits, return_type[void], modifier[public], parameter[limitX, limitY, limitZ]] begin[{] call[Native3DGenericConstraint.setLinearLowerLimits, parameter[call[.getNative, parameter[]], member[.limitX], member[.limitY], member[.limitZ]]] end...
Keyword[public] Keyword[void] identifier[setLinearLowerLimits] operator[SEP] Keyword[float] identifier[limitX] , Keyword[float] identifier[limitY] , Keyword[float] identifier[limitZ] operator[SEP] { identifier[Native3DGenericConstraint] operator[SEP] identifier[setLinearLowerLimits] operator[SEP] identifier[ge...
@Override public R visitReturn(ReturnTree node, P p) { return scan(node.getExpression(), p); }
class class_name[name] begin[{] method[visitReturn, return_type[type[R]], modifier[public], parameter[node, p]] begin[{] return[call[.scan, parameter[call[node.getExpression, parameter[]], member[.p]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[R] identifier[visitReturn] operator[SEP] identifier[ReturnTree] identifier[node] , identifier[P] identifier[p] operator[SEP] { Keyword[return] identifier[scan] operator[SEP] identifier[node] operator[SEP] identifier[getExpression] operator[SEP] opera...
public static String join(Object[] args, String separator, Integer limit) { if (separator == null || separator.equalsIgnoreCase("")) { throw new IllegalArgumentException("Missing separator!"); } if (args != null && args.length > 0) { List<Object> array = Arrays.asList(args); return join(array, separato...
class class_name[name] begin[{] method[join, return_type[type[String]], modifier[public static], parameter[args, separator, limit]] begin[{] if[binary_operation[binary_operation[member[.separator], ==, literal[null]], ||, call[separator.equalsIgnoreCase, parameter[literal[""]]]]] begin[{] ...
Keyword[public] Keyword[static] identifier[String] identifier[join] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[args] , identifier[String] identifier[separator] , identifier[Integer] identifier[limit] operator[SEP] { Keyword[if] operator[SEP] identifier[separator] operator[==] Other...
public static <T> T readObjectFromFile(String path, Class<T> type, SparkContext sc) throws IOException { FileSystem fileSystem = FileSystem.get(sc.hadoopConfiguration()); try (ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(fileSystem.open(new Path(path))))) { Object o;...
class class_name[name] begin[{] method[readObjectFromFile, return_type[type[T]], modifier[public static], parameter[path, type, sc]] begin[{] local_variable[type[FileSystem], fileSystem] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[readObjectFromFile] operator[SEP] identifier[String] identifier[path] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[SparkContext] identifier[sc] operator[SEP] Keyword[throws] identi...
public void key( String skey ) throws jsqlite.Exception { synchronized (this) { byte ekey[] = null; if (skey != null && skey.length() > 0) { ekey = new byte[skey.length()]; for( int i = 0; i < skey.length(); i++ ) { char c = skey.charAt...
class class_name[name] begin[{] method[key, return_type[void], modifier[public], parameter[skey]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] local_variable[type[byte], ekey] if[binary_operation[binary_operation[member[.skey], !=, literal[null]], &&, binary_operat...
Keyword[public] Keyword[void] identifier[key] operator[SEP] identifier[String] identifier[skey] operator[SEP] Keyword[throws] identifier[jsqlite] operator[SEP] identifier[Exception] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[byte] identifier[ekey] operator[SEP] operato...
public static base_response disable(nitro_service client) throws Exception { reporting disableresource = new reporting(); return disableresource.perform_operation(client,"disable"); }
class class_name[name] begin[{] method[disable, return_type[type[base_response]], modifier[public static], parameter[client]] begin[{] local_variable[type[reporting], disableresource] return[call[disableresource.perform_operation, parameter[member[.client], literal["disable"]]]] end[}] END[...
Keyword[public] Keyword[static] identifier[base_response] identifier[disable] operator[SEP] identifier[nitro_service] identifier[client] operator[SEP] Keyword[throws] identifier[Exception] { identifier[reporting] identifier[disableresource] operator[=] Keyword[new] identifier[reporting] operator[SEP] operator[SE...
public void adaptHeightToChildren() { DividableGridAdapter adapter = (DividableGridAdapter) getAdapter(); if (adapter != null) { int height = getPaddingTop() + getPaddingBottom(); for (int i = 0; i < adapter.getCount(); i += adapter.getColumnCount()) { AbstractI...
class class_name[name] begin[{] method[adaptHeightToChildren, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[DividableGridAdapter], adapter] if[binary_operation[member[.adapter], !=, literal[null]]] begin[{] local_variable[type[int], height] ...
Keyword[public] Keyword[void] identifier[adaptHeightToChildren] operator[SEP] operator[SEP] { identifier[DividableGridAdapter] identifier[adapter] operator[=] operator[SEP] identifier[DividableGridAdapter] operator[SEP] identifier[getAdapter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] id...
static boolean isBshAssignable( Class toType, Class fromType ) { try { return castObject( toType, fromType, null/*fromValue*/, ASSIGNMENT, true/*checkOnly*/ ) == VALID_CAST; } catch ( UtilEvalError e ) { // This should not happen wi...
class class_name[name] begin[{] method[isBshAssignable, return_type[type[boolean]], modifier[static], parameter[toType, fromType]] begin[{] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=toType, postfix_operators=[], prefix_ope...
Keyword[static] Keyword[boolean] identifier[isBshAssignable] operator[SEP] identifier[Class] identifier[toType] , identifier[Class] identifier[fromType] operator[SEP] { Keyword[try] { Keyword[return] identifier[castObject] operator[SEP] identifier[toType] , identifier[fromType] , Other[null] , ide...
public void reset() { state = BreakerState.CLOSED; isHardTrip = false; byPass = false; isAttemptLive = false; notifyBreakerStateChange(getStatus()); }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.state], member[BreakerState.CLOSED]] assign[member[.isHardTrip], literal[false]] assign[member[.byPass], literal[false]] assign...
Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { identifier[state] operator[=] identifier[BreakerState] operator[SEP] identifier[CLOSED] operator[SEP] identifier[isHardTrip] operator[=] literal[boolean] operator[SEP] identifier[byPass] operator[=] literal[boolean] operator[SEP] ident...
public static NamingContextable getParentNamingContext(final WComponent component) { if (component == null) { return null; } WComponent child = component; NamingContextable parent = null; while (true) { NamingContextable naming = WebUtilities.getAncestorOfClass(NamingContextable.class, child); ...
class class_name[name] begin[{] method[getParentNamingContext, return_type[type[NamingContextable]], modifier[public static], parameter[component]] begin[{] if[binary_operation[member[.component], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None ...
Keyword[public] Keyword[static] identifier[NamingContextable] identifier[getParentNamingContext] operator[SEP] Keyword[final] identifier[WComponent] identifier[component] operator[SEP] { Keyword[if] operator[SEP] identifier[component] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null...
@SuppressWarnings("unchecked") public TreeNode<T> findByPath(T... path) { return findByPath(Arrays.asList(path)); }
class class_name[name] begin[{] method[findByPath, return_type[type[TreeNode]], modifier[public], parameter[path]] begin[{] return[call[.findByPath, parameter[call[Arrays.asList, parameter[member[.path]]]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[TreeNode] operator[<] identifier[T] operator[>] identifier[findByPath] operator[SEP] identifier[T] operator[...] identifier[path] operator[SEP] { Keyword[return] identifier[findByPath] operator[SEP] ...
public static java.sql.Time rollTime(java.util.Date startDate, int period, int amount) { GregorianCalendar gc = new GregorianCalendar(); gc.setTime(startDate); gc.add(period, amount); return new java.sql.Time(gc.getTime().getTime()); }
class class_name[name] begin[{] method[rollTime, return_type[type[java]], modifier[public static], parameter[startDate, period, amount]] begin[{] local_variable[type[GregorianCalendar], gc] call[gc.setTime, parameter[member[.startDate]]] call[gc.add, parameter[member[.pe...
Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[Time] identifier[rollTime] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[startDate] , Keyword[int] identifier[period] , Keyword[int] identifier[amount] oper...
public static boolean kill(int processId) { String killCommand = String.format("%s %d", (SystemUtils.isWindows() ? WINDOWS_KILL_COMMAND : UNIX_KILL_COMMAND), processId); try { Process killProcess = Runtime.getRuntime().exec(killCommand); return killProcess.waitFor(KILL_WAIT_TIMEOUT, KILL_WAIT...
class class_name[name] begin[{] method[kill, return_type[type[boolean]], modifier[public static], parameter[processId]] begin[{] local_variable[type[String], killCommand] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Meth...
Keyword[public] Keyword[static] Keyword[boolean] identifier[kill] operator[SEP] Keyword[int] identifier[processId] operator[SEP] { identifier[String] identifier[killCommand] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , operator[SEP] identifier[SystemUtils] oper...
private static List<Token> removeFalsePositiveVersionRanges(List<Token> tokens) { List<Token> result = new ArrayList<Token>(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.get(i); if (thereIsFalsePositiveVersionRange(tokens, i)) { token = new Tok...
class class_name[name] begin[{] method[removeFalsePositiveVersionRanges, return_type[type[List]], modifier[private static], parameter[tokens]] begin[{] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarator...
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Token] operator[>] identifier[removeFalsePositiveVersionRanges] operator[SEP] identifier[List] operator[<] identifier[Token] operator[>] identifier[tokens] operator[SEP] { identifier[List] operator[<] identifier[Token] operator[>] identifie...
@Override public void delete(String spaceId, String key, IDeleteCallback callback) throws IOException { kdStorage.delete(spaceId, key, new IDeleteCallback() { @Override public void onSuccess(String spaceId, String key) { // invalidate cache upon successful deletion ...
class class_name[name] begin[{] method[delete, return_type[void], modifier[public], parameter[spaceId, key, callback]] begin[{] call[kdStorage.delete, parameter[member[.spaceId], member[.key], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[String] identifier[spaceId] , identifier[String] identifier[key] , identifier[IDeleteCallback] identifier[callback] operator[SEP] Keyword[throws] identifier[IOException] { identifier[kdStorage] operator...
protected BufferedImage rotate(double angle) { BufferedImage target = new BufferedImage(height, width, awt.getType()); Graphics2D g2 = (Graphics2D) target.getGraphics(); final int offsetx, offsety; if (angle < 0) { offsetx = 0; offsety = width; } else if (...
class class_name[name] begin[{] method[rotate, return_type[type[BufferedImage]], modifier[protected], parameter[angle]] begin[{] local_variable[type[BufferedImage], target] local_variable[type[Graphics2D], g2] local_variable[type[int], offsetx] if[binary_operation[member...
Keyword[protected] identifier[BufferedImage] identifier[rotate] operator[SEP] Keyword[double] identifier[angle] operator[SEP] { identifier[BufferedImage] identifier[target] operator[=] Keyword[new] identifier[BufferedImage] operator[SEP] identifier[height] , identifier[width] , identifier[awt] operator[SEP] id...
private void handleSortRequest(final Request request) { String sortColStr = request.getParameter(getId() + ".sort"); String sortDescStr = request.getParameter(getId() + ".sortDesc"); if (sortColStr != null) { if ("".equals(sortColStr)) { // Reset sort setSort(-1, false); getOrCreateComponentModel(...
class class_name[name] begin[{] method[handleSortRequest, return_type[void], modifier[private], parameter[request]] begin[{] local_variable[type[String], sortColStr] local_variable[type[String], sortDescStr] if[binary_operation[member[.sortColStr], !=, literal[null]]] begin[{] ...
Keyword[private] Keyword[void] identifier[handleSortRequest] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] { identifier[String] identifier[sortColStr] operator[=] identifier[request] operator[SEP] identifier[getParameter] operator[SEP] identifier[getId] operator[SEP] operator...
protected String getCharsetFromBytes(byte buffer[], int len) throws IOException { String charsetName = null; UniversalDetector detector = new UniversalDetector(null); detector.handleData(buffer, 0, len); detector.dataEnd(); charsetName = detector.getDetectedCharset(); detector.reset(); if(is...
class class_name[name] begin[{] method[getCharsetFromBytes, return_type[type[String]], modifier[protected], parameter[buffer, len]] begin[{] local_variable[type[String], charsetName] local_variable[type[UniversalDetector], detector] call[detector.handleData, parameter[member[.bu...
Keyword[protected] identifier[String] identifier[getCharsetFromBytes] operator[SEP] Keyword[byte] identifier[buffer] operator[SEP] operator[SEP] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[charsetName] operator[=] Other[null] operator[SEP]...
public QueryTreeElement removeQuery(String query_id) { for (QueryTreeElement query : queries) { if (query.getID().equals(query_id)) { queries.remove(query); return query; } } return null; }
class class_name[name] begin[{] method[removeQuery, return_type[type[QueryTreeElement]], modifier[public], parameter[query_id]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[],...
Keyword[public] identifier[QueryTreeElement] identifier[removeQuery] operator[SEP] identifier[String] identifier[query_id] operator[SEP] { Keyword[for] operator[SEP] identifier[QueryTreeElement] identifier[query] operator[:] identifier[queries] operator[SEP] { Keyword[if] operator[SEP] identifier[que...
public void modifyingRequest( final String requestId ) { if ( _log.isDebugEnabled() ) { _log.debug( "Registering modifying request: " + requestId ); } incrementOrPut( _blacklist, requestId ); _readOnlyRequests.remove( requestId ); }
class class_name[name] begin[{] method[modifyingRequest, return_type[void], modifier[public], parameter[requestId]] begin[{] if[call[_log.isDebugEnabled, parameter[]]] begin[{] call[_log.debug, parameter[binary_operation[literal["Registering modifying request: "], +, mem...
Keyword[public] Keyword[void] identifier[modifyingRequest] operator[SEP] Keyword[final] identifier[String] identifier[requestId] operator[SEP] { Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[_log] operator[SEP...
protected void beforeDelivery(final SIBusMessage message, final MessageEndpoint endpoint) throws ResourceException { final String methodName = "beforeDelivery"; if (TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, methodName, new Object [] { message, endpoint }); } ...
class class_name[name] begin[{] method[beforeDelivery, return_type[void], modifier[protected], parameter[message, endpoint]] begin[{] local_variable[type[String], methodName] if[call[TRACE.isEntryEnabled, parameter[]]] begin[{] call[SibTr.entry, parameter[THIS[],...
Keyword[protected] Keyword[void] identifier[beforeDelivery] operator[SEP] Keyword[final] identifier[SIBusMessage] identifier[message] , Keyword[final] identifier[MessageEndpoint] identifier[endpoint] operator[SEP] Keyword[throws] identifier[ResourceException] { Keyword[final] identifier[String] identifier[metho...
protected void writeQuerySizeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("\"querySize\":"); sb.append(queryInfoList.size()); sb.append(", "); }
class class_name[name] begin[{] method[writeQuerySizeEntry, return_type[void], modifier[protected], parameter[sb, execInfo, queryInfoList]] begin[{] call[sb.append, parameter[literal["\"querySize\":"]]] call[sb.append, parameter[call[queryInfoList.size, parameter[]]]] ...
Keyword[protected] Keyword[void] identifier[writeQuerySizeEntry] operator[SEP] identifier[StringBuilder] identifier[sb] , identifier[ExecutionInfo] identifier[execInfo] , identifier[List] operator[<] identifier[QueryInfo] operator[>] identifier[queryInfoList] operator[SEP] { identifier[sb] operator[SEP] identi...
protected void writeCache() throws IOException { if (this.cache != null) { byte[] data = this.data == null ? null : this.data.get(); if (data == null) { return; } this.cache.write(resourceId, data); } }
class class_name[name] begin[{] method[writeCache, return_type[void], modifier[protected], parameter[]] begin[{] if[binary_operation[THIS[member[None.cache]], !=, literal[null]]] begin[{] local_variable[type[byte], data] if[binary_operation[member[.data], ==,...
Keyword[protected] Keyword[void] identifier[writeCache] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[cache] operator[!=] Other[null] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[data] oper...
public static <T extends Cloneable> ValueHolder<T> withImmutableValue(final T value) { return new ValueHolder<T>(ObjectUtils.clone(value)) { @Override public T getValue() { return ObjectUtils.clone(super.getValue()); } @Override public void setValue(final T value) { super.setValue...
class class_name[name] begin[{] method[withImmutableValue, return_type[type[ValueHolder]], modifier[public static], parameter[value]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], ...
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Cloneable] operator[>] identifier[ValueHolder] operator[<] identifier[T] operator[>] identifier[withImmutableValue] operator[SEP] Keyword[final] identifier[T] identifier[value] operator[SEP] { Keyword[return] Keyword[new] ident...
@Override public boolean importGeoPackage(String name, URL url, boolean override, GeoPackageProgress progress) { boolean success = false; HttpURLConnection connection = null; try { connection = (HttpURLConnection) url.openConnection(); ...
class class_name[name] begin[{] method[importGeoPackage, return_type[type[boolean]], modifier[public], parameter[name, url, override, progress]] begin[{] local_variable[type[boolean], success] local_variable[type[HttpURLConnection], connection] TryStatement(block=[StatementExpression(ex...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[importGeoPackage] operator[SEP] identifier[String] identifier[name] , identifier[URL] identifier[url] , Keyword[boolean] identifier[override] , identifier[GeoPackageProgress] identifier[progress] operator[SEP] { Keyword[boolean] id...