code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static void print(PrintStream out , DMatrix mat , String format ) {
if( format.toLowerCase().equals("matlab")) {
printMatlab(out, mat);
} else if( format.toLowerCase().equals("java")) {
printJava(out,mat,format);
} else {
printTypeSize(out, mat);
... | class class_name[name] begin[{]
method[print, return_type[void], modifier[public static], parameter[out, mat, format]] begin[{]
if[call[format.toLowerCase, parameter[]]] begin[{]
call[.printMatlab, parameter[member[.out], member[.mat]]]
else begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[print] operator[SEP] identifier[PrintStream] identifier[out] , identifier[DMatrix] identifier[mat] , identifier[String] identifier[format] operator[SEP] {
Keyword[if] operator[SEP] identifier[format] operator[SEP] identifier[toLowerCase] operator[SEP] op... |
private JSONObject errorForUnwrappedException(Exception e, JmxRequest pJmxReq) {
Throwable cause = e.getCause();
int code = cause instanceof IllegalArgumentException ? 400 : cause instanceof SecurityException ? 403 : 500;
return getErrorJSON(code,cause, pJmxReq);
} | class class_name[name] begin[{]
method[errorForUnwrappedException, return_type[type[JSONObject]], modifier[private], parameter[e, pJmxReq]] begin[{]
local_variable[type[Throwable], cause]
local_variable[type[int], code]
return[call[.getErrorJSON, parameter[member[.code], member[.cause],... | Keyword[private] identifier[JSONObject] identifier[errorForUnwrappedException] operator[SEP] identifier[Exception] identifier[e] , identifier[JmxRequest] identifier[pJmxReq] operator[SEP] {
identifier[Throwable] identifier[cause] operator[=] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operato... |
public com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder() {
if (typeCase_ == 2) {
return (com.google.privacy.dlp.v2.DatastoreKey) type_;
}
return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance();
} | class class_name[name] begin[{]
method[getDatastoreKeyOrBuilder, return_type[type[com]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.typeCase_], ==, literal[2]]] begin[{]
return[Cast(expression=MemberReference(member=type_, postfix_operators=[], prefix_operat... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[DatastoreKeyOrBuilder] identifier[getDatastoreKeyOrBuilder] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[typ... |
public Response invokeSignedRequest(Client apiClient, String accessKey, String secretKey,
String httpMethod, String endpointURL, String reqPath, Map<String, String> headers,
MultivaluedMap<String, String> params, Entity<?> entity) {
byte[] jsonEntity = null;
if (entity != null) {
try {
jsonEntity = Par... | class class_name[name] begin[{]
method[invokeSignedRequest, return_type[type[Response]], modifier[public], parameter[apiClient, accessKey, secretKey, httpMethod, endpointURL, reqPath, headers, params, entity]] begin[{]
local_variable[type[byte], jsonEntity]
if[binary_operation[member[.e... | Keyword[public] identifier[Response] identifier[invokeSignedRequest] operator[SEP] identifier[Client] identifier[apiClient] , identifier[String] identifier[accessKey] , identifier[String] identifier[secretKey] , identifier[String] identifier[httpMethod] , identifier[String] identifier[endpointURL] , identifier[Str... |
public static <S> List<S> of(List<? extends S> left, List<? extends S> right) {
List<S> list = new ArrayList<S>(left.size() + right.size());
list.addAll(left);
list.addAll(right);
return list;
} | class class_name[name] begin[{]
method[of, return_type[type[List]], modifier[public static], parameter[left, right]] begin[{]
local_variable[type[List], list]
call[list.addAll, parameter[member[.left]]]
call[list.addAll, parameter[member[.right]]]
return[member[.... | Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] identifier[List] operator[<] identifier[S] operator[>] identifier[of] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[S] operator[>] identifier[left] , identifier[List] operator[<] operator[?] Keyword[extends] iden... |
private void addPostParams(final Request request) {
if (attributes != null) {
request.addPostParam("Attributes", attributes);
}
if (dateCreated != null) {
request.addPostParam("DateCreated", dateCreated.toString());
}
if (dateUpdated != null) {
... | class class_name[name] begin[{]
method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{]
if[binary_operation[member[.attributes], !=, literal[null]]] begin[{]
call[request.addPostParam, parameter[literal["Attributes"], member[.attributes]]... | Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[attributes] operator[!=] Other[null] operator[SEP] {
identifier[request] operator[SEP] identifier[addPostParam] operator[SE... |
private TextWatcher createTextChangeListener() {
return new TextWatcher() {
@Override
public final void beforeTextChanged(final CharSequence s, final int start,
final int count, final int after) {
}
@Override
... | class class_name[name] begin[{]
method[createTextChangeListener, return_type[type[TextWatcher]], modifier[private], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifiers={'final', 'pu... | Keyword[private] identifier[TextWatcher] identifier[createTextChangeListener] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[TextWatcher] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[beforeTextChanged] o... |
public SDVariable min(String name, boolean keepDims, int... dimensions){
return sameDiff.min(name, this, keepDims, dimensions);
} | class class_name[name] begin[{]
method[min, return_type[type[SDVariable]], modifier[public], parameter[name, keepDims, dimensions]] begin[{]
return[call[sameDiff.min, parameter[member[.name], THIS[], member[.keepDims], member[.dimensions]]]]
end[}]
END[}] | Keyword[public] identifier[SDVariable] identifier[min] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[keepDims] , Keyword[int] operator[...] identifier[dimensions] operator[SEP] {
Keyword[return] identifier[sameDiff] operator[SEP] identifier[min] operator[SEP] identifier[name] ... |
@EmbeddedId
@AttributeOverrides({
@AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")),
@AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE"))
})
public ApplicationActionEventPagePeriodSummaryEmbeddedId getEmbeddedId() {
... | class class_name[name] begin[{]
method[getEmbeddedId, return_type[type[ApplicationActionEventPagePeriodSummaryEmbeddedId]], modifier[public], parameter[]] begin[{]
return[member[.embeddedId]]
end[}]
END[}] | annotation[@] identifier[EmbeddedId] annotation[@] identifier[AttributeOverrides] operator[SEP] {
annotation[@] identifier[AttributeOverride] operator[SEP] identifier[name] operator[=] literal[String] , identifier[column] operator[=] annotation[@] identifier[Column] operator[SEP] identifier[name] operator[=] li... |
public void put(
K key,
Refresher<? super K,? extends V,? extends E> refresher,
V value
) {
put(key, refresher, new Result<V,E>(value));
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[key, refresher, value]] begin[{]
call[.put, parameter[member[.key], member[.refresher], ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[K] identifier[key] , identifier[Refresher] operator[<] operator[?] Keyword[super] identifier[K] , operator[?] Keyword[extends] identifier[V] , operator[?] Keyword[extends] identifier[E] operator[>] identifier[refresher] , identifier[V] identifie... |
@Override
public CreateTagOptionResult createTagOption(CreateTagOptionRequest request) {
request = beforeClientExecution(request);
return executeCreateTagOption(request);
} | class class_name[name] begin[{]
method[createTagOption, return_type[type[CreateTagOptionResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeCreateTagOption, parameter[member[.req... | annotation[@] identifier[Override] Keyword[public] identifier[CreateTagOptionResult] identifier[createTagOption] operator[SEP] identifier[CreateTagOptionRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] o... |
public Set<Terminal> get(Construction construction) {
if (construction.isTerminal()) {
Set<Terminal> result = new LinkedHashSet<Terminal>();
result.add((Terminal) construction);
return result;
}
return firstGrammar.get(construction.getName());
} | class class_name[name] begin[{]
method[get, return_type[type[Set]], modifier[public], parameter[construction]] begin[{]
if[call[construction.isTerminal, parameter[]]] begin[{]
local_variable[type[Set], result]
call[result.add, parameter[Cast(expression=Member... | Keyword[public] identifier[Set] operator[<] identifier[Terminal] operator[>] identifier[get] operator[SEP] identifier[Construction] identifier[construction] operator[SEP] {
Keyword[if] operator[SEP] identifier[construction] operator[SEP] identifier[isTerminal] operator[SEP] operator[SEP] operator[SEP] {
... |
public static HostsFileEntries parseSilently(Charset... charsets) {
File hostsFile = locateHostsFile();
try {
return parse(hostsFile, charsets);
} catch (IOException e) {
if (logger.isWarnEnabled()) {
logger.warn("Failed to load and parse hosts file at " +... | class class_name[name] begin[{]
method[parseSilently, return_type[type[HostsFileEntries]], modifier[public static], parameter[charsets]] begin[{]
local_variable[type[File], hostsFile]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=hostsFile, po... | Keyword[public] Keyword[static] identifier[HostsFileEntries] identifier[parseSilently] operator[SEP] identifier[Charset] operator[...] identifier[charsets] operator[SEP] {
identifier[File] identifier[hostsFile] operator[=] identifier[locateHostsFile] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
... |
public Postcard withBundle(@Nullable String key, @Nullable Bundle value) {
mBundle.putBundle(key, value);
return this;
} | class class_name[name] begin[{]
method[withBundle, return_type[type[Postcard]], modifier[public], parameter[key, value]] begin[{]
call[mBundle.putBundle, parameter[member[.key], member[.value]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Postcard] identifier[withBundle] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[key] , annotation[@] identifier[Nullable] identifier[Bundle] identifier[value] operator[SEP] {
identifier[mBundle] operator[SEP] identifier[putBundle] operator[SEP] identifi... |
public boolean isElementPresent() {
logger.entering();
boolean returnValue = false;
try {
if (getElement() != null) {
returnValue = true;
}
} catch (NoSuchElementException e) {
returnValue = false;
}
logger.exiting(retur... | class class_name[name] begin[{]
method[isElementPresent, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
call[logger.entering, parameter[]]
local_variable[type[boolean], returnValue]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInv... | Keyword[public] Keyword[boolean] identifier[isElementPresent] operator[SEP] operator[SEP] {
identifier[logger] operator[SEP] identifier[entering] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[returnValue] operator[=] literal[boolean] operator[SEP] Keyword[try] {
Keyword[if] ope... |
public OvhCallDiagnostics billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException {
String qPath = "/telephony/{billingAccount}/service/{serviceName}/voiceConsumption/{consumptionId}/callDiagnostics";
Str... | class class_name[name] begin[{]
method[billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET, return_type[type[OvhCallDiagnostics]], modifier[public], parameter[billingAccount, serviceName, consumptionId]] begin[{]
local_variable[type[String], qPath]
local_variab... | Keyword[public] identifier[OvhCallDiagnostics] identifier[billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[Long] identifier[consumptionId] operator[SEP] Keyword[t... |
public ServiceFuture<VirtualNetworkInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters, final ServiceCallback<VirtualNetworkInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, v... | class class_name[name] begin[{]
method[beginCreateOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, virtualNetworkName, parameters, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.beginCreateOrUpdateWithServiceResponseAsyn... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[VirtualNetworkInner] operator[>] identifier[beginCreateOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkName] , identifier[VirtualNetworkInner] identifier[parameters] , Keyword[... |
public static void writeStringCached(DataOutput out, String entityName)
throws IOException {
byte[] name = getByteNameWithCaching(entityName);
// name should never be null at this point
if (name == null) {
throw new RuntimeException("Cannot retrieve class name");
}
out.write(name, 0, nam... | class class_name[name] begin[{]
method[writeStringCached, return_type[void], modifier[public static], parameter[out, entityName]] begin[{]
local_variable[type[byte], name]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(... | Keyword[public] Keyword[static] Keyword[void] identifier[writeStringCached] operator[SEP] identifier[DataOutput] identifier[out] , identifier[String] identifier[entityName] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[g... |
public static void log (@Nonnull final Class <?> aLoggingClass,
@Nonnull final IHasErrorLevel aErrorLevelProvider,
@Nonnull final Supplier <String> aMsgSupplier)
{
log (aLoggingClass, aErrorLevelProvider.getErrorLevel (), aMsgSupplier, null);
} | class class_name[name] begin[{]
method[log, return_type[void], modifier[public static], parameter[aLoggingClass, aErrorLevelProvider, aMsgSupplier]] begin[{]
call[.log, parameter[member[.aLoggingClass], call[aErrorLevelProvider.getErrorLevel, parameter[]], member[.aMsgSupplier], literal[null]]]... | Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[aLoggingClass] , annotation[@] identifier[Nonnull] Keyword[final] identifier[IHasErrorLevel] identifier[aErrorLevelProvider] , a... |
public void requestSmsVerificationCode(boolean androidSmsRetrieverSupported, Optional<String> captchaToken) throws IOException {
this.pushServiceSocket.requestSmsVerificationCode(androidSmsRetrieverSupported, captchaToken);
} | class class_name[name] begin[{]
method[requestSmsVerificationCode, return_type[void], modifier[public], parameter[androidSmsRetrieverSupported, captchaToken]] begin[{]
THIS[member[None.pushServiceSocket]call[None.requestSmsVerificationCode, parameter[member[.androidSmsRetrieverSupported], membe... | Keyword[public] Keyword[void] identifier[requestSmsVerificationCode] operator[SEP] Keyword[boolean] identifier[androidSmsRetrieverSupported] , identifier[Optional] operator[<] identifier[String] operator[>] identifier[captchaToken] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[this] operator[S... |
protected int extractNumeral() {
int val = 0;
final int topLeft = getTotalGridElements() - gridWidth;
int shift = 0;
// -2 because the top and bottom rows have 2 unusable bits (the first and last)
for(int i = 1; i < gridWidth - 1; i++) {
final int idx = topLeft + i;
val |= classified[idx] << shift;
... | class class_name[name] begin[{]
method[extractNumeral, return_type[type[int]], modifier[protected], parameter[]] begin[{]
local_variable[type[int], val]
local_variable[type[int], topLeft]
local_variable[type[int], shift]
ForStatement(body=BlockStatement(label=None, statements=[L... | Keyword[protected] Keyword[int] identifier[extractNumeral] operator[SEP] operator[SEP] {
Keyword[int] identifier[val] operator[=] Other[0] operator[SEP] Keyword[final] Keyword[int] identifier[topLeft] operator[=] identifier[getTotalGridElements] operator[SEP] operator[SEP] operator[-] identifier[gridWidth] opera... |
public boolean createNewFile() throws IOException
{
synchronized (LOCK) {
if (! exists()) {
clearStatusCache();
WriteStreamOld s = openWrite();
s.close();
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[createNewFile, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.LOCK]] BEGIN[{]
if[call[.exists, parameter[]]] begin[{]
call[.clearStatusCache, parameter[]]
... | Keyword[public] Keyword[boolean] identifier[createNewFile] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[synchronized] operator[SEP] identifier[LOCK] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[exists] operator[SEP] operator[SEP] operator[SEP] {
... |
public TaskInner beginUpdate(String resourceGroupName, String registryName, String taskName, TaskUpdateParameters taskUpdateParameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, taskName, taskUpdateParameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginUpdate, return_type[type[TaskInner]], modifier[public], parameter[resourceGroupName, registryName, taskName, taskUpdateParameters]] begin[{]
return[call[.beginUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.registryName], member[... | Keyword[public] identifier[TaskInner] identifier[beginUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , identifier[String] identifier[taskName] , identifier[TaskUpdateParameters] identifier[taskUpdateParameters] operator[SEP] {
Keyword[retur... |
static private ArrayStructure sectionArrayStructure(ParsedSectionSpec child, ArrayStructure innerData, StructureMembers.Member m) throws IOException, InvalidRangeException {
StructureMembers membersw = new StructureMembers(m.getStructureMembers()); // no data arrays get propagated
ArrayStructureW result = new... | class class_name[name] begin[{]
method[sectionArrayStructure, return_type[type[ArrayStructure]], modifier[private static], parameter[child, innerData, m]] begin[{]
local_variable[type[StructureMembers], membersw]
local_variable[type[ArrayStructureW], result]
local_variable[type[int], co... | Keyword[static] Keyword[private] identifier[ArrayStructure] identifier[sectionArrayStructure] operator[SEP] identifier[ParsedSectionSpec] identifier[child] , identifier[ArrayStructure] identifier[innerData] , identifier[StructureMembers] operator[SEP] identifier[Member] identifier[m] operator[SEP] Keyword[throws] ide... |
public WnsNotificationResponse pushToast(String channelUri, WnsToast toast) throws WnsException {
return this.pushToast(channelUri, null, toast);
} | class class_name[name] begin[{]
method[pushToast, return_type[type[WnsNotificationResponse]], modifier[public], parameter[channelUri, toast]] begin[{]
return[THIS[call[None.pushToast, parameter[member[.channelUri], literal[null], member[.toast]]]]]
end[}]
END[}] | Keyword[public] identifier[WnsNotificationResponse] identifier[pushToast] operator[SEP] identifier[String] identifier[channelUri] , identifier[WnsToast] identifier[toast] operator[SEP] Keyword[throws] identifier[WnsException] {
Keyword[return] Keyword[this] operator[SEP] identifier[pushToast] operator[SEP] iden... |
public static void fail(boolean expression, String messageFormat, Object... args) {
assertTrue(!expression, messageFormat, args);
} | class class_name[name] begin[{]
method[fail, return_type[void], modifier[public static], parameter[expression, messageFormat, args]] begin[{]
call[.assertTrue, parameter[member[.expression], member[.messageFormat], member[.args]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[fail] operator[SEP] Keyword[boolean] identifier[expression] , identifier[String] identifier[messageFormat] , identifier[Object] operator[...] identifier[args] operator[SEP] {
identifier[assertTrue] operator[SEP] operator[!] identifier[expression] , iden... |
public Optional<JobExecutionInfo> queryByJobId(String id) throws RemoteInvocationException {
JobExecutionQuery query = new JobExecutionQuery();
query.setIdType(QueryIdTypeEnum.JOB_ID);
query.setId(JobExecutionQuery.Id.create(id));
query.setLimit(1);
List<JobExecutionInfo> results = executeQuery(que... | class class_name[name] begin[{]
method[queryByJobId, return_type[type[Optional]], modifier[public], parameter[id]] begin[{]
local_variable[type[JobExecutionQuery], query]
call[query.setIdType, parameter[member[QueryIdTypeEnum.JOB_ID]]]
call[query.setId, parameter[call[Jo... | Keyword[public] identifier[Optional] operator[<] identifier[JobExecutionInfo] operator[>] identifier[queryByJobId] operator[SEP] identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[RemoteInvocationException] {
identifier[JobExecutionQuery] identifier[query] operator[=] Keyword[new] identif... |
protected boolean addDependencies(DependencyContainer container)
{
/* XXX:
if (_classPath instanceof JarPath) {
container.add(_depend);
return false;
}
else
*/
if (_hasJNIReload) {
container.add(this);
return true;
}
else if (_sourcePath == null) {
contai... | class class_name[name] begin[{]
method[addDependencies, return_type[type[boolean]], modifier[protected], parameter[container]] begin[{]
if[member[._hasJNIReload]] begin[{]
call[container.add, parameter[THIS[]]]
return[literal[true]]
else begin[{]
... | Keyword[protected] Keyword[boolean] identifier[addDependencies] operator[SEP] identifier[DependencyContainer] identifier[container] operator[SEP] {
Keyword[if] operator[SEP] identifier[_hasJNIReload] operator[SEP] {
identifier[container] operator[SEP] identifier[add] operator[SEP] Keyword[this] operat... |
public static <A> Will<A> forFuture(Future<A> future) {
return new Of<A>(JdkFutureAdapters.listenInPoolThread(future));
} | class class_name[name] begin[{]
method[forFuture, return_type[type[Will]], modifier[public static], parameter[future]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=future, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listenI... | Keyword[public] Keyword[static] operator[<] identifier[A] operator[>] identifier[Will] operator[<] identifier[A] operator[>] identifier[forFuture] operator[SEP] identifier[Future] operator[<] identifier[A] operator[>] identifier[future] operator[SEP] {
Keyword[return] Keyword[new] identifier[Of] operator[<] iden... |
@Override
public void setMonitorEnabled(boolean enabled) {
if(enabled) {
// create and start background monitor
if (monitor == null) {
monitor = new AdcGpioProviderBase.ADCMonitor();
monitor.start();
}
}
else{
tr... | class class_name[name] begin[{]
method[setMonitorEnabled, return_type[void], modifier[public], parameter[enabled]] begin[{]
if[member[.enabled]] begin[{]
if[binary_operation[member[.monitor], ==, literal[null]]] begin[{]
assign[member[.mon... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setMonitorEnabled] operator[SEP] Keyword[boolean] identifier[enabled] operator[SEP] {
Keyword[if] operator[SEP] identifier[enabled] operator[SEP] {
Keyword[if] operator[SEP] identifier[monitor] operator[==] Other[null] operato... |
public ArtifactoryDependenciesClient createArtifactoryDependenciesClient(String userName, String password,
ProxyConfiguration proxyConfiguration, TaskListener listener) {
ArtifactoryDependenciesClient client = new ArtifactoryDependenci... | class class_name[name] begin[{]
method[createArtifactoryDependenciesClient, return_type[type[ArtifactoryDependenciesClient]], modifier[public], parameter[userName, password, proxyConfiguration, listener]] begin[{]
local_variable[type[ArtifactoryDependenciesClient], client]
call[client.s... | Keyword[public] identifier[ArtifactoryDependenciesClient] identifier[createArtifactoryDependenciesClient] operator[SEP] identifier[String] identifier[userName] , identifier[String] identifier[password] , identifier[ProxyConfiguration] identifier[proxyConfiguration] , identifier[TaskListener] identifier[listener] ope... |
public static int getStyleId(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes){
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ThemableView, defStyleAttr, defStyleRes);
int styleId = a.getResourceId(R.styleable.ThemableView_v_styleId, 0);
a.recycle();
... | class class_name[name] begin[{]
method[getStyleId, return_type[type[int]], modifier[public static], parameter[context, attrs, defStyleAttr, defStyleRes]] begin[{]
local_variable[type[TypedArray], a]
local_variable[type[int], styleId]
call[a.recycle, parameter[]]
return[m... | Keyword[public] Keyword[static] Keyword[int] identifier[getStyleId] operator[SEP] identifier[Context] identifier[context] , identifier[AttributeSet] identifier[attrs] , Keyword[int] identifier[defStyleAttr] , Keyword[int] identifier[defStyleRes] operator[SEP] {
identifier[TypedArray] identifier[a] operator[=]... |
public void removePositionUpdateListener(@NonNull PositionUpdateListener listener) {
if (iteratingListeners) {
listenersToRemove.add(listener);
} else {
listeners.remove(listener);
}
} | class class_name[name] begin[{]
method[removePositionUpdateListener, return_type[void], modifier[public], parameter[listener]] begin[{]
if[member[.iteratingListeners]] begin[{]
call[listenersToRemove.add, parameter[member[.listener]]]
else begin[{]
... | Keyword[public] Keyword[void] identifier[removePositionUpdateListener] operator[SEP] annotation[@] identifier[NonNull] identifier[PositionUpdateListener] identifier[listener] operator[SEP] {
Keyword[if] operator[SEP] identifier[iteratingListeners] operator[SEP] {
identifier[listenersToRemove] operator... |
@Nonnull
public UserDetails loadUserByUsername(String idOrFullName) throws UsernameNotFoundException, DataAccessException, ExecutionException {
Boolean exists = existenceCache.getIfPresent(idOrFullName);
if(exists != null && !exists) {
throw new UsernameNotFoundException(String.format("\... | class class_name[name] begin[{]
method[loadUserByUsername, return_type[type[UserDetails]], modifier[public], parameter[idOrFullName]] begin[{]
local_variable[type[Boolean], exists]
if[binary_operation[binary_operation[member[.exists], !=, literal[null]], &&, member[.exists]]] begin[{]
... | annotation[@] identifier[Nonnull] Keyword[public] identifier[UserDetails] identifier[loadUserByUsername] operator[SEP] identifier[String] identifier[idOrFullName] operator[SEP] Keyword[throws] identifier[UsernameNotFoundException] , identifier[DataAccessException] , identifier[ExecutionException] {
identifier[... |
@SuppressWarnings("unchecked")
public <S extends io.sarl.lang.core.Space> S getOrCreateSpaceWithSpec(SpaceID spaceID,
Class<? extends SpaceSpecification<S>> spec, Object... creationParams) {
synchronized (getSpaceRepositoryMutex()) {
final Collection<SpaceID> ispaces = this.spacesBySpec.get(spec);
final S f... | class class_name[name] begin[{]
method[getOrCreateSpaceWithSpec, return_type[type[S]], modifier[public], parameter[spaceID, spec, creationParams]] begin[{]
SYNCHRONIZED[call[.getSpaceRepositoryMutex, parameter[]]] BEGIN[{]
local_variable[type[Collection], ispaces]
local_... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[S] Keyword[extends] identifier[io] operator[SEP] identifier[sarl] operator[SEP] identifier[lang] operator[SEP] identifier[core] operator[SEP] identifier[Space] operator[>] identifier[S] identifi... |
public HttpRequestBuilder addHeader(String name, String value) {
if (value != null) {
reqHeaders.put(name, value);
}
return this;
} | class class_name[name] begin[{]
method[addHeader, return_type[type[HttpRequestBuilder]], modifier[public], parameter[name, value]] begin[{]
if[binary_operation[member[.value], !=, literal[null]]] begin[{]
call[reqHeaders.put, parameter[member[.name], member[.value]]]
... | Keyword[public] identifier[HttpRequestBuilder] identifier[addHeader] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] {
identifier[reqHeaders] operator[SEP] ident... |
public java.lang.String getCoords() {
return (java.lang.String) getStateHelper().eval(PropertyKeys.coords);
} | class class_name[name] begin[{]
method[getCoords, return_type[type[java]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[], member=getStateHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(m... | Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getCoords] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[getStateHelper] operator[SEP... |
public int compare(Vector3 o1, Vector3 o2) {
int ans = 0;
if (o1 != null && o2 != null) {
Vector3 d1 = o1;
Vector3 d2 = o2;
if (d1.x > d2.x)
return 1;
if (d1.x < d2.x)
return -1;
// x1 == x2
if (d1.y > d2.y)
return 1;
if (d1.y < d2.y)
return -1;
} else {
if (o1 == null &&... | class class_name[name] begin[{]
method[compare, return_type[type[int]], modifier[public], parameter[o1, o2]] begin[{]
local_variable[type[int], ans]
if[binary_operation[binary_operation[member[.o1], !=, literal[null]], &&, binary_operation[member[.o2], !=, literal[null]]]] begin[{]
... | Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[Vector3] identifier[o1] , identifier[Vector3] identifier[o2] operator[SEP] {
Keyword[int] identifier[ans] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[o1] operator[!=] Other[null] operator[&&] identifier[o2] ope... |
private static final Object serializeFromProtobufEntity(Message protoBuf, Class<?> pojoClazz) throws JException
{
final ProtobufEntity protoBufEntity = ProtobufSerializerUtils.getProtobufEntity(pojoClazz);
if (protoBufEntity == null)
{
return protoBuf;
}
return new ProtobufSerializer().fro... | class class_name[name] begin[{]
method[serializeFromProtobufEntity, return_type[type[Object]], modifier[final private static], parameter[protoBuf, pojoClazz]] begin[{]
local_variable[type[ProtobufEntity], protoBufEntity]
if[binary_operation[member[.protoBufEntity], ==, literal[null]]] b... | Keyword[private] Keyword[static] Keyword[final] identifier[Object] identifier[serializeFromProtobufEntity] operator[SEP] identifier[Message] identifier[protoBuf] , identifier[Class] operator[<] operator[?] operator[>] identifier[pojoClazz] operator[SEP] Keyword[throws] identifier[JException] {
Keyword[final] id... |
@Override
public <V> V getMinimum(ChronoElement<V> element) {
if (this.timestamp.contains(element)) {
return this.timestamp.getMinimum(element);
} else {
return this.moment.getMinimum(element);
}
} | class class_name[name] begin[{]
method[getMinimum, return_type[type[V]], modifier[public], parameter[element]] begin[{]
if[THIS[member[None.timestamp]call[None.contains, parameter[member[.element]]]]] begin[{]
return[THIS[member[None.timestamp]call[None.getMinimum, parameter[member[... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[V] operator[>] identifier[V] identifier[getMinimum] operator[SEP] identifier[ChronoElement] operator[<] identifier[V] operator[>] identifier[element] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[timestam... |
public static <Q> Object getPropertyValue(Q bean, String propertyName) {
return ObjectUtils.getPropertyValue(bean, propertyName, Object.class);
} | class class_name[name] begin[{]
method[getPropertyValue, return_type[type[Object]], modifier[public static], parameter[bean, propertyName]] begin[{]
return[call[ObjectUtils.getPropertyValue, parameter[member[.bean], member[.propertyName], ClassReference(postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[static] operator[<] identifier[Q] operator[>] identifier[Object] identifier[getPropertyValue] operator[SEP] identifier[Q] identifier[bean] , identifier[String] identifier[propertyName] operator[SEP] {
Keyword[return] identifier[ObjectUtils] operator[SEP] identifier[getPropertyValue] oper... |
public boolean containsReturnValue(ValueNumberFactory factory) {
for (int i = 0; i + 1 < array.length; i += 2) {
int valueNumber = array[i];
if (valueNumber < 0) {
break;
}
int lockCount = array[i + 1];
if (lockCount > 0 && factory.forN... | class class_name[name] begin[{]
method[containsReturnValue, return_type[type[boolean]], modifier[public], parameter[factory]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberRefer... | Keyword[public] Keyword[boolean] identifier[containsReturnValue] operator[SEP] identifier[ValueNumberFactory] identifier[factory] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[+] Other[1] operator[<] identifier[array] operator[SEP]... |
public long getNumberOfQueuedMessages()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getNumberOfQueuedMessages");
long total = 0;
try
{
total = referenceItemStream.getStatistics().getTotalItemCount();
}
catch (MessageStoreException e)
{
... | class class_name[name] begin[{]
method[getNumberOfQueuedMessages, return_type[type[long]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, paramet... | Keyword[public] Keyword[long] identifier[getNumberOfQueuedMessages] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] opera... |
@Override
public ListAccountsResult listAccounts(ListAccountsRequest request) {
request = beforeClientExecution(request);
return executeListAccounts(request);
} | class class_name[name] begin[{]
method[listAccounts, return_type[type[ListAccountsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListAccounts, parameter[member[.request]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[ListAccountsResult] identifier[listAccounts] operator[SEP] identifier[ListAccountsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[S... |
@Override
public String parse(String argument) throws CommandLineException {
File file = new File(argument);
try {
Assert.isTrue(file.exists(), "File '" + file + "' does not exist");
Assert.isFalse(file.isDirectory(), "File '" + file + "' is a directory");
Assert.isTrue(file.canRead(), "File '" + file +... | class class_name[name] begin[{]
method[parse, return_type[type[String]], modifier[public], parameter[argument]] begin[{]
local_variable[type[File], file]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=exists, postfix_operator... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[parse] operator[SEP] identifier[String] identifier[argument] operator[SEP] Keyword[throws] identifier[CommandLineException] {
identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[argum... |
private String getCategoryTerm(String scheme) {
List<Category> categories = entry.getCategories(scheme);
if (categories.isEmpty()) {
return null;
} else {
return categories.get(0).getTerm();
}
} | class class_name[name] begin[{]
method[getCategoryTerm, return_type[type[String]], modifier[private], parameter[scheme]] begin[{]
local_variable[type[List], categories]
if[call[categories.isEmpty, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
... | Keyword[private] identifier[String] identifier[getCategoryTerm] operator[SEP] identifier[String] identifier[scheme] operator[SEP] {
identifier[List] operator[<] identifier[Category] operator[>] identifier[categories] operator[=] identifier[entry] operator[SEP] identifier[getCategories] operator[SEP] identifier[s... |
public SystemInputDefBuilder has( String name, Object value)
{
systemInputDef_.setAnnotation( name, Objects.toString( value, null));
return this;
} | class class_name[name] begin[{]
method[has, return_type[type[SystemInputDefBuilder]], modifier[public], parameter[name, value]] begin[{]
call[systemInputDef_.setAnnotation, parameter[member[.name], call[Objects.toString, parameter[member[.value], literal[null]]]]]
return[THIS[]]
end... | Keyword[public] identifier[SystemInputDefBuilder] identifier[has] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] {
identifier[systemInputDef_] operator[SEP] identifier[setAnnotation] operator[SEP] identifier[name] , identifier[Objects] operator[SEP] ident... |
protected int randomIntInWindow(int begin, int windowSize, int n,
Set<Integer> excludeSet) {
final int size = Math.min(windowSize, n);
if (size <= 0) {
return -1;
}
int adjustment = 0;
for (Integer v: excludeSet) {
int vindex = (v.intValue() - begin + n) % n;
if (vindex < ... | class class_name[name] begin[{]
method[randomIntInWindow, return_type[type[int]], modifier[protected], parameter[begin, windowSize, n, excludeSet]] begin[{]
local_variable[type[int], size]
if[binary_operation[member[.size], <=, literal[0]]] begin[{]
return[literal[1]]
... | Keyword[protected] Keyword[int] identifier[randomIntInWindow] operator[SEP] Keyword[int] identifier[begin] , Keyword[int] identifier[windowSize] , Keyword[int] identifier[n] , identifier[Set] operator[<] identifier[Integer] operator[>] identifier[excludeSet] operator[SEP] {
Keyword[final] Keyword[int] identif... |
public static String getAttrVal(final NamedNodeMap nnm, final String name) {
Node nmAttr = nnm.getNamedItem(name);
if ((nmAttr == null) || (absent(nmAttr.getNodeValue()))) {
return null;
}
return nmAttr.getNodeValue();
} | class class_name[name] begin[{]
method[getAttrVal, return_type[type[String]], modifier[public static], parameter[nnm, name]] begin[{]
local_variable[type[Node], nmAttr]
if[binary_operation[binary_operation[member[.nmAttr], ==, literal[null]], ||, call[.absent, parameter[call[nmAttr.getN... | Keyword[public] Keyword[static] identifier[String] identifier[getAttrVal] operator[SEP] Keyword[final] identifier[NamedNodeMap] identifier[nnm] , Keyword[final] identifier[String] identifier[name] operator[SEP] {
identifier[Node] identifier[nmAttr] operator[=] identifier[nnm] operator[SEP] identifier[getNamedIt... |
public static double getDouble(Cursor cursor, String columnName) {
if (cursor == null) {
return -1;
}
return cursor.getDouble(cursor.getColumnIndex(columnName));
} | class class_name[name] begin[{]
method[getDouble, return_type[type[double]], modifier[public static], parameter[cursor, columnName]] begin[{]
if[binary_operation[member[.cursor], ==, literal[null]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
return... | Keyword[public] Keyword[static] Keyword[double] identifier[getDouble] operator[SEP] identifier[Cursor] identifier[cursor] , identifier[String] identifier[columnName] operator[SEP] {
Keyword[if] operator[SEP] identifier[cursor] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[-] Other... |
public boolean parseMoreData(final EncodedImage encodedImage) {
if (mParserState == NOT_A_JPEG) {
return false;
}
final int dataBufferSize = encodedImage.getSize();
// Is there any new data to parse?
// mBytesParsed might be greater than size of dataBuffer - that happens when
// we skip ... | class class_name[name] begin[{]
method[parseMoreData, return_type[type[boolean]], modifier[public], parameter[encodedImage]] begin[{]
if[binary_operation[member[.mParserState], ==, member[.NOT_A_JPEG]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[boolean] identifier[parseMoreData] operator[SEP] Keyword[final] identifier[EncodedImage] identifier[encodedImage] operator[SEP] {
Keyword[if] operator[SEP] identifier[mParserState] operator[==] identifier[NOT_A_JPEG] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP... |
@SuppressWarnings("unchecked")
public BaseBo setAttributes(JsonNode attrs) {
if (attrs == null || attrs instanceof NullNode || attrs instanceof MissingNode) {
return setAttributes((Map<String, Object>) null);
}
if (attrs instanceof ObjectNode) {
return setAttributes(S... | class class_name[name] begin[{]
method[setAttributes, return_type[type[BaseBo]], modifier[public], parameter[attrs]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.attrs], ==, literal[null]], ||, binary_operation[member[.attrs], instanceof, type[NullNode]]], ||, binary_o... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[BaseBo] identifier[setAttributes] operator[SEP] identifier[JsonNode] identifier[attrs] operator[SEP] {
Keyword[if] operator[SEP] identifier[attrs] operator[==] Other[null] operator[||] identifier[att... |
public static String getFromMimeType (String mimeType, Supplier<String> notFound) {
mimeType = mimeType.toLowerCase ();
return mimeTypeRemappings.containsKey (mimeType) ? mimeTypeRemappings.get (mimeType) : notFound.get ();
} | class class_name[name] begin[{]
method[getFromMimeType, return_type[type[String]], modifier[public static], parameter[mimeType, notFound]] begin[{]
assign[member[.mimeType], call[mimeType.toLowerCase, parameter[]]]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberRef... | Keyword[public] Keyword[static] identifier[String] identifier[getFromMimeType] operator[SEP] identifier[String] identifier[mimeType] , identifier[Supplier] operator[<] identifier[String] operator[>] identifier[notFound] operator[SEP] {
identifier[mimeType] operator[=] identifier[mimeType] operator[SEP] identifi... |
public Object getProperty(final String iName) {
return properties.get(iName.toLowerCase(Locale.ENGLISH));
} | class class_name[name] begin[{]
method[getProperty, return_type[type[Object]], modifier[public], parameter[iName]] begin[{]
return[call[properties.get, parameter[call[iName.toLowerCase, parameter[member[Locale.ENGLISH]]]]]]
end[}]
END[}] | Keyword[public] identifier[Object] identifier[getProperty] operator[SEP] Keyword[final] identifier[String] identifier[iName] operator[SEP] {
Keyword[return] identifier[properties] operator[SEP] identifier[get] operator[SEP] identifier[iName] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] ... |
public static void deactivateApp(Context context, String applicationId) {
if (context == null || applicationId == null) {
throw new IllegalArgumentException("Both context and applicationId must be non-null");
}
resetSourceApplication();
final AppEventsLogger logger = new Ap... | class class_name[name] begin[{]
method[deactivateApp, return_type[void], modifier[public static], parameter[context, applicationId]] begin[{]
if[binary_operation[binary_operation[member[.context], ==, literal[null]], ||, binary_operation[member[.applicationId], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[deactivateApp] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[applicationId] operator[SEP] {
Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[||] identifier[applicationId] operator[==] ... |
public List<TablePrivilege> getTablePrivileges(final String catalog, final String schemaPattern,
final String tableNamePattern)
throws SQLException {
final List<TablePrivilege> list = new ArrayList<>();
try (ResultSet results = databaseMetad... | class class_name[name] begin[{]
method[getTablePrivileges, return_type[type[List]], modifier[public], parameter[catalog, schemaPattern, tableNamePattern]] begin[{]
local_variable[type[List], list]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=results,... | Keyword[public] identifier[List] operator[<] identifier[TablePrivilege] operator[>] identifier[getTablePrivileges] operator[SEP] Keyword[final] identifier[String] identifier[catalog] , Keyword[final] identifier[String] identifier[schemaPattern] , Keyword[final] identifier[String] identifier[tableNamePattern] operator... |
public static GenericColor valueOf(String color) {
Objects.requireNonNull(color, "color");
Color namedColor = Color.fromName(color);
if (namedColor != null) {
return valueOf(namedColor);
}
int length = color.length();
Throwable cause = null;
try {
// "#RRGGBB" / #AARRGGBB
... | class class_name[name] begin[{]
method[valueOf, return_type[type[GenericColor]], modifier[public static], parameter[color]] begin[{]
call[Objects.requireNonNull, parameter[member[.color], literal["color"]]]
local_variable[type[Color], namedColor]
if[binary_operation[memb... | Keyword[public] Keyword[static] identifier[GenericColor] identifier[valueOf] operator[SEP] identifier[String] identifier[color] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[color] , literal[String] operator[SEP] operator[SEP] identifier[Color] identifier[... |
public void applyQTran( DMatrixRBlock B ) {
int minDimen = Math.min(dataA.numCols,dataA.numRows);
DSubmatrixD1 subB = new DSubmatrixD1(B);
W.col0 = W.row0 = 0;
Y.row1 = W.row1 = dataA.numRows;
WTA.row0 = WTA.col0 = 0;
// (Q3^T * (Q2^T * (Q1^t * A)))
for( int i ... | class class_name[name] begin[{]
method[applyQTran, return_type[void], modifier[public], parameter[B]] begin[{]
local_variable[type[int], minDimen]
local_variable[type[DSubmatrixD1], subB]
assign[member[W.col0], assign[member[W.row0], literal[0]]]
assign[member[Y.... | Keyword[public] Keyword[void] identifier[applyQTran] operator[SEP] identifier[DMatrixRBlock] identifier[B] operator[SEP] {
Keyword[int] identifier[minDimen] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[dataA] operator[SEP] identifier[numCols] , identifier[dataA] operator[S... |
public static void run(ProcessBuilder builder, Writer output, Writer error) {
try {
Process process = builder.start();
consume(process, output, error);
int result = process.waitFor();
if (result != 0) {
String msg = "process %s exited with value %d";
throw new ProcessE... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public static], parameter[builder, output, error]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=start, postfi... | Keyword[public] Keyword[static] Keyword[void] identifier[run] operator[SEP] identifier[ProcessBuilder] identifier[builder] , identifier[Writer] identifier[output] , identifier[Writer] identifier[error] operator[SEP] {
Keyword[try] {
identifier[Process] identifier[process] operator[=] identifier[buil... |
@Override
public void clearCache(CPDefinitionOptionRel cpDefinitionOptionRel) {
entityCache.removeResult(CPDefinitionOptionRelModelImpl.ENTITY_CACHE_ENABLED,
CPDefinitionOptionRelImpl.class,
cpDefinitionOptionRel.getPrimaryKey());
finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
finderCache... | class class_name[name] begin[{]
method[clearCache, return_type[void], modifier[public], parameter[cpDefinitionOptionRel]] begin[{]
call[entityCache.removeResult, parameter[member[CPDefinitionOptionRelModelImpl.ENTITY_CACHE_ENABLED], ClassReference(postfix_operators=[], prefix_operators=[], qual... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clearCache] operator[SEP] identifier[CPDefinitionOptionRel] identifier[cpDefinitionOptionRel] operator[SEP] {
identifier[entityCache] operator[SEP] identifier[removeResult] operator[SEP] identifier[CPDefinitionOptionRelModelImpl] operato... |
public void unsetDirty(final Object iPojo) {
if (iPojo == null)
return;
final ODocument record = getRecordByUserObject(iPojo, false);
if (record == null)
return;
ORecordInternal.unsetDirty(record);
} | class class_name[name] begin[{]
method[unsetDirty, return_type[void], modifier[public], parameter[iPojo]] begin[{]
if[binary_operation[member[.iPojo], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[ODocument], record]
... | Keyword[public] Keyword[void] identifier[unsetDirty] operator[SEP] Keyword[final] identifier[Object] identifier[iPojo] operator[SEP] {
Keyword[if] operator[SEP] identifier[iPojo] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[final] identifier[ODocument] identifier[record] operator[... |
@TargetApi(Build.VERSION_CODES.FROYO)
@Nullable
public static CharSequence[] optCharSequenceArray(@Nullable Bundle bundle, @Nullable String key) {
return optCharSequenceArray(bundle, key, new CharSequence[0]);
} | class class_name[name] begin[{]
method[optCharSequenceArray, return_type[type[CharSequence]], modifier[public static], parameter[bundle, key]] begin[{]
return[call[.optCharSequenceArray, parameter[member[.bundle], member[.key], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[],... | annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[FROYO] operator[SEP] annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[CharSequence] operator[SEP] operator[SEP] identifier[optCharSequenceArray] operator[SEP]... |
public Observable<Page<AgreementTermsInner>> listAsync() {
return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<AgreementTermsInner>>, Page<AgreementTermsInner>>() {
@Override
public Page<AgreementTermsInner> call(ServiceResponse<List<AgreementTermsInner>> response) {... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[AgreementTermsInner] operator[>] operator[>] identifier[listAsync] operator[SEP] operator[SEP] {
Keyword[return] identifier[listWithServiceResponseAsync] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[S... |
final boolean isForeignSecuredProxy()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "isForeignSecuredProxy");
SibTr.exit(tc, "isForeignSecuredProxy", new Boolean(_foreignSecuredProxy));
}
return _foreignSecuredProxy;
} | class class_name[name] begin[{]
method[isForeignSecuredProxy, return_type[type[boolean]], modifier[final], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entr... | Keyword[final] Keyword[boolean] identifier[isForeignSecuredProxy] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operato... |
@Override
public void setRequestHeader(Header header) {
Header[] headers = getRequestHeaderGroup().getHeaders(header.getName());
for (int i = 0; i < headers.length; i++) {
getRequestHeaderGroup().removeHeader(headers[i]);
}
getRequestHeaderGroup... | class class_name[name] begin[{]
method[setRequestHeader, return_type[void], modifier[public], parameter[header]] begin[{]
local_variable[type[Header], headers]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getReques... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setRequestHeader] operator[SEP] identifier[Header] identifier[header] operator[SEP] {
identifier[Header] operator[SEP] operator[SEP] identifier[headers] operator[=] identifier[getRequestHeaderGroup] operator[SEP] operator[SEP] operator[S... |
public boolean isOnline() {
LOG.debug("Checking online status for {} at {}", getName(), getURL());
try {
return client
.execute(new HttpHead(toURI(getURL())))
.getStatusLine()
.getStatusCode() != 404;
} catch (Exception e) {
return false;
}
} | class class_name[name] begin[{]
method[isOnline, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
call[LOG.debug, parameter[literal["Checking online status for {} at {}"], call[.getName, parameter[]], call[.getURL, parameter[]]]]
TryStatement(block=[ReturnStatement(ex... | Keyword[public] Keyword[boolean] identifier[isOnline] operator[SEP] operator[SEP] {
identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[getName] operator[SEP] operator[SEP] , identifier[getURL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
... |
public Collection getAllUploadFile(HttpServletRequest request) {
Collection uploadList = null;
try {
HttpSession session = request.getSession();
if (session != null) {
uploadList = (Collection) session.getAttribute(PIC_NAME_PACKAGE);
}
} catch (Exception ex) {
Debug... | class class_name[name] begin[{]
method[getAllUploadFile, return_type[type[Collection]], modifier[public], parameter[request]] begin[{]
local_variable[type[Collection], uploadList]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initial... | Keyword[public] identifier[Collection] identifier[getAllUploadFile] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[Collection] identifier[uploadList] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[HttpSession] identifier[session] operator[=... |
public int readLine(final byte[] array, final int off, final int len, final EnumSet<LineTerminator> terminators) throws IOException {
ByteArrays.ensureOffsetLength(array ,off, len);
if (len == 0) return 0; // 0-length reads always return 0
if (noMoreCharacters()) return -1;
int i, k = 0, remaining = len, read =... | class class_name[name] begin[{]
method[readLine, return_type[type[int]], modifier[public], parameter[array, off, len, terminators]] begin[{]
call[ByteArrays.ensureOffsetLength, parameter[member[.array], member[.off], member[.len]]]
if[binary_operation[member[.len], ==, literal[0... | Keyword[public] Keyword[int] identifier[readLine] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[array] , Keyword[final] Keyword[int] identifier[off] , Keyword[final] Keyword[int] identifier[len] , Keyword[final] identifier[EnumSet] operator[<] identifier[LineTerminator] operator[>... |
public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) {
return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachine... | class class_name[name] begin[{]
method[getVirtualMachineScaleSetNetworkInterface, return_type[type[NetworkInterfaceInner]], modifier[public], parameter[resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand]] begin[{]
return[call[.getVirtualMachineScaleSetNetwo... | Keyword[public] identifier[NetworkInterfaceInner] identifier[getVirtualMachineScaleSetNetworkInterface] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualMachineScaleSetName] , identifier[String] identifier[virtualmachineIndex] , identifier[String] identifier[netwo... |
public static authenticationradiuspolicy_systemglobal_binding[] get(nitro_service service, String name) throws Exception{
authenticationradiuspolicy_systemglobal_binding obj = new authenticationradiuspolicy_systemglobal_binding();
obj.set_name(name);
authenticationradiuspolicy_systemglobal_binding response[] = (a... | class class_name[name] begin[{]
method[get, return_type[type[authenticationradiuspolicy_systemglobal_binding]], modifier[public static], parameter[service, name]] begin[{]
local_variable[type[authenticationradiuspolicy_systemglobal_binding], obj]
call[obj.set_name, parameter[member[.nam... | Keyword[public] Keyword[static] identifier[authenticationradiuspolicy_systemglobal_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[authenticatio... |
public void createStreamFailed(String scope, String streamName) {
DYNAMIC_LOGGER.incCounterValue(globalMetricName(CREATE_STREAM_FAILED), 1);
DYNAMIC_LOGGER.incCounterValue(CREATE_STREAM_FAILED, 1, streamTags(scope, streamName));
} | class class_name[name] begin[{]
method[createStreamFailed, return_type[void], modifier[public], parameter[scope, streamName]] begin[{]
call[DYNAMIC_LOGGER.incCounterValue, parameter[call[.globalMetricName, parameter[member[.CREATE_STREAM_FAILED]]], literal[1]]]
call[DYNAMIC_LOGG... | Keyword[public] Keyword[void] identifier[createStreamFailed] operator[SEP] identifier[String] identifier[scope] , identifier[String] identifier[streamName] operator[SEP] {
identifier[DYNAMIC_LOGGER] operator[SEP] identifier[incCounterValue] operator[SEP] identifier[globalMetricName] operator[SEP] identifier[CRE... |
private int importTables(Referenceable databaseReferenceable, String databaseName, final boolean failOnError) throws Exception {
int tablesImported = 0;
List<String> hiveTables = hiveClient.getAllTables(databaseName);
LOG.info("Importing tables {} for db {}", hiveTables.toString(), databaseName)... | class class_name[name] begin[{]
method[importTables, return_type[type[int]], modifier[private], parameter[databaseReferenceable, databaseName, failOnError]] begin[{]
local_variable[type[int], tablesImported]
local_variable[type[List], hiveTables]
call[LOG.info, parameter[literal... | Keyword[private] Keyword[int] identifier[importTables] operator[SEP] identifier[Referenceable] identifier[databaseReferenceable] , identifier[String] identifier[databaseName] , Keyword[final] Keyword[boolean] identifier[failOnError] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[int] identifier[... |
protected void createConsumer(ConsumerConnectionContext context, String messageSelector) throws JMSException {
if (context == null) {
throw new IllegalStateException("The context is null");
}
Session session = context.getSession();
if (session == null) {
throw new... | class class_name[name] begin[{]
method[createConsumer, return_type[void], modifier[protected], parameter[context, messageSelector]] begin[{]
if[binary_operation[member[.context], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators... | Keyword[protected] Keyword[void] identifier[createConsumer] operator[SEP] identifier[ConsumerConnectionContext] identifier[context] , identifier[String] identifier[messageSelector] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] ope... |
public void addAttribute(Attribute attribute, Object value,
int beginIndex, int endIndex) {
if (attribute == null) {
throw new NullPointerException();
}
if (beginIndex < 0 || endIndex > length() || beginIndex >= endIndex) {
throw new IllegalArgumentException... | class class_name[name] begin[{]
method[addAttribute, return_type[void], modifier[public], parameter[attribute, value, beginIndex, endIndex]] begin[{]
if[binary_operation[member[.attribute], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, ... | Keyword[public] Keyword[void] identifier[addAttribute] operator[SEP] identifier[Attribute] identifier[attribute] , identifier[Object] identifier[value] , Keyword[int] identifier[beginIndex] , Keyword[int] identifier[endIndex] operator[SEP] {
Keyword[if] operator[SEP] identifier[attribute] operator[==] Other[n... |
public final Trace warn(Class<?> c, String message) {
return _trace.warn(c, message);
} | class class_name[name] begin[{]
method[warn, return_type[type[Trace]], modifier[final public], parameter[c, message]] begin[{]
return[call[_trace.warn, parameter[member[.c], member[.message]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Trace] identifier[warn] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[c] , identifier[String] identifier[message] operator[SEP] {
Keyword[return] identifier[_trace] operator[SEP] identifier[warn] operator[SEP] identifier[c] , identifier... |
public static <R> Mono<R> zip(Function<? super Object[], ? extends R> combinator, Mono<?>... monos) {
if (monos.length == 0) {
return empty();
}
if (monos.length == 1) {
return monos[0].map(d -> combinator.apply(new Object[]{d}));
}
return onAssembly(new MonoZip<>(false, combinator, monos));
} | class class_name[name] begin[{]
method[zip, return_type[type[Mono]], modifier[public static], parameter[combinator, monos]] begin[{]
if[binary_operation[member[monos.length], ==, literal[0]]] begin[{]
return[call[.empty, parameter[]]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[Mono] operator[<] identifier[R] operator[>] identifier[zip] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[Object] operator[SEP] operator[SEP] , operator[?] Keyword[extends] identifier[R] operator[>] ... |
protected void invokeDelegate(
RenderFilter delegate, RenderRequest request, RenderResponse response, FilterChain filterChain)
throws PortletException, IOException {
delegate.doFilter(request, response, filterChain);
} | class class_name[name] begin[{]
method[invokeDelegate, return_type[void], modifier[protected], parameter[delegate, request, response, filterChain]] begin[{]
call[delegate.doFilter, parameter[member[.request], member[.response], member[.filterChain]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[invokeDelegate] operator[SEP] identifier[RenderFilter] identifier[delegate] , identifier[RenderRequest] identifier[request] , identifier[RenderResponse] identifier[response] , identifier[FilterChain] identifier[filterChain] operator[SEP] Keyword[throws] identifier[PortletE... |
static int encodedBufferSize(int len, boolean breakLines) {
// Cast len to long to prevent overflow
long len43 = ((long) len << 2) / 3;
// Account for padding
long ret = (len43 + 3) & ~3;
if (breakLines) {
ret += len43 / MAX_LINE_LENGTH;
}
return re... | class class_name[name] begin[{]
method[encodedBufferSize, return_type[type[int]], modifier[static], parameter[len, breakLines]] begin[{]
local_variable[type[long], len43]
local_variable[type[long], ret]
if[member[.breakLines]] begin[{]
assign[member[.ret]... | Keyword[static] Keyword[int] identifier[encodedBufferSize] operator[SEP] Keyword[int] identifier[len] , Keyword[boolean] identifier[breakLines] operator[SEP] {
Keyword[long] identifier[len43] operator[=] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[len] operator[<<] Other[2] operator[SEP] ... |
public static HttpResponse request(HttpRequest request, String body, String contentType) {
return request.contentType(contentType).body(body).contentLength(body.length()).execute();
} | class class_name[name] begin[{]
method[request, return_type[type[HttpResponse]], modifier[public static], parameter[request, body, contentType]] begin[{]
return[call[request.contentType, parameter[member[.contentType]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[HttpResponse] identifier[request] operator[SEP] identifier[HttpRequest] identifier[request] , identifier[String] identifier[body] , identifier[String] identifier[contentType] operator[SEP] {
Keyword[return] identifier[request] operator[SEP] identifier[contentType] ope... |
@Override
protected ControllerEntityLinks createInstance() {
Collection<Class<?>> controllerTypes = new HashSet<>();
for (Class<?> controllerType : getBeanTypesWithAnnotation(annotation)) {
if (AnnotationUtils.findAnnotation(controllerType, ExposesResourceFor.class) != null) {
controllerTypes.add(controll... | class class_name[name] begin[{]
method[createInstance, return_type[type[ControllerEntityLinks]], modifier[protected], parameter[]] begin[{]
local_variable[type[Collection], controllerTypes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=M... | annotation[@] identifier[Override] Keyword[protected] identifier[ControllerEntityLinks] identifier[createInstance] operator[SEP] operator[SEP] {
identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[controllerTypes] operator[=] Keyword[new] identifier[Has... |
public int getIdByTag(String tag)
{
Integer value = (Integer) table.getValueByKey(tag);
if (value == null)
LoggerFactory.getDefaultLogger().error(
"** " + this.getClass().getName() + ": Tag '" + tag + "' is not defined. **");
return value.intValue();
} | class class_name[name] begin[{]
method[getIdByTag, return_type[type[int]], modifier[public], parameter[tag]] begin[{]
local_variable[type[Integer], value]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[LoggerFactory.getDefaultLogger, parameter[]]
... | Keyword[public] Keyword[int] identifier[getIdByTag] operator[SEP] identifier[String] identifier[tag] operator[SEP] {
identifier[Integer] identifier[value] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[table] operator[SEP] identifier[getValueByKey] operator[SEP] identifier[tag] operator[S... |
@Override
public void delete() {
LOGGER.debug("Deleting {}", this);
Path path = file.file().toPath();
if (Files.exists(path)) {
try {
Files.delete(file.file().toPath());
} catch (IOException e) {
}
}
} | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public], parameter[]] begin[{]
call[LOGGER.debug, parameter[literal["Deleting {}"], THIS[]]]
local_variable[type[Path], path]
if[call[Files.exists, parameter[member[.path]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[delete] operator[SEP] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[Path] identifier[path] operator[=] identifier[file] operator[S... |
public Object getObject(FactHandle handle) {
// the handle might have been disconnected, so reconnect if it has
if ( ((InternalFactHandle)handle).isDisconnected() ) {
handle = this.defaultEntryPoint.getObjectStore().reconnect( (InternalFactHandle)handle );
}
return this.defau... | class class_name[name] begin[{]
method[getObject, return_type[type[Object]], modifier[public], parameter[handle]] begin[{]
if[Cast(expression=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], na... | Keyword[public] identifier[Object] identifier[getObject] operator[SEP] identifier[FactHandle] identifier[handle] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[InternalFactHandle] operator[SEP] identifier[handle] operator[SEP] operator[SEP] identifier[isDisconnected] operator[SE... |
public static Map<?, ?> convertToMap(Collection<?> coll, String keyProperty, String valueProperty) {
Map<Object, Object> map = newHashMap();
for (Object obj : coll) {
Object key = PropertyUtils.getProperty(obj, keyProperty);
Object value = PropertyUtils.getProperty(obj, valueProperty);
if (nul... | class class_name[name] begin[{]
method[convertToMap, return_type[type[Map]], modifier[public static], parameter[coll, keyProperty, valueProperty]] begin[{]
local_variable[type[Map], map]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarator... | Keyword[public] Keyword[static] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[convertToMap] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[coll] , identifier[String] identifier[keyProperty] , identifier[String] identifier[valueProperty] operator[SEP... |
@com.fasterxml.jackson.annotation.JsonProperty("FieldName")
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
} | class class_name[name] begin[{]
method[setFieldName, return_type[void], modifier[public], parameter[fieldName]] begin[{]
assign[THIS[member[None.fieldName]], member[.fieldName]]
end[}]
END[}] | annotation[@] identifier[com] operator[SEP] identifier[fasterxml] operator[SEP] identifier[jackson] operator[SEP] identifier[annotation] operator[SEP] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setFieldName] operator[SEP] identifier[String] identifier[f... |
@Override
public void setHeader(String hdr, String value) {
if (null == value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "setHeader(" + hdr + ", null), removing header");
}
this.response.removeHeader(hdr);
} ... | class class_name[name] begin[{]
method[setHeader, return_type[void], modifier[public], parameter[hdr, value]] begin[{]
if[binary_operation[literal[null], ==, member[.value]]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setHeader] operator[SEP] identifier[String] identifier[hdr] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[value] operator[SEP] {
Keyword[if] operator[SEP]... |
public final static <T, R> Stream<R> flatMapOptional(final Stream<T> stream, final Function<? super T, Optional<? extends R>> fn) {
return stream.flatMap(in -> Streams.optionalToStream(fn.apply(in)));
} | class class_name[name] begin[{]
method[flatMapOptional, return_type[type[Stream]], modifier[final public static], parameter[stream, fn]] begin[{]
return[call[stream.flatMap, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=in, postfix_operat... | Keyword[public] Keyword[final] Keyword[static] operator[<] identifier[T] , identifier[R] operator[>] identifier[Stream] operator[<] identifier[R] operator[>] identifier[flatMapOptional] operator[SEP] Keyword[final] identifier[Stream] operator[<] identifier[T] operator[>] identifier[stream] , Keyword[final] identifier... |
public void loadForward(String query, Long afterSortKey, int limit, ListEngineDisplayLoadCallback<T> callback) {
storageActor.send(new AsyncStorageActor.LoadForward<T>(query, afterSortKey, limit, callback));
} | class class_name[name] begin[{]
method[loadForward, return_type[void], modifier[public], parameter[query, afterSortKey, limit, callback]] begin[{]
call[storageActor.send, parameter[ClassCreator(arguments=[MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[public] Keyword[void] identifier[loadForward] operator[SEP] identifier[String] identifier[query] , identifier[Long] identifier[afterSortKey] , Keyword[int] identifier[limit] , identifier[ListEngineDisplayLoadCallback] operator[<] identifier[T] operator[>] identifier[callback] operator[SEP] {
identifie... |
private void parseLine__singleLineMode(String line) throws SyntaxErrorException
{
// reset
setPropertyNameStart(POSITION__NOT_SET);
setPropertyNameEnd(POSITION__NOT_SET);
setRestOfLineStart(POSITION__NOT_SET);
int _nextStateIndex = 0;
State _currentState = null;
char[] _nextChar = new char[1];
for (i... | class class_name[name] begin[{]
method[parseLine__singleLineMode, return_type[void], modifier[private], parameter[line]] begin[{]
call[.setPropertyNameStart, parameter[member[.POSITION__NOT_SET]]]
call[.setPropertyNameEnd, parameter[member[.POSITION__NOT_SET]]]
c... | Keyword[private] Keyword[void] identifier[parseLine__singleLineMode] operator[SEP] identifier[String] identifier[line] operator[SEP] Keyword[throws] identifier[SyntaxErrorException] {
identifier[setPropertyNameStart] operator[SEP] identifier[POSITION__NOT_SET] operator[SEP] operator[SEP] identifier[setPropertyNa... |
private static IChemObjectBuilder findBuilder() {
if (BUILDER != null)
return BUILDER;
for (String name : new String[]{
"org.openscience.cdk.silent.SilentChemObjectBuilder",
"org.openscience.cdk.DefaultChemObjectBuilder"
}) {
try {
... | class class_name[name] begin[{]
method[findBuilder, return_type[type[IChemObjectBuilder]], modifier[private static], parameter[]] begin[{]
if[binary_operation[member[.BUILDER], !=, literal[null]]] begin[{]
return[member[.BUILDER]]
else begin[{]
None
end[}]
ForStatement(b... | Keyword[private] Keyword[static] identifier[IChemObjectBuilder] identifier[findBuilder] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[BUILDER] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[BUILDER] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[nam... |
public TResult queryForAll() {
TResult result = userDb.query(getTableName(), table.getColumnNames(),
null, null, null, null, null);
prepareResult(result);
return result;
} | class class_name[name] begin[{]
method[queryForAll, return_type[type[TResult]], modifier[public], parameter[]] begin[{]
local_variable[type[TResult], result]
call[.prepareResult, parameter[member[.result]]]
return[member[.result]]
end[}]
END[}] | Keyword[public] identifier[TResult] identifier[queryForAll] operator[SEP] operator[SEP] {
identifier[TResult] identifier[result] operator[=] identifier[userDb] operator[SEP] identifier[query] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] , identifier[table] operator[SEP] identifier[getColum... |
public static byte[] decryptWithPrivateKey(String base64PrivateKeyData, byte[] encryptedData,
String cipherTransformation)
throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException,
NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, IOExceptio... | class class_name[name] begin[{]
method[decryptWithPrivateKey, return_type[type[byte]], modifier[public static], parameter[base64PrivateKeyData, encryptedData, cipherTransformation]] begin[{]
local_variable[type[RSAPrivateKey], privateKey]
return[call[.decrypt, parameter[member[.privateKey], mem... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decryptWithPrivateKey] operator[SEP] identifier[String] identifier[base64PrivateKeyData] , Keyword[byte] operator[SEP] operator[SEP] identifier[encryptedData] , identifier[String] identifier[cipherTransformation] operator[SEP] Keywor... |
public synchronized @Nullable CloseableReference<Bitmap> getDecodedFrame(int index) {
if (mDecodedFrames != null) {
return CloseableReference.cloneOrNull(mDecodedFrames.get(index));
}
return null;
} | class class_name[name] begin[{]
method[getDecodedFrame, return_type[type[CloseableReference]], modifier[synchronized public], parameter[index]] begin[{]
if[binary_operation[member[.mDecodedFrames], !=, literal[null]]] begin[{]
return[call[CloseableReference.cloneOrNull, parameter[ca... | Keyword[public] Keyword[synchronized] annotation[@] identifier[Nullable] identifier[CloseableReference] operator[<] identifier[Bitmap] operator[>] identifier[getDecodedFrame] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] identifier[mDecodedFrames] operator[!=] Other[null]... |
public Bundle withSupportedPlatforms(InstancePlatform... supportedPlatforms) {
java.util.ArrayList<String> supportedPlatformsCopy = new java.util.ArrayList<String>(supportedPlatforms.length);
for (InstancePlatform value : supportedPlatforms) {
supportedPlatformsCopy.add(value.toString());
... | class class_name[name] begin[{]
method[withSupportedPlatforms, return_type[type[Bundle]], modifier[public], parameter[supportedPlatforms]] begin[{]
local_variable[type[java], supportedPlatformsCopy]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodIn... | Keyword[public] identifier[Bundle] identifier[withSupportedPlatforms] operator[SEP] identifier[InstancePlatform] operator[...] identifier[supportedPlatforms] operator[SEP] {
identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[s... |
@Override
void completeCandidates(CommandContext ctx, String buffer, int cursor, List<String> candidates) {
if (candidates.isEmpty()) {
if (buffer.startsWith("\"") && buffer.length() >= 2) {
// Quotes are added back by super class.
buffer = buffer.substring(1);
... | class class_name[name] begin[{]
method[completeCandidates, return_type[void], modifier[default], parameter[ctx, buffer, cursor, candidates]] begin[{]
if[call[candidates.isEmpty, parameter[]]] begin[{]
if[binary_operation[call[buffer.startsWith, parameter[literal["\""]]],... | annotation[@] identifier[Override] Keyword[void] identifier[completeCandidates] operator[SEP] identifier[CommandContext] identifier[ctx] , identifier[String] identifier[buffer] , Keyword[int] identifier[cursor] , identifier[List] operator[<] identifier[String] operator[>] identifier[candidates] operator[SEP] {
... |
public static boolean isPresentAll(Optional<?>... optionals) {
for (Optional<?> optional : optionals)
if (!optional.isPresent())
return false;
return true;
} | class class_name[name] begin[{]
method[isPresentAll, return_type[type[boolean]], modifier[public static], parameter[optionals]] begin[{]
ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operators=['!'], qualifier=optional, selectors=[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isPresentAll] operator[SEP] identifier[Optional] operator[<] operator[?] operator[>] operator[...] identifier[optionals] operator[SEP] {
Keyword[for] operator[SEP] identifier[Optional] operator[<] operator[?] operator[>] identifier[optional] operator[:]... |
public static Update updatePojo(Object pojo) {
Objects.requireNonNull(pojo, "Pojo cannot be null");
ObjectNode set = JsonNodeFactory.instance.objectNode();
JsonNode pojoAsJson = JSON.toJsonNode(pojo);
if (!(pojoAsJson instanceof ObjectNode)) {
throw new IllegalArgumentException(pojo+" i... | class class_name[name] begin[{]
method[updatePojo, return_type[type[Update]], modifier[public static], parameter[pojo]] begin[{]
call[Objects.requireNonNull, parameter[member[.pojo], literal["Pojo cannot be null"]]]
local_variable[type[ObjectNode], set]
local_variable[type[JsonN... | Keyword[public] Keyword[static] identifier[Update] identifier[updatePojo] operator[SEP] identifier[Object] identifier[pojo] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[pojo] , literal[String] operator[SEP] operator[SEP] identifier[ObjectNode] identifier[... |
protected static byte[] getData(byte[] data, int size) {
if (data == null) {
return NO_DATA;
}
if (data.length <= size) {
return data;
}
byte[] newData = new byte[size];
System.arraycopy(data, 0, newData, 0, size);
return newData;
... | class class_name[name] begin[{]
method[getData, return_type[type[byte]], modifier[static protected], parameter[data, size]] begin[{]
if[binary_operation[member[.data], ==, literal[null]]] begin[{]
return[member[.NO_DATA]]
else begin[{]
None
end[}]
if[... | Keyword[protected] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getData] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[size] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[SEP] {
... |
public PortletPreferencesType<PortletType<T>> getOrCreatePortletPreferences()
{
Node node = childNode.getOrCreate("portlet-preferences");
PortletPreferencesType<PortletType<T>> portletPreferences = new PortletPreferencesTypeImpl<PortletType<T>>(this, "portlet-preferences", childNode, node);
return ... | class class_name[name] begin[{]
method[getOrCreatePortletPreferences, return_type[type[PortletPreferencesType]], modifier[public], parameter[]] begin[{]
local_variable[type[Node], node]
local_variable[type[PortletPreferencesType], portletPreferences]
return[member[.portletPreferences]]
... | Keyword[public] identifier[PortletPreferencesType] operator[<] identifier[PortletType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreatePortletPreferences] operator[SEP] operator[SEP] {
identifier[Node] identifier[node] operator[=] identifier[childNode] operator[SEP] identifier[getOrCreate... |
public static void scale(InputStream srcStream, OutputStream destStream, int width, int height, Color fixedColor) throws IORuntimeException {
scale(read(srcStream), getImageOutputStream(destStream), width, height, fixedColor);
} | class class_name[name] begin[{]
method[scale, return_type[void], modifier[public static], parameter[srcStream, destStream, width, height, fixedColor]] begin[{]
call[.scale, parameter[call[.read, parameter[member[.srcStream]]], call[.getImageOutputStream, parameter[member[.destStream]]], member[... | Keyword[public] Keyword[static] Keyword[void] identifier[scale] operator[SEP] identifier[InputStream] identifier[srcStream] , identifier[OutputStream] identifier[destStream] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[Color] identifier[fixedColor] operator[SEP] Keyword[throws] id... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.