code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
protected <T extends CSSProperty> boolean genericTermIdent(Class<T> type, Term<?> term, boolean avoidInherit, String propertyName, Map<String, CSSProperty> properties) { if (term instanceof TermIdent) { return genericProperty(type, (TermIdent) term, avoidInherit, properties, propertyName); } return...
class class_name[name] begin[{] method[genericTermIdent, return_type[type[boolean]], modifier[protected], parameter[type, term, avoidInherit, propertyName, properties]] begin[{] if[binary_operation[member[.term], instanceof, type[TermIdent]]] begin[{] return[call[.genericProperty, p...
Keyword[protected] operator[<] identifier[T] Keyword[extends] identifier[CSSProperty] operator[>] Keyword[boolean] identifier[genericTermIdent] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[Term] operator[<] operator[?] operator[>] identifier[term] , Keyword[boole...
public void getBackStoryAnswerInfo(String[] ids, Callback<List<BackStoryAnswer>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getBackStoryAnswerInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
class class_name[name] begin[{] method[getBackStoryAnswerInfo, return_type[void], modifier[public], parameter[ids, callback]] begin[{] call[.isParamValid, parameter[ClassCreator(arguments=[MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=No...
Keyword[public] Keyword[void] identifier[getBackStoryAnswerInfo] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[ids] , identifier[Callback] operator[<] identifier[List] operator[<] identifier[BackStoryAnswer] operator[>] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier...
public void sendMessage(String message, final Respoke.TaskCompletionListener completionListener) { if (isActive()) { JSONObject jsonMessage = new JSONObject(); try { jsonMessage.put("message", message); byte[] rawMessage = jsonMessage.toString().getBytes(C...
class class_name[name] begin[{] method[sendMessage, return_type[void], modifier[public], parameter[message, completionListener]] begin[{] if[call[.isActive, parameter[]]] begin[{] local_variable[type[JSONObject], jsonMessage] TryStatement(block=[StatementExpression(expre...
Keyword[public] Keyword[void] identifier[sendMessage] operator[SEP] identifier[String] identifier[message] , Keyword[final] identifier[Respoke] operator[SEP] identifier[TaskCompletionListener] identifier[completionListener] operator[SEP] { Keyword[if] operator[SEP] identifier[isActive] operator[SEP] operator[SE...
public java.util.List<String> getTaskDefinitionArns() { if (taskDefinitionArns == null) { taskDefinitionArns = new com.amazonaws.internal.SdkInternalList<String>(); } return taskDefinitionArns; }
class class_name[name] begin[{] method[getTaskDefinitionArns, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.taskDefinitionArns], ==, literal[null]]] begin[{] assign[member[.taskDefinitionArns], ClassCreator(arguments=[], bod...
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getTaskDefinitionArns] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[taskDefinitionArns] operator[==] Other[null] operator[SEP] { id...
@Override public IPortletEntity getOrCreatePortletEntity( HttpServletRequest request, IPortletDefinitionId portletDefinitionId, String layoutNodeId, int userId) { final PortletEntityCache<IPortletEntity> portletEntityCache = getPortletEntityMap(request); ...
class class_name[name] begin[{] method[getOrCreatePortletEntity, return_type[type[IPortletEntity]], modifier[public], parameter[request, portletDefinitionId, layoutNodeId, userId]] begin[{] local_variable[type[PortletEntityCache], portletEntityCache] local_variable[type[IPortletEntity], portlet...
annotation[@] identifier[Override] Keyword[public] identifier[IPortletEntity] identifier[getOrCreatePortletEntity] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[IPortletDefinitionId] identifier[portletDefinitionId] , identifier[String] identifier[layoutNodeId] , Keyword[int] identifie...
public static float spToPx(Context ctx, float spSize){ return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, spSize, ctx.getResources().getDisplayMetrics()); }
class class_name[name] begin[{] method[spToPx, return_type[type[float]], modifier[public static], parameter[ctx, spSize]] begin[{] return[call[TypedValue.applyDimension, parameter[member[TypedValue.COMPLEX_UNIT_SP], member[.spSize], call[ctx.getResources, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[float] identifier[spToPx] operator[SEP] identifier[Context] identifier[ctx] , Keyword[float] identifier[spSize] operator[SEP] { Keyword[return] identifier[TypedValue] operator[SEP] identifier[applyDimension] operator[SEP] identifier[TypedValue] operator[SEP] identifier[CO...
@Override public void endElement( String uri, String localName, String qName ) throws SAXException { flushCharacters(); if ( stack.isEmpty() ) { throw new IllegalStateException( "Stack must not be empty when closing the element " + qName + " around lin...
class class_name[name] begin[{] method[endElement, return_type[void], modifier[public], parameter[uri, localName, qName]] begin[{] call[.flushCharacters, parameter[]] if[call[stack.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Bina...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[endElement] operator[SEP] identifier[String] identifier[uri] , identifier[String] identifier[localName] , identifier[String] identifier[qName] operator[SEP] Keyword[throws] identifier[SAXException] { identifier[flushCharacters] operato...
private static int index(File indexDir, File dataDir) throws IOException { if (!dataDir.exists() || !dataDir.isDirectory()) { throw new IOException(dataDir + " does not exist or is not a directory"); } IndexWriter writer = new IndexWriter(indexDir, ...
class class_name[name] begin[{] method[index, return_type[type[int]], modifier[private static], parameter[indexDir, dataDir]] begin[{] if[binary_operation[call[dataDir.exists, parameter[]], ||, call[dataDir.isDirectory, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(...
Keyword[private] Keyword[static] Keyword[int] identifier[index] operator[SEP] identifier[File] identifier[indexDir] , identifier[File] identifier[dataDir] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[dataDir] operator[SEP] identifier[exists] operator[S...
public ServiceFuture<ContentKeyPolicyInner> createOrUpdateAsync(String resourceGroupName, String accountName, String contentKeyPolicyName, ContentKeyPolicyInner parameters, final ServiceCallback<ContentKeyPolicyInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(re...
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, accountName, contentKeyPolicyName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.createOrUpdateWithServiceRespons...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ContentKeyPolicyInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[contentKeyPolicyName] , identifier[ContentKey...
public static int find_bands(int warp, int bands, int a0, int a1) { float div = (float) Math.log(2.0); if(warp!=0) div *= 1.3f; return (int) (bands*Math.log((float) a1/(float) a0)/div+0.5); }
class class_name[name] begin[{] method[find_bands, return_type[type[int]], modifier[public static], parameter[warp, bands, a0, a1]] begin[{] local_variable[type[float], div] if[binary_operation[member[.warp], !=, literal[0]]] begin[{] assign[member[.div], literal[1.3f]] ...
Keyword[public] Keyword[static] Keyword[int] identifier[find_bands] operator[SEP] Keyword[int] identifier[warp] , Keyword[int] identifier[bands] , Keyword[int] identifier[a0] , Keyword[int] identifier[a1] operator[SEP] { Keyword[float] identifier[div] operator[=] operator[SEP] Keyword[float] operator[SEP] ide...
public void buildSerialUIDInfo(XMLNode node, Content classTree) { Content serialUidTree = writer.getSerialUIDInfoHeader(); for (Element e : utils.getFieldsUnfiltered(currentTypeElement)) { VariableElement field = (VariableElement)e; if (field.getSimpleName().toString().compareTo(...
class class_name[name] begin[{] method[buildSerialUIDInfo, return_type[void], modifier[public], parameter[node, classTree]] begin[{] local_variable[type[Content], serialUidTree] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Variab...
Keyword[public] Keyword[void] identifier[buildSerialUIDInfo] operator[SEP] identifier[XMLNode] identifier[node] , identifier[Content] identifier[classTree] operator[SEP] { identifier[Content] identifier[serialUidTree] operator[=] identifier[writer] operator[SEP] identifier[getSerialUIDInfoHeader] operator[SEP] ...
private void inferCallerELKI() { needToInferCaller = false; StackTraceElement[] stack = (new Throwable()).getStackTrace(); int ix = 0; // skip back to the logger. while(ix < stack.length) { StackTraceElement frame = stack[ix]; final String cls = frame.getClassName(); if(cls.equals(...
class class_name[name] begin[{] method[inferCallerELKI, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.needToInferCaller], literal[false]] local_variable[type[StackTraceElement], stack] local_variable[type[int], ix] while[binary_operat...
Keyword[private] Keyword[void] identifier[inferCallerELKI] operator[SEP] operator[SEP] { identifier[needToInferCaller] operator[=] literal[boolean] operator[SEP] identifier[StackTraceElement] operator[SEP] operator[SEP] identifier[stack] operator[=] operator[SEP] Keyword[new] identifier[Throwable] operator[SEP] ...
public void writeRecord(StationObsDatatype sobs, StructureData sdata) throws IOException { if (debug) System.out.println("sobs= " + sobs + "; station = " + sobs.getStation()); for (Variable v : recordVars) { if (timeName.equals(v.getShortName())) { Date d = sobs.getObservationTimeAsDate(); ...
class class_name[name] begin[{] method[writeRecord, return_type[void], modifier[public], parameter[sobs, sdata]] begin[{] if[member[.debug]] begin[{] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[literal["sobs= "], +, member[.sobs]], +, litera...
Keyword[public] Keyword[void] identifier[writeRecord] operator[SEP] identifier[StationObsDatatype] identifier[sobs] , identifier[StructureData] identifier[sdata] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[debug] operator[SEP] identifier[System] operator[SEP] ide...
public static String replaceDataReferencesInString(final String input, final Map<String, Map<String, String>> data, final Converter<String, String> converter, boolean failOnUnexpanded) { return replaceDataReferencesInString(input, data, converter, failOnUne...
class class_name[name] begin[{] method[replaceDataReferencesInString, return_type[type[String]], modifier[public static], parameter[input, data, converter, failOnUnexpanded]] begin[{] return[call[.replaceDataReferencesInString, parameter[member[.input], member[.data], member[.converter], member[.failOn...
Keyword[public] Keyword[static] identifier[String] identifier[replaceDataReferencesInString] operator[SEP] Keyword[final] identifier[String] identifier[input] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] ...
private void ensureBuilders() { if (this.builders == null) { this.builders = new ArrayList<SingleFieldBuilder<MType, BType, IType>>(messages.size()); for (int i = 0; i < messages.size(); i++) { builders.add(null); } } }
class class_name[name] begin[{] method[ensureBuilders, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[THIS[member[None.builders]], ==, literal[null]]] begin[{] assign[THIS[member[None.builders]], ClassCreator(arguments=[MethodInvocation(a...
Keyword[private] Keyword[void] identifier[ensureBuilders] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[builders] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[builders] operator[=] Keyword[new] identifier[ArrayList] op...
private boolean includes(String identifier) { if (includes.isEmpty()) return !exclude(identifier); String includeMatch = null; String excludeMatch = null; for (String rule = identifier; rule != null; rule = enclosing(rule)) { if (excludes.contains(rule)) { excludeMatch = rule; } ...
class class_name[name] begin[{] method[includes, return_type[type[boolean]], modifier[private], parameter[identifier]] begin[{] if[call[includes.isEmpty, parameter[]]] begin[{] return[call[.exclude, parameter[member[.identifier]]]] else begin[{] None end[}] local_variabl...
Keyword[private] Keyword[boolean] identifier[includes] operator[SEP] identifier[String] identifier[identifier] operator[SEP] { Keyword[if] operator[SEP] identifier[includes] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[!] identifier[exclude] operator[SEP] i...
public static <T extends MethodDescription> ElementMatcher.Junction<T> canThrow(Class<? extends Throwable> exceptionType) { return canThrow(TypeDescription.ForLoadedType.of(exceptionType)); }
class class_name[name] begin[{] method[canThrow, return_type[type[ElementMatcher]], modifier[public static], parameter[exceptionType]] begin[{] return[call[.canThrow, parameter[call[TypeDescription.ForLoadedType.of, parameter[member[.exceptionType]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[MethodDescription] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[canThrow] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifie...
public synchronized void add(T element) { Assert.notNull(element, "Element cannot be null"); int filterSize = getFilterSize(); int hashFunctionCount = getHashFunctionCount(element); this.random.setSeed(element.hashCode()); for (int count = 0; count < hashFunctionCount; count++) { int bitIn...
class class_name[name] begin[{] method[add, return_type[void], modifier[synchronized public], parameter[element]] begin[{] call[Assert.notNull, parameter[member[.element], literal["Element cannot be null"]]] local_variable[type[int], filterSize] local_variable[type[int], hashFun...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[add] operator[SEP] identifier[T] identifier[element] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[element] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[filterSize] operator[=]...
public void close() { try { flush(); pw.close(); rawWriter.close(); } catch (IOException e) { Throwables.propagate(e); } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)...
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[try] { identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[pw] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[rawWriter] operator[SEP] identifier[close] operat...
public void onDeselectLayer(LayerDeselectedEvent event) { ListGridRecord selected = treeGrid.getSelectedRecord(); if (selected != null) { treeGrid.deselectRecord(selected); } selectedLayerTreeNode = null; htmlSelectedLayer.setContents(I18nProvider.getLayerTree().activeLayer(I18nProvider.getLayerTree().none...
class class_name[name] begin[{] method[onDeselectLayer, return_type[void], modifier[public], parameter[event]] begin[{] local_variable[type[ListGridRecord], selected] if[binary_operation[member[.selected], !=, literal[null]]] begin[{] call[treeGrid.deselectRecord...
Keyword[public] Keyword[void] identifier[onDeselectLayer] operator[SEP] identifier[LayerDeselectedEvent] identifier[event] operator[SEP] { identifier[ListGridRecord] identifier[selected] operator[=] identifier[treeGrid] operator[SEP] identifier[getSelectedRecord] operator[SEP] operator[SEP] operator[SEP] Keyword...
protected void uninstallDefaults() { SeaGlassContext context = getContext(splitPane, ENABLED); style.uninstallDefaults(context); context.dispose(); style = null; context = getContext(splitPane, Region.SPLIT_PANE_DIVIDER, ENABLED); dividerStyle.uninstallDefaults(context)...
class class_name[name] begin[{] method[uninstallDefaults, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[SeaGlassContext], context] call[style.uninstallDefaults, parameter[member[.context]]] call[context.dispose, parameter[]] ...
Keyword[protected] Keyword[void] identifier[uninstallDefaults] operator[SEP] operator[SEP] { identifier[SeaGlassContext] identifier[context] operator[=] identifier[getContext] operator[SEP] identifier[splitPane] , identifier[ENABLED] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[uninsta...
@Override public EClass getObjectDefinition() { if (objectDefinitionEClass == null) { objectDefinitionEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI).getEClassifiers().get(68); } return objectDefinitionEClass; }
class class_name[name] begin[{] method[getObjectDefinition, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.objectDefinitionEClass], ==, literal[null]]] begin[{] assign[member[.objectDefinitionEClass], Cast(expression=Method...
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getObjectDefinition] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[objectDefinitionEClass] operator[==] Other[null] operator[SEP] { identifier[objectDefinitionEClass] operator[=] operator[SEP] identif...
private static double calAfpDis(int afp1, int afp2, FatCatParameters params, AFPChain afpChain) { List<AFP> afpSet = afpChain.getAfpSet(); Matrix disTable1 = afpChain.getDisTable1(); Matrix disTable2 = afpChain.getDisTable2(); int fragLen = params.getFragLen(); double afpDisCut = params.getAfpDisCut(); ...
class class_name[name] begin[{] method[calAfpDis, return_type[type[double]], modifier[private static], parameter[afp1, afp2, params, afpChain]] begin[{] local_variable[type[List], afpSet] local_variable[type[Matrix], disTable1] local_variable[type[Matrix], disTable2] local_varia...
Keyword[private] Keyword[static] Keyword[double] identifier[calAfpDis] operator[SEP] Keyword[int] identifier[afp1] , Keyword[int] identifier[afp2] , identifier[FatCatParameters] identifier[params] , identifier[AFPChain] identifier[afpChain] operator[SEP] { identifier[List] operator[<] identifier[AFP] operator...
public static DirectoryStream newDirectoryStream(Path dir, String glob) throws IOException { FileSystem fs = dir.getFileSystem(); final PathMatcher matcher = fs.getPathMatcher("glob:" + glob); DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() { public boolean accept(Path entry...
class class_name[name] begin[{] method[newDirectoryStream, return_type[type[DirectoryStream]], modifier[public static], parameter[dir, glob]] begin[{] local_variable[type[FileSystem], fs] local_variable[type[PathMatcher], matcher] local_variable[type[DirectoryStream], filter] re...
Keyword[public] Keyword[static] identifier[DirectoryStream] identifier[newDirectoryStream] operator[SEP] identifier[Path] identifier[dir] , identifier[String] identifier[glob] operator[SEP] Keyword[throws] identifier[IOException] { identifier[FileSystem] identifier[fs] operator[=] identifier[dir] operator[SEP] ...
public static <T, V> String interpose(Iterable<T> values, V separator) { dbc.precondition(values != null, "cannot interpose from a null iterable"); return new InterposeStrings<T, V>().apply(values.iterator(), new ConstantIterator<>(separator)); }
class class_name[name] begin[{] method[interpose, return_type[type[String]], modifier[public static], parameter[values, separator]] begin[{] call[dbc.precondition, parameter[binary_operation[member[.values], !=, literal[null]], literal["cannot interpose from a null iterable"]]] return[C...
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[V] operator[>] identifier[String] identifier[interpose] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[values] , identifier[V] identifier[separator] operator[SEP] { identifier[dbc] operator[SEP] identifi...
@Override public BaseRedisCache init() { super.init(); long expireAfterWrite = getExpireAfterWrite(); long expireAfterAccess = getExpireAfterAccess(); if (expireAfterAccess > 0 || expireAfterWrite > 0) { timeToLiveSeconds = expireAfterAccess > 0 ? expireAfterAccess : exp...
class class_name[name] begin[{] method[init, return_type[type[BaseRedisCache]], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[long...
annotation[@] identifier[Override] Keyword[public] identifier[BaseRedisCache] identifier[init] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[expireAfterWrite] operator[=] identifier[getExpireAfterWrite] operator[SEP]...
protected List<Metric> serializeMetered(String name, Metered meter) { return Lists.newArrayList( serializeValue(name, meter.getCount(), Measurements.COUNT.name()), serializeValue(name, meter.getMeanRate(), Measurements.MEAN_RATE.name()), serializeValue(name, meter.getOneMinuteRate(), Measurements....
class class_name[name] begin[{] method[serializeMetered, return_type[type[List]], modifier[protected], parameter[name, meter]] begin[{] return[call[Lists.newArrayList, parameter[call[.serializeValue, parameter[member[.name], call[meter.getCount, parameter[]], call[Measurements.COUNT.name, parameter[]]]...
Keyword[protected] identifier[List] operator[<] identifier[Metric] operator[>] identifier[serializeMetered] operator[SEP] identifier[String] identifier[name] , identifier[Metered] identifier[meter] operator[SEP] { Keyword[return] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] identifier[...
public Object put(Object key, Object value) { // Make sure the value is not null if (value == null) { throw new NullPointerException(); } // Makes sure the key is not already in the hashtable. FastHashtableEntry tab[] = table; int hash = key.hashCode(); int index = (hash & 0x7FFFFFFF)...
class class_name[name] begin[{] method[put, return_type[type[Object]], modifier[public], parameter[key, value]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, ...
Keyword[public] identifier[Object] identifier[put] operator[SEP] identifier[Object] identifier[key] , identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] ...
protected void connectZooKeeper() throws IOException { LOG.info("Connecting ZooKeeper " + zkQuorum); for (int i = 0; i <= connectRetryTimes; i++) { try { zooKeeper = new ZooKeeper(zkQuorum, sessionTimeout, this); break; } catch (IOException e) { if (i == connectRetryTimes) {...
class class_name[name] begin[{] method[connectZooKeeper, return_type[void], modifier[protected], parameter[]] begin[{] call[LOG.info, parameter[binary_operation[literal["Connecting ZooKeeper "], +, member[.zkQuorum]]]] ForStatement(body=BlockStatement(label=None, statements=[TryStatemen...
Keyword[protected] Keyword[void] identifier[connectZooKeeper] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[zkQuorum] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] ide...
public Project dependsOnArtifact(Artifact artifact) { Project project = new Project(); project.setArtifact(artifact); project.setInputVariablesName(inputVarName); return project; }
class class_name[name] begin[{] method[dependsOnArtifact, return_type[type[Project]], modifier[public], parameter[artifact]] begin[{] local_variable[type[Project], project] call[project.setArtifact, parameter[member[.artifact]]] call[project.setInputVariablesName, parame...
Keyword[public] identifier[Project] identifier[dependsOnArtifact] operator[SEP] identifier[Artifact] identifier[artifact] operator[SEP] { identifier[Project] identifier[project] operator[=] Keyword[new] identifier[Project] operator[SEP] operator[SEP] operator[SEP] identifier[project] operator[SEP] identifier[set...
@Override @Pure public final double getDistance(Point2D<?, ?> point) { if (isWidePolyline()) { return distance(point, getWidth()); } return distance(point, 0); }
class class_name[name] begin[{] method[getDistance, return_type[type[double]], modifier[final public], parameter[point]] begin[{] if[call[.isWidePolyline, parameter[]]] begin[{] return[call[.distance, parameter[member[.point], call[.getWidth, parameter[]]]]] else begin[{] No...
annotation[@] identifier[Override] annotation[@] identifier[Pure] Keyword[public] Keyword[final] Keyword[double] identifier[getDistance] operator[SEP] identifier[Point2D] operator[<] operator[?] , operator[?] operator[>] identifier[point] operator[SEP] { Keyword[if] operator[SEP] identifier[isWidePolyline] oper...
protected <C> List<List<C>> deserializeIntoList( JsonReader reader, JsonDeserializationContext ctx, JsonDeserializer<C> deserializer, JsonDeserializerParameters params ) { List<List<C>> list; reader.beginArray(); JsonToken token = reader.peek...
class class_name[name] begin[{] method[deserializeIntoList, return_type[type[List]], modifier[protected], parameter[reader, ctx, deserializer, params]] begin[{] local_variable[type[List], list] call[reader.beginArray, parameter[]] local_variable[type[JsonToken], token] ...
Keyword[protected] operator[<] identifier[C] operator[>] identifier[List] operator[<] identifier[List] operator[<] identifier[C] operator[>] operator[>] identifier[deserializeIntoList] operator[SEP] identifier[JsonReader] identifier[reader] , identifier[JsonDeserializationContext] identifier[ctx] , identifier[JsonDes...
private TTTState<I, D> createState(@Nonnull TTTTransition<I, D> transition) { return hypothesis.createState(transition); }
class class_name[name] begin[{] method[createState, return_type[type[TTTState]], modifier[private], parameter[transition]] begin[{] return[call[hypothesis.createState, parameter[member[.transition]]]] end[}] END[}]
Keyword[private] identifier[TTTState] operator[<] identifier[I] , identifier[D] operator[>] identifier[createState] operator[SEP] annotation[@] identifier[Nonnull] identifier[TTTTransition] operator[<] identifier[I] , identifier[D] operator[>] identifier[transition] operator[SEP] { Keyword[return] identifier[h...
@org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.eclipse.xtext.generator.parser.antlr.debug.validation.SimpleAntlrJavaValidator> bindSimpleAntlrJavaValidator() { return org.eclipse.xtext.generator.parser.antlr.debug.validation.SimpleAntlrJavaValidator.class; }
class class_name[name] begin[{] method[bindSimpleAntlrJavaValidator, return_type[type[Class]], modifier[public], parameter[]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=org.eclipse.xtext.generator.parser.antlr.debug.validation, selectors=[], type=ReferenceType(a...
annotation[@] identifier[org] operator[SEP] identifier[eclipse] operator[SEP] identifier[xtext] operator[SEP] identifier[service] operator[SEP] identifier[SingletonBinding] operator[SEP] identifier[eager] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[Class] operator[<] operator[?] Keyword[extend...
public static OptionHandler parseElement(final Element element, final Properties props, final Class expectedClass) throws Exception { String clazz = subst(element.getAttribute("class"), props); Object instance = Op...
class class_name[name] begin[{] method[parseElement, return_type[type[OptionHandler]], modifier[public static], parameter[element, props, expectedClass]] begin[{] local_variable[type[String], clazz] local_variable[type[Object], instance] if[binary_operation[member[.instance], in...
Keyword[public] Keyword[static] identifier[OptionHandler] identifier[parseElement] operator[SEP] Keyword[final] identifier[Element] identifier[element] , Keyword[final] identifier[Properties] identifier[props] , Keyword[final] identifier[Class] identifier[expectedClass] operator[SEP] Keyword[throws] identifier[Except...
public CMAUiExtension fetchOne(String spaceId, String environmentId, String extensionId) { assertNotNull(spaceId, "spaceId"); assertNotNull(environmentId, "spaceId"); assertNotNull(extensionId, "extensionId"); return service.fetchOne(spaceId, environmentId, extensionId).blockingFirst(); }
class class_name[name] begin[{] method[fetchOne, return_type[type[CMAUiExtension]], modifier[public], parameter[spaceId, environmentId, extensionId]] begin[{] call[.assertNotNull, parameter[member[.spaceId], literal["spaceId"]]] call[.assertNotNull, parameter[member[.environment...
Keyword[public] identifier[CMAUiExtension] identifier[fetchOne] operator[SEP] identifier[String] identifier[spaceId] , identifier[String] identifier[environmentId] , identifier[String] identifier[extensionId] operator[SEP] { identifier[assertNotNull] operator[SEP] identifier[spaceId] , literal[String] operato...
@Check(CheckType.FAST) public void checkSuperType(SarlAgent agent) { checkSuperTypes( agent, SARL_AGENT__EXTENDS, Utils.singletonList(agent.getExtends()), Agent.class, false); }
class class_name[name] begin[{] method[checkSuperType, return_type[void], modifier[public], parameter[agent]] begin[{] call[.checkSuperTypes, parameter[member[.agent], member[.SARL_AGENT__EXTENDS], call[Utils.singletonList, parameter[call[agent.getExtends, parameter[]]]], ClassReference(postfix...
annotation[@] identifier[Check] operator[SEP] identifier[CheckType] operator[SEP] identifier[FAST] operator[SEP] Keyword[public] Keyword[void] identifier[checkSuperType] operator[SEP] identifier[SarlAgent] identifier[agent] operator[SEP] { identifier[checkSuperTypes] operator[SEP] identifier[agent] , identifier...
public static Object getListener(Object bag, int index) { if (index == 0) { if (bag == null) return null; if (!(bag instanceof Object[])) return bag; Object[] array = (Object[])bag; // bag has at least 2 elements if it is array ...
class class_name[name] begin[{] method[getListener, return_type[type[Object]], modifier[public static], parameter[bag, index]] begin[{] if[binary_operation[member[.index], ==, literal[0]]] begin[{] if[binary_operation[member[.bag], ==, literal[null]]] begin[{] return[lit...
Keyword[public] Keyword[static] identifier[Object] identifier[getListener] operator[SEP] identifier[Object] identifier[bag] , Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[bag] oper...
public static SurfaceConfig imports(Xml root) { Check.notNull(root); final Xml node = root.getChild(NODE_SURFACE); final String surface = node.readString(ATT_IMAGE); final String icon = node.readString(null, ATT_ICON); return new SurfaceConfig(surface, icon); }
class class_name[name] begin[{] method[imports, return_type[type[SurfaceConfig]], modifier[public static], parameter[root]] begin[{] call[Check.notNull, parameter[member[.root]]] local_variable[type[Xml], node] local_variable[type[String], surface] local_variable[type[St...
Keyword[public] Keyword[static] identifier[SurfaceConfig] identifier[imports] operator[SEP] identifier[Xml] identifier[root] operator[SEP] { identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[root] operator[SEP] operator[SEP] Keyword[final] identifier[Xml] identifier[node] operator[=] i...
public static <T extends Comparable<? super T>> List<T> minList (Iterable<T> iterable) { return maxList(iterable, java.util.Collections.reverseOrder()); }
class class_name[name] begin[{] method[minList, return_type[type[List]], modifier[public static], parameter[iterable]] begin[{] return[call[.maxList, parameter[member[.iterable], call[java.util.Collections.reverseOrder, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[minList] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[...
private List<Element> extractElements(String content, String selector, int amount) { Element body = parseContent(content); List<Element> elements = body.select(selector); if (elements.size() > 0) { elements = filterParents(elements); if (amount >= 0) { // limit to the indicated amount elements =...
class class_name[name] begin[{] method[extractElements, return_type[type[List]], modifier[private], parameter[content, selector, amount]] begin[{] local_variable[type[Element], body] local_variable[type[List], elements] if[binary_operation[call[elements.size, parameter[]], >, li...
Keyword[private] identifier[List] operator[<] identifier[Element] operator[>] identifier[extractElements] operator[SEP] identifier[String] identifier[content] , identifier[String] identifier[selector] , Keyword[int] identifier[amount] operator[SEP] { identifier[Element] identifier[body] operator[=] identifier[...
public Functor transform(Functor functor) { FunctorName functorName = interner.getFunctorFunctorName(functor); if (builtInExpressions.containsKey(functorName)) { Class<? extends Functor> builtInExpressionClass = builtInExpressions.get(functorName); return Reflection...
class class_name[name] begin[{] method[transform, return_type[type[Functor]], modifier[public], parameter[functor]] begin[{] local_variable[type[FunctorName], functorName] if[call[builtInExpressions.containsKey, parameter[member[.functorName]]]] begin[{] local_variable[type[...
Keyword[public] identifier[Functor] identifier[transform] operator[SEP] identifier[Functor] identifier[functor] operator[SEP] { identifier[FunctorName] identifier[functorName] operator[=] identifier[interner] operator[SEP] identifier[getFunctorFunctorName] operator[SEP] identifier[functor] operator[SEP] operator...
void enableStatistics(boolean enabled) { requireNotClosed(); synchronized (configuration) { if (enabled) { JmxRegistration.registerMXBean(this, statistics, MBeanType.Statistics); } else { JmxRegistration.unregisterMXBean(this, MBeanType.Statistics); } statistics.enable(e...
class class_name[name] begin[{] method[enableStatistics, return_type[void], modifier[default], parameter[enabled]] begin[{] call[.requireNotClosed, parameter[]] SYNCHRONIZED[member[.configuration]] BEGIN[{] if[member[.enabled]] begin[{] ...
Keyword[void] identifier[enableStatistics] operator[SEP] Keyword[boolean] identifier[enabled] operator[SEP] { identifier[requireNotClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[configuration] operator[SEP] { Keyword[if] operator[SEP] identifier[enable...
public double getCount(F first, S second) { Counter<S> counter = maps.get(first); if (counter == null) return 0.0; return counter.getCount(second); }
class class_name[name] begin[{] method[getCount, return_type[type[double]], modifier[public], parameter[first, second]] begin[{] local_variable[type[Counter], counter] if[binary_operation[member[.counter], ==, literal[null]]] begin[{] return[literal[0.0]] else begin[{] None ...
Keyword[public] Keyword[double] identifier[getCount] operator[SEP] identifier[F] identifier[first] , identifier[S] identifier[second] operator[SEP] { identifier[Counter] operator[<] identifier[S] operator[>] identifier[counter] operator[=] identifier[maps] operator[SEP] identifier[get] operator[SEP] identifier[...
public ReadModifyWriteRow adapt(Increment increment) { ReadModifyWriteRow readModifyWriteRow = ReadModifyWriteRow .create(bigtableTableName.getTableId(), ByteString.copyFrom(increment.getRow())); Adapters.INCREMENT_ADAPTER.adapt(increment, readModifyWriteRow); return readModifyWriteRow; }
class class_name[name] begin[{] method[adapt, return_type[type[ReadModifyWriteRow]], modifier[public], parameter[increment]] begin[{] local_variable[type[ReadModifyWriteRow], readModifyWriteRow] call[Adapters.INCREMENT_ADAPTER.adapt, parameter[member[.increment], member[.readModifyWrite...
Keyword[public] identifier[ReadModifyWriteRow] identifier[adapt] operator[SEP] identifier[Increment] identifier[increment] operator[SEP] { identifier[ReadModifyWriteRow] identifier[readModifyWriteRow] operator[=] identifier[ReadModifyWriteRow] operator[SEP] identifier[create] operator[SEP] identifier[bigtableTab...
@Override public byte[] transformIn(Blob blob) throws CpoException { byte[] buffBytes = new byte[1024]; byte[] retBytes = null; int length; ByteArrayOutputStream bos = new ByteArrayOutputStream(); if (blob != null) { logger.debug("BLOB IS NOT NULL"); try { InputStream is = bl...
class class_name[name] begin[{] method[transformIn, return_type[type[byte]], modifier[public], parameter[blob]] begin[{] local_variable[type[byte], buffBytes] local_variable[type[byte], retBytes] local_variable[type[int], length] local_variable[type[ByteArrayOutputStream], bos] ...
annotation[@] identifier[Override] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[transformIn] operator[SEP] identifier[Blob] identifier[blob] operator[SEP] Keyword[throws] identifier[CpoException] { Keyword[byte] operator[SEP] operator[SEP] identifier[buffBytes] operator[=] Keyword[new] Ke...
protected boolean extractBoolean(Object val) { try { return (Boolean) val; } catch (ClassCastException cce) { logException(cce); return false; } }
class class_name[name] begin[{] method[extractBoolean, return_type[type[boolean]], modifier[protected], parameter[val]] begin[{] TryStatement(block=[ReturnStatement(expression=Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=Referenc...
Keyword[protected] Keyword[boolean] identifier[extractBoolean] operator[SEP] identifier[Object] identifier[val] operator[SEP] { Keyword[try] { Keyword[return] operator[SEP] identifier[Boolean] operator[SEP] identifier[val] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassCast...
protected void register(final Class<? extends Component<?>> interfaceClass, final Class<? extends Component<?>> implClass) { register(interfaceClass, implClass, PriorityLevel.Normal, 0); }
class class_name[name] begin[{] method[register, return_type[void], modifier[protected], parameter[interfaceClass, implClass]] begin[{] call[.register, parameter[member[.interfaceClass], member[.implClass], member[PriorityLevel.Normal], literal[0]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[register] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Component] operator[<] operator[?] operator[>] operator[>] identifier[interfaceClass] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] iden...
private void symLinkAndConfigureFiles(JobConf job) throws IOException { if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) { LOG.warn("Use GenericOptionsParser for parsing the arguments. " + "Applications should implement Tool for the same."); } // get all the command li...
class class_name[name] begin[{] method[symLinkAndConfigureFiles, return_type[void], modifier[private], parameter[job]] begin[{] if[call[job.getBoolean, parameter[literal["mapred.used.genericoptionsparser"], literal[false]]]] begin[{] call[LOG.warn, parameter[binary_opera...
Keyword[private] Keyword[void] identifier[symLinkAndConfigureFiles] operator[SEP] identifier[JobConf] identifier[job] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[job] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] , l...
private void update(ESSyncConfig config, Dml dml) { List<Map<String, Object>> dataList = dml.getData(); List<Map<String, Object>> oldList = dml.getOld(); if (dataList == null || dataList.isEmpty() || oldList == null || oldList.isEmpty()) { return; } SchemaItem schemaI...
class class_name[name] begin[{] method[update, return_type[void], modifier[private], parameter[config, dml]] begin[{] local_variable[type[List], dataList] local_variable[type[List], oldList] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.dataList]...
Keyword[private] Keyword[void] identifier[update] operator[SEP] identifier[ESSyncConfig] identifier[config] , identifier[Dml] identifier[dml] operator[SEP] { identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[dataList] operator[=]...
@SuppressWarnings("unchecked") private <T> T execOperator(Element element, Object scope, Meta meta, Format... format) throws IOException { Operator operator = factory.geInstance(meta.opcode); return (T) operator.exec(element, scope, meta.operand, format.length == 1 ? format[0] : null); }
class class_name[name] begin[{] method[execOperator, return_type[type[T]], modifier[private], parameter[element, scope, meta, format]] begin[{] local_variable[type[Operator], operator] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefi...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] operator[<] identifier[T] operator[>] identifier[T] identifier[execOperator] operator[SEP] identifier[Element] identifier[element] , identifier[Object] identifier[scope] , identifier[Meta] identifier[meta] , ident...
@Override public String generateClause() { StringBuilder wherePart = new StringBuilder(); wherePart.append(referenceIndices.generateColumnReference(columnSpec)); if (not) { wherePart.append(" NOT"); } wherePart.append(" IN ("); for (int k = 0; k < elements...
class class_name[name] begin[{] method[generateClause, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], wherePart] call[wherePart.append, parameter[call[referenceIndices.generateColumnReference, parameter[member[.columnSpec]]]]] ...
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[generateClause] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[wherePart] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[wherePart] operator[SEP] identifie...
protected Map<String, String> getAdditionalFlashPlayerParameters(Media media, Dimension dimension) { Map<String, String> parameters = new HashMap<String, String>(); parameters.put("allowFullScreen", "true"); parameters.put("wmode", "opaque"); return parameters; }
class class_name[name] begin[{] method[getAdditionalFlashPlayerParameters, return_type[type[Map]], modifier[protected], parameter[media, dimension]] begin[{] local_variable[type[Map], parameters] call[parameters.put, parameter[literal["allowFullScreen"], literal["true"]]] ...
Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getAdditionalFlashPlayerParameters] operator[SEP] identifier[Media] identifier[media] , identifier[Dimension] identifier[dimension] operator[SEP] { identifier[Map] operator[<] identifier[String] , ide...
public static void disableAction(BaseComponent component, String eventName, boolean disable) { ActionListener listener = getListener(component, eventName); if (listener != null) { listener.setDisabled(disable); } }
class class_name[name] begin[{] method[disableAction, return_type[void], modifier[public static], parameter[component, eventName, disable]] begin[{] local_variable[type[ActionListener], listener] if[binary_operation[member[.listener], !=, literal[null]]] begin[{] ...
Keyword[public] Keyword[static] Keyword[void] identifier[disableAction] operator[SEP] identifier[BaseComponent] identifier[component] , identifier[String] identifier[eventName] , Keyword[boolean] identifier[disable] operator[SEP] { identifier[ActionListener] identifier[listener] operator[=] identifier[getListe...
public PoolStatistics getAllPoolsLifetimeStatistics(Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolGetAllLifetimeStatisticsOptions options = new PoolGetAllLifetimeStatisticsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBeh...
class class_name[name] begin[{] method[getAllPoolsLifetimeStatistics, return_type[type[PoolStatistics]], modifier[public], parameter[additionalBehaviors]] begin[{] local_variable[type[PoolGetAllLifetimeStatisticsOptions], options] local_variable[type[BehaviorManager], bhMgr] cal...
Keyword[public] identifier[PoolStatistics] identifier[getAllPoolsLifetimeStatistics] operator[SEP] identifier[Iterable] operator[<] identifier[BatchClientBehavior] operator[>] identifier[additionalBehaviors] operator[SEP] Keyword[throws] identifier[BatchErrorException] , identifier[IOException] { identifier[Poo...
public @Nonnull final <T extends Annotation> List<AnnotationValue<T>> getAnnotations(String member, Class<T> type) { AnnotationValue[] values = get(member, AnnotationValue[].class).orElse(null); if (ArrayUtils.isNotEmpty(values)) { List<AnnotationValue<T>> list = new ArrayList<>(values.lengt...
class class_name[name] begin[{] method[getAnnotations, return_type[type[List]], modifier[final public], parameter[member, type]] begin[{] local_variable[type[AnnotationValue], values] if[call[ArrayUtils.isNotEmpty, parameter[member[.values]]]] begin[{] local_variable[type[Li...
Keyword[public] annotation[@] identifier[Nonnull] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[Annotation] operator[>] identifier[List] operator[<] identifier[AnnotationValue] operator[<] identifier[T] operator[>] operator[>] identifier[getAnnotations] operator[SEP] identifier[String] identifier...
public void observeUpdateModelValues(@Observes @Before @UpdateModelValues PhaseEvent event) { log.debug("After Update Model Values event"); performObservation(event, PhaseIdType.UPDATE_MODEL_VALUES); }
class class_name[name] begin[{] method[observeUpdateModelValues, return_type[void], modifier[public], parameter[event]] begin[{] call[log.debug, parameter[literal["After Update Model Values event"]]] call[.performObservation, parameter[member[.event], member[PhaseIdType.UPDATE_M...
Keyword[public] Keyword[void] identifier[observeUpdateModelValues] operator[SEP] annotation[@] identifier[Observes] annotation[@] identifier[Before] annotation[@] identifier[UpdateModelValues] identifier[PhaseEvent] identifier[event] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] l...
public static <T, R> Map<R, List<T>> groupBy(Stream<T> stream, Function<T, R> classifier) { return stream.collect(groupingBy(classifier)); }
class class_name[name] begin[{] method[groupBy, return_type[type[Map]], modifier[public static], parameter[stream, classifier]] begin[{] return[call[stream.collect, parameter[call[.groupingBy, parameter[member[.classifier]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[R] operator[>] identifier[Map] operator[<] identifier[R] , identifier[List] operator[<] identifier[T] operator[>] operator[>] identifier[groupBy] operator[SEP] identifier[Stream] operator[<] identifier[T] operator[>] identifier[stream] , identifi...
@Override public boolean remove(Object o) { boolean b = queue.remove(o); if (b){ signalSizeReduced(); } return b; }
class class_name[name] begin[{] method[remove, return_type[type[boolean]], modifier[public], parameter[o]] begin[{] local_variable[type[boolean], b] if[member[.b]] begin[{] call[.signalSizeReduced, parameter[]] else begin[{] None end[}] re...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] identifier[Object] identifier[o] operator[SEP] { Keyword[boolean] identifier[b] operator[=] identifier[queue] operator[SEP] identifier[remove] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[if] o...
@SuppressWarnings("unused") public void setOkColor(@ColorInt int color) { mOkColor = Color.argb(255, Color.red(color), Color.green(color), Color.blue(color)); }
class class_name[name] begin[{] method[setOkColor, return_type[void], modifier[public], parameter[color]] begin[{] assign[member[.mOkColor], call[Color.argb, parameter[literal[255], call[Color.red, parameter[member[.color]]], call[Color.green, parameter[member[.color]]], call[Color.blue, parame...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setOkColor] operator[SEP] annotation[@] identifier[ColorInt] Keyword[int] identifier[color] operator[SEP] { identifier[mOkColor] operator[=] identifier[Color] operator[SEP] identifier[a...
public void setPreferredLocale(Locale preferredLocale) { if (!Objects.equals(this.preferredLocale, preferredLocale)) { this.preferredLocale = preferredLocale; this.manifestXml = null; this.apkMeta = null; this.manifestParsed = false; } }
class class_name[name] begin[{] method[setPreferredLocale, return_type[void], modifier[public], parameter[preferredLocale]] begin[{] if[call[Objects.equals, parameter[THIS[member[None.preferredLocale]], member[.preferredLocale]]]] begin[{] assign[THIS[member[None.preferr...
Keyword[public] Keyword[void] identifier[setPreferredLocale] operator[SEP] identifier[Locale] identifier[preferredLocale] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] Keyword[this] operator[SEP] identifier[preferredLocale] , identifier[...
public static void main(String[] args) { /* * Developers Notes: * * -No corresponding Junit test class currently * provided. Test by eyeball of the output. * * -Add a menu with Help(About) * --> TBD. * * -Figure out some sane way ...
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] if[binary_operation[member[args.length], <, literal[1]]] begin[{] call[System.err.println, parameter[literal["File name is required!"]]] ...
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[<] Other[1] operator[SEP] { identifier[System] operator[SEP]...
public static void runExample( AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException { // Get the CampaignService. CampaignServiceInterface campaignService = adWordsServices.get(session, CampaignServiceInterface.class); int offset = 0; // Create selecto...
class class_name[name] begin[{] method[runExample, return_type[void], modifier[public static], parameter[adWordsServices, session]] begin[{] local_variable[type[CampaignServiceInterface], campaignService] local_variable[type[int], offset] local_variable[type[SelectorBuilder], builder] ...
Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdWordsServicesInterface] identifier[adWordsServices] , identifier[AdWordsSession] identifier[session] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[CampaignServiceInterface] identifier[campaig...
public ObjectifyImpl open() { final ObjectifyImpl objectify = new ObjectifyImpl(this); stacks.get().add(objectify); return objectify; }
class class_name[name] begin[{] method[open, return_type[type[ObjectifyImpl]], modifier[public], parameter[]] begin[{] local_variable[type[ObjectifyImpl], objectify] call[stacks.get, parameter[]] return[member[.objectify]] end[}] END[}]
Keyword[public] identifier[ObjectifyImpl] identifier[open] operator[SEP] operator[SEP] { Keyword[final] identifier[ObjectifyImpl] identifier[objectify] operator[=] Keyword[new] identifier[ObjectifyImpl] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[stacks] operator[SEP] identifier[get] opera...
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case BpsimPackage.PARAMETER_VALUE__INSTANCE: return getInstance(); case BpsimPackage.PARAMETER_VALUE__RESULT: return getResult(); case BpsimPackage.PARAMETER_VALUE__VALID_FOR: return getValidFor...
class class_name[name] begin[{] method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=PARAMETER_VALUE__INSTANCE, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackag...
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { K...
public static void registerSerializers(final Kryo kryo) { // ImmutableList is used by ArrayTable. However, // we already have a separate serializer class for ImmutableList, // ImmutableListSerializer. If it is not already being used, register it. Serializer immutableListSerializer = get...
class class_name[name] begin[{] method[registerSerializers, return_type[void], modifier[public static], parameter[kryo]] begin[{] local_variable[type[Serializer], immutableListSerializer] if[binary_operation[member[.immutableListSerializer], instanceof, type[ImmutableListSerializer]]] b...
Keyword[public] Keyword[static] Keyword[void] identifier[registerSerializers] operator[SEP] Keyword[final] identifier[Kryo] identifier[kryo] operator[SEP] { identifier[Serializer] identifier[immutableListSerializer] operator[=] identifier[getSerializer] operator[SEP] identifier[kryo] , identifier[ImmutableList]...
Map<String, String> parseQueryString(final String queryString, final Map<String, String> into) { final Map<String, String> result = (into == null) ? new HashMap<>() : into; if (StringUtils.isNotEmpty(queryString)) { for (final String keyValuePair : queryString.split("&")) { final String[] keyValu...
class class_name[name] begin[{] method[parseQueryString, return_type[type[Map]], modifier[default], parameter[queryString, into]] begin[{] local_variable[type[Map], result] if[call[StringUtils.isNotEmpty, parameter[member[.queryString]]]] begin[{] ForStatement(body=BlockStat...
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parseQueryString] operator[SEP] Keyword[final] identifier[String] identifier[queryString] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[into] operator[SEP] { ...
public GitBranchResponse deleteBranch(File repositoryPath, boolean forceDelete, boolean remote, List<Ref> branchList) throws IOException, JavaGitException { CheckUtilities.checkNullArgument(repositoryPath, "repository path"); CheckUtilities.checkNullListArgument(branchList, "branch list"); CheckUtili...
class class_name[name] begin[{] method[deleteBranch, return_type[type[GitBranchResponse]], modifier[public], parameter[repositoryPath, forceDelete, remote, branchList]] begin[{] call[CheckUtilities.checkNullArgument, parameter[member[.repositoryPath], literal["repository path"]]] ...
Keyword[public] identifier[GitBranchResponse] identifier[deleteBranch] operator[SEP] identifier[File] identifier[repositoryPath] , Keyword[boolean] identifier[forceDelete] , Keyword[boolean] identifier[remote] , identifier[List] operator[<] identifier[Ref] operator[>] identifier[branchList] operator[SEP] Keyword[thr...
protected LightweightTypeReference getMergedType(List<LightweightTypeReference> types) { if (types.isEmpty()) { return null; } if (types.size() == 1) { LightweightTypeReference result = types.get(0); return result; } LightweightTypeReference result = getServices().getTypeConformanceComputer().getComm...
class class_name[name] begin[{] method[getMergedType, return_type[type[LightweightTypeReference]], modifier[protected], parameter[types]] begin[{] if[call[types.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_...
Keyword[protected] identifier[LightweightTypeReference] identifier[getMergedType] operator[SEP] identifier[List] operator[<] identifier[LightweightTypeReference] operator[>] identifier[types] operator[SEP] { Keyword[if] operator[SEP] identifier[types] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP]...
protected String createDialogErrorMessage() { if (getException() != null) { StringBuffer result = new StringBuffer(8); result.append(dialogBlockStart("")); result.append("<table border=\"0\">\n"); result.append("<tr><td><img src=\""); result.append(ge...
class class_name[name] begin[{] method[createDialogErrorMessage, return_type[type[String]], modifier[protected], parameter[]] begin[{] if[binary_operation[call[.getException, parameter[]], !=, literal[null]]] begin[{] local_variable[type[StringBuffer], result] ...
Keyword[protected] identifier[String] identifier[createDialogErrorMessage] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getException] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[StringBuffer] identifier[result] operator[=] Keyword[new] identifi...
public static String addImpliedHttpIfNecessary(String u) { int colon = u.indexOf(':'); int period = u.indexOf('.'); if (colon == -1 || (period >= 0) && (period < colon)) { // No scheme present; prepend "http://" u = "http://" + u; } return u; }
class class_name[name] begin[{] method[addImpliedHttpIfNecessary, return_type[type[String]], modifier[public static], parameter[u]] begin[{] local_variable[type[int], colon] local_variable[type[int], period] if[binary_operation[binary_operation[member[.colon], ==, literal[1]], |...
Keyword[public] Keyword[static] identifier[String] identifier[addImpliedHttpIfNecessary] operator[SEP] identifier[String] identifier[u] operator[SEP] { Keyword[int] identifier[colon] operator[=] identifier[u] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int]...
public PagedList<SyncFullSchemaPropertiesInner> listMemberSchemas(final String resourceGroupName, final String serverName, final String databaseName, final String syncGroupName, final String syncMemberName) { ServiceResponse<Page<SyncFullSchemaPropertiesInner>> response = listMemberSchemasSinglePageAsync(resour...
class class_name[name] begin[{] method[listMemberSchemas, return_type[type[PagedList]], modifier[public], parameter[resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName]] begin[{] local_variable[type[ServiceResponse], response] return[ClassCreator(arguments=[MethodInvocati...
Keyword[public] identifier[PagedList] operator[<] identifier[SyncFullSchemaPropertiesInner] operator[>] identifier[listMemberSchemas] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[serverName] , Keyword[final] identifier[String] identifier[...
public static String getStackTrace( Throwable throwable ) { if (throwable == null) return null; final ByteArrayOutputStream bas = new ByteArrayOutputStream(); final PrintWriter pw = new PrintWriter(bas); throwable.printStackTrace(pw); pw.close(); return bas.toString(); ...
class class_name[name] begin[{] method[getStackTrace, return_type[type[String]], modifier[public static], parameter[throwable]] begin[{] if[binary_operation[member[.throwable], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[ty...
Keyword[public] Keyword[static] identifier[String] identifier[getStackTrace] operator[SEP] identifier[Throwable] identifier[throwable] operator[SEP] { Keyword[if] operator[SEP] identifier[throwable] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[final] identifier[ByteArr...
@SuppressWarnings("unchecked") public static <T> T newInstance(String className, Object... arguments) { return (T)newInstance(Classes.forName(className), arguments); }
class class_name[name] begin[{] method[newInstance, return_type[type[T]], modifier[public static], parameter[className, arguments]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualif...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[newInstance] operator[SEP] identifier[String] identifier[className] , identifier[Object] operator[...] identifier[arguments] operator[SEP...
void deliverTaskMessage(final byte[] message) { synchronized (this.contextLifeCycle) { if (!this.task.isPresent()) { LOG.log(Level.WARNING, "Received a task message while there was no task running. Ignoring."); } else { this.task.get().deliver(message); } } }
class class_name[name] begin[{] method[deliverTaskMessage, return_type[void], modifier[default], parameter[message]] begin[{] SYNCHRONIZED[THIS[member[None.contextLifeCycle]]] BEGIN[{] if[THIS[member[None.task]call[None.isPresent, parameter[]]]] begin[{] ...
Keyword[void] identifier[deliverTaskMessage] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[message] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[contextLifeCycle] operator[SEP] { Keyword[if] operator[SEP] operator[!] Key...
private void configureCredential(List<ConfigProperty> properties) { // if a credential-reference has been defined, get the password property from it if (credentialSourceSupplier != null) { try { CredentialSource credentialSource = credentialSourceSupplier.get(); ...
class class_name[name] begin[{] method[configureCredential, return_type[void], modifier[private], parameter[properties]] begin[{] if[binary_operation[member[.credentialSourceSupplier], !=, literal[null]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarat...
Keyword[private] Keyword[void] identifier[configureCredential] operator[SEP] identifier[List] operator[<] identifier[ConfigProperty] operator[>] identifier[properties] operator[SEP] { Keyword[if] operator[SEP] identifier[credentialSourceSupplier] operator[!=] Other[null] operator[SEP] { Keyword[try] ...
private List<ParsedPolicy> getJavaPolicies() { List<ParsedPolicy> list = new ArrayList<ParsedPolicy>(); int counter = 1; String policyUrl = null; while ((policyUrl = SecurityActions.getSecurityProperty("policy.url." + counter)) != null) { try { policyUrl = ex...
class class_name[name] begin[{] method[getJavaPolicies, return_type[type[List]], modifier[private], parameter[]] begin[{] local_variable[type[List], list] local_variable[type[int], counter] local_variable[type[String], policyUrl] while[binary_operation[assign[member[.pol...
Keyword[private] identifier[List] operator[<] identifier[ParsedPolicy] operator[>] identifier[getJavaPolicies] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[ParsedPolicy] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ParsedPolicy] opera...
public static void enableAutoExpansion(final JTree tree) { tree.getModel().addTreeModelListener(new TreeModelListener() { public void treeNodesChanged(TreeModelEvent e) { // nothing to do } public void treeNodesInserted(TreeModelEvent e) { tree.expandPath(e.getTreePath()); ...
class class_name[name] begin[{] method[enableAutoExpansion, return_type[void], modifier[public static], parameter[tree]] begin[{] call[tree.getModel, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[enableAutoExpansion] operator[SEP] Keyword[final] identifier[JTree] identifier[tree] operator[SEP] { identifier[tree] operator[SEP] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[addTreeModelListener] operator[SEP] Keyword[new] i...
public static long TimesBetween(String long1, String long2) { long l1 = null == long1 ? 0 : (Pattern.matches(numerical, long1) ? Long.parseLong(long1) : 0); long l2 = null == long2 ? 0 : (Pattern.matches(numerical, long2) ? Long.parseLong(long2) : 0); return TimesBetween(l1, l2); }
class class_name[name] begin[{] method[TimesBetween, return_type[type[long]], modifier[public static], parameter[long1, long2]] begin[{] local_variable[type[long], l1] local_variable[type[long], l2] return[call[.TimesBetween, parameter[member[.l1], member[.l2]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[TimesBetween] operator[SEP] identifier[String] identifier[long1] , identifier[String] identifier[long2] operator[SEP] { Keyword[long] identifier[l1] operator[=] Other[null] operator[==] identifier[long1] operator[?] Other[0] operator[:] operator[SEP] ide...
public static int parseInt (@Nullable final String sStr, @Nonnegative final int nRadix, final int nDefault) { if (sStr != null && sStr.length () > 0) try { return Integer.parseInt (sStr, nRadix); } catch (final NumberFormatException ex) { // Fall through } r...
class class_name[name] begin[{] method[parseInt, return_type[type[int]], modifier[public static], parameter[sStr, nRadix, nDefault]] begin[{] if[binary_operation[binary_operation[member[.sStr], !=, literal[null]], &&, binary_operation[call[sStr.length, parameter[]], >, literal[0]]]] begin[{] Tr...
Keyword[public] Keyword[static] Keyword[int] identifier[parseInt] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sStr] , annotation[@] identifier[Nonnegative] Keyword[final] Keyword[int] identifier[nRadix] , Keyword[final] Keyword[int] identifier[nDefault] operator[SEP] ...
@SuppressWarnings("unchecked") public static Closure ensureClosure(Object o) { if (o == null) throw new UnsupportedOperationException(); if (o instanceof Closure) return (Closure) o; return new ReturnValueWrappingClosure(o); }
class class_name[name] begin[{] method[ensureClosure, return_type[type[Closure]], modifier[public static], parameter[o]] begin[{] if[binary_operation[member[.o], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[Closure] identifier[ensureClosure] operator[SEP] identifier[Object] identifier[o] operator[SEP] { Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] Keywor...
public <K, V> Optional<KafkaProducer<K, V>> getProducer( @NotNull final Serializer<K> keySerializer, @NotNull final Serializer<V> valueSerializer) { try { return partialConfigs.map( input -> new KafkaProducer<>(input, keySerializer, valueSerializer)); } catch (final Exception e) { ...
class class_name[name] begin[{] method[getProducer, return_type[type[Optional]], modifier[public], parameter[keySerializer, valueSerializer]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[LambdaExpression(body=ClassCreator(arguments=[MemberReference(member=input, p...
Keyword[public] operator[<] identifier[K] , identifier[V] operator[>] identifier[Optional] operator[<] identifier[KafkaProducer] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[getProducer] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[Serializer] operator[<] i...
public <T> void destroy() { final Set<Entry<Bean<?>, Object>> beanSet = beanReferences.entrySet(); final Iterator<Entry<Bean<?>, Object>> i = beanSet.iterator(); Bean<?> bean; while (i.hasNext()) { bean = i.next().getKey(); final T instance = (T) beanReferences.ge...
class class_name[name] begin[{] method[destroy, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Set], beanSet] local_variable[type[Iterator], i] local_variable[type[Bean], bean] while[call[i.hasNext, parameter[]]] begin[{] ...
Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[Entry] operator[<] identifier[Bean] operator[<] operator[?] operator[>] , identifier[Object] operator[>] operator[>] identifier[beanSet] ope...
public Observable<ServiceResponse<Page<VaultInner>>> listBySubscriptionSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null)...
class class_name[name] begin[{] method[listBySubscriptionSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expressio...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[VaultInner] operator[>] operator[>] operator[>] identifier[listBySubscriptionSinglePageAsync] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] iden...
static public void registerFactory( FeatureType datatype, String className) throws ClassNotFoundException { Class c = Class.forName( className); registerFactory( datatype, c); }
class class_name[name] begin[{] method[registerFactory, return_type[void], modifier[public static], parameter[datatype, className]] begin[{] local_variable[type[Class], c] call[.registerFactory, parameter[member[.datatype], member[.c]]] end[}] END[}]
Keyword[static] Keyword[public] Keyword[void] identifier[registerFactory] operator[SEP] identifier[FeatureType] identifier[datatype] , identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] { identifier[Class] identifier[c] operator[=] identifier[Class] operato...
public void registerConsumer( LocalMessageConsumer consumer ) { consumersLock.writeLock().lock(); try { localConsumers.add(consumer); } finally { consumersLock.writeLock().unlock(); } }
class class_name[name] begin[{] method[registerConsumer, return_type[void], modifier[public], parameter[consumer]] begin[{] call[consumersLock.writeLock, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=consumer, postfix_...
Keyword[public] Keyword[void] identifier[registerConsumer] operator[SEP] identifier[LocalMessageConsumer] identifier[consumer] operator[SEP] { identifier[consumersLock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword...
public static AWSCredentialsProvider getCredentialsProvider( AmazonWebServiceRequest req, AWSCredentialsProvider base) { if (req != null && req.getRequestCredentialsProvider() != null) { return req.getRequestCredentialsProvider(); } return base; }
class class_name[name] begin[{] method[getCredentialsProvider, return_type[type[AWSCredentialsProvider]], modifier[public static], parameter[req, base]] begin[{] if[binary_operation[binary_operation[member[.req], !=, literal[null]], &&, binary_operation[call[req.getRequestCredentialsProvider, p...
Keyword[public] Keyword[static] identifier[AWSCredentialsProvider] identifier[getCredentialsProvider] operator[SEP] identifier[AmazonWebServiceRequest] identifier[req] , identifier[AWSCredentialsProvider] identifier[base] operator[SEP] { Keyword[if] operator[SEP] identifier[req] operator[!=] Other[null] operato...
private void quietSetAutoCommit(Connection conn, Boolean autoCommit) { if (null != autoCommit) { try { conn.setAutoCommit(autoCommit); } catch (Exception e) { StaticLog.error(e); } } }
class class_name[name] begin[{] method[quietSetAutoCommit, return_type[void], modifier[private], parameter[conn, autoCommit]] begin[{] if[binary_operation[literal[null], !=, member[.autoCommit]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=...
Keyword[private] Keyword[void] identifier[quietSetAutoCommit] operator[SEP] identifier[Connection] identifier[conn] , identifier[Boolean] identifier[autoCommit] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[autoCommit] operator[SEP] { Keyword[try] { iden...
public static <S,T> List<T> collect(Iterator<S> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<T> transform) { return (List<T>) collect(self, new ArrayList<T>(), transform); }
class class_name[name] begin[{] method[collect, return_type[type[List]], modifier[public static], parameter[self, transform]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=self, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(argum...
Keyword[public] Keyword[static] operator[<] identifier[S] , identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[collect] operator[SEP] identifier[Iterator] operator[<] identifier[S] operator[>] identifier[self] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[...
public Iterable<MetricsInfo> filter(Iterable<MetricsInfo> metricsInfos) { List<MetricsInfo> metricsFiltered = new ArrayList<MetricsInfo>(); for (MetricsInfo metricsInfo : metricsInfos) { if (contains(metricsInfo.getName())) { metricsFiltered.add(metricsInfo); } } return metricsFilte...
class class_name[name] begin[{] method[filter, return_type[type[Iterable]], modifier[public], parameter[metricsInfos]] begin[{] local_variable[type[List], metricsFiltered] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation...
Keyword[public] identifier[Iterable] operator[<] identifier[MetricsInfo] operator[>] identifier[filter] operator[SEP] identifier[Iterable] operator[<] identifier[MetricsInfo] operator[>] identifier[metricsInfos] operator[SEP] { identifier[List] operator[<] identifier[MetricsInfo] operator[>] identifier[metricsFi...
@Nonnull public static SchematronResourcePure fromFile (@Nonnull @Nonempty final String sSCHPath) { return new SchematronResourcePure (new FileSystemResource (sSCHPath)); }
class class_name[name] begin[{] method[fromFile, return_type[type[SchematronResourcePure]], modifier[public static], parameter[sSCHPath]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=sSCHPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])...
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[SchematronResourcePure] identifier[fromFile] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Keyword[final] identifier[String] identifier[sSCHPath] operator[SEP] { Keyword[return] Keyword[new] identifi...
private static String getTemplateMarker(String str) throws IllegalStateException{ Pattern p = Pattern.compile("\\{\\{(.*?)\\}\\}", Pattern.DOTALL); Matcher matcher = p.matcher(str); String tpl = null; while(matcher.find()) { if(tpl!=null){ throw new IllegalStateException("More than one template i...
class class_name[name] begin[{] method[getTemplateMarker, return_type[type[String]], modifier[private static], parameter[str]] begin[{] local_variable[type[Pattern], p] local_variable[type[Matcher], matcher] local_variable[type[String], tpl] while[call[matcher.find, para...
Keyword[private] Keyword[static] identifier[String] identifier[getTemplateMarker] operator[SEP] identifier[String] identifier[str] operator[SEP] Keyword[throws] identifier[IllegalStateException] { identifier[Pattern] identifier[p] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] li...
static <S, I, O> Optional<ADSNode<S, I, O>> compute(final MealyMachine<S, I, ?, O> automaton, final Alphabet<I> input, final SplitTree<S, I, O> node) { final Iterator<S> targetStateIterator = node.ge...
class class_name[name] begin[{] method[compute, return_type[type[Optional]], modifier[static], parameter[automaton, input, node]] begin[{] local_variable[type[Iterator], targetStateIterator] local_variable[type[S], s1] local_variable[type[S], s2] local_variable[type[Word], separ...
Keyword[static] operator[<] identifier[S] , identifier[I] , identifier[O] operator[>] identifier[Optional] operator[<] identifier[ADSNode] operator[<] identifier[S] , identifier[I] , identifier[O] operator[>] operator[>] identifier[compute] operator[SEP] Keyword[final] identifier[MealyMachine] operator[<] identifie...
@CheckReturnValue public RoleAction setPermissions(Long permissions) { if (permissions != null) { Checks.notNegative(permissions, "Raw Permissions"); Checks.check(permissions <= Permission.ALL_PERMISSIONS, "Provided permissions may not be greater than a full permission se...
class class_name[name] begin[{] method[setPermissions, return_type[type[RoleAction]], modifier[public], parameter[permissions]] begin[{] if[binary_operation[member[.permissions], !=, literal[null]]] begin[{] call[Checks.notNegative, parameter[member[.permissions], litera...
annotation[@] identifier[CheckReturnValue] Keyword[public] identifier[RoleAction] identifier[setPermissions] operator[SEP] identifier[Long] identifier[permissions] operator[SEP] { Keyword[if] operator[SEP] identifier[permissions] operator[!=] Other[null] operator[SEP] { identifier[Checks] operator[SEP...
public static Image getInstance(PdfWriter writer, java.awt.Image awtImage, float quality) throws BadElementException, IOException { return getInstance(new PdfContentByte(writer), awtImage, quality); }
class class_name[name] begin[{] method[getInstance, return_type[type[Image]], modifier[public static], parameter[writer, awtImage, quality]] begin[{] return[call[.getInstance, parameter[ClassCreator(arguments=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selecto...
Keyword[public] Keyword[static] identifier[Image] identifier[getInstance] operator[SEP] identifier[PdfWriter] identifier[writer] , identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Image] identifier[awtImage] , Keyword[float] identifier[quality] operator[SEP] Keyword[throws] identifier[BadElemen...
public void setFrom(Address address) { assertArgumentNotNull("address", address); from = address; try { message.setFrom(address); } catch (MessagingException e) { String msg = buildAddressSettingFailureMessage("from", address); throw new SMailMessageSe...
class class_name[name] begin[{] method[setFrom, return_type[void], modifier[public], parameter[address]] begin[{] call[.assertArgumentNotNull, parameter[literal["address"], member[.address]]] assign[member[.from], member[.address]] TryStatement(block=[StatementExpression...
Keyword[public] Keyword[void] identifier[setFrom] operator[SEP] identifier[Address] identifier[address] operator[SEP] { identifier[assertArgumentNotNull] operator[SEP] literal[String] , identifier[address] operator[SEP] operator[SEP] identifier[from] operator[=] identifier[address] operator[SEP] Keyword[try] {...
public void error(VirtualConnection vc, TCPReadRequestContext req, IOException ioe) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "error: " + vc); } // This can legitemately happen if the client closes // the connection before sending data ...
class class_name[name] begin[{] method[error, return_type[void], modifier[public], parameter[vc, req, ioe]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[me...
Keyword[public] Keyword[void] identifier[error] operator[SEP] identifier[VirtualConnection] identifier[vc] , identifier[TCPReadRequestContext] identifier[req] , identifier[IOException] identifier[ioe] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnab...
private CompletableFuture<WriterFlushResult> flushOnce(TimeoutTimer timer) { boolean hasDelete = this.hasDeletePending.get(); boolean hasMerge = this.mergeTransactionCount.get() > 0; boolean hasSeal = this.hasSealPending.get(); boolean hasTruncate = this.truncateCount.get() > 0; ...
class class_name[name] begin[{] method[flushOnce, return_type[type[CompletableFuture]], modifier[private], parameter[timer]] begin[{] local_variable[type[boolean], hasDelete] local_variable[type[boolean], hasMerge] local_variable[type[boolean], hasSeal] local_variable[type[boole...
Keyword[private] identifier[CompletableFuture] operator[<] identifier[WriterFlushResult] operator[>] identifier[flushOnce] operator[SEP] identifier[TimeoutTimer] identifier[timer] operator[SEP] { Keyword[boolean] identifier[hasDelete] operator[=] Keyword[this] operator[SEP] identifier[hasDeletePending] operator[...
@Override public Map<String, Object> apply(final Map<String, Object> row) { Map<String, Object> cleanRow, filteredRow; // Make sure the row isn't null. if (row == null) { cleanRow = new LinkedHashMap<>(); } else { cleanRow = new LinkedHashMap<>(row); ...
class class_name[name] begin[{] method[apply, return_type[type[Map]], modifier[public], parameter[row]] begin[{] local_variable[type[Map], cleanRow] if[binary_operation[member[.row], ==, literal[null]]] begin[{] assign[member[.cleanRow], ClassCreator(arguments=[]...
annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[apply] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[row] operator[SEP] { identifier[Map] opera...
public void update(long throughput) { if (LOG.isDebugEnabled()) { LOG.debug("Received throughput of " + throughput + " on channel - " + this.channel.getComponentName()); } this.throughput = throughput; }
class class_name[name] begin[{] method[update, return_type[void], modifier[public], parameter[throughput]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[binary_operation[binary_operation[literal["Received throughpu...
Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[long] identifier[throughput] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SE...