code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public final T fromString(final Map<String, Object> pAddParam, final String pStrVal) throws Exception { if (pStrVal == null || "".equals(pStrVal)) { return null; } T object = this.objectClass.newInstance(); for (String fldValStr : pStrVal.split(",")) { int eqIdx = fldValStr.i...
class class_name[name] begin[{] method[fromString, return_type[type[T]], modifier[final public], parameter[pAddParam, pStrVal]] begin[{] if[binary_operation[binary_operation[member[.pStrVal], ==, literal[null]], ||, literal[""]]] begin[{] return[literal[null]] else begin[{] ...
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[T] identifier[fromString] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[String] identifier[pStrVal] operator[SEP] Keyword[throws...
public static String getIfCacheNotNull(EntityColumn column, String contents) { StringBuilder sql = new StringBuilder(); sql.append("<if test=\"").append(column.getProperty()).append("_cache != null\">"); sql.append(contents); sql.append("</if>"); return sql.toString(); }
class class_name[name] begin[{] method[getIfCacheNotNull, return_type[type[String]], modifier[public static], parameter[column, contents]] begin[{] local_variable[type[StringBuilder], sql] call[sql.append, parameter[literal["<if test=\""]]] call[sql.append, parameter[mem...
Keyword[public] Keyword[static] identifier[String] identifier[getIfCacheNotNull] operator[SEP] identifier[EntityColumn] identifier[column] , identifier[String] identifier[contents] operator[SEP] { identifier[StringBuilder] identifier[sql] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator...
@Override public void resolve(final ValueStack values) throws Exception { if (values.size() < 2) throw new Exception("missing operands for " + toString()); try { final double multiplier = Math.pow(10, values.popDouble()); values.push(new Double(Math.ro...
class class_name[name] begin[{] method[resolve, return_type[void], modifier[public], parameter[values]] begin[{] if[binary_operation[call[values.size, parameter[]], <, literal[2]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[resolve] operator[SEP] Keyword[final] identifier[ValueStack] identifier[values] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP]...
public Config setProperty(String name, String value) { properties.put(name, value); return this; }
class class_name[name] begin[{] method[setProperty, return_type[type[Config]], modifier[public], parameter[name, value]] begin[{] call[properties.put, parameter[member[.name], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Config] identifier[setProperty] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[return]...
public boolean isAllowedCachedLeft(final ContextEntry[] context, final InternalFactHandle handle) { return (indexed[0] || constraints[0].isAllowedCachedLeft(context[0], handle)) && (indexed[1] || constraints[1].isAllowedCachedLeft(context[1], handle)) && ...
class class_name[name] begin[{] method[isAllowedCachedLeft, return_type[type[boolean]], modifier[public], parameter[context, handle]] begin[{] return[binary_operation[binary_operation[binary_operation[member[.indexed], ||, member[.constraints]], &&, binary_operation[member[.indexed], ||, member[.constr...
Keyword[public] Keyword[boolean] identifier[isAllowedCachedLeft] operator[SEP] Keyword[final] identifier[ContextEntry] operator[SEP] operator[SEP] identifier[context] , Keyword[final] identifier[InternalFactHandle] identifier[handle] operator[SEP] { Keyword[return] operator[SEP] identifier[indexed] operator[SEP...
void changeBackgroundAlpha() { Drawable background = getBackground(); if (background != null) { int newAlpha = (int) (ONE_HUNDRED * (1 - getVerticalDragOffset())); background.setAlpha(newAlpha); } }
class class_name[name] begin[{] method[changeBackgroundAlpha, return_type[void], modifier[default], parameter[]] begin[{] local_variable[type[Drawable], background] if[binary_operation[member[.background], !=, literal[null]]] begin[{] local_variable[type[int], newAlpha] ...
Keyword[void] identifier[changeBackgroundAlpha] operator[SEP] operator[SEP] { identifier[Drawable] identifier[background] operator[=] identifier[getBackground] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[background] operator[!=] Other[null] operator[SEP] { Keyword[in...
public static int damerauLevenshteinDistanceCaseInsensitive(String str1, String str2) { return damerauLevenshteinDistance(str1.toLowerCase(), str2.toLowerCase()); }
class class_name[name] begin[{] method[damerauLevenshteinDistanceCaseInsensitive, return_type[type[int]], modifier[public static], parameter[str1, str2]] begin[{] return[call[.damerauLevenshteinDistance, parameter[call[str1.toLowerCase, parameter[]], call[str2.toLowerCase, parameter[]]]]] end[}] EN...
Keyword[public] Keyword[static] Keyword[int] identifier[damerauLevenshteinDistanceCaseInsensitive] operator[SEP] identifier[String] identifier[str1] , identifier[String] identifier[str2] operator[SEP] { Keyword[return] identifier[damerauLevenshteinDistance] operator[SEP] identifier[str1] operator[SEP] identifie...
@Contract(pure = true) @NotNull public static Promise<Void> all(@NotNull List<? extends Promise<?>> promises) { int size = promises.size(); if (size == 0) return Promise.complete(); if (size == 1) return promises.get(0).toVoid(); if (size == 2) return promises.get(0).both(promises.get(1)); return all(promis...
class class_name[name] begin[{] method[all, return_type[type[Promise]], modifier[public static], parameter[promises]] begin[{] local_variable[type[int], size] if[binary_operation[member[.size], ==, literal[0]]] begin[{] return[call[Promise.complete, parameter[]]] else begin[{] N...
annotation[@] identifier[Contract] operator[SEP] identifier[pure] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[Promise] operator[<] identifier[Void] operator[>] identifier[all] operator[SEP] annotation[@] identifier[NotNull] identifier[List] ope...
public Workflow getWorkflow(String workflowId, boolean includeTasks) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); Workflow workflow = getForEntity("workflow/{workflowId}", new Object[]{"includeTasks", includeTasks}, Workflow.class, workflowId); ...
class class_name[name] begin[{] method[getWorkflow, return_type[type[Workflow]], modifier[public], parameter[workflowId, includeTasks]] begin[{] call[Preconditions.checkArgument, parameter[call[StringUtils.isNotBlank, parameter[member[.workflowId]]], literal["workflow id cannot be blank"]]] ...
Keyword[public] identifier[Workflow] identifier[getWorkflow] operator[SEP] identifier[String] identifier[workflowId] , Keyword[boolean] identifier[includeTasks] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotB...
public static Resource createResource(String resourcePath) throws IOException { if (resourcePath.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) { return Resource.newClassPathResource(resourcePath.substring(ResourceUtils.CLASSPATH_URL_PREFIX.length())); } else if (resourcePath.startsWith(ResourceUtils.FIL...
class class_name[name] begin[{] method[createResource, return_type[type[Resource]], modifier[public static], parameter[resourcePath]] begin[{] if[call[resourcePath.startsWith, parameter[member[ResourceUtils.CLASSPATH_URL_PREFIX]]]] begin[{] return[call[Resource.newClassPathResource,...
Keyword[public] Keyword[static] identifier[Resource] identifier[createResource] operator[SEP] identifier[String] identifier[resourcePath] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[resourcePath] operator[SEP] identifier[startsWith] operator[SEP] identifier[Resour...
ByteBuffer readView(int position) { ByteBuffer bb = content.duplicate().asReadOnlyBuffer(); bb.position(position); return bb; }
class class_name[name] begin[{] method[readView, return_type[type[ByteBuffer]], modifier[default], parameter[position]] begin[{] local_variable[type[ByteBuffer], bb] call[bb.position, parameter[member[.position]]] return[member[.bb]] end[}] END[}]
identifier[ByteBuffer] identifier[readView] operator[SEP] Keyword[int] identifier[position] operator[SEP] { identifier[ByteBuffer] identifier[bb] operator[=] identifier[content] operator[SEP] identifier[duplicate] operator[SEP] operator[SEP] operator[SEP] identifier[asReadOnlyBuffer] operator[SEP] operator[SEP] ...
synchronized public void set(Element value) { int bind = ((int)value.getIndex() & Integer.MAX_VALUE) % buckets.length; Element[] bucket = buckets[bind]; int count = counts[bind]; if (bucket == null) buckets[bind] = bucket = new Element[initBucketSize]; else if (bucket.length == count) { ...
class class_name[name] begin[{] method[set, return_type[void], modifier[synchronized public], parameter[value]] begin[{] local_variable[type[int], bind] local_variable[type[Element], bucket] local_variable[type[int], count] if[binary_operation[member[.bucket], ==, litera...
Keyword[synchronized] Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[Element] identifier[value] operator[SEP] { Keyword[int] identifier[bind] operator[=] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP]...
public List<Double> getOffsetsInTimeUnits() { double start = firstDate.getMillis(); List<Double> result = new ArrayList<>(runtimes.length); for (int idx=0; idx<runtimes.length; idx++) { double runtime = (double) getRuntime(idx); double msecs = (runtime - start); result.add(msecs / timeUni...
class class_name[name] begin[{] method[getOffsetsInTimeUnits, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[double], start] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotat...
Keyword[public] identifier[List] operator[<] identifier[Double] operator[>] identifier[getOffsetsInTimeUnits] operator[SEP] operator[SEP] { Keyword[double] identifier[start] operator[=] identifier[firstDate] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<...
private int expandCompositChar(char[] dest, int start, int length, int lacount, int shapingMode) throws ArabicShapingException { int lenOptionsLamAlef = options & LAMALEF_MASK; int le...
class class_name[name] begin[{] method[expandCompositChar, return_type[type[int]], modifier[private], parameter[dest, start, length, lacount, shapingMode]] begin[{] local_variable[type[int], lenOptionsLamAlef] local_variable[type[int], lenOptionsSeen] local_variable[type[int], lenOption...
Keyword[private] Keyword[int] identifier[expandCompositChar] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[start] , Keyword[int] identifier[length] , Keyword[int] identifier[lacount] , Keyword[int] identifier[shapingMode] operator[SEP] Keyword[throws] identifier[...
public void setSupportedEndpointTypes(java.util.Collection<SupportedEndpointType> supportedEndpointTypes) { if (supportedEndpointTypes == null) { this.supportedEndpointTypes = null; return; } this.supportedEndpointTypes = new java.util.ArrayList<SupportedEndpointType>(su...
class class_name[name] begin[{] method[setSupportedEndpointTypes, return_type[void], modifier[public], parameter[supportedEndpointTypes]] begin[{] if[binary_operation[member[.supportedEndpointTypes], ==, literal[null]]] begin[{] assign[THIS[member[None.supportedEndpointT...
Keyword[public] Keyword[void] identifier[setSupportedEndpointTypes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[SupportedEndpointType] operator[>] identifier[supportedEndpointTypes] operator[SEP] { Keyword[if] operator[SEP] identifier[...
public static IndexChangeAdapter forEnumeratedProperty( ExecutionContext context, NodeTypePredicate matcher, String workspaceName, Name prop...
class class_name[name] begin[{] method[forEnumeratedProperty, return_type[type[IndexChangeAdapter]], modifier[public static], parameter[context, matcher, workspaceName, propertyName, index]] begin[{] return[ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[...
Keyword[public] Keyword[static] identifier[IndexChangeAdapter] identifier[forEnumeratedProperty] operator[SEP] identifier[ExecutionContext] identifier[context] , identifier[NodeTypePredicate] identifier[matcher] , identifier[String] identifier[workspaceName] , identifier[Name] identifier[propertyName] , identifier[...
@Nonnull public static <T> EbInterfaceReader <T> create (@Nonnull final Class <T> aClass) { return new EbInterfaceReader <> (aClass); }
class class_name[name] begin[{] method[create, return_type[type[EbInterfaceReader]], modifier[public static], parameter[aClass]] begin[{] return[ClassCreator(arguments=[MemberReference(member=aClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_argu...
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[EbInterfaceReader] operator[<] identifier[T] operator[>] identifier[create] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier...
public JobExecutionResult execute(String job_name) throws Exception { distributeFiles(); JobExecutionResult result = this.env.execute(job_name); return result; }
class class_name[name] begin[{] method[execute, return_type[type[JobExecutionResult]], modifier[public], parameter[job_name]] begin[{] call[.distributeFiles, parameter[]] local_variable[type[JobExecutionResult], result] return[member[.result]] end[}] END[}]
Keyword[public] identifier[JobExecutionResult] identifier[execute] operator[SEP] identifier[String] identifier[job_name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[distributeFiles] operator[SEP] operator[SEP] operator[SEP] identifier[JobExecutionResult] identifier[result] operator[=] Keywor...
public GeocoderAddressComponent getAddressComponent(AddressComponentType addressComponentType) { for (GeocoderAddressComponent component : getPlace().getAddressComponents()) { for (String type : component.getTypes()) { if (addressComponentType.getName().equals(type)) { ...
class class_name[name] begin[{] method[getAddressComponent, return_type[type[GeocoderAddressComponent]], modifier[public], parameter[addressComponentType]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Me...
Keyword[public] identifier[GeocoderAddressComponent] identifier[getAddressComponent] operator[SEP] identifier[AddressComponentType] identifier[addressComponentType] operator[SEP] { Keyword[for] operator[SEP] identifier[GeocoderAddressComponent] identifier[component] operator[:] identifier[getPlace] operator[SEP...
public static java.util.Date getDateTime(Object value) { try { return toDateTime(value); } catch (ParseException pe) { pe.printStackTrace(); return null; } }
class class_name[name] begin[{] method[getDateTime, return_type[type[java]], modifier[public static], parameter[value]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]...
Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[getDateTime] operator[SEP] identifier[Object] identifier[value] operator[SEP] { Keyword[try] { Keyword[return] identifier[toDateTime] operator[SEP] identifier[value] operator[SEP] ...
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (null != params) { this.serializer = params.getDefaultSerializer(); } }
class class_name[name] begin[{] method[readObject, return_type[void], modifier[private], parameter[in]] begin[{] call[in.defaultReadObject, parameter[]] if[binary_operation[literal[null], !=, member[.params]]] begin[{] assign[THIS[member[None.serializer]]...
Keyword[private] Keyword[void] identifier[readObject] operator[SEP] identifier[ObjectInputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[in] operator[SEP] identifier[defaultReadObject] operator[SEP] operator[SEP] operator[SEP] Keywo...
@Deprecated protected int handleGetExtendedYear() { // Ethiopic calendar uses EXTENDED_YEAR aligned to // Amelete Mihret year always. int eyear; if (newerField(EXTENDED_YEAR, YEAR) == EXTENDED_YEAR) { eyear = internalGet(EXTENDED_YEAR, 1); // Default to year 1 } e...
class class_name[name] begin[{] method[handleGetExtendedYear, return_type[type[int]], modifier[protected], parameter[]] begin[{] local_variable[type[int], eyear] if[binary_operation[call[.newerField, parameter[member[.EXTENDED_YEAR], member[.YEAR]]], ==, member[.EXTENDED_YEAR]]] begin[{...
annotation[@] identifier[Deprecated] Keyword[protected] Keyword[int] identifier[handleGetExtendedYear] operator[SEP] operator[SEP] { Keyword[int] identifier[eyear] operator[SEP] Keyword[if] operator[SEP] identifier[newerField] operator[SEP] identifier[EXTENDED_YEAR] , identifier[YEAR] operator[SEP] operator[==]...
static String extractSimpleName(String fqcn, String separator) { if (fqcn.contains(separator)) { return fqcn.substring(fqcn.lastIndexOf(separator) + 1, fqcn.length()); } else { return fqcn; } }
class class_name[name] begin[{] method[extractSimpleName, return_type[type[String]], modifier[static], parameter[fqcn, separator]] begin[{] if[call[fqcn.contains, parameter[member[.separator]]]] begin[{] return[call[fqcn.substring, parameter[binary_operation[call[fqcn.lastIndexOf, p...
Keyword[static] identifier[String] identifier[extractSimpleName] operator[SEP] identifier[String] identifier[fqcn] , identifier[String] identifier[separator] operator[SEP] { Keyword[if] operator[SEP] identifier[fqcn] operator[SEP] identifier[contains] operator[SEP] identifier[separator] operator[SEP] operator[S...
private static ColumnCapabilities getEffectiveCapabilities( DimensionSpec dimSpec, @Nullable ColumnCapabilities capabilities ) { if (capabilities == null) { capabilities = DEFAULT_STRING_CAPABILITIES; } // Complex dimension type is not supported if (capabilities.getType() == Value...
class class_name[name] begin[{] method[getEffectiveCapabilities, return_type[type[ColumnCapabilities]], modifier[private static], parameter[dimSpec, capabilities]] begin[{] if[binary_operation[member[.capabilities], ==, literal[null]]] begin[{] assign[member[.capabilitie...
Keyword[private] Keyword[static] identifier[ColumnCapabilities] identifier[getEffectiveCapabilities] operator[SEP] identifier[DimensionSpec] identifier[dimSpec] , annotation[@] identifier[Nullable] identifier[ColumnCapabilities] identifier[capabilities] operator[SEP] { Keyword[if] operator[SEP] identifier[capab...
public static List<CPOptionCategory> findByGroupId(long groupId, int start, int end) { return getPersistence().findByGroupId(groupId, start, end); }
class class_name[name] begin[{] method[findByGroupId, return_type[type[List]], modifier[public static], parameter[groupId, start, end]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CPOptionCategory] operator[>] identifier[findByGroupId] operator[SEP] Keyword[long] identifier[groupId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP...
public static void deleteIfExists(File file) throws IOException { if (file.exists()) { if (file.isFile()) { if (!file.delete()) { throw new IOException("Delete file failure,path:" + file.getAbsolutePath()); } } else { File[] files = file.listFiles(); if (files !...
class class_name[name] begin[{] method[deleteIfExists, return_type[void], modifier[public static], parameter[file]] begin[{] if[call[file.exists, parameter[]]] begin[{] if[call[file.isFile, parameter[]]] begin[{] if[call[file.delete, param...
Keyword[public] Keyword[static] Keyword[void] identifier[deleteIfExists] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keywo...
public int compareTo(Version that) { if (that == null) { return 1; } if (major != that.major) { return major - that.major; } if (minor != that.minor) { return minor - that.minor; } if (bugfix != that.bugfix) { return bugfix - that.bugfix; } if (build != t...
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[that]] begin[{] if[binary_operation[member[.that], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[memb...
Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Version] identifier[that] operator[SEP] { Keyword[if] operator[SEP] identifier[that] operator[==] Other[null] operator[SEP] { Keyword[return] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[major] o...
public void writeDefinition(final OutputStream result) throws IOException { result.write(OPEN_GROUP); result.write(LIST_TABLE); this.document.outputDebugLinebreak(result); for(int i = 0; i < picturelists.size(); i++) { RtfPictureList l = (RtfPictureList)picturelists...
class class_name[name] begin[{] method[writeDefinition, return_type[void], modifier[public], parameter[result]] begin[{] call[result.write, parameter[member[.OPEN_GROUP]]] call[result.write, parameter[member[.LIST_TABLE]]] THIS[member[None.document]call[None.outp...
Keyword[public] Keyword[void] identifier[writeDefinition] operator[SEP] Keyword[final] identifier[OutputStream] identifier[result] operator[SEP] Keyword[throws] identifier[IOException] { identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[OPEN_GROUP] operator[SEP] operator[SEP] identifier...
private static String getEncodedInstance(String encodedResponse) { if (isReturnValue(encodedResponse) || isThrownException(encodedResponse)) { return encodedResponse.substring(4); } return encodedResponse; }
class class_name[name] begin[{] method[getEncodedInstance, return_type[type[String]], modifier[private static], parameter[encodedResponse]] begin[{] if[binary_operation[call[.isReturnValue, parameter[member[.encodedResponse]]], ||, call[.isThrownException, parameter[member[.encodedResponse]]]]]...
Keyword[private] Keyword[static] identifier[String] identifier[getEncodedInstance] operator[SEP] identifier[String] identifier[encodedResponse] operator[SEP] { Keyword[if] operator[SEP] identifier[isReturnValue] operator[SEP] identifier[encodedResponse] operator[SEP] operator[||] identifier[isThrownException] op...
@SuppressWarnings("unchecked") protected Flash getFlashCookie(HttpServerExchange exchange) { Flash flash = Flash.create(); final String cookieValue = getCookieValue(exchange, this.config.getFlashCookieName()); if (StringUtils.isNotBlank(cookieValue)) { try { ...
class class_name[name] begin[{] method[getFlashCookie, return_type[type[Flash]], modifier[protected], parameter[exchange]] begin[{] local_variable[type[Flash], flash] local_variable[type[String], cookieValue] if[call[StringUtils.isNotBlank, parameter[member[.cookieValue]]]] begi...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[Flash] identifier[getFlashCookie] operator[SEP] identifier[HttpServerExchange] identifier[exchange] operator[SEP] { identifier[Flash] identifier[flash] operator[=] identifier[Flash] operator[SEP] ...
public static <T extends TypeDescription> ElementMatcher.Junction<T> isAnnotation() { return new ModifierMatcher<T>(ModifierMatcher.Mode.ANNOTATION); }
class class_name[name] begin[{] method[isAnnotation, return_type[type[ElementMatcher]], modifier[public static], parameter[]] begin[{] return[ClassCreator(arguments=[MemberReference(member=ANNOTATION, postfix_operators=[], prefix_operators=[], qualifier=ModifierMatcher.Mode, selectors=[])], body=None, ...
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[TypeDescription] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[isAnnotation] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Mod...
public void updateMode(ConnectionMode connectionMode) { switch (connectionMode) { case SEND_ONLY: this.rtpHandler.setReceivable(false); this.rtpHandler.setLoopable(false); audioComponent.updateMode(false, true); oobComponent.updateMode(...
class class_name[name] begin[{] method[updateMode, return_type[void], modifier[public], parameter[connectionMode]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['SEND_ONLY'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors...
Keyword[public] Keyword[void] identifier[updateMode] operator[SEP] identifier[ConnectionMode] identifier[connectionMode] operator[SEP] { Keyword[switch] operator[SEP] identifier[connectionMode] operator[SEP] { Keyword[case] identifier[SEND_ONLY] operator[:] Keyword[this] operator[SEP] identifier[rtpH...
public static String UUID( long lo, long hi ) { long lo0 = (lo>>32)&0xFFFFFFFFL; long lo1 = (lo>>16)&0xFFFFL; long lo2 = (lo>> 0)&0xFFFFL; long hi0 = (hi>>48)&0xFFFFL; long hi1 = (hi>> 0)&0xFFFFFFFFFFFFL; return String.format("%08X-%04X-%04X-%04X-%012X",lo0,lo1,lo2,hi0,hi1); }
class class_name[name] begin[{] method[UUID, return_type[type[String]], modifier[public static], parameter[lo, hi]] begin[{] local_variable[type[long], lo0] local_variable[type[long], lo1] local_variable[type[long], lo2] local_variable[type[long], hi0] local_variable[typ...
Keyword[public] Keyword[static] identifier[String] identifier[UUID] operator[SEP] Keyword[long] identifier[lo] , Keyword[long] identifier[hi] operator[SEP] { Keyword[long] identifier[lo0] operator[=] operator[SEP] identifier[lo] operator[>] operator[>] Other[32] operator[SEP] operator[&] literal[Integer] operat...
public static boolean isPortAvailable(final int port) { try (ServerSocket tcp = new ServerSocket(port); DatagramSocket udp = new DatagramSocket(port)) { return tcp.isBound() && udp.isBound(); } catch (Exception e) { //NOSONAR return false; } }
class class_name[name] begin[{] method[isPortAvailable, return_type[type[boolean]], modifier[public static], parameter[port]] begin[{] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isBound, postfix_operators=[], prefix_operators=[], qualif...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPortAvailable] operator[SEP] Keyword[final] Keyword[int] identifier[port] operator[SEP] { Keyword[try] operator[SEP] identifier[ServerSocket] identifier[tcp] operator[=] Keyword[new] identifier[ServerSocket] operator[SEP] identifier[port] operator[SEP...
@Override public DescribeSMBSettingsResult describeSMBSettings(DescribeSMBSettingsRequest request) { request = beforeClientExecution(request); return executeDescribeSMBSettings(request); }
class class_name[name] begin[{] method[describeSMBSettings, return_type[type[DescribeSMBSettingsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeSMBSettings, parameter...
annotation[@] identifier[Override] Keyword[public] identifier[DescribeSMBSettingsResult] identifier[describeSMBSettings] operator[SEP] identifier[DescribeSMBSettingsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ope...
static boolean memequal(byte[] b1, byte[] b2, int len) { if(b1 == b2) return true; if(b1 == null || b2 == null) return false; if(b1.length < len || b2.length < len) return false; for(int i = 0; i < len; i++) { if(b1[i] != b2[i]) return false; } return ...
class class_name[name] begin[{] method[memequal, return_type[type[boolean]], modifier[static], parameter[b1, b2, len]] begin[{] if[binary_operation[member[.b1], ==, member[.b2]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[binary_...
Keyword[static] Keyword[boolean] identifier[memequal] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b1] , Keyword[byte] operator[SEP] operator[SEP] identifier[b2] , Keyword[int] identifier[len] operator[SEP] { Keyword[if] operator[SEP] identifier[b1] operator[==] identifier[b2] operator[SE...
public static void saveBmp(Bitmap src, String fileName) throws ImageSaveException { try { BitmapUtil.save(src, fileName); } catch (IOException e) { throw new ImageSaveException(e); } }
class class_name[name] begin[{] method[saveBmp, return_type[void], modifier[public static], parameter[src, fileName]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),...
Keyword[public] Keyword[static] Keyword[void] identifier[saveBmp] operator[SEP] identifier[Bitmap] identifier[src] , identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[ImageSaveException] { Keyword[try] { identifier[BitmapUtil] operator[SEP] identifier[save] operator[SEP...
public boolean containsKey(Object key) { if (key==null) return _nullEntry!=null; return getEntry(key.toString(),0,key==null?0:key.toString().length())!=null; }
class class_name[name] begin[{] method[containsKey, return_type[type[boolean]], modifier[public], parameter[key]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] return[binary_operation[member[._nullEntry], !=, literal[null]]] else begin[{] None end[}] ...
Keyword[public] Keyword[boolean] identifier[containsKey] operator[SEP] identifier[Object] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] Keyword[return] identifier[_nullEntry] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[getEn...
public void setController(@Nullable DraweeController draweeController) { boolean wasAttached = mIsControllerAttached; if (wasAttached) { detachController(); } // Clear the old controller if (isControllerValid()) { mEventTracker.recordEvent(Event.ON_CLEAR_OLD_CONTROLLER); mControll...
class class_name[name] begin[{] method[setController, return_type[void], modifier[public], parameter[draweeController]] begin[{] local_variable[type[boolean], wasAttached] if[member[.wasAttached]] begin[{] call[.detachController, parameter[]] else begin[{...
Keyword[public] Keyword[void] identifier[setController] operator[SEP] annotation[@] identifier[Nullable] identifier[DraweeController] identifier[draweeController] operator[SEP] { Keyword[boolean] identifier[wasAttached] operator[=] identifier[mIsControllerAttached] operator[SEP] Keyword[if] operator[SEP] identif...
@Override protected Conduit getInbuiltBackChannel(Message inMessage) { if (inMessage.getExchange().isOneWay()) { return null; } final UDPConnectionInfo info = inMessage.get(UDPConnectionInfo.class); return new AbstractBackChannelConduit() { public void prepare...
class class_name[name] begin[{] method[getInbuiltBackChannel, return_type[type[Conduit]], modifier[protected], parameter[inMessage]] begin[{] if[call[inMessage.getExchange, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[...
annotation[@] identifier[Override] Keyword[protected] identifier[Conduit] identifier[getInbuiltBackChannel] operator[SEP] identifier[Message] identifier[inMessage] operator[SEP] { Keyword[if] operator[SEP] identifier[inMessage] operator[SEP] identifier[getExchange] operator[SEP] operator[SEP] operator[SEP] ident...
public void setFfdcAlready(boolean ffdcAlready) { this.ffdcAlready = ffdcAlready; if (tc.isDebugEnabled()) { Tr.debug(tc, "ffdc already handled? " + ffdcAlready); } }
class class_name[name] begin[{] method[setFfdcAlready, return_type[void], modifier[public], parameter[ffdcAlready]] begin[{] assign[THIS[member[None.ffdcAlready]], member[.ffdcAlready]] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, para...
Keyword[public] Keyword[void] identifier[setFfdcAlready] operator[SEP] Keyword[boolean] identifier[ffdcAlready] operator[SEP] { Keyword[this] operator[SEP] identifier[ffdcAlready] operator[=] identifier[ffdcAlready] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] o...
protected void renderTextAreaBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException { ResponseWriter writer = facesContext.getResponseWriter(); writer.startElement(HTML.TEXTAREA_ELEM, uiComponent); Map<String, List<ClientBehavior>> behaviors = null; ...
class class_name[name] begin[{] method[renderTextAreaBegin, return_type[void], modifier[protected], parameter[facesContext, uiComponent]] begin[{] local_variable[type[ResponseWriter], writer] call[writer.startElement, parameter[member[HTML.TEXTAREA_ELEM], member[.uiComponent]]] ...
Keyword[protected] Keyword[void] identifier[renderTextAreaBegin] operator[SEP] identifier[FacesContext] identifier[facesContext] , identifier[UIComponent] identifier[uiComponent] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ResponseWriter] identifier[writer] operator[=] identifier[facesCon...
private void doConnect() throws SessionTimeOutException{ long to = getConnectTimeOut(); if(clientSocket.isConnected()){ ErrorCode ec = sendConnectProtocol(to); // CONNECTION_LOSS means client data is inconsistence with server. now we check the last dxid of client. //...
class class_name[name] begin[{] method[doConnect, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[long], to] if[call[clientSocket.isConnected, parameter[]]] begin[{] local_variable[type[ErrorCode], ec] if[binary_operati...
Keyword[private] Keyword[void] identifier[doConnect] operator[SEP] operator[SEP] Keyword[throws] identifier[SessionTimeOutException] { Keyword[long] identifier[to] operator[=] identifier[getConnectTimeOut] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clientSocket] operator[SEP] ...
@Override public void removedService(ServiceReference<ServiceType> reference, ServiceType service) { for (int i = children.length - 1; i >= 0; i--) { children[i].removedService(reference, service); } super.removedService(reference, service); }
class class_name[name] begin[{] method[removedService, return_type[void], modifier[public], parameter[reference, service]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=children, postfix_operators=[], prefix_operators=[], qualifi...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removedService] operator[SEP] identifier[ServiceReference] operator[<] identifier[ServiceType] operator[>] identifier[reference] , identifier[ServiceType] identifier[service] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] ident...
public DescribeAddressesResult withAddresses(Address... addresses) { if (this.addresses == null) { setAddresses(new java.util.ArrayList<Address>(addresses.length)); } for (Address ele : addresses) { this.addresses.add(ele); } return this; }
class class_name[name] begin[{] method[withAddresses, return_type[type[DescribeAddressesResult]], modifier[public], parameter[addresses]] begin[{] if[binary_operation[THIS[member[None.addresses]], ==, literal[null]]] begin[{] call[.setAddresses, parameter[ClassCreator(ar...
Keyword[public] identifier[DescribeAddressesResult] identifier[withAddresses] operator[SEP] identifier[Address] operator[...] identifier[addresses] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[addresses] operator[==] Other[null] operator[SEP] { identifier[setAddress...
public void addDataElement(String elemName, String content, String attrName, String attrValue) { AttributesImpl attrs = new AttributesImpl(); attrs.addAttribute("", attrName, "", "CDATA", attrValue); writeDataElement(elemName, attrs, content); }
class class_name[name] begin[{] method[addDataElement, return_type[void], modifier[public], parameter[elemName, content, attrName, attrValue]] begin[{] local_variable[type[AttributesImpl], attrs] call[attrs.addAttribute, parameter[literal[""], member[.attrName], literal[""], literal["CD...
Keyword[public] Keyword[void] identifier[addDataElement] operator[SEP] identifier[String] identifier[elemName] , identifier[String] identifier[content] , identifier[String] identifier[attrName] , identifier[String] identifier[attrValue] operator[SEP] { identifier[AttributesImpl] identifier[attrs] operator[=] ...
public void marshall(ResourceTagMapping resourceTagMapping, ProtocolMarshaller protocolMarshaller) { if (resourceTagMapping == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(resourceTagMapping.getRes...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[resourceTagMapping, protocolMarshaller]] begin[{] if[binary_operation[member[.resourceTagMapping], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(p...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ResourceTagMapping] identifier[resourceTagMapping] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceTagMapping] operator[==] Other[null] operator[SEP] { ...
public static Object callMethod(Object o, String method, Object[] params) { // Get the objects class. Class cls = o.getClass(); // Get the classes of the parameters. Class[] paramClasses = new Class[params.length]; for (int i = 0; i < params.length; i++) { ...
class class_name[name] begin[{] method[callMethod, return_type[type[Object]], modifier[public static], parameter[o, method, params]] begin[{] local_variable[type[Class], cls] local_variable[type[Class], paramClasses] ForStatement(body=BlockStatement(label=None, statements=[StatementExpr...
Keyword[public] Keyword[static] identifier[Object] identifier[callMethod] operator[SEP] identifier[Object] identifier[o] , identifier[String] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[params] operator[SEP] { identifier[Class] identifier[cls] operator[=] identifier[o] operat...
public Observable<ManagedInstanceVulnerabilityAssessmentInner> createOrUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceVulnerabilityAssessmentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, parameters).map(new Func1<Servi...
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, managedInstanceName, parameters]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.managedInstanceName], m...
Keyword[public] identifier[Observable] operator[<] identifier[ManagedInstanceVulnerabilityAssessmentInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[managedInstanceName] , identifier[ManagedInstanceVulnerabilityAssessment...
@Override protected void defineWidgets() { // initialize the project object to use for the dialog initSessionObject(); setKeyPrefix(KEY_PREFIX); // widgets to display addWidget(new CmsWidgetDialogParameter( this, "resources", "/", ...
class class_name[name] begin[{] method[defineWidgets, return_type[void], modifier[protected], parameter[]] begin[{] call[.initSessionObject, parameter[]] call[.setKeyPrefix, parameter[member[.KEY_PREFIX]]] call[.addWidget, parameter[ClassCreator(arguments=[This(p...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[defineWidgets] operator[SEP] operator[SEP] { identifier[initSessionObject] operator[SEP] operator[SEP] operator[SEP] identifier[setKeyPrefix] operator[SEP] identifier[KEY_PREFIX] operator[SEP] operator[SEP] identifier[addWidget] opera...
public static void addInt(int value, int count, int startPos, int[] dest) { assert(count <= 32); assert(count > 0); assert(startPos >= 0); //System.err.println("addInt("+value+", "+count + ", "+startPos+")"); /* * Because we're using both 32 bit input and 32 bit output, ...
class class_name[name] begin[{] method[addInt, return_type[void], modifier[public static], parameter[value, count, startPos, dest]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Li...
Keyword[public] Keyword[static] Keyword[void] identifier[addInt] operator[SEP] Keyword[int] identifier[value] , Keyword[int] identifier[count] , Keyword[int] identifier[startPos] , Keyword[int] operator[SEP] operator[SEP] identifier[dest] operator[SEP] { Keyword[assert] operator[SEP] identifier[count] operato...
public void setStreamWriteSizeInBytes(final int streamWriteSizeInBytes) { if (streamWriteSizeInBytes > Constants.MAX_BLOCK_SIZE || streamWriteSizeInBytes < Constants.PAGE_SIZE) { throw new IllegalArgumentException("StreamWriteSizeInBytes"); } this.streamWriteSizeInBytes = streamWrit...
class class_name[name] begin[{] method[setStreamWriteSizeInBytes, return_type[void], modifier[public], parameter[streamWriteSizeInBytes]] begin[{] if[binary_operation[binary_operation[member[.streamWriteSizeInBytes], >, member[Constants.MAX_BLOCK_SIZE]], ||, binary_operation[member[.streamWrite...
Keyword[public] Keyword[void] identifier[setStreamWriteSizeInBytes] operator[SEP] Keyword[final] Keyword[int] identifier[streamWriteSizeInBytes] operator[SEP] { Keyword[if] operator[SEP] identifier[streamWriteSizeInBytes] operator[>] identifier[Constants] operator[SEP] identifier[MAX_BLOCK_SIZE] operator[||] ide...
<T> void query(Query<T> query, IOConsumer<T> f) throws IOException { run(() -> rw.run(query).forEachRemaining(IOConsumer.unchecked(f))); }
class class_name[name] begin[{] method[query, return_type[void], modifier[default], parameter[query, f]] begin[{] call[.run, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ru...
operator[<] identifier[T] operator[>] Keyword[void] identifier[query] operator[SEP] identifier[Query] operator[<] identifier[T] operator[>] identifier[query] , identifier[IOConsumer] operator[<] identifier[T] operator[>] identifier[f] operator[SEP] Keyword[throws] identifier[IOException] { identifier[run] opera...
public static base_responses Import(nitro_service client, appqoecustomresp resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appqoecustomresp Importresources[] = new appqoecustomresp[resources.length]; for (int i=0;i<resources.length;i++){ Impor...
class class_name[name] begin[{] method[Import, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{] local_variable[type[base_responses], result] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operatio...
Keyword[public] Keyword[static] identifier[base_responses] identifier[Import] operator[SEP] identifier[nitro_service] identifier[client] , identifier[appqoecustomresp] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[base_responses] identifier[re...
@BetaApi public final Operation insertInstanceGroupManager( String zone, InstanceGroupManager instanceGroupManagerResource) { InsertInstanceGroupManagerHttpRequest request = InsertInstanceGroupManagerHttpRequest.newBuilder() .setZone(zone) .setInstanceGroupManagerResource(in...
class class_name[name] begin[{] method[insertInstanceGroupManager, return_type[type[Operation]], modifier[final public], parameter[zone, instanceGroupManagerResource]] begin[{] local_variable[type[InsertInstanceGroupManagerHttpRequest], request] return[call[.insertInstanceGroupManager, paramete...
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[insertInstanceGroupManager] operator[SEP] identifier[String] identifier[zone] , identifier[InstanceGroupManager] identifier[instanceGroupManagerResource] operator[SEP] { identifier[InsertInstanceGroupManagerHttpReq...
@Override public GetDomainNamesResult getDomainNames(GetDomainNamesRequest request) { request = beforeClientExecution(request); return executeGetDomainNames(request); }
class class_name[name] begin[{] method[getDomainNames, return_type[type[GetDomainNamesResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetDomainNames, parameter[member[.reques...
annotation[@] identifier[Override] Keyword[public] identifier[GetDomainNamesResult] identifier[getDomainNames] operator[SEP] identifier[GetDomainNamesRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] oper...
private static boolean polylineRelatePoint_(Polyline polyline_a, Point point_b, double tolerance, int relation, ProgressTracker progress_tracker) { switch (relation) { case Relation.disjoint: return polylineDisjointPoint_(polyline_a, point_b, tolerance, progress_tracker); case Relation.contains: ...
class class_name[name] begin[{] method[polylineRelatePoint_, return_type[type[boolean]], modifier[private static], parameter[polyline_a, point_b, tolerance, relation, progress_tracker]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=disjoint, postfix_operators=[], pref...
Keyword[private] Keyword[static] Keyword[boolean] identifier[polylineRelatePoint_] operator[SEP] identifier[Polyline] identifier[polyline_a] , identifier[Point] identifier[point_b] , Keyword[double] identifier[tolerance] , Keyword[int] identifier[relation] , identifier[ProgressTracker] identifier[progress_tracker] ...
void deleteUserIndexForChains(int userIndex) { assert (m_chainIndices.get(userIndex) != null); m_chainIndices.set(userIndex, null); }
class class_name[name] begin[{] method[deleteUserIndexForChains, return_type[void], modifier[default], parameter[userIndex]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=userIndex, postfix_operators=[], prefix_operators=[], qualifier=, s...
Keyword[void] identifier[deleteUserIndexForChains] operator[SEP] Keyword[int] identifier[userIndex] operator[SEP] { Keyword[assert] operator[SEP] identifier[m_chainIndices] operator[SEP] identifier[get] operator[SEP] identifier[userIndex] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] identif...
public void encode(DerOutputStream out) throws IOException { DerOutputStream tmp = new DerOutputStream(); for (int i = 0; i < ids.size(); i++) { ids.elementAt(i).encode(tmp); } out.write(DerValue.tag_Sequence,tmp); }
class class_name[name] begin[{] method[encode, return_type[void], modifier[public], parameter[out]] begin[{] local_variable[type[DerOutputStream], tmp] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, p...
Keyword[public] Keyword[void] identifier[encode] operator[SEP] identifier[DerOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[DerOutputStream] identifier[tmp] operator[=] Keyword[new] identifier[DerOutputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[for...
@Override public boolean include(ArchivePath path) { if (paths.contains(path.get())) { return false; } return true; }
class class_name[name] begin[{] method[include, return_type[type[boolean]], modifier[public], parameter[path]] begin[{] if[call[paths.contains, parameter[call[path.get, parameter[]]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal[t...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[include] operator[SEP] identifier[ArchivePath] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[paths] operator[SEP] identifier[contains] operator[SEP] identifier[path] operator[SEP] identifier[get] operator[SEP] ...
public static String generateMD5(final byte[] input) { try { final MessageDigest messageDigest = MessageDigest.getInstance("MD5"); messageDigest.reset(); byte[] digest = messageDigest.digest(input); return new String(Hex.encodeHex(digest)); } catch (Except...
class class_name[name] begin[{] method[generateMD5, return_type[type[String]], modifier[public static], parameter[input]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operator...
Keyword[public] Keyword[static] identifier[String] identifier[generateMD5] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[input] operator[SEP] { Keyword[try] { Keyword[final] identifier[MessageDigest] identifier[messageDigest] operator[=] identifier[MessageDigest] op...
private static double contClassicLB(final double numSamplesF, final double theta, final double numSDev) { final double nHat = (numSamplesF - 0.5) / theta; final double b = numSDev * Math.sqrt((1.0 - theta) / theta); final double d = 0.5 * b * Math.sqrt((b * b) + (4.0 * nHat)); final double center...
class class_name[name] begin[{] method[contClassicLB, return_type[type[double]], modifier[private static], parameter[numSamplesF, theta, numSDev]] begin[{] local_variable[type[double], nHat] local_variable[type[double], b] local_variable[type[double], d] local_variable[type[doub...
Keyword[private] Keyword[static] Keyword[double] identifier[contClassicLB] operator[SEP] Keyword[final] Keyword[double] identifier[numSamplesF] , Keyword[final] Keyword[double] identifier[theta] , Keyword[final] Keyword[double] identifier[numSDev] operator[SEP] { Keyword[final] Keyword[double] identifier[nHat]...
@Contract(pure = true) @NotNull public static <T> Promise<List<T>> toList() { return Promise.of(emptyList()); }
class class_name[name] begin[{] method[toList, return_type[type[Promise]], modifier[public static], parameter[]] begin[{] return[call[Promise.of, parameter[call[.emptyList, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Contract] operator[SEP] identifier[pure] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[NotNull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Promise] operator[<] identifier[List] operator[<] identifier[T] operator[>] operator[>] identifi...
public Transport newTransport(ApitraryApi apitraryApi) { List<Class<Transport>> knownTransports = getAvailableTransports(); if (knownTransports.isEmpty()) { throw new ApiTransportException("No transport provider available. Is there one on the classpath?"); } return newTransport(apitraryApi, knownTransports.g...
class class_name[name] begin[{] method[newTransport, return_type[type[Transport]], modifier[public], parameter[apitraryApi]] begin[{] local_variable[type[List], knownTransports] if[call[knownTransports.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(ar...
Keyword[public] identifier[Transport] identifier[newTransport] operator[SEP] identifier[ApitraryApi] identifier[apitraryApi] operator[SEP] { identifier[List] operator[<] identifier[Class] operator[<] identifier[Transport] operator[>] operator[>] identifier[knownTransports] operator[=] identifier[getAvailableTran...
public static int[] arraySlice(int[] source, int start, int count) { int[] slice = new int[count]; System.arraycopy(source, start, slice, 0, count); return slice; }
class class_name[name] begin[{] method[arraySlice, return_type[type[int]], modifier[public static], parameter[source, start, count]] begin[{] local_variable[type[int], slice] call[System.arraycopy, parameter[member[.source], member[.start], member[.slice], literal[0], member[.count]]] ...
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[arraySlice] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[source] , Keyword[int] identifier[start] , Keyword[int] identifier[count] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[slice] ...
protected int extractDigit(final char value) throws NumberFormatException { if (Character.isDigit(value)) { return Character.digit(value, DEC_RADIX); } else { throw LOG.getCharacterIsNotADigitException(value); } }
class class_name[name] begin[{] method[extractDigit, return_type[type[int]], modifier[protected], parameter[value]] begin[{] if[call[Character.isDigit, parameter[member[.value]]]] begin[{] return[call[Character.digit, parameter[member[.value], member[.DEC_RADIX]]]] else begi...
Keyword[protected] Keyword[int] identifier[extractDigit] operator[SEP] Keyword[final] Keyword[char] identifier[value] operator[SEP] Keyword[throws] identifier[NumberFormatException] { Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[value] operator[SEP] o...
public static byte[] computeHash(String passwd) throws NoSuchAlgorithmException { java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-1"); md.reset(); md.update(passwd.getBytes()); return md.digest(); }
class class_name[name] begin[{] method[computeHash, return_type[type[byte]], modifier[public static], parameter[passwd]] begin[{] local_variable[type[java], md] call[md.reset, parameter[]] call[md.update, parameter[call[passwd.getBytes, parameter[]]]] return[call...
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[computeHash] operator[SEP] identifier[String] identifier[passwd] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] { identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[MessageDigest] id...
public static <T extends Annotation> T getAnnotation(Method method, Class<T> annotationClass) { T t = method.getAnnotation(annotationClass); if (t == null) { t = getAnnotation(method.getDeclaringClass(), annotationClass); } return t; }
class class_name[name] begin[{] method[getAnnotation, return_type[type[T]], modifier[public static], parameter[method, annotationClass]] begin[{] local_variable[type[T], t] if[binary_operation[member[.t], ==, literal[null]]] begin[{] assign[member[.t], call[.getA...
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Annotation] operator[>] identifier[T] identifier[getAnnotation] operator[SEP] identifier[Method] identifier[method] , identifier[Class] operator[<] identifier[T] operator[>] identifier[annotationClass] operator[SEP] { identifi...
public com.google.protobuf.ByteString getSortingCodeBytes() { java.lang.Object ref = sortingCode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); sortingCode_ = b; re...
class class_name[name] begin[{] method[getSortingCodeBytes, return_type[type[com]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] local_variable[type[com], b] ...
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getSortingCodeBytes] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] ident...
public static EObject getFirstContainerForPredicate(EObject element, Function1<? super EObject, ? extends Boolean> predicate) { if (predicate == null || element == null) { return null; } EObject elt = element.eContainer(); while (elt != null) { if (predicate.apply(elt)) { return elt; } elt = elt...
class class_name[name] begin[{] method[getFirstContainerForPredicate, return_type[type[EObject]], modifier[public static], parameter[element, predicate]] begin[{] if[binary_operation[binary_operation[member[.predicate], ==, literal[null]], ||, binary_operation[member[.element], ==, literal[null...
Keyword[public] Keyword[static] identifier[EObject] identifier[getFirstContainerForPredicate] operator[SEP] identifier[EObject] identifier[element] , identifier[Function1] operator[<] operator[?] Keyword[super] identifier[EObject] , operator[?] Keyword[extends] identifier[Boolean] operator[>] identifier[predicate] op...
private static void reallyValidatePseudoScopedBean(Bean<?> bean, BeanManagerImpl beanManager, Set<Object> dependencyPath, Set<Bean<?>> validatedBeans) { // see if we have already seen this bean in the dependency path if (dependencyPath.contains(bean)) { // create a list that shows the path t...
class class_name[name] begin[{] method[reallyValidatePseudoScopedBean, return_type[void], modifier[private static], parameter[bean, beanManager, dependencyPath, validatedBeans]] begin[{] if[call[dependencyPath.contains, parameter[member[.bean]]]] begin[{] local_variable[type[List], ...
Keyword[private] Keyword[static] Keyword[void] identifier[reallyValidatePseudoScopedBean] operator[SEP] identifier[Bean] operator[<] operator[?] operator[>] identifier[bean] , identifier[BeanManagerImpl] identifier[beanManager] , identifier[Set] operator[<] identifier[Object] operator[>] identifier[dependencyPath] , ...
private static void main(String[] args) { IPAccessHandler ipah = new IPAccessHandler(); ipah.setStandard("deny"); ipah.setAllowIP("217.215.71.167"); ipah.setDenyIP("217.215.71.149"); System.out.println(ipah.checkIP("217.215.71.245") + " = false"); System.out.println(i...
class class_name[name] begin[{] method[main, return_type[void], modifier[private static], parameter[args]] begin[{] local_variable[type[IPAccessHandler], ipah] call[ipah.setStandard, parameter[literal["deny"]]] call[ipah.setAllowIP, parameter[literal["217.215.71.167"]]] ...
Keyword[private] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[IPAccessHandler] identifier[ipah] operator[=] Keyword[new] identifier[IPAccessHandler] operator[SEP] operator[SEP] operator[SEP] identifier[ipah...
public static Color getColorProperty(String base, String property, boolean required) { return getColorProperty(base + JavaPropertyConstants.PROPERTY_DIVIDER + property, required); }
class class_name[name] begin[{] method[getColorProperty, return_type[type[Color]], modifier[public static], parameter[base, property, required]] begin[{] return[call[.getColorProperty, parameter[binary_operation[binary_operation[member[.base], +, member[JavaPropertyConstants.PROPERTY_DIVIDER]], +, memb...
Keyword[public] Keyword[static] identifier[Color] identifier[getColorProperty] operator[SEP] identifier[String] identifier[base] , identifier[String] identifier[property] , Keyword[boolean] identifier[required] operator[SEP] { Keyword[return] identifier[getColorProperty] operator[SEP] identifier[base] operator...
public static boolean isLocalTimeInRange(LocalTime value, LocalTime optionalMinimum, LocalTime optionalMaximum, boolean inclusiveOfEndpoints) { // If either bounding time does does not already exist, then set it to the maximum range. LocalTime minimum = (optionalMinimum == null) ? LocalTime....
class class_name[name] begin[{] method[isLocalTimeInRange, return_type[type[boolean]], modifier[public static], parameter[value, optionalMinimum, optionalMaximum, inclusiveOfEndpoints]] begin[{] local_variable[type[LocalTime], minimum] local_variable[type[LocalTime], maximum] if...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isLocalTimeInRange] operator[SEP] identifier[LocalTime] identifier[value] , identifier[LocalTime] identifier[optionalMinimum] , identifier[LocalTime] identifier[optionalMaximum] , Keyword[boolean] identifier[inclusiveOfEndpoints] operator[SEP] { iden...
private static String getFileExtension(Resource file) { String name = file.getName(); int index = name.lastIndexOf('.'); if (index == -1) return null; return name.substring(index + 1).trim(); }
class class_name[name] begin[{] method[getFileExtension, return_type[type[String]], modifier[private static], parameter[file]] begin[{] local_variable[type[String], name] local_variable[type[int], index] if[binary_operation[member[.index], ==, literal[1]]] begin[{] return[litera...
Keyword[private] Keyword[static] identifier[String] identifier[getFileExtension] operator[SEP] identifier[Resource] identifier[file] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier...
private void setColumnsSize(final double min, final double max, final String... columnPropertyIds) { for (final String columnPropertyId : columnPropertyIds) { getColumn(columnPropertyId).setMinimumWidth(min); getColumn(columnPropertyId).setMaximumWidth(max); } }
class class_name[name] begin[{] method[setColumnsSize, return_type[void], modifier[private], parameter[min, max, columnPropertyIds]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=columnPropertyId, post...
Keyword[private] Keyword[void] identifier[setColumnsSize] operator[SEP] Keyword[final] Keyword[double] identifier[min] , Keyword[final] Keyword[double] identifier[max] , Keyword[final] identifier[String] operator[...] identifier[columnPropertyIds] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] ident...
public Map<String, String> getUploadParameters() { Map<String, String> parameters = new TreeMap<>(); String title = getTitle(); if (title != null) { parameters.put("title", title); } String description = getDescription(); if (description != null) ...
class class_name[name] begin[{] method[getUploadParameters, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], parameters] local_variable[type[String], title] if[binary_operation[member[.title], !=, literal[null]]] begin[{] ...
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getUploadParameters] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parameters] operator[=] Keyword[new] identifier[TreeMap] opera...
public static void main(String[] args) throws IOException { if (args.length == 0 || args[0].equals("--help")) { help(); return; } for (String a : args) { countFile(a); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] if[binary_operation[binary_operation[member[args.length], ==, literal[0]], ||, member[.args]]] begin[{] call[.help, parameter[]] return[None] ...
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[==] Other[0] operator[||] ident...
public static OffsetTime leftShift(final LocalTime self, ZoneOffset offset) { return OffsetTime.of(self, offset); }
class class_name[name] begin[{] method[leftShift, return_type[type[OffsetTime]], modifier[public static], parameter[self, offset]] begin[{] return[call[OffsetTime.of, parameter[member[.self], member[.offset]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[OffsetTime] identifier[leftShift] operator[SEP] Keyword[final] identifier[LocalTime] identifier[self] , identifier[ZoneOffset] identifier[offset] operator[SEP] { Keyword[return] identifier[OffsetTime] operator[SEP] identifier[of] operator[SEP] identifier[self] , ident...
public void marshall(OutputArtifact outputArtifact, ProtocolMarshaller protocolMarshaller) { if (outputArtifact == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(outputArtifact.getName(), NAME_BINDIN...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[outputArtifact, protocolMarshaller]] begin[{] if[binary_operation[member[.outputArtifact], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_o...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[OutputArtifact] identifier[outputArtifact] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[outputArtifact] operator[==] Other[null] operator[SEP] { Keyword[...
public static double logpdf(double val, double loc, double scale) { val = Math.abs((val - loc) / scale); double f = 1.0 + FastMath.exp(-val); return -val - FastMath.log(scale * f * f); }
class class_name[name] begin[{] method[logpdf, return_type[type[double]], modifier[public static], parameter[val, loc, scale]] begin[{] assign[member[.val], call[Math.abs, parameter[binary_operation[binary_operation[member[.val], -, member[.loc]], /, member[.scale]]]]] local_variable[ty...
Keyword[public] Keyword[static] Keyword[double] identifier[logpdf] operator[SEP] Keyword[double] identifier[val] , Keyword[double] identifier[loc] , Keyword[double] identifier[scale] operator[SEP] { identifier[val] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] operator[SEP] identifie...
@Override public AbstractLessLockingUniversalSingleStorageJdbcQueue init() throws Exception { super.init(); if (getMessageFactory() == null) { setMessageFactory(UniversalIdIntQueueMessageFactory.INSTANCE); } SQL_COUNT = MessageFormat.format(SQL_COUNT, getTableName()); ...
class class_name[name] begin[{] method[init, return_type[type[AbstractLessLockingUniversalSingleStorageJdbcQueue]], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=No...
annotation[@] identifier[Override] Keyword[public] identifier[AbstractLessLockingUniversalSingleStorageJdbcQueue] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ...
public static double requiredDoubleAttribute(final XMLStreamReader reader, final String localName) throws XMLStreamException { return requiredDoubleAttribute(reader, null, localName); }
class class_name[name] begin[{] method[requiredDoubleAttribute, return_type[type[double]], modifier[public static], parameter[reader, localName]] begin[{] return[call[.requiredDoubleAttribute, parameter[member[.reader], literal[null], member[.localName]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[requiredDoubleAttribute] operator[SEP] Keyword[final] identifier[XMLStreamReader] identifier[reader] , Keyword[final] identifier[String] identifier[localName] operator[SEP] Keyword[throws] identifier[XMLStreamException] { Keyword[return] identifier[requ...
private QueryRequest createQueryRequest(String[] elements) { QueryRequest request = QueryRequest.create(); for (String element : elements) { String[] parts = StringUtils.split(element, ":", 2); parts[0] = parts[0].replace("\\", "\\\\"); parts[1] = parts[1].replace("\\...
class class_name[name] begin[{] method[createQueryRequest, return_type[type[QueryRequest]], modifier[private], parameter[elements]] begin[{] local_variable[type[QueryRequest], request] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=...
Keyword[private] identifier[QueryRequest] identifier[createQueryRequest] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[elements] operator[SEP] { identifier[QueryRequest] identifier[request] operator[=] identifier[QueryRequest] operator[SEP] identifier[create] operator[SEP] operator[SEP]...
public Double getProgress() { if (state.equals(ParallelTaskState.IN_PROGRESS)) { if (requestNum != 0) { return 100.0 * ((double) responsedNum / (double) requestNumActual); } else { return 0.0; } } if (state.equals(ParallelTask...
class class_name[name] begin[{] method[getProgress, return_type[type[Double]], modifier[public], parameter[]] begin[{] if[call[state.equals, parameter[member[ParallelTaskState.IN_PROGRESS]]]] begin[{] if[binary_operation[member[.requestNum], !=, literal[0]]] begin[{] ...
Keyword[public] identifier[Double] identifier[getProgress] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[equals] operator[SEP] identifier[ParallelTaskState] operator[SEP] identifier[IN_PROGRESS] operator[SEP] operator[SEP] { Keyword[if] operator[SEP...
public static void sleep(final TimeUnit timeUnit, final long units){ try{ timeUnit.sleep(units); }catch(final InterruptedException ignored){ ignore(ignored); } }
class class_name[name] begin[{] method[sleep, return_type[void], modifier[public static], parameter[timeUnit, units]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=units, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]...
Keyword[public] Keyword[static] Keyword[void] identifier[sleep] operator[SEP] Keyword[final] identifier[TimeUnit] identifier[timeUnit] , Keyword[final] Keyword[long] identifier[units] operator[SEP] { Keyword[try] { identifier[timeUnit] operator[SEP] identifier[sleep] operator[SEP] identifier[units] o...
private List<PackageDescr> getPackageDescrs(Resource resource) throws DroolsParserException, IOException { List<PMMLResource> resources = pmmlCompiler.precompile(resource.getInputStream(), null, null); if (resources != null && !resources.isEmpty()) { return generatedResourcesToPackageDescr(r...
class class_name[name] begin[{] method[getPackageDescrs, return_type[type[List]], modifier[private], parameter[resource]] begin[{] local_variable[type[List], resources] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, call[resources.isEmpty, parameter[]]]...
Keyword[private] identifier[List] operator[<] identifier[PackageDescr] operator[>] identifier[getPackageDescrs] operator[SEP] identifier[Resource] identifier[resource] operator[SEP] Keyword[throws] identifier[DroolsParserException] , identifier[IOException] { identifier[List] operator[<] identifier[PMMLResource...
@SuppressWarnings("unchecked") public String saveProfile() { List<SessionProfileBean> profiles = (List<SessionProfileBean>) categoryProfileService.getProfiles(); for (final SessionProfileBean profile : profiles) { Integer roleId = profile.getRole().getId(); Integer max = getInt("max_" + roleId); ...
class class_name[name] begin[{] method[saveProfile, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[List], profiles] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimension...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[String] identifier[saveProfile] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[SessionProfileBean] operator[>] identifier[profiles] operator[=] operator[SEP] identifier[List] o...
public static void byCorrelation(Matrix m, boolean saveNegatives) { double totalSum = 0; // Generate the total value in each row and column. double[] rowSums = new double[m.rows()]; double[] colSums = new double[m.columns()]; for (int i = 0; i < m.rows(); ++i) { for ...
class class_name[name] begin[{] method[byCorrelation, return_type[void], modifier[public static], parameter[m, saveNegatives]] begin[{] local_variable[type[double], totalSum] local_variable[type[double], rowSums] local_variable[type[double], colSums] ForStatement(body=BlockState...
Keyword[public] Keyword[static] Keyword[void] identifier[byCorrelation] operator[SEP] identifier[Matrix] identifier[m] , Keyword[boolean] identifier[saveNegatives] operator[SEP] { Keyword[double] identifier[totalSum] operator[=] Other[0] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[rowSu...
public boolean validateGlobalType(GlobalType globalType, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate_EveryDefaultConstraint(globalType, diagnostics, context); }
class class_name[name] begin[{] method[validateGlobalType, return_type[type[boolean]], modifier[public], parameter[globalType, diagnostics, context]] begin[{] return[call[.validate_EveryDefaultConstraint, parameter[member[.globalType], member[.diagnostics], member[.context]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[validateGlobalType] operator[SEP] identifier[GlobalType] identifier[globalType] , identifier[DiagnosticChain] identifier[diagnostics] , identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[context] operator[SEP] { Keyword[return...
@Override public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { String body = req.getReader().readLine().trim(); // Simple JSON -- Use Jackson for more complex structure // Message looks like { "author" : "foo", "message" : "bar" } String author = b...
class class_name[name] begin[{] method[doPost, return_type[void], modifier[public], parameter[req, res]] begin[{] local_variable[type[String], body] local_variable[type[String], author] local_variable[type[String], message] call[broadcaster.broadcast, parameter[ClassCrea...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doPost] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[body] operator[=] identifier[re...
protected void doPut(String path) throws ClientException { this.readLock.lock(); try { ClientResponse response = this.getResourceWrapper() .rewritten(path, HttpMethod.PUT) .put(ClientResponse.class); errorIfStatusNotEqualTo(response, Client...
class class_name[name] begin[{] method[doPut, return_type[void], modifier[protected], parameter[path]] begin[{] THIS[member[None.readLock]call[None.lock, parameter[]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer...
Keyword[protected] Keyword[void] identifier[doPut] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[ClientException] { Keyword[this] operator[SEP] identifier[readLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { iden...
public static void addAcidicOxygen(IAminoAcid acid) throws CDKException { if (acid.getCTerminus() == null) throw new CDKException("Cannot add oxygen: C-terminus is not defined!"); IAtom acidicOxygen = acid.getBuilder().newInstance(IAtom.class, "O"); acid.addAtom(acidicOxygen); acid.addB...
class class_name[name] begin[{] method[addAcidicOxygen, return_type[void], modifier[public static], parameter[acid]] begin[{] if[binary_operation[call[acid.getCTerminus, parameter[]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pr...
Keyword[public] Keyword[static] Keyword[void] identifier[addAcidicOxygen] operator[SEP] identifier[IAminoAcid] identifier[acid] operator[SEP] Keyword[throws] identifier[CDKException] { Keyword[if] operator[SEP] identifier[acid] operator[SEP] identifier[getCTerminus] operator[SEP] operator[SEP] operator[==] Other...
private boolean popFile() throws JasperException { // Is stack created ? (will happen if the Jsp file we're looking at is // missing. if (current == null || currFileId < 0) { return false; } // Restore parser state: String fName = getFile(currFileId); currFileId = unregisterSourceFile(fName); if (currFil...
class class_name[name] begin[{] method[popFile, return_type[type[boolean]], modifier[private], parameter[]] begin[{] if[binary_operation[binary_operation[member[.current], ==, literal[null]], ||, binary_operation[member[.currFileId], <, literal[0]]]] begin[{] return[literal[false]] ...
Keyword[private] Keyword[boolean] identifier[popFile] operator[SEP] operator[SEP] Keyword[throws] identifier[JasperException] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[||] identifier[currFileId] operator[<] Other[0] operator[SEP] { Keyword[return] literal[boolea...
public static Style deepOrange() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_ORANGE); return style; }
class class_name[name] begin[{] method[deepOrange, return_type[type[Style]], modifier[public static], parameter[]] begin[{] local_variable[type[Style], style] assign[member[style.color], call[PaletteUtils.getSolidColor, parameter[member[PaletteUtils.MATERIAL_DEEP_ORANGE]]]] retu...
Keyword[public] Keyword[static] identifier[Style] identifier[deepOrange] operator[SEP] operator[SEP] { Keyword[final] identifier[Style] identifier[style] operator[=] Keyword[new] identifier[Style] operator[SEP] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[color] operator[=] identifier[P...
@Override public DTDSubset combineWithExternalSubset(InputProblemReporter rep, DTDSubset extSubset) throws XMLStreamException { /* First let's see if we can just reuse GE Map used by int or ext * subset; (if only one has contents), or if not, combine them. */ HashMap<St...
class class_name[name] begin[{] method[combineWithExternalSubset, return_type[type[DTDSubset]], modifier[public], parameter[rep, extSubset]] begin[{] local_variable[type[HashMap], ge1] local_variable[type[HashMap], ge2] if[binary_operation[binary_operation[member[.ge1], ==, lite...
annotation[@] identifier[Override] Keyword[public] identifier[DTDSubset] identifier[combineWithExternalSubset] operator[SEP] identifier[InputProblemReporter] identifier[rep] , identifier[DTDSubset] identifier[extSubset] operator[SEP] Keyword[throws] identifier[XMLStreamException] { identifier[HashMap] operator[...
protected void addJsFiles(JavaScriptObject files) { JsArray<CmsFileInfo> cmsFiles = files.cast(); List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>(); for (int i = 0; i < cmsFiles.length(); ++i) { fileObjects.add(cmsFiles.get(i)); } addFiles(fileObjects); ...
class class_name[name] begin[{] method[addJsFiles, return_type[void], modifier[protected], parameter[files]] begin[{] local_variable[type[JsArray], cmsFiles] local_variable[type[List], fileObjects] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=M...
Keyword[protected] Keyword[void] identifier[addJsFiles] operator[SEP] identifier[JavaScriptObject] identifier[files] operator[SEP] { identifier[JsArray] operator[<] identifier[CmsFileInfo] operator[>] identifier[cmsFiles] operator[=] identifier[files] operator[SEP] identifier[cast] operator[SEP] operator[SEP] op...
public static <S> PAreaSizeL<S> toPAreaSizeL(final AreaSizeL a) { Objects.requireNonNull(a, "area size"); return PAreaSizeL.of(a.sizeX(), a.sizeY()); }
class class_name[name] begin[{] method[toPAreaSizeL, return_type[type[PAreaSizeL]], modifier[public static], parameter[a]] begin[{] call[Objects.requireNonNull, parameter[member[.a], literal["area size"]]] return[call[PAreaSizeL.of, parameter[call[a.sizeX, parameter[]], call[a.sizeY, pa...
Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] identifier[PAreaSizeL] operator[<] identifier[S] operator[>] identifier[toPAreaSizeL] operator[SEP] Keyword[final] identifier[AreaSizeL] identifier[a] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] i...
public File lookupBundleFile(String bundleId) { if ((mirrors != null) && (!mirrors.isEmpty())) { String realBundleId = mirrors.remove(bundleId); if (realBundleId != null) { bundleId = realBundleId; } } return createBundleFile(bundleId); }
class class_name[name] begin[{] method[lookupBundleFile, return_type[type[File]], modifier[public], parameter[bundleId]] begin[{] if[binary_operation[binary_operation[member[.mirrors], !=, literal[null]], &&, call[mirrors.isEmpty, parameter[]]]] begin[{] local_variable[type[String],...
Keyword[public] identifier[File] identifier[lookupBundleFile] operator[SEP] identifier[String] identifier[bundleId] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[mirrors] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] operator[!] identifier[mirrors] operator[SEP] identifie...
public static byte[] invoke(byte[] bytesIn, String... descriptors) { ClassReader cr = new ClassReader(bytesIn); EmptyCtor ca = new EmptyCtor(descriptors); cr.accept(ca, 0); byte[] newbytes = ca.getBytes(); return newbytes; }
class class_name[name] begin[{] method[invoke, return_type[type[byte]], modifier[public static], parameter[bytesIn, descriptors]] begin[{] local_variable[type[ClassReader], cr] local_variable[type[EmptyCtor], ca] call[cr.accept, parameter[member[.ca], literal[0]]] local_...
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[invoke] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytesIn] , identifier[String] operator[...] identifier[descriptors] operator[SEP] { identifier[ClassReader] identifier[cr] operator[=] Keyword[new] iden...