code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Override
public List<Metric> transform(QueryContext context, List<Metric> metrics) {
SystemAssert.requireArgument(metrics != null, "Cannot transform null metrics.");
if (metrics.isEmpty()) {
return metrics;
}
MetricDistiller distiller = new MetricDistil... | class class_name[name] begin[{]
method[transform, return_type[type[List]], modifier[public], parameter[context, metrics]] begin[{]
call[SystemAssert.requireArgument, parameter[binary_operation[member[.metrics], !=, literal[null]], literal["Cannot transform null metrics."]]]
if[c... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Metric] operator[>] identifier[transform] operator[SEP] identifier[QueryContext] identifier[context] , identifier[List] operator[<] identifier[Metric] operator[>] identifier[metrics] operator[SEP] {
identifier[SystemAsser... |
@Override
public Temporal adjustInto(Temporal temporal) {
if (!Chronology.from(temporal).equals(IsoChronology.INSTANCE)) {
throw new DateTimeException("Adjustment only supported on ISO date-time");
}
return temporal.with(WEEK_BASED_YEAR, year).with(WEEK_OF_WEEK_BASED_YEAR, week);... | class class_name[name] begin[{]
method[adjustInto, return_type[type[Temporal]], modifier[public], parameter[temporal]] begin[{]
if[call[Chronology.from, parameter[member[.temporal]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_ope... | annotation[@] identifier[Override] Keyword[public] identifier[Temporal] identifier[adjustInto] operator[SEP] identifier[Temporal] identifier[temporal] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Chronology] operator[SEP] identifier[from] operator[SEP] identifier[temporal] operator[SEP] opera... |
private double getDensityOutlierScore(ClusKernel x, ClusKernel entry) {
double[] sigmaSquared = entry.getVarianceVector();
// f(x) = factor * e^( -0.5 (x- mu ) * Sigma ^-1 * (x- mu ) )
double resultDensity = 0;
// exponent = -0.5 (x- mu ) * Sigma ^-1 * (x- mu ) )
// = -0.5 ( sum_d ((x_i ... | class class_name[name] begin[{]
method[getDensityOutlierScore, return_type[type[double]], modifier[private], parameter[x, entry]] begin[{]
local_variable[type[double], sigmaSquared]
local_variable[type[double], resultDensity]
local_variable[type[double], exponent]
local_variable... | Keyword[private] Keyword[double] identifier[getDensityOutlierScore] operator[SEP] identifier[ClusKernel] identifier[x] , identifier[ClusKernel] identifier[entry] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[sigmaSquared] operator[=] identifier[entry] operator[SEP] identifier[getVarianc... |
public void addLoad(InstructionHandle handle, XField field) {
getLoadStoreCount(field).loadCount++;
handleToFieldMap.put(handle, field);
loadHandleSet.set(handle.getPosition());
} | class class_name[name] begin[{]
method[addLoad, return_type[void], modifier[public], parameter[handle, field]] begin[{]
call[.getLoadStoreCount, parameter[member[.field]]]
call[handleToFieldMap.put, parameter[member[.handle], member[.field]]]
call[loadHandleSet.s... | Keyword[public] Keyword[void] identifier[addLoad] operator[SEP] identifier[InstructionHandle] identifier[handle] , identifier[XField] identifier[field] operator[SEP] {
identifier[getLoadStoreCount] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[loadCount] operator[++] operator[SEP] ident... |
public final <T extends AItemSpecifics<I, ?>, I extends IHasIdLongVersionName> List<T> retrieveItemSpecificsLst(
final Map<String, Object> pReqVars, final Long pLuv, final Class<T> pItemSpecClass) throws Exception {
List<T> result = null;
String verCond;
if (pLuv != null) {
String tblNm = pItemSpe... | class class_name[name] begin[{]
method[retrieveItemSpecificsLst, return_type[type[List]], modifier[final public], parameter[pReqVars, pLuv, pItemSpecClass]] begin[{]
local_variable[type[List], result]
local_variable[type[String], verCond]
if[binary_operation[member[.pLuv], !=, l... | Keyword[public] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[AItemSpecifics] operator[<] identifier[I] , operator[?] operator[>] , identifier[I] Keyword[extends] identifier[IHasIdLongVersionName] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[retrieveItemSpecific... |
public Object put(Object key, Object value)
{
if (null == key) throw new IllegalArgumentException("key must not be null");
if (!(key instanceof String)) throw new IllegalArgumentException("key must be a String");
if (!isValidObject(value))
{
if (value != null)
... | class class_name[name] begin[{]
method[put, return_type[type[Object]], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[literal[null], ==, member[.key]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] identifier[Object] identifier[put] operator[SEP] identifier[Object] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[key] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SE... |
public synchronized Object next() throws NoSuchElementException
{
try
{
if (!isHasCalledCheck())
{
hasNext();
}
setHasCalledCheck(false);
if (getHasNext())
{
Object obj = getObjectFromR... | class class_name[name] begin[{]
method[next, return_type[type[Object]], modifier[synchronized public], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isHasCalledCheck, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arg... | Keyword[public] Keyword[synchronized] identifier[Object] identifier[next] operator[SEP] operator[SEP] Keyword[throws] identifier[NoSuchElementException] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[isHasCalledCheck] operator[SEP] operator[SEP] operator[SEP] {
identi... |
@Override
public String getAsText() {
Object reflectiveArray = getValue();
if (reflectiveArray == null) {
return null;
}
// generic interface.
java.beans.PropertyEditor cellPropertyEditor = PropertyEditorFinder.getInstance().find(this.cellType);
int lengt... | class class_name[name] begin[{]
method[getAsText, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[Object], reflectiveArray]
if[binary_operation[member[.reflectiveArray], ==, literal[null]]] begin[{]
return[literal[null]]
else be... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getAsText] operator[SEP] operator[SEP] {
identifier[Object] identifier[reflectiveArray] operator[=] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reflectiveArray] operator[==] Ot... |
public static boolean isExpired(Date startDate, DateField dateField, int timeLength, Date checkedDate) {
final Date endDate = offset(startDate, dateField, timeLength);
return endDate.after(checkedDate);
} | class class_name[name] begin[{]
method[isExpired, return_type[type[boolean]], modifier[public static], parameter[startDate, dateField, timeLength, checkedDate]] begin[{]
local_variable[type[Date], endDate]
return[call[endDate.after, parameter[member[.checkedDate]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isExpired] operator[SEP] identifier[Date] identifier[startDate] , identifier[DateField] identifier[dateField] , Keyword[int] identifier[timeLength] , identifier[Date] identifier[checkedDate] operator[SEP] {
Keyword[final] identifier[Date] identifier[... |
public Period plusHours(int hours) {
if (hours == 0) {
return this;
}
int[] values = getValues(); // cloned
getPeriodType().addIndexedField(this, PeriodType.HOUR_INDEX, values, hours);
return new Period(values, getPeriodType());
} | class class_name[name] begin[{]
method[plusHours, return_type[type[Period]], modifier[public], parameter[hours]] begin[{]
if[binary_operation[member[.hours], ==, literal[0]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
local_variable[type[int], values]
... | Keyword[public] identifier[Period] identifier[plusHours] operator[SEP] Keyword[int] identifier[hours] operator[SEP] {
Keyword[if] operator[SEP] identifier[hours] operator[==] Other[0] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP]
}
Keyword[int] operator[SEP] operator[SEP] i... |
private void checkPrefix(String prefix) {
if (prefix.length() > 0) {
// Make sure that prefix starts with a legal character.
if (!contains(firstChars, prefix.charAt(0))) {
char[] chars = new char[firstChars.length];
for (int i = 0; i < chars.length; i++) {
chars[i] = firstChars... | class class_name[name] begin[{]
method[checkPrefix, return_type[void], modifier[private], parameter[prefix]] begin[{]
if[binary_operation[call[prefix.length, parameter[]], >, literal[0]]] begin[{]
if[call[.contains, parameter[member[.firstChars], call[prefix.charAt, para... | Keyword[private] Keyword[void] identifier[checkPrefix] operator[SEP] identifier[String] identifier[prefix] operator[SEP] {
Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] {
Keyword[if] operator[SEP] operator[!... |
public void addPropertyChangeListener(
String propertyName,
PropertyChangeListener listener) {
if (listener == null || propertyName == null) {
return;
}
listener = this.map.extract(listener);
if (listener != null) {
this.map.add(pro... | class class_name[name] begin[{]
method[addPropertyChangeListener, return_type[void], modifier[public], parameter[propertyName, listener]] begin[{]
if[binary_operation[binary_operation[member[.listener], ==, literal[null]], ||, binary_operation[member[.propertyName], ==, literal[null]]]] begin[{... | Keyword[public] Keyword[void] identifier[addPropertyChangeListener] operator[SEP] identifier[String] identifier[propertyName] , identifier[PropertyChangeListener] identifier[listener] operator[SEP] {
Keyword[if] operator[SEP] identifier[listener] operator[==] Other[null] operator[||] identifier[propertyName] op... |
@Override
public <T> T create(final Class<T> objectType, final Class[] parameterTypes, final Object... args) {
try {
Constructor constructor = resolveConstructor(objectType, parameterTypes);
T object;
if (!ArrayUtils.isEmpty(constructor.getParameterTypes())) {
Assert.equals(ArrayUtils.... | class class_name[name] begin[{]
method[create, return_type[type[T]], modifier[public], parameter[objectType, parameterTypes, args]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReferenc... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[create] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[objectType] , Keyword[final] identifier[Class] operator[SEP] operator[SEP] identifier[parameterTypes]... |
public void marshall(AccountLimit accountLimit, ProtocolMarshaller protocolMarshaller) {
if (accountLimit == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(accountLimit.getTotalCodeSize(), TOTALCODES... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[accountLimit, protocolMarshaller]] begin[{]
if[binary_operation[member[.accountLimit], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AccountLimit] identifier[accountLimit] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[accountLimit] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
public SummarizeResultsInner summarizeForPolicyDefinition(String subscriptionId, String policyDefinitionName, QueryOptions queryOptions) {
return summarizeForPolicyDefinitionWithServiceResponseAsync(subscriptionId, policyDefinitionName, queryOptions).toBlocking().single().body();
} | class class_name[name] begin[{]
method[summarizeForPolicyDefinition, return_type[type[SummarizeResultsInner]], modifier[public], parameter[subscriptionId, policyDefinitionName, queryOptions]] begin[{]
return[call[.summarizeForPolicyDefinitionWithServiceResponseAsync, parameter[member[.subscriptionId], ... | Keyword[public] identifier[SummarizeResultsInner] identifier[summarizeForPolicyDefinition] operator[SEP] identifier[String] identifier[subscriptionId] , identifier[String] identifier[policyDefinitionName] , identifier[QueryOptions] identifier[queryOptions] operator[SEP] {
Keyword[return] identifier[summarizeFo... |
@SuppressWarnings("unchecked")
public RoutingStrategy getRoutingStrategy(String storeName) {
// acquire read lock
readLock.lock();
try {
Map<String, RoutingStrategy> routingStrategyMap = (Map<String, RoutingStrategy>) metadataCache.get(ROUTING_STRATEGY_KEY)
... | class class_name[name] begin[{]
method[getRoutingStrategy, return_type[type[RoutingStrategy]], modifier[public], parameter[storeName]] begin[{]
call[readLock.lock, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], in... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[RoutingStrategy] identifier[getRoutingStrategy] operator[SEP] identifier[String] identifier[storeName] operator[SEP] {
identifier[readLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] ... |
public static GenericColor valueOf(Hue hue, Saturation saturation, Lightness lightness, Alpha alpha) {
Objects.requireNonNull(hue, "hue");
Objects.requireNonNull(saturation, "saturation");
Objects.requireNonNull(lightness, "lightness");
Objects.requireNonNull(alpha, "alpha");
GenericColor genericCo... | class class_name[name] begin[{]
method[valueOf, return_type[type[GenericColor]], modifier[public static], parameter[hue, saturation, lightness, alpha]] begin[{]
call[Objects.requireNonNull, parameter[member[.hue], literal["hue"]]]
call[Objects.requireNonNull, parameter[member[.s... | Keyword[public] Keyword[static] identifier[GenericColor] identifier[valueOf] operator[SEP] identifier[Hue] identifier[hue] , identifier[Saturation] identifier[saturation] , identifier[Lightness] identifier[lightness] , identifier[Alpha] identifier[alpha] operator[SEP] {
identifier[Objects] operator[SEP] ident... |
public <K, V> MultipleRequestBuilder<K, V> newMultipleRequest(Key.Type<K> keyType,
Class<V> valueType) {
return new MultipleRequestBuilderImpl<K, V>(newViewRequestParameters(keyType.getType(),
valueType));
} | class class_name[name] begin[{]
method[newMultipleRequest, return_type[type[MultipleRequestBuilder]], modifier[public], parameter[keyType, valueType]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operator... | Keyword[public] operator[<] identifier[K] , identifier[V] operator[>] identifier[MultipleRequestBuilder] operator[<] identifier[K] , identifier[V] operator[>] identifier[newMultipleRequest] operator[SEP] identifier[Key] operator[SEP] identifier[Type] operator[<] identifier[K] operator[>] identifier[keyType] , identi... |
public Table insertColumn(int index, Column<?> column) {
validateColumn(column);
columnList.add(index, column);
return this;
} | class class_name[name] begin[{]
method[insertColumn, return_type[type[Table]], modifier[public], parameter[index, column]] begin[{]
call[.validateColumn, parameter[member[.column]]]
call[columnList.add, parameter[member[.index], member[.column]]]
return[THIS[]]
end[}... | Keyword[public] identifier[Table] identifier[insertColumn] operator[SEP] Keyword[int] identifier[index] , identifier[Column] operator[<] operator[?] operator[>] identifier[column] operator[SEP] {
identifier[validateColumn] operator[SEP] identifier[column] operator[SEP] operator[SEP] identifier[columnList] opera... |
protected void success(final Job job, final Object runner, final Object result, final String curQueue) {
try {
PoolUtils.doWorkInPool(this.jedisPool, new PoolWork<Jedis, Void>() {
/**
* {@inheritDoc}
*/
@Override
publi... | class class_name[name] begin[{]
method[success, return_type[void], modifier[protected], parameter[job, runner, result, curQueue]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberRefe... | Keyword[protected] Keyword[void] identifier[success] operator[SEP] Keyword[final] identifier[Job] identifier[job] , Keyword[final] identifier[Object] identifier[runner] , Keyword[final] identifier[Object] identifier[result] , Keyword[final] identifier[String] identifier[curQueue] operator[SEP] {
Keyword[try] ... |
public void setInterval(Interval interval) {
if (interval == null) {
interval = INTERVAL_FACTORY.getInstance();
}
this.interval = interval;
} | class class_name[name] begin[{]
method[setInterval, return_type[void], modifier[public], parameter[interval]] begin[{]
if[binary_operation[member[.interval], ==, literal[null]]] begin[{]
assign[member[.interval], call[INTERVAL_FACTORY.getInstance, parameter[]]]
e... | Keyword[public] Keyword[void] identifier[setInterval] operator[SEP] identifier[Interval] identifier[interval] operator[SEP] {
Keyword[if] operator[SEP] identifier[interval] operator[==] Other[null] operator[SEP] {
identifier[interval] operator[=] identifier[INTERVAL_FACTORY] operator[SEP] identifier[g... |
public SDVariable zero(String name, org.nd4j.linalg.api.buffer.DataType dataType, int... shape) {
return var(name, new ZeroInitScheme(), dataType, ArrayUtil.toLongArray(shape));
} | class class_name[name] begin[{]
method[zero, return_type[type[SDVariable]], modifier[public], parameter[name, dataType, shape]] begin[{]
return[call[.var, parameter[member[.name], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] identifier[SDVariable] identifier[zero] operator[SEP] identifier[String] identifier[name] , identifier[org] operator[SEP] identifier[nd4j] operator[SEP] identifier[linalg] operator[SEP] identifier[api] operator[SEP] identifier[buffer] operator[SEP] identifier[DataType] identifier[dataType] , Keyword[i... |
public void marshall(UpdateDefaultBranchRequest updateDefaultBranchRequest, ProtocolMarshaller protocolMarshaller) {
if (updateDefaultBranchRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(u... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateDefaultBranchRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateDefaultBranchRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateDefaultBranchRequest] identifier[updateDefaultBranchRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateDefaultBranchRequest] operator[==] Other[null]... |
private static void mapResource(WorkItem resource, Map<IProject, List<WorkItem>> projectsMap, boolean checkJavaProject) {
IProject project = resource.getProject();
if (checkJavaProject && !ProjectUtilities.isJavaProject(project)) {
// non java projects: can happen only for changesets
... | class class_name[name] begin[{]
method[mapResource, return_type[void], modifier[private static], parameter[resource, projectsMap, checkJavaProject]] begin[{]
local_variable[type[IProject], project]
if[binary_operation[member[.checkJavaProject], &&, call[ProjectUtilities.isJavaProject, p... | Keyword[private] Keyword[static] Keyword[void] identifier[mapResource] operator[SEP] identifier[WorkItem] identifier[resource] , identifier[Map] operator[<] identifier[IProject] , identifier[List] operator[<] identifier[WorkItem] operator[>] operator[>] identifier[projectsMap] , Keyword[boolean] identifier[checkJava... |
@Override
protected GraphConfigurationView createUserConfiguration(final StaplerRequest request) {
return new UserGraphConfigurationView(
createConfiguration(getAvailableGraphs()), getProject(),
WarningsDescriptor.getProjectUrl(parser), WarningsDescriptor.getProjectUrl(nu... | class class_name[name] begin[{]
method[createUserConfiguration, return_type[type[GraphConfigurationView]], modifier[protected], parameter[request]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAvailableGraphs, postfix_operators=[], prefix_... | annotation[@] identifier[Override] Keyword[protected] identifier[GraphConfigurationView] identifier[createUserConfiguration] operator[SEP] Keyword[final] identifier[StaplerRequest] identifier[request] operator[SEP] {
Keyword[return] Keyword[new] identifier[UserGraphConfigurationView] operator[SEP] identifier[cre... |
public final static List<PolymerNotation> getPeptidePolymers(List<PolymerNotation> polymers) {
List<PolymerNotation> peptidePolymers = new ArrayList<PolymerNotation>();
for (PolymerNotation polymer : polymers) {
if (polymer.getPolymerID() instanceof PeptideEntity) {
peptidePolymers.add(polymer... | class class_name[name] begin[{]
method[getPeptidePolymers, return_type[type[List]], modifier[final public static], parameter[polymers]] begin[{]
local_variable[type[List], peptidePolymers]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Me... | Keyword[public] Keyword[final] Keyword[static] identifier[List] operator[<] identifier[PolymerNotation] operator[>] identifier[getPeptidePolymers] operator[SEP] identifier[List] operator[<] identifier[PolymerNotation] operator[>] identifier[polymers] operator[SEP] {
identifier[List] operator[<] identifier[Polyme... |
public void marshall(GetUsagePlanKeyRequest getUsagePlanKeyRequest, ProtocolMarshaller protocolMarshaller) {
if (getUsagePlanKeyRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getUsagePlanK... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getUsagePlanKeyRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getUsagePlanKeyRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[L... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetUsagePlanKeyRequest] identifier[getUsagePlanKeyRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getUsagePlanKeyRequest] operator[==] Other[null] operator[SE... |
protected final void beforeDelivery(final SIBusMessage message, MessageEndpoint endpoint) {
if (TRACE.isEntryEnabled()) {
final String methodName = "beforeDelivery";
SibTr.entry(this, TRACE, methodName, new Object [] { message, endpoint});
SibTr.exit(this, TRACE, methodName)... | class class_name[name] begin[{]
method[beforeDelivery, return_type[void], modifier[final protected], parameter[message, endpoint]] begin[{]
if[call[TRACE.isEntryEnabled, parameter[]]] begin[{]
local_variable[type[String], methodName]
call[SibTr.entry, paramet... | Keyword[protected] Keyword[final] Keyword[void] identifier[beforeDelivery] operator[SEP] Keyword[final] identifier[SIBusMessage] identifier[message] , identifier[MessageEndpoint] identifier[endpoint] operator[SEP] {
Keyword[if] operator[SEP] identifier[TRACE] operator[SEP] identifier[isEntryEnabled] operator[SE... |
@SuppressWarnings("unchecked")
DynamicConverter<E> createConverter(SimpleKeywordNode kn) {
String keyword = (String) kn.getValue();
String converterClassStr = (String) converterMap.get(keyword);
if (converterClassStr != null) {
try {
return (DynamicConverter<E>) OptionHelper.instantiateByCl... | class class_name[name] begin[{]
method[createConverter, return_type[type[DynamicConverter]], modifier[default], parameter[kn]] begin[{]
local_variable[type[String], keyword]
local_variable[type[String], converterClassStr]
if[binary_operation[member[.converterClassStr], !=, liter... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[DynamicConverter] operator[<] identifier[E] operator[>] identifier[createConverter] operator[SEP] identifier[SimpleKeywordNode] identifier[kn] operator[SEP] {
identifier[String] identifier[keyword] operator[=] opera... |
@Override
public void endElement(String namespaceURI, String localeName, String tagName) throws SAXException
{
Command cmd = stack.pop();
// cmd.setTabCount(tabCount);
// find if command works in context
if (!stack.isEmpty())
{
Command ctx = stack.peek();
ctx.addChild(cmd);
}
// upper level comm... | class class_name[name] begin[{]
method[endElement, return_type[void], modifier[public], parameter[namespaceURI, localeName, tagName]] begin[{]
local_variable[type[Command], cmd]
if[call[stack.isEmpty, parameter[]]] begin[{]
local_variable[type[Command], ctx]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[endElement] operator[SEP] identifier[String] identifier[namespaceURI] , identifier[String] identifier[localeName] , identifier[String] identifier[tagName] operator[SEP] Keyword[throws] identifier[SAXException] {
identifier[Command] ide... |
public static HashValue murmurhash3_x64_128(final byte[] key, final int offset, final int len, final int seed) {
// The original algorithm does have a 32 bit unsigned seed.
// We have to mask to match the behavior of the unsigned types and prevent sign extension.
long h1 = seed & 0x00000000FFFFFFFFL;
long h2 = ... | class class_name[name] begin[{]
method[murmurhash3_x64_128, return_type[type[HashValue]], modifier[public static], parameter[key, offset, len, seed]] begin[{]
local_variable[type[long], h1]
local_variable[type[long], h2]
local_variable[type[long], c1]
local_variable[type[long], ... | Keyword[public] Keyword[static] identifier[HashValue] identifier[murmurhash3_x64_128] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[len] , Keyword[final] Keyword[int] identifier[seed] op... |
private View getViewOnRecyclerItemIndex(ViewGroup recyclerView, int recyclerViewIndex, int itemIndex){
final long endTime = SystemClock.uptimeMillis() + Timeout.getSmallTimeout();
View view = recyclerView.getChildAt(itemIndex);
while(view == null){
final boolean timedOut = SystemClock.uptimeMillis() > endTime... | class class_name[name] begin[{]
method[getViewOnRecyclerItemIndex, return_type[type[View]], modifier[private], parameter[recyclerView, recyclerViewIndex, itemIndex]] begin[{]
local_variable[type[long], endTime]
local_variable[type[View], view]
while[binary_operation[member[.view... | Keyword[private] identifier[View] identifier[getViewOnRecyclerItemIndex] operator[SEP] identifier[ViewGroup] identifier[recyclerView] , Keyword[int] identifier[recyclerViewIndex] , Keyword[int] identifier[itemIndex] operator[SEP] {
Keyword[final] Keyword[long] identifier[endTime] operator[=] identifier[SystemC... |
public void marshall(UnindexedFace unindexedFace, ProtocolMarshaller protocolMarshaller) {
if (unindexedFace == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(unindexedFace.getReasons(), REASONS_BIND... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[unindexedFace, protocolMarshaller]] begin[{]
if[binary_operation[member[.unindexedFace], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UnindexedFace] identifier[unindexedFace] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[unindexedFace] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
public Vector2f set(int index, ByteBuffer buffer) {
MemUtil.INSTANCE.get(this, index, buffer);
return this;
} | class class_name[name] begin[{]
method[set, return_type[type[Vector2f]], modifier[public], parameter[index, buffer]] begin[{]
call[MemUtil.INSTANCE.get, parameter[THIS[], member[.index], member[.buffer]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Vector2f] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[ByteBuffer] identifier[buffer] operator[SEP] {
identifier[MemUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[get] operator[SEP] Keyword[this] , identifier[index] , identifier[buffer... |
public static ArrayList<ClassLabel> allClassLabels(MultipleObjectsBundle bundle) {
int col = findClassLabelColumn(bundle);
// TODO: automatically infer class labels?
if(col < 0) {
throw new AbortException("No class label found (try using ClassLabelFilter).");
}
return allClassLabels(bundle, co... | class class_name[name] begin[{]
method[allClassLabels, return_type[type[ArrayList]], modifier[public static], parameter[bundle]] begin[{]
local_variable[type[int], col]
if[binary_operation[member[.col], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[static] identifier[ArrayList] operator[<] identifier[ClassLabel] operator[>] identifier[allClassLabels] operator[SEP] identifier[MultipleObjectsBundle] identifier[bundle] operator[SEP] {
Keyword[int] identifier[col] operator[=] identifier[findClassLabelColumn] operator[SEP] identifier[bun... |
public final void writeAndRemoveAll(ChannelHandlerContext ctx) {
decrementReadableBytes(readableBytes);
Throwable pending = null;
ByteBuf previousBuf = null;
for (;;) {
Object entry = bufAndListenerPairs.poll();
try {
if (entry == null) {
... | class class_name[name] begin[{]
method[writeAndRemoveAll, return_type[void], modifier[final public], parameter[ctx]] begin[{]
call[.decrementReadableBytes, parameter[member[.readableBytes]]]
local_variable[type[Throwable], pending]
local_variable[type[ByteBuf], previousBuf]
... | Keyword[public] Keyword[final] Keyword[void] identifier[writeAndRemoveAll] operator[SEP] identifier[ChannelHandlerContext] identifier[ctx] operator[SEP] {
identifier[decrementReadableBytes] operator[SEP] identifier[readableBytes] operator[SEP] operator[SEP] identifier[Throwable] identifier[pending] operator[=] O... |
public static <T> String getInsertWhereNotExistSQL(T t, List<Object> values,
boolean isWithNullValue, String whereSql) {
StringBuilder sql = new StringBuilder("INSERT INTO ");
Table table = DOInfoReader.getTable(t.getClass());
List<Field> fields = DOInfoReader.getColumns(t.getClass());
sql.append(getTa... | class class_name[name] begin[{]
method[getInsertWhereNotExistSQL, return_type[type[String]], modifier[public static], parameter[t, values, isWithNullValue, whereSql]] begin[{]
local_variable[type[StringBuilder], sql]
local_variable[type[Table], table]
local_variable[type[List], fields]
... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[String] identifier[getInsertWhereNotExistSQL] operator[SEP] identifier[T] identifier[t] , identifier[List] operator[<] identifier[Object] operator[>] identifier[values] , Keyword[boolean] identifier[isWithNullValue] , identifier[String]... |
public static int find(byte[] arra, int start, int limit, byte[] arrb) {
int k = start;
limit = limit - arrb.length + 1;
int value = arrb[0];
for (; k < limit; k++) {
if (arra[k] == value) {
if (arrb.length == 1) {
return k;
... | class class_name[name] begin[{]
method[find, return_type[type[int]], modifier[public static], parameter[arra, start, limit, arrb]] begin[{]
local_variable[type[int], k]
assign[member[.limit], binary_operation[binary_operation[member[.limit], -, member[arrb.length]], +, literal[1]]]
... | Keyword[public] Keyword[static] Keyword[int] identifier[find] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[arra] , Keyword[int] identifier[start] , Keyword[int] identifier[limit] , Keyword[byte] operator[SEP] operator[SEP] identifier[arrb] operator[SEP] {
Keyword[int] identifier[k] opera... |
public static SshConnection getConnection(String host, int port,
Authentication authentication) throws IOException {
return getConnection(host, port, GerritDefaultValues.DEFAULT_GERRIT_PROXY, authentication);
} | class class_name[name] begin[{]
method[getConnection, return_type[type[SshConnection]], modifier[public static], parameter[host, port, authentication]] begin[{]
return[call[.getConnection, parameter[member[.host], member[.port], member[GerritDefaultValues.DEFAULT_GERRIT_PROXY], member[.authentication]]... | Keyword[public] Keyword[static] identifier[SshConnection] identifier[getConnection] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] , identifier[Authentication] identifier[authentication] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[getCon... |
public static void cublasZgemv(char trans, int m, int n, cuDoubleComplex alpha, Pointer A, int lda, Pointer x, int incx, cuDoubleComplex beta, Pointer y, int incy)
{
cublasZgemvNative(trans, m, n, alpha, A, lda, x, incx, beta, y, incy);
checkResultBLAS();
} | class class_name[name] begin[{]
method[cublasZgemv, return_type[void], modifier[public static], parameter[trans, m, n, alpha, A, lda, x, incx, beta, y, incy]] begin[{]
call[.cublasZgemvNative, parameter[member[.trans], member[.m], member[.n], member[.alpha], member[.A], member[.lda], member[.x]... | Keyword[public] Keyword[static] Keyword[void] identifier[cublasZgemv] operator[SEP] Keyword[char] identifier[trans] , Keyword[int] identifier[m] , Keyword[int] identifier[n] , identifier[cuDoubleComplex] identifier[alpha] , identifier[Pointer] identifier[A] , Keyword[int] identifier[lda] , identifier[Pointer] ide... |
public ResultBody<T> executeRaw() throws IOException {
HttpResponse response = this.client.request(this);
return Json.getInstance().fromJson(
new InputStreamReader(response.getContent()),
new TypeToken<ResultBody<T>>() {
}.where(
ne... | class class_name[name] begin[{]
method[executeRaw, return_type[type[ResultBody]], modifier[public], parameter[]] begin[{]
local_variable[type[HttpResponse], response]
return[call[Json.getInstance, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[ResultBody] operator[<] identifier[T] operator[>] identifier[executeRaw] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[HttpResponse] identifier[response] operator[=] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[request] oper... |
public ServerGroupLaunchConfiguration withServerLaunchConfigurations(ServerLaunchConfiguration... serverLaunchConfigurations) {
if (this.serverLaunchConfigurations == null) {
setServerLaunchConfigurations(new java.util.ArrayList<ServerLaunchConfiguration>(serverLaunchConfigurations.length));
... | class class_name[name] begin[{]
method[withServerLaunchConfigurations, return_type[type[ServerGroupLaunchConfiguration]], modifier[public], parameter[serverLaunchConfigurations]] begin[{]
if[binary_operation[THIS[member[None.serverLaunchConfigurations]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[ServerGroupLaunchConfiguration] identifier[withServerLaunchConfigurations] operator[SEP] identifier[ServerLaunchConfiguration] operator[...] identifier[serverLaunchConfigurations] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[serverLaunchConfiguration... |
public static URI build(String repoUri, String namespace, String dataset) {
return build(URI.create(repoUri), namespace, dataset);
} | class class_name[name] begin[{]
method[build, return_type[type[URI]], modifier[public static], parameter[repoUri, namespace, dataset]] begin[{]
return[call[.build, parameter[call[URI.create, parameter[member[.repoUri]]], member[.namespace], member[.dataset]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[URI] identifier[build] operator[SEP] identifier[String] identifier[repoUri] , identifier[String] identifier[namespace] , identifier[String] identifier[dataset] operator[SEP] {
Keyword[return] identifier[build] operator[SEP] identifier[URI] operator[SEP] identifier[cre... |
@Override
public boolean remove(K key, V value) throws CacheWritingException {
return cache.remove(key, value);
} | class class_name[name] begin[{]
method[remove, return_type[type[boolean]], modifier[public], parameter[key, value]] begin[{]
return[call[cache.remove, parameter[member[.key], member[.value]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] identifier[K] identifier[key] , identifier[V] identifier[value] operator[SEP] Keyword[throws] identifier[CacheWritingException] {
Keyword[return] identifier[cache] operator[SEP] identifier[remove] operator[SEP] ... |
public Observable<ApplicationGatewaySslPredefinedPolicyInner> getSslPredefinedPolicyAsync(String predefinedPolicyName) {
return getSslPredefinedPolicyWithServiceResponseAsync(predefinedPolicyName).map(new Func1<ServiceResponse<ApplicationGatewaySslPredefinedPolicyInner>, ApplicationGatewaySslPredefinedPolicyInn... | class class_name[name] begin[{]
method[getSslPredefinedPolicyAsync, return_type[type[Observable]], modifier[public], parameter[predefinedPolicyName]] begin[{]
return[call[.getSslPredefinedPolicyWithServiceResponseAsync, parameter[member[.predefinedPolicyName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[ApplicationGatewaySslPredefinedPolicyInner] operator[>] identifier[getSslPredefinedPolicyAsync] operator[SEP] identifier[String] identifier[predefinedPolicyName] operator[SEP] {
Keyword[return] identifier[getSslPredefinedPolicyWithServiceResponseAsync... |
public Map<String, String> getUrlParams(URI uri) throws URIException {
Map<String, String> map = new HashMap<>();
for (NameValuePair parameter : getUrlParamParser(uri.toString()).parseParameters(uri.getEscapedQuery())) {
String value = parameter.getValue();
if (value == null) {
value = "";
}
... | class class_name[name] begin[{]
method[getUrlParams, return_type[type[Map]], modifier[public], parameter[uri]] begin[{]
local_variable[type[Map], map]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[],... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getUrlParams] operator[SEP] identifier[URI] identifier[uri] operator[SEP] Keyword[throws] identifier[URIException] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identif... |
@VisibleForTesting
protected static boolean notAllowedStrategy(DockerSlaveTemplate template) {
if (isNull(template)) {
LOG.debug("Skipping DockerProvisioningStrategy because: template is null");
return true;
}
final RetentionStrategy retentionStrategy = template.getR... | class class_name[name] begin[{]
method[notAllowedStrategy, return_type[type[boolean]], modifier[static protected], parameter[template]] begin[{]
if[call[.isNull, parameter[member[.template]]]] begin[{]
call[LOG.debug, parameter[literal["Skipping DockerProvisioningStrateg... | annotation[@] identifier[VisibleForTesting] Keyword[protected] Keyword[static] Keyword[boolean] identifier[notAllowedStrategy] operator[SEP] identifier[DockerSlaveTemplate] identifier[template] operator[SEP] {
Keyword[if] operator[SEP] identifier[isNull] operator[SEP] identifier[template] operator[SEP] operator[... |
public synchronized IndexTreePath<DeLiCluEntry> setHandled(DBID id, O obj) {
if(LOG.isDebugging()) {
LOG.debugFine("setHandled " + id + ", " + obj + "\n");
}
// find the leaf node containing o
IndexTreePath<DeLiCluEntry> pathToObject = findPathToObject(getRootPath(), obj, id);
if(pathToObjec... | class class_name[name] begin[{]
method[setHandled, return_type[type[IndexTreePath]], modifier[synchronized public], parameter[id, obj]] begin[{]
if[call[LOG.isDebugging, parameter[]]] begin[{]
call[LOG.debugFine, parameter[binary_operation[binary_operation[binary_operati... | Keyword[public] Keyword[synchronized] identifier[IndexTreePath] operator[<] identifier[DeLiCluEntry] operator[>] identifier[setHandled] operator[SEP] identifier[DBID] identifier[id] , identifier[O] identifier[obj] operator[SEP] {
Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugging] op... |
public final boolean parentOf(ThreadGroup g) {
for (; g != null ; g = g.parent) {
if (g == this) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[parentOf, return_type[type[boolean]], modifier[final public], parameter[g]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[final] Keyword[boolean] identifier[parentOf] operator[SEP] identifier[ThreadGroup] identifier[g] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] identifier[g] operator[!=] Other[null] operator[SEP] identifier[g] operator[=] identifier[g] operator[SEP] identifier[parent] operator[... |
public static String getTimingStat() {
final Stopwatch root = STOPWATCH.get();
if (null == root) {
return "No stopwatch";
}
final StringBuilder stringBuilder = new StringBuilder();
root.appendTimingStat(1, stringBuilder);
return stringBuilder.toString();
... | class class_name[name] begin[{]
method[getTimingStat, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[Stopwatch], root]
if[binary_operation[literal[null], ==, member[.root]]] begin[{]
return[literal["No stopwatch"]]
else ... | Keyword[public] Keyword[static] identifier[String] identifier[getTimingStat] operator[SEP] operator[SEP] {
Keyword[final] identifier[Stopwatch] identifier[root] operator[=] identifier[STOPWATCH] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator... |
public void raConfigurationUpdate(ConfigProperties properties) {
try {
Set<String> oldTransports = new HashSet<String>(this.transports);
raConfigure(properties);
} catch (Throwable ex) {
String msg = "error while updating RA configuration";
tracer.severe(m... | class class_name[name] begin[{]
method[raConfigurationUpdate, return_type[void], modifier[public], parameter[properties]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], p... | Keyword[public] Keyword[void] identifier[raConfigurationUpdate] operator[SEP] identifier[ConfigProperties] identifier[properties] operator[SEP] {
Keyword[try] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[oldTransports] operator[=] Keyword[new] identifier[HashSet] operator[<]... |
private Map<String, Set<String>> getSourceProperties(ModelDescription description) {
Map<String, Set<String>> result = new LinkedHashMap<String, Set<String>>();
try {
Class<?> sourceModel = registry.loadModel(description);
while (sourceModel != null && !sourceModel.equals(Object.... | class class_name[name] begin[{]
method[getSourceProperties, return_type[type[Map]], modifier[private], parameter[description]] begin[{]
local_variable[type[Map], result]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Metho... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[Set] operator[<] identifier[String] operator[>] operator[>] identifier[getSourceProperties] operator[SEP] identifier[ModelDescription] identifier[description] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier... |
public IStatus handleDrop(CommonDropAdapter aDropAdapter,
DropTargetEvent aDropTargetEvent, Object aTarget) {
// if (VdmUIPlugin.DEBUG)
// System.out.println("Target Object for drop: "
// + aTarget.getClass().toString());
if (Policy.DEBUG_DND) {
System.out
.println("ResourceDropAdapterAssistant.ha... | class class_name[name] begin[{]
method[handleDrop, return_type[type[IStatus]], modifier[public], parameter[aDropAdapter, aDropTargetEvent, aTarget]] begin[{]
if[member[Policy.DEBUG_DND]] begin[{]
call[System.out.println, parameter[literal["ResourceDropAdapterAssistant.ha... | Keyword[public] identifier[IStatus] identifier[handleDrop] operator[SEP] identifier[CommonDropAdapter] identifier[aDropAdapter] , identifier[DropTargetEvent] identifier[aDropTargetEvent] , identifier[Object] identifier[aTarget] operator[SEP] {
Keyword[if] operator[SEP] identifier[Policy] operator[SEP] identifi... |
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
public static <T> Observable<T> fromFuture(Future<? extends T> future, long timeout, TimeUnit unit, Scheduler scheduler) {
ObjectHelper.requireNonNull(scheduler, "scheduler is null");
Observable<T> o = fromFuture(future, timeout, unit)... | class class_name[name] begin[{]
method[fromFuture, return_type[type[Observable]], modifier[public static], parameter[future, timeout, unit, scheduler]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.scheduler], literal["scheduler is null"]]]
local_variable[type[Observable]... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[CUSTOM] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Observable] operator[<] identifier[T] operator[>] identifier[fr... |
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "hausnummer")
public JAXBElement<String> createHausnummer(String value) {
return new JAXBElement<String>(_Hausnummer_QNAME, String.class, null, value);
} | class class_name[name] begin[{]
method[createHausnummer, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Hausnummer_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_ope... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[String] operator[>] identifier[createHausnummer] operator[SEP] identifier[String] identifi... |
public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) {
String value = props.getProperty(propertyName, "").trim();
if (value.isEmpty()) {
return defaultValue;
}
try {
long val = Long.parseLong(value);
if (val <=... | class class_name[name] begin[{]
method[getPropertyAsLong, return_type[type[long]], modifier[public static], parameter[props, propertyName, defaultValue]] begin[{]
local_variable[type[String], value]
if[call[value.isEmpty, parameter[]]] begin[{]
return[member[.defaultValue]]
... | Keyword[public] Keyword[static] Keyword[long] identifier[getPropertyAsLong] operator[SEP] identifier[Properties] identifier[props] , identifier[String] identifier[propertyName] , Keyword[long] identifier[defaultValue] operator[SEP] {
identifier[String] identifier[value] operator[=] identifier[props] operator[S... |
@XmlElementDecl(namespace = "http://schema.intuit.com/finance/v3", name = "Term", substitutionHeadNamespace = "http://schema.intuit.com/finance/v3", substitutionHeadName = "IntuitObject")
public JAXBElement<Term> createTerm(Term value) {
return new JAXBElement<Term>(_Term_QNAME, Term.class, null, value);
... | class class_name[name] begin[{]
method[createTerm, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Term_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], p... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] iden... |
public static SSLSocketChannel open(String peer, int port, SSLContext sslContext) throws IOException
{
SSLEngine engine = sslContext.createSSLEngine(peer, port);
engine.setUseClientMode(true);
SSLParameters sslParameters = engine.getSSLParameters();
SNIServerName hostName = new... | class class_name[name] begin[{]
method[open, return_type[type[SSLSocketChannel]], modifier[public static], parameter[peer, port, sslContext]] begin[{]
local_variable[type[SSLEngine], engine]
call[engine.setUseClientMode, parameter[literal[true]]]
local_variable[type[SSLParameter... | Keyword[public] Keyword[static] identifier[SSLSocketChannel] identifier[open] operator[SEP] identifier[String] identifier[peer] , Keyword[int] identifier[port] , identifier[SSLContext] identifier[sslContext] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[SSLEngine] identifier[engine] operat... |
public void addMapStartZoom(String zoom) {
if (zoom != null) {
try {
int intZoom = Integer.parseInt(zoom);
if (intZoom < 0 || intZoom > 21) {
throw new IllegalArgumentException("not a valid map start zoom: " + zoom);
}
... | class class_name[name] begin[{]
method[addMapStartZoom, return_type[void], modifier[public], parameter[zoom]] begin[{]
if[binary_operation[member[.zoom], !=, literal[null]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensi... | Keyword[public] Keyword[void] identifier[addMapStartZoom] operator[SEP] identifier[String] identifier[zoom] operator[SEP] {
Keyword[if] operator[SEP] identifier[zoom] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
Keyword[int] identifier[intZoom] operator[=] identifier[Integer]... |
public static File createUniqueFile(File targetFolder, String originalFile, boolean keepOriginal) {
String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(originalFile);
return createUniqueFile(targetFolder, originalFile, mimeType, keepOriginal);
} | class class_name[name] begin[{]
method[createUniqueFile, return_type[type[File]], modifier[public static], parameter[targetFolder, originalFile, keepOriginal]] begin[{]
local_variable[type[String], mimeType]
return[call[.createUniqueFile, parameter[member[.targetFolder], member[.originalFile], ... | Keyword[public] Keyword[static] identifier[File] identifier[createUniqueFile] operator[SEP] identifier[File] identifier[targetFolder] , identifier[String] identifier[originalFile] , Keyword[boolean] identifier[keepOriginal] operator[SEP] {
identifier[String] identifier[mimeType] operator[=] identifier[MimeType... |
@Override
public void start(StartContext startContext) throws StartException {
try {
LdapKeyStore.Builder builder = LdapKeyStore.builder()
.setDirContextSupplier(dirContextSupplierInjector.getValue())
.setSearchPath(searchPath);
if (filterAlia... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[startContext]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=builder, postfix_operators=[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[StartContext] identifier[startContext] operator[SEP] Keyword[throws] identifier[StartException] {
Keyword[try] {
identifier[LdapKeyStore] operator[SEP] identifier[Builder] identifier[builder] op... |
private Map<String, List<DBObject>> onPersist(Map<String, List<DBObject>> collections, Object entity, Object id,
EntityMetadata metadata, List<RelationHolder> relationHolders, boolean isUpdate)
{
persistenceUnit = metadata.getPersistenceUnit();
Map<String, DBObject> documents = handler.g... | class class_name[name] begin[{]
method[onPersist, return_type[type[Map]], modifier[private], parameter[collections, entity, id, metadata, relationHolders, isUpdate]] begin[{]
assign[member[.persistenceUnit], call[metadata.getPersistenceUnit, parameter[]]]
local_variable[type[Map], docum... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[DBObject] operator[>] operator[>] identifier[onPersist] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[DBObject] operator[>] operator[>] identifier[collecti... |
public V put(K pKey, V pValue) {
TimedEntry<K, V> entry = (TimedEntry<K, V>) entries.get(pKey);
V oldValue;
if (entry == null) {
oldValue = null;
entry = createEntry(pKey, pValue);
entries.put(pKey, entry);
}
else {
o... | class class_name[name] begin[{]
method[put, return_type[type[V]], modifier[public], parameter[pKey, pValue]] begin[{]
local_variable[type[TimedEntry], entry]
local_variable[type[V], oldValue]
if[binary_operation[member[.entry], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[V] identifier[put] operator[SEP] identifier[K] identifier[pKey] , identifier[V] identifier[pValue] operator[SEP] {
identifier[TimedEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[entry] operator[=] operator[SEP] identifier[TimedEntry] operator[<] identifier[K]... |
public float distance(float x, float y, float z) {
float dx = this.x - x;
float dy = this.y - y;
float dz = this.z - z;
return (float) Math.sqrt(dx * dx + dy * dy + dz * dz);
} | class class_name[name] begin[{]
method[distance, return_type[type[float]], modifier[public], parameter[x, y, z]] begin[{]
local_variable[type[float], dx]
local_variable[type[float], dy]
local_variable[type[float], dz]
return[Cast(expression=MethodInvocation(arguments=[BinaryOper... | Keyword[public] Keyword[float] identifier[distance] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[z] operator[SEP] {
Keyword[float] identifier[dx] operator[=] Keyword[this] operator[SEP] identifier[x] operator[-] identifier[x] operator[SEP] Keyword[float]... |
public static String validate(String code) {
try {
toCurrency(code);
} catch (IllegalArgumentException ex) {
throw new InvalidValueException(code, "currency");
}
return code;
} | class class_name[name] begin[{]
method[validate, return_type[type[String]], modifier[public static], parameter[code]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | Keyword[public] Keyword[static] identifier[String] identifier[validate] operator[SEP] identifier[String] identifier[code] operator[SEP] {
Keyword[try] {
identifier[toCurrency] operator[SEP] identifier[code] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IllegalArgu... |
@SuppressWarnings("squid:MethodCyclomaticComplexity")
private Status convertStatus(final Action.Status status){
switch (status) {
case SCHEDULED:
return Status.SCHEDULED;
case ERROR:
return Status.ERROR;
case FINISHED:
return Status.FINISHED;
... | class class_name[name] begin[{]
method[convertStatus, return_type[type[Status]], modifier[private], parameter[status]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['SCHEDULED'], statements=[ReturnStatement(expression=MemberReference(member=SCHEDULED, postfix_operators=[], prefix_operators=... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] identifier[Status] identifier[convertStatus] operator[SEP] Keyword[final] identifier[Action] operator[SEP] identifier[Status] identifier[status] operator[SEP] {
Keyword[switch] operator[SEP] identifier[status]... |
public void doCached(final CacheRequest pRequest, final CacheResponse pResponse, final ResponseResolver pResolver) throws IOException, CacheException {
// TODO: Expire cached items on PUT/POST/DELETE/PURGE
// If not cachable request, resolve directly
if (!isCacheable(pRequest)) {
... | class class_name[name] begin[{]
method[doCached, return_type[void], modifier[public], parameter[pRequest, pResponse, pResolver]] begin[{]
if[call[.isCacheable, parameter[member[.pRequest]]]] begin[{]
call[pResolver.resolve, parameter[member[.pRequest], member[.pResponse]... | Keyword[public] Keyword[void] identifier[doCached] operator[SEP] Keyword[final] identifier[CacheRequest] identifier[pRequest] , Keyword[final] identifier[CacheResponse] identifier[pResponse] , Keyword[final] identifier[ResponseResolver] identifier[pResolver] operator[SEP] Keyword[throws] identifier[IOException] , id... |
private void callListeners(final CFMLEngine engine) {
final Iterator<EngineChangeListener> it = listeners.iterator();
while (it.hasNext())
it.next().onUpdate();
} | class class_name[name] begin[{]
method[callListeners, return_type[void], modifier[private], parameter[engine]] begin[{]
local_variable[type[Iterator], it]
while[call[it.hasNext, parameter[]]] begin[{]
call[it.next, parameter[]]
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[callListeners] operator[SEP] Keyword[final] identifier[CFMLEngine] identifier[engine] operator[SEP] {
Keyword[final] identifier[Iterator] operator[<] identifier[EngineChangeListener] operator[>] identifier[it] operator[=] identifier[listeners] operator[SEP] identifier[it... |
@RequestMapping("/async")
public void asynch(HttpServletRequest request, HttpServletResponse response) {
final AsyncContext async = request.startAsync();
async.start(new Runnable() {
public void run() {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
try {
... | class class_name[name] begin[{]
method[asynch, return_type[void], modifier[public], parameter[request, response]] begin[{]
local_variable[type[AsyncContext], async]
call[async.start, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclarat... | annotation[@] identifier[RequestMapping] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[asynch] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] {
Keyword[final] identifier[AsyncContext] id... |
public void prepareDBUpdate(final SQLUpdate _update,
final Object... _values)
throws SQLException
{
Object[] tmp = _values;
try {
final List<Return> returns = executeEvents(EventType.UPDATE_VALUE, ParameterValues.CLASS, this,
... | class class_name[name] begin[{]
method[prepareDBUpdate, return_type[void], modifier[public], parameter[_update, _values]] begin[{]
local_variable[type[Object], tmp]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvo... | Keyword[public] Keyword[void] identifier[prepareDBUpdate] operator[SEP] Keyword[final] identifier[SQLUpdate] identifier[_update] , Keyword[final] identifier[Object] operator[...] identifier[_values] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[Object] operator[SEP] operator[SEP] identifie... |
public void setLineColor(@ColorInt int color) {
jsonObject.addProperty(LineOptions.PROPERTY_LINE_COLOR, ColorUtils.colorToRgbaString(color));
} | class class_name[name] begin[{]
method[setLineColor, return_type[void], modifier[public], parameter[color]] begin[{]
call[jsonObject.addProperty, parameter[member[LineOptions.PROPERTY_LINE_COLOR], call[ColorUtils.colorToRgbaString, parameter[member[.color]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setLineColor] operator[SEP] annotation[@] identifier[ColorInt] Keyword[int] identifier[color] operator[SEP] {
identifier[jsonObject] operator[SEP] identifier[addProperty] operator[SEP] identifier[LineOptions] operator[SEP] identifier[PROPERTY_LINE_COLOR] , identifier[Col... |
@BetaApi
public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(
ProjectName project) {
AggregatedListAutoscalersHttpRequest request =
AggregatedListAutoscalersHttpRequest.newBuilder()
.setProject(project == null ? null : project.toString())
.build();
... | class class_name[name] begin[{]
method[aggregatedListAutoscalers, return_type[type[AggregatedListAutoscalersPagedResponse]], modifier[final public], parameter[project]] begin[{]
local_variable[type[AggregatedListAutoscalersHttpRequest], request]
return[call[.aggregatedListAutoscalers, parameter... | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[AggregatedListAutoscalersPagedResponse] identifier[aggregatedListAutoscalers] operator[SEP] identifier[ProjectName] identifier[project] operator[SEP] {
identifier[AggregatedListAutoscalersHttpRequest] identifier[request] operator[=] iden... |
@Override
public int read() throws IOException {
try {
beforeRead(1);
int c = in.read();
afterRead(c != -1 ? 1 : -1);
return c;
} catch (IOException e) {
handleIOException(e);
return -1;
}
} | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=beforeRead, post... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[beforeRead] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[c] operator[=] identifier[in] operator... |
public static KeyStore readKeyStore(String type, InputStream in, char[] password) {
return KeyUtil.readKeyStore(type, in, password);
} | class class_name[name] begin[{]
method[readKeyStore, return_type[type[KeyStore]], modifier[public static], parameter[type, in, password]] begin[{]
return[call[KeyUtil.readKeyStore, parameter[member[.type], member[.in], member[.password]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[KeyStore] identifier[readKeyStore] operator[SEP] identifier[String] identifier[type] , identifier[InputStream] identifier[in] , Keyword[char] operator[SEP] operator[SEP] identifier[password] operator[SEP] {
Keyword[return] identifier[KeyUtil] operator[SEP] identifier[... |
public Object[] getObjects(String pType, Object[] pIds)
throws SQLException {
// Create Vector to hold the result
Vector result = new Vector(pIds.length);
// Loop through Id's and fetch one at a time (no good performance...)
for (int i = 0; i < pIds.length; i++) {
// ... | class class_name[name] begin[{]
method[getObjects, return_type[type[Object]], modifier[public], parameter[pType, pIds]] begin[{]
local_variable[type[Vector], result]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator... | Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[getObjects] operator[SEP] identifier[String] identifier[pType] , identifier[Object] operator[SEP] operator[SEP] identifier[pIds] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[Vector] identifier[result] operator[=] Ke... |
public void deleteMergeRequestDiscussionNote(Object projectIdOrPath, Integer mergeRequestIid,
Integer discussionId, Integer noteId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "discu... | class class_name[name] begin[{]
method[deleteMergeRequestDiscussionNote, return_type[void], modifier[public], parameter[projectIdOrPath, mergeRequestIid, discussionId, noteId]] begin[{]
call[.delete, parameter[member[Response.Status.OK], literal[null], literal["projects"], call[.getProjectIdOrP... | Keyword[public] Keyword[void] identifier[deleteMergeRequestDiscussionNote] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[Integer] identifier[mergeRequestIid] , identifier[Integer] identifier[discussionId] , identifier[Integer] identifier[noteId] operator[SEP] Keyword[throws] identifier[Gi... |
@Override
public void add(Difference difference) {
differenceCount += 1;
if(differenceCount <= DIFFERENCE_COUNT_MAX) {
list.add(difference);
}
try {
writer.write(difference.toString());
} catch (IOException e) {
throw new DiffException("Fai... | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[difference]] begin[{]
assign[member[.differenceCount], literal[1]]
if[binary_operation[member[.differenceCount], <=, member[.DIFFERENCE_COUNT_MAX]]] begin[{]
call[l... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Difference] identifier[difference] operator[SEP] {
identifier[differenceCount] operator[+=] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[differenceCount] operator[<=] identifier[DIFFERENCE_COU... |
public static <T> List<T> synchronizedList(List<T> list) {
return Collections.synchronizedList(list);
} | class class_name[name] begin[{]
method[synchronizedList, return_type[type[List]], modifier[public static], parameter[list]] begin[{]
return[call[Collections.synchronizedList, parameter[member[.list]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[synchronizedList] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] {
Keyword[return] identifier[Collections] operator[SEP] ide... |
public ManagedObject get(Token token)
throws ObjectManagerException {
final String methodName = "get";
if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
trace.entry(this, cclass, methodName, new Object[] { token });
if (gatherStatistics)
nu... | class class_name[name] begin[{]
method[get, return_type[type[ManagedObject]], modifier[public], parameter[token]] begin[{]
local_variable[type[String], methodName]
if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{]
... | Keyword[public] identifier[ManagedObject] identifier[get] operator[SEP] identifier[Token] identifier[token] operator[SEP] Keyword[throws] identifier[ObjectManagerException] {
Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[Tr... |
@Override
protected void extractAndTakeAction(String timestamp, JSONArray jsonAllRows, List<String> joinFields, RequestType requestType, ActionType action) {
Map<Object, T> newBaseAllRows = new LinkedHashMap<>();
JSONObject eachRow = null;
for (int i = 0; i < jsonAllRows.length(); i++) {
... | class class_name[name] begin[{]
method[extractAndTakeAction, return_type[void], modifier[protected], parameter[timestamp, jsonAllRows, joinFields, requestType, action]] begin[{]
local_variable[type[Map], newBaseAllRows]
local_variable[type[JSONObject], eachRow]
ForStatement(body=BlockSt... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[extractAndTakeAction] operator[SEP] identifier[String] identifier[timestamp] , identifier[JSONArray] identifier[jsonAllRows] , identifier[List] operator[<] identifier[String] operator[>] identifier[joinFields] , identifier[RequestType] id... |
public void process(String group, T value) {
getData().process(ImmutableMap.of(group, value));
} | class class_name[name] begin[{]
method[process, return_type[void], modifier[public], parameter[group, value]] begin[{]
call[.getData, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[process] operator[SEP] identifier[String] identifier[group] , identifier[T] identifier[value] operator[SEP] {
identifier[getData] operator[SEP] operator[SEP] operator[SEP] identifier[process] operator[SEP] identifier[ImmutableMap] operator[SEP] identifier[of] operator[SE... |
private static void initOptions() {
HELP_OPTION.setRequired(false);
VERBOSE_OPTION.setRequired(false);
JAR_OPTION.setRequired(false);
JAR_OPTION.setArgName("jarfile");
CLASS_OPTION.setRequired(false);
CLASS_OPTION.setArgName("classname");
ADDRESS_OPTION.setRequired(false);
ADDRESS_OPTION.setArg... | class class_name[name] begin[{]
method[initOptions, return_type[void], modifier[private static], parameter[]] begin[{]
call[HELP_OPTION.setRequired, parameter[literal[false]]]
call[VERBOSE_OPTION.setRequired, parameter[literal[false]]]
call[JAR_OPTION.setRequired... | Keyword[private] Keyword[static] Keyword[void] identifier[initOptions] operator[SEP] operator[SEP] {
identifier[HELP_OPTION] operator[SEP] identifier[setRequired] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[VERBOSE_OPTION] operator[SEP] identifier[setRequired] operator[SEP] literal[bool... |
@Override
public LexNameSet defaultSBinaryExp(SBinaryExp exp, FreeVarInfo info) throws AnalysisException
{
LexNameSet names = exp.getLeft().apply(this, info);
names.addAll(exp.getRight().apply(this, info));
return names;
} | class class_name[name] begin[{]
method[defaultSBinaryExp, return_type[type[LexNameSet]], modifier[public], parameter[exp, info]] begin[{]
local_variable[type[LexNameSet], names]
call[names.addAll, parameter[call[exp.getRight, parameter[]]]]
return[member[.names]]
end[}]
END[... | annotation[@] identifier[Override] Keyword[public] identifier[LexNameSet] identifier[defaultSBinaryExp] operator[SEP] identifier[SBinaryExp] identifier[exp] , identifier[FreeVarInfo] identifier[info] operator[SEP] Keyword[throws] identifier[AnalysisException] {
identifier[LexNameSet] identifier[names] operator[... |
public String getURL()
{
final StringBuilder options = new StringBuilder();
if( m_overwriteMode != null )
{
if( options.length() > 0 )
{
options.append( "&" );
}
options.append( "overwrite=" ).append( m_overwriteMode );
... | class class_name[name] begin[{]
method[getURL, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[StringBuilder], options]
if[binary_operation[member[.m_overwriteMode], !=, literal[null]]] begin[{]
if[binary_operation[call[opti... | Keyword[public] identifier[String] identifier[getURL] operator[SEP] operator[SEP] {
Keyword[final] identifier[StringBuilder] identifier[options] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_overwriteMode] operator[!=] Other[nu... |
protected void sendRecordingStartedNotification(Session session, Recording recording) {
this.recordingManager.getSessionEventsHandler().sendRecordingStartedNotification(session, recording);
} | class class_name[name] begin[{]
method[sendRecordingStartedNotification, return_type[void], modifier[protected], parameter[session, recording]] begin[{]
THIS[member[None.recordingManager]call[None.getSessionEventsHandler, parameter[]]call[None.sendRecordingStartedNotification, parameter[member[... | Keyword[protected] Keyword[void] identifier[sendRecordingStartedNotification] operator[SEP] identifier[Session] identifier[session] , identifier[Recording] identifier[recording] operator[SEP] {
Keyword[this] operator[SEP] identifier[recordingManager] operator[SEP] identifier[getSessionEventsHandler] operator[SE... |
public void updateSpaceContact(int profileId, ContactUpdate update, boolean silent, boolean hook) {
getResourceFactory().getApiResource("/contact/" + profileId)
.queryParam("silent", silent ? "1" : "0")
.queryParam("hook", hook ? "1" : "0")
.entity(update, MediaType.APPLICATION_JSON_TYPE).put();
} | class class_name[name] begin[{]
method[updateSpaceContact, return_type[void], modifier[public], parameter[profileId, update, silent, hook]] begin[{]
call[.getResourceFactory, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[updateSpaceContact] operator[SEP] Keyword[int] identifier[profileId] , identifier[ContactUpdate] identifier[update] , Keyword[boolean] identifier[silent] , Keyword[boolean] identifier[hook] operator[SEP] {
identifier[getResourceFactory] operator[SEP] operator[SEP] oper... |
public Font getFont( int code )
{
Style s = _tokenStyles.get( new Integer( code ) );
if( s == null )
{
s = getStyle( DEFAULT_STYLE );
}
return getFont( s );
} | class class_name[name] begin[{]
method[getFont, return_type[type[Font]], modifier[public], parameter[code]] begin[{]
local_variable[type[Style], s]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
assign[member[.s], call[.getStyle, parameter[member[.D... | Keyword[public] identifier[Font] identifier[getFont] operator[SEP] Keyword[int] identifier[code] operator[SEP] {
identifier[Style] identifier[s] operator[=] identifier[_tokenStyles] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[code] operator[SEP] operator[... |
@Pure
public static Point2d WSG84_L93(double lambda, double phi) {
final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi);
return NTFLambdaPhi_NTFLambert(
ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
LAMBERT_93_N,
LAMBERT_93_C,
LAMBERT_93_XS,
LAMBERT_93_YS);
} | class class_name[name] begin[{]
method[WSG84_L93, return_type[type[Point2d]], modifier[public static], parameter[lambda, phi]] begin[{]
local_variable[type[Point2d], ntfLambdaPhi]
return[call[.NTFLambdaPhi_NTFLambert, parameter[call[ntfLambdaPhi.getX, parameter[]], call[ntfLambdaPhi.getY, param... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[Point2d] identifier[WSG84_L93] operator[SEP] Keyword[double] identifier[lambda] , Keyword[double] identifier[phi] operator[SEP] {
Keyword[final] identifier[Point2d] identifier[ntfLambdaPhi] operator[=] identifier[WSG84_NTFLamdaPhi] operat... |
public static com.liferay.commerce.model.CPDAvailabilityEstimate addCPDAvailabilityEstimate(
com.liferay.commerce.model.CPDAvailabilityEstimate cpdAvailabilityEstimate) {
return getService().addCPDAvailabilityEstimate(cpdAvailabilityEstimate);
} | class class_name[name] begin[{]
method[addCPDAvailabilityEstimate, return_type[type[com]], modifier[public static], parameter[cpdAvailabilityEstimate]] begin[{]
return[call[.getService, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CPDAvailabilityEstimate] identifier[addCPDAvailabilityEstimate] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] iden... |
public void kill() {
boolean killNow = false;
synchronized(jobInitKillStatus) {
jobInitKillStatus.killed = true;
//if not in middle of init, terminate it now
if(!jobInitKillStatus.initStarted || jobInitKillStatus.initDone) {
//avoiding nested locking by setting flag
killNow = t... | class class_name[name] begin[{]
method[kill, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], killNow]
SYNCHRONIZED[member[.jobInitKillStatus]] BEGIN[{]
assign[member[jobInitKillStatus.killed], literal[true]]
... | Keyword[public] Keyword[void] identifier[kill] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[killNow] operator[=] literal[boolean] operator[SEP] Keyword[synchronized] operator[SEP] identifier[jobInitKillStatus] operator[SEP] {
identifier[jobInitKillStatus] operator[SEP] identifier[killed] ... |
private void fastABOD(Database db, Relation<V> relation, DBIDs ids, WritableDoubleDataStore abodvalues, DoubleMinMax minmaxabod) {
// Build a kernel matrix, to make O(n^3) slightly less bad.
SimilarityQuery<V> sq = db.getSimilarityQuery(relation, kernelFunction);
KernelMatrix kernelMatrix = new KernelMatrix... | class class_name[name] begin[{]
method[fastABOD, return_type[void], modifier[private], parameter[db, relation, ids, abodvalues, minmaxabod]] begin[{]
local_variable[type[SimilarityQuery], sq]
local_variable[type[KernelMatrix], kernelMatrix]
local_variable[type[MeanVariance], s]
... | Keyword[private] Keyword[void] identifier[fastABOD] operator[SEP] identifier[Database] identifier[db] , identifier[Relation] operator[<] identifier[V] operator[>] identifier[relation] , identifier[DBIDs] identifier[ids] , identifier[WritableDoubleDataStore] identifier[abodvalues] , identifier[DoubleMinMax] identifi... |
@Override
public double computeScore(double fullNetRegTerm, boolean training, LayerWorkspaceMgr workspaceMgr) {
if (input == null || labels == null)
throw new IllegalStateException("Cannot calculate score without input and labels " + layerId());
this.fullNetRegTerm = fullNetRegTerm;
... | class class_name[name] begin[{]
method[computeScore, return_type[type[double]], modifier[public], parameter[fullNetRegTerm, training, workspaceMgr]] begin[{]
if[binary_operation[binary_operation[member[.input], ==, literal[null]], ||, binary_operation[member[.labels], ==, literal[null]]]] begin... | annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[computeScore] operator[SEP] Keyword[double] identifier[fullNetRegTerm] , Keyword[boolean] identifier[training] , identifier[LayerWorkspaceMgr] identifier[workspaceMgr] operator[SEP] {
Keyword[if] operator[SEP] identifier[input] opera... |
public static int generate(int crc, char []buffer, int offset, int len)
{
for (int i = 0; i < len; i++) {
char ch = buffer[offset + i];
if (ch > 0xff) {
crc = next(crc, (ch >> 8));
}
crc = next(crc, ch);
}
return crc;
} | class class_name[name] begin[{]
method[generate, return_type[type[int]], modifier[public static], parameter[crc, buffer, offset, len]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Me... | Keyword[public] Keyword[static] Keyword[int] identifier[generate] operator[SEP] Keyword[int] identifier[crc] , Keyword[char] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[offset] , Keyword[int] identifier[len] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] ope... |
@SuppressWarnings("unchecked")
public static <T> Iterable<T> iterableOf(final Object value) {
if (value instanceof Iterable<?>) {
return (Iterable<T>) value;
}
Class<?> valueClass = value.getClass();
Preconditions.checkArgument(valueClass.isArray(), "not an array or Iterable: %s", valueClass);
... | class class_name[name] begin[{]
method[iterableOf, return_type[type[Iterable]], modifier[public static], parameter[value]] begin[{]
if[binary_operation[member[.value], instanceof, type[Iterable]]] begin[{]
return[Cast(expression=MemberReference(member=value, postfix_operators=[], pr... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterableOf] operator[SEP] Keyword[final] identifier[Object] identifier[value] operator[SEP] ... |
static <T> List<T> filter(List<T> list, Predicate<T> predicate) {
List<T> results = new ArrayList<>();
for (T current : list) {
if (predicate.apply(current)) {
results.add(current);
}
}
return results;
} | class class_name[name] begin[{]
method[filter, return_type[type[List]], modifier[static], parameter[list, predicate]] begin[{]
local_variable[type[List], results]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=cu... | Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[filter] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] , identifier[Predicate] operator[<] identifier[T] operator[>] identifier[predicate] operator[SEP] {
... |
public static void writeObjectToFile(String path, Object toWrite, Configuration hadoopConfig) throws IOException {
FileSystem fileSystem = FileSystem.get(hadoopConfig);
try (BufferedOutputStream bos = new BufferedOutputStream(fileSystem.create(new Path(path)))) {
ObjectOutputStream oos = new... | class class_name[name] begin[{]
method[writeObjectToFile, return_type[void], modifier[public static], parameter[path, toWrite, hadoopConfig]] begin[{]
local_variable[type[FileSystem], fileSystem]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimens... | Keyword[public] Keyword[static] Keyword[void] identifier[writeObjectToFile] operator[SEP] identifier[String] identifier[path] , identifier[Object] identifier[toWrite] , identifier[Configuration] identifier[hadoopConfig] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[FileSystem] identifier[f... |
public Matrix3d zero() {
m00 = 0.0;
m01 = 0.0;
m02 = 0.0;
m10 = 0.0;
m11 = 0.0;
m12 = 0.0;
m20 = 0.0;
m21 = 0.0;
m22 = 0.0;
return this;
} | class class_name[name] begin[{]
method[zero, return_type[type[Matrix3d]], modifier[public], parameter[]] begin[{]
assign[member[.m00], literal[0.0]]
assign[member[.m01], literal[0.0]]
assign[member[.m02], literal[0.0]]
assign[member[.m10], literal... | Keyword[public] identifier[Matrix3d] identifier[zero] operator[SEP] operator[SEP] {
identifier[m00] operator[=] literal[Float] operator[SEP] identifier[m01] operator[=] literal[Float] operator[SEP] identifier[m02] operator[=] literal[Float] operator[SEP] identifier[m10] operator[=] literal[Float] operator[SEP] i... |
public static Object [] wrap( Object[] args, Class<?> [] paramTypes )
{
if ( args == null )
return null;
Object [] oa = new Object[ args.length ];
for(int i=0; i<args.length; i++)
oa[i] = wrap( args[i], paramTypes[i] );
return oa;
} | class class_name[name] begin[{]
method[wrap, return_type[type[Object]], modifier[public static], parameter[args, paramTypes]] begin[{]
if[binary_operation[member[.args], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[Obje... | Keyword[public] Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[wrap] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[args] , identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[paramTypes] operator[SEP] {
Keyword[if] ope... |
@Override
public void generateParseOnJackson(BindTypeContext context, Builder methodBuilder, String parserName, TypeName beanClass, String beanName, BindProperty property) {
if (property.isNullable()) {
methodBuilder.beginControlFlow("if ($L.currentToken()!=$T.VALUE_NULL)", parserName, JsonToken.class);
} else ... | class class_name[name] begin[{]
method[generateParseOnJackson, return_type[void], modifier[public], parameter[context, methodBuilder, parserName, beanClass, beanName, property]] begin[{]
if[call[property.isNullable, parameter[]]] begin[{]
call[methodBuilder.beginControlF... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[generateParseOnJackson] operator[SEP] identifier[BindTypeContext] identifier[context] , identifier[Builder] identifier[methodBuilder] , identifier[String] identifier[parserName] , identifier[TypeName] identifier[beanClass] , identifier[Stri... |
@SuppressWarnings("unchecked")
public <T> CompletableFuture<T> apply(long index) {
CompletableFuture<T> future = futures.computeIfAbsent(index, i -> new CompletableFuture<T>());
enqueueBatch(index);
return future;
} | class class_name[name] begin[{]
method[apply, return_type[type[CompletableFuture]], modifier[public], parameter[index]] begin[{]
local_variable[type[CompletableFuture], future]
call[.enqueueBatch, parameter[member[.index]]]
return[member[.future]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[CompletableFuture] operator[<] identifier[T] operator[>] identifier[apply] operator[SEP] Keyword[long] identifier[index] operator[SEP] {
identifier[CompletableFu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.