code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private int getSlotCount(int memory, int vcores) { int cpuports = (int) Math.ceil(vcores / JOYConstants.JSTORM_VCORE_WEIGHT); int memoryports = (int) Math.floor(memory / JOYConstants.JSTORM_MEMORY_WEIGHT); // return cpuports > memoryports ? memoryports : cpuports; return memoryports; ...
class class_name[name] begin[{] method[getSlotCount, return_type[type[int]], modifier[private], parameter[memory, vcores]] begin[{] local_variable[type[int], cpuports] local_variable[type[int], memoryports] return[member[.memoryports]] end[}] END[}]
Keyword[private] Keyword[int] identifier[getSlotCount] operator[SEP] Keyword[int] identifier[memory] , Keyword[int] identifier[vcores] operator[SEP] { Keyword[int] identifier[cpuports] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[v...
private RenditionMetadata getExactMatchRendition(final Set<RenditionMetadata> candidates, MediaArgs mediaArgs) { // check for fixed width and/or height request if (mediaArgs.getFixedWidth() > 0 || mediaArgs.getFixedHeight() > 0) { for (RenditionMetadata candidate : candidates) { if (candidate.matc...
class class_name[name] begin[{] method[getExactMatchRendition, return_type[type[RenditionMetadata]], modifier[private], parameter[candidates, mediaArgs]] begin[{] if[binary_operation[binary_operation[call[mediaArgs.getFixedWidth, parameter[]], >, literal[0]], ||, binary_operation[call[mediaArgs...
Keyword[private] identifier[RenditionMetadata] identifier[getExactMatchRendition] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[RenditionMetadata] operator[>] identifier[candidates] , identifier[MediaArgs] identifier[mediaArgs] operator[SEP] { Keyword[if] operator[SEP] identifier[mediaArgs...
protected void decodeFilters(final FacesContext context, final Sheet sheet, final Map<String, String> params, final String clientId) { int renderCol = 0; for (final SheetColumn column : sheet.getColumns()) { if (!column.isRendered()) { continue; } ...
class class_name[name] begin[{] method[decodeFilters, return_type[void], modifier[protected], parameter[context, sheet, params, clientId]] begin[{] local_variable[type[int], renderCol] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], ...
Keyword[protected] Keyword[void] identifier[decodeFilters] operator[SEP] Keyword[final] identifier[FacesContext] identifier[context] , Keyword[final] identifier[Sheet] identifier[sheet] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] , Keyword[fina...
public static Alignment<NucleotideSequence> alignSemiLocalLeft(LinearGapAlignmentScoring scoring, NucleotideSequence seq1, NucleotideSequence seq2, int offset1, int length1, int offset2, int length2, ...
class class_name[name] begin[{] method[alignSemiLocalLeft, return_type[type[Alignment]], modifier[public static], parameter[scoring, seq1, seq2, offset1, length1, offset2, length2, width, stopPenalty]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator...
Keyword[public] Keyword[static] identifier[Alignment] operator[<] identifier[NucleotideSequence] operator[>] identifier[alignSemiLocalLeft] operator[SEP] identifier[LinearGapAlignmentScoring] identifier[scoring] , identifier[NucleotideSequence] identifier[seq1] , identifier[NucleotideSequence] identifier[seq2] , Key...
public Iterable<Map.Entry<Integer, Record>> entries() { return () -> new Iterator<Map.Entry<Integer, Record>>() { private final Iterator<Map.Entry<Integer, Record>> it = data.records.entrySet().iterator(); /** {@inheritDoc} */ @Override public boolean hasNext() {...
class class_name[name] begin[{] method[entries, return_type[type[Iterable]], modifier[public], parameter[]] begin[{] return[LambdaExpression(body=ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], m...
Keyword[public] identifier[Iterable] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Integer] , identifier[Record] operator[>] operator[>] identifier[entries] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] operator[->] Keyword[new] identifier[Iterato...
public int getPosition(String fieldName) { Integer index = nameFieldIndexLookup.get(fieldName); if (index == null) { return -1; } return index; }
class class_name[name] begin[{] method[getPosition, return_type[type[int]], modifier[public], parameter[fieldName]] begin[{] local_variable[type[Integer], index] if[binary_operation[member[.index], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None ...
Keyword[public] Keyword[int] identifier[getPosition] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] { identifier[Integer] identifier[index] operator[=] identifier[nameFieldIndexLookup] operator[SEP] identifier[get] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] Keyword[if] ...
@Override public void onModuleLoad() { ScriptInjector.fromString(GwtBootstrap3ClientBundle.INSTANCE.gwtBootstrap3().getText()) .setWindow(ScriptInjector.TOP_WINDOW) .inject(); if (!isjQueryLoaded()) { ScriptInjector.fromString(GwtBootstrap3ClientBundle.INS...
class class_name[name] begin[{] method[onModuleLoad, return_type[void], modifier[public], parameter[]] begin[{] call[ScriptInjector.fromString, parameter[call[GwtBootstrap3ClientBundle.INSTANCE.gwtBootstrap3, parameter[]]]] if[call[.isjQueryLoaded, parameter[]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onModuleLoad] operator[SEP] operator[SEP] { identifier[ScriptInjector] operator[SEP] identifier[fromString] operator[SEP] identifier[GwtBootstrap3ClientBundle] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[gwtBootstrap3] op...
public static <V> ListenableFuture<V> withFallback( ListenableFuture<? extends V> input, FutureFallback<? extends V> fallback, Executor executor) { checkNotNull(fallback); return new FallbackFuture<V>(input, fallback, executor); }
class class_name[name] begin[{] method[withFallback, return_type[type[ListenableFuture]], modifier[public static], parameter[input, fallback, executor]] begin[{] call[.checkNotNull, parameter[member[.fallback]]] return[ClassCreator(arguments=[MemberReference(member=input, postfix_operat...
Keyword[public] Keyword[static] operator[<] identifier[V] operator[>] identifier[ListenableFuture] operator[<] identifier[V] operator[>] identifier[withFallback] operator[SEP] identifier[ListenableFuture] operator[<] operator[?] Keyword[extends] identifier[V] operator[>] identifier[input] , identifier[FutureFallback] ...
public static StringBuilder appendMd5DigestAsHex(InputStream inputStream, StringBuilder builder) throws IOException { return appendDigestAsHex(MD5_ALGORITHM_NAME, inputStream, builder); }
class class_name[name] begin[{] method[appendMd5DigestAsHex, return_type[type[StringBuilder]], modifier[public static], parameter[inputStream, builder]] begin[{] return[call[.appendDigestAsHex, parameter[member[.MD5_ALGORITHM_NAME], member[.inputStream], member[.builder]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[StringBuilder] identifier[appendMd5DigestAsHex] operator[SEP] identifier[InputStream] identifier[inputStream] , identifier[StringBuilder] identifier[builder] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[appendDigestAsHex] operator[...
public static TraceComponent register(Class<?> aClass, String group, String bundle) { TraceComponent tc = new TraceComponent(aClass.getName(), aClass, group, bundle); registerTraceComponent(tc); return tc; }
class class_name[name] begin[{] method[register, return_type[type[TraceComponent]], modifier[public static], parameter[aClass, group, bundle]] begin[{] local_variable[type[TraceComponent], tc] call[.registerTraceComponent, parameter[member[.tc]]] return[member[.tc]] end[}] E...
Keyword[public] Keyword[static] identifier[TraceComponent] identifier[register] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[aClass] , identifier[String] identifier[group] , identifier[String] identifier[bundle] operator[SEP] { identifier[TraceComponent] identifier[tc] operato...
public static final String formatTime(long timestamp, boolean useIsoDateFormat) { DateFormat df = dateformats.get(); if (df == null) { df = getDateFormat(); dateformats.set(df); } try { // Get and store the locale Date pattern that was retrieved from ...
class class_name[name] begin[{] method[formatTime, return_type[type[String]], modifier[final public static], parameter[timestamp, useIsoDateFormat]] begin[{] local_variable[type[DateFormat], df] if[binary_operation[member[.df], ==, literal[null]]] begin[{] assign...
Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[formatTime] operator[SEP] Keyword[long] identifier[timestamp] , Keyword[boolean] identifier[useIsoDateFormat] operator[SEP] { identifier[DateFormat] identifier[df] operator[=] identifier[dateformats] operator[SEP] identifier[get] opera...
public String[] arrayUnescapeJava(final Object[] target) { if (target == null) { return null; } final String[] result = new String[target.length]; for (int i = 0; i < target.length; i++) { result[i] = unescapeJava(target[i]); } return result; }
class class_name[name] begin[{] method[arrayUnescapeJava, return_type[type[String]], modifier[public], parameter[target]] begin[{] if[binary_operation[member[.target], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable...
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[arrayUnescapeJava] operator[SEP] Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[target] operator[SEP] { Keyword[if] operator[SEP] identifier[target] operator[==] Other[null] operator[SEP] { Keyword[retu...
public void addBodyFileUpload(String name, String filename, File file, String contentType, boolean isText) throws ErrorDataEncoderException { checkNotNull(name, "name"); checkNotNull(file, "file"); if (filename == null) { filename = StringUtil.EMPTY_STRING; } ...
class class_name[name] begin[{] method[addBodyFileUpload, return_type[void], modifier[public], parameter[name, filename, file, contentType, isText]] begin[{] call[.checkNotNull, parameter[member[.name], literal["name"]]] call[.checkNotNull, parameter[member[.file], literal["file...
Keyword[public] Keyword[void] identifier[addBodyFileUpload] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[filename] , identifier[File] identifier[file] , identifier[String] identifier[contentType] , Keyword[boolean] identifier[isText] operator[SEP] Keyword[throws] identifier[Erro...
public boolean authenticateAndAuthorize(String resource, String credentials, AuthHandler.Permissions level) throws AuthenticationException { Preconditions.checkNotNull(credentials, "credentials"); boolean retVal = false; try { String[] parts = extractMethodAndToken(credentials); ...
class class_name[name] begin[{] method[authenticateAndAuthorize, return_type[type[boolean]], modifier[public], parameter[resource, credentials, level]] begin[{] call[Preconditions.checkNotNull, parameter[member[.credentials], literal["credentials"]]] local_variable[type[boolean], retVal...
Keyword[public] Keyword[boolean] identifier[authenticateAndAuthorize] operator[SEP] identifier[String] identifier[resource] , identifier[String] identifier[credentials] , identifier[AuthHandler] operator[SEP] identifier[Permissions] identifier[level] operator[SEP] Keyword[throws] identifier[AuthenticationException] ...
public String buildSelectDeleteFileMode(String htmlAttributes) { List<String> options = new ArrayList<String>(2); options.add(key(Messages.GUI_PREF_PRESERVE_SIBLINGS_0)); options.add(key(Messages.GUI_PREF_DELETE_SIBLINGS_0)); List<String> values = new ArrayList<String>(2); value...
class class_name[name] begin[{] method[buildSelectDeleteFileMode, return_type[type[String]], modifier[public], parameter[htmlAttributes]] begin[{] local_variable[type[List], options] call[options.add, parameter[call[.key, parameter[member[Messages.GUI_PREF_PRESERVE_SIBLINGS_0]]]]] ...
Keyword[public] identifier[String] identifier[buildSelectDeleteFileMode] operator[SEP] identifier[String] identifier[htmlAttributes] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[options] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operat...
public Node nextSibling() { if (currentNode == null) return null; Node node = getNextSibling(currentNode); if (node != null) currentNode = node; return node; }
class class_name[name] begin[{] method[nextSibling, return_type[type[Node]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.currentNode], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Node], node] ...
Keyword[public] identifier[Node] identifier[nextSibling] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[currentNode] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[Node] identifier[node] operator[=] identifier[getNextSibling] operator[SEP] identifi...
public boolean getEnableSpringELCompiler() { final Set<IDialect> dialects = getDialects(); for (final IDialect dialect : dialects) { if (dialect instanceof SpringStandardDialect) { return ((SpringStandardDialect) dialect).getEnableSpringELCompiler(); } } ...
class class_name[name] begin[{] method[getEnableSpringELCompiler, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[Set], dialects] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(membe...
Keyword[public] Keyword[boolean] identifier[getEnableSpringELCompiler] operator[SEP] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[IDialect] operator[>] identifier[dialects] operator[=] identifier[getDialects] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[fi...
boolean addPolicy(String sec, String ptype, List<String> rule) { boolean ruleAdded = model.addPolicy(sec, ptype, rule); if (!ruleAdded) { return false; } if (adapter != null && autoSave) { try { adapter.addPolicy(sec, ptype, rule); } c...
class class_name[name] begin[{] method[addPolicy, return_type[type[boolean]], modifier[default], parameter[sec, ptype, rule]] begin[{] local_variable[type[boolean], ruleAdded] if[member[.ruleAdded]] begin[{] return[literal[false]] else begin[{] None end[}] ...
Keyword[boolean] identifier[addPolicy] operator[SEP] identifier[String] identifier[sec] , identifier[String] identifier[ptype] , identifier[List] operator[<] identifier[String] operator[>] identifier[rule] operator[SEP] { Keyword[boolean] identifier[ruleAdded] operator[=] identifier[model] operator[SEP] identi...
static public String canonicalpath(String path) { if(path == null) return null; StringBuilder b = new StringBuilder(path); canonicalpath(b); return b.toString(); }
class class_name[name] begin[{] method[canonicalpath, return_type[type[String]], modifier[public static], parameter[path]] begin[{] if[binary_operation[member[.path], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[StringB...
Keyword[static] Keyword[public] identifier[String] identifier[canonicalpath] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[StringBuilder] identifier[b] operat...
public Tile getTile (int fqTileId) throws NoSuchTileSetException { return getTile(TileUtil.getTileSetId(fqTileId), TileUtil.getTileIndex(fqTileId), null); }
class class_name[name] begin[{] method[getTile, return_type[type[Tile]], modifier[public], parameter[fqTileId]] begin[{] return[call[.getTile, parameter[call[TileUtil.getTileSetId, parameter[member[.fqTileId]]], call[TileUtil.getTileIndex, parameter[member[.fqTileId]]], literal[null]]]] end[}] END[...
Keyword[public] identifier[Tile] identifier[getTile] operator[SEP] Keyword[int] identifier[fqTileId] operator[SEP] Keyword[throws] identifier[NoSuchTileSetException] { Keyword[return] identifier[getTile] operator[SEP] identifier[TileUtil] operator[SEP] identifier[getTileSetId] operator[SEP] identifier[fqTileId] ...
private long getLongFromDom( Document dom, String tag ) { return Long.parseLong( dom.getElementsByTagName( tag ).item( 0 ).getTextContent() ); }
class class_name[name] begin[{] method[getLongFromDom, return_type[type[long]], modifier[private], parameter[dom, tag]] begin[{] return[call[Long.parseLong, parameter[call[dom.getElementsByTagName, parameter[member[.tag]]]]]] end[}] END[}]
Keyword[private] Keyword[long] identifier[getLongFromDom] operator[SEP] identifier[Document] identifier[dom] , identifier[String] identifier[tag] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[dom] operator[SEP] identifier[getElementsByTagName] oper...
@TargetApi(Build.VERSION_CODES.FROYO) public static boolean hasBluetoothFeature(Context context) { return hasBluetoothFeature(context.getPackageManager()); }
class class_name[name] begin[{] method[hasBluetoothFeature, return_type[type[boolean]], modifier[public static], parameter[context]] begin[{] return[call[.hasBluetoothFeature, parameter[call[context.getPackageManager, parameter[]]]]] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[FROYO] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[hasBluetoothFeature] operator[SEP] identifier[Context] identifier[context] operator[SEP] { Keyword[...
private void addInfoLayoutComponents() { TextField siteTableFilter = new TextField(); siteTableFilter.setIcon(FontOpenCms.FILTER); siteTableFilter.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_FILTER_0)); siteTableFilter.addS...
class class_name[name] begin[{] method[addInfoLayoutComponents, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[TextField], siteTableFilter] call[siteTableFilter.setIcon, parameter[member[FontOpenCms.FILTER]]] call[siteTableFilter.setInput...
Keyword[private] Keyword[void] identifier[addInfoLayoutComponents] operator[SEP] operator[SEP] { identifier[TextField] identifier[siteTableFilter] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[siteTableFilter] operator[SEP] identifier[setIcon] operator[SEP] i...
public static String getPasswordResetToken(final RequestContext requestContext) { val flowScope = requestContext.getFlowScope(); return flowScope.getString(FLOWSCOPE_PARAMETER_NAME_TOKEN); }
class class_name[name] begin[{] method[getPasswordResetToken, return_type[type[String]], modifier[public static], parameter[requestContext]] begin[{] local_variable[type[val], flowScope] return[call[flowScope.getString, parameter[member[.FLOWSCOPE_PARAMETER_NAME_TOKEN]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getPasswordResetToken] operator[SEP] Keyword[final] identifier[RequestContext] identifier[requestContext] operator[SEP] { identifier[val] identifier[flowScope] operator[=] identifier[requestContext] operator[SEP] identifier[getFlowScope] operator[SEP]...
@Override public Character getPropertyCharacter(Class<?> aClass, String key, char defaultValue) { String results = getProperty(aClass, key, ""); if (results.length() == 0) return Character.valueOf(defaultValue); else return Character.valueOf(results.charAt(0));// return first character }
class class_name[name] begin[{] method[getPropertyCharacter, return_type[type[Character]], modifier[public], parameter[aClass, key, defaultValue]] begin[{] local_variable[type[String], results] if[binary_operation[call[results.length, parameter[]], ==, literal[0]]] begin[{] return[call[...
annotation[@] identifier[Override] Keyword[public] identifier[Character] identifier[getPropertyCharacter] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[aClass] , identifier[String] identifier[key] , Keyword[char] identifier[defaultValue] operator[SEP] { identifier[String] ident...
protected boolean performDialogOperation() throws CmsException { // lock the image gallery folder checkLock(getParamResource()); Iterator<CmsResource> i = getImages().iterator(); // loop over all image resources to change the properties while (i.hasNext()) { CmsReso...
class class_name[name] begin[{] method[performDialogOperation, return_type[type[boolean]], modifier[protected], parameter[]] begin[{] call[.checkLock, parameter[call[.getParamResource, parameter[]]]] local_variable[type[Iterator], i] while[call[i.hasNext, parameter[]]] b...
Keyword[protected] Keyword[boolean] identifier[performDialogOperation] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[checkLock] operator[SEP] identifier[getParamResource] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[CmsRes...
public static FilterOperator toFilterOperator(ComparableFilter.Operator operator) { if (operator == ComparableFilter.Operator.EQUAL_TO) { return FilterOperator.EQUAL; } else if (operator == ComparableFilter.Operator.GREATER_THAN) { return FilterOperator.GREATER_THAN; } else if (operator == ComparableFilter....
class class_name[name] begin[{] method[toFilterOperator, return_type[type[FilterOperator]], modifier[public static], parameter[operator]] begin[{] if[binary_operation[member[.operator], ==, member[ComparableFilter.Operator.EQUAL_TO]]] begin[{] return[member[FilterOperator.EQUAL]] ...
Keyword[public] Keyword[static] identifier[FilterOperator] identifier[toFilterOperator] operator[SEP] identifier[ComparableFilter] operator[SEP] identifier[Operator] identifier[operator] operator[SEP] { Keyword[if] operator[SEP] identifier[operator] operator[==] identifier[ComparableFilter] operator[SEP] identif...
public synchronized void flush() throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) { trace.entry(this, cclass, "flush"); trace.exit(this, cclass, ...
class class_name[name] begin[{] method[flush, return_type[void], modifier[synchronized public], parameter[]] begin[{] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.entry, parameter[TH...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[flush] operator[SEP] operator[SEP] Keyword[throws] identifier[ObjectManagerException] { Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SE...
public OperationFuture<List<Server>> delete(ServerFilter filter) { List<Server> serverRefs = find(filter) .stream() .map(ServerMetadata::asRefById) .collect(toList()); return delete(serverRefs.toArray(new Server[serverRefs.size()])); }
class class_name[name] begin[{] method[delete, return_type[type[OperationFuture]], modifier[public], parameter[filter]] begin[{] local_variable[type[List], serverRefs] return[call[.delete, parameter[call[serverRefs.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], membe...
Keyword[public] identifier[OperationFuture] operator[<] identifier[List] operator[<] identifier[Server] operator[>] operator[>] identifier[delete] operator[SEP] identifier[ServerFilter] identifier[filter] operator[SEP] { identifier[List] operator[<] identifier[Server] operator[>] identifier[serverRefs] operator[...
public User getActiveUser() { SharedPreferences prefs = getStorage(); if (prefs.contains("uuid") && prefs.contains("name")) { return new User( prefs.getString("app_name", ""), prefs.getString("name", ""), prefs.getString("uuid", "")...
class class_name[name] begin[{] method[getActiveUser, return_type[type[User]], modifier[public], parameter[]] begin[{] local_variable[type[SharedPreferences], prefs] if[binary_operation[call[prefs.contains, parameter[literal["uuid"]]], &&, call[prefs.contains, parameter[literal["name"]]...
Keyword[public] identifier[User] identifier[getActiveUser] operator[SEP] operator[SEP] { identifier[SharedPreferences] identifier[prefs] operator[=] identifier[getStorage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prefs] operator[SEP] identifier[contains] operator[SEP] litera...
public static alluxio.grpc.MountPointInfo toProto(MountPointInfo info) { return alluxio.grpc.MountPointInfo.newBuilder().setUfsUri(info.getUfsUri()) .setUfsType(info.getUfsType()).setUfsCapacityBytes(info.getUfsCapacityBytes()) .setReadOnly(info.getReadOnly()).putAllProperties(info.getProperties()) ...
class class_name[name] begin[{] method[toProto, return_type[type[alluxio]], modifier[public static], parameter[info]] begin[{] return[call[alluxio.grpc.MountPointInfo.newBuilder, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[MountPointInfo] identifier[toProto] operator[SEP] identifier[MountPointInfo] identifier[info] operator[SEP] { Keyword[return] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[Mou...
public Observable<ExpressRoutePortInner> updateTagsAsync(String resourceGroupName, String expressRoutePortName) { return updateTagsWithServiceResponseAsync(resourceGroupName, expressRoutePortName).map(new Func1<ServiceResponse<ExpressRoutePortInner>, ExpressRoutePortInner>() { @Override ...
class class_name[name] begin[{] method[updateTagsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, expressRoutePortName]] begin[{] return[call[.updateTagsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.expressRoutePortName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ExpressRoutePortInner] operator[>] identifier[updateTagsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[expressRoutePortName] operator[SEP] { Keyword[return] identifier[updateTagsWithServiceRespon...
public Method[] getAllMethods(Object o) { Method[] methods = o.getClass().getDeclaredMethods(); AccessibleObject.setAccessible(methods, true); return methods; }
class class_name[name] begin[{] method[getAllMethods, return_type[type[Method]], modifier[public], parameter[o]] begin[{] local_variable[type[Method], methods] call[AccessibleObject.setAccessible, parameter[member[.methods], literal[true]]] return[member[.methods]] end[}] EN...
Keyword[public] identifier[Method] operator[SEP] operator[SEP] identifier[getAllMethods] operator[SEP] identifier[Object] identifier[o] operator[SEP] { identifier[Method] operator[SEP] operator[SEP] identifier[methods] operator[=] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] opera...
public boolean isReadOnly(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if ((base == null) && ("pageContext".equals(property) || "pageScope".e...
class class_name[name] begin[{] method[isReadOnly, return_type[type[boolean]], modifier[public], parameter[context, base, property]] begin[{] if[binary_operation[member[.context], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructo...
Keyword[public] Keyword[boolean] identifier[isReadOnly] operator[SEP] identifier[ELContext] identifier[context] , identifier[Object] identifier[base] , identifier[Object] identifier[property] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] { Keywo...
@Override public int countByCP_T(long CProductId, String type) { FinderPath finderPath = FINDER_PATH_COUNT_BY_CP_T; Object[] finderArgs = new Object[] { CProductId, type }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler...
class class_name[name] begin[{] method[countByCP_T, return_type[type[int]], modifier[public], parameter[CProductId, type]] begin[{] local_variable[type[FinderPath], finderPath] local_variable[type[Object], finderArgs] local_variable[type[Long], count] if[binary_operation...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[countByCP_T] operator[SEP] Keyword[long] identifier[CProductId] , identifier[String] identifier[type] operator[SEP] { identifier[FinderPath] identifier[finderPath] operator[=] identifier[FINDER_PATH_COUNT_BY_CP_T] operator[SEP] identifie...
public static <K, V> Map<K, V> filterEntries( Map<K, V> unfiltered, Predicate<? super Entry<K, V>> entryPredicate) { checkNotNull(entryPredicate); return (unfiltered instanceof AbstractFilteredMap) ? filterFiltered((AbstractFilteredMap<K, V>) unfiltered, entryPredicate) : new FilteredEntry...
class class_name[name] begin[{] method[filterEntries, return_type[type[Map]], modifier[public static], parameter[unfiltered, entryPredicate]] begin[{] call[.checkNotNull, parameter[member[.entryPredicate]]] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(memb...
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[filterEntries] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[unfiltered] , identifier[Predicate] ope...
private Throwable mapException(EJSDeployedSupport s, RemoteException ex) //d135584 { try { if (ex instanceof CSIException) { CSIException csiex = (CSIException) ex; return mapCSIException(s, csiex); } else if (ex.detail instanceof C...
class class_name[name] begin[{] method[mapException, return_type[type[Throwable]], modifier[private], parameter[s, ex]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=R...
Keyword[private] identifier[Throwable] identifier[mapException] operator[SEP] identifier[EJSDeployedSupport] identifier[s] , identifier[RemoteException] identifier[ex] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[ex] Keyword[instanceof] identifier[CSIException] operator[SEP] {...
public StringType addLineElement() {//2 StringType t = new StringType(); if (this.line == null) this.line = new ArrayList<StringType>(); this.line.add(t); return t; }
class class_name[name] begin[{] method[addLineElement, return_type[type[StringType]], modifier[public], parameter[]] begin[{] local_variable[type[StringType], t] if[binary_operation[THIS[member[None.line]], ==, literal[null]]] begin[{] assign[THIS[member[None.line]], ClassCr...
Keyword[public] identifier[StringType] identifier[addLineElement] operator[SEP] operator[SEP] { identifier[StringType] identifier[t] operator[=] Keyword[new] identifier[StringType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[line] operator[==] Other[...
public JTSGeometryExpression<Geometry> intersection(Expression<? extends Geometry> geometry) { return JTSGeometryExpressions.geometryOperation(SpatialOps.INTERSECTION, mixin, geometry); }
class class_name[name] begin[{] method[intersection, return_type[type[JTSGeometryExpression]], modifier[public], parameter[geometry]] begin[{] return[call[JTSGeometryExpressions.geometryOperation, parameter[member[SpatialOps.INTERSECTION], member[.mixin], member[.geometry]]]] end[}] END[}]
Keyword[public] identifier[JTSGeometryExpression] operator[<] identifier[Geometry] operator[>] identifier[intersection] operator[SEP] identifier[Expression] operator[<] operator[?] Keyword[extends] identifier[Geometry] operator[>] identifier[geometry] operator[SEP] { Keyword[return] identifier[JTSGeometryExpress...
public static <T> File appendUtf8Lines(Collection<T> list, String path) throws IORuntimeException { return appendLines(list, path, CharsetUtil.CHARSET_UTF_8); }
class class_name[name] begin[{] method[appendUtf8Lines, return_type[type[File]], modifier[public static], parameter[list, path]] begin[{] return[call[.appendLines, parameter[member[.list], member[.path], member[CharsetUtil.CHARSET_UTF_8]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[File] identifier[appendUtf8Lines] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[list] , identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IORuntimeException] { Keyw...
public static <C> Module configModuleWithOverrides(final Class<C> configInterface, Named name, OverrideConsumer<C> overrideConsumer) { checkNotNull(configInterface); checkNotNull(name); checkNotNull(overrideConsumer); return configModuleWithOverrides(configInterface, Optional.ofNulla...
class class_name[name] begin[{] method[configModuleWithOverrides, return_type[type[Module]], modifier[public static], parameter[configInterface, name, overrideConsumer]] begin[{] call[.checkNotNull, parameter[member[.configInterface]]] call[.checkNotNull, parameter[member[.name]...
Keyword[public] Keyword[static] operator[<] identifier[C] operator[>] identifier[Module] identifier[configModuleWithOverrides] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[C] operator[>] identifier[configInterface] , identifier[Named] identifier[name] , identifier[OverrideConsumer] operator[<...
public Integer[] sequence(final Integer from, final Integer to, final Integer step) { return NumberUtils.sequence(from, to, step); }
class class_name[name] begin[{] method[sequence, return_type[type[Integer]], modifier[public], parameter[from, to, step]] begin[{] return[call[NumberUtils.sequence, parameter[member[.from], member[.to], member[.step]]]] end[}] END[}]
Keyword[public] identifier[Integer] operator[SEP] operator[SEP] identifier[sequence] operator[SEP] Keyword[final] identifier[Integer] identifier[from] , Keyword[final] identifier[Integer] identifier[to] , Keyword[final] identifier[Integer] identifier[step] operator[SEP] { Keyword[return] identifier[NumberUtils...
public static String getCoreValueExpression(UIComponent component) { ValueExpression valueExpression = component.getValueExpression("value"); if (null != valueExpression) { String v = valueExpression.getExpressionString(); if (null != v) { Matcher matcher = EL_EXPRESSION.matcher(v); if (matcher.find()...
class class_name[name] begin[{] method[getCoreValueExpression, return_type[type[String]], modifier[public static], parameter[component]] begin[{] local_variable[type[ValueExpression], valueExpression] if[binary_operation[literal[null], !=, member[.valueExpression]]] begin[{] ...
Keyword[public] Keyword[static] identifier[String] identifier[getCoreValueExpression] operator[SEP] identifier[UIComponent] identifier[component] operator[SEP] { identifier[ValueExpression] identifier[valueExpression] operator[=] identifier[component] operator[SEP] identifier[getValueExpression] operator[SEP] li...
protected final void set(int pos, String value) { value = StringUtils.trimToNull(value); if (value != null) this.values.put(pos, value); else if (this.values.containsKey(pos)) this.values.remove(pos); }
class class_name[name] begin[{] method[set, return_type[void], modifier[final protected], parameter[pos, value]] begin[{] assign[member[.value], call[StringUtils.trimToNull, parameter[member[.value]]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] ...
Keyword[protected] Keyword[final] Keyword[void] identifier[set] operator[SEP] Keyword[int] identifier[pos] , identifier[String] identifier[value] operator[SEP] { identifier[value] operator[=] identifier[StringUtils] operator[SEP] identifier[trimToNull] operator[SEP] identifier[value] operator[SEP] operator[SEP]...
public void addSession(String id, Session session) { poolGroupManager.addSession(id, session); LOG.info("Session " + id + " has been added to " + type + " scheduler"); }
class class_name[name] begin[{] method[addSession, return_type[void], modifier[public], parameter[id, session]] begin[{] call[poolGroupManager.addSession, parameter[member[.id], member[.session]]] call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[binary...
Keyword[public] Keyword[void] identifier[addSession] operator[SEP] identifier[String] identifier[id] , identifier[Session] identifier[session] operator[SEP] { identifier[poolGroupManager] operator[SEP] identifier[addSession] operator[SEP] identifier[id] , identifier[session] operator[SEP] operator[SEP] identif...
void configurePort(String port) { if (StringUtils.isNotBlank(port)) { try { this.port = Integer.parseInt(port); log.info("Using port {}", this.port); } catch (NumberFormatException e) { log.info("Unable to parse server PORT variable ({}). ...
class class_name[name] begin[{] method[configurePort, return_type[void], modifier[default], parameter[port]] begin[{] if[call[StringUtils.isNotBlank, parameter[member[.port]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=...
Keyword[void] identifier[configurePort] operator[SEP] identifier[String] identifier[port] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[port] operator[SEP] operator[SEP] { Keyword[try] { Keyword[this] oper...
public static void addService(ServerEnvironment serverEnvironment, ServiceTarget target) { target.addService(SERVICE_NAME, new ServerEnvironmentService(serverEnvironment)) .install(); }
class class_name[name] begin[{] method[addService, return_type[void], modifier[public static], parameter[serverEnvironment, target]] begin[{] call[target.addService, parameter[member[.SERVICE_NAME], ClassCreator(arguments=[MemberReference(member=serverEnvironment, postfix_operators=[], prefix_o...
Keyword[public] Keyword[static] Keyword[void] identifier[addService] operator[SEP] identifier[ServerEnvironment] identifier[serverEnvironment] , identifier[ServiceTarget] identifier[target] operator[SEP] { identifier[target] operator[SEP] identifier[addService] operator[SEP] identifier[SERVICE_NAME] , Keyword[...
public static ParseException create(List<ParseError> errors) { if (errors.size() == 1) { return new ParseException(errors.get(0).getMessage(), errors); } else if (errors.size() > 1) { return new ParseException(String.format("%d errors occured. First: %s", ...
class class_name[name] begin[{] method[create, return_type[type[ParseException]], modifier[public static], parameter[errors]] begin[{] if[binary_operation[call[errors.size, parameter[]], ==, literal[1]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(pos...
Keyword[public] Keyword[static] identifier[ParseException] identifier[create] operator[SEP] identifier[List] operator[<] identifier[ParseError] operator[>] identifier[errors] operator[SEP] { Keyword[if] operator[SEP] identifier[errors] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other...
public void setOnsubmit(java.lang.String onsubmit) { getStateHelper().put(PropertyKeys.onsubmit, onsubmit); handleAttribute("onsubmit", onsubmit); }
class class_name[name] begin[{] method[setOnsubmit, return_type[void], modifier[public], parameter[onsubmit]] begin[{] call[.getStateHelper, parameter[]] call[.handleAttribute, parameter[literal["onsubmit"], member[.onsubmit]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOnsubmit] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[onsubmit] operator[SEP] { identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[PropertyKeys] ope...
@Override public void removeByG_A(long groupId, boolean active) { for (CommerceCountry commerceCountry : findByG_A(groupId, active, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceCountry); } }
class class_name[name] begin[{] method[removeByG_A, return_type[void], modifier[public], parameter[groupId, active]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceCountry, postfix_operators=[],...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByG_A] operator[SEP] Keyword[long] identifier[groupId] , Keyword[boolean] identifier[active] operator[SEP] { Keyword[for] operator[SEP] identifier[CommerceCountry] identifier[commerceCountry] operator[:] identifier[findByG_A] ope...
protected void fireDrawingEnd() { final ListenerCollection<EventListener> list = this.listeners; if (list != null) { for (final DrawingListener listener : list.getListeners(DrawingListener.class)) { listener.onDrawingEnd(); } } }
class class_name[name] begin[{] method[fireDrawingEnd, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[ListenerCollection], list] if[binary_operation[member[.list], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, st...
Keyword[protected] Keyword[void] identifier[fireDrawingEnd] operator[SEP] operator[SEP] { Keyword[final] identifier[ListenerCollection] operator[<] identifier[EventListener] operator[>] identifier[list] operator[=] Keyword[this] operator[SEP] identifier[listeners] operator[SEP] Keyword[if] operator[SEP] identifi...
@Nonnull public static FileIOError createDir (@Nonnull final Path aDir) { ValueEnforcer.notNull (aDir, "Directory"); final Path aRealDir = _getUnifiedPath (aDir); return FileOperations.createDir (aRealDir.toFile ()); // // Does the directory already exist? // if (Files.exists (aRealDir)) /...
class class_name[name] begin[{] method[createDir, return_type[type[FileIOError]], modifier[public static], parameter[aDir]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aDir], literal["Directory"]]] local_variable[type[Path], aRealDir] return[call[FileOperations.create...
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[FileIOError] identifier[createDir] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Path] identifier[aDir] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aDi...
protected String getAddress(HttpServletRequest request){ String path = request.getScheme()+"://"+request.getServerName(); //port if(request.getScheme().equals("http")&&request.getServerPort()!=80) path+=":"+request.getServerPort(); if(request.getScheme().equals("https")&&requ...
class class_name[name] begin[{] method[getAddress, return_type[type[String]], modifier[protected], parameter[request]] begin[{] local_variable[type[String], path] if[binary_operation[call[request.getScheme, parameter[]], &&, binary_operation[call[request.getServerPort, parameter[]], !=,...
Keyword[protected] identifier[String] identifier[getAddress] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[request] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] operator[+] literal[String] operator[+]...
public static void bucketSort( int[] arr, int m ) { int[] count = new int[m]; int j, i = 0; //System.out.println(count[0]==0?"true":"false"); for ( j = 0; j < arr.length; j++ ) { count[ arr[j] ]++; } //loop and filter the elements for ( j ...
class class_name[name] begin[{] method[bucketSort, return_type[void], modifier[public static], parameter[arr, m]] begin[{] local_variable[type[int], count] local_variable[type[int], j] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReferenc...
Keyword[public] Keyword[static] Keyword[void] identifier[bucketSort] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[arr] , Keyword[int] identifier[m] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[count] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[m] op...
@Override public boolean hasNext() { try { if(this.resultSet == null) return false; else if(!this.resultSet.next()) { this.dispose(); return false; } return true; } catch (SQLException e) { dispose(); throw new CommunicationException(e.getMessage(),e); } }
class class_name[name] begin[{] method[hasNext, return_type[type[boolean]], modifier[public], parameter[]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=resultSet, postfix_ope...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resultSet] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword...
public static <T extends Chunkable> byte[] chunkFrom(T chunkable, int chunkLength, int chunkNum) { int start = chunkNum * chunkLength; return bytesFrom(chunkable, start, chunkLength); }
class class_name[name] begin[{] method[chunkFrom, return_type[type[byte]], modifier[public static], parameter[chunkable, chunkLength, chunkNum]] begin[{] local_variable[type[int], start] return[call[.bytesFrom, parameter[member[.chunkable], member[.start], member[.chunkLength]]]] end[}] END...
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Chunkable] operator[>] Keyword[byte] operator[SEP] operator[SEP] identifier[chunkFrom] operator[SEP] identifier[T] identifier[chunkable] , Keyword[int] identifier[chunkLength] , Keyword[int] identifier[chunkNum] operator[SEP] { ...
public static long getLongParameter ( HttpServletRequest req, String name, long defval, String invalidDataMessage) throws DataValidationException { String value = getParameter(req, name, false); if (StringUtil.isBlank(value)) { return defval; } return pars...
class class_name[name] begin[{] method[getLongParameter, return_type[type[long]], modifier[public static], parameter[req, name, defval, invalidDataMessage]] begin[{] local_variable[type[String], value] if[call[StringUtil.isBlank, parameter[member[.value]]]] begin[{] return[m...
Keyword[public] Keyword[static] Keyword[long] identifier[getLongParameter] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[String] identifier[name] , Keyword[long] identifier[defval] , identifier[String] identifier[invalidDataMessage] operator[SEP] Keyword[throws] identifier[DataValidationE...
private Path[] getMapFiles(FileSystem fs, boolean isLocal) throws IOException { List<Path> fileList = new ArrayList<Path>(); if (isLocal) { // for local jobs for(int i = 0; i < numMaps; ++i) { fileList.add(mapOutputFile.getInputFile(i, getTaskID())); } } else { // for non l...
class class_name[name] begin[{] method[getMapFiles, return_type[type[Path]], modifier[private], parameter[fs, isLocal]] begin[{] local_variable[type[List], fileList] if[member[.isLocal]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(ex...
Keyword[private] identifier[Path] operator[SEP] operator[SEP] identifier[getMapFiles] operator[SEP] identifier[FileSystem] identifier[fs] , Keyword[boolean] identifier[isLocal] operator[SEP] Keyword[throws] identifier[IOException] { identifier[List] operator[<] identifier[Path] operator[>] identifier[fileList] ...
public EmbedBuilder setFooter(String text, String iconUrl) { //We only check if the text is null because its presence is what determines if the // footer will appear in the embed. if (text == null) { this.footer = null; } else { Checks....
class class_name[name] begin[{] method[setFooter, return_type[type[EmbedBuilder]], modifier[public], parameter[text, iconUrl]] begin[{] if[binary_operation[member[.text], ==, literal[null]]] begin[{] assign[THIS[member[None.footer]], literal[null]] else begin[{] ...
Keyword[public] identifier[EmbedBuilder] identifier[setFooter] operator[SEP] identifier[String] identifier[text] , identifier[String] identifier[iconUrl] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[footer] ...
@Override public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { final Flux<ByteBuf> contents = context.httpRequest().body() == null ? Flux.just(getEmptyBuffer()) : context.httpRequest().body(); return contents.defaultIfEmpt...
class class_name[name] begin[{] method[process, return_type[type[Mono]], modifier[public], parameter[context, next]] begin[{] local_variable[type[Flux], contents] return[call[contents.defaultIfEmpty, parameter[call[.getEmptyBuffer, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Mono] operator[<] identifier[HttpResponse] operator[>] identifier[process] operator[SEP] identifier[HttpPipelineCallContext] identifier[context] , identifier[HttpPipelineNextPolicy] identifier[next] operator[SEP] { Keyword[final] identifier[Flux] ope...
public Iterable<? extends Element> analyze(Iterable<? extends Element> classes) { enter(null); // ensure all classes have been entered final ListBuffer<Element> results = new ListBuffer<>(); try { if (classes == null) { handleFlowResults(compiler.flow(compiler.attri...
class class_name[name] begin[{] method[analyze, return_type[type[Iterable]], modifier[public], parameter[classes]] begin[{] call[.enter, parameter[literal[null]]] local_variable[type[ListBuffer], results] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberR...
Keyword[public] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Element] operator[>] identifier[analyze] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Element] operator[>] identifier[classes] operator[SEP] { identifier[enter] operator[SEP] Other[n...
public byte[] drawTileBytes(int x, int y, int zoom) { Bitmap bitmap = drawTile(x, y, zoom); byte[] tileData = null; // Convert the bitmap to bytes if (bitmap != null) { try { tileData = BitmapConverter.toBytes( bitmap, compressFormat...
class class_name[name] begin[{] method[drawTileBytes, return_type[type[byte]], modifier[public], parameter[x, y, zoom]] begin[{] local_variable[type[Bitmap], bitmap] local_variable[type[byte], tileData] if[binary_operation[member[.bitmap], !=, literal[null]]] begin[{] ...
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[drawTileBytes] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[zoom] operator[SEP] { identifier[Bitmap] identifier[bitmap] operator[=] identifier[drawTile] operator[SEP] identifier[x] , identif...
public ServiceFuture<ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner> beginListRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner> serviceCallback) { ...
class class_name[name] begin[{] method[beginListRoutesTableSummaryAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, crossConnectionName, peeringName, devicePath, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.beginListRoutesTable...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner] operator[>] identifier[beginListRoutesTableSummaryAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[crossConnectionName] , identifier[Stri...
public static String msgToString(AbstractMessage message) { if (message == null) return STRING_NULL; if (message instanceof JsMessage) return message + "[" + ((JsMessage)message).getSystemMessageId() + "]"; return message.toString(); }
class class_name[name] begin[{] method[msgToString, return_type[type[String]], modifier[public static], parameter[message]] begin[{] if[binary_operation[member[.message], ==, literal[null]]] begin[{] return[member[.STRING_NULL]] else begin[{] None end[}] if[binar...
Keyword[public] Keyword[static] identifier[String] identifier[msgToString] operator[SEP] identifier[AbstractMessage] identifier[message] operator[SEP] { Keyword[if] operator[SEP] identifier[message] operator[==] Other[null] operator[SEP] Keyword[return] identifier[STRING_NULL] operator[SEP] Keyword[if] operator[...
public static Timebase valueOf(String rate) { if (rate.equalsIgnoreCase("PAL")) { return HZ_25; } else if (rate.equals("23.976")) { return NTSC_24; } else if (rate.equalsIgnoreCase("NTSC") || rate.equals("29.97")) { return NTSC; } else if (rate.equals("59.94")) { return NTSC_60; } ...
class class_name[name] begin[{] method[valueOf, return_type[type[Timebase]], modifier[public static], parameter[rate]] begin[{] if[call[rate.equalsIgnoreCase, parameter[literal["PAL"]]]] begin[{] return[member[.HZ_25]] else begin[{] if[call[rate.equals, parameter...
Keyword[public] Keyword[static] identifier[Timebase] identifier[valueOf] operator[SEP] identifier[String] identifier[rate] operator[SEP] { Keyword[if] operator[SEP] identifier[rate] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] i...
final public XPathNode parse(MetadataMapper aMetaDataMapper) throws ParseException, AttributeNotSupportedException { _metaDataMapper = aMetaDataMapper; if (_metaDataMapper != null) { checkLocation = true; } XPath(); { if (true) return node;...
class class_name[name] begin[{] method[parse, return_type[type[XPathNode]], modifier[final public], parameter[aMetaDataMapper]] begin[{] assign[member[._metaDataMapper], member[.aMetaDataMapper]] if[binary_operation[member[._metaDataMapper], !=, literal[null]]] begin[{] ...
Keyword[final] Keyword[public] identifier[XPathNode] identifier[parse] operator[SEP] identifier[MetadataMapper] identifier[aMetaDataMapper] operator[SEP] Keyword[throws] identifier[ParseException] , identifier[AttributeNotSupportedException] { identifier[_metaDataMapper] operator[=] identifier[aMetaDataMapper] ...
@Override public AuthenticationService getAuthenticationService() { AuthenticationService service = authnService.get(); if (service == null) { if (isConfigurationDefinedInFile()) { String id = getEffectiveSecurityConfiguration().getAuthenticationServiceId(); ...
class class_name[name] begin[{] method[getAuthenticationService, return_type[type[AuthenticationService]], modifier[public], parameter[]] begin[{] local_variable[type[AuthenticationService], service] if[binary_operation[member[.service], ==, literal[null]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] identifier[AuthenticationService] identifier[getAuthenticationService] operator[SEP] operator[SEP] { identifier[AuthenticationService] identifier[service] operator[=] identifier[authnService] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP...
public void print(boolean b) throws IOException { String msg; if (b) { msg = lStrings.getString("value.true"); } else { msg = lStrings.getString("value.false"); } print(msg); }
class class_name[name] begin[{] method[print, return_type[void], modifier[public], parameter[b]] begin[{] local_variable[type[String], msg] if[member[.b]] begin[{] assign[member[.msg], call[lStrings.getString, parameter[literal["value.true"]]]] else begin...
Keyword[public] Keyword[void] identifier[print] operator[SEP] Keyword[boolean] identifier[b] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[msg] operator[SEP] Keyword[if] operator[SEP] identifier[b] operator[SEP] { identifier[msg] operator[=] identifier[lStrings]...
protected void createConversationState() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createConversationState"); // Now create the Conversation wide ConversationState ClientConversationState ccs = new ClientConversationState(); getConversation().s...
class class_name[name] begin[{] method[createConversationState, return_type[void], modifier[protected], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[TH...
Keyword[protected] Keyword[void] identifier[createConversationState] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] oper...
@Override public boolean hasRemaining() { if (isFCEnabled()) { int remaining = this.fcLimit - position(); if (remaining < 0) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "hasRmeaining, less than 0"); ...
class class_name[name] begin[{] method[hasRemaining, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[call[.isFCEnabled, parameter[]]] begin[{] local_variable[type[int], remaining] if[binary_operation[member[.remaining], <, literal[0]]] ...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasRemaining] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFCEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[remaining] operator[=] Keyword[this] operator[SEP] identifier...
public ArrayList<OvhContainer> project_serviceName_storage_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/storage"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t5); }
class class_name[name] begin[{] method[project_serviceName_storage_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[String], resp] return[call[.co...
Keyword[public] identifier[ArrayList] operator[<] identifier[OvhContainer] operator[>] identifier[project_serviceName_storage_GET] operator[SEP] identifier[String] identifier[serviceName] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] oper...
public void marshall(DateRange dateRange, ProtocolMarshaller protocolMarshaller) { if (dateRange == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(dateRange.getValue(), VALUE_BINDING); pr...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[dateRange, protocolMarshaller]] begin[{] if[binary_operation[member[.dateRange], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DateRange] identifier[dateRange] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[dateRange] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[...
private static boolean implementingObsoleteMethod( MethodTree enclosingMethod, VisitorState state, Type type) { MethodSymbol method = ASTHelpers.getSymbol(enclosingMethod); if (method == null) { return false; } if (ASTHelpers.findSuperMethods(method, state.getTypes()).isEmpty()) { // n...
class class_name[name] begin[{] method[implementingObsoleteMethod, return_type[type[boolean]], modifier[private static], parameter[enclosingMethod, state, type]] begin[{] local_variable[type[MethodSymbol], method] if[binary_operation[member[.method], ==, literal[null]]] begin[{] ...
Keyword[private] Keyword[static] Keyword[boolean] identifier[implementingObsoleteMethod] operator[SEP] identifier[MethodTree] identifier[enclosingMethod] , identifier[VisitorState] identifier[state] , identifier[Type] identifier[type] operator[SEP] { identifier[MethodSymbol] identifier[method] operator[=] iden...
private void load2Entity(Object entity, Method setMethod, Object value) throws Exception { try { if (value != null) { setMethod.invoke(entity, value); } } catch (Exception e) { String sValue = value.toString(); String sValueClass = value.ge...
class class_name[name] begin[{] method[load2Entity, return_type[void], modifier[private], parameter[entity, setMethod, value]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ...
Keyword[private] Keyword[void] identifier[load2Entity] operator[SEP] identifier[Object] identifier[entity] , identifier[Method] identifier[setMethod] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[try] { Keyword[if] operator[SEP] identifier[value...
private void radialGradient(Attributes attributes) throws SVGParseException { debug("<radialGradient>"); if (currentElement == null) throw new SVGParseException("Invalid document. Root element must be <svg>"); SVG.SvgRadialGradient obj = new SVG.SvgRadialGradient(); obj.doc...
class class_name[name] begin[{] method[radialGradient, return_type[void], modifier[private], parameter[attributes]] begin[{] call[.debug, parameter[literal["<radialGradient>"]]] if[binary_operation[member[.currentElement], ==, literal[null]]] begin[{] ThrowStatement(expression=C...
Keyword[private] Keyword[void] identifier[radialGradient] operator[SEP] identifier[Attributes] identifier[attributes] operator[SEP] Keyword[throws] identifier[SVGParseException] { identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentElement] oper...
private YarnService buildYarnService(Config config, String applicationName, String applicationId, YarnConfiguration yarnConfiguration, FileSystem fs) throws Exception { return new YarnService(config, applicationName, applicationId, yarnConfiguration, fs, this.eventBus); }
class class_name[name] begin[{] method[buildYarnService, return_type[type[YarnService]], modifier[private], parameter[config, applicationName, applicationId, yarnConfiguration, fs]] begin[{] return[ClassCreator(arguments=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifi...
Keyword[private] identifier[YarnService] identifier[buildYarnService] operator[SEP] identifier[Config] identifier[config] , identifier[String] identifier[applicationName] , identifier[String] identifier[applicationId] , identifier[YarnConfiguration] identifier[yarnConfiguration] , identifier[FileSystem] identifier[...
public static <T> CollectionJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) { return new CollectionJsonDeserializer<T>( deserializer ); }
class class_name[name] begin[{] method[newInstance, return_type[type[CollectionJsonDeserializer]], modifier[public static], parameter[deserializer]] begin[{] return[ClassCreator(arguments=[MemberReference(member=deserializer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=N...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CollectionJsonDeserializer] operator[<] identifier[T] operator[>] identifier[newInstance] operator[SEP] identifier[JsonDeserializer] operator[<] identifier[T] operator[>] identifier[deserializer] operator[SEP] { Keyword[return] Keyw...
private int threshHoldExtractCluster(List<Integer> orderedFile, int[] designations) { int clustersFound = 0; OnLineStatistics stats = new OnLineStatistics(); for(double r : reach_d) if(!Double.isInfinite(r)) stats.add(r); double thresh = stats.get...
class class_name[name] begin[{] method[threshHoldExtractCluster, return_type[type[int]], modifier[private], parameter[orderedFile, designations]] begin[{] local_variable[type[int], clustersFound] local_variable[type[OnLineStatistics], stats] ForStatement(body=IfStatement(condition=Metho...
Keyword[private] Keyword[int] identifier[threshHoldExtractCluster] operator[SEP] identifier[List] operator[<] identifier[Integer] operator[>] identifier[orderedFile] , Keyword[int] operator[SEP] operator[SEP] identifier[designations] operator[SEP] { Keyword[int] identifier[clustersFound] operator[=] Other[0] op...
private void setHeaders(final HttpServletResponse response, final Root root) { response.setHeader("content-type", "application/octet-stream"); response.setHeader("content-disposition", "attachment; filename=" + getSaveFilename(root)); }
class class_name[name] begin[{] method[setHeaders, return_type[void], modifier[private], parameter[response, root]] begin[{] call[response.setHeader, parameter[literal["content-type"], literal["application/octet-stream"]]] call[response.setHeader, parameter[literal["content-disp...
Keyword[private] Keyword[void] identifier[setHeaders] operator[SEP] Keyword[final] identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[Root] identifier[root] operator[SEP] { identifier[response] operator[SEP] identifier[setHeader] operator[SEP] literal[String] , literal[String] ope...
@Override public void resetStaticState(Config config) { Robolectric.reset(); if (!loggingInitialized) { ShadowLog.setupLogging(); loggingInitialized = true; } }
class class_name[name] begin[{] method[resetStaticState, return_type[void], modifier[public], parameter[config]] begin[{] call[Robolectric.reset, parameter[]] if[member[.loggingInitialized]] begin[{] call[ShadowLog.setupLogging, parameter[]] ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[resetStaticState] operator[SEP] identifier[Config] identifier[config] operator[SEP] { identifier[Robolectric] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[logg...
void tryToDrainBuffers() { if (evictionLock.tryLock()) { try { drainStatus.set(PROCESSING); drainBuffers(); } finally { drainStatus.compareAndSet(PROCESSING, IDLE); evictionLock.unlock(); } } }
class class_name[name] begin[{] method[tryToDrainBuffers, return_type[void], modifier[default], parameter[]] begin[{] if[call[evictionLock.tryLock, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PROCESSING...
Keyword[void] identifier[tryToDrainBuffers] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[evictionLock] operator[SEP] identifier[tryLock] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[drainStatus] operator[SEP] identifier[set] operator[SEP] i...
public static Result newBatchedExecuteRequest() { Type[] types = new Type[]{ Type.SQL_VARCHAR }; Result result = newResult(ResultConstants.BATCHEXECDIRECT); result.metaData = ResultMetaData.newSimpleResultMetaData(types); return result; }
class class_name[name] begin[{] method[newBatchedExecuteRequest, return_type[type[Result]], modifier[public static], parameter[]] begin[{] local_variable[type[Type], types] local_variable[type[Result], result] assign[member[result.metaData], call[ResultMetaData.newSimpleResultMe...
Keyword[public] Keyword[static] identifier[Result] identifier[newBatchedExecuteRequest] operator[SEP] operator[SEP] { identifier[Type] operator[SEP] operator[SEP] identifier[types] operator[=] Keyword[new] identifier[Type] operator[SEP] operator[SEP] { identifier[Type] operator[SEP] identifier[SQL_VAR...
public void marshall(ComputeResource computeResource, ProtocolMarshaller protocolMarshaller) { if (computeResource == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(computeResource.getType(), TYPE_BI...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[computeResource, protocolMarshaller]] begin[{] if[binary_operation[member[.computeResource], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ComputeResource] identifier[computeResource] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[computeResource] operator[==] Other[null] operator[SEP] { Keywo...
public static boolean isEqual(final Object o1, final Object o2) { if (o1 == o2) { return true; } if (o1 == null || o2 == null) { return false; } if (o1.equals(o2)) { return true; } switch (getTypeMark(o1, o2)) { case...
class class_name[name] begin[{] method[isEqual, return_type[type[boolean]], modifier[public static], parameter[o1, o2]] begin[{] if[binary_operation[member[.o1], ==, member[.o2]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_oper...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isEqual] operator[SEP] Keyword[final] identifier[Object] identifier[o1] , Keyword[final] identifier[Object] identifier[o2] operator[SEP] { Keyword[if] operator[SEP] identifier[o1] operator[==] identifier[o2] operator[SEP] { Keyword[return] l...
private void awaitState(State expectedState) throws Exception { while (this.lifeCycle.getState() != expectedState) { try { Thread.sleep(1); } catch (InterruptedException e) { // We do not know why this happened. // We do not know how to handle it, either. throw e; }...
class class_name[name] begin[{] method[awaitState, return_type[void], modifier[private], parameter[expectedState]] begin[{] while[binary_operation[THIS[member[None.lifeCycle]call[None.getState, parameter[]]], !=, member[.expectedState]]] begin[{] TryStatement(block=[StatementExpress...
Keyword[private] Keyword[void] identifier[awaitState] operator[SEP] identifier[State] identifier[expectedState] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[while] operator[SEP] Keyword[this] operator[SEP] identifier[lifeCycle] operator[SEP] identifier[getState] operator[SEP] operator[SEP] opera...
private String getWebSocketURL(HttpRequest req) { String protocol = Constants.WS_SCHEME; if (secureConnection) { protocol = Constants.WSS_SCHEME; } return protocol + "://" + req.headers().get("Host") + req.uri(); }
class class_name[name] begin[{] method[getWebSocketURL, return_type[type[String]], modifier[private], parameter[req]] begin[{] local_variable[type[String], protocol] if[member[.secureConnection]] begin[{] assign[member[.protocol], member[Constants.WSS_SCHEME]] ...
Keyword[private] identifier[String] identifier[getWebSocketURL] operator[SEP] identifier[HttpRequest] identifier[req] operator[SEP] { identifier[String] identifier[protocol] operator[=] identifier[Constants] operator[SEP] identifier[WS_SCHEME] operator[SEP] Keyword[if] operator[SEP] identifier[secureConnection] ...
public static RecordingUpdater updater(final String pathAccountSid, final String pathConferenceSid, final String pathSid, final Recording.Status status) { return new RecordingUpdat...
class class_name[name] begin[{] method[updater, return_type[type[RecordingUpdater]], modifier[public static], parameter[pathAccountSid, pathConferenceSid, pathSid, status]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pathAccountSid, postfix_operators=[], prefix_operators=[], qualifie...
Keyword[public] Keyword[static] identifier[RecordingUpdater] identifier[updater] operator[SEP] Keyword[final] identifier[String] identifier[pathAccountSid] , Keyword[final] identifier[String] identifier[pathConferenceSid] , Keyword[final] identifier[String] identifier[pathSid] , Keyword[final] identifier[Recording] ...
private IAtomContainer buildChain(int length, boolean isMainCyclic) { IAtomContainer currentChain; if (length > 0) { //If is cyclic if (isMainCyclic) { //Rely on CDK's ring class constructor to generate our cyclic molecules. currentChain = currentM...
class class_name[name] begin[{] method[buildChain, return_type[type[IAtomContainer]], modifier[private], parameter[length, isMainCyclic]] begin[{] local_variable[type[IAtomContainer], currentChain] if[binary_operation[member[.length], >, literal[0]]] begin[{] if[...
Keyword[private] identifier[IAtomContainer] identifier[buildChain] operator[SEP] Keyword[int] identifier[length] , Keyword[boolean] identifier[isMainCyclic] operator[SEP] { identifier[IAtomContainer] identifier[currentChain] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[>] Other[0] operato...
@Override public boolean checkMgtKeyInUse(String CorpNum, int ItemCode, String MgtKey) throws PopbillException { if (MgtKey == null || MgtKey.isEmpty()) throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다."); try{ StatementInfo info = httpget("/Statement/" + ItemCode + "/" + MgtKey, C...
class class_name[name] begin[{] method[checkMgtKeyInUse, return_type[type[boolean]], modifier[public], parameter[CorpNum, ItemCode, MgtKey]] begin[{] if[binary_operation[binary_operation[member[.MgtKey], ==, literal[null]], ||, call[MgtKey.isEmpty, parameter[]]]] begin[{] ThrowStatement(express...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[checkMgtKeyInUse] operator[SEP] identifier[String] identifier[CorpNum] , Keyword[int] identifier[ItemCode] , identifier[String] identifier[MgtKey] operator[SEP] Keyword[throws] identifier[PopbillException] { Keyword[if] operator[SEP...
void onSurfaceChanged(int width, int height) { Log.v(TAG, "onSurfaceChanged"); final VrAppSettings.EyeBufferParams.DepthFormat depthFormat = mApplication.getAppSettings().getEyeBufferParams().getDepthFormat(); mApplication.getConfigurationManager().configureRendering(VrAppSettings.EyeBufferPara...
class class_name[name] begin[{] method[onSurfaceChanged, return_type[void], modifier[default], parameter[width, height]] begin[{] call[Log.v, parameter[member[.TAG], literal["onSurfaceChanged"]]] local_variable[type[VrAppSettings], depthFormat] call[mApplication.getConfi...
Keyword[void] identifier[onSurfaceChanged] operator[SEP] Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] { identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[VrAppSettings] operator[SEP...
public static BigRational bernoulli(int n) { if (n < 0) { throw new ArithmeticException("Illegal bernoulli(n) for n < 0: n = " + n); } if (n == 1) { return valueOf(-1, 2); } else if (n % 2 == 1) { return ZERO; } synchronized (bernoulliCache) { int index = n ...
class class_name[name] begin[{] method[bernoulli, return_type[type[BigRational]], modifier[public static], parameter[n]] begin[{] if[binary_operation[member[.n], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_opera...
Keyword[public] Keyword[static] identifier[BigRational] identifier[bernoulli] operator[SEP] Keyword[int] identifier[n] operator[SEP] { Keyword[if] operator[SEP] identifier[n] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] ...
public static NetworkConfig fromJsonStream(InputStream configStream) throws InvalidArgumentException, NetworkConfigurationException { logger.trace("NetworkConfig.fromJsonStream..."); // Sanity check if (configStream == null) { throw new InvalidArgumentException("configStream must b...
class class_name[name] begin[{] method[fromJsonStream, return_type[type[NetworkConfig]], modifier[public static], parameter[configStream]] begin[{] call[logger.trace, parameter[literal["NetworkConfig.fromJsonStream..."]]] if[binary_operation[member[.configStream], ==, literal[nu...
Keyword[public] Keyword[static] identifier[NetworkConfig] identifier[fromJsonStream] operator[SEP] identifier[InputStream] identifier[configStream] operator[SEP] Keyword[throws] identifier[InvalidArgumentException] , identifier[NetworkConfigurationException] { identifier[logger] operator[SEP] identifier[trace] ...
public static MimeBodyPart newAttachmentBodyPart( String content, String contentId, String mimeType, String fileName) throws MessagingException, IOException { MimeBodyPart mimeBodyPart = new MimeBodyPart(); // log.debug("Creating an attachment for content '{}', mimeType '{}', fileName '{}'.", new Object[] ...
class class_name[name] begin[{] method[newAttachmentBodyPart, return_type[type[MimeBodyPart]], modifier[public static], parameter[content, contentId, mimeType, fileName]] begin[{] local_variable[type[MimeBodyPart], mimeBodyPart] call[mimeBodyPart.setDataHandler, parameter[ClassCreator(a...
Keyword[public] Keyword[static] identifier[MimeBodyPart] identifier[newAttachmentBodyPart] operator[SEP] identifier[String] identifier[content] , identifier[String] identifier[contentId] , identifier[String] identifier[mimeType] , identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[Messa...
@Override void completeCandidates(CommandContext ctx, String buffer, int cursor, List<String> candidates) { boolean quoted = buffer.startsWith("\""); if (candidates.size() == 1) { // Escaping must occur in all cases. // if quoted, only " will be escaped. EscapeSel...
class class_name[name] begin[{] method[completeCandidates, return_type[void], modifier[default], parameter[ctx, buffer, cursor, candidates]] begin[{] local_variable[type[boolean], quoted] if[binary_operation[call[candidates.size, parameter[]], ==, literal[1]]] begin[{] local...
annotation[@] identifier[Override] Keyword[void] identifier[completeCandidates] operator[SEP] identifier[CommandContext] identifier[ctx] , identifier[String] identifier[buffer] , Keyword[int] identifier[cursor] , identifier[List] operator[<] identifier[String] operator[>] identifier[candidates] operator[SEP] { ...
private Object getEntryAfterMiss(TransactionLocal key, int i, Entry e) { Entry[] tab = table; int len = tab.length; while (e != null) { if (e.key == key) return e.value; i = nextIndex(i, len); e = tab[i]; } ...
class class_name[name] begin[{] method[getEntryAfterMiss, return_type[type[Object]], modifier[private], parameter[key, i, e]] begin[{] local_variable[type[Entry], tab] local_variable[type[int], len] while[binary_operation[member[.e], !=, literal[null]]] begin[{] ...
Keyword[private] identifier[Object] identifier[getEntryAfterMiss] operator[SEP] identifier[TransactionLocal] identifier[key] , Keyword[int] identifier[i] , identifier[Entry] identifier[e] operator[SEP] { identifier[Entry] operator[SEP] operator[SEP] identifier[tab] operator[=] identifier[table] operator[SEP] K...
protected BaseTile computeFringeTile (int tx, int ty) { return _ctx.getTileManager().getAutoFringer().getFringeTile(_model, tx, ty, _fringes, _masks); }
class class_name[name] begin[{] method[computeFringeTile, return_type[type[BaseTile]], modifier[protected], parameter[tx, ty]] begin[{] return[call[_ctx.getTileManager, parameter[]]] end[}] END[}]
Keyword[protected] identifier[BaseTile] identifier[computeFringeTile] operator[SEP] Keyword[int] identifier[tx] , Keyword[int] identifier[ty] operator[SEP] { Keyword[return] identifier[_ctx] operator[SEP] identifier[getTileManager] operator[SEP] operator[SEP] operator[SEP] identifier[getAutoFringer] operator[SE...
public void removeEMF(String applicationToken) { if (emfMap != null) { EntityManagerFactory emf = emfMap.get(applicationToken); if (emf != null) { emf.close(); } emfMap.remove(applicationToken); } }
class class_name[name] begin[{] method[removeEMF, return_type[void], modifier[public], parameter[applicationToken]] begin[{] if[binary_operation[member[.emfMap], !=, literal[null]]] begin[{] local_variable[type[EntityManagerFactory], emf] if[binary_operation[...
Keyword[public] Keyword[void] identifier[removeEMF] operator[SEP] identifier[String] identifier[applicationToken] operator[SEP] { Keyword[if] operator[SEP] identifier[emfMap] operator[!=] Other[null] operator[SEP] { identifier[EntityManagerFactory] identifier[emf] operator[=] identifier[emfMap] operat...
public Descriptor replaceAllCalls(PSequence<Call<?, ?>> calls) { return new Descriptor(name, calls, pathParamSerializers, messageSerializers, serializerFactory, exceptionSerializer, autoAcl, acls, headerFilter, locatableService, circuitBreaker, topicCalls); }
class class_name[name] begin[{] method[replaceAllCalls, return_type[type[Descriptor]], modifier[public], parameter[calls]] begin[{] return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=calls, postfix_ope...
Keyword[public] identifier[Descriptor] identifier[replaceAllCalls] operator[SEP] identifier[PSequence] operator[<] identifier[Call] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[calls] operator[SEP] { Keyword[return] Keyword[new] identifier[Descriptor] operator[SEP] identifier[name] ,...
public static void writeSchema(String outputPath, Schema schema, JavaSparkContext sc) throws IOException { writeStringToFile(outputPath, schema.toString(), sc); }
class class_name[name] begin[{] method[writeSchema, return_type[void], modifier[public static], parameter[outputPath, schema, sc]] begin[{] call[.writeStringToFile, parameter[member[.outputPath], call[schema.toString, parameter[]], member[.sc]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeSchema] operator[SEP] identifier[String] identifier[outputPath] , identifier[Schema] identifier[schema] , identifier[JavaSparkContext] identifier[sc] operator[SEP] Keyword[throws] identifier[IOException] { identifier[writeStringToFile] operator[SEP]...
@Override public List<BlogEntry.Category> getCategories() throws BlogClientException { if (entriesCollection == null) { throw new BlogClientException("No primary entry collection"); } return entriesCollection.getCategories(); }
class class_name[name] begin[{] method[getCategories, return_type[type[List]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.entriesCollection], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_...
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[BlogEntry] operator[SEP] identifier[Category] operator[>] identifier[getCategories] operator[SEP] operator[SEP] Keyword[throws] identifier[BlogClientException] { Keyword[if] operator[SEP] identifier[entriesCollection] oper...