code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Nonnull
public static ToStringGenerator getDerived (@Nonnull final String sSuperToString)
{
// We don't need the object if "super.toString" is involved, because in
// super.toString the object is already emitted!
return new ToStringGenerator (null)._appendSuper (sSuperToString);
} | class class_name[name] begin[{]
method[getDerived, return_type[type[ToStringGenerator]], modifier[public static], parameter[sSuperToString]] begin[{]
return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[ToStringGenerator] identifier[getDerived] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sSuperToString] operator[SEP] {
Keyword[return] Keyword[new] identifier[ToStringGenerator] operator[S... |
public static <OPERATOR extends Operator<?>> OPERATOR validateImplementation(OPERATOR operator) {
for (TypeVariable<?> var : Validate.notNull(operator, "operator").getClass().getTypeParameters()) {
if (Types.resolveAt(operator, var) == null) {
throw new OperatorDefinitionException(op... | class class_name[name] begin[{]
method[validateImplementation, return_type[type[OPERATOR]], modifier[public static], parameter[operator]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=o... | Keyword[public] Keyword[static] operator[<] identifier[OPERATOR] Keyword[extends] identifier[Operator] operator[<] operator[?] operator[>] operator[>] identifier[OPERATOR] identifier[validateImplementation] operator[SEP] identifier[OPERATOR] identifier[operator] operator[SEP] {
Keyword[for] operator[SEP] identif... |
public static String computeEtag(long lastModification, ApplicationConfiguration configuration, Crypto crypto) {
boolean useEtag = configuration.getBooleanWithDefault(HTTP_USE_ETAG,
HTTP_USE_ETAG_DEFAULT);
if (!useEtag) {
return null;
}
String raw = Long.toStr... | class class_name[name] begin[{]
method[computeEtag, return_type[type[String]], modifier[public static], parameter[lastModification, configuration, crypto]] begin[{]
local_variable[type[boolean], useEtag]
if[member[.useEtag]] begin[{]
return[literal[null]]
else begin[... | Keyword[public] Keyword[static] identifier[String] identifier[computeEtag] operator[SEP] Keyword[long] identifier[lastModification] , identifier[ApplicationConfiguration] identifier[configuration] , identifier[Crypto] identifier[crypto] operator[SEP] {
Keyword[boolean] identifier[useEtag] operator[=] identifie... |
@Override
public Tile getTile(int x, int y, int zoom)
{
return new Tile(x, y, zoom)
{
@Override
public synchronized boolean isLoaded()
{
return true;
}
@Override
public BufferedImage getImage()
{... | class class_name[name] begin[{]
method[getTile, return_type[type[Tile]], modifier[public], parameter[x, y, zoom]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefi... | annotation[@] identifier[Override] Keyword[public] identifier[Tile] identifier[getTile] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[zoom] operator[SEP] {
Keyword[return] Keyword[new] identifier[Tile] operator[SEP] identifier[x] , identifier[y] , identifier[... |
@NonNull
static Collection<Integer> processDeletions(@NonNull final Collection<Integer> positions, @NonNull final List<Integer> dismissedPositions) {
Collection<Integer> result = new ArrayList<>(positions);
Collections.sort(dismissedPositions, Collections.reverseOrder());
Collection<Integer>... | class class_name[name] begin[{]
method[processDeletions, return_type[type[Collection]], modifier[static], parameter[positions, dismissedPositions]] begin[{]
local_variable[type[Collection], result]
call[Collections.sort, parameter[member[.dismissedPositions], call[Collections.reverseOrd... | annotation[@] identifier[NonNull] Keyword[static] identifier[Collection] operator[<] identifier[Integer] operator[>] identifier[processDeletions] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Collection] operator[<] identifier[Integer] operator[>] identifier[positions] , annotation[@] ident... |
public void marshall(Channel channel, ProtocolMarshaller protocolMarshaller) {
if (channel == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(channel.getName(), NAME_BINDING);
protocolMars... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[channel, protocolMarshaller]] begin[{]
if[binary_operation[member[.channel], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Channel] identifier[channel] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[channel] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] i... |
@Override
public boolean isDirty() {
return rewrite || delegate.size() > firstAppendedIndex || !modifiedIndexes.isEmpty() || getDirtyKeys().hasNext();
} | class class_name[name] begin[{]
method[isDirty, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
return[binary_operation[binary_operation[binary_operation[member[.rewrite], ||, binary_operation[call[delegate.size, parameter[]], >, member[.firstAppendedIndex]]], ||, call[modifiedIndex... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isDirty] operator[SEP] operator[SEP] {
Keyword[return] identifier[rewrite] operator[||] identifier[delegate] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[firstAppendedIndex] operator[||] operator[!... |
public OIdentifiable convertToOIdentifiable(String value, Locale locale)
{
try
{
return new ORecordId(value);
} catch (Exception e)
{
throw newConversionException("Cannot convert '" + value + "' to "+getTargetType().getSimpleName(), value, locale);
}
} | class class_name[name] begin[{]
method[convertToOIdentifiable, return_type[type[OIdentifiable]], modifier[public], parameter[value, locale]] begin[{]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] identifier[OIdentifiable] identifier[convertToOIdentifiable] operator[SEP] identifier[String] identifier[value] , identifier[Locale] identifier[locale] operator[SEP] {
Keyword[try] {
Keyword[return] Keyword[new] identifier[ORecordId] operator[SEP] identifier[value] operator[SEP] opera... |
private RegionMetadata loadFromStream(final InputStream stream) {
try {
return LegacyRegionXmlLoadUtils.load(stream);
} catch (IOException exception) {
throw new SdkClientException(
"Error parsing region metadata from input stream",
excepti... | class class_name[name] begin[{]
method[loadFromStream, return_type[type[RegionMetadata]], modifier[private], parameter[stream]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[private] identifier[RegionMetadata] identifier[loadFromStream] operator[SEP] Keyword[final] identifier[InputStream] identifier[stream] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[LegacyRegionXmlLoadUtils] operator[SEP] identifier[load] operator[SEP] identifier[stream] operator[SE... |
public static CPInstance findByGroupId_First(long groupId,
OrderByComparator<CPInstance> orderByComparator)
throws com.liferay.commerce.product.exception.NoSuchCPInstanceException {
return getPersistence().findByGroupId_First(groupId, orderByComparator);
} | class class_name[name] begin[{]
method[findByGroupId_First, return_type[type[CPInstance]], modifier[public static], parameter[groupId, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPInstance] identifier[findByGroupId_First] operator[SEP] Keyword[long] identifier[groupId] , identifier[OrderByComparator] operator[<] identifier[CPInstance] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[life... |
@Override
public void serviceRequest(final Request request) {
key = request.getParameter(WServlet.DATA_LIST_PARAM_NAME);
if (key == null) {
super.serviceRequest(request);
}
} | class class_name[name] begin[{]
method[serviceRequest, return_type[void], modifier[public], parameter[request]] begin[{]
assign[member[.key], call[request.getParameter, parameter[member[WServlet.DATA_LIST_PARAM_NAME]]]]
if[binary_operation[member[.key], ==, literal[null]]] begin... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[serviceRequest] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
identifier[key] operator[=] identifier[request] operator[SEP] identifier[getParameter] operator[SEP] identifier[WServlet] operator[SEP] ... |
private void parseValidators(BeanDefinitionBuilder builder, Element element) {
ManagedList validators = new ManagedList();
for (Element validator : DomUtils.getChildElementsByTagName(element, "validator")) {
if (validator.hasAttribute("ref")) {
validators.add(new RuntimeBean... | class class_name[name] begin[{]
method[parseValidators, return_type[void], modifier[private], parameter[builder, element]] begin[{]
local_variable[type[ManagedList], validators]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(po... | Keyword[private] Keyword[void] identifier[parseValidators] operator[SEP] identifier[BeanDefinitionBuilder] identifier[builder] , identifier[Element] identifier[element] operator[SEP] {
identifier[ManagedList] identifier[validators] operator[=] Keyword[new] identifier[ManagedList] operator[SEP] operator[SEP] ope... |
private static LocalDate create(int year, Month month, int dayOfMonth) {
if (dayOfMonth > 28 && dayOfMonth > month.length(IsoChronology.INSTANCE.isLeapYear(year))) {
if (dayOfMonth == 29) {
throw new DateTimeException("Invalid date 'February 29' as '" + year + "' is not a leap year")... | class class_name[name] begin[{]
method[create, return_type[type[LocalDate]], modifier[private static], parameter[year, month, dayOfMonth]] begin[{]
if[binary_operation[binary_operation[member[.dayOfMonth], >, literal[28]], &&, binary_operation[member[.dayOfMonth], >, call[month.length, paramete... | Keyword[private] Keyword[static] identifier[LocalDate] identifier[create] operator[SEP] Keyword[int] identifier[year] , identifier[Month] identifier[month] , Keyword[int] identifier[dayOfMonth] operator[SEP] {
Keyword[if] operator[SEP] identifier[dayOfMonth] operator[>] Other[28] operator[&&] identifier[dayOfM... |
public TextBuilder parStyledContent(final String text, final TextStyle ts) {
return this.par().styledSpan(text, ts);
} | class class_name[name] begin[{]
method[parStyledContent, return_type[type[TextBuilder]], modifier[public], parameter[text, ts]] begin[{]
return[THIS[call[None.par, parameter[]]call[None.styledSpan, parameter[member[.text], member[.ts]]]]]
end[}]
END[}] | Keyword[public] identifier[TextBuilder] identifier[parStyledContent] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[TextStyle] identifier[ts] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[par] operator[SEP] operator[SEP] operator[SEP] identi... |
public void setSearchableInfo(SearchableInfo searchableInfo) {
if (searchView != null) {
searchView.setSearchableInfo(searchableInfo);
} else if (supportView != null) {
supportView.setSearchableInfo(searchableInfo);
} else {
throw new IllegalStateException(ERR... | class class_name[name] begin[{]
method[setSearchableInfo, return_type[void], modifier[public], parameter[searchableInfo]] begin[{]
if[binary_operation[member[.searchView], !=, literal[null]]] begin[{]
call[searchView.setSearchableInfo, parameter[member[.searchableInfo]]]... | Keyword[public] Keyword[void] identifier[setSearchableInfo] operator[SEP] identifier[SearchableInfo] identifier[searchableInfo] operator[SEP] {
Keyword[if] operator[SEP] identifier[searchView] operator[!=] Other[null] operator[SEP] {
identifier[searchView] operator[SEP] identifier[setSearchableInfo] o... |
private static boolean polylineDisjointPoint_(Polyline polyline_a,
Point point_b, double tolerance, ProgressTracker progress_tracker) {
// Quick rasterize test to see whether the the geometries are disjoint.
if (tryRasterizedContainsOrDisjoint_(polyline_a, point_b, tolerance,
false) == Relation.disjoint)
... | class class_name[name] begin[{]
method[polylineDisjointPoint_, return_type[type[boolean]], modifier[private static], parameter[polyline_a, point_b, tolerance, progress_tracker]] begin[{]
if[binary_operation[call[.tryRasterizedContainsOrDisjoint_, parameter[member[.polyline_a], member[.point_b],... | Keyword[private] Keyword[static] Keyword[boolean] identifier[polylineDisjointPoint_] operator[SEP] identifier[Polyline] identifier[polyline_a] , identifier[Point] identifier[point_b] , Keyword[double] identifier[tolerance] , identifier[ProgressTracker] identifier[progress_tracker] operator[SEP] {
Keyword[if] ... |
public boolean isCached(String requestUrl, int maxWidth, int maxHeight, ScaleType scaleType) {
throwIfNotOnMainThread();
String cacheKey = getCacheKey(requestUrl, maxWidth, maxHeight, scaleType);
return imageCache.getBitmap(cacheKey) != null;
} | class class_name[name] begin[{]
method[isCached, return_type[type[boolean]], modifier[public], parameter[requestUrl, maxWidth, maxHeight, scaleType]] begin[{]
call[.throwIfNotOnMainThread, parameter[]]
local_variable[type[String], cacheKey]
return[binary_operation[call[imageCach... | Keyword[public] Keyword[boolean] identifier[isCached] operator[SEP] identifier[String] identifier[requestUrl] , Keyword[int] identifier[maxWidth] , Keyword[int] identifier[maxHeight] , identifier[ScaleType] identifier[scaleType] operator[SEP] {
identifier[throwIfNotOnMainThread] operator[SEP] operator[SEP] op... |
protected Optional<TypeMirror> getFirstTypeArgument(TypeMirror type) {
TypeMirror typeMirror = null;
if (type instanceof DeclaredType) {
DeclaredType declaredType = (DeclaredType) type;
List<? extends TypeMirror> typeArguments = declaredType.getTypeArguments();
if (C... | class class_name[name] begin[{]
method[getFirstTypeArgument, return_type[type[Optional]], modifier[protected], parameter[type]] begin[{]
local_variable[type[TypeMirror], typeMirror]
if[binary_operation[member[.type], instanceof, type[DeclaredType]]] begin[{]
local_variable[t... | Keyword[protected] identifier[Optional] operator[<] identifier[TypeMirror] operator[>] identifier[getFirstTypeArgument] operator[SEP] identifier[TypeMirror] identifier[type] operator[SEP] {
identifier[TypeMirror] identifier[typeMirror] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[ty... |
public void printUsage (@Nonnull final PrintWriter aPW, final int nWidth, final String sCmdLineSyntax)
{
final int nArgPos = sCmdLineSyntax.indexOf (' ') + 1;
printWrapped (aPW, nWidth, getSyntaxPrefix ().length () + nArgPos, getSyntaxPrefix () + sCmdLineSyntax);
} | class class_name[name] begin[{]
method[printUsage, return_type[void], modifier[public], parameter[aPW, nWidth, sCmdLineSyntax]] begin[{]
local_variable[type[int], nArgPos]
call[.printWrapped, parameter[member[.aPW], member[.nWidth], binary_operation[call[.getSyntaxPrefix, parameter[]], ... | Keyword[public] Keyword[void] identifier[printUsage] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[PrintWriter] identifier[aPW] , Keyword[final] Keyword[int] identifier[nWidth] , Keyword[final] identifier[String] identifier[sCmdLineSyntax] operator[SEP] {
Keyword[final] Keyword[int]... |
private void resetAvailabilityFlags() {
epAvailable = false;
overlayAvailable = false;
for (DataDirectoryKey key : specials) {
specialsAvailability.put(key, false);
}
} | class class_name[name] begin[{]
method[resetAvailabilityFlags, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.epAvailable], literal[false]]
assign[member[.overlayAvailable], literal[false]]
ForStatement(body=BlockStatement(label=None, statemen... | Keyword[private] Keyword[void] identifier[resetAvailabilityFlags] operator[SEP] operator[SEP] {
identifier[epAvailable] operator[=] literal[boolean] operator[SEP] identifier[overlayAvailable] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[DataDirectoryKey] identifier[key] operat... |
private void checkPolicy(X509Certificate currCert)
throws CertPathValidatorException
{
String msg = "certificate policies";
if (debug != null) {
debug.println("PolicyChecker.checkPolicy() ---checking " + msg
+ "...");
debug.println("PolicyChecker.check... | class class_name[name] begin[{]
method[checkPolicy, return_type[void], modifier[private], parameter[currCert]] begin[{]
local_variable[type[String], msg]
if[binary_operation[member[.debug], !=, literal[null]]] begin[{]
call[debug.println, parameter[binary_operati... | Keyword[private] Keyword[void] identifier[checkPolicy] operator[SEP] identifier[X509Certificate] identifier[currCert] operator[SEP] Keyword[throws] identifier[CertPathValidatorException] {
identifier[String] identifier[msg] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[debug] ope... |
public CompletableFuture<Void> deleteTopicAsync(String path) {
EntityNameHelper.checkValidTopicName(path);
return deleteEntityAsync(path);
} | class class_name[name] begin[{]
method[deleteTopicAsync, return_type[type[CompletableFuture]], modifier[public], parameter[path]] begin[{]
call[EntityNameHelper.checkValidTopicName, parameter[member[.path]]]
return[call[.deleteEntityAsync, parameter[member[.path]]]]
end[}]
END[}] | Keyword[public] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[deleteTopicAsync] operator[SEP] identifier[String] identifier[path] operator[SEP] {
identifier[EntityNameHelper] operator[SEP] identifier[checkValidTopicName] operator[SEP] identifier[path] operator[SEP] operator[SE... |
public void setEnabled(boolean enabled) {
this.enabled = enabled;
if (enabled) {
DOM.setElementProperty(lineElement, "className", SLIDER_LINE);
} else {
DOM.setElementProperty(lineElement, "className", SLIDER_LINE + " "
+ SLIDER_LINE_DISABLED);
}
redraw();
} | class class_name[name] begin[{]
method[setEnabled, return_type[void], modifier[public], parameter[enabled]] begin[{]
assign[THIS[member[None.enabled]], member[.enabled]]
if[member[.enabled]] begin[{]
call[DOM.setElementProperty, parameter[member[.lineElem... | Keyword[public] Keyword[void] identifier[setEnabled] operator[SEP] Keyword[boolean] identifier[enabled] operator[SEP] {
Keyword[this] operator[SEP] identifier[enabled] operator[=] identifier[enabled] operator[SEP] Keyword[if] operator[SEP] identifier[enabled] operator[SEP] {
identifier[DOM] operator[S... |
public static void copySharedPreferences(SharedPreferences src, SharedPreferences target) {
SharedPreferences.Editor editor = target.edit();
for (Map.Entry<String, ?> entry : src.getAll().entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (value instanceof String) {... | class class_name[name] begin[{]
method[copySharedPreferences, return_type[void], modifier[public static], parameter[src, target]] begin[{]
local_variable[type[SharedPreferences], editor]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarator... | Keyword[public] Keyword[static] Keyword[void] identifier[copySharedPreferences] operator[SEP] identifier[SharedPreferences] identifier[src] , identifier[SharedPreferences] identifier[target] operator[SEP] {
identifier[SharedPreferences] operator[SEP] identifier[Editor] identifier[editor] operator[=] identifier[... |
public PaginatedResult execute(final Query query) {
final long count = getCount(query);
decorate(query);
return new PaginatedResult()
.objects(query.execute())
.total(count);
} | class class_name[name] begin[{]
method[execute, return_type[type[PaginatedResult]], modifier[public], parameter[query]] begin[{]
local_variable[type[long], count]
call[.decorate, parameter[member[.query]]]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=N... | Keyword[public] identifier[PaginatedResult] identifier[execute] operator[SEP] Keyword[final] identifier[Query] identifier[query] operator[SEP] {
Keyword[final] Keyword[long] identifier[count] operator[=] identifier[getCount] operator[SEP] identifier[query] operator[SEP] operator[SEP] identifier[decorate] operato... |
public void serialize(RecordOutput rout, String tag) throws IOException {
// write out any header, version info, here
rout.startRecord(this, tag);
rout.writeString(name, tag);
sTid.writeRest(rout, tag);
rout.endRecord(this, tag);
} | class class_name[name] begin[{]
method[serialize, return_type[void], modifier[public], parameter[rout, tag]] begin[{]
call[rout.startRecord, parameter[THIS[], member[.tag]]]
call[rout.writeString, parameter[member[.name], member[.tag]]]
call[sTid.writeRest, param... | Keyword[public] Keyword[void] identifier[serialize] operator[SEP] identifier[RecordOutput] identifier[rout] , identifier[String] identifier[tag] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[rout] operator[SEP] identifier[startRecord] operator[SEP] Keyword[this] , identifier[tag] operator[... |
public static synchronized int registerTokenForUDF(String functionName,
int functionId,
VoltType voltReturnType,
VoltType[] voltParameterTypes) {
i... | class class_name[name] begin[{]
method[registerTokenForUDF, return_type[type[int]], modifier[synchronized public static], parameter[functionName, functionId, voltReturnType, voltParameterTypes]] begin[{]
local_variable[type[int], retFunctionId]
local_variable[type[Type], hsqlReturnType]
... | Keyword[public] Keyword[static] Keyword[synchronized] Keyword[int] identifier[registerTokenForUDF] operator[SEP] identifier[String] identifier[functionName] , Keyword[int] identifier[functionId] , identifier[VoltType] identifier[voltReturnType] , identifier[VoltType] operator[SEP] operator[SEP] identifier[voltParame... |
public static boolean isNumeric(String str, int beginIndex, int endIndex)
{
for ( int i = beginIndex; i < endIndex; i++ ) {
char chr = str.charAt(i);
if ( ! StringUtil.isEnNumeric(chr) ) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[isNumeric, return_type[type[boolean]], modifier[public static], parameter[str, beginIndex, endIndex]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initiali... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isNumeric] operator[SEP] identifier[String] identifier[str] , Keyword[int] identifier[beginIndex] , Keyword[int] identifier[endIndex] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[beginIndex] operator[SEP... |
@SuppressWarnings("unchecked")
protected <T extends Indexable> T taskResult(String key) {
Indexable result = this.taskGroup.taskResult(key);
if (result == null) {
return null;
} else {
T castedResult = (T) result;
return castedResult;
}
} | class class_name[name] begin[{]
method[taskResult, return_type[type[T]], modifier[protected], parameter[key]] begin[{]
local_variable[type[Indexable], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] operator[<] identifier[T] Keyword[extends] identifier[Indexable] operator[>] identifier[T] identifier[taskResult] operator[SEP] identifier[String] identifier[key] operator[SEP] {
identifier[Indexable] identi... |
private void writeUShort(int pos, int s) {
byte b1 = (byte)((s >> 8) & 0xff);
byte b2 = (byte)(s & 0xff);
output[pos] = b1;
output[pos + 1] = b2;
} | class class_name[name] begin[{]
method[writeUShort, return_type[void], modifier[private], parameter[pos, s]] begin[{]
local_variable[type[byte], b1]
local_variable[type[byte], b2]
assign[member[.output], member[.b1]]
assign[member[.output], member[.b2]]
end[}... | Keyword[private] Keyword[void] identifier[writeUShort] operator[SEP] Keyword[int] identifier[pos] , Keyword[int] identifier[s] operator[SEP] {
Keyword[byte] identifier[b1] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[s] operator[>] operator[>] Other[8] operator[SE... |
@Override
public EvaluationResult findAttribute(URI attributeType,
URI attributeId,
URI issuer,
URI subjectCategory,
EvaluationCtx context,
... | class class_name[name] begin[{]
method[findAttribute, return_type[type[EvaluationResult]], modifier[public], parameter[attributeType, attributeId, issuer, subjectCategory, context, designatorType]] begin[{]
local_variable[type[String], resourceId]
if[call[logger.isDebugEnabled, paramete... | annotation[@] identifier[Override] Keyword[public] identifier[EvaluationResult] identifier[findAttribute] operator[SEP] identifier[URI] identifier[attributeType] , identifier[URI] identifier[attributeId] , identifier[URI] identifier[issuer] , identifier[URI] identifier[subjectCategory] , identifier[EvaluationCtx] i... |
public static void onFooterDrawerItemClick(DrawerBuilder drawer, IDrawerItem drawerItem, View v, Boolean fireOnClick) {
boolean checkable = !(drawerItem != null && drawerItem instanceof Selectable && !drawerItem.isSelectable());
if (checkable) {
drawer.resetStickyFooterSelection();
... | class class_name[name] begin[{]
method[onFooterDrawerItemClick, return_type[void], modifier[public static], parameter[drawer, drawerItem, v, fireOnClick]] begin[{]
local_variable[type[boolean], checkable]
if[member[.checkable]] begin[{]
call[drawer.resetStickyFoo... | Keyword[public] Keyword[static] Keyword[void] identifier[onFooterDrawerItemClick] operator[SEP] identifier[DrawerBuilder] identifier[drawer] , identifier[IDrawerItem] identifier[drawerItem] , identifier[View] identifier[v] , identifier[Boolean] identifier[fireOnClick] operator[SEP] {
Keyword[boolean] identifi... |
public static int getBitSize(long value) {
if (value > Integer.MAX_VALUE) {
return 64 - Integer.numberOfLeadingZeros((int) (value >> 32));
} else {
return 32 - Integer.numberOfLeadingZeros((int) value);
}
} | class class_name[name] begin[{]
method[getBitSize, return_type[type[int]], modifier[public static], parameter[value]] begin[{]
if[binary_operation[member[.value], >, member[Integer.MAX_VALUE]]] begin[{]
return[binary_operation[literal[64], -, call[Integer.numberOfLeadingZeros, param... | Keyword[public] Keyword[static] Keyword[int] identifier[getBitSize] operator[SEP] Keyword[long] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[>] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] {
Keyword[return] Other[64] operator[-] identi... |
@Override
public Choice2<B, A> invert() {
return match(Choice2::b, Choice2::a);
} | class class_name[name] begin[{]
method[invert, return_type[type[Choice2]], modifier[public], parameter[]] begin[{]
return[call[.match, parameter[MethodReference(expression=MemberReference(member=Choice2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member... | annotation[@] identifier[Override] Keyword[public] identifier[Choice2] operator[<] identifier[B] , identifier[A] operator[>] identifier[invert] operator[SEP] operator[SEP] {
Keyword[return] identifier[match] operator[SEP] identifier[Choice2] operator[::] identifier[b] , identifier[Choice2] operator[::] identif... |
public static String createBingUrl(String keyword, int pageIndex) throws Exception {
int first = pageIndex * 10 - 9;
keyword = URLEncoder.encode(keyword, "utf-8");
return String.format("http://cn.bing.com/search?q=%s&first=%s", keyword, first);
} | class class_name[name] begin[{]
method[createBingUrl, return_type[type[String]], modifier[public static], parameter[keyword, pageIndex]] begin[{]
local_variable[type[int], first]
assign[member[.keyword], call[URLEncoder.encode, parameter[member[.keyword], literal["utf-8"]]]]
ret... | Keyword[public] Keyword[static] identifier[String] identifier[createBingUrl] operator[SEP] identifier[String] identifier[keyword] , Keyword[int] identifier[pageIndex] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[int] identifier[first] operator[=] identifier[pageIndex] operator[*] Other[10] oper... |
public boolean shouldDoInitialLoad() {
if (role.is(Role.SENDER_BACKUP)) {
// was backup. become primary sender
role.next(Role.SENDER);
if (state.is(State.LOADING)) {
// previous loading was in progress. cancel and start from scratch
state.next... | class class_name[name] begin[{]
method[shouldDoInitialLoad, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[call[role.is, parameter[member[Role.SENDER_BACKUP]]]] begin[{]
call[role.next, parameter[member[Role.SENDER]]]
if[ca... | Keyword[public] Keyword[boolean] identifier[shouldDoInitialLoad] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[role] operator[SEP] identifier[is] operator[SEP] identifier[Role] operator[SEP] identifier[SENDER_BACKUP] operator[SEP] operator[SEP] {
identifier[role] operator[SEP] ide... |
public ItemWriter<Chunk<T>> getOrCreateWriter()
{
Node node = childNode.getOrCreate("writer");
ItemWriter<Chunk<T>> writer = new ItemWriterImpl<Chunk<T>>(this, "writer", childNode, node);
return writer;
} | class class_name[name] begin[{]
method[getOrCreateWriter, return_type[type[ItemWriter]], modifier[public], parameter[]] begin[{]
local_variable[type[Node], node]
local_variable[type[ItemWriter], writer]
return[member[.writer]]
end[}]
END[}] | Keyword[public] identifier[ItemWriter] operator[<] identifier[Chunk] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateWriter] operator[SEP] operator[SEP] {
identifier[Node] identifier[node] operator[=] identifier[childNode] operator[SEP] identifier[getOrCreate] operator[SEP] literal[String... |
public boolean previous() throws SQLException {
if (queryResult.getResultSetType() != ResultSetType.SELECT) {
return false;
}
final SelectQueryResult sqr = (SelectQueryResult) queryResult;
if (sqr.getRows() >= 0) {
sqr.moveRowPointerTo(sqr.getRowPointer() - 1);
... | class class_name[name] begin[{]
method[previous, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[queryResult.getResultSetType, parameter[]], !=, member[ResultSetType.SELECT]]] begin[{]
return[literal[false]]
else begin[{]
None
... | Keyword[public] Keyword[boolean] identifier[previous] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[queryResult] operator[SEP] identifier[getResultSetType] operator[SEP] operator[SEP] operator[!=] identifier[ResultSetType] operator[SEP] identifier[SEL... |
static Object castArray(
Class<?> toType, Class<?> fromType, Object fromValue )
throws UtilEvalError
{
// Collection type cast from array
if ( Types.isJavaAssignable(Collection.class, toType) )
if ( Types.isJavaAssignable(List.class, toType) || Queue.class == toType ) {
... | class class_name[name] begin[{]
method[castArray, return_type[type[Object]], modifier[static], parameter[toType, fromType, fromValue]] begin[{]
if[call[Types.isJavaAssignable, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(argume... | Keyword[static] identifier[Object] identifier[castArray] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[toType] , identifier[Class] operator[<] operator[?] operator[>] identifier[fromType] , identifier[Object] identifier[fromValue] operator[SEP] Keyword[throws] identifier[UtilEvalError... |
@SuppressWarnings("unchecked")
public TextFormatter<T> getFormatter(final FieldAccessor field, final Configuration config) {
if(field.hasAnnotation(CsvFormat.class)) {
CsvFormat formatAnno = field.getAnnotation(CsvFormat.class).get();
final TextFormatter<T> formatter = (TextF... | class class_name[name] begin[{]
method[getFormatter, return_type[type[TextFormatter]], modifier[public], parameter[field, config]] begin[{]
if[call[field.hasAnnotation, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=Non... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[TextFormatter] operator[<] identifier[T] operator[>] identifier[getFormatter] operator[SEP] Keyword[final] identifier[FieldAccessor] identifier[field] , Keyword[final] identifier[Configuration] identifier[... |
public OvhOrder hosting_web_serviceName_changeMainDomain_duration_POST(String serviceName, String duration, String domain, OvhMxPlanEnum mxplan) throws IOException {
String qPath = "/order/hosting/web/{serviceName}/changeMainDomain/{duration}";
StringBuilder sb = path(qPath, serviceName, duration);
HashMap<String... | class class_name[name] begin[{]
method[hosting_web_serviceName_changeMainDomain_duration_POST, return_type[type[OvhOrder]], modifier[public], parameter[serviceName, duration, domain, mxplan]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_vari... | Keyword[public] identifier[OvhOrder] identifier[hosting_web_serviceName_changeMainDomain_duration_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[duration] , identifier[String] identifier[domain] , identifier[OvhMxPlanEnum] identifier[mxplan] operator[SEP] Keyword[throw... |
protected void append(Options options, CharSequence sequence) {
TextSupport textSupport = this.textSupport;
if (textSupport == null || isUnescapeVariable(options)) {
options.append(sequence);
} else {
try {
textSupport.appendEscapedHtml(sequence.toString()... | class class_name[name] begin[{]
method[append, return_type[void], modifier[protected], parameter[options, sequence]] begin[{]
local_variable[type[TextSupport], textSupport]
if[binary_operation[binary_operation[member[.textSupport], ==, literal[null]], ||, call[.isUnescapeVariable, param... | Keyword[protected] Keyword[void] identifier[append] operator[SEP] identifier[Options] identifier[options] , identifier[CharSequence] identifier[sequence] operator[SEP] {
identifier[TextSupport] identifier[textSupport] operator[=] Keyword[this] operator[SEP] identifier[textSupport] operator[SEP] Keyword[if] oper... |
@Nonnull
public static LByteToDblFunction byteToDblFunctionFrom(Consumer<LByteToDblFunctionBuilder> buildingFunction) {
LByteToDblFunctionBuilder builder = new LByteToDblFunctionBuilder();
buildingFunction.accept(builder);
return builder.build();
} | class class_name[name] begin[{]
method[byteToDblFunctionFrom, return_type[type[LByteToDblFunction]], modifier[public static], parameter[buildingFunction]] begin[{]
local_variable[type[LByteToDblFunctionBuilder], builder]
call[buildingFunction.accept, parameter[member[.builder]]]
... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[LByteToDblFunction] identifier[byteToDblFunctionFrom] operator[SEP] identifier[Consumer] operator[<] identifier[LByteToDblFunctionBuilder] operator[>] identifier[buildingFunction] operator[SEP] {
identifier[LByteToDblFunctionBuilder] id... |
private PrepareResult executeBatchStandard(int estimatedParameterCount) throws SQLException {
int totalExecutionNumber = getTotalExecutionNumber();
SQLException exception = null;
BulkStatus status = new BulkStatus();
ComStmtPrepare comStmtPrepare = null;
FutureTask<AsyncMultiReadResult> futureReadT... | class class_name[name] begin[{]
method[executeBatchStandard, return_type[type[PrepareResult]], modifier[private], parameter[estimatedParameterCount]] begin[{]
local_variable[type[int], totalExecutionNumber]
local_variable[type[SQLException], exception]
local_variable[type[BulkStatus], s... | Keyword[private] identifier[PrepareResult] identifier[executeBatchStandard] operator[SEP] Keyword[int] identifier[estimatedParameterCount] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[int] identifier[totalExecutionNumber] operator[=] identifier[getTotalExecutionNumber] operator[SEP] operator[... |
public void deleteRows(final int[] rows) {
for (int i = rows.length - 1; i >= 0; i--) {
deleteRow(rows[i]);
}
} | class class_name[name] begin[{]
method[deleteRows, return_type[void], modifier[public], parameter[rows]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rows, postfix_operators=[], prefix_operators=[], q... | Keyword[public] Keyword[void] identifier[deleteRows] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[rows] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[rows] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identi... |
public com.google.api.ads.adwords.axis.v201809.cm.Money getBidFloor() {
return bidFloor;
} | class class_name[name] begin[{]
method[getBidFloor, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.bidFloor]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[Money] identifier[getBidFloor] operator[SE... |
public void setReturnType(String type) {
if (!Strings.isEmpty(type)
&& !Objects.equals("void", type)
&& !Objects.equals(Void.class.getName(), type)) {
this.sarlAction.setReturnType(newTypeRef(container, type));
} else {
this.sarlAction.setReturnType(null);
}
} | class class_name[name] begin[{]
method[setReturnType, return_type[void], modifier[public], parameter[type]] begin[{]
if[binary_operation[binary_operation[call[Strings.isEmpty, parameter[member[.type]]], &&, call[Objects.equals, parameter[literal["void"], member[.type]]]], &&, call[Objects.equal... | Keyword[public] Keyword[void] identifier[setReturnType] operator[SEP] identifier[String] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isEmpty] operator[SEP] identifier[type] operator[SEP] operator[&&] operator[!] identifier[Objects] operator[... |
@Override
public State getFinalState() {
State state = new State();
for (RowLevelPolicy policy : this.list) {
state.addAll(policy.getFinalState());
}
return state;
} | class class_name[name] begin[{]
method[getFinalState, return_type[type[State]], modifier[public], parameter[]] begin[{]
local_variable[type[State], state]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(argumen... | annotation[@] identifier[Override] Keyword[public] identifier[State] identifier[getFinalState] operator[SEP] operator[SEP] {
identifier[State] identifier[state] operator[=] Keyword[new] identifier[State] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[RowLevelPolicy] identifier[po... |
private void setAppAndComponentNameToDashboard(Dashboard dashboard, String appName, String compName) {
if(appName != null && !"".equals(appName)){
Cmdb cmdb = cmdbService.configurationItemByConfigurationItem(appName);
if(cmdb !=null) {
dashboard.setConfigurationItemBusS... | class class_name[name] begin[{]
method[setAppAndComponentNameToDashboard, return_type[void], modifier[private], parameter[dashboard, appName, compName]] begin[{]
if[binary_operation[binary_operation[member[.appName], !=, literal[null]], &&, literal[""]]] begin[{]
local_variable[type... | Keyword[private] Keyword[void] identifier[setAppAndComponentNameToDashboard] operator[SEP] identifier[Dashboard] identifier[dashboard] , identifier[String] identifier[appName] , identifier[String] identifier[compName] operator[SEP] {
Keyword[if] operator[SEP] identifier[appName] operator[!=] Other[null] operat... |
public int mergeData(Object objData)
{
int iErrorCode = DBConstants.NORMAL_RETURN;
FieldListener nextListener = (FieldListener)this.getListener();
if (nextListener != null)
iErrorCode = nextListener.doMergeData(objData);
else
iErrorCode = this.doMergeData(objD... | class class_name[name] begin[{]
method[mergeData, return_type[type[int]], modifier[public], parameter[objData]] begin[{]
local_variable[type[int], iErrorCode]
local_variable[type[FieldListener], nextListener]
if[binary_operation[member[.nextListener], !=, literal[null]]] begin[{... | Keyword[public] Keyword[int] identifier[mergeData] operator[SEP] identifier[Object] identifier[objData] operator[SEP] {
Keyword[int] identifier[iErrorCode] operator[=] identifier[DBConstants] operator[SEP] identifier[NORMAL_RETURN] operator[SEP] identifier[FieldListener] identifier[nextListener] operator[=] oper... |
public Number reserveStreamId(Number streamId) {
if (log.isTraceEnabled()) {
log.trace("Reserve stream id: {}", streamId);
}
if (reservedStreams.add(streamId.doubleValue())) {
return streamId;
}
return reserveStreamId();
} | class class_name[name] begin[{]
method[reserveStreamId, return_type[type[Number]], modifier[public], parameter[streamId]] begin[{]
if[call[log.isTraceEnabled, parameter[]]] begin[{]
call[log.trace, parameter[literal["Reserve stream id: {}"], member[.streamId]]]
e... | Keyword[public] identifier[Number] identifier[reserveStreamId] operator[SEP] identifier[Number] identifier[streamId] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[t... |
private Boolean indexExists(String labelName, List<String> propertyNames) {
Schema schema = db.schema();
for (IndexDefinition indexDefinition : Iterables.asList(schema.getIndexes(Label.label(labelName)))) {
List<String> properties = Iterables.asList(indexDefinition.getPropertyKeys());
... | class class_name[name] begin[{]
method[indexExists, return_type[type[Boolean]], modifier[private], parameter[labelName, propertyNames]] begin[{]
local_variable[type[Schema], schema]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Va... | Keyword[private] identifier[Boolean] identifier[indexExists] operator[SEP] identifier[String] identifier[labelName] , identifier[List] operator[<] identifier[String] operator[>] identifier[propertyNames] operator[SEP] {
identifier[Schema] identifier[schema] operator[=] identifier[db] operator[SEP] identifier[sc... |
public void doFinish(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
if (!common.checkGet(request, response)) return;
User user = common.requireLoggedInUser(request, response);
if (user == null) {
common.pageSoftError(resp... | class class_name[name] begin[{]
method[doFinish, return_type[void], modifier[public], parameter[request, response]] begin[{]
if[call[common.checkGet, parameter[member[.request], member[.response]]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[User... | Keyword[public] Keyword[void] identifier[doFinish] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] {
Keyword[if] operator[SEP] operator[!] identifier[comm... |
@NonNull
public static Completable onAssembly(@NonNull Completable source) {
Function<? super Completable, ? extends Completable> f = onCompletableAssembly;
if (f != null) {
return apply(f, source);
}
return source;
} | class class_name[name] begin[{]
method[onAssembly, return_type[type[Completable]], modifier[public static], parameter[source]] begin[{]
local_variable[type[Function], f]
if[binary_operation[member[.f], !=, literal[null]]] begin[{]
return[call[.apply, parameter[member[.f], me... | annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[Completable] identifier[onAssembly] operator[SEP] annotation[@] identifier[NonNull] identifier[Completable] identifier[source] operator[SEP] {
identifier[Function] operator[<] operator[?] Keyword[super] identifier[Completable] , operat... |
public String getLineAsString(int line) {
int index = line - 1;
if (lines.length <= index) return null;
int max = lines[index].intValue();
int min = 0;
if (index != 0) min = lines[index - 1].intValue() + 1;
if (min < max && max - 1 < lcText.length) return this.substring(min, max - min);
return "";
} | class class_name[name] begin[{]
method[getLineAsString, return_type[type[String]], modifier[public], parameter[line]] begin[{]
local_variable[type[int], index]
if[binary_operation[member[lines.length], <=, member[.index]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] identifier[String] identifier[getLineAsString] operator[SEP] Keyword[int] identifier[line] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[line] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[lines] operator[SEP] identifier[length] operator[<=] ident... |
private boolean metadataInvolvesSse(ObjectMetadata metadata) {
if (metadata == null) {
return false;
}
return containsNonNull(metadata.getSSECustomerAlgorithm(), metadata.getSSECustomerKeyMd5(),
metadata.getSSEAwsKmsKeyId());
} | class class_name[name] begin[{]
method[metadataInvolvesSse, return_type[type[boolean]], modifier[private], parameter[metadata]] begin[{]
if[binary_operation[member[.metadata], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
retur... | Keyword[private] Keyword[boolean] identifier[metadataInvolvesSse] operator[SEP] identifier[ObjectMetadata] identifier[metadata] operator[SEP] {
Keyword[if] operator[SEP] identifier[metadata] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword... |
private int findSampleRate(int sampleIndex, int version)
{
int ind = -1;
switch (version)
{
case MPEG_V_1:
ind = 0;
break;
case MPEG_V_2:
ind = 1;
break;
case MPEG_V_25:
ind = 2;
}
if ((ind != -1) && (sampleIndex >= 0) && (sampleIndex <= 3))
{
return sampleTable[sampleInde... | class class_name[name] begin[{]
method[findSampleRate, return_type[type[int]], modifier[private], parameter[sampleIndex, version]] begin[{]
local_variable[type[int], ind]
SwitchStatement(cases=[SwitchStatementCase(case=['MPEG_V_1'], statements=[StatementExpression(expression=Assignment(expressi... | Keyword[private] Keyword[int] identifier[findSampleRate] operator[SEP] Keyword[int] identifier[sampleIndex] , Keyword[int] identifier[version] operator[SEP] {
Keyword[int] identifier[ind] operator[=] operator[-] Other[1] operator[SEP] Keyword[switch] operator[SEP] identifier[version] operator[SEP] {
... |
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case XbasePackage.XSWITCH_EXPRESSION__SWITCH:
return switch_ != null;
case XbasePackage.XSWITCH_EXPRESSION__CASES:
return cases != null && !cases.isEmpty();
case XbasePackage.XSWITCH_EXPRESSION__DEFAULT:
return default_ != ... | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XSWITCH_EXPRESSION__SWITCH, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[]... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XSWITCH_EXPRESSION... |
public CmsResourceFilter addExcludeFlags(int flags) {
CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();
extendedFilter.m_flags = flags;
extendedFilter.m_filterFlags = EXCLUDED;
extendedFilter.updateCacheId();
return extendedFilter;
} | class class_name[name] begin[{]
method[addExcludeFlags, return_type[type[CmsResourceFilter]], modifier[public], parameter[flags]] begin[{]
local_variable[type[CmsResourceFilter], extendedFilter]
assign[member[extendedFilter.m_flags], member[.flags]]
assign[member[extende... | Keyword[public] identifier[CmsResourceFilter] identifier[addExcludeFlags] operator[SEP] Keyword[int] identifier[flags] operator[SEP] {
identifier[CmsResourceFilter] identifier[extendedFilter] operator[=] operator[SEP] identifier[CmsResourceFilter] operator[SEP] identifier[clone] operator[SEP] operator[SEP] opera... |
Map<Integer, StreamState> activeStreams() {
Map<Integer, StreamState> streams = new TreeMap<Integer, StreamState>(streamComparator);
streams.putAll(activeStreams);
return streams;
} | class class_name[name] begin[{]
method[activeStreams, return_type[type[Map]], modifier[default], parameter[]] begin[{]
local_variable[type[Map], streams]
call[streams.putAll, parameter[member[.activeStreams]]]
return[member[.streams]]
end[}]
END[}] | identifier[Map] operator[<] identifier[Integer] , identifier[StreamState] operator[>] identifier[activeStreams] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[Integer] , identifier[StreamState] operator[>] identifier[streams] operator[=] Keyword[new] identifier[TreeMap] operator[<] identi... |
private static int getWeekOfYear(PlainDate date) {
int dayOfYear = date.getDayOfYear();
int wCurrent = getFirstCalendarWeekAsDayOfYear(date, 0);
if (wCurrent <= dayOfYear) {
int result = ((dayOfYear - wCurrent) / 7) + 1;
if (result >= 53) { // Optimierung
... | class class_name[name] begin[{]
method[getWeekOfYear, return_type[type[int]], modifier[private static], parameter[date]] begin[{]
local_variable[type[int], dayOfYear]
local_variable[type[int], wCurrent]
if[binary_operation[member[.wCurrent], <=, member[.dayOfYear]]] begin[{]
... | Keyword[private] Keyword[static] Keyword[int] identifier[getWeekOfYear] operator[SEP] identifier[PlainDate] identifier[date] operator[SEP] {
Keyword[int] identifier[dayOfYear] operator[=] identifier[date] operator[SEP] identifier[getDayOfYear] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[wCu... |
public void marshall(UpdateVirtualInterfaceAttributesRequest updateVirtualInterfaceAttributesRequest, ProtocolMarshaller protocolMarshaller) {
if (updateVirtualInterfaceAttributesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateVirtualInterfaceAttributesRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateVirtualInterfaceAttributesRequest], ==, literal[null]]] begin[{]
ThrowStatement(ex... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateVirtualInterfaceAttributesRequest] identifier[updateVirtualInterfaceAttributesRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateVirtualInterfaceAttr... |
void setInterceptors(final AbstractHttpClient client, Object... encodings) {
// remove any encoding interceptors that are already set
client.removeRequestInterceptorByClass(ContentEncoding.RequestInterceptor.class);
client.removeResponseInterceptorByClass(ContentEncoding.ResponseInterceptor.clas... | class class_name[name] begin[{]
method[setInterceptors, return_type[void], modifier[default], parameter[client, encodings]] begin[{]
call[client.removeRequestInterceptorByClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=ContentEncoding, selectors=[], type=Ref... | Keyword[void] identifier[setInterceptors] operator[SEP] Keyword[final] identifier[AbstractHttpClient] identifier[client] , identifier[Object] operator[...] identifier[encodings] operator[SEP] {
identifier[client] operator[SEP] identifier[removeRequestInterceptorByClass] operator[SEP] identifier[ContentEncoding]... |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
mainPanel = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = n... | class class_name[name] begin[{]
method[initComponents, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.mainPanel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=Refe... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] {
identifier[mainPanel] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JPanel] operator... |
void findLargestAnglesForAllNodes() {
for (int i = 0; i < listInfo.size(); i++) {
NodeInfo info = listInfo.get(i);
if( info.edges.size < 2 )
continue;
for (int k = 0, j = info.edges.size-1; k < info.edges.size; j=k,k++) {
double angleA = info.edges.get(j).angle;
double angleB = info.edges.get(k... | class class_name[name] begin[{]
method[findLargestAnglesForAllNodes, return_type[void], modifier[default], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(... | Keyword[void] identifier[findLargestAnglesForAllNodes] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[listInfo] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] opera... |
public static double toRadians(double x)
{
if (Double.isInfinite(x) || x == 0.0) { // Matches +/- 0.0; return correct sign
return x;
}
// These are PI/180 split into high and low order bits
final double facta = 0.01745329052209854;
final double factb = 1.99784475... | class class_name[name] begin[{]
method[toRadians, return_type[type[double]], modifier[public static], parameter[x]] begin[{]
if[binary_operation[call[Double.isInfinite, parameter[member[.x]]], ||, binary_operation[member[.x], ==, literal[0.0]]]] begin[{]
return[member[.x]]
e... | Keyword[public] Keyword[static] Keyword[double] identifier[toRadians] operator[SEP] Keyword[double] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isInfinite] operator[SEP] identifier[x] operator[SEP] operator[||] identifier[x] operator[==] literal[Float] oper... |
private static Endpoint initServiceEndpoint(EndpointRegistry epRegistry, String contextPath, String servletName)
{
if (contextPath.startsWith("/"))
contextPath = contextPath.substring(1);
final ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CON... | class class_name[name] begin[{]
method[initServiceEndpoint, return_type[type[Endpoint]], modifier[private static], parameter[epRegistry, contextPath, servletName]] begin[{]
if[call[contextPath.startsWith, parameter[literal["/"]]]] begin[{]
assign[member[.contextPath], call[contextPa... | Keyword[private] Keyword[static] identifier[Endpoint] identifier[initServiceEndpoint] operator[SEP] identifier[EndpointRegistry] identifier[epRegistry] , identifier[String] identifier[contextPath] , identifier[String] identifier[servletName] operator[SEP] {
Keyword[if] operator[SEP] identifier[contextPath] ope... |
public void registerPainter(Painter painter) {
if (painters.containsKey(painter.getPaintableClassName())) {
List<Painter> list = painters.remove(painter.getPaintableClassName());
list.add(painter);
this.painters.put(painter.getPaintableClassName(), list);
} else {
List<Painter> list = new ArrayList<Pain... | class class_name[name] begin[{]
method[registerPainter, return_type[void], modifier[public], parameter[painter]] begin[{]
if[call[painters.containsKey, parameter[call[painter.getPaintableClassName, parameter[]]]]] begin[{]
local_variable[type[List], list]
cal... | Keyword[public] Keyword[void] identifier[registerPainter] operator[SEP] identifier[Painter] identifier[painter] operator[SEP] {
Keyword[if] operator[SEP] identifier[painters] operator[SEP] identifier[containsKey] operator[SEP] identifier[painter] operator[SEP] identifier[getPaintableClassName] operator[SEP] oper... |
public StreamEx<T> mapLast(Function<? super T, ? extends T> mapper) {
return supply(new PairSpliterator.PSOfRef<>(mapper, spliterator(), false));
} | class class_name[name] begin[{]
method[mapLast, return_type[type[StreamEx]], modifier[public], parameter[mapper]] begin[{]
return[call[.supply, parameter[ClassCreator(arguments=[MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(argumen... | Keyword[public] identifier[StreamEx] operator[<] identifier[T] operator[>] identifier[mapLast] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[T] operator[>] identifier[mapper] operator[SEP] {
Keyword[return] identifier[supply] op... |
public ServiceFuture<List<VirtualNetworkGatewayConnectionListEntityInner>> listConnectionsNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualNetworkGatewayConnectionListEntityInner>> serviceFuture, final ListOperationCallback<VirtualNetworkGatewayConnectionListEntityInner> serviceCallback) {
r... | class class_name[name] begin[{]
method[listConnectionsNextAsync, return_type[type[ServiceFuture]], modifier[public], parameter[nextPageLink, serviceFuture, serviceCallback]] begin[{]
return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listConnectionsNextSinglePageAsync, parameter[member[.n... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[VirtualNetworkGatewayConnectionListEntityInner] operator[>] operator[>] identifier[listConnectionsNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] , Keyword[final] identifier[ServiceFuture] ... |
private void setupLocale(OptionsParam options) {
// Prompt for language if not set
String locale = options.getViewParam().getConfigLocale();
if (locale == null || locale.length() == 0) {
// Don't use a parent of the MainFrame - that will initialise it
// with English!
... | class class_name[name] begin[{]
method[setupLocale, return_type[void], modifier[private], parameter[options]] begin[{]
local_variable[type[String], locale]
if[binary_operation[binary_operation[member[.locale], ==, literal[null]], ||, binary_operation[call[locale.length, parameter[]], ==... | Keyword[private] Keyword[void] identifier[setupLocale] operator[SEP] identifier[OptionsParam] identifier[options] operator[SEP] {
identifier[String] identifier[locale] operator[=] identifier[options] operator[SEP] identifier[getViewParam] operator[SEP] operator[SEP] operator[SEP] identifier[getConfigLocale] oper... |
public static String capitalize(String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
return str;
}
return new StringBuffer(strLen)
.append(Character.toTitleCase(str.charAt(0)))
.append(str.substring(1))
.toString();
... | class class_name[name] begin[{]
method[capitalize, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
local_variable[type[int], strLen]
if[binary_operation[binary_operation[member[.str], ==, literal[null]], ||, binary_operation[assign[member[.strLen], call[str.... | Keyword[public] Keyword[static] identifier[String] identifier[capitalize] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[int] identifier[strLen] operator[SEP] Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[||] operator[SEP] identifier[strLen] operator[=] ide... |
protected List<String> getOptionsByCommand(String command){
String rawOption = commands.get(command);
String[] options = rawOption.split(CoreConstants.COMMA);
return Arrays.asList(options);
} | class class_name[name] begin[{]
method[getOptionsByCommand, return_type[type[List]], modifier[protected], parameter[command]] begin[{]
local_variable[type[String], rawOption]
local_variable[type[String], options]
return[call[Arrays.asList, parameter[member[.options]]]]
end[}]
END[}] | Keyword[protected] identifier[List] operator[<] identifier[String] operator[>] identifier[getOptionsByCommand] operator[SEP] identifier[String] identifier[command] operator[SEP] {
identifier[String] identifier[rawOption] operator[=] identifier[commands] operator[SEP] identifier[get] operator[SEP] identifier[comm... |
protected JSType getTypeIfRefinable(Node node, FlowScope scope) {
switch (node.getToken()) {
case NAME:
StaticTypedSlot nameVar = scope.getSlot(node.getString());
if (nameVar != null) {
JSType nameVarType = nameVar.getType();
if (nameVarType == null) {
nameVarTy... | class class_name[name] begin[{]
method[getTypeIfRefinable, return_type[type[JSType]], modifier[protected], parameter[node, scope]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['NAME'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initi... | Keyword[protected] identifier[JSType] identifier[getTypeIfRefinable] operator[SEP] identifier[Node] identifier[node] , identifier[FlowScope] identifier[scope] operator[SEP] {
Keyword[switch] operator[SEP] identifier[node] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] operator[SEP] {
... |
static Predicate<DateValue> byDayFilter(
final WeekdayNum[] days, final boolean weeksInYear, final Weekday wkst) {
return new Predicate<DateValue>() {
public boolean apply(DateValue date) {
Weekday dow = Weekday.valueOf(date);
int nDays;
/... | class class_name[name] begin[{]
method[byDayFilter, return_type[type[Predicate]], modifier[static], parameter[days, weeksInYear, wkst]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimen... | Keyword[static] identifier[Predicate] operator[<] identifier[DateValue] operator[>] identifier[byDayFilter] operator[SEP] Keyword[final] identifier[WeekdayNum] operator[SEP] operator[SEP] identifier[days] , Keyword[final] Keyword[boolean] identifier[weeksInYear] , Keyword[final] identifier[Weekday] identifier[wkst] o... |
@SuppressWarnings("unchecked")
@Override
public EList<OAuthAuthorizationCode> getOAuthAuthorizationCodes() {
return (EList<OAuthAuthorizationCode>) eGet(StorePackage.Literals.USER__OAUTH_AUTHORIZATION_CODES, true);
} | class class_name[name] begin[{]
method[getOAuthAuthorizationCodes, return_type[type[EList]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=USER__OAUTH_AUTHORIZATION_CODES, postfix_operators=[], prefix_operators=[], qualifier=StorePacka... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[OAuthAuthorizationCode] operator[>] identifier[getOAuthAuthorizationCodes] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP]... |
public static <Key, Value> Aggregation<Key, Value, Integer> integerAvg() {
return new AggregationAdapter(new IntegerAvgAggregation<Key, Value>());
} | class class_name[name] begin[{]
method[integerAvg, return_type[type[Aggregation]], modifier[public static], parameter[]] begin[{]
return[ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]... | Keyword[public] Keyword[static] operator[<] identifier[Key] , identifier[Value] operator[>] identifier[Aggregation] operator[<] identifier[Key] , identifier[Value] , identifier[Integer] operator[>] identifier[integerAvg] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[AggregationAdapter]... |
static File getResourceAsTempFile(String resourceName) throws IOException {
checkArgument(!Strings.isNullOrEmpty(resourceName), "resourceName");
File file = File.createTempFile(resourceName, ".tmp");
OutputStream os = new FileOutputStream(file);
try {
getResourceAsTempFile(resourceName, file, os)... | class class_name[name] begin[{]
method[getResourceAsTempFile, return_type[type[File]], modifier[static], parameter[resourceName]] begin[{]
call[.checkArgument, parameter[call[Strings.isNullOrEmpty, parameter[member[.resourceName]]], literal["resourceName"]]]
local_variable[type[File], f... | Keyword[static] identifier[File] identifier[getResourceAsTempFile] operator[SEP] identifier[String] identifier[resourceName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[checkArgument] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identi... |
private void analyzePodspecDependency(Dependency dependency)
throws AnalysisException {
dependency.setEcosystem(DEPENDENCY_ECOSYSTEM);
String contents;
try {
contents = FileUtils.readFileToString(dependency.getActualFile(), Charset.defaultCharset());
} catch (IOEx... | class class_name[name] begin[{]
method[analyzePodspecDependency, return_type[void], modifier[private], parameter[dependency]] begin[{]
call[dependency.setEcosystem, parameter[member[.DEPENDENCY_ECOSYSTEM]]]
local_variable[type[String], contents]
TryStatement(block=[StatementExpr... | Keyword[private] Keyword[void] identifier[analyzePodspecDependency] operator[SEP] identifier[Dependency] identifier[dependency] operator[SEP] Keyword[throws] identifier[AnalysisException] {
identifier[dependency] operator[SEP] identifier[setEcosystem] operator[SEP] identifier[DEPENDENCY_ECOSYSTEM] operator[SEP] ... |
public InstanceNetworkInterface withPrivateIpAddresses(InstancePrivateIpAddress... privateIpAddresses) {
if (this.privateIpAddresses == null) {
setPrivateIpAddresses(new com.amazonaws.internal.SdkInternalList<InstancePrivateIpAddress>(privateIpAddresses.length));
}
for (InstancePriva... | class class_name[name] begin[{]
method[withPrivateIpAddresses, return_type[type[InstanceNetworkInterface]], modifier[public], parameter[privateIpAddresses]] begin[{]
if[binary_operation[THIS[member[None.privateIpAddresses]], ==, literal[null]]] begin[{]
call[.setPrivateI... | Keyword[public] identifier[InstanceNetworkInterface] identifier[withPrivateIpAddresses] operator[SEP] identifier[InstancePrivateIpAddress] operator[...] identifier[privateIpAddresses] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[privateIpAddresses] operator[==] Other[null] ope... |
public void addLeases(List<? extends VirtualMachineLease> leases) {
if (leases != null && !leases.isEmpty()) {
for(VirtualMachineLease l: leases)
leaseBlockingQueue.offer(l);
}
} | class class_name[name] begin[{]
method[addLeases, return_type[void], modifier[public], parameter[leases]] begin[{]
if[binary_operation[binary_operation[member[.leases], !=, literal[null]], &&, call[leases.isEmpty, parameter[]]]] begin[{]
ForStatement(body=StatementExpression(express... | Keyword[public] Keyword[void] identifier[addLeases] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[VirtualMachineLease] operator[>] identifier[leases] operator[SEP] {
Keyword[if] operator[SEP] identifier[leases] operator[!=] Other[null] operator[&&] operator[!] identifier[leas... |
public synchronized TreeEntry<K, V> ceilingEntry(final K key) {
// Retorna la clave mas cercana mayor o igual a la clave indicada
return getRoundEntry(key, true, true);
} | class class_name[name] begin[{]
method[ceilingEntry, return_type[type[TreeEntry]], modifier[synchronized public], parameter[key]] begin[{]
return[call[.getRoundEntry, parameter[member[.key], literal[true], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[synchronized] identifier[TreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[ceilingEntry] operator[SEP] Keyword[final] identifier[K] identifier[key] operator[SEP] {
Keyword[return] identifier[getRoundEntry] operator[SEP] identifier[key] , literal[boolean] , lit... |
public void addFinalTaskInfoListener(StateChangeListener<TaskInfo> stateChangeListener)
{
AtomicBoolean done = new AtomicBoolean();
StateChangeListener<Optional<TaskInfo>> fireOnceStateChangeListener = finalTaskInfo -> {
if (finalTaskInfo.isPresent() && done.compareAndSet(false, true)) {... | class class_name[name] begin[{]
method[addFinalTaskInfoListener, return_type[void], modifier[public], parameter[stateChangeListener]] begin[{]
local_variable[type[AtomicBoolean], done]
local_variable[type[StateChangeListener], fireOnceStateChangeListener]
call[finalTaskInfo.addS... | Keyword[public] Keyword[void] identifier[addFinalTaskInfoListener] operator[SEP] identifier[StateChangeListener] operator[<] identifier[TaskInfo] operator[>] identifier[stateChangeListener] operator[SEP] {
identifier[AtomicBoolean] identifier[done] operator[=] Keyword[new] identifier[AtomicBoolean] operator[SEP]... |
@Override
public T add(final T user) {
return users.put(user.getUsername(), user);
} | class class_name[name] begin[{]
method[add, return_type[type[T]], modifier[public], parameter[user]] begin[{]
return[call[users.put, parameter[call[user.getUsername, parameter[]], member[.user]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[add] operator[SEP] Keyword[final] identifier[T] identifier[user] operator[SEP] {
Keyword[return] identifier[users] operator[SEP] identifier[put] operator[SEP] identifier[user] operator[SEP] identifier[getUsername] operator[SEP] operator[... |
public static void indexToPointIndex( List<Point2D_I32> sequence , GrowQueue_I32 indexes ,
FastQueue<PointIndex_I32> output ) {
output.reset();
for( int i = 0; i < indexes.size; i++ ) {
int index = indexes.data[i];
Point2D_I32 p = sequence.get(index);
PointIndex_I32 o = output.grow();
o.x ... | class class_name[name] begin[{]
method[indexToPointIndex, return_type[void], modifier[public static], parameter[sequence, indexes, output]] begin[{]
call[output.reset, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarat... | Keyword[public] Keyword[static] Keyword[void] identifier[indexToPointIndex] operator[SEP] identifier[List] operator[<] identifier[Point2D_I32] operator[>] identifier[sequence] , identifier[GrowQueue_I32] identifier[indexes] , identifier[FastQueue] operator[<] identifier[PointIndex_I32] operator[>] identifier[output] ... |
public Date modifyObject(Context context,
String pid,
String state,
String label,
String ownerId,
String logMessage,
Date lastModifiedDate) throws... | class class_name[name] begin[{]
method[modifyObject, return_type[type[Date]], modifier[public], parameter[context, pid, state, label, ownerId, logMessage, lastModifiedDate]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=... | Keyword[public] identifier[Date] identifier[modifyObject] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[pid] , identifier[String] identifier[state] , identifier[String] identifier[label] , identifier[String] identifier[ownerId] , identifier[String] identifier[logMessage] , ... |
private Object writeSimple(Class<?> declaredType, Object value) {
Class<?> realType = value.getClass();
if (realType == Integer.class || realType == Long.class || realType == Short.class ||
realType == Byte.class || realType == Float.class || realType == Double.class ||
r... | class class_name[name] begin[{]
method[writeSimple, return_type[type[Object]], modifier[private], parameter[declaredType, value]] begin[{]
local_variable[type[Class], realType]
if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binar... | Keyword[private] identifier[Object] identifier[writeSimple] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[declaredType] , identifier[Object] identifier[value] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[realType] operator[=] identifier[value]... |
public boolean removeVertex(Vertex<T> v)
{
if (!verticies.containsValue(v))
return false;
verticies.remove(v.getName());
if( v == rootVertex )
rootVertex = null;
// Remove the edges associated with v
for(int n = 0; n < v.getOutgoingEdgeCount(); n ++)
{
... | class class_name[name] begin[{]
method[removeVertex, return_type[type[boolean]], modifier[public], parameter[v]] begin[{]
if[call[verticies.containsValue, parameter[member[.v]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
call[verticies.remove, par... | Keyword[public] Keyword[boolean] identifier[removeVertex] operator[SEP] identifier[Vertex] operator[<] identifier[T] operator[>] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[verticies] operator[SEP] identifier[containsValue] operator[SEP] identifier[v] operator[SEP] operator[SEP... |
private void validateUserParms(Context context,
String PID,
String sDefPID,
ServiceDeploymentReader sdepreader,
String methodName,
Hashtable<Stri... | class class_name[name] begin[{]
method[validateUserParms, return_type[void], modifier[private], parameter[context, PID, sDefPID, sdepreader, methodName, h_userParms, versDateTime]] begin[{]
assign[member[.PID], call[Server.getPID, parameter[member[.PID]]]]
assign[member[.sDefPID... | Keyword[private] Keyword[void] identifier[validateUserParms] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[PID] , identifier[String] identifier[sDefPID] , identifier[ServiceDeploymentReader] identifier[sdepreader] , identifier[String] identifier[methodName] , identifier[Hash... |
public int sendRequest(final String method, final String url,
final List<Header> hdrs) throws HttpException {
return sendRequest(method, url, hdrs, null, 0, null);
} | class class_name[name] begin[{]
method[sendRequest, return_type[type[int]], modifier[public], parameter[method, url, hdrs]] begin[{]
return[call[.sendRequest, parameter[member[.method], member[.url], member[.hdrs], literal[null], literal[0], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[sendRequest] operator[SEP] Keyword[final] identifier[String] identifier[method] , Keyword[final] identifier[String] identifier[url] , Keyword[final] identifier[List] operator[<] identifier[Header] operator[>] identifier[hdrs] operator[SEP] Keyword[throws] identifier[HttpExcepti... |
public static void main(String[] args) throws Exception {
Throttle t = new Throttle(50);
double desiredSpeed = Double.parseDouble(args[0]);
while (true) {
new java.util.Date().toString();
t.throttle(desiredSpeed, 100);
}
} | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[Throttle], t]
local_variable[type[double], desiredSpeed]
while[literal[true]] begin[{]
ClassCreator(arguments=[], body=N... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Throttle] identifier[t] operator[=] Keyword[new] identifier[Throttle] operator[SEP] Other[50] operator[SEP]... |
private static void setPluginProps(final String pluginDirName, final AbstractPlugin plugin, final Properties props) throws Exception {
final String author = props.getProperty(Plugin.PLUGIN_AUTHOR);
final String name = props.getProperty(Plugin.PLUGIN_NAME);
final String version = props.getPropert... | class class_name[name] begin[{]
method[setPluginProps, return_type[void], modifier[private static], parameter[pluginDirName, plugin, props]] begin[{]
local_variable[type[String], author]
local_variable[type[String], name]
local_variable[type[String], version]
local_variable[type... | Keyword[private] Keyword[static] Keyword[void] identifier[setPluginProps] operator[SEP] Keyword[final] identifier[String] identifier[pluginDirName] , Keyword[final] identifier[AbstractPlugin] identifier[plugin] , Keyword[final] identifier[Properties] identifier[props] operator[SEP] Keyword[throws] identifier[Exceptio... |
public void buildEnvironment(Run<?,?> build, EnvVars env) {
if (build instanceof AbstractBuild) {
buildEnvVars((AbstractBuild) build, env);
}
// else do not know how to do it
} | class class_name[name] begin[{]
method[buildEnvironment, return_type[void], modifier[public], parameter[build, env]] begin[{]
if[binary_operation[member[.build], instanceof, type[AbstractBuild]]] begin[{]
call[.buildEnvVars, parameter[Cast(expression=MemberReference(memb... | Keyword[public] Keyword[void] identifier[buildEnvironment] operator[SEP] identifier[Run] operator[<] operator[?] , operator[?] operator[>] identifier[build] , identifier[EnvVars] identifier[env] operator[SEP] {
Keyword[if] operator[SEP] identifier[build] Keyword[instanceof] identifier[AbstractBuild] operator[S... |
public static String map(String url, InputStream in)
{
return map(url, in, null, DEFAULT_UNMAP_URL_ON_OPEN,
DEFAULT_CLOSE_STREAM_ON_CLOSE);
} | class class_name[name] begin[{]
method[map, return_type[type[String]], modifier[public static], parameter[url, in]] begin[{]
return[call[.map, parameter[member[.url], member[.in], literal[null], member[.DEFAULT_UNMAP_URL_ON_OPEN], member[.DEFAULT_CLOSE_STREAM_ON_CLOSE]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[map] operator[SEP] identifier[String] identifier[url] , identifier[InputStream] identifier[in] operator[SEP] {
Keyword[return] identifier[map] operator[SEP] identifier[url] , identifier[in] , Other[null] , identifier[DEFAULT_UNMAP_URL_ON_OPEN] , ... |
@SuppressWarnings("unchecked")
public <S extends IPAddressPartConfiguredString<T, P>> SQLStringMatcher<T, P, S> getNetworkStringMatcher(boolean isEntireAddress, IPAddressSQLTranslator translator) {
return new SQLStringMatcher<T, P, S>((S) this, isEntireAddress, translator);
} | class class_name[name] begin[{]
method[getNetworkStringMatcher, return_type[type[SQLStringMatcher]], modifier[public], parameter[isEntireAddress, translator]] begin[{]
return[ClassCreator(arguments=[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=Refe... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[S] Keyword[extends] identifier[IPAddressPartConfiguredString] operator[<] identifier[T] , identifier[P] operator[>] operator[>] identifier[SQLStringMatcher] operator[<] identifier[T] , identif... |
public void execute()
{
for ( Resource resource : resources )
{
// Check for relative paths in the resource configuration.
// http://maven.apache.org/plugin-developers/common-bugs.html#Resolving_Relative_Paths
File resourceDir = new File( resource.getDirectory() )... | class class_name[name] begin[{]
method[execute, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocatio... | Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Resource] identifier[resource] operator[:] identifier[resources] operator[SEP] {
identifier[File] identifier[resourceDir] operator[=] Keyword[new] identifier[File] operator[SEP] ident... |
public GMOperation stripProfiles() {
final List<String> args = getCmdArgs();
args.add("+profile");
args.add("*");
return this;
} | class class_name[name] begin[{]
method[stripProfiles, return_type[type[GMOperation]], modifier[public], parameter[]] begin[{]
local_variable[type[List], args]
call[args.add, parameter[literal["+profile"]]]
call[args.add, parameter[literal["*"]]]
return[THIS[]]
... | Keyword[public] identifier[GMOperation] identifier[stripProfiles] operator[SEP] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[args] operator[=] identifier[getCmdArgs] operator[SEP] operator[SEP] operator[SEP] identifier[args] operator[SEP] identifier[add] o... |
public static String trimComma(String s) {
if (s.endsWith(",")) {
s = s.substring(0, s.length() - 1);
}
return s;
} | class class_name[name] begin[{]
method[trimComma, return_type[type[String]], modifier[public static], parameter[s]] begin[{]
if[call[s.endsWith, parameter[literal[","]]]] begin[{]
assign[member[.s], call[s.substring, parameter[literal[0], binary_operation[call[s.length, ... | Keyword[public] Keyword[static] identifier[String] identifier[trimComma] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[s] operator[=] ident... |
public Observable<Void> enableAsync(String resourceGroupName, String workflowName) {
return enableWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return r... | class class_name[name] begin[{]
method[enableAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, workflowName]] begin[{]
return[call[.enableWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.workflowName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[enableAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[workflowName] operator[SEP] {
Keyword[return] identifier[enableWithServiceResponseAsync] operator[SEP] identifier... |
public static String defaultHtml(HttpServletRequest request) {
CmsObject cms = CmsFlexController.getController(request).getCmsObject();
// We only want the big red warning in Offline mode
if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
return "<div><!--Dynamic ... | class class_name[name] begin[{]
method[defaultHtml, return_type[type[String]], modifier[public static], parameter[request]] begin[{]
local_variable[type[CmsObject], cms]
if[call[cms.getRequestContext, parameter[]]] begin[{]
return[literal["<div><!--Dynamic function not confi... | Keyword[public] Keyword[static] identifier[String] identifier[defaultHtml] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[CmsObject] identifier[cms] operator[=] identifier[CmsFlexController] operator[SEP] identifier[getController] operator[SEP] identifier[request] ope... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.