code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public int calculateDxToMakeVisible(View view, int snapPreference) { final RecyclerView.LayoutManager layoutManager = getLayoutManager(); if (!layoutManager.canScrollHorizontally()) { return 0; } final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) ...
class class_name[name] begin[{] method[calculateDxToMakeVisible, return_type[type[int]], modifier[public], parameter[view, snapPreference]] begin[{] local_variable[type[RecyclerView], layoutManager] if[call[layoutManager.canScrollHorizontally, parameter[]]] begin[{] return[l...
Keyword[public] Keyword[int] identifier[calculateDxToMakeVisible] operator[SEP] identifier[View] identifier[view] , Keyword[int] identifier[snapPreference] operator[SEP] { Keyword[final] identifier[RecyclerView] operator[SEP] identifier[LayoutManager] identifier[layoutManager] operator[=] identifier[getLayoutMa...
public static boolean isH2Connection(Settings configuration) { final String connStr; try { connStr = configuration.getConnectionString( Settings.KEYS.DB_CONNECTION_STRING, Settings.KEYS.DB_FILE_NAME); } catch (IOException ex) { LOGG...
class class_name[name] begin[{] method[isH2Connection, return_type[type[boolean]], modifier[public static], parameter[configuration]] begin[{] local_variable[type[String], connStr] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=connStr, postfix_...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isH2Connection] operator[SEP] identifier[Settings] identifier[configuration] operator[SEP] { Keyword[final] identifier[String] identifier[connStr] operator[SEP] Keyword[try] { identifier[connStr] operator[=] identifier[configuration] operator...
public void assertAuthFail(byte[] expectedSignature, BuilderMode builderMode, String errorMessage) { if (isHashEquals(expectedSignature, builderMode)) { if (Validator.isEmpty(errorMessage)) { throw new IllegalArgumentException(); } else { throw new Illegal...
class class_name[name] begin[{] method[assertAuthFail, return_type[void], modifier[public], parameter[expectedSignature, builderMode, errorMessage]] begin[{] if[call[.isHashEquals, parameter[member[.expectedSignature], member[.builderMode]]]] begin[{] if[call[Validator.i...
Keyword[public] Keyword[void] identifier[assertAuthFail] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[expectedSignature] , identifier[BuilderMode] identifier[builderMode] , identifier[String] identifier[errorMessage] operator[SEP] { Keyword[if] operator[SEP] identifier[isHashEquals] opera...
@Override public Destination getJMSReplyTo() throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getJMSReplyTo"); // If we have not cached the replyTo destination. if (replyTo == null) { List<SIDestinationAddr...
class class_name[name] begin[{] method[getJMSReplyTo, return_type[type[Destination]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[TH...
annotation[@] identifier[Override] Keyword[public] identifier[Destination] identifier[getJMSReplyTo] operator[SEP] operator[SEP] Keyword[throws] identifier[JMSException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] i...
public String convertBeginSegmentCommandFLAG2ToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertBeginSegmentCommandFLAG2ToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_opera...
Keyword[public] identifier[String] identifier[convertBeginSegmentCommandFLAG2ToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] ...
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.FNP__RG: return rg != null && !rg.isEmpty(); } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=FNP__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Re...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[FNP__RG] operator...
public @NonNull Query setAroundRadius(Integer radius) { if (radius == Query.RADIUS_ALL) { return set(KEY_AROUND_RADIUS, "all"); } return set(KEY_AROUND_RADIUS, radius); }
class class_name[name] begin[{] method[setAroundRadius, return_type[type[Query]], modifier[public], parameter[radius]] begin[{] if[binary_operation[member[.radius], ==, member[Query.RADIUS_ALL]]] begin[{] return[call[.set, parameter[member[.KEY_AROUND_RADIUS], literal["all"]]]] ...
Keyword[public] annotation[@] identifier[NonNull] identifier[Query] identifier[setAroundRadius] operator[SEP] identifier[Integer] identifier[radius] operator[SEP] { Keyword[if] operator[SEP] identifier[radius] operator[==] identifier[Query] operator[SEP] identifier[RADIUS_ALL] operator[SEP] { Keyword[...
private void normalizeNodeTypes(Node n) { normalizeBlocks(n); for (Node child = n.getFirstChild(); child != null; child = child.getNext()) { // This pass is run during the CompilerTestCase validation, so this // parent pointer check serves as a more general check. checkState(child.ge...
class class_name[name] begin[{] method[normalizeNodeTypes, return_type[void], modifier[private], parameter[n]] begin[{] call[.normalizeBlocks, parameter[member[.n]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Binar...
Keyword[private] Keyword[void] identifier[normalizeNodeTypes] operator[SEP] identifier[Node] identifier[n] operator[SEP] { identifier[normalizeBlocks] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[child] operator[=] identifier[n] operator[SEP] iden...
public ServiceFuture<OperationStatusResponseInner> reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); ...
class class_name[name] begin[{] method[reimageAllAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, vmScaleSetName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.reimageAllWithServiceResponseAsync, parameter[member[.resourceGroup...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[OperationStatusResponseInner] operator[>] identifier[reimageAllAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vmScaleSetName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Oper...
public static com.liferay.commerce.product.type.grouped.model.CPDefinitionGroupedEntry deleteCPDefinitionGroupedEntry( long CPDefinitionGroupedEntryId) throws com.liferay.portal.kernel.exception.PortalException { return getService() .deleteCPDefinitionGroupedEntry(CPDefinitionGroupedEntryId); }
class class_name[name] begin[{] method[deleteCPDefinitionGroupedEntry, return_type[type[com]], modifier[public static], parameter[CPDefinitionGroupedEntryId]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[type] operator[SEP] identifier[grouped] operator[SEP] identifier[model] operator[SEP] identifier[CPDefinitionGroupedEntry] identifier[deleteCPDe...
public Class<?> getSetterType(String name) throws NoSuchMethodException { Class<?> type = setterTypes.get(name); if (type == null) { throw new NoSuchMethodException("There is no WRITABLE property named '" + name + "' in class '" + className + "'"); } retur...
class class_name[name] begin[{] method[getSetterType, return_type[type[Class]], modifier[public], parameter[name]] begin[{] local_variable[type[Class], type] if[binary_operation[member[.type], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Bin...
Keyword[public] identifier[Class] operator[<] operator[?] operator[>] identifier[getSetterType] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[NoSuchMethodException] { identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[setterT...
public void addAccountInfo(String field, String addInfoKey, String editable) { addAccountInfo(new CmsAccountInfo(field, addInfoKey, editable)); }
class class_name[name] begin[{] method[addAccountInfo, return_type[void], modifier[public], parameter[field, addInfoKey, editable]] begin[{] call[.addAccountInfo, parameter[ClassCreator(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])...
Keyword[public] Keyword[void] identifier[addAccountInfo] operator[SEP] identifier[String] identifier[field] , identifier[String] identifier[addInfoKey] , identifier[String] identifier[editable] operator[SEP] { identifier[addAccountInfo] operator[SEP] Keyword[new] identifier[CmsAccountInfo] operator[SEP] identi...
@Requires("element != null") @Ensures("result != null") TypeName getGenericTypeName(TypeParameterElement element) { String name = element.getSimpleName().toString(); List<? extends TypeMirror> bounds = element.getBounds(); if (bounds.isEmpty() || (bounds.size() == 1 && bounds.get(0)....
class class_name[name] begin[{] method[getGenericTypeName, return_type[type[TypeName]], modifier[default], parameter[element]] begin[{] local_variable[type[String], name] local_variable[type[List], bounds] if[binary_operation[call[bounds.isEmpty, parameter[]], ||, binary_operati...
annotation[@] identifier[Requires] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Ensures] operator[SEP] literal[String] operator[SEP] identifier[TypeName] identifier[getGenericTypeName] operator[SEP] identifier[TypeParameterElement] identifier[element] operator[SEP] { identifier[String] id...
public static ByteBufToArray byteBufToByteArray(ByteBuf input) { byte[] inputBytes; int offset = 0; int length = input.readableBytes(); if (input.hasArray()) { inputBytes = input.array(); offset = input.arrayOffset() + input.readerIndex(); } else { ...
class class_name[name] begin[{] method[byteBufToByteArray, return_type[type[ByteBufToArray]], modifier[public static], parameter[input]] begin[{] local_variable[type[byte], inputBytes] local_variable[type[int], offset] local_variable[type[int], length] if[call[input.hasA...
Keyword[public] Keyword[static] identifier[ByteBufToArray] identifier[byteBufToByteArray] operator[SEP] identifier[ByteBuf] identifier[input] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[inputBytes] operator[SEP] Keyword[int] identifier[offset] operator[=] Other[0] operator[SEP] Keyword[i...
private List<String> getRotatedList(List<String> strings) { int index = RANDOM.nextInt(strings.size()); List<String> rotated = new ArrayList<String>(); for (int i = 0; i < strings.size(); i++) { rotated.add(strings.get(index)); index = (index + 1) % strings.size(); ...
class class_name[name] begin[{] method[getRotatedList, return_type[type[List]], modifier[private], parameter[strings]] begin[{] local_variable[type[int], index] local_variable[type[List], rotated] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Me...
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[getRotatedList] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[strings] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[RANDOM] operator[SEP] identifier[nextInt] ope...
<RequestT, ResponseT> void streamRequest( RequestT requestT, ApiStreamObserver<ResponseT> responseObserverT, ServerStreamingCallable<RequestT, ResponseT> callable) { Preconditions.checkState(!closed, "Firestore client has already been closed"); callable.serverStreamingCall(requestT, responseOb...
class class_name[name] begin[{] method[streamRequest, return_type[void], modifier[default], parameter[requestT, responseObserverT, callable]] begin[{] call[Preconditions.checkState, parameter[member[.closed], literal["Firestore client has already been closed"]]] call[callable.se...
operator[<] identifier[RequestT] , identifier[ResponseT] operator[>] Keyword[void] identifier[streamRequest] operator[SEP] identifier[RequestT] identifier[requestT] , identifier[ApiStreamObserver] operator[<] identifier[ResponseT] operator[>] identifier[responseObserverT] , identifier[ServerStreamingCallable] operat...
public static CPOptionCategory fetchByGroupId_Last(long groupId, OrderByComparator<CPOptionCategory> orderByComparator) { return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); }
class class_name[name] begin[{] method[fetchByGroupId_Last, return_type[type[CPOptionCategory]], modifier[public static], parameter[groupId, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CPOptionCategory] identifier[fetchByGroupId_Last] operator[SEP] Keyword[long] identifier[groupId] , identifier[OrderByComparator] operator[<] identifier[CPOptionCategory] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistenc...
public HandlerType<HandlerChainType<T>> getOrCreateHandler() { List<Node> nodeList = childNode.get("handler"); if (nodeList != null && nodeList.size() > 0) { return new HandlerTypeImpl<HandlerChainType<T>>(this, "handler", childNode, nodeList.get(0)); } return createHandler();...
class class_name[name] begin[{] method[getOrCreateHandler, return_type[type[HandlerType]], modifier[public], parameter[]] begin[{] local_variable[type[List], nodeList] if[binary_operation[binary_operation[member[.nodeList], !=, literal[null]], &&, binary_operation[call[nodeList.size, pa...
Keyword[public] identifier[HandlerType] operator[<] identifier[HandlerChainType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateHandler] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[childNode] operator...
public void insert(String firstName, String lastName, String number) { entries.add(new PhoneBookEntry(this, firstName, lastName, number)); }
class class_name[name] begin[{] method[insert, return_type[void], modifier[public], parameter[firstName, lastName, number]] begin[{] call[entries.add, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=firstNam...
Keyword[public] Keyword[void] identifier[insert] operator[SEP] identifier[String] identifier[firstName] , identifier[String] identifier[lastName] , identifier[String] identifier[number] operator[SEP] { identifier[entries] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[PhoneBookEntry] opera...
protected void sendEmail(TaskRuntimeContext context, String outcome) throws ObserverException { TaskInstance taskInstance = context.getTaskInstance(); TemplatedEmail templatedEmail = new TemplatedEmail(); templatedEmail.setFromAddress(getFromAddress()); templatedEmail.setSubject(getS...
class class_name[name] begin[{] method[sendEmail, return_type[void], modifier[protected], parameter[context, outcome]] begin[{] local_variable[type[TaskInstance], taskInstance] local_variable[type[TemplatedEmail], templatedEmail] call[templatedEmail.setFromAddress, parameter[cal...
Keyword[protected] Keyword[void] identifier[sendEmail] operator[SEP] identifier[TaskRuntimeContext] identifier[context] , identifier[String] identifier[outcome] operator[SEP] Keyword[throws] identifier[ObserverException] { identifier[TaskInstance] identifier[taskInstance] operator[=] identifier[context] operato...
protected Operation getOperation(KuduTable table, int op) throws UnsupportedOperationException { Operation operation = null; switch (op) { case OperationType.INSERT_CODE: operation = table.newInsert(); break; case OperationType.UPSERT_CODE: operation = table.newUpsert(); ...
class class_name[name] begin[{] method[getOperation, return_type[type[Operation]], modifier[protected], parameter[table, op]] begin[{] local_variable[type[Operation], operation] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=INSERT_CODE, postfix_operators=[], prefix_ope...
Keyword[protected] identifier[Operation] identifier[getOperation] operator[SEP] identifier[KuduTable] identifier[table] , Keyword[int] identifier[op] operator[SEP] Keyword[throws] identifier[UnsupportedOperationException] { identifier[Operation] identifier[operation] operator[=] Other[null] operator[SEP] Keywor...
public ProxyDataSourceBuilder logSlowQueryByJUL(long thresholdTime, TimeUnit timeUnit, Level logLevel, String loggerName) { this.createJulSlowQueryListener = true; this.slowQueryThreshold = thresholdTime; this.slowQueryTimeUnit = timeUnit; this.julSlowQueryLogLevel = logLevel; th...
class class_name[name] begin[{] method[logSlowQueryByJUL, return_type[type[ProxyDataSourceBuilder]], modifier[public], parameter[thresholdTime, timeUnit, logLevel, loggerName]] begin[{] assign[THIS[member[None.createJulSlowQueryListener]], literal[true]] assign[THIS[member[None....
Keyword[public] identifier[ProxyDataSourceBuilder] identifier[logSlowQueryByJUL] operator[SEP] Keyword[long] identifier[thresholdTime] , identifier[TimeUnit] identifier[timeUnit] , identifier[Level] identifier[logLevel] , identifier[String] identifier[loggerName] operator[SEP] { Keyword[this] operator[SEP] id...
@Override public CreateOpenIDConnectProviderResult createOpenIDConnectProvider(CreateOpenIDConnectProviderRequest request) { request = beforeClientExecution(request); return executeCreateOpenIDConnectProvider(request); }
class class_name[name] begin[{] method[createOpenIDConnectProvider, return_type[type[CreateOpenIDConnectProviderResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateOpenIDCo...
annotation[@] identifier[Override] Keyword[public] identifier[CreateOpenIDConnectProviderResult] identifier[createOpenIDConnectProvider] operator[SEP] identifier[CreateOpenIDConnectProviderRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP]...
private void addDirectory(File root, File directory, String targetPath, ZipOutputStream zos) throws IOException { String prefix = targetPath; if (!prefix.isEmpty() && !prefix.endsWith("/")) { prefix += "/"; } // directory entries are required, or else bundle classpath may be ...
class class_name[name] begin[{] method[addDirectory, return_type[void], modifier[private], parameter[root, directory, targetPath, zos]] begin[{] local_variable[type[String], prefix] if[binary_operation[call[prefix.isEmpty, parameter[]], &&, call[prefix.endsWith, parameter[literal["/"]]]...
Keyword[private] Keyword[void] identifier[addDirectory] operator[SEP] identifier[File] identifier[root] , identifier[File] identifier[directory] , identifier[String] identifier[targetPath] , identifier[ZipOutputStream] identifier[zos] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] ...
public final void setCancelable(final Cancelable cancelable) { if (SwingUtilities.isEventDispatchThread()) { setCancelableIntern(cancelable); } else { try { SwingUtilities.invokeLater(new Runnable() { public void run() { ...
class class_name[name] begin[{] method[setCancelable, return_type[void], modifier[final public], parameter[cancelable]] begin[{] if[call[SwingUtilities.isEventDispatchThread, parameter[]]] begin[{] call[.setCancelableIntern, parameter[member[.cancelable]]] else b...
Keyword[public] Keyword[final] Keyword[void] identifier[setCancelable] operator[SEP] Keyword[final] identifier[Cancelable] identifier[cancelable] operator[SEP] { Keyword[if] operator[SEP] identifier[SwingUtilities] operator[SEP] identifier[isEventDispatchThread] operator[SEP] operator[SEP] operator[SEP] { ...
public static DZcs cs_multiply(DZcs A, DZcs B) { int p, j, nz = 0, anz, Cp[], Ci[], Bp[], m, n, bnz, w[], Bi[] ; DZcsa x, Bx = new DZcsa(), Cx = new DZcsa() ; boolean values ; DZcs C ; if (!CS_CSC (A) || !CS_CSC (B)) return (null) ; /* check inputs */ if (A.n != B.m) return (null) ; m = A.m ; an...
class class_name[name] begin[{] method[cs_multiply, return_type[type[DZcs]], modifier[public static], parameter[A, B]] begin[{] local_variable[type[int], p] local_variable[type[DZcsa], x] local_variable[type[boolean], values] local_variable[type[DZcs], C] if[bina...
Keyword[public] Keyword[static] identifier[DZcs] identifier[cs_multiply] operator[SEP] identifier[DZcs] identifier[A] , identifier[DZcs] identifier[B] operator[SEP] { Keyword[int] identifier[p] , identifier[j] , identifier[nz] operator[=] Other[0] , identifier[anz] , identifier[Cp] operator[SEP] operator[SE...
private String readAnnotationValue(final PetiteInject annotation) { String value = annotation.value().trim(); if (value.isEmpty()) { return null; } return value; }
class class_name[name] begin[{] method[readAnnotationValue, return_type[type[String]], modifier[private], parameter[annotation]] begin[{] local_variable[type[String], value] if[call[value.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None ...
Keyword[private] identifier[String] identifier[readAnnotationValue] operator[SEP] Keyword[final] identifier[PetiteInject] identifier[annotation] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[annotation] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identi...
protected void exportGroups(Element parent, CmsOrganizationalUnit orgunit) throws CmsImportExportException, SAXException { try { I_CmsReport report = getReport(); List<CmsGroup> allGroups = OpenCms.getOrgUnitManager().getGroups(getCms(), orgunit.getName(), false); for (i...
class class_name[name] begin[{] method[exportGroups, return_type[void], modifier[protected], parameter[parent, orgunit]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getReport, post...
Keyword[protected] Keyword[void] identifier[exportGroups] operator[SEP] identifier[Element] identifier[parent] , identifier[CmsOrganizationalUnit] identifier[orgunit] operator[SEP] Keyword[throws] identifier[CmsImportExportException] , identifier[SAXException] { Keyword[try] { identifier[I_CmsReport...
public String getFirstValue() { CharSequence firstValue; synchronized (values) { if (values.isEmpty()) { return null; } firstValue = values.get(0); } return firstValue.toString(); }
class class_name[name] begin[{] method[getFirstValue, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[CharSequence], firstValue] SYNCHRONIZED[member[.values]] BEGIN[{] if[call[values.isEmpty, parameter[]]] begin[{] ...
Keyword[public] identifier[String] identifier[getFirstValue] operator[SEP] operator[SEP] { identifier[CharSequence] identifier[firstValue] operator[SEP] Keyword[synchronized] operator[SEP] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[isEmpty]...
public static void handleSetPropertyExpression(Object bean, String prop, String expression, PageContext pageContext, ProtectedFunctionMapper functionMapper ) throws JasperException { try { Method method = getWriteMethod(bean.getClass(), prop); method.invoke(bean, new...
class class_name[name] begin[{] method[handleSetPropertyExpression, return_type[void], modifier[public static], parameter[bean, prop, expression, pageContext, functionMapper]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initialize...
Keyword[public] Keyword[static] Keyword[void] identifier[handleSetPropertyExpression] operator[SEP] identifier[Object] identifier[bean] , identifier[String] identifier[prop] , identifier[String] identifier[expression] , identifier[PageContext] identifier[pageContext] , identifier[ProtectedFunctionMapper] identifier...
public String getString(int index, String otherwise) { Object o = list.get(index); if (o == null) return otherwise; if (o instanceof String) return (String) o; if (o instanceof byte[]) return encodeBinary((byte[])o); throw new JsonException("not a string"); }
class class_name[name] begin[{] method[getString, return_type[type[String]], modifier[public], parameter[index, otherwise]] begin[{] local_variable[type[Object], o] if[binary_operation[member[.o], ==, literal[null]]] begin[{] return[member[.otherwise]] else begin[{] None ...
Keyword[public] identifier[String] identifier[getString] operator[SEP] Keyword[int] identifier[index] , identifier[String] identifier[otherwise] operator[SEP] { identifier[Object] identifier[o] operator[=] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP]...
public static java.util.List<com.liferay.commerce.model.CommerceAddressRestriction> getCommerceAddressRestrictions( int start, int end) { return getService().getCommerceAddressRestrictions(start, end); }
class class_name[name] begin[{] method[getCommerceAddressRestrictions, return_type[type[java]], modifier[public static], parameter[start, end]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CommerceAddressRestriction] operator[>] identifier[getC...
static String parseContentType(String contentType) throws IOException { if (contentType.indexOf(System.getProperty("line.separator")) > 0) { BufferedReader reader = new BufferedReader(new StringReader(contentType)); try { String plainContentType = reader.readLine(); ...
class class_name[name] begin[{] method[parseContentType, return_type[type[String]], modifier[static], parameter[contentType]] begin[{] if[binary_operation[call[contentType.indexOf, parameter[call[System.getProperty, parameter[literal["line.separator"]]]]], >, literal[0]]] begin[{] l...
Keyword[static] identifier[String] identifier[parseContentType] operator[SEP] identifier[String] identifier[contentType] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[contentType] operator[SEP] identifier[indexOf] operator[SEP] identifier[System] operator[SEP] ident...
public boolean matchContent(Fingerprint fp) { for (Tag tag : CONTENT_TAGS) { if (!getTag(tag).equals(fp.getTag(tag))) { return false; } } return true; }
class class_name[name] begin[{] method[matchContent, return_type[type[boolean]], modifier[public], parameter[fp]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qu...
Keyword[public] Keyword[boolean] identifier[matchContent] operator[SEP] identifier[Fingerprint] identifier[fp] operator[SEP] { Keyword[for] operator[SEP] identifier[Tag] identifier[tag] operator[:] identifier[CONTENT_TAGS] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[getTag] opera...
public void info(@Nullable final String message) { log(LogLevel.INFO, DEFAULT_EVENT, message, EMPTY_STRING_ARRAY, EMPTY_OBJECT_ARRAY, DEFAULT_THROWABLE); }
class class_name[name] begin[{] method[info, return_type[void], modifier[public], parameter[message]] begin[{] call[.log, parameter[member[LogLevel.INFO], member[.DEFAULT_EVENT], member[.message], member[.EMPTY_STRING_ARRAY], member[.EMPTY_OBJECT_ARRAY], member[.DEFAULT_THROWABLE]]] end[}] ...
Keyword[public] Keyword[void] identifier[info] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[message] operator[SEP] { identifier[log] operator[SEP] identifier[LogLevel] operator[SEP] identifier[INFO] , identifier[DEFAULT_EVENT] , identifier[message] , identifier...
public AutofitHelper setMaxTextSize(int unit, float size) { Context context = mTextView.getContext(); Resources r = Resources.getSystem(); if (context != null) { r = context.getResources(); } setRawMaxTextSize(TypedValue.applyDimension(unit, size, r.getDisplayMetric...
class class_name[name] begin[{] method[setMaxTextSize, return_type[type[AutofitHelper]], modifier[public], parameter[unit, size]] begin[{] local_variable[type[Context], context] local_variable[type[Resources], r] if[binary_operation[member[.context], !=, literal[null]]] begin[{]...
Keyword[public] identifier[AutofitHelper] identifier[setMaxTextSize] operator[SEP] Keyword[int] identifier[unit] , Keyword[float] identifier[size] operator[SEP] { identifier[Context] identifier[context] operator[=] identifier[mTextView] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[S...
static String escape(final String text, final JavaEscapeLevel escapeLevel) { if (text == null) { return null; } final int level = escapeLevel.getEscapeLevel(); StringBuilder strBuilder = null; final int offset = 0; final int max = text.length(); i...
class class_name[name] begin[{] method[escape, return_type[type[String]], modifier[static], parameter[text, escapeLevel]] begin[{] if[binary_operation[member[.text], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[t...
Keyword[static] identifier[String] identifier[escape] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[JavaEscapeLevel] identifier[escapeLevel] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] { Keyword[retur...
public static JSONArray toJSONArray(String string) throws JSONException { return (JSONArray)parse(new XMLTokener(string), true, null, false); }
class class_name[name] begin[{] method[toJSONArray, return_type[type[JSONArray]], modifier[public static], parameter[string]] begin[{] return[Cast(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selecto...
Keyword[public] Keyword[static] identifier[JSONArray] identifier[toJSONArray] operator[SEP] identifier[String] identifier[string] operator[SEP] Keyword[throws] identifier[JSONException] { Keyword[return] operator[SEP] identifier[JSONArray] operator[SEP] identifier[parse] operator[SEP] Keyword[new] identifier[XML...
public VerifyResult verifyFaceToPerson(UUID faceId, String personGroupId, UUID personId) { return verifyFaceToPersonWithServiceResponseAsync(faceId, personGroupId, personId).toBlocking().single().body(); }
class class_name[name] begin[{] method[verifyFaceToPerson, return_type[type[VerifyResult]], modifier[public], parameter[faceId, personGroupId, personId]] begin[{] return[call[.verifyFaceToPersonWithServiceResponseAsync, parameter[member[.faceId], member[.personGroupId], member[.personId]]]] end[}] ...
Keyword[public] identifier[VerifyResult] identifier[verifyFaceToPerson] operator[SEP] identifier[UUID] identifier[faceId] , identifier[String] identifier[personGroupId] , identifier[UUID] identifier[personId] operator[SEP] { Keyword[return] identifier[verifyFaceToPersonWithServiceResponseAsync] operator[SEP] i...
@NonNull public Flowable<Changes> observeChangesInTable(@NonNull String table, @NonNull BackpressureStrategy backpressureStrategy) { checkNotEmpty(table, "Table can not be null or empty"); return observeChangesInTables(Collections.singleton(table), backpressureStrategy); }
class class_name[name] begin[{] method[observeChangesInTable, return_type[type[Flowable]], modifier[public], parameter[table, backpressureStrategy]] begin[{] call[.checkNotEmpty, parameter[member[.table], literal["Table can not be null or empty"]]] return[call[.observeChangesInTables, p...
annotation[@] identifier[NonNull] Keyword[public] identifier[Flowable] operator[<] identifier[Changes] operator[>] identifier[observeChangesInTable] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[table] , annotation[@] identifier[NonNull] identifier[BackpressureStrategy] identifier[backp...
public void purge(int gcBefore) { topLevel = topLevel.localDeletionTime < gcBefore ? DeletionTime.LIVE : topLevel; if (ranges != null) { ranges.purge(gcBefore); if (ranges.isEmpty()) ranges = null; } }
class class_name[name] begin[{] method[purge, return_type[void], modifier[public], parameter[gcBefore]] begin[{] assign[member[.topLevel], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=localDeletionTime, postfix_operators=[], prefix_operators=[], qualifier=topLevel...
Keyword[public] Keyword[void] identifier[purge] operator[SEP] Keyword[int] identifier[gcBefore] operator[SEP] { identifier[topLevel] operator[=] identifier[topLevel] operator[SEP] identifier[localDeletionTime] operator[<] identifier[gcBefore] operator[?] identifier[DeletionTime] operator[SEP] identifier[LIVE] op...
public static void main(String[] args) { ListRepo listRepo = new ListRepo(); try { listRepo.run(args); } catch (Exception e) { e.printStackTrace(); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[ListRepo], listRepo] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_op...
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[ListRepo] identifier[listRepo] operator[=] Keyword[new] identifier[ListRepo] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { ...
private PBEStringEncryptor newEncryptor(final String passphrase) { final StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor(); encryptor.setPassword(passphrase); return encryptor; }
class class_name[name] begin[{] method[newEncryptor, return_type[type[PBEStringEncryptor]], modifier[private], parameter[passphrase]] begin[{] local_variable[type[StandardPBEStringEncryptor], encryptor] call[encryptor.setPassword, parameter[member[.passphrase]]] return[member[.e...
Keyword[private] identifier[PBEStringEncryptor] identifier[newEncryptor] operator[SEP] Keyword[final] identifier[String] identifier[passphrase] operator[SEP] { Keyword[final] identifier[StandardPBEStringEncryptor] identifier[encryptor] operator[=] Keyword[new] identifier[StandardPBEStringEncryptor] operator[SEP]...
@SuppressWarnings("unchecked") public <T> T getContextData(String name) { T rc = null; if (null != this.inheritableLocals) { rc = (T) this.inheritableLocals.get(name); } if (null == rc && null != this.locals) { rc = (T) this.locals.get(name); } ...
class class_name[name] begin[{] method[getContextData, return_type[type[T]], modifier[public], parameter[name]] begin[{] local_variable[type[T], rc] if[binary_operation[literal[null], !=, THIS[member[None.inheritableLocals]]]] begin[{] assign[member[.rc], Cast(ex...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[getContextData] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[T] identifier[rc] operator[=] Other[null] operator[SEP...
public SessionManagementConfigurer<H> sessionCreationPolicy( SessionCreationPolicy sessionCreationPolicy) { Assert.notNull(sessionCreationPolicy, "sessionCreationPolicy cannot be null"); this.sessionPolicy = sessionCreationPolicy; return this; }
class class_name[name] begin[{] method[sessionCreationPolicy, return_type[type[SessionManagementConfigurer]], modifier[public], parameter[sessionCreationPolicy]] begin[{] call[Assert.notNull, parameter[member[.sessionCreationPolicy], literal["sessionCreationPolicy cannot be null"]]] ...
Keyword[public] identifier[SessionManagementConfigurer] operator[<] identifier[H] operator[>] identifier[sessionCreationPolicy] operator[SEP] identifier[SessionCreationPolicy] identifier[sessionCreationPolicy] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[sessionCr...
public static List<String> texts(Collection<WebElement> elements) { return elements.stream().map(ElementsCollection::getText).collect(toList()); }
class class_name[name] begin[{] method[texts, return_type[type[List]], modifier[public static], parameter[elements]] begin[{] return[call[elements.stream, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[texts] operator[SEP] identifier[Collection] operator[<] identifier[WebElement] operator[>] identifier[elements] operator[SEP] { Keyword[return] identifier[elements] operator[SEP] identifier[stream] operator[SEP...
public List<TagCount> getTagsOnApp(int appId, MultivaluedMap<String, String> options) { return getResourceFactory() .getApiResource("/tag/app/" + appId + "/") .queryParams(options) .get(new GenericType<List<TagCount>>() { }); }
class class_name[name] begin[{] method[getTagsOnApp, return_type[type[List]], modifier[public], parameter[appId, options]] begin[{] return[call[.getResourceFactory, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[TagCount] operator[>] identifier[getTagsOnApp] operator[SEP] Keyword[int] identifier[appId] , identifier[MultivaluedMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[options] operator[SEP] { Keyword[return] identifier[getReso...
@Override public void start(BundleContext context) throws Exception { Hashtable<String, String> props = new Hashtable<String, String>(); props.put(Constants.SERVICE_VENDOR, "IBM"); props.put("type", "HTTPChannel"); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { ...
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[context]] begin[{] local_variable[type[Hashtable], props] call[props.put, parameter[member[Constants.SERVICE_VENDOR], literal["IBM"]]] call[props.put, parameter[literal["type"], ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[BundleContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Hashtable] operator[<] identifier[String] , identifier[String] operator[>] identifier[props] operator[=]...
private List<Path> getLocalLogDirs() throws IOException { String logDirs = System.getenv(ApplicationConstants.Environment.LOG_DIRS.toString()); return COMMA_SPLITTER.splitToList(logDirs).stream().map(e -> new Path(e)).collect(Collectors.toList()); }
class class_name[name] begin[{] method[getLocalLogDirs, return_type[type[List]], modifier[private], parameter[]] begin[{] local_variable[type[String], logDirs] return[call[COMMA_SPLITTER.splitToList, parameter[member[.logDirs]]]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[Path] operator[>] identifier[getLocalLogDirs] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[logDirs] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] identifier[ApplicationC...
public static String getServletContextPath(String processDefinitionId) { ProcessApplicationInfo processApplicationInfo = getProcessApplicationInfo(processDefinitionId); if (processApplicationInfo == null) { return null; } return processApplicationInfo.getProperties().get( ProcessApplicationInfo.PROP_SERV...
class class_name[name] begin[{] method[getServletContextPath, return_type[type[String]], modifier[public static], parameter[processDefinitionId]] begin[{] local_variable[type[ProcessApplicationInfo], processApplicationInfo] if[binary_operation[member[.processApplicationInfo], ==, litera...
Keyword[public] Keyword[static] identifier[String] identifier[getServletContextPath] operator[SEP] identifier[String] identifier[processDefinitionId] operator[SEP] { identifier[ProcessApplicationInfo] identifier[processApplicationInfo] operator[=] identifier[getProcessApplicationInfo] operator[SEP] identifier[pr...
public static int setAndGetListenerFlags(ListenerAdapter listenerAdapter) { InternalMapListenerAdapter internalMapListenerAdapter = (InternalMapListenerAdapter) listenerAdapter; ListenerAdapter[] listenerAdapters = internalMapListenerAdapter.getListenerAdapters(); EntryEventType[] values = Entry...
class class_name[name] begin[{] method[setAndGetListenerFlags, return_type[type[int]], modifier[public static], parameter[listenerAdapter]] begin[{] local_variable[type[InternalMapListenerAdapter], internalMapListenerAdapter] local_variable[type[ListenerAdapter], listenerAdapters] local...
Keyword[public] Keyword[static] Keyword[int] identifier[setAndGetListenerFlags] operator[SEP] identifier[ListenerAdapter] identifier[listenerAdapter] operator[SEP] { identifier[InternalMapListenerAdapter] identifier[internalMapListenerAdapter] operator[=] operator[SEP] identifier[InternalMapListenerAdapter] oper...
@Override protected void updateValuesFromHSVFields () { int[] hsv = ColorUtils.RGBtoHSV(color); int h = hsv[0]; int s = hsv[1]; int v = hsv[2]; if (hBar.isInputValid()) h = hBar.getValue(); if (sBar.isInputValid()) s = sBar.getValue(); if (vBar.isInputValid()) v = vBar.getValue(); color = ColorUtils....
class class_name[name] begin[{] method[updateValuesFromHSVFields, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[int], hsv] local_variable[type[int], h] local_variable[type[int], s] local_variable[type[int], v] if[call[hBar.isIn...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[updateValuesFromHSVFields] operator[SEP] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[hsv] operator[=] identifier[ColorUtils] operator[SEP] identifier[RGBtoHSV] operator[SEP] identifier[color] operator[SEP] oper...
public static void validateAllOrNone(Props props, String... keys) { Objects.requireNonNull(keys); boolean allExist = true; boolean someExist = false; for (String key : keys) { Object val = props.get(key); allExist &= val != null; someExist |= val != null; } if (someExist && !...
class class_name[name] begin[{] method[validateAllOrNone, return_type[void], modifier[public static], parameter[props, keys]] begin[{] call[Objects.requireNonNull, parameter[member[.keys]]] local_variable[type[boolean], allExist] local_variable[type[boolean], someExist] ...
Keyword[public] Keyword[static] Keyword[void] identifier[validateAllOrNone] operator[SEP] identifier[Props] identifier[props] , identifier[String] operator[...] identifier[keys] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[keys] operator[SEP] operator[SEP...
static String createBeanAttributesId(BeanAttributes<?> attributes) { return Stream.of(attributes.getName(), attributes.getScope().getName(), createAnnotationCollectionId(attributes.getQualifiers()), createTypeCollectionId(attributes.getTypes())) .filte...
class class_name[name] begin[{] method[createBeanAttributesId, return_type[type[String]], modifier[static], parameter[attributes]] begin[{] return[call[Stream.of, parameter[call[attributes.getName, parameter[]], call[attributes.getScope, parameter[]], call[.createAnnotationCollectionId, parameter[call[...
Keyword[static] identifier[String] identifier[createBeanAttributesId] operator[SEP] identifier[BeanAttributes] operator[<] operator[?] operator[>] identifier[attributes] operator[SEP] { Keyword[return] identifier[Stream] operator[SEP] identifier[of] operator[SEP] identifier[attributes] operator[SEP] identifier[g...
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable<T> cacheWithInitialCapacity(int initialCapacity) { return ObservableCache.from(this, initialCapacity); }
class class_name[name] begin[{] method[cacheWithInitialCapacity, return_type[type[Observable]], modifier[final public], parameter[initialCapacity]] begin[{] return[call[ObservableCache.from, parameter[THIS[], member[.initialCapacity]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Observable] operator[<] identifier[T] operator[>] identifier[cacheWithInitialCapacity] operator[SEP] Key...
public String readString(HKey hk, String key, String valueName) throws RegistryException { return readString(hk, key, valueName, null); }
class class_name[name] begin[{] method[readString, return_type[type[String]], modifier[public], parameter[hk, key, valueName]] begin[{] return[call[.readString, parameter[member[.hk], member[.key], member[.valueName], literal[null]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[readString] operator[SEP] identifier[HKey] identifier[hk] , identifier[String] identifier[key] , identifier[String] identifier[valueName] operator[SEP] Keyword[throws] identifier[RegistryException] { Keyword[return] identifier[readString] operator[SEP] identifier[h...
public final EObject entryRuleAbstractTerminal() throws RecognitionException { EObject current = null; EObject iv_ruleAbstractTerminal = null; try { // InternalXtext.g:1448:57: (iv_ruleAbstractTerminal= ruleAbstractTerminal EOF ) // InternalXtext.g:1449:2: iv_ruleAbstr...
class class_name[name] begin[{] method[entryRuleAbstractTerminal, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], iv_ruleAbstractTerminal] TryStatement(block=[BlockStatement(label=None, statem...
Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleAbstractTerminal] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleAbstractTerminal] operator[=]...
protected void setContext(Context context) throws CpoException { try { if (context == null) { context_ = new InitialContext(); } else { context_ = context; } } catch (NamingException e) { throw new CpoException("Error setting Context", e); } }
class class_name[name] begin[{] method[setContext, return_type[void], modifier[protected], parameter[context]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Liter...
Keyword[protected] Keyword[void] identifier[setContext] operator[SEP] identifier[Context] identifier[context] operator[SEP] Keyword[throws] identifier[CpoException] { Keyword[try] { Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] { identifier[context...
public void executeAlterTableSetTblPropertiesQuery( String qualifiedTableName, String partitionPath ) throws StageException { String sql = buildSetTablePropertiesQuery(qualifiedTableName, partitionPath); execute(sql); }
class class_name[name] begin[{] method[executeAlterTableSetTblPropertiesQuery, return_type[void], modifier[public], parameter[qualifiedTableName, partitionPath]] begin[{] local_variable[type[String], sql] call[.execute, parameter[member[.sql]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[executeAlterTableSetTblPropertiesQuery] operator[SEP] identifier[String] identifier[qualifiedTableName] , identifier[String] identifier[partitionPath] operator[SEP] Keyword[throws] identifier[StageException] { identifier[String] identifier[sql] operator[=] identifier[bui...
@Override public void queueEvent(final FacesEvent event) { final FacesContext fc = FacesContext.getCurrentInstance(); if (isSelfRequest(fc) && event instanceof AjaxBehaviorEvent) { final Map<String, String> params = fc.getExternalContext().getRequestParameterMap(); final Str...
class class_name[name] begin[{] method[queueEvent, return_type[void], modifier[public], parameter[event]] begin[{] local_variable[type[FacesContext], fc] if[binary_operation[call[.isSelfRequest, parameter[member[.fc]]], &&, binary_operation[member[.event], instanceof, type[AjaxBehaviorE...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[queueEvent] operator[SEP] Keyword[final] identifier[FacesEvent] identifier[event] operator[SEP] { Keyword[final] identifier[FacesContext] identifier[fc] operator[=] identifier[FacesContext] operator[SEP] identifier[getCurrentInstance] op...
private String translateColumnName(String srcColumnName, DataMediaPair dataMediaPair, Multimap<String, String> translateDict) { if (dataMediaPair.getColumnPairMode().isExclude() || CollectionUtils.isEmpty(dataMediaPair.getColumnPairs())) { return srcColumnName;...
class class_name[name] begin[{] method[translateColumnName, return_type[type[String]], modifier[private], parameter[srcColumnName, dataMediaPair, translateDict]] begin[{] if[binary_operation[call[dataMediaPair.getColumnPairMode, parameter[]], ||, call[CollectionUtils.isEmpty, parameter[call[dat...
Keyword[private] identifier[String] identifier[translateColumnName] operator[SEP] identifier[String] identifier[srcColumnName] , identifier[DataMediaPair] identifier[dataMediaPair] , identifier[Multimap] operator[<] identifier[String] , identifier[String] operator[>] identifier[translateDict] operator[SEP] { ...
public static String camelize(String underscore, boolean capitalizeFirstChar){ StringBuilder result = new StringBuilder(); StringTokenizer st = new StringTokenizer(underscore, "_"); while (st.hasMoreTokens()) { result.append(capitalize(st.nextToken())); } return capit...
class class_name[name] begin[{] method[camelize, return_type[type[String]], modifier[public static], parameter[underscore, capitalizeFirstChar]] begin[{] local_variable[type[StringBuilder], result] local_variable[type[StringTokenizer], st] while[call[st.hasMoreTokens, parameter[...
Keyword[public] Keyword[static] identifier[String] identifier[camelize] operator[SEP] identifier[String] identifier[underscore] , Keyword[boolean] identifier[capitalizeFirstChar] operator[SEP] { identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operato...
public void trackStatePointer(NativePack random) { if (random.getStatePointer() != null) { GarbageStateReference reference = new GarbageStateReference(random, queue); referenceMap.put(random.getStatePointer().address(), reference); } }
class class_name[name] begin[{] method[trackStatePointer, return_type[void], modifier[public], parameter[random]] begin[{] if[binary_operation[call[random.getStatePointer, parameter[]], !=, literal[null]]] begin[{] local_variable[type[GarbageStateReference], reference] ...
Keyword[public] Keyword[void] identifier[trackStatePointer] operator[SEP] identifier[NativePack] identifier[random] operator[SEP] { Keyword[if] operator[SEP] identifier[random] operator[SEP] identifier[getStatePointer] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[Gar...
public static void removeAttribute(final AttributesImpl atts, final String qName) { final int i = atts.getIndex(qName); if (i != -1) { atts.removeAttribute(i); } }
class class_name[name] begin[{] method[removeAttribute, return_type[void], modifier[public static], parameter[atts, qName]] begin[{] local_variable[type[int], i] if[binary_operation[member[.i], !=, literal[1]]] begin[{] call[atts.removeAttribute, parameter[member...
Keyword[public] Keyword[static] Keyword[void] identifier[removeAttribute] operator[SEP] Keyword[final] identifier[AttributesImpl] identifier[atts] , Keyword[final] identifier[String] identifier[qName] operator[SEP] { Keyword[final] Keyword[int] identifier[i] operator[=] identifier[atts] operator[SEP] identifier...
public ArgumentMention getArguments(int i) { if (RelationMention_Type.featOkTst && ((RelationMention_Type)jcasType).casFeat_arguments == null) jcasType.jcas.throwFeatMissing("arguments", "de.julielab.jules.types.RelationMention"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Relat...
class class_name[name] begin[{] method[getArguments, return_type[type[ArgumentMention]], modifier[public], parameter[i]] begin[{] if[binary_operation[member[RelationMention_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operat...
Keyword[public] identifier[ArgumentMention] identifier[getArguments] operator[SEP] Keyword[int] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[RelationMention_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[RelationMention_Type] operator[SEP] iden...
public double getScaleToUnityBox(){ double largestEdge = 0; largestEdge = Math.max(largestEdge, maxX - minX); largestEdge = Math.max(largestEdge, maxY - minY); largestEdge = Math.max(largestEdge, maxZ - minZ); return 1.0 / largestEdge; }
class class_name[name] begin[{] method[getScaleToUnityBox, return_type[type[double]], modifier[public], parameter[]] begin[{] local_variable[type[double], largestEdge] assign[member[.largestEdge], call[Math.max, parameter[member[.largestEdge], binary_operation[member[.maxX], -, member[....
Keyword[public] Keyword[double] identifier[getScaleToUnityBox] operator[SEP] operator[SEP] { Keyword[double] identifier[largestEdge] operator[=] Other[0] operator[SEP] identifier[largestEdge] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[largestEdge] , identifier[maxX] oper...
private int getAtomPosition(IAtom atom, IAtomContainer container) { for (int i = 0; i < container.getAtomCount(); i++) { if (atom.equals(container.getAtom(i))) { return i; } } return -1; }
class class_name[name] begin[{] method[getAtomPosition, return_type[type[int]], modifier[private], parameter[atom, container]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfi...
Keyword[private] Keyword[int] identifier[getAtomPosition] operator[SEP] identifier[IAtom] identifier[atom] , identifier[IAtomContainer] identifier[container] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[container] o...
protected String formatOutput(String svc, LogLevel l, String msg, Throwable t) { // ??? for more severe output levels, a formatting routine which // uses (part of) the throwable stack trace would be of advantage final StringBuffer b = new StringBuffer(150); synchronized (c) { c.setTimeInMillis(System....
class class_name[name] begin[{] method[formatOutput, return_type[type[String]], modifier[protected], parameter[svc, l, msg, t]] begin[{] local_variable[type[StringBuffer], b] SYNCHRONIZED[member[.c]] BEGIN[{] call[c.setTimeInMillis, parameter[call[System.currentT...
Keyword[protected] identifier[String] identifier[formatOutput] operator[SEP] identifier[String] identifier[svc] , identifier[LogLevel] identifier[l] , identifier[String] identifier[msg] , identifier[Throwable] identifier[t] operator[SEP] { Keyword[final] identifier[StringBuffer] identifier[b] operator[=] Keyw...
public static boolean isTypesProxyable(Iterable<? extends Type> types, ServiceRegistry services) { return getUnproxyableTypesException(types, services) == null; }
class class_name[name] begin[{] method[isTypesProxyable, return_type[type[boolean]], modifier[public static], parameter[types, services]] begin[{] return[binary_operation[call[.getUnproxyableTypesException, parameter[member[.types], member[.services]]], ==, literal[null]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isTypesProxyable] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Type] operator[>] identifier[types] , identifier[ServiceRegistry] identifier[services] operator[SEP] { Keyword[return] identifier[getUnproxyableTyp...
protected Component getResourceComponent(String path) { try { CmsPathSelectField field = new CmsPathSelectField(); field.setUseRootPaths(true); CmsObject cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject()); cms.getRequestContext().setSiteRoot(""); fie...
class class_name[name] begin[{] method[getResourceComponent, return_type[type[Component]], modifier[protected], parameter[path]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constru...
Keyword[protected] identifier[Component] identifier[getResourceComponent] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[try] { identifier[CmsPathSelectField] identifier[field] operator[=] Keyword[new] identifier[CmsPathSelectField] operator[SEP] operator[SEP] operator[SEP] ...
public void pushAndDrop(DataSegment dataSegment) { checkStateTransition(this.state, SegmentState.APPENDING, SegmentState.PUSHED_AND_DROPPED); this.state = SegmentState.PUSHED_AND_DROPPED; this.dataSegment = dataSegment; }
class class_name[name] begin[{] method[pushAndDrop, return_type[void], modifier[public], parameter[dataSegment]] begin[{] call[.checkStateTransition, parameter[THIS[member[None.state]], member[SegmentState.APPENDING], member[SegmentState.PUSHED_AND_DROPPED]]] assign[THIS[member[...
Keyword[public] Keyword[void] identifier[pushAndDrop] operator[SEP] identifier[DataSegment] identifier[dataSegment] operator[SEP] { identifier[checkStateTransition] operator[SEP] Keyword[this] operator[SEP] identifier[state] , identifier[SegmentState] operator[SEP] identifier[APPENDING] , identifier[SegmentSta...
public static String getName(Class<?> clz) { if (clz == null) { return null; } String className = class2NameCache.get(clz); if (className != null) { return className; } className = getNameWithoutCache(clz); // 与name2ClassCache同样道理,如果没有恶...
class class_name[name] begin[{] method[getName, return_type[type[String]], modifier[public static], parameter[clz]] begin[{] if[binary_operation[member[.clz], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Str...
Keyword[public] Keyword[static] identifier[String] identifier[getName] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clz] operator[SEP] { Keyword[if] operator[SEP] identifier[clz] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] ...
public List<Task> allTasks() throws DocumentStoreException { int nDocs = this.mDocumentStore.database().getDocumentCount(); List<DocumentRevision> all = this.mDocumentStore.database().read(0, nDocs, true); List<Task> tasks = new ArrayList<Task>(); // Filter all documents down to those o...
class class_name[name] begin[{] method[allTasks, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[int], nDocs] local_variable[type[List], all] local_variable[type[List], tasks] ForStatement(body=BlockStatement(label=None, statements=[LocalVari...
Keyword[public] identifier[List] operator[<] identifier[Task] operator[>] identifier[allTasks] operator[SEP] operator[SEP] Keyword[throws] identifier[DocumentStoreException] { Keyword[int] identifier[nDocs] operator[=] Keyword[this] operator[SEP] identifier[mDocumentStore] operator[SEP] identifier[database] oper...
private String[] readFile(String fileName) throws IOException { ArrayList<String> result = new ArrayList<String>(); FileReader fReader = new FileReader(fileName); BufferedReader bReader = new BufferedReader(fReader); while (true) { String line = bReader.readLine(); if (line == null) { ...
class class_name[name] begin[{] method[readFile, return_type[type[String]], modifier[private], parameter[fileName]] begin[{] local_variable[type[ArrayList], result] local_variable[type[FileReader], fReader] local_variable[type[BufferedReader], bReader] while[literal[true...
Keyword[private] identifier[String] operator[SEP] operator[SEP] identifier[readFile] operator[SEP] identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[result] operator[=] Keyword[new] identifie...
public List<GeopackageRasterTileSource> getTileSources() { List<GeopackageRasterTileSource> srcs = new ArrayList<>(); List<String> databases = manager.databases(); for (int i = 0; i < databases.size(); i++) { GeoPackage open = manager.open(databases.get(i)); List<String...
class class_name[name] begin[{] method[getTileSources, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], srcs] local_variable[type[List], databases] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[]...
Keyword[public] identifier[List] operator[<] identifier[GeopackageRasterTileSource] operator[>] identifier[getTileSources] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[GeopackageRasterTileSource] operator[>] identifier[srcs] operator[=] Keyword[new] identifier[ArrayList] operator[<] oper...
public byte[] toBytes() throws IOException { ByteWriter writer = new ByteWriter(); // Write GP as the 2 byte magic number writer.writeString(GeoPackageConstants.GEO_PACKAGE_GEOMETRY_MAGIC_NUMBER); // Write a byte as the version, value of 0 = version 1 writer.writeByte(GeoPackageConstants.GEO_PACKAGE_GEOMET...
class class_name[name] begin[{] method[toBytes, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[ByteWriter], writer] call[writer.writeString, parameter[member[GeoPackageConstants.GEO_PACKAGE_GEOMETRY_MAGIC_NUMBER]]] call[writer.writeB...
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toBytes] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ByteWriter] identifier[writer] operator[=] Keyword[new] identifier[ByteWriter] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] ...
@Override public GetGroupResult getGroup(GetGroupRequest request) { request = beforeClientExecution(request); return executeGetGroup(request); }
class class_name[name] begin[{] method[getGroup, return_type[type[GetGroupResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetGroup, parameter[member[.request]]]] end[}] E...
annotation[@] identifier[Override] Keyword[public] identifier[GetGroupResult] identifier[getGroup] operator[SEP] identifier[GetGroupRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[...
public static void assertResponseNotReceived(int statusCode, String method, long sequenceNumber, MessageListener obj) { assertResponseNotReceived(null, statusCode, method, sequenceNumber, obj); }
class class_name[name] begin[{] method[assertResponseNotReceived, return_type[void], modifier[public static], parameter[statusCode, method, sequenceNumber, obj]] begin[{] call[.assertResponseNotReceived, parameter[literal[null], member[.statusCode], member[.method], member[.sequenceNumber], mem...
Keyword[public] Keyword[static] Keyword[void] identifier[assertResponseNotReceived] operator[SEP] Keyword[int] identifier[statusCode] , identifier[String] identifier[method] , Keyword[long] identifier[sequenceNumber] , identifier[MessageListener] identifier[obj] operator[SEP] { identifier[assertResponseNotRec...
private synchronized void onJobFailure(final JobStatusProto jobStatusProto) { assert jobStatusProto.getState() == ReefServiceProtos.State.FAILED; final String id = this.jobId; final Optional<byte[]> data = jobStatusProto.hasException() ? Optional.of(jobStatusProto.getException().toByteArray()) : ...
class class_name[name] begin[{] method[onJobFailure, return_type[void], modifier[synchronized private], parameter[jobStatusProto]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=[], qualifier=jobStatusPr...
Keyword[private] Keyword[synchronized] Keyword[void] identifier[onJobFailure] operator[SEP] Keyword[final] identifier[JobStatusProto] identifier[jobStatusProto] operator[SEP] { Keyword[assert] identifier[jobStatusProto] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[==] identifier[ReefSe...
@Override public void merge(Collection<Bean> beans) throws AbortRuntimeException { init(); Map<HBeanRow, HBeanRow> providedRows = new HashMap<>(); for (Bean bean : beans) { HBeanRow row = new HBeanRow(bean, uids); providedRows.put(row, row); for (BeanId id...
class class_name[name] begin[{] method[merge, return_type[void], modifier[public], parameter[beans]] begin[{] call[.init, parameter[]] local_variable[type[Map], providedRows] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declar...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[merge] operator[SEP] identifier[Collection] operator[<] identifier[Bean] operator[>] identifier[beans] operator[SEP] Keyword[throws] identifier[AbortRuntimeException] { identifier[init] operator[SEP] operator[SEP] operator[SEP] identifie...
@Override public boolean enlistOnePhase(UOWCoordinator coord, OnePhaseXAResource opXaRes) throws RollbackException, IllegalStateException, SystemException { if (isClient) { throw new SystemException(); } return etm().enlistOnePhase(coord, opXaRes); }
class class_name[name] begin[{] method[enlistOnePhase, return_type[type[boolean]], modifier[public], parameter[coord, opXaRes]] begin[{] if[member[.isClient]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[enlistOnePhase] operator[SEP] identifier[UOWCoordinator] identifier[coord] , identifier[OnePhaseXAResource] identifier[opXaRes] operator[SEP] Keyword[throws] identifier[RollbackException] , identifier[IllegalStateException] , identifier[S...
public static boolean compareStringLists(List<String> list1, List<String> list2) { if (list1 == null && list2 == null) return true; if (list1 == null || list2 == null) return false; if (list1.size() != list2.size()) return false; for (int i = 0; i < li...
class class_name[name] begin[{] method[compareStringLists, return_type[type[boolean]], modifier[public static], parameter[list1, list2]] begin[{] if[binary_operation[binary_operation[member[.list1], ==, literal[null]], &&, binary_operation[member[.list2], ==, literal[null]]]] begin[{] return[li...
Keyword[public] Keyword[static] Keyword[boolean] identifier[compareStringLists] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[list1] , identifier[List] operator[<] identifier[String] operator[>] identifier[list2] operator[SEP] { Keyword[if] operator[SEP] identifier[list1] ...
public static long parseBitrate(String bitrate) { if ("N/A".equals(bitrate)) { return -1; } Matcher m = BITRATE_REGEX.matcher(bitrate); if (!m.find()) { throw new IllegalArgumentException("Invalid bitrate '" + bitrate + "'"); } return (long) (Float.parseFloat(m.group(1)) * 1000); ...
class class_name[name] begin[{] method[parseBitrate, return_type[type[long]], modifier[public static], parameter[bitrate]] begin[{] if[literal["N/A"]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[Matcher], m] if[ca...
Keyword[public] Keyword[static] Keyword[long] identifier[parseBitrate] operator[SEP] identifier[String] identifier[bitrate] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[bitrate] operator[SEP] operator[SEP] { Keyword[return] operato...
public static int parse(String duration) { if (StringUtil.blank(duration)) return 1800; int lastChar = duration.length()-1; char suffix = duration.charAt(lastChar); try { int value = Integer.parseInt(duration.substring(0, lastChar), 10); ...
class class_name[name] begin[{] method[parse, return_type[type[int]], modifier[public static], parameter[duration]] begin[{] if[call[StringUtil.blank, parameter[member[.duration]]]] begin[{] return[literal[1800]] else begin[{] None end[}] local_variable[type[int], lastCh...
Keyword[public] Keyword[static] Keyword[int] identifier[parse] operator[SEP] identifier[String] identifier[duration] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identifier[blank] operator[SEP] identifier[duration] operator[SEP] operator[SEP] Keyword[return] Other[1800] operator...
protected void startConnectionLostTimer() { synchronized (syncConnectionLost) { if (this.connectionLostTimeout <= 0) { log.trace("Connection lost timer deactivated"); return; } log.trace("Connection lost timer started"); this.websoc...
class class_name[name] begin[{] method[startConnectionLostTimer, return_type[void], modifier[protected], parameter[]] begin[{] SYNCHRONIZED[member[.syncConnectionLost]] BEGIN[{] if[binary_operation[THIS[member[None.connectionLostTimeout]], <=, literal[0]]] begin[{] ...
Keyword[protected] Keyword[void] identifier[startConnectionLostTimer] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[syncConnectionLost] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[connectionLostTimeout] operator[<=] Other[0] operator[...
public void show(Formatter f) { f.format("Grib2Pds{ id=%d-%d template=%d, forecastTime= %d timeUnit=%s vertLevel=%f}", getParameterCategory(), getParameterNumber(), template, getForecastTime(), getTimeUnit(), getLevelValue1()); }
class class_name[name] begin[{] method[show, return_type[void], modifier[public], parameter[f]] begin[{] call[f.format, parameter[literal["Grib2Pds{ id=%d-%d template=%d, forecastTime= %d timeUnit=%s vertLevel=%f}"], call[.getParameterCategory, parameter[]], call[.getParameterNumber, parameter[...
Keyword[public] Keyword[void] identifier[show] operator[SEP] identifier[Formatter] identifier[f] operator[SEP] { identifier[f] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[getParameterCategory] operator[SEP] operator[SEP] , identifier[getParameterNumber] operator[SEP] operator[SE...
public static <K, V, M extends Map<K, V>, R> Optional<R> getOptionalIfExist(M map, Function<M, R> returnBuilderFunction) { return getOptional(map).map(returnBuilderFunction); }
class class_name[name] begin[{] method[getOptionalIfExist, return_type[type[Optional]], modifier[public static], parameter[map, returnBuilderFunction]] begin[{] return[call[.getOptional, parameter[member[.map]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] , identifier[M] Keyword[extends] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] , identifier[R] operator[>] identifier[Optional] operator[<] identifier[R] operator[>] identifier[getOptionalIfExist] operator[SEP] identif...
final Serializable fetchValue(String columnName, int columnIndex, int type, final int meta, boolean isBinary) { int len = 0; if (type == LogEvent.MYSQL_TYPE_STRING) { if (meta >= 256) { int byte0 = meta >> 8; int byte1 = meta & 0xff; if...
class class_name[name] begin[{] method[fetchValue, return_type[type[Serializable]], modifier[final], parameter[columnName, columnIndex, type, meta, isBinary]] begin[{] local_variable[type[int], len] if[binary_operation[member[.type], ==, member[LogEvent.MYSQL_TYPE_STRING]]] begin[{] ...
Keyword[final] identifier[Serializable] identifier[fetchValue] operator[SEP] identifier[String] identifier[columnName] , Keyword[int] identifier[columnIndex] , Keyword[int] identifier[type] , Keyword[final] Keyword[int] identifier[meta] , Keyword[boolean] identifier[isBinary] operator[SEP] { Keyword[int] ide...
private String[] normalize( String[] list, int minlength ) { if ( list.length < minlength ) { // Need to do padding String[] newlist = new String[minlength]; System.arraycopy( list, 0, newlist, 0, list.length ); Arrays.fill( newlist, list.length, newli...
class class_name[name] begin[{] method[normalize, return_type[type[String]], modifier[private], parameter[list, minlength]] begin[{] if[binary_operation[member[list.length], <, member[.minlength]]] begin[{] local_variable[type[String], newlist] call[System.ar...
Keyword[private] identifier[String] operator[SEP] operator[SEP] identifier[normalize] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[list] , Keyword[int] identifier[minlength] operator[SEP] { Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[length] operator[<] identif...
protected void store(Object id, Object entity, boolean spillOverToL2) { String key = cacheKey(entity.getClass(), id); LOG.debug("Writing to L1 >> " + key); sessionCache.put(key, entity); if (spillOverToL2) { LOG.debug("Writing to L2 >>" + key); ...
class class_name[name] begin[{] method[store, return_type[void], modifier[protected], parameter[id, entity, spillOverToL2]] begin[{] local_variable[type[String], key] call[LOG.debug, parameter[binary_operation[literal["Writing to L1 >> "], +, member[.key]]]] call[session...
Keyword[protected] Keyword[void] identifier[store] operator[SEP] identifier[Object] identifier[id] , identifier[Object] identifier[entity] , Keyword[boolean] identifier[spillOverToL2] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[cacheKey] operator[SEP] identifier[entity] operator[S...
private void computeGrid(final MapView pMapView) { // TODO: 15-11-2016 should take map orientation into account in the BBox! BoundingBox viewBBox = pMapView.getBoundingBox(); startBoundingBox = viewBBox; startProjection = pMapView.getProjection(); // do not compute grid if BBox...
class class_name[name] begin[{] method[computeGrid, return_type[void], modifier[private], parameter[pMapView]] begin[{] local_variable[type[BoundingBox], viewBBox] assign[member[.startBoundingBox], member[.viewBBox]] assign[member[.startProjection], call[pMapView.getProj...
Keyword[private] Keyword[void] identifier[computeGrid] operator[SEP] Keyword[final] identifier[MapView] identifier[pMapView] operator[SEP] { identifier[BoundingBox] identifier[viewBBox] operator[=] identifier[pMapView] operator[SEP] identifier[getBoundingBox] operator[SEP] operator[SEP] operator[SEP] identifier[...
public Observable<UUID> addCompositeEntityChildAsync(UUID appId, String versionId, UUID cEntityId, AddCompositeEntityChildOptionalParameter addCompositeEntityChildOptionalParameter) { return addCompositeEntityChildWithServiceResponseAsync(appId, versionId, cEntityId, addCompositeEntityChildOptionalParameter).ma...
class class_name[name] begin[{] method[addCompositeEntityChildAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, cEntityId, addCompositeEntityChildOptionalParameter]] begin[{] return[call[.addCompositeEntityChildWithServiceResponseAsync, parameter[member[.appId], member...
Keyword[public] identifier[Observable] operator[<] identifier[UUID] operator[>] identifier[addCompositeEntityChildAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[cEntityId] , identifier[AddCompositeEntityChildOptionalParameter] identifi...
public static /*@non_null@*/ String getOption(String flag, String[] options) throws Exception { String newString; int i = getOptionPos(flag, options); if (i > -1) { if (options[i].equals("-" + flag)) { if (i + 1 == options.length) { throw new Exception("No value given for -" + flag + " opti...
class class_name[name] begin[{] method[getOption, return_type[type[String]], modifier[public static], parameter[flag, options]] begin[{] local_variable[type[String], newString] local_variable[type[int], i] if[binary_operation[member[.i], >, literal[1]]] begin[{] ...
Keyword[public] Keyword[static] identifier[String] identifier[getOption] operator[SEP] identifier[String] identifier[flag] , identifier[String] operator[SEP] operator[SEP] identifier[options] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] identifier[newString] operator[SEP] Keyword[int...
public FSList getMentions() { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_mentions == null) jcasType.jcas.throwFeatMissing("mentions", "edu.cmu.lti.oaqa.type.kb.Concept"); return (FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Concept_Type)jcasType).casFea...
class class_name[name] begin[{] method[getMentions, return_type[type[FSList]], modifier[public], parameter[]] begin[{] if[binary_operation[member[Concept_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=,...
Keyword[public] identifier[FSList] identifier[getMentions] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Concept_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Concept_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifi...
public static Calendar getThreadCalendar(TimeZone tz) { Calendar c = calendar.get(); c.clear(); if (tz == null) tz = ThreadLocalPageContext.getTimeZone(); c.setTimeZone(tz); return c; }
class class_name[name] begin[{] method[getThreadCalendar, return_type[type[Calendar]], modifier[public static], parameter[tz]] begin[{] local_variable[type[Calendar], c] call[c.clear, parameter[]] if[binary_operation[member[.tz], ==, literal[null]]] begin[{] ...
Keyword[public] Keyword[static] identifier[Calendar] identifier[getThreadCalendar] operator[SEP] identifier[TimeZone] identifier[tz] operator[SEP] { identifier[Calendar] identifier[c] operator[=] identifier[calendar] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[S...
@Override public Properties loadRemoteConfig() { Properties properties = null; try { // 加载远程canal配置 ConfigItem configItem = getRemoteCanalConfig(); if (configItem != null) { if (configItem.getModifiedTime() != currentConfigTimestamp) { ...
class class_name[name] begin[{] method[loadRemoteConfig, return_type[type[Properties]], modifier[public], parameter[]] begin[{] local_variable[type[Properties], properties] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Me...
annotation[@] identifier[Override] Keyword[public] identifier[Properties] identifier[loadRemoteConfig] operator[SEP] operator[SEP] { identifier[Properties] identifier[properties] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[ConfigItem] identifier[configItem] operator[=] identifier[g...
public static Class<?> getTypeForProperty(Method getter) { Class<?> returnType = getter.getReturnType(); if (returnType.equals(Void.TYPE)) throw new IllegalArgumentException("Getter " + getter.toString() + " does not have a returntype."); else if (returnType.isPrimitive()) ...
class class_name[name] begin[{] method[getTypeForProperty, return_type[type[Class]], modifier[public static], parameter[getter]] begin[{] local_variable[type[Class], returnType] if[call[returnType.equals, parameter[member[Void.TYPE]]]] begin[{] ThrowStatement(expression=ClassCreator(arg...
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getTypeForProperty] operator[SEP] identifier[Method] identifier[getter] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[returnType] operator[=] identifier[getter] operator[SEP] identi...
@SuppressWarnings("rawtypes") public static <T extends Comparable> Collector<T, ?, List<T>> maxAll() { return maxAll(Fn.naturalOrder()); }
class class_name[name] begin[{] method[maxAll, return_type[type[Collector]], modifier[public static], parameter[]] begin[{] return[call[.maxAll, parameter[call[Fn.naturalOrder, parameter[]]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[List] operator[<] identifier[T] operator[>] op...
public void add(Value value) { Key subKey = makeSubKey(value); client.put(this.policy, subKey, new Bin(ListElementBinName, value)); // add the digest of the subKey to the CDT List in the Customer record client.operate(this.policy, this.key, ListOperation.append(this.binNameString, Value.get(subKey.digest))); ...
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[value]] begin[{] local_variable[type[Key], subKey] call[client.put, parameter[THIS[member[None.policy]], member[.subKey], ClassCreator(arguments=[MemberReference(member=ListElementBinName, postfix...
Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Value] identifier[value] operator[SEP] { identifier[Key] identifier[subKey] operator[=] identifier[makeSubKey] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[put] operator[SEP] Keyword[...
public ArrayList<User> lookupUsersWhere (final String where) throws PersistenceException { ArrayList<User> users = loadAll(_utable, where); for (User user : users) { // configure the user record with its field mask user.setDirtyMask(_utable.getFieldMask()); } ...
class class_name[name] begin[{] method[lookupUsersWhere, return_type[type[ArrayList]], modifier[public], parameter[where]] begin[{] local_variable[type[ArrayList], users] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodIn...
Keyword[public] identifier[ArrayList] operator[<] identifier[User] operator[>] identifier[lookupUsersWhere] operator[SEP] Keyword[final] identifier[String] identifier[where] operator[SEP] Keyword[throws] identifier[PersistenceException] { identifier[ArrayList] operator[<] identifier[User] operator[>] identifier[...