code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static void drop(Table table) { DBSetup.drop(CallInfo.create(), table.getDB(), table.getName()); }
class class_name[name] begin[{] method[drop, return_type[void], modifier[public static], parameter[table]] begin[{] call[DBSetup.drop, parameter[call[CallInfo.create, parameter[]], call[table.getDB, parameter[]], call[table.getName, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[drop] operator[SEP] identifier[Table] identifier[table] operator[SEP] { identifier[DBSetup] operator[SEP] identifier[drop] operator[SEP] identifier[CallInfo] operator[SEP] identifier[create] operator[SEP] operator[SEP] , identifier[table] operator[SEP] id...
@Override public QDateTimeValue appendSQL(final SQLSelect _sql) throws EFapsException { _sql.addTimestampValue(new DateTimeType().toString4Where(this.value)); return this; }
class class_name[name] begin[{] method[appendSQL, return_type[type[QDateTimeValue]], modifier[public], parameter[_sql]] begin[{] call[_sql.addTimestampValue, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=Non...
annotation[@] identifier[Override] Keyword[public] identifier[QDateTimeValue] identifier[appendSQL] operator[SEP] Keyword[final] identifier[SQLSelect] identifier[_sql] operator[SEP] Keyword[throws] identifier[EFapsException] { identifier[_sql] operator[SEP] identifier[addTimestampValue] operator[SEP] Keyword[new...
@Override public com.liferay.commerce.product.type.virtual.order.model.CommerceVirtualOrderItem addCommerceVirtualOrderItem( com.liferay.commerce.product.type.virtual.order.model.CommerceVirtualOrderItem commerceVirtualOrderItem) { return _commerceVirtualOrderItemLocalService.addCommerceVirtualOrderItem(commerceVi...
class class_name[name] begin[{] method[addCommerceVirtualOrderItem, return_type[type[com]], modifier[public], parameter[commerceVirtualOrderItem]] begin[{] return[call[_commerceVirtualOrderItemLocalService.addCommerceVirtualOrderItem, parameter[member[.commerceVirtualOrderItem]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[type] operator[SEP] identifier[virtual] operator[SEP] identifier[order] operator[SEP] identifier[model] operator[SEP] identif...
public static <T> Maybe<T> get(String cacheKey, Class<T> clazz) { return get(CacheService.CACHE_CONFIG_BEAN, cacheKey, clazz); }
class class_name[name] begin[{] method[get, return_type[type[Maybe]], modifier[public static], parameter[cacheKey, clazz]] begin[{] return[call[.get, parameter[member[CacheService.CACHE_CONFIG_BEAN], member[.cacheKey], member[.clazz]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Maybe] operator[<] identifier[T] operator[>] identifier[get] operator[SEP] identifier[String] identifier[cacheKey] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[return] identifi...
public ResponseSpecBuilder expectHeader(String headerName, Matcher<String> expectedValueMatcher) { spec.header(headerName, expectedValueMatcher); return this; }
class class_name[name] begin[{] method[expectHeader, return_type[type[ResponseSpecBuilder]], modifier[public], parameter[headerName, expectedValueMatcher]] begin[{] call[spec.header, parameter[member[.headerName], member[.expectedValueMatcher]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ResponseSpecBuilder] identifier[expectHeader] operator[SEP] identifier[String] identifier[headerName] , identifier[Matcher] operator[<] identifier[String] operator[>] identifier[expectedValueMatcher] operator[SEP] { identifier[spec] operator[SEP] identifier[header] operator[SEP] ident...
public static void run(final Properties properties) throws IOException, ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException { // read splits System.out.println("Parsing started: training file"); File trainingFile = ...
class class_name[name] begin[{] method[run, return_type[void], modifier[public static], parameter[properties]] begin[{] call[System.out.println, parameter[literal["Parsing started: training file"]]] local_variable[type[File], trainingFile] local_variable[type[DataModelIF], train...
Keyword[public] Keyword[static] Keyword[void] identifier[run] operator[SEP] Keyword[final] identifier[Properties] identifier[properties] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] , identifier[IllegalAccessException] , identifier[InstantiationException] , identifier[I...
public String prepare(String input) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < input.length(); i++){ char c = input.charAt(i); if(map.get(c) != null) { replacements++; sb.append(map.get(c)); } else sb.append(c); } return sb.toString(); }
class class_name[name] begin[{] method[prepare, return_type[type[String]], modifier[public], parameter[input]] begin[{] local_variable[type[StringBuffer], sb] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimens...
Keyword[public] identifier[String] identifier[prepare] operator[SEP] identifier[String] identifier[input] operator[SEP] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] opera...
public int addPoint(double x, double y, int groupIndex) { final int groupCount = getGroupCount(); if (groupIndex < 0) { throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$ } if (groupIndex >= groupCount) { throw new IndexOutOfBoundsException(groupIndex + ">=" + groupCount); //$NON-NLS-1...
class class_name[name] begin[{] method[addPoint, return_type[type[int]], modifier[public], parameter[x, y, groupIndex]] begin[{] local_variable[type[int], groupCount] if[binary_operation[member[.groupIndex], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arg...
Keyword[public] Keyword[int] identifier[addPoint] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[int] identifier[groupIndex] operator[SEP] { Keyword[final] Keyword[int] identifier[groupCount] operator[=] identifier[getGroupCount] operator[SEP] operator[SEP] operator[SEP] ...
public void abort() throws SQLException { if (fetchSize != 0) { fetchSize = 0; if (resultSet != null) { resultSet.abort(); } else { SelectResultSet firstResult = executionResults.peekFirst(); if (firstResult != null) { firstResult.abort(); } } } ...
class class_name[name] begin[{] method[abort, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.fetchSize], !=, literal[0]]] begin[{] assign[member[.fetchSize], literal[0]] if[binary_operation[member[.resultSet...
Keyword[public] Keyword[void] identifier[abort] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[fetchSize] operator[!=] Other[0] operator[SEP] { identifier[fetchSize] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[res...
@Override protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m, Object[] paramArray) throws Exception { // This retrieves the appropriate method from the wrapper class m = serviceObject.getClass().getMethod(m.getName(), m.g...
class class_name[name] begin[{] method[performInvocation, return_type[type[Object]], modifier[protected], parameter[exchange, serviceObject, m, paramArray]] begin[{] assign[member[.m], call[serviceObject.getClass, parameter[]]] return[SuperMethodInvocation(arguments=[MemberReference(mem...
annotation[@] identifier[Override] Keyword[protected] identifier[Object] identifier[performInvocation] operator[SEP] identifier[Exchange] identifier[exchange] , Keyword[final] identifier[Object] identifier[serviceObject] , identifier[Method] identifier[m] , identifier[Object] operator[SEP] operator[SEP] identifier[p...
public void setDates(SortedSet<Date> dates, boolean checked) { m_checkBoxes.clear(); for (Date date : dates) { CmsCheckBox cb = generateCheckBox(date, checked); m_checkBoxes.add(cb); } reInitLayoutElements(); setDatesInternal(dates); }
class class_name[name] begin[{] method[setDates, return_type[void], modifier[public], parameter[dates, checked]] begin[{] call[m_checkBoxes.clear, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarat...
Keyword[public] Keyword[void] identifier[setDates] operator[SEP] identifier[SortedSet] operator[<] identifier[Date] operator[>] identifier[dates] , Keyword[boolean] identifier[checked] operator[SEP] { identifier[m_checkBoxes] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[for]...
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.MMDRG__RG_LENGTH: return RG_LENGTH_EDEFAULT == null ? rgLength != null : !RG_LENGTH_EDEFAULT.equals(rgLength); case AfplibPackage.MMDRG__TRIPLETS: return triplets != null && !triplets.isEmpty(); } return super....
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MMDRG__RG_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], state...
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[MMDRG__RG_LENGTH]...
public static Namespace convert( final org.openbel.framework.common.model.Namespace ns) { Namespace ws = OBJECT_FACTORY.createNamespace(); ws.setPrefix(ns.getPrefix()); ws.setResourceLocation(ns.getResourceLocation()); return ws; }
class class_name[name] begin[{] method[convert, return_type[type[Namespace]], modifier[public static], parameter[ns]] begin[{] local_variable[type[Namespace], ws] call[ws.setPrefix, parameter[call[ns.getPrefix, parameter[]]]] call[ws.setResourceLocation, parameter[call[n...
Keyword[public] Keyword[static] identifier[Namespace] identifier[convert] operator[SEP] Keyword[final] identifier[org] operator[SEP] identifier[openbel] operator[SEP] identifier[framework] operator[SEP] identifier[common] operator[SEP] identifier[model] operator[SEP] identifier[Namespace] identifier[ns] operator[SEP] ...
@Override public boolean isGlobalResourceBundle(String resourceBundleId) { boolean isGlobalResourceBundle = false; for (JoinableResourceBundle bundle : globalBundles) { if (bundle.getId().equals(resourceBundleId)) { isGlobalResourceBundle = true; } } return isGlobalResourceBundle; }
class class_name[name] begin[{] method[isGlobalResourceBundle, return_type[type[boolean]], modifier[public], parameter[resourceBundleId]] begin[{] local_variable[type[boolean], isGlobalResourceBundle] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocatio...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isGlobalResourceBundle] operator[SEP] identifier[String] identifier[resourceBundleId] operator[SEP] { Keyword[boolean] identifier[isGlobalResourceBundle] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier...
public static String encodeText(String text, Charset charset) { try { return MimeUtility.encodeText(text, charset.name(), null); } catch (UnsupportedEncodingException e) { // ignore } return text; }
class class_name[name] begin[{] method[encodeText, return_type[type[String]], modifier[public static], parameter[text, charset]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, select...
Keyword[public] Keyword[static] identifier[String] identifier[encodeText] operator[SEP] identifier[String] identifier[text] , identifier[Charset] identifier[charset] operator[SEP] { Keyword[try] { Keyword[return] identifier[MimeUtility] operator[SEP] identifier[encodeText] operator[SEP] identifier[te...
public void addNew() throws DBException { super.addNew(); Record recCurrent = this.moveToCurrentRecord(null); // Perhaps, they supplied a default record type and this will switch it. if ((recCurrent != null) && (this.getBaseRecord() != recCurrent)) recCurrent.handleNewRecord();...
class class_name[name] begin[{] method[addNew, return_type[void], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=addNew, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[Record], recCurr...
Keyword[public] Keyword[void] identifier[addNew] operator[SEP] operator[SEP] Keyword[throws] identifier[DBException] { Keyword[super] operator[SEP] identifier[addNew] operator[SEP] operator[SEP] operator[SEP] identifier[Record] identifier[recCurrent] operator[=] Keyword[this] operator[SEP] identifier[moveToCurre...
public Optional<String> toContentTypeHeader() { return contentType.map(ct -> { if (charset.isPresent()) { return ct + "; charset=" + charset.get(); } else { return ct; } }); }
class class_name[name] begin[{] method[toContentTypeHeader, return_type[type[Optional]], modifier[public], parameter[]] begin[{] return[call[contentType.map, parameter[LambdaExpression(body=[IfStatement(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operators=[]...
Keyword[public] identifier[Optional] operator[<] identifier[String] operator[>] identifier[toContentTypeHeader] operator[SEP] operator[SEP] { Keyword[return] identifier[contentType] operator[SEP] identifier[map] operator[SEP] identifier[ct] operator[->] { Keyword[if] operator[SEP] identifier[charset] ...
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public Styler setInput(@NonNull JSONObject result, @NonNull String attribute, @Nullable String prefix, @Nullable String suffix, boolean inverted, boolean snippetted) { final String highli...
class class_name[name] begin[{] method[setInput, return_type[type[Styler]], modifier[public], parameter[result, attribute, prefix, suffix, inverted, snippetted]] begin[{] local_variable[type[String], highlightedAttribute] assign[member[.prefix], TernaryExpression(condition=BinaryOperati...
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] identifier[Styler] identifier[setInput] operator[SEP] annotation[@] identifier[NonNull] identifier[JSONObject] identifier[result] , annotation[@] identifier[NonNull] identifier[String...
public void onDoubleClick(DoubleClickEvent event) { //Check if there was a last click that was handled in this class. if (null != lastClickPosition) { // Zoom in on the event location. Bbox bounds = mapWidget.getMapModel().getMapView().getBounds(); double x = lastClickPosition.getX() - (bounds.getWidth() /...
class class_name[name] begin[{] method[onDoubleClick, return_type[void], modifier[public], parameter[event]] begin[{] if[binary_operation[literal[null], !=, member[.lastClickPosition]]] begin[{] local_variable[type[Bbox], bounds] local_variable[type[double], x] ...
Keyword[public] Keyword[void] identifier[onDoubleClick] operator[SEP] identifier[DoubleClickEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[lastClickPosition] operator[SEP] { identifier[Bbox] identifier[bounds] operator[=] identifier[mapWidget] op...
private CloseableReference<Bitmap> createBitmap( int width, int height, Bitmap.Config config, boolean hasAlpha, @Nullable Object callerContext) { return createBitmap(null, width, height, config, hasAlpha, callerContext); }
class class_name[name] begin[{] method[createBitmap, return_type[type[CloseableReference]], modifier[private], parameter[width, height, config, hasAlpha, callerContext]] begin[{] return[call[.createBitmap, parameter[literal[null], member[.width], member[.height], member[.config], member[.hasAlpha], mem...
Keyword[private] identifier[CloseableReference] operator[<] identifier[Bitmap] operator[>] identifier[createBitmap] operator[SEP] Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[Bitmap] operator[SEP] identifier[Config] identifier[config] , Keyword[boolean] identifier[hasAlpha] , annota...
public static BoxLegalHoldAssignment.Info create(BoxAPIConnection api, String policyID, String resourceType, String resourceID) { URL url = ASSIGNMENTS_URL_TEMPLATE.build(api.getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(api, url, "POST")...
class class_name[name] begin[{] method[create, return_type[type[BoxLegalHoldAssignment]], modifier[public static], parameter[api, policyID, resourceType, resourceID]] begin[{] local_variable[type[URL], url] local_variable[type[BoxJSONRequest], request] local_variable[type[JsonObject], r...
Keyword[public] Keyword[static] identifier[BoxLegalHoldAssignment] operator[SEP] identifier[Info] identifier[create] operator[SEP] identifier[BoxAPIConnection] identifier[api] , identifier[String] identifier[policyID] , identifier[String] identifier[resourceType] , identifier[String] identifier[resourceID] operator[...
private void publishEvent(WSJobInstance objectToPublish, String eventToPublish) { if (getBatchEventsPublisher() != null) { getBatchEventsPublisher().publishJobInstanceEvent(objectToPublish, eventToPublish, correlationId); } }
class class_name[name] begin[{] method[publishEvent, return_type[void], modifier[private], parameter[objectToPublish, eventToPublish]] begin[{] if[binary_operation[call[.getBatchEventsPublisher, parameter[]], !=, literal[null]]] begin[{] call[.getBatchEventsPublisher, pa...
Keyword[private] Keyword[void] identifier[publishEvent] operator[SEP] identifier[WSJobInstance] identifier[objectToPublish] , identifier[String] identifier[eventToPublish] operator[SEP] { Keyword[if] operator[SEP] identifier[getBatchEventsPublisher] operator[SEP] operator[SEP] operator[!=] Other[null] operator[...
public Object eval(String source, int lineNo, int columnNo, Object script) throws BSFException { try { Class scriptClass = evalScripts.get(script); if (scriptClass == null) { scriptClass = loader.parseClass(script.toString(), source); evalScripts.put(scrip...
class class_name[name] begin[{] method[eval, return_type[type[Object]], modifier[public], parameter[source, lineNo, columnNo, script]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberRefer...
Keyword[public] identifier[Object] identifier[eval] operator[SEP] identifier[String] identifier[source] , Keyword[int] identifier[lineNo] , Keyword[int] identifier[columnNo] , identifier[Object] identifier[script] operator[SEP] Keyword[throws] identifier[BSFException] { Keyword[try] { identifier[Cl...
public void write(Writer out) throws IOException { //logger.debug("writing feature index"); PrintWriter pw = new PrintWriter(out); Iterator it = map.entrySet().iterator(); //logger.debug("index size " + map.entrySet().size()); while (it.hasNext()) { Map.Entry me = (Map.Entry) it.next(); // feature...
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[out]] begin[{] local_variable[type[PrintWriter], pw] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[Map], me] ...
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[Writer] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[PrintWriter] identifier[pw] operator[=] Keyword[new] identifier[PrintWriter] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[Ite...
protected Command buildCommand(Config cmdConfig, Command currentParent, Command finalChild) { Preconditions.checkNotNull(cmdConfig); Preconditions.checkNotNull(currentParent); Preconditions.checkNotNull(finalChild); Set<Map.Entry<String, Object>> entries = cmdConfig.root().unwrapped().entrySet();...
class class_name[name] begin[{] method[buildCommand, return_type[type[Command]], modifier[protected], parameter[cmdConfig, currentParent, finalChild]] begin[{] call[Preconditions.checkNotNull, parameter[member[.cmdConfig]]] call[Preconditions.checkNotNull, parameter[member[.curr...
Keyword[protected] identifier[Command] identifier[buildCommand] operator[SEP] identifier[Config] identifier[cmdConfig] , identifier[Command] identifier[currentParent] , identifier[Command] identifier[finalChild] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] iden...
@VisibleForTesting static String makeTargetStringForDirectAddress(SocketAddress address) { try { return new URI(DIRECT_ADDRESS_SCHEME, "", "/" + address, null).toString(); } catch (URISyntaxException e) { // It should not happen. throw new RuntimeException(e); } }
class class_name[name] begin[{] method[makeTargetStringForDirectAddress, return_type[type[String]], modifier[static], parameter[address]] begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=DIRECT_ADDRESS_SCHEME, postfix_operators=[], prefix_operators=...
annotation[@] identifier[VisibleForTesting] Keyword[static] identifier[String] identifier[makeTargetStringForDirectAddress] operator[SEP] identifier[SocketAddress] identifier[address] operator[SEP] { Keyword[try] { Keyword[return] Keyword[new] identifier[URI] operator[SEP] identifier[DIRECT_ADDRESS_SC...
public static String getContent(String stringUrl) throws IOException { InputStream stream = getContentStream(stringUrl); return MyStreamUtils.readContent(stream); }
class class_name[name] begin[{] method[getContent, return_type[type[String]], modifier[public static], parameter[stringUrl]] begin[{] local_variable[type[InputStream], stream] return[call[MyStreamUtils.readContent, parameter[member[.stream]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getContent] operator[SEP] identifier[String] identifier[stringUrl] operator[SEP] Keyword[throws] identifier[IOException] { identifier[InputStream] identifier[stream] operator[=] identifier[getContentStream] operator[SEP] identifier[stringUrl] operator...
public static String join(Path path1, Path path2) { if (path2.toString().isEmpty()) { return ""; } if (!path1.isAbsolute()) { path1 = Paths.get(".", path1.toString()); } if (!path2.isAbsolute()) { path2 = Paths.get(".", path2.toString()); } Path result = path1.resolve(path...
class class_name[name] begin[{] method[join, return_type[type[String]], modifier[public static], parameter[path1, path2]] begin[{] if[call[path2.toString, parameter[]]] begin[{] return[literal[""]] else begin[{] None end[}] if[call[path1.isAbsolute, p...
Keyword[public] Keyword[static] identifier[String] identifier[join] operator[SEP] identifier[Path] identifier[path1] , identifier[Path] identifier[path2] operator[SEP] { Keyword[if] operator[SEP] identifier[path2] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] o...
private State updateStateWithBackOff(final long timeoutInNanos) { AtomicRateLimiter.State prev; AtomicRateLimiter.State next; do { prev = state.get(); next = calculateNextState(timeoutInNanos, prev); } while (!compareAndSet(prev, next)); return next; }
class class_name[name] begin[{] method[updateStateWithBackOff, return_type[type[State]], modifier[private], parameter[timeoutInNanos]] begin[{] local_variable[type[AtomicRateLimiter], prev] local_variable[type[AtomicRateLimiter], next] do[call[.compareAndSet, parameter[member[.p...
Keyword[private] identifier[State] identifier[updateStateWithBackOff] operator[SEP] Keyword[final] Keyword[long] identifier[timeoutInNanos] operator[SEP] { identifier[AtomicRateLimiter] operator[SEP] identifier[State] identifier[prev] operator[SEP] identifier[AtomicRateLimiter] operator[SEP] identifier[State] id...
public UNode toGroupedDoc(TableDefinition tableDef) { Utils.require(tableDef != null, "tableDef"); UNode resultNode = UNode.createMapNode("doc"); Set<FieldDefinition> deferredFields = new HashSet<FieldDefinition>(); for (String fieldName : getUpdatedFieldNames()) { ...
class class_name[name] begin[{] method[toGroupedDoc, return_type[type[UNode]], modifier[public], parameter[tableDef]] begin[{] call[Utils.require, parameter[binary_operation[member[.tableDef], !=, literal[null]], literal["tableDef"]]] local_variable[type[UNode], resultNode] loca...
Keyword[public] identifier[UNode] identifier[toGroupedDoc] operator[SEP] identifier[TableDefinition] identifier[tableDef] operator[SEP] { identifier[Utils] operator[SEP] identifier[require] operator[SEP] identifier[tableDef] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] identifier[UNode...
public static void closeAll(Logger log, java.io.Closeable... closeables) { for (java.io.Closeable c : closeables) { if (c != null) { try { if (log != null) { log.debug("Closing {}", c); } c.close(); } catch (Exception e) { if (log != null && ...
class class_name[name] begin[{] method[closeAll, return_type[void], modifier[public static], parameter[log, closeables]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], ...
Keyword[public] Keyword[static] Keyword[void] identifier[closeAll] operator[SEP] identifier[Logger] identifier[log] , identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[Closeable] operator[...] identifier[closeables] operator[SEP] { Keyword[for] operator[SEP] identifier[java] operator[SEP] i...
@NonNull public static Drop dropMaterializedView(@NonNull String viewName) { return dropMaterializedView(CqlIdentifier.fromCql(viewName)); }
class class_name[name] begin[{] method[dropMaterializedView, return_type[type[Drop]], modifier[public static], parameter[viewName]] begin[{] return[call[.dropMaterializedView, parameter[call[CqlIdentifier.fromCql, parameter[member[.viewName]]]]]] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[Drop] identifier[dropMaterializedView] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[viewName] operator[SEP] { Keyword[return] identifier[dropMaterializedView] operator[SEP] identifier[CqlIdentifier] oper...
private void attemptToSplit(ActiveLearningNode activeLearningNode, FoundNode foundNode){ //Increment the split ID this.splitId++; //Schedule time-out thread ScheduledFuture<?> timeOutHandler = this.executor.schedule(new AggregationTimeOutHandler(this.splitId, this.timedOutSplittingNodes), this.timeOut, ...
class class_name[name] begin[{] method[attemptToSplit, return_type[void], modifier[private], parameter[activeLearningNode, foundNode]] begin[{] THIS[member[None.splitId]] local_variable[type[ScheduledFuture], timeOutHandler] THIS[member[None.splittingNodes]call[None.put,...
Keyword[private] Keyword[void] identifier[attemptToSplit] operator[SEP] identifier[ActiveLearningNode] identifier[activeLearningNode] , identifier[FoundNode] identifier[foundNode] operator[SEP] { Keyword[this] operator[SEP] identifier[splitId] operator[++] operator[SEP] identifier[ScheduledFuture] operator[<] o...
Enumeration<String> getWarnings() { Vector<String> warnings = new Vector<String>(); Enumeration<String> warnEnum = mainSection.getWarnings(); while ( warnEnum.hasMoreElements() ) { warnings.addElement( warnEnum.nextElement() ); } return warnings.elements...
class class_name[name] begin[{] method[getWarnings, return_type[type[Enumeration]], modifier[default], parameter[]] begin[{] local_variable[type[Vector], warnings] local_variable[type[Enumeration], warnEnum] while[call[warnEnum.hasMoreElements, parameter[]]] begin[{] ...
identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[getWarnings] operator[SEP] operator[SEP] { identifier[Vector] operator[<] identifier[String] operator[>] identifier[warnings] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[String] operator[>] operator[SEP] operator...
public long[] readLongArray(final int items, final JBBPByteOrder byteOrder) throws IOException { int pos = 0; if (items < 0) { long[] buffer = new long[INITIAL_ARRAY_BUFFER_SIZE]; // till end while (hasAvailableData()) { final long next = readLong(byteOrder); if (buffer.length ...
class class_name[name] begin[{] method[readLongArray, return_type[type[long]], modifier[public], parameter[items, byteOrder]] begin[{] local_variable[type[int], pos] if[binary_operation[member[.items], <, literal[0]]] begin[{] local_variable[type[long], buffer] ...
Keyword[public] Keyword[long] operator[SEP] operator[SEP] identifier[readLongArray] operator[SEP] Keyword[final] Keyword[int] identifier[items] , Keyword[final] identifier[JBBPByteOrder] identifier[byteOrder] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[pos] operator[=] Other[...
public static int getInt(@NonNull final Context context, @AttrRes final int resourceId, final int defaultValue) { return getInt(context, -1, resourceId, defaultValue); }
class class_name[name] begin[{] method[getInt, return_type[type[int]], modifier[public static], parameter[context, resourceId, defaultValue]] begin[{] return[call[.getInt, parameter[member[.context], literal[1], member[.resourceId], member[.defaultValue]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getInt] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Context] identifier[context] , annotation[@] identifier[AttrRes] Keyword[final] Keyword[int] identifier[resourceId] , Keyword[final] Keyword[int] identifier[defaultValue] operator[...
public static String getJsonFriendlyString(String value) { if (!"null".equals(value) && JSONUtils.mayBeJSON(value)) { return "'" + value + "'"; } return value; }
class class_name[name] begin[{] method[getJsonFriendlyString, return_type[type[String]], modifier[public static], parameter[value]] begin[{] if[binary_operation[literal["null"], &&, call[JSONUtils.mayBeJSON, parameter[member[.value]]]]] begin[{] return[binary_operation[binary_operat...
Keyword[public] Keyword[static] identifier[String] identifier[getJsonFriendlyString] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[value] operator[SEP] operator[&&] identifier[JSON...
public void write(ByteCodeWriter out) throws IOException { out.writeUTF8Const(getName()); out.writeInt(_value.length); out.write(_value, 0, _value.length); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[out]] begin[{] call[out.writeUTF8Const, parameter[call[.getName, parameter[]]]] call[out.writeInt, parameter[member[_value.length]]] call[out.write, parameter[member[._va...
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[ByteCodeWriter] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[out] operator[SEP] identifier[writeUTF8Const] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] ident...
public static Set<String> getContributors(Set<String> baseContributors, ProbeTest methodAnnotation, ProbeTestClass classAnnotation) { Set<String> contributors; if (baseContributors == null) { contributors = new HashSet<>(); } else { contributors = populateContributors(baseContributors, new HashSet<String>...
class class_name[name] begin[{] method[getContributors, return_type[type[Set]], modifier[public static], parameter[baseContributors, methodAnnotation, classAnnotation]] begin[{] local_variable[type[Set], contributors] if[binary_operation[member[.baseContributors], ==, literal[null]]] be...
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[getContributors] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[baseContributors] , identifier[ProbeTest] identifier[methodAnnotation] , identifier[ProbeTestClass] identifier[clas...
private ResourcePaths.ResourcePath getPathInternal() { String resolvedPath; if (isPathAnnotationPresent()) { Path path = this.annotations.get(Path.class); if (isBlank(path.value())) { throw new IllegalArgumentException("The value of the @" + Path.class.getSimpleNa...
class class_name[name] begin[{] method[getPathInternal, return_type[type[ResourcePaths]], modifier[private], parameter[]] begin[{] local_variable[type[String], resolvedPath] if[call[.isPathAnnotationPresent, parameter[]]] begin[{] local_variable[type[Path], path] ...
Keyword[private] identifier[ResourcePaths] operator[SEP] identifier[ResourcePath] identifier[getPathInternal] operator[SEP] operator[SEP] { identifier[String] identifier[resolvedPath] operator[SEP] Keyword[if] operator[SEP] identifier[isPathAnnotationPresent] operator[SEP] operator[SEP] operator[SEP] { ...
public Object getVal(long waitTime, TimeUnit timeUnit) throws InterruptedException { if(latch.await(waitTime, timeUnit)){ return val; } else { return null; } }
class class_name[name] begin[{] method[getVal, return_type[type[Object]], modifier[public], parameter[waitTime, timeUnit]] begin[{] if[call[latch.await, parameter[member[.waitTime], member[.timeUnit]]]] begin[{] return[member[.val]] else begin[{] return[literal[n...
Keyword[public] identifier[Object] identifier[getVal] operator[SEP] Keyword[long] identifier[waitTime] , identifier[TimeUnit] identifier[timeUnit] operator[SEP] Keyword[throws] identifier[InterruptedException] { Keyword[if] operator[SEP] identifier[latch] operator[SEP] identifier[await] operator[SEP] identifier...
private boolean isAddToLoadBalancerSuspended(AutoScalingGroup asg) { List<SuspendedProcess> suspendedProcesses = asg.getSuspendedProcesses(); for (SuspendedProcess process : suspendedProcesses) { if (PROP_ADD_TO_LOAD_BALANCER.equals(process.getProcessName())) { return true; ...
class class_name[name] begin[{] method[isAddToLoadBalancerSuspended, return_type[type[boolean]], modifier[private], parameter[asg]] begin[{] local_variable[type[List], suspendedProcesses] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[...
Keyword[private] Keyword[boolean] identifier[isAddToLoadBalancerSuspended] operator[SEP] identifier[AutoScalingGroup] identifier[asg] operator[SEP] { identifier[List] operator[<] identifier[SuspendedProcess] operator[>] identifier[suspendedProcesses] operator[=] identifier[asg] operator[SEP] identifier[getSuspen...
final TreeMapEntry<K,V> getEntry(Object key) { // Offload comparator-based version for sake of performance if (comparator != null) return getEntryUsingComparator(key); if (key == null) throw new NullPointerException(); @SuppressWarnings("unchecked") Co...
class class_name[name] begin[{] method[getEntry, return_type[type[TreeMapEntry]], modifier[final], parameter[key]] begin[{] if[binary_operation[member[.comparator], !=, literal[null]]] begin[{] return[call[.getEntryUsingComparator, parameter[member[.key]]]] else begin[{] None en...
Keyword[final] identifier[TreeMapEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[getEntry] operator[SEP] identifier[Object] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[comparator] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[getEntryUsingComp...
static public String getString(String msg, char arg) { return getString(msg, new Object[] { String.valueOf(arg) }); }
class class_name[name] begin[{] method[getString, return_type[type[String]], modifier[public static], parameter[msg, arg]] begin[{] return[call[.getString, parameter[member[.msg], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(memb...
Keyword[static] Keyword[public] identifier[String] identifier[getString] operator[SEP] identifier[String] identifier[msg] , Keyword[char] identifier[arg] operator[SEP] { Keyword[return] identifier[getString] operator[SEP] identifier[msg] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { ...
public static PeriodType yearDayTime() { PeriodType type = cYDTime; if (type == null) { type = new PeriodType( "YearDayTime", new DurationFieldType[] { DurationFieldType.years(), DurationFieldType.days(), DurationFieldTy...
class class_name[name] begin[{] method[yearDayTime, return_type[type[PeriodType]], modifier[public static], parameter[]] begin[{] local_variable[type[PeriodType], type] if[binary_operation[member[.type], ==, literal[null]]] begin[{] assign[member[.type], ClassCre...
Keyword[public] Keyword[static] identifier[PeriodType] identifier[yearDayTime] operator[SEP] operator[SEP] { identifier[PeriodType] identifier[type] operator[=] identifier[cYDTime] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] Other[null] operator[SEP] { identifier[type] operat...
public static PhotoRequest photo(GeoApiContext context, String photoReference) { PhotoRequest request = new PhotoRequest(context); request.photoReference(photoReference); return request; }
class class_name[name] begin[{] method[photo, return_type[type[PhotoRequest]], modifier[public static], parameter[context, photoReference]] begin[{] local_variable[type[PhotoRequest], request] call[request.photoReference, parameter[member[.photoReference]]] return[member[.reques...
Keyword[public] Keyword[static] identifier[PhotoRequest] identifier[photo] operator[SEP] identifier[GeoApiContext] identifier[context] , identifier[String] identifier[photoReference] operator[SEP] { identifier[PhotoRequest] identifier[request] operator[=] Keyword[new] identifier[PhotoRequest] operator[SEP] iden...
public void setOptions(final Object[] aArray) { setOptions(aArray == null ? null : Arrays.asList(aArray)); }
class class_name[name] begin[{] method[setOptions, return_type[void], modifier[public], parameter[aArray]] begin[{] call[.setOptions, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=aArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]...
Keyword[public] Keyword[void] identifier[setOptions] operator[SEP] Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[aArray] operator[SEP] { identifier[setOptions] operator[SEP] identifier[aArray] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[Arrays] operator[SEP...
public void marshall(DescribeVaultOutput describeVaultOutput, ProtocolMarshaller protocolMarshaller) { if (describeVaultOutput == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeVaultOutput.ge...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[describeVaultOutput, protocolMarshaller]] begin[{] if[binary_operation[member[.describeVaultOutput], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeVaultOutput] identifier[describeVaultOutput] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeVaultOutput] operator[==] Other[null] operator[SEP] { ...
public EClass getIfcAnnotationSymbolOccurrence() { if (ifcAnnotationSymbolOccurrenceEClass == null) { ifcAnnotationSymbolOccurrenceEClass = (EClass) EPackage.Registry.INSTANCE .getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(19); } return ifcAnnotationSymbolOccurrenceEClass; }
class class_name[name] begin[{] method[getIfcAnnotationSymbolOccurrence, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcAnnotationSymbolOccurrenceEClass], ==, literal[null]]] begin[{] assign[member[.ifcAnnotationSymbolOc...
Keyword[public] identifier[EClass] identifier[getIfcAnnotationSymbolOccurrence] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcAnnotationSymbolOccurrenceEClass] operator[==] Other[null] operator[SEP] { identifier[ifcAnnotationSymbolOccurrenceEClass] operator[=] operator[SEP] ide...
public void writeClassMethods(CodeType codeType) { LogicFile recLogicFile = (LogicFile)this.getRecord(LogicFile.LOGIC_FILE_FILE); try { Set<String> methodsIncluded = new HashSet<String>(); Set<String> methodInterfaces = new HashSet<String>(); recLogicFile.close(...
class class_name[name] begin[{] method[writeClassMethods, return_type[void], modifier[public], parameter[codeType]] begin[{] local_variable[type[LogicFile], recLogicFile] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Clas...
Keyword[public] Keyword[void] identifier[writeClassMethods] operator[SEP] identifier[CodeType] identifier[codeType] operator[SEP] { identifier[LogicFile] identifier[recLogicFile] operator[=] operator[SEP] identifier[LogicFile] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifi...
public static DisconfCoreProcessor getDisconfCoreProcessorFile(WatchMgr watchMgr, FetcherMgr fetcherMgr, Registry registry) { return new DisconfFileCoreProcessorImpl(watchMgr, fetcherMgr, registry); }
class class_name[name] begin[{] method[getDisconfCoreProcessorFile, return_type[type[DisconfCoreProcessor]], modifier[public static], parameter[watchMgr, fetcherMgr, registry]] begin[{] return[ClassCreator(arguments=[MemberReference(member=watchMgr, postfix_operators=[], prefix_operators=[], qualifier=...
Keyword[public] Keyword[static] identifier[DisconfCoreProcessor] identifier[getDisconfCoreProcessorFile] operator[SEP] identifier[WatchMgr] identifier[watchMgr] , identifier[FetcherMgr] identifier[fetcherMgr] , identifier[Registry] identifier[registry] operator[SEP] { Keyword[return] Keyword[new] identifier[Di...
public static List<GatewayAddress> asList(final List<String> addressList) { if (addressList == null || addressList.size() == 0) { throw new IllegalArgumentException("addresses must not be null"); } List<GatewayAddress> list = new ArrayList<GatewayAddress>(); int id = 1; ...
class class_name[name] begin[{] method[asList, return_type[type[List]], modifier[public static], parameter[addressList]] begin[{] if[binary_operation[binary_operation[member[.addressList], ==, literal[null]], ||, binary_operation[call[addressList.size, parameter[]], ==, literal[0]]]] begin[{] ...
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[GatewayAddress] operator[>] identifier[asList] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[addressList] operator[SEP] { Keyword[if] operator[SEP] identifier[addressList] operator[==] Ot...
public String resolvePublic(String publicId, String systemId) throws MalformedURLException, IOException { String resolved = super.resolvePublic(publicId, systemId); if (resolved != null) { return resolved; } Enumeration enumt = catalogEntries.elements(); while (enumt.hasMoreElements()) ...
class class_name[name] begin[{] method[resolvePublic, return_type[type[String]], modifier[public], parameter[publicId, systemId]] begin[{] local_variable[type[String], resolved] if[binary_operation[member[.resolved], !=, literal[null]]] begin[{] return[member[.resolved]] ...
Keyword[public] identifier[String] identifier[resolvePublic] operator[SEP] identifier[String] identifier[publicId] , identifier[String] identifier[systemId] operator[SEP] Keyword[throws] identifier[MalformedURLException] , identifier[IOException] { identifier[String] identifier[resolved] operator[=] Keyword[su...
@Override public GallicWeight plus(GallicWeight a, GallicWeight b) { if (isZero(a)) return b; if (isZero(b)) return a; if (mode == RESTRICT_GALLIC) { if (SHORTLEX_ORDERING.compare(a, b) != 0) { throw new IllegalArgumentException("Trying to plus two different gallic weights, which isn't allow...
class class_name[name] begin[{] method[plus, return_type[type[GallicWeight]], modifier[public], parameter[a, b]] begin[{] if[call[.isZero, parameter[member[.a]]]] begin[{] return[member[.b]] else begin[{] None end[}] if[call[.isZero, parameter[member[.b]]]] begin...
annotation[@] identifier[Override] Keyword[public] identifier[GallicWeight] identifier[plus] operator[SEP] identifier[GallicWeight] identifier[a] , identifier[GallicWeight] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[isZero] operator[SEP] identifier[a] operator[SEP] operator[SEP] Keyword[...
public static boolean or(boolean... array) { if (ArrayUtil.isEmpty(array)) { throw new IllegalArgumentException("The Array must not be empty !"); } for (final boolean element : array) { if (element) { return true; } } return false; }
class class_name[name] begin[{] method[or, return_type[type[boolean]], modifier[public static], parameter[array]] begin[{] if[call[ArrayUtil.isEmpty, parameter[member[.array]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators...
Keyword[public] Keyword[static] Keyword[boolean] identifier[or] operator[SEP] Keyword[boolean] operator[...] identifier[array] operator[SEP] { Keyword[if] operator[SEP] identifier[ArrayUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[throw] ...
private Document toXML(Collection<ArchiveEntry> files) throws Exception { Document doc = new DOMDocument(); Element packageElement = new DOMElement("package"); doc.setRootElement(packageElement); Element infoElement = new DOMElement("infos"); packageElement.add(infoElement)...
class class_name[name] begin[{] method[toXML, return_type[type[Document]], modifier[private], parameter[files]] begin[{] local_variable[type[Document], doc] local_variable[type[Element], packageElement] call[doc.setRootElement, parameter[member[.packageElement]]] local_v...
Keyword[private] identifier[Document] identifier[toXML] operator[SEP] identifier[Collection] operator[<] identifier[ArchiveEntry] operator[>] identifier[files] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Document] identifier[doc] operator[=] Keyword[new] identifier[DOMDocument] operator[SEP]...
public static int getAStoreReg(final DismantleBytecode dbc, final int seen) { if (seen == Const.ASTORE) { return dbc.getRegisterOperand(); } if (OpcodeUtils.isAStore(seen)) { return seen - Const.ASTORE_0; } return -1; }
class class_name[name] begin[{] method[getAStoreReg, return_type[type[int]], modifier[public static], parameter[dbc, seen]] begin[{] if[binary_operation[member[.seen], ==, member[Const.ASTORE]]] begin[{] return[call[dbc.getRegisterOperand, parameter[]]] else begin[{] None ...
Keyword[public] Keyword[static] Keyword[int] identifier[getAStoreReg] operator[SEP] Keyword[final] identifier[DismantleBytecode] identifier[dbc] , Keyword[final] Keyword[int] identifier[seen] operator[SEP] { Keyword[if] operator[SEP] identifier[seen] operator[==] identifier[Const] operator[SEP] identifier[ASTOR...
public long insert(final InsertQuery query) { return runner.run(new TransactionWrapper<Long>() { public Long perform(QueryRunner queryRunner) { return queryRunner.insert(query); } }); }
class class_name[name] begin[{] method[insert, return_type[type[long]], modifier[public], parameter[query]] begin[{] return[call[runner.run, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=q...
Keyword[public] Keyword[long] identifier[insert] operator[SEP] Keyword[final] identifier[InsertQuery] identifier[query] operator[SEP] { Keyword[return] identifier[runner] operator[SEP] identifier[run] operator[SEP] Keyword[new] identifier[TransactionWrapper] operator[<] identifier[Long] operator[>] operator[SEP]...
private static ConfigurationBuilder getConfigurationBuilder(final Optional<Configuration> configuration) { if (configuration.isPresent()) { return Tang.Factory.getTang().newConfigurationBuilder(configuration.get()); } else { return Tang.Factory.getTang().newConfigurationBuilder(); } }
class class_name[name] begin[{] method[getConfigurationBuilder, return_type[type[ConfigurationBuilder]], modifier[private static], parameter[configuration]] begin[{] if[call[configuration.isPresent, parameter[]]] begin[{] return[call[Tang.Factory.getTang, parameter[]]] else ...
Keyword[private] Keyword[static] identifier[ConfigurationBuilder] identifier[getConfigurationBuilder] operator[SEP] Keyword[final] identifier[Optional] operator[<] identifier[Configuration] operator[>] identifier[configuration] operator[SEP] { Keyword[if] operator[SEP] identifier[configuration] operator[SEP] ide...
public String getString(int index) throws JSONException { Object object = this.get(index); if (object instanceof String) { return (String) object; } throw new JSONException("JSONArray[" + index + "] not a string."); }
class class_name[name] begin[{] method[getString, return_type[type[String]], modifier[public], parameter[index]] begin[{] local_variable[type[Object], object] if[binary_operation[member[.object], instanceof, type[String]]] begin[{] return[Cast(expression=MemberReference(memb...
Keyword[public] identifier[String] identifier[getString] operator[SEP] Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[JSONException] { identifier[Object] identifier[object] operator[=] Keyword[this] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP]...
public void beginDelete(String resourceGroupName, String containerServiceName) { beginDeleteWithServiceResponseAsync(resourceGroupName, containerServiceName).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginDelete, return_type[void], modifier[public], parameter[resourceGroupName, containerServiceName]] begin[{] call[.beginDeleteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.containerServiceName]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[beginDelete] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[containerServiceName] operator[SEP] { identifier[beginDeleteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[containerServiceNam...
public static <T> CloseableIterable<T> concat(final CloseableIterable<? extends Iterable<? extends T>> inputs) { return wrap(Iterables.concat(inputs), inputs); }
class class_name[name] begin[{] method[concat, return_type[type[CloseableIterable]], modifier[public static], parameter[inputs]] begin[{] return[call[.wrap, parameter[call[Iterables.concat, parameter[member[.inputs]]], member[.inputs]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CloseableIterable] operator[<] identifier[T] operator[>] identifier[concat] operator[SEP] Keyword[final] identifier[CloseableIterable] operator[<] operator[?] Keyword[extends] identifier[Iterable] operator[<] operator[?] Keyword[extends] i...
public Document create(@NonNull String content, @NonNull Language language, @NonNull Map<AttributeType, ?> attributeMap) { return create("", content, language, attributeMap); }
class class_name[name] begin[{] method[create, return_type[type[Document]], modifier[public], parameter[content, language, attributeMap]] begin[{] return[call[.create, parameter[literal[""], member[.content], member[.language], member[.attributeMap]]]] end[}] END[}]
Keyword[public] identifier[Document] identifier[create] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[content] , annotation[@] identifier[NonNull] identifier[Language] identifier[language] , annotation[@] identifier[NonNull] identifier[Map] operator[<] identifier[AttributeType] , oper...
public <T> List<T> unmarshalList(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException { ObjectMapper objectMapper = getContext(null); CollectionType javaType = objectMapper.getTypeFactory().constructCollectionType(List.class, returnType); return (objec...
class class_name[name] begin[{] method[unmarshalList, return_type[type[List]], modifier[public], parameter[returnType, reader]] begin[{] local_variable[type[ObjectMapper], objectMapper] local_variable[type[CollectionType], javaType] return[call[objectMapper.readValue, parameter[member[....
Keyword[public] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[unmarshalList] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[returnType] , identifier[Reader] identifier[reader] operator[SEP] Keyword[throws] identifier[JsonParseE...
private void cleanPipes() { assert (pipe != null); // Get rid of half-processed messages in the out pipe. Flush any // unflushed messages upstream. pipe.rollback(); pipe.flush(); // Remove any half-read message from the in pipe. while (incompleteIn) { ...
class class_name[name] begin[{] method[cleanPipes, return_type[void], modifier[private], parameter[]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=pipe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], pre...
Keyword[private] Keyword[void] identifier[cleanPipes] operator[SEP] operator[SEP] { Keyword[assert] operator[SEP] identifier[pipe] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[pipe] operator[SEP] identifier[rollback] operator[SEP] operator[SEP] operator[SEP] identifier[pipe] operator[SEP] iden...
public static <T extends TypeDescription> ElementMatcher.Junction<T> hasSuperType(ElementMatcher<? super TypeDescription> matcher) { return hasGenericSuperType(erasure(matcher)); }
class class_name[name] begin[{] method[hasSuperType, return_type[type[ElementMatcher]], modifier[public static], parameter[matcher]] begin[{] return[call[.hasGenericSuperType, parameter[call[.erasure, parameter[member[.matcher]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[TypeDescription] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[hasSuperType] operator[SEP] identifier[ElementMatcher] operator[<] operator[?] Keyword[super] ...
public void marshall(ConnectionPasswordEncryption connectionPasswordEncryption, ProtocolMarshaller protocolMarshaller) { if (connectionPasswordEncryption == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.mars...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[connectionPasswordEncryption, protocolMarshaller]] begin[{] if[binary_operation[member[.connectionPasswordEncryption], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ConnectionPasswordEncryption] identifier[connectionPasswordEncryption] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[connectionPasswordEncryption] operator[==] Other...
public static Iterable<VcfSample> samples(final File file) throws IOException { checkNotNull(file); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return samples(reader); } }
class class_name[name] begin[{] method[samples, return_type[type[Iterable]], modifier[public static], parameter[file]] begin[{] call[.checkNotNull, parameter[member[.file]]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix...
Keyword[public] Keyword[static] identifier[Iterable] operator[<] identifier[VcfSample] operator[>] identifier[samples] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { identifier[checkNotNull] operator[SEP] identifier[file] operator[SEP] opera...
@Deprecated public static <T> Callable<T> continueRequest(Callable<T> callable, Map<Key<?>, Object> seedMap) { return wrap(callable, continueRequest(seedMap)); }
class class_name[name] begin[{] method[continueRequest, return_type[type[Callable]], modifier[public static], parameter[callable, seedMap]] begin[{] return[call[.wrap, parameter[member[.callable], call[.continueRequest, parameter[member[.seedMap]]]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Callable] operator[<] identifier[T] operator[>] identifier[continueRequest] operator[SEP] identifier[Callable] operator[<] identifier[T] operator[>] identifier[callable] , identifier[Map] operator[<] i...
public static SequenceBatchCSVRecord fromWritables(List<List<List<Writable>>> input) { SequenceBatchCSVRecord ret = new SequenceBatchCSVRecord(); for(int i = 0; i < input.size(); i++) { ret.add(Arrays.asList(BatchCSVRecord.fromWritables(input.get(i)))); } return ret; }
class class_name[name] begin[{] method[fromWritables, return_type[type[SequenceBatchCSVRecord]], modifier[public static], parameter[input]] begin[{] local_variable[type[SequenceBatchCSVRecord], ret] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodIn...
Keyword[public] Keyword[static] identifier[SequenceBatchCSVRecord] identifier[fromWritables] operator[SEP] identifier[List] operator[<] identifier[List] operator[<] identifier[List] operator[<] identifier[Writable] operator[>] operator[>] operator[>] identifier[input] operator[SEP] { identifier[SequenceBatchCSVR...
protected final int doWrite0(ChannelOutboundBuffer in) throws Exception { Object msg = in.current(); if (msg == null) { // Directly return here so incompleteWrite(...) is not called. return 0; } return doWriteInternal(in, in.current()); }
class class_name[name] begin[{] method[doWrite0, return_type[type[int]], modifier[final protected], parameter[in]] begin[{] local_variable[type[Object], msg] if[binary_operation[member[.msg], ==, literal[null]]] begin[{] return[literal[0]] else begin[{] None ...
Keyword[protected] Keyword[final] Keyword[int] identifier[doWrite0] operator[SEP] identifier[ChannelOutboundBuffer] identifier[in] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Object] identifier[msg] operator[=] identifier[in] operator[SEP] identifier[current] operator[SEP] operator[SEP] oper...
public static ByteBuffer putTimeOnlyAsString(ByteBuffer buffer, long value) { buffer = putTimeOnlyAsString(buffer, value, true); return buffer; }
class class_name[name] begin[{] method[putTimeOnlyAsString, return_type[type[ByteBuffer]], modifier[public static], parameter[buffer, value]] begin[{] assign[member[.buffer], call[.putTimeOnlyAsString, parameter[member[.buffer], member[.value], literal[true]]]] return[member[.buffer]] ...
Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[putTimeOnlyAsString] operator[SEP] identifier[ByteBuffer] identifier[buffer] , Keyword[long] identifier[value] operator[SEP] { identifier[buffer] operator[=] identifier[putTimeOnlyAsString] operator[SEP] identifier[buffer] , identifier[value] , ...
public SDVariable lte(String name, SDVariable other){ return sameDiff.lte(name, this, other); }
class class_name[name] begin[{] method[lte, return_type[type[SDVariable]], modifier[public], parameter[name, other]] begin[{] return[call[sameDiff.lte, parameter[member[.name], THIS[], member[.other]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[lte] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[other] operator[SEP] { Keyword[return] identifier[sameDiff] operator[SEP] identifier[lte] operator[SEP] identifier[name] , Keyword[this] , identifier[other] operator[SEP...
public static <T1, T2, T3> Consumer<Tuple3<T1, T2, T3>> consumer(Consumer3<T1, T2, T3> consumer) { return tuple -> consumer.accept(tuple.getT1(), tuple.getT2(), tuple.getT3()); }
class class_name[name] begin[{] method[consumer, return_type[type[Consumer]], modifier[public static], parameter[consumer]] begin[{] return[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getT1, postfix_operators=[], prefix_operators=[], qualifier=tuple, selector...
Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[T3] operator[>] identifier[Consumer] operator[<] identifier[Tuple3] operator[<] identifier[T1] , identifier[T2] , identifier[T3] operator[>] operator[>] identifier[consumer] operator[SEP] identifier[Consumer3] operator[<] ident...
@Override public boolean cancelOrder(String orderId) throws IOException { CurrencyPair cp = (CurrencyPair) exchange .getExchangeSpecification() .getExchangeSpecificParameters() .get(TheRockExchange.CURRENCY_PAIR); if (cp == null) { thro...
class class_name[name] begin[{] method[cancelOrder, return_type[type[boolean]], modifier[public], parameter[orderId]] begin[{] local_variable[type[CurrencyPair], cp] if[binary_operation[member[.cp], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(argument...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[cancelOrder] operator[SEP] identifier[String] identifier[orderId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[CurrencyPair] identifier[cp] operator[=] operator[SEP] identifier[CurrencyPair] operator[SEP] identif...
public synchronized void reloadRulebase() throws RuleBaseException { long start = System.currentTimeMillis(); reloadDeclarations(); packageStrings.clear(); for (RuleBaseElementId id : manager.listAll(RuleBaseElementType.Function)) { String packageName = id.getPackageName(); ...
class class_name[name] begin[{] method[reloadRulebase, return_type[void], modifier[synchronized public], parameter[]] begin[{] local_variable[type[long], start] call[.reloadDeclarations, parameter[]] call[packageStrings.clear, parameter[]] ForStatement(body=Block...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[reloadRulebase] operator[SEP] operator[SEP] Keyword[throws] identifier[RuleBaseException] { Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifie...
public void setPattern(Tag tag, String regex) { if (Strings.isNullOrEmpty(regex)) { this.rawPatterns.remove(tag); this.compiledPatterns.remove(tag); } else { this.rawPatterns.put(tag, regex); this.compiledPatterns.put(tag, Pattern.compile("^\\s*" + regex, PATTERN_COMPILE_OPTIONS)); //$NON-NLS-1$ ...
class class_name[name] begin[{] method[setPattern, return_type[void], modifier[public], parameter[tag, regex]] begin[{] if[call[Strings.isNullOrEmpty, parameter[member[.regex]]]] begin[{] THIS[member[None.rawPatterns]call[None.remove, parameter[member[.tag]]]] ...
Keyword[public] Keyword[void] identifier[setPattern] operator[SEP] identifier[Tag] identifier[tag] , identifier[String] identifier[regex] operator[SEP] { Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[regex] operator[SEP] operator[SEP] { ...
public static String getDescription(Class<?> comp, Locale loc) { Description descr = (Description) comp.getAnnotation(Description.class); if (descr != null) { String lang = loc.getLanguage(); Method[] m = descr.getClass().getMethods(); for (Method method : m) { // ...
class class_name[name] begin[{] method[getDescription, return_type[type[String]], modifier[public static], parameter[comp, loc]] begin[{] local_variable[type[Description], descr] if[binary_operation[member[.descr], !=, literal[null]]] begin[{] local_variable[type[String], la...
Keyword[public] Keyword[static] identifier[String] identifier[getDescription] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[comp] , identifier[Locale] identifier[loc] operator[SEP] { identifier[Description] identifier[descr] operator[=] operator[SEP] identifier[Description] oper...
public Date createDate(String dateString) throws ParseException { Date result = null; synchronized (cFormatter) { result = cFormatter.parse(dateString); } return result; }
class class_name[name] begin[{] method[createDate, return_type[type[Date]], modifier[public], parameter[dateString]] begin[{] local_variable[type[Date], result] SYNCHRONIZED[member[.cFormatter]] BEGIN[{] assign[member[.result], call[cFormatter.parse, parameter[me...
Keyword[public] identifier[Date] identifier[createDate] operator[SEP] identifier[String] identifier[dateString] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[Date] identifier[result] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[cFormatter] operator[...
@Override public boolean importGeoPackage(String database, InputStream stream) { return importGeoPackage(database, stream, false, null); }
class class_name[name] begin[{] method[importGeoPackage, return_type[type[boolean]], modifier[public], parameter[database, stream]] begin[{] return[call[.importGeoPackage, parameter[member[.database], member[.stream], literal[false], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[importGeoPackage] operator[SEP] identifier[String] identifier[database] , identifier[InputStream] identifier[stream] operator[SEP] { Keyword[return] identifier[importGeoPackage] operator[SEP] identifier[database] , identifier[stream...
public static MSColor valueOfKnownColor(final String name) { for(MSColor color : KNOWN_COLORS) { if(color.name.equalsIgnoreCase(name)) { return color; } else if(color.getLocaleName() != null && color.getLocaleName().equalsIgnoreCase(name)) ...
class class_name[name] begin[{] method[valueOfKnownColor, return_type[type[MSColor]], modifier[public static], parameter[name]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_o...
Keyword[public] Keyword[static] identifier[MSColor] identifier[valueOfKnownColor] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[for] operator[SEP] identifier[MSColor] identifier[color] operator[:] identifier[KNOWN_COLORS] operator[SEP] { Keyword[if] operator...
public static Font getFont (int style, Size size) { return getFont(getDefaultFont(), size).deriveFont(style); }
class class_name[name] begin[{] method[getFont, return_type[type[Font]], modifier[public static], parameter[style, size]] begin[{] return[call[.getFont, parameter[call[.getDefaultFont, parameter[]], member[.size]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Font] identifier[getFont] operator[SEP] Keyword[int] identifier[style] , identifier[Size] identifier[size] operator[SEP] { Keyword[return] identifier[getFont] operator[SEP] identifier[getDefaultFont] operator[SEP] operator[SEP] , identifier[size] operator[SEP] operato...
public void unreserve(final T bagEntry) { if (bagEntry.compareAndSet(STATE_RESERVED, STATE_NOT_IN_USE)) { // spin until a thread takes it or none are waiting while (waiters.get() > 0 && !handoffQueue.offer(bagEntry)) { yield(); } } else { LOGGER.warn(...
class class_name[name] begin[{] method[unreserve, return_type[void], modifier[public], parameter[bagEntry]] begin[{] if[call[bagEntry.compareAndSet, parameter[member[.STATE_RESERVED], member[.STATE_NOT_IN_USE]]]] begin[{] while[binary_operation[binary_operation[call[wait...
Keyword[public] Keyword[void] identifier[unreserve] operator[SEP] Keyword[final] identifier[T] identifier[bagEntry] operator[SEP] { Keyword[if] operator[SEP] identifier[bagEntry] operator[SEP] identifier[compareAndSet] operator[SEP] identifier[STATE_RESERVED] , identifier[STATE_NOT_IN_USE] operator[SEP] operato...
private Table buildRtfTable(int type) throws DocumentException { List<Band> bands = new ArrayList<Band>(); if (type == 1) { bands.add(getReportLayout().getPageHeaderBand()); } else if (type == 2) { bands.add(getReportLayout().getPageFooterBand()); } else { bands = getReportLayout().getDocumentBands(); ...
class class_name[name] begin[{] method[buildRtfTable, return_type[type[Table]], modifier[private], parameter[type]] begin[{] local_variable[type[List], bands] if[binary_operation[member[.type], ==, literal[1]]] begin[{] call[bands.add, parameter[call[.getReportLa...
Keyword[private] identifier[Table] identifier[buildRtfTable] operator[SEP] Keyword[int] identifier[type] operator[SEP] Keyword[throws] identifier[DocumentException] { identifier[List] operator[<] identifier[Band] operator[>] identifier[bands] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[...
private final T get(int index, List<T> array) { while (index >= array.size()) { array.add(this.createNode()); } return array.get(index); }
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[final private], parameter[index, array]] begin[{] while[binary_operation[member[.index], >=, call[array.size, parameter[]]]] begin[{] call[array.add, parameter[THIS[call[None.createNode, parameter...
Keyword[private] Keyword[final] identifier[T] identifier[get] operator[SEP] Keyword[int] identifier[index] , identifier[List] operator[<] identifier[T] operator[>] identifier[array] operator[SEP] { Keyword[while] operator[SEP] identifier[index] operator[>=] identifier[array] operator[SEP] identifier[size] opera...
@Override public V replace(K key, V value) { return rMap.replace(key, value); }
class class_name[name] begin[{] method[replace, return_type[type[V]], modifier[public], parameter[key, value]] begin[{] return[call[rMap.replace, parameter[member[.key], member[.value]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[V] identifier[replace] operator[SEP] identifier[K] identifier[key] , identifier[V] identifier[value] operator[SEP] { Keyword[return] identifier[rMap] operator[SEP] identifier[replace] operator[SEP] identifier[key] , identifier[value] operator[SEP] o...
public void end(Point p) { lastPt.x = endPt.x = p.x; lastPt.y = endPt.y = p.y; Graphics2D g = (Graphics2D) component.getGraphics(); if(g != null) { try { g.setXORMode(component.getBackground()); drawLast(g); } finally { g.dispose(); } } }
class class_name[name] begin[{] method[end, return_type[void], modifier[public], parameter[p]] begin[{] assign[member[lastPt.x], assign[member[endPt.x], member[p.x]]] assign[member[lastPt.y], assign[member[endPt.y], member[p.y]]] local_variable[type[Graphics2D], g] ...
Keyword[public] Keyword[void] identifier[end] operator[SEP] identifier[Point] identifier[p] operator[SEP] { identifier[lastPt] operator[SEP] identifier[x] operator[=] identifier[endPt] operator[SEP] identifier[x] operator[=] identifier[p] operator[SEP] identifier[x] operator[SEP] identifier[lastPt] operator[SEP]...
@OneToMany(targetEntity = CountryElement.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "COUNTRY_COUNTRIES_ELEMENT_HJ_0") public List<CountryElement> getCountry() { return this.country; }
class class_name[name] begin[{] method[getCountry, return_type[type[List]], modifier[public], parameter[]] begin[{] return[THIS[member[None.country]]] end[}] END[}]
annotation[@] identifier[OneToMany] operator[SEP] identifier[targetEntity] operator[=] identifier[CountryElement] operator[SEP] Keyword[class] , identifier[cascade] operator[=] { identifier[CascadeType] operator[SEP] identifier[ALL] } operator[SEP] annotation[@] identifier[JoinColumn] operator[SEP] identifie...
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "OrientableSurface", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_Surface") public JAXBElement<OrientableSurfaceType> createOrientableSurface(OrientableSurfaceType value) { return new JAXBElement<Orientabl...
class class_name[name] begin[{] method[createOrientableSurface, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_OrientableSurface_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReferen...
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] iden...
public String getValue(final String field) { FieldValue fieldValue = Iterables.find ( fieldValues, new Predicate<FieldValue>() { @Override public boolean apply(FieldValue fv) { return fv.getField(...
class class_name[name] begin[{] method[getValue, return_type[type[String]], modifier[public], parameter[field]] begin[{] local_variable[type[FieldValue], fieldValue] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=fieldValue, postfix_operators=[], prefix_opera...
Keyword[public] identifier[String] identifier[getValue] operator[SEP] Keyword[final] identifier[String] identifier[field] operator[SEP] { identifier[FieldValue] identifier[fieldValue] operator[=] identifier[Iterables] operator[SEP] identifier[find] operator[SEP] identifier[fieldValues] , Keyword[new] identifier...
protected String eval(final Object[] _values) { final String ret; if ((_values == null) || (_values.length == 0) || (_values[0] == null)) { ret = null; } else if (_values[0] instanceof String) { ret = (String) _values[0]; } else if (_values[0] != null) { ...
class class_name[name] begin[{] method[eval, return_type[type[String]], modifier[protected], parameter[_values]] begin[{] local_variable[type[String], ret] if[binary_operation[binary_operation[binary_operation[member[._values], ==, literal[null]], ||, binary_operation[member[_values.len...
Keyword[protected] identifier[String] identifier[eval] operator[SEP] Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[_values] operator[SEP] { Keyword[final] identifier[String] identifier[ret] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[_values] operator[==] Other[nul...
@Override public void onNext(CreateLocalBlockRequest request) { final String methodName = request.getOnlyReserveSpace() ? "ReserveSpace" : "CreateBlock"; RpcUtils.streamingRPCAndLog(LOG, new RpcUtils.StreamingRpcCallable<CreateLocalBlockResponse>() { @Override public CreateLocalBlockResponse call(...
class class_name[name] begin[{] method[onNext, return_type[void], modifier[public], parameter[request]] begin[{] local_variable[type[String], methodName] call[RpcUtils.streamingRPCAndLog, parameter[member[.LOG], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onNext] operator[SEP] identifier[CreateLocalBlockRequest] identifier[request] operator[SEP] { Keyword[final] identifier[String] identifier[methodName] operator[=] identifier[request] operator[SEP] identifier[getOnlyReserveSpace] operator...
public void renderInline(String text, Map<String, Object> parameters, Writer out, GlobalScope... extraGlobalScopes) throws IOException, ParseException { render(loadInline(text), parameters, out, extraGlobalScopes); }
class class_name[name] begin[{] method[renderInline, return_type[void], modifier[public], parameter[text, parameters, out, extraGlobalScopes]] begin[{] call[.render, parameter[call[.loadInline, parameter[member[.text]]], member[.parameters], member[.out], member[.extraGlobalScopes]]] end[}]...
Keyword[public] Keyword[void] identifier[renderInline] operator[SEP] identifier[String] identifier[text] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] , identifier[Writer] identifier[out] , identifier[GlobalScope] operator[...] identifier[extraGlobalScopes]...
@Override public Acceptance lookup(Word<? extends I> word) { State s = getState(word); if (s == null) { return Acceptance.DONT_KNOW; } return s.getAcceptance(); }
class class_name[name] begin[{] method[lookup, return_type[type[Acceptance]], modifier[public], parameter[word]] begin[{] local_variable[type[State], s] if[binary_operation[member[.s], ==, literal[null]]] begin[{] return[member[Acceptance.DONT_KNOW]] else begin[{] No...
annotation[@] identifier[Override] Keyword[public] identifier[Acceptance] identifier[lookup] operator[SEP] identifier[Word] operator[<] operator[?] Keyword[extends] identifier[I] operator[>] identifier[word] operator[SEP] { identifier[State] identifier[s] operator[=] identifier[getState] operator[SEP] identifier...
public synchronized void serverChanged(final HadoopServer location, final int type) { switch (type) { case ServerRegistry.SERVER_STATE_CHANGED: { this.provider.refresh(map.get(location)); break; } case ServerRegistry.SERVER_ADDED: { DFSLocation dfsLoc = new DFSLocat...
class class_name[name] begin[{] method[serverChanged, return_type[void], modifier[synchronized public], parameter[location, type]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SERVER_STATE_CHANGED, postfix_operators=[], prefix_operators=[], qualifier=ServerRegistry, ...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[serverChanged] operator[SEP] Keyword[final] identifier[HadoopServer] identifier[location] , Keyword[final] Keyword[int] identifier[type] operator[SEP] { Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifi...
private static boolean containsGreekLetter(String s) { Matcher m = biogreek.matcher(s); return m.find(); }
class class_name[name] begin[{] method[containsGreekLetter, return_type[type[boolean]], modifier[private static], parameter[s]] begin[{] local_variable[type[Matcher], m] return[call[m.find, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[containsGreekLetter] operator[SEP] identifier[String] identifier[s] operator[SEP] { identifier[Matcher] identifier[m] operator[=] identifier[biogreek] operator[SEP] identifier[matcher] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[ret...
public static AcceptStatus fromValue(int value) { AcceptStatus status = VALUES.get(value); if (status == null) { status = new AcceptStatus(value); VALUES.put(value, status); } return status; }
class class_name[name] begin[{] method[fromValue, return_type[type[AcceptStatus]], modifier[public static], parameter[value]] begin[{] local_variable[type[AcceptStatus], status] if[binary_operation[member[.status], ==, literal[null]]] begin[{] assign[member[.stat...
Keyword[public] Keyword[static] identifier[AcceptStatus] identifier[fromValue] operator[SEP] Keyword[int] identifier[value] operator[SEP] { identifier[AcceptStatus] identifier[status] operator[=] identifier[VALUES] operator[SEP] identifier[get] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[...
public BinarySparseDataset parse(String name, InputStream stream) throws IOException, ParseException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) { BinarySparseDataset sparse = new BinarySparseDataset(name); String line = reader.readLine(); ...
class class_name[name] begin[{] method[parse, return_type[type[BinarySparseDataset]], modifier[public], parameter[name, stream]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(membe...
Keyword[public] identifier[BinarySparseDataset] identifier[parse] operator[SEP] identifier[String] identifier[name] , identifier[InputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ParseException] { Keyword[try] operator[SEP] identifier[BufferedReader] identifier[...
public static Config loadConfig(String heronHome, String configPath, String releaseFile, String overrideConfigFile) { Config defaultConfig = loadDefaults(heronHome, configPath); Config localConfig = Config.toLocalMode(defaultConfig); //to token-substitute the conf paths Co...
class class_name[name] begin[{] method[loadConfig, return_type[type[Config]], modifier[public static], parameter[heronHome, configPath, releaseFile, overrideConfigFile]] begin[{] local_variable[type[Config], defaultConfig] local_variable[type[Config], localConfig] local_variable[type[Co...
Keyword[public] Keyword[static] identifier[Config] identifier[loadConfig] operator[SEP] identifier[String] identifier[heronHome] , identifier[String] identifier[configPath] , identifier[String] identifier[releaseFile] , identifier[String] identifier[overrideConfigFile] operator[SEP] { identifier[Config] ident...
public static String getOneofNotSetConstantName(Oneof oneof) { String name = oneof.getName(); String underscored = Formatter.toUnderscoreCase(name); return Formatter.toUpperCase(underscored) + "_NOT_SET"; }
class class_name[name] begin[{] method[getOneofNotSetConstantName, return_type[type[String]], modifier[public static], parameter[oneof]] begin[{] local_variable[type[String], name] local_variable[type[String], underscored] return[binary_operation[call[Formatter.toUpperCase, parameter[me...
Keyword[public] Keyword[static] identifier[String] identifier[getOneofNotSetConstantName] operator[SEP] identifier[Oneof] identifier[oneof] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[oneof] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Stri...