code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static void assertNoWorkspacesOpen(String msg, boolean allowScopedOut) throws ND4JWorkspaceException {
if (Nd4j.getWorkspaceManager().anyWorkspaceActiveForCurrentThread()) {
MemoryWorkspace currWs = Nd4j.getMemoryManager().getCurrentWorkspace();
if(allowScopedOut && (currWs == nu... | class class_name[name] begin[{]
method[assertNoWorkspacesOpen, return_type[void], modifier[public static], parameter[msg, allowScopedOut]] begin[{]
if[call[Nd4j.getWorkspaceManager, parameter[]]] begin[{]
local_variable[type[MemoryWorkspace], currWs]
if[binar... | Keyword[public] Keyword[static] Keyword[void] identifier[assertNoWorkspacesOpen] operator[SEP] identifier[String] identifier[msg] , Keyword[boolean] identifier[allowScopedOut] operator[SEP] Keyword[throws] identifier[ND4JWorkspaceException] {
Keyword[if] operator[SEP] identifier[Nd4j] operator[SEP] identifier[g... |
public void remove(final Long canalId) {
Assert.assertNotNull(canalId);
transactionTemplate.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus status) {
try {
Canal canal = findById(canalId);
... | class class_name[name] begin[{]
method[remove, return_type[void], modifier[public], parameter[canalId]] begin[{]
call[Assert.assertNotNull, parameter[member[.canalId]]]
call[transactionTemplate.execute, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[],... | Keyword[public] Keyword[void] identifier[remove] operator[SEP] Keyword[final] identifier[Long] identifier[canalId] operator[SEP] {
identifier[Assert] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[canalId] operator[SEP] operator[SEP] identifier[transactionTemplate] operator[SEP] identifier[exec... |
private void processToUnicode(){
PdfObject toUni = fontDic.get(PdfName.TOUNICODE);
if (toUni != null){
try {
byte[] touni = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
CMapParser cmapParser = new... | class class_name[name] begin[{]
method[processToUnicode, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[PdfObject], toUni]
if[binary_operation[member[.toUni], !=, literal[null]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotatio... | Keyword[private] Keyword[void] identifier[processToUnicode] operator[SEP] operator[SEP] {
identifier[PdfObject] identifier[toUni] operator[=] identifier[fontDic] operator[SEP] identifier[get] operator[SEP] identifier[PdfName] operator[SEP] identifier[TOUNICODE] operator[SEP] operator[SEP] Keyword[if] operator[SE... |
public Collection<XAttribute> getDefinedAttributes() {
if (allAttributes == null) {
// create collection on demand
allAttributes = new HashSet<XAttribute>();
allAttributes.addAll(getLogAttributes());
allAttributes.addAll(getTraceAttributes());
allAttributes.addAll(getEventAttributes());
allAttribute... | class class_name[name] begin[{]
method[getDefinedAttributes, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.allAttributes], ==, literal[null]]] begin[{]
assign[member[.allAttributes], ClassCreator(arguments=[], body=Non... | Keyword[public] identifier[Collection] operator[<] identifier[XAttribute] operator[>] identifier[getDefinedAttributes] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[allAttributes] operator[==] Other[null] operator[SEP] {
identifier[allAttributes] operator[=] Keyword[new] identifie... |
public ApiResponse<ApiSuccessResponse> submitFeedbackWithHttpInfo(SubmitFeedbackData submitFeedbackData) throws ApiException {
com.squareup.okhttp.Call call = submitFeedbackValidateBeforeCall(submitFeedbackData, null, null);
Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
... | class class_name[name] begin[{]
method[submitFeedbackWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[submitFeedbackData]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
return[call[apiClient.execute, parameter[member[.ca... | Keyword[public] identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[submitFeedbackWithHttpInfo] operator[SEP] identifier[SubmitFeedbackData] identifier[submitFeedbackData] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[com] operator[SEP] identifier[squar... |
@Override
public UpdateResourceServerResult updateResourceServer(UpdateResourceServerRequest request) {
request = beforeClientExecution(request);
return executeUpdateResourceServer(request);
} | class class_name[name] begin[{]
method[updateResourceServer, return_type[type[UpdateResourceServerResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdateResourceServer, parame... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateResourceServerResult] identifier[updateResourceServer] operator[SEP] identifier[UpdateResourceServerRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
public static ClientOptions of(ClientOptions baseOptions, Iterable<ClientOptionValue<?>> options) {
// TODO(trustin): Reduce the cost of creating a derived ClientOptions.
requireNonNull(baseOptions, "baseOptions");
requireNonNull(options, "options");
return new ClientOptions(baseOptions,... | class class_name[name] begin[{]
method[of, return_type[type[ClientOptions]], modifier[public static], parameter[baseOptions, options]] begin[{]
call[.requireNonNull, parameter[member[.baseOptions], literal["baseOptions"]]]
call[.requireNonNull, parameter[member[.options], litera... | Keyword[public] Keyword[static] identifier[ClientOptions] identifier[of] operator[SEP] identifier[ClientOptions] identifier[baseOptions] , identifier[Iterable] operator[<] identifier[ClientOptionValue] operator[<] operator[?] operator[>] operator[>] identifier[options] operator[SEP] {
identifier[requireNonNull]... |
public void disable(String plugin) throws RabbitMqCommandException {
String[] args = {"disable", plugin};
String executionErrorMessage = "Error while disabling plugin '" + plugin + "'";
String unexpectedExitCodeMessage = "Disabling of plugin '" + plugin + "' failed with exit code: ";
getProcessResult(a... | class class_name[name] begin[{]
method[disable, return_type[void], modifier[public], parameter[plugin]] begin[{]
local_variable[type[String], args]
local_variable[type[String], executionErrorMessage]
local_variable[type[String], unexpectedExitCodeMessage]
call[.getProces... | Keyword[public] Keyword[void] identifier[disable] operator[SEP] identifier[String] identifier[plugin] operator[SEP] Keyword[throws] identifier[RabbitMqCommandException] {
identifier[String] operator[SEP] operator[SEP] identifier[args] operator[=] {
literal[String] , identifier[plugin]
} operat... |
private TreeEntry<E> getEntry(Entry<?> entry) {
TreeEntry<E> t = root;
while (t != null) {
int cmp = compareLongs(getLow(entry), t.low);
if (cmp == 0)
cmp = compareLongs(getHigh(entry), t.high);
if (cmp == 0)
cmp = entry.hashCode() - t.... | class class_name[name] begin[{]
method[getEntry, return_type[type[TreeEntry]], modifier[private], parameter[entry]] begin[{]
local_variable[type[TreeEntry], t]
while[binary_operation[member[.t], !=, literal[null]]] begin[{]
local_variable[type[int], cmp]
... | Keyword[private] identifier[TreeEntry] operator[<] identifier[E] operator[>] identifier[getEntry] operator[SEP] identifier[Entry] operator[<] operator[?] operator[>] identifier[entry] operator[SEP] {
identifier[TreeEntry] operator[<] identifier[E] operator[>] identifier[t] operator[=] identifier[root] operator[S... |
private static String getClassSignature(TypeElement element) throws IOException
{
Result sb = new Result();
formalTypeParameters(sb, element.getTypeParameters());
TypeMirror superclass = element.getSuperclass();
// SuperclassSignature:
// ClassTypeSignature
if (su... | class class_name[name] begin[{]
method[getClassSignature, return_type[type[String]], modifier[private static], parameter[element]] begin[{]
local_variable[type[Result], sb]
call[.formalTypeParameters, parameter[member[.sb], call[element.getTypeParameters, parameter[]]]]
local_va... | Keyword[private] Keyword[static] identifier[String] identifier[getClassSignature] operator[SEP] identifier[TypeElement] identifier[element] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Result] identifier[sb] operator[=] Keyword[new] identifier[Result] operator[SEP] operator[SEP] operator[SE... |
public void openKeyStore(Path path, String keyStoreType, String keyStorePassword) throws IOException, NoSuchAlgorithmException, CertificateException, KeyStoreException {
this.keystore = KeyStore.getInstance(keyStoreType);
if (path!=null) {
InputStream keyStoreInputStream = ffr.openFile(path);
this.keystore.lo... | class class_name[name] begin[{]
method[openKeyStore, return_type[void], modifier[public], parameter[path, keyStoreType, keyStorePassword]] begin[{]
assign[THIS[member[None.keystore]], call[KeyStore.getInstance, parameter[member[.keyStoreType]]]]
if[binary_operation[member[.path]... | Keyword[public] Keyword[void] identifier[openKeyStore] operator[SEP] identifier[Path] identifier[path] , identifier[String] identifier[keyStoreType] , identifier[String] identifier[keyStorePassword] operator[SEP] Keyword[throws] identifier[IOException] , identifier[NoSuchAlgorithmException] , identifier[Certificate... |
@Override
protected com.ibm.ws.webcontainer.srt.SRTConnectionContext getConnectionContext() {
// SRTConnectionContext srt = _threadLocal.get();
// if (srt == null) {
// srt = new SRTConnectionContext();
// _threadLocal.set(srt);
// }
// return srt;
/*
... | class class_name[name] begin[{]
method[getConnectionContext, return_type[type[com]], modifier[protected], parameter[]] begin[{]
return[call[connContextPool.get, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[webcontainer] operator[SEP] identifier[srt] operator[SEP] identifier[SRTConnectionContext] identifier[getConnectionContext] operator[SEP] operator[SEP] {
Keywo... |
protected void writeRequestHeaders(HttpState state, HttpConnection conn)
throws IOException, HttpException {
LOG.trace("enter HttpMethodBase.writeRequestHeaders(HttpState,"
+ "HttpConnection)");
addRequestHeaders(state, conn);
String charset = getParams().getHttpElementCharset()... | class class_name[name] begin[{]
method[writeRequestHeaders, return_type[void], modifier[protected], parameter[state, conn]] begin[{]
call[LOG.trace, parameter[binary_operation[literal["enter HttpMethodBase.writeRequestHeaders(HttpState,"], +, literal["HttpConnection)"]]]]
call[.... | Keyword[protected] Keyword[void] identifier[writeRequestHeaders] operator[SEP] identifier[HttpState] identifier[state] , identifier[HttpConnection] identifier[conn] operator[SEP] Keyword[throws] identifier[IOException] , identifier[HttpException] {
identifier[LOG] operator[SEP] identifier[trace] operator[SEP] ... |
public static List<SecStrucState> parseFile(String dsspPath,
Structure structure, boolean assign)
throws IOException, StructureException {
File file = new File(dsspPath);
Reader read = new FileReader(file);
BufferedReader reader = new BufferedReader(read);
return generalParse(reader, structure, assign)... | class class_name[name] begin[{]
method[parseFile, return_type[type[List]], modifier[public static], parameter[dsspPath, structure, assign]] begin[{]
local_variable[type[File], file]
local_variable[type[Reader], read]
local_variable[type[BufferedReader], reader]
return[call[.gene... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[SecStrucState] operator[>] identifier[parseFile] operator[SEP] identifier[String] identifier[dsspPath] , identifier[Structure] identifier[structure] , Keyword[boolean] identifier[assign] operator[SEP] Keyword[throws] identifier[IOException] , id... |
Object decodeProperty(MsgDestEncodingUtilsImpl.PropertyInputStream stream) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "decodeProperty", stream);
// Get the String value then strip the first character, which is always a '*'
String value = (St... | class class_name[name] begin[{]
method[decodeProperty, return_type[type[Object]], modifier[default], parameter[stream]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter... | identifier[Object] identifier[decodeProperty] operator[SEP] identifier[MsgDestEncodingUtilsImpl] operator[SEP] identifier[PropertyInputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnab... |
private static List getUrlClassLoaderClasspathComponents(URLClassLoader ucl)
{
List components = new ArrayList();
URL[] urls = new URL[0];
// Workaround for running on JBoss with UnifiedClassLoader3 usage
// We need to invoke getClasspath() method instead of getURLs()
if (u... | class class_name[name] begin[{]
method[getUrlClassLoaderClasspathComponents, return_type[type[List]], modifier[private static], parameter[ucl]] begin[{]
local_variable[type[List], components]
local_variable[type[URL], urls]
if[call[ucl.getClass, parameter[]]] begin[{]
... | Keyword[private] Keyword[static] identifier[List] identifier[getUrlClassLoaderClasspathComponents] operator[SEP] identifier[URLClassLoader] identifier[ucl] operator[SEP] {
identifier[List] identifier[components] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[U... |
private void menuRedoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuRedoActionPerformed
final TabTitle title = this.getFocusedTab();
if (title != null) {
this.menuRedo.setEnabled(title.getProvider().redo());
this.menuUndo.setEnabled(title.getProvider().isUndo());
}
} | class class_name[name] begin[{]
method[menuRedoActionPerformed, return_type[void], modifier[private], parameter[evt]] begin[{]
local_variable[type[TabTitle], title]
if[binary_operation[member[.title], !=, literal[null]]] begin[{]
THIS[member[None.menuRedo]call[No... | Keyword[private] Keyword[void] identifier[menuRedoActionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
Keyword[final] identifier[TabTitle] identifier[title] operator[=] Keyword[this] ope... |
public static MethodAnnotation convertMethodAnnotation(ClassNameRewriter classNameRewriter, MethodAnnotation annotation) {
if (classNameRewriter != IdentityClassNameRewriter.instance()) {
annotation = new MethodAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()),
... | class class_name[name] begin[{]
method[convertMethodAnnotation, return_type[type[MethodAnnotation]], modifier[public static], parameter[classNameRewriter, annotation]] begin[{]
if[binary_operation[member[.classNameRewriter], !=, call[IdentityClassNameRewriter.instance, parameter[]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[MethodAnnotation] identifier[convertMethodAnnotation] operator[SEP] identifier[ClassNameRewriter] identifier[classNameRewriter] , identifier[MethodAnnotation] identifier[annotation] operator[SEP] {
Keyword[if] operator[SEP] identifier[classNameRewriter] operator[!=] id... |
@Override
public EClass getListOfIfcNormalisedRatioMeasure() {
if (listOfIfcNormalisedRatioMeasureEClass == null) {
listOfIfcNormalisedRatioMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(1177);
}
return listOfIfcNormalisedRatioMeasureECla... | class class_name[name] begin[{]
method[getListOfIfcNormalisedRatioMeasure, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.listOfIfcNormalisedRatioMeasureEClass], ==, literal[null]]] begin[{]
assign[member[.listOfIfcNormalis... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getListOfIfcNormalisedRatioMeasure] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[listOfIfcNormalisedRatioMeasureEClass] operator[==] Other[null] operator[SEP] {
identifier[listOfIfcNormalisedRatioMea... |
Manifest createBootJarManifest() {
Manifest manifest = new Manifest();
Attributes manifestAttributes = manifest.getMainAttributes();
manifestAttributes.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0");
manifestAttributes.putValue("Created-By", "Liberty Monitoring Extender");... | class class_name[name] begin[{]
method[createBootJarManifest, return_type[type[Manifest]], modifier[default], parameter[]] begin[{]
local_variable[type[Manifest], manifest]
local_variable[type[Attributes], manifestAttributes]
call[manifestAttributes.putValue, parameter[call[Attr... | identifier[Manifest] identifier[createBootJarManifest] operator[SEP] operator[SEP] {
identifier[Manifest] identifier[manifest] operator[=] Keyword[new] identifier[Manifest] operator[SEP] operator[SEP] operator[SEP] identifier[Attributes] identifier[manifestAttributes] operator[=] identifier[manifest] operator[SE... |
public Rule ImageAlt(){
return Sequence(
'[',
checkForParsingTimeout(),
push(new SuperNode()),
ZeroOrMore(TestNot(']'), NonAutoLinkInline(), addAsChild()),
']'
);
} | class class_name[name] begin[{]
method[ImageAlt, return_type[type[Rule]], modifier[public], parameter[]] begin[{]
return[call[.Sequence, parameter[literal['['], call[.checkForParsingTimeout, parameter[]], call[.push, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postf... | Keyword[public] identifier[Rule] identifier[ImageAlt] operator[SEP] operator[SEP] {
Keyword[return] identifier[Sequence] operator[SEP] literal[String] , identifier[checkForParsingTimeout] operator[SEP] operator[SEP] , identifier[push] operator[SEP] Keyword[new] identifier[SuperNode] operator[SEP] operator[SEP]... |
protected void valueChanged()
{
String newValue = fViewer.getDocument().get();
if (!newValue.equals(fOldValue))
{
fOldValue = newValue;
}
refreshValidState();
} | class class_name[name] begin[{]
method[valueChanged, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[String], newValue]
if[call[newValue.equals, parameter[member[.fOldValue]]]] begin[{]
assign[member[.fOldValue], member[.newValue... | Keyword[protected] Keyword[void] identifier[valueChanged] operator[SEP] operator[SEP] {
identifier[String] identifier[newValue] operator[=] identifier[fViewer] operator[SEP] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] ope... |
public static Object getValue(Object tree, Map context, Object root)
throws OgnlException
{
return getValue(tree, context, root, null);
} | class class_name[name] begin[{]
method[getValue, return_type[type[Object]], modifier[public static], parameter[tree, context, root]] begin[{]
return[call[.getValue, parameter[member[.tree], member[.context], member[.root], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Object] identifier[getValue] operator[SEP] identifier[Object] identifier[tree] , identifier[Map] identifier[context] , identifier[Object] identifier[root] operator[SEP] Keyword[throws] identifier[OgnlException] {
Keyword[return] identifier[getValue] operator[SEP] iden... |
private void invokeChainedMethod(Event event) {
Queue<MethodWrapper> queue = conversationQueueMap.get(event.getSender().getId());
if (queue != null && !queue.isEmpty()) {
MethodWrapper methodWrapper = queue.peek();
try {
EventType[] eventTypes = methodWrapper.ge... | class class_name[name] begin[{]
method[invokeChainedMethod, return_type[void], modifier[private], parameter[event]] begin[{]
local_variable[type[Queue], queue]
if[binary_operation[binary_operation[member[.queue], !=, literal[null]], &&, call[queue.isEmpty, parameter[]]]] begin[{]
... | Keyword[private] Keyword[void] identifier[invokeChainedMethod] operator[SEP] identifier[Event] identifier[event] operator[SEP] {
identifier[Queue] operator[<] identifier[MethodWrapper] operator[>] identifier[queue] operator[=] identifier[conversationQueueMap] operator[SEP] identifier[get] operator[SEP] identifie... |
public boolean removeAll(Collection<?> c) {
// Override AbstractSet version to avoid unnecessary call to size()
boolean modified = false;
for (Object e : c)
if (remove(e))
modified = true;
return modified;
} | class class_name[name] begin[{]
method[removeAll, return_type[type[boolean]], modifier[public], parameter[c]] begin[{]
local_variable[type[boolean], modified]
ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[],... | Keyword[public] Keyword[boolean] identifier[removeAll] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[c] operator[SEP] {
Keyword[boolean] identifier[modified] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[e] operator[:] i... |
public Datapoint withExtendedStatistics(java.util.Map<String, Double> extendedStatistics) {
setExtendedStatistics(extendedStatistics);
return this;
} | class class_name[name] begin[{]
method[withExtendedStatistics, return_type[type[Datapoint]], modifier[public], parameter[extendedStatistics]] begin[{]
call[.setExtendedStatistics, parameter[member[.extendedStatistics]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Datapoint] identifier[withExtendedStatistics] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Double] operator[>] identifier[extendedStatistics] operator[SEP] {
identifier[setExtendedStatistics] op... |
@InService(TableWriterService.class)
public void writePage(Page page,
SegmentStream sOut,
long oldSequence,
int saveLength,
int saveTail,
int sequenceWrite,
Result<Integer> ... | class class_name[name] begin[{]
method[writePage, return_type[void], modifier[public], parameter[page, sOut, oldSequence, saveLength, saveTail, sequenceWrite, result]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[],... | annotation[@] identifier[InService] operator[SEP] identifier[TableWriterService] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[void] identifier[writePage] operator[SEP] identifier[Page] identifier[page] , identifier[SegmentStream] identifier[sOut] , Keyword[long] identifier[oldSequence] , Keywor... |
public static HttpResponse execute(HttpRequestBase request) throws IOException {
Assert.notNull(request, "Missing request!");
HttpClient client = HttpClientBuilder.create().setRedirectStrategy(new DefaultRedirectStrategy()).build();
return client.execute(request);
} | class class_name[name] begin[{]
method[execute, return_type[type[HttpResponse]], modifier[public static], parameter[request]] begin[{]
call[Assert.notNull, parameter[member[.request], literal["Missing request!"]]]
local_variable[type[HttpClient], client]
return[call[client.execu... | Keyword[public] Keyword[static] identifier[HttpResponse] identifier[execute] operator[SEP] identifier[HttpRequestBase] identifier[request] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[request] , literal[String] operator[SEP... |
public Observable<CertificateBundle> updateCertificateAsync(String vaultBaseUrl, String certificateName, String certificateVersion, CertificatePolicy certificatePolicy, CertificateAttributes certificateAttributes, Map<String, String> tags) {
return updateCertificateWithServiceResponseAsync(vaultBaseUrl, certifi... | class class_name[name] begin[{]
method[updateCertificateAsync, return_type[type[Observable]], modifier[public], parameter[vaultBaseUrl, certificateName, certificateVersion, certificatePolicy, certificateAttributes, tags]] begin[{]
return[call[.updateCertificateWithServiceResponseAsync, parameter[member... | Keyword[public] identifier[Observable] operator[<] identifier[CertificateBundle] operator[>] identifier[updateCertificateAsync] operator[SEP] identifier[String] identifier[vaultBaseUrl] , identifier[String] identifier[certificateName] , identifier[String] identifier[certificateVersion] , identifier[CertificatePolicy... |
protected void handleComputeFields(int julianDay) {
long d = julianDay - 347997;
long m = (d * DAY_PARTS) / MONTH_PARTS; // Months (approx)
int year = (int)((19 * m + 234) / 235) + 1; // Years (approx)
long ys = startOfYear(year); // 1st day of year
... | class class_name[name] begin[{]
method[handleComputeFields, return_type[void], modifier[protected], parameter[julianDay]] begin[{]
local_variable[type[long], d]
local_variable[type[long], m]
local_variable[type[int], year]
local_variable[type[long], ys]
local_variable[ty... | Keyword[protected] Keyword[void] identifier[handleComputeFields] operator[SEP] Keyword[int] identifier[julianDay] operator[SEP] {
Keyword[long] identifier[d] operator[=] identifier[julianDay] operator[-] Other[347997] operator[SEP] Keyword[long] identifier[m] operator[=] operator[SEP] identifier[d] operator[*] i... |
public void setLongdesc(String longdesc) {
_imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.LONGDESC, longdesc);
} | class class_name[name] begin[{]
method[setLongdesc, return_type[void], modifier[public], parameter[longdesc]] begin[{]
call[_imageState.registerAttribute, parameter[member[AbstractHtmlState.ATTR_GENERAL], member[HtmlConstants.LONGDESC], member[.longdesc]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setLongdesc] operator[SEP] identifier[String] identifier[longdesc] operator[SEP] {
identifier[_imageState] operator[SEP] identifier[registerAttribute] operator[SEP] identifier[AbstractHtmlState] operator[SEP] identifier[ATTR_GENERAL] , identifier[HtmlConstants] operator[... |
public boolean authenticate(String username, String password) throws Exception
{
Session session = service.getStorageSession();
try
{
return authenticate(session, username, password, null);
}
finally
{
session.logout();
}
} | class class_name[name] begin[{]
method[authenticate, return_type[type[boolean]], modifier[public], parameter[username, password]] begin[{]
local_variable[type[Session], session]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_op... | Keyword[public] Keyword[boolean] identifier[authenticate] operator[SEP] identifier[String] identifier[username] , identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Session] identifier[session] operator[=] identifier[service] operator[SEP] identifier[getStor... |
private String uploadSliceControl(UploadSliceFileRequest request) throws AbstractCosException {
String url = buildUrl(request);
long signExpired = System.currentTimeMillis() / 1000 + this.config.getSignExpired();
String sign = Sign.getPeriodEffectiveSign(request.getBucketName(), request.getCosPath(), this.cred, s... | class class_name[name] begin[{]
method[uploadSliceControl, return_type[type[String]], modifier[private], parameter[request]] begin[{]
local_variable[type[String], url]
local_variable[type[long], signExpired]
local_variable[type[String], sign]
local_variable[type[long], fileSize]... | Keyword[private] identifier[String] identifier[uploadSliceControl] operator[SEP] identifier[UploadSliceFileRequest] identifier[request] operator[SEP] Keyword[throws] identifier[AbstractCosException] {
identifier[String] identifier[url] operator[=] identifier[buildUrl] operator[SEP] identifier[request] operator[S... |
String addDefaultExtension(String filename) {
StringBuffer newFileName = new StringBuffer(filename);
String ext = "card";
newFileName.append("."); //$NON-NLS-1$
newFileName.append(ext);
return newFileName.toString();
} | class class_name[name] begin[{]
method[addDefaultExtension, return_type[type[String]], modifier[default], parameter[filename]] begin[{]
local_variable[type[StringBuffer], newFileName]
local_variable[type[String], ext]
call[newFileName.append, parameter[literal["."]]]
... | identifier[String] identifier[addDefaultExtension] operator[SEP] identifier[String] identifier[filename] operator[SEP] {
identifier[StringBuffer] identifier[newFileName] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[filename] operator[SEP] operator[SEP] identifier[String] identifier[... |
public void addDefaultKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass) {
config.addDefaultKryoSerializer(type, serializerClass);
} | class class_name[name] begin[{]
method[addDefaultKryoSerializer, return_type[void], modifier[public], parameter[type, serializerClass]] begin[{]
call[config.addDefaultKryoSerializer, parameter[member[.type], member[.serializerClass]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addDefaultKryoSerializer] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Serializer] operator[<] operator[?] operator[>] operator[>] identifier[serializerClass] operato... |
public static String replaceMap(String input, Map map, boolean ignoreCase) throws PageException {
return replaceMap(input, map, ignoreCase, true);
} | class class_name[name] begin[{]
method[replaceMap, return_type[type[String]], modifier[public static], parameter[input, map, ignoreCase]] begin[{]
return[call[.replaceMap, parameter[member[.input], member[.map], member[.ignoreCase], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[replaceMap] operator[SEP] identifier[String] identifier[input] , identifier[Map] identifier[map] , Keyword[boolean] identifier[ignoreCase] operator[SEP] Keyword[throws] identifier[PageException] {
Keyword[return] identifier[replaceMap] operator[SEP]... |
@Override
protected void emitStartDocument() {
try {
if (mSerializeXMLDeclaration) {
write("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
}
if (mSerializeRest) {
write("<rest:sequence xmlns:rest=\"REST\"><rest:item>");
... | class class_name[name] begin[{]
method[emitStartDocument, return_type[void], modifier[protected], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=MemberReference(member=mSerializeXMLDeclaration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, l... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[emitStartDocument] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[mSerializeXMLDeclaration] operator[SEP] {
identifier[write] operator[SEP] literal[String] operator[SEP] ope... |
private boolean casNext(Node<E> cmp, Node<E> val) {
return compareAndSet(cmp, val);
} | class class_name[name] begin[{]
method[casNext, return_type[type[boolean]], modifier[private], parameter[cmp, val]] begin[{]
return[call[.compareAndSet, parameter[member[.cmp], member[.val]]]]
end[}]
END[}] | Keyword[private] Keyword[boolean] identifier[casNext] operator[SEP] identifier[Node] operator[<] identifier[E] operator[>] identifier[cmp] , identifier[Node] operator[<] identifier[E] operator[>] identifier[val] operator[SEP] {
Keyword[return] identifier[compareAndSet] operator[SEP] identifier[cmp] , identifie... |
private void consumeNonExecutePrefix()
{
// fast forward through the leading whitespace
nextNonWhitespace(true);
pos--;
if (pos + NON_EXECUTE_PREFIX.length > limit && !fillBuffer(NON_EXECUTE_PREFIX.length)) {
return;
}
for (int i = 0; i < NON_EXECUTE_PREFIX.length; i++) {
if (buf... | class class_name[name] begin[{]
method[consumeNonExecutePrefix, return_type[void], modifier[private], parameter[]] begin[{]
call[.nextNonWhitespace, parameter[literal[true]]]
member[.pos]
if[binary_operation[binary_operation[binary_operation[member[.pos], +, memb... | Keyword[private] Keyword[void] identifier[consumeNonExecutePrefix] operator[SEP] operator[SEP] {
identifier[nextNonWhitespace] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[pos] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[+] identifier[NON_EXECUTE_PREFIX]... |
@Nullable
public static String getFromLastExcl (@Nullable final String sStr, final char cSearch)
{
return _getFromLast (sStr, cSearch, false);
} | class class_name[name] begin[{]
method[getFromLastExcl, return_type[type[String]], modifier[public static], parameter[sStr, cSearch]] begin[{]
return[call[._getFromLast, parameter[member[.sStr], member[.cSearch], literal[false]]]]
end[}]
END[}] | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getFromLastExcl] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sStr] , Keyword[final] Keyword[char] identifier[cSearch] operator[SEP] {
Keyword[return] identifier[_get... |
public Intent build() {
Intent filePicker = new Intent(mContext, useMaterial ? FilePicker.class : FilePickerActivity.class);
filePicker.putExtra(FilePicker.SCOPE, mScope);
filePicker.putExtra(FilePicker.REQUEST, requestCode);
filePicker.putExtra(FilePicker.INTENT_EXTRA_COLOR_ID, color);
... | class class_name[name] begin[{]
method[build, return_type[type[Intent]], modifier[public], parameter[]] begin[{]
local_variable[type[Intent], filePicker]
call[filePicker.putExtra, parameter[member[FilePicker.SCOPE], member[.mScope]]]
call[filePicker.putExtra, parameter[m... | Keyword[public] identifier[Intent] identifier[build] operator[SEP] operator[SEP] {
identifier[Intent] identifier[filePicker] operator[=] Keyword[new] identifier[Intent] operator[SEP] identifier[mContext] , identifier[useMaterial] operator[?] identifier[FilePicker] operator[SEP] Keyword[class] operator[:] ident... |
public double randNormal(double mean, double standardDeviation) {
double x1, x2, w, y1;
do {
x1 = 2.0 * randomGenerator.nextDouble() - 1.0;
x2 = 2.0 * randomGenerator.nextDouble() - 1.0;
w = x1 * x1 + x2 * x2;
} while (w >= 1.0);
w = Math.sqrt((-2.0 * Math.log(w)) / w);
y1 = x1 *... | class class_name[name] begin[{]
method[randNormal, return_type[type[double]], modifier[public], parameter[mean, standardDeviation]] begin[{]
local_variable[type[double], x1]
do[binary_operation[member[.w], >=, literal[1.0]]] begin[{]
assign[member[.x1], binary_op... | Keyword[public] Keyword[double] identifier[randNormal] operator[SEP] Keyword[double] identifier[mean] , Keyword[double] identifier[standardDeviation] operator[SEP] {
Keyword[double] identifier[x1] , identifier[x2] , identifier[w] , identifier[y1] operator[SEP] Keyword[do] {
identifier[x1] operator... |
public void setLocalSecondaryIndexes(java.util.Collection<LocalSecondaryIndexDescription> localSecondaryIndexes) {
if (localSecondaryIndexes == null) {
this.localSecondaryIndexes = null;
return;
}
this.localSecondaryIndexes = new java.util.ArrayList<LocalSecondaryIndexDe... | class class_name[name] begin[{]
method[setLocalSecondaryIndexes, return_type[void], modifier[public], parameter[localSecondaryIndexes]] begin[{]
if[binary_operation[member[.localSecondaryIndexes], ==, literal[null]]] begin[{]
assign[THIS[member[None.localSecondaryIndexes... | Keyword[public] Keyword[void] identifier[setLocalSecondaryIndexes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[LocalSecondaryIndexDescription] operator[>] identifier[localSecondaryIndexes] operator[SEP] {
Keyword[if] operator[SEP] iden... |
@Nonnull
public static <T1, T2> LBiObjBytePredicate<T1, T2> biObjBytePredicateFrom(Consumer<LBiObjBytePredicateBuilder<T1, T2>> buildingFunction) {
LBiObjBytePredicateBuilder builder = new LBiObjBytePredicateBuilder();
buildingFunction.accept(builder);
return builder.build();
} | class class_name[name] begin[{]
method[biObjBytePredicateFrom, return_type[type[LBiObjBytePredicate]], modifier[public static], parameter[buildingFunction]] begin[{]
local_variable[type[LBiObjBytePredicateBuilder], builder]
call[buildingFunction.accept, parameter[member[.builder]]]
... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] operator[>] identifier[LBiObjBytePredicate] operator[<] identifier[T1] , identifier[T2] operator[>] identifier[biObjBytePredicateFrom] operator[SEP] identifier[Consumer] operator[<] identifier[LBiObjBytePredi... |
@BetaApi
public final Operation deleteRoute(String route) {
DeleteRouteHttpRequest request = DeleteRouteHttpRequest.newBuilder().setRoute(route).build();
return deleteRoute(request);
} | class class_name[name] begin[{]
method[deleteRoute, return_type[type[Operation]], modifier[final public], parameter[route]] begin[{]
local_variable[type[DeleteRouteHttpRequest], request]
return[call[.deleteRoute, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[deleteRoute] operator[SEP] identifier[String] identifier[route] operator[SEP] {
identifier[DeleteRouteHttpRequest] identifier[request] operator[=] identifier[DeleteRouteHttpRequest] operator[SEP] identifier[newBuild... |
public static boolean isCase(Object switchValue, Object caseExpression) throws Throwable {
if (caseExpression == null) {
return switchValue == null;
}
return DefaultTypeTransformation.castToBoolean(invokeMethodN(caseExpression.getClass(), caseExpression, "isCase", new Object[]{switch... | class class_name[name] begin[{]
method[isCase, return_type[type[boolean]], modifier[public static], parameter[switchValue, caseExpression]] begin[{]
if[binary_operation[member[.caseExpression], ==, literal[null]]] begin[{]
return[binary_operation[member[.switchValue], ==, literal[nu... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isCase] operator[SEP] identifier[Object] identifier[switchValue] , identifier[Object] identifier[caseExpression] operator[SEP] Keyword[throws] identifier[Throwable] {
Keyword[if] operator[SEP] identifier[caseExpression] operator[==] Other[null] operato... |
public static Id normalize(Id id) {
return (new DefaultId(id.name())).withTags(id.tags()).normalize();
} | class class_name[name] begin[{]
method[normalize, return_type[type[Id]], modifier[public static], parameter[id]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=id, selectors=[], type_arguments=None)], body=None, c... | Keyword[public] Keyword[static] identifier[Id] identifier[normalize] operator[SEP] identifier[Id] identifier[id] operator[SEP] {
Keyword[return] operator[SEP] Keyword[new] identifier[DefaultId] operator[SEP] identifier[id] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] ope... |
public ScanSpec withValueMap(Map<String, Object> valueMap) {
if (valueMap == null)
this.valueMap = null;
else
this.valueMap = Collections.unmodifiableMap(new LinkedHashMap<String, Object>(valueMap));
return this;
} | class class_name[name] begin[{]
method[withValueMap, return_type[type[ScanSpec]], modifier[public], parameter[valueMap]] begin[{]
if[binary_operation[member[.valueMap], ==, literal[null]]] begin[{]
assign[THIS[member[None.valueMap]], literal[null]]
else begin[{]
... | Keyword[public] identifier[ScanSpec] identifier[withValueMap] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[valueMap] operator[SEP] {
Keyword[if] operator[SEP] identifier[valueMap] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] ident... |
public Object evaluate(TaskRequest req, TaskResponse res) {
HttpServletRequest hreq = (HttpServletRequest) source.evaluate(req, res);
return hreq.getRemoteUser();
} | class class_name[name] begin[{]
method[evaluate, return_type[type[Object]], modifier[public], parameter[req, res]] begin[{]
local_variable[type[HttpServletRequest], hreq]
return[call[hreq.getRemoteUser, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Object] identifier[evaluate] operator[SEP] identifier[TaskRequest] identifier[req] , identifier[TaskResponse] identifier[res] operator[SEP] {
identifier[HttpServletRequest] identifier[hreq] operator[=] operator[SEP] identifier[HttpServletRequest] operator[SEP] identifier[source] opera... |
public static Integer getIntValue(@NonNull byte[] value, @IntFormatType int formatType, @IntRange(from = 0) int offset) {
if ((offset + getTypeLen(formatType)) > value.length) {
RxBleLog.w(
"Int formatType (0x%x) is longer than remaining bytes (%d) - returning null", formatType, ... | class class_name[name] begin[{]
method[getIntValue, return_type[type[Integer]], modifier[public static], parameter[value, formatType, offset]] begin[{]
if[binary_operation[binary_operation[member[.offset], +, call[.getTypeLen, parameter[member[.formatType]]]], >, member[value.length]]] begin[{]... | Keyword[public] Keyword[static] identifier[Integer] identifier[getIntValue] operator[SEP] annotation[@] identifier[NonNull] Keyword[byte] operator[SEP] operator[SEP] identifier[value] , annotation[@] identifier[IntFormatType] Keyword[int] identifier[formatType] , annotation[@] identifier[IntRange] operator[SEP] ident... |
public void marshall(GetNamespaceRequest getNamespaceRequest, ProtocolMarshaller protocolMarshaller) {
if (getNamespaceRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getNamespaceRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getNamespaceRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getNamespaceRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetNamespaceRequest] identifier[getNamespaceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getNamespaceRequest] operator[==] Other[null] operator[SEP] {
... |
@Nonnull
public Query startAfter(@Nonnull DocumentSnapshot snapshot) {
QueryOptions newOptions = new QueryOptions(options);
newOptions.fieldOrders = createImplicitOrderBy();
newOptions.startCursor = createCursor(newOptions.fieldOrders, snapshot, false);
return new Query(firestore, path, newOptions);
... | class class_name[name] begin[{]
method[startAfter, return_type[type[Query]], modifier[public], parameter[snapshot]] begin[{]
local_variable[type[QueryOptions], newOptions]
assign[member[newOptions.fieldOrders], call[.createImplicitOrderBy, parameter[]]]
assign[member[new... | annotation[@] identifier[Nonnull] Keyword[public] identifier[Query] identifier[startAfter] operator[SEP] annotation[@] identifier[Nonnull] identifier[DocumentSnapshot] identifier[snapshot] operator[SEP] {
identifier[QueryOptions] identifier[newOptions] operator[=] Keyword[new] identifier[QueryOptions] operator[S... |
@Override
public void setAsText(final String text) {
if (BeanUtils.isNull(text)) {
setValue(null);
return;
}
try {
Object newValue = Long.valueOf(text);
setValue(newValue);
} catch (NumberFormatException e) {
throw new Illeg... | class class_name[name] begin[{]
method[setAsText, return_type[void], modifier[public], parameter[text]] begin[{]
if[call[BeanUtils.isNull, parameter[member[.text]]]] begin[{]
call[.setValue, parameter[literal[null]]]
return[None]
else begin[{]
None
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setAsText] operator[SEP] Keyword[final] identifier[String] identifier[text] operator[SEP] {
Keyword[if] operator[SEP] identifier[BeanUtils] operator[SEP] identifier[isNull] operator[SEP] identifier[text] operator[SEP] operator[SEP] {
... |
public void setPos(Object p) {
Object[] a = (Object[]) p;
buf = (char[]) a[0];
int[] v = (int[]) a[1];
pos.setIndex(v[0]);
bufPos = v[1];
} | class class_name[name] begin[{]
method[setPos, return_type[void], modifier[public], parameter[p]] begin[{]
local_variable[type[Object], a]
assign[member[.buf], Cast(expression=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index... | Keyword[public] Keyword[void] identifier[setPos] operator[SEP] identifier[Object] identifier[p] operator[SEP] {
identifier[Object] operator[SEP] operator[SEP] identifier[a] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[buf] operator[... |
public void setAnnotType(String v) {
if (DictTerm_Type.featOkTst && ((DictTerm_Type)jcasType).casFeat_annotType == null)
jcasType.jcas.throwFeatMissing("annotType", "ch.epfl.bbp.uima.types.DictTerm");
jcasType.ll_cas.ll_setStringValue(addr, ((DictTerm_Type)jcasType).casFeatCode_annotType, v);} | class class_name[name] begin[{]
method[setAnnotType, return_type[void], modifier[public], parameter[v]] begin[{]
if[binary_operation[member[DictTerm_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, sele... | Keyword[public] Keyword[void] identifier[setAnnotType] operator[SEP] identifier[String] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[DictTerm_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[DictTerm_Type] operator[SEP] identifier[jcasType] opera... |
@Override
public KType get(int index) {
assert (index >= 0 && index < size()) : "Index " + index + " out of bounds [" + 0 + ", " + size() + ").";
return Intrinsics.<KType> cast(buffer[index]);
} | class class_name[name] begin[{]
method[get, return_type[type[KType]], modifier[public], parameter[index]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Lit... | annotation[@] identifier[Override] Keyword[public] identifier[KType] identifier[get] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[assert] operator[SEP] identifier[index] operator[>=] Other[0] operator[&&] identifier[index] operator[<] identifier[size] operator[SEP] operator[SEP] operator[... |
public static Period positive(final Period self) {
return !self.isNegative() ? self : self.withDays(Math.abs(self.getDays()))
.withMonths(Math.abs(self.getMonths()))
.withYears(Math.abs(self.getYears()));
} | class class_name[name] begin[{]
method[positive, return_type[type[Period]], modifier[public static], parameter[self]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isNegative, postfix_operators=[], prefix_operators=['!'], qualifier=self, selectors=[], type_arguments=... | Keyword[public] Keyword[static] identifier[Period] identifier[positive] operator[SEP] Keyword[final] identifier[Period] identifier[self] operator[SEP] {
Keyword[return] operator[!] identifier[self] operator[SEP] identifier[isNegative] operator[SEP] operator[SEP] operator[?] identifier[self] operator[:] identifi... |
public static byte[] decodeToBytes(String string, String enc)
throws UnsupportedEncodingException {
return decode(string.getBytes(enc));
} | class class_name[name] begin[{]
method[decodeToBytes, return_type[type[byte]], modifier[public static], parameter[string, enc]] begin[{]
return[call[.decode, parameter[call[string.getBytes, parameter[member[.enc]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decodeToBytes] operator[SEP] identifier[String] identifier[string] , identifier[String] identifier[enc] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] {
Keyword[return] identifier[decode] operator[SEP] i... |
public ServiceFuture<List<SkuInfoInner>> listMultiRolePoolSkusAsync(final String resourceGroupName, final String name, final ListOperationCallback<SkuInfoInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name),
n... | class class_name[name] begin[{]
method[listMultiRolePoolSkusAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, name, serviceCallback]] begin[{]
return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listMultiRolePoolSkusSinglePageAsync, parameter[member[.r... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[SkuInfoInner] operator[>] operator[>] identifier[listMultiRolePoolSkusAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[name] , Keyword[final]... |
public Object process(BinaryEntry entry) {
Binary binValue = entry.getBinaryValue();
if (binValue == null || navigator == null) {
return binValue;
}
PofValue root = PofValueParser.parse(binValue, getPofContext());
PofValue child = navigator.navigate(root);
re... | class class_name[name] begin[{]
method[process, return_type[type[Object]], modifier[public], parameter[entry]] begin[{]
local_variable[type[Binary], binValue]
if[binary_operation[binary_operation[member[.binValue], ==, literal[null]], ||, binary_operation[member[.navigator], ==, literal... | Keyword[public] identifier[Object] identifier[process] operator[SEP] identifier[BinaryEntry] identifier[entry] operator[SEP] {
identifier[Binary] identifier[binValue] operator[=] identifier[entry] operator[SEP] identifier[getBinaryValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identif... |
public static void sqlltrim(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException {
singleArgumentFunctionCall(buf, "trim(leading from ", "ltrim", parsedArgs);
} | class class_name[name] begin[{]
method[sqlltrim, return_type[void], modifier[public static], parameter[buf, parsedArgs]] begin[{]
call[.singleArgumentFunctionCall, parameter[member[.buf], literal["trim(leading from "], literal["ltrim"], member[.parsedArgs]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[sqlltrim] operator[SEP] identifier[StringBuilder] identifier[buf] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[CharSequence] operator[>] identifier[parsedArgs] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[s... |
public AwsSecurityFindingFilters withNoteUpdatedAt(DateFilter... noteUpdatedAt) {
if (this.noteUpdatedAt == null) {
setNoteUpdatedAt(new java.util.ArrayList<DateFilter>(noteUpdatedAt.length));
}
for (DateFilter ele : noteUpdatedAt) {
this.noteUpdatedAt.add(ele);
}... | class class_name[name] begin[{]
method[withNoteUpdatedAt, return_type[type[AwsSecurityFindingFilters]], modifier[public], parameter[noteUpdatedAt]] begin[{]
if[binary_operation[THIS[member[None.noteUpdatedAt]], ==, literal[null]]] begin[{]
call[.setNoteUpdatedAt, paramet... | Keyword[public] identifier[AwsSecurityFindingFilters] identifier[withNoteUpdatedAt] operator[SEP] identifier[DateFilter] operator[...] identifier[noteUpdatedAt] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[noteUpdatedAt] operator[==] Other[null] operator[SEP] {
iden... |
@SuppressWarnings("null") // bytes will be null only if empty == true
public byte[] toByteArray(final ArrayOfItemsSerDe<? super T> serDe, final Class<?> clazz) {
final int preLongs, numMarkBytes, outBytes;
final boolean empty = (r_ == 0) && (h_ == 0);
byte[] itemBytes = null; // for serialized items from ... | class class_name[name] begin[{]
method[toByteArray, return_type[type[byte]], modifier[public], parameter[serDe, clazz]] begin[{]
local_variable[type[int], preLongs]
local_variable[type[boolean], empty]
local_variable[type[byte], itemBytes]
local_variable[type[int], flags]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] Keyword[final] identifier[ArrayOfItemsSerDe] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[serDe] , Keywor... |
@Override
public Map<String, Object> getValues(double evaluationTime, MonteCarloSimulationModel model) throws CalculationException
{
RandomVariable values = getValue(evaluationTime, model);
if(values == null) {
return null;
}
// Sum up values on path
double value = values.getAverage();
double error =... | class class_name[name] begin[{]
method[getValues, return_type[type[Map]], modifier[public], parameter[evaluationTime, model]] begin[{]
local_variable[type[RandomVariable], values]
if[binary_operation[member[.values], ==, literal[null]]] begin[{]
return[literal[null]]
... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getValues] operator[SEP] Keyword[double] identifier[evaluationTime] , identifier[MonteCarloSimulationModel] identifier[model] operator[SEP] Keyword[throws] identifier[Calculati... |
public static PeriodDuration of(Duration duration) {
Objects.requireNonNull(duration, "The duration must not be null");
return new PeriodDuration(Period.ZERO, duration);
} | class class_name[name] begin[{]
method[of, return_type[type[PeriodDuration]], modifier[public static], parameter[duration]] begin[{]
call[Objects.requireNonNull, parameter[member[.duration], literal["The duration must not be null"]]]
return[ClassCreator(arguments=[MemberReference(member... | Keyword[public] Keyword[static] identifier[PeriodDuration] identifier[of] operator[SEP] identifier[Duration] identifier[duration] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[duration] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[... |
public static Method lookupMethod( Class parentClass, String methodName, Class[] signature )
{
try
{
return parentClass.getDeclaredMethod( methodName, signature );
}
catch ( NoSuchMethodException e )
{
Class superClass = parentClass.getSuperclass();
... | class class_name[name] begin[{]
method[lookupMethod, return_type[type[Method]], modifier[public static], parameter[parentClass, methodName, signature]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] identifier[Method] identifier[lookupMethod] operator[SEP] identifier[Class] identifier[parentClass] , identifier[String] identifier[methodName] , identifier[Class] operator[SEP] operator[SEP] identifier[signature] operator[SEP] {
Keyword[try] {
Keyword[return] identif... |
Object eval(Class scriptClass, final ScriptContext ctx) throws ScriptException {
// Bindings so script has access to this environment.
// Only initialize once.
if (null == ctx.getAttribute("context", ScriptContext.ENGINE_SCOPE)) {
// add context to bindings
ctx.setAttribu... | class class_name[name] begin[{]
method[eval, return_type[type[Object]], modifier[default], parameter[scriptClass, ctx]] begin[{]
if[binary_operation[literal[null], ==, call[ctx.getAttribute, parameter[literal["context"], member[ScriptContext.ENGINE_SCOPE]]]]] begin[{]
ca... | identifier[Object] identifier[eval] operator[SEP] identifier[Class] identifier[scriptClass] , Keyword[final] identifier[ScriptContext] identifier[ctx] operator[SEP] Keyword[throws] identifier[ScriptException] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[ctx] operator[SEP] identifier[getAttrib... |
public void suspendFlexResponse() {
for (int i = 0; i < m_flexResponseList.size(); i++) {
CmsFlexResponse res = m_flexResponseList.get(i);
res.setSuspended(true);
}
} | class class_name[name] begin[{]
method[suspendFlexResponse, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=... | Keyword[public] Keyword[void] identifier[suspendFlexResponse] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m_flexResponseList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] id... |
public void marshall(DestinationBackup destinationBackup, ProtocolMarshaller protocolMarshaller) {
if (destinationBackup == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(destinationBackup.getCreateT... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[destinationBackup, protocolMarshaller]] begin[{]
if[binary_operation[member[.destinationBackup], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(pos... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DestinationBackup] identifier[destinationBackup] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[destinationBackup] operator[==] Other[null] operator[SEP] {
... |
public void marshall(GetServersRequest getServersRequest, ProtocolMarshaller protocolMarshaller) {
if (getServersRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getServersRequest.getNextTok... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getServersRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getServersRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(pos... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetServersRequest] identifier[getServersRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getServersRequest] operator[==] Other[null] operator[SEP] {
... |
@Path("/{roleName}/users/{cuid}")
@ApiOperation(value="Delete a role or remove a user from a role",
notes="If users/{cuid} is present, user is removed from role.", response=StatusMessage.class)
public JSONObject delete(String path, JSONObject content, Map<String,String> headers)
throws ServiceExcept... | class class_name[name] begin[{]
method[delete, return_type[type[JSONObject]], modifier[public], parameter[path, content, headers]] begin[{]
local_variable[type[String], name]
local_variable[type[String], rel]
local_variable[type[UserServices], userServices]
TryStatement(block=[I... | annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[ApiOperation] operator[SEP] identifier[value] operator[=] literal[String] , identifier[notes] operator[=] literal[String] , identifier[response] operator[=] identifier[StatusMessage] operator[SEP] Keyword[class] operat... |
protected void configureSigningKey(final String signingSecretKey) {
try {
if (ResourceUtils.doesResourceExist(signingSecretKey)) {
configureSigningKeyFromPrivateKeyResource(signingSecretKey);
}
} finally {
if (this.signingKey == null) {
... | class class_name[name] begin[{]
method[configureSigningKey, return_type[void], modifier[protected], parameter[signingSecretKey]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=signingSecretKey, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[protected] Keyword[void] identifier[configureSigningKey] operator[SEP] Keyword[final] identifier[String] identifier[signingSecretKey] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[ResourceUtils] operator[SEP] identifier[doesResourceExist] operator[SEP] identifier[signingS... |
public static Collection<String> listPackageResources(String packageName, String fileNamesPattern)
{
String packagePath = Files.dot2urlpath(packageName);
Set<URL> packageURLs = new HashSet<>();
for(ClassLoader classLoader : new ClassLoader[]
{
Thread.currentThread().getContextClassLoad... | class class_name[name] begin[{]
method[listPackageResources, return_type[type[Collection]], modifier[public static], parameter[packageName, fileNamesPattern]] begin[{]
local_variable[type[String], packagePath]
local_variable[type[Set], packageURLs]
ForStatement(body=BlockStatement(label... | Keyword[public] Keyword[static] identifier[Collection] operator[<] identifier[String] operator[>] identifier[listPackageResources] operator[SEP] identifier[String] identifier[packageName] , identifier[String] identifier[fileNamesPattern] operator[SEP] {
identifier[String] identifier[packagePath] operator[=] ide... |
@Override
public boolean isPushSupported() {
// Find the existing H2 connection and stream so we can use them to send the
// push_promise frame to the client.
HttpInboundServiceContext isc = (HttpInboundServiceContext) getServiceContext();
HttpInboundLink link = ((HttpInboundService... | class class_name[name] begin[{]
method[isPushSupported, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[HttpInboundServiceContext], isc]
local_variable[type[HttpInboundLink], link]
if[binary_operation[member[.link], instanceof, type[H2Http... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isPushSupported] operator[SEP] operator[SEP] {
identifier[HttpInboundServiceContext] identifier[isc] operator[=] operator[SEP] identifier[HttpInboundServiceContext] operator[SEP] identifier[getServiceContext] operator[SEP] operator[SE... |
private static void checkDateElements(List<Vertex> linkedArray)
{
if (linkedArray.size() < 2)
return;
ListIterator<Vertex> listIterator = linkedArray.listIterator();
Vertex next = listIterator.next();
Vertex current = next;
while (listIterator.hasNext())
{... | class class_name[name] begin[{]
method[checkDateElements, return_type[void], modifier[private static], parameter[linkedArray]] begin[{]
if[binary_operation[call[linkedArray.size, parameter[]], <, literal[2]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable... | Keyword[private] Keyword[static] Keyword[void] identifier[checkDateElements] operator[SEP] identifier[List] operator[<] identifier[Vertex] operator[>] identifier[linkedArray] operator[SEP] {
Keyword[if] operator[SEP] identifier[linkedArray] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] O... |
public Set<Evse> getEvses(Long chargingStationTypeId) {
ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId);
return chargingStationType.getEvses();
} | class class_name[name] begin[{]
method[getEvses, return_type[type[Set]], modifier[public], parameter[chargingStationTypeId]] begin[{]
local_variable[type[ChargingStationType], chargingStationType]
return[call[chargingStationType.getEvses, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Set] operator[<] identifier[Evse] operator[>] identifier[getEvses] operator[SEP] identifier[Long] identifier[chargingStationTypeId] operator[SEP] {
identifier[ChargingStationType] identifier[chargingStationType] operator[=] identifier[chargingStationTypeRepository] operator[SEP] identi... |
public static LongStream interval(final long delay, final long interval, final TimeUnit unit) {
return of(new LongIteratorEx() {
private final long intervalInMillis = unit.toMillis(interval);
private long nextTime = System.currentTimeMillis() + unit.toMillis(delay);
priva... | class class_name[name] begin[{]
method[interval, return_type[type[LongStream]], modifier[public static], parameter[delay, interval, unit]] begin[{]
return[call[.of, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Met... | Keyword[public] Keyword[static] identifier[LongStream] identifier[interval] operator[SEP] Keyword[final] Keyword[long] identifier[delay] , Keyword[final] Keyword[long] identifier[interval] , Keyword[final] identifier[TimeUnit] identifier[unit] operator[SEP] {
Keyword[return] identifier[of] operator[SEP] Keywor... |
public static Trace fromString(String logcatTrace) throws IllegalTraceException {
if (logcatTrace == null
|| logcatTrace.length() < MIN_TRACE_SIZE
|| logcatTrace.charAt(20) != TRACE_LEVEL_SEPARATOR) {
throw new IllegalTraceException(
"You are trying to create a Trace object from a in... | class class_name[name] begin[{]
method[fromString, return_type[type[Trace]], modifier[public static], parameter[logcatTrace]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.logcatTrace], ==, literal[null]], ||, binary_operation[call[logcatTrace.length, parameter[]], <, m... | Keyword[public] Keyword[static] identifier[Trace] identifier[fromString] operator[SEP] identifier[String] identifier[logcatTrace] operator[SEP] Keyword[throws] identifier[IllegalTraceException] {
Keyword[if] operator[SEP] identifier[logcatTrace] operator[==] Other[null] operator[||] identifier[logcatTrace] opera... |
@SuppressWarnings({"UnnecessaryContinue"})
public static boolean descendOnlyFilePath(String path) {
String[] pathSegments = path.split("/");
//String[] newPathSegments = new String[pathSegments.length];
int i = 0;
for (int indxOrigSegs = 0; indxOrigSegs < pathSegments.length; indxOrigSegs++) {
S... | class class_name[name] begin[{]
method[descendOnlyFilePath, return_type[type[boolean]], modifier[public static], parameter[path]] begin[{]
local_variable[type[String], pathSegments]
local_variable[type[int], i]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclar... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String]
} operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[descendOnlyFilePath] operator[SEP] identifier[String] identifier[path] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[pathSeg... |
public static FlowControlSupplier multicastFlowControlSupplier()
{
FlowControlSupplier supplier = null;
try
{
final String className = getProperty(MULTICAST_FLOW_CONTROL_STRATEGY_SUPPLIER_PROP_NAME);
if (null == className)
{
return new Defa... | class class_name[name] begin[{]
method[multicastFlowControlSupplier, return_type[type[FlowControlSupplier]], modifier[public static], parameter[]] begin[{]
local_variable[type[FlowControlSupplier], supplier]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDecla... | Keyword[public] Keyword[static] identifier[FlowControlSupplier] identifier[multicastFlowControlSupplier] operator[SEP] operator[SEP] {
identifier[FlowControlSupplier] identifier[supplier] operator[=] Other[null] operator[SEP] Keyword[try] {
Keyword[final] identifier[String] identifier[className] opera... |
public static JaxInfo build(Class<?> cls, String ... rootNns) throws SecurityException, NoSuchFieldException, ClassNotFoundException, ParseException {
String defaultNS;
if(rootNns.length>0 && rootNns[0]!=null) {
defaultNS = rootNns[0];
} else {
Package pkg = cls.getPackage();
XmlSchema xs = pkg.getAnnota... | class class_name[name] begin[{]
method[build, return_type[type[JaxInfo]], modifier[public static], parameter[cls, rootNns]] begin[{]
local_variable[type[String], defaultNS]
if[binary_operation[binary_operation[member[rootNns.length], >, literal[0]], &&, binary_operation[member[.rootNns]... | Keyword[public] Keyword[static] identifier[JaxInfo] identifier[build] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] , identifier[String] operator[...] identifier[rootNns] operator[SEP] Keyword[throws] identifier[SecurityException] , identifier[NoSuchFieldException] , identifier[... |
public MMCPARAMETER1 createMMCPARAMETER1FromString(EDataType eDataType, String initialValue) {
MMCPARAMETER1 result = MMCPARAMETER1.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return resul... | class class_name[name] begin[{]
method[createMMCPARAMETER1FromString, return_type[type[MMCPARAMETER1]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[MMCPARAMETER1], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowState... | Keyword[public] identifier[MMCPARAMETER1] identifier[createMMCPARAMETER1FromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[MMCPARAMETER1] identifier[result] operator[=] identifier[MMCPARAMETER1] operator[SEP] identifier[... |
@Override
public void configure(FeatureContext context) {
if (!context.getConfiguration().isRegistered(SwaggerFeature.class)) {
context.register(SwaggerFeature.class);
}
} | class class_name[name] begin[{]
method[configure, return_type[void], modifier[public], parameter[context]] begin[{]
if[call[context.getConfiguration, parameter[]]] begin[{]
call[context.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifi... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[configure] operator[SEP] identifier[FeatureContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[context] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identi... |
@Override
public Collection<MonetaryRounding> getRoundings(RoundingQuery query) {
List<MonetaryRounding> result = new ArrayList<>();
Collection<String> providerNames = query.getProviderNames();
if (providerNames == null || providerNames.isEmpty()) {
providerNames = getDefaultProv... | class class_name[name] begin[{]
method[getRoundings, return_type[type[Collection]], modifier[public], parameter[query]] begin[{]
local_variable[type[List], result]
local_variable[type[Collection], providerNames]
if[binary_operation[binary_operation[member[.providerNames], ==, li... | annotation[@] identifier[Override] Keyword[public] identifier[Collection] operator[<] identifier[MonetaryRounding] operator[>] identifier[getRoundings] operator[SEP] identifier[RoundingQuery] identifier[query] operator[SEP] {
identifier[List] operator[<] identifier[MonetaryRounding] operator[>] identifier[result... |
public static void rewriteStackTrace(Throwable throwable) {
StackTraceElement[] stack = throwable.getStackTrace();
for (int i = 0; i < stack.length; i++) {
StackTraceElement curr = stack[i];
if (curr.getClassName().startsWith(CLASS_PREFIX)) {
stack[i] =
new StackTraceElement(
... | class class_name[name] begin[{]
method[rewriteStackTrace, return_type[void], modifier[public static], parameter[throwable]] begin[{]
local_variable[type[StackTraceElement], stack]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Vari... | Keyword[public] Keyword[static] Keyword[void] identifier[rewriteStackTrace] operator[SEP] identifier[Throwable] identifier[throwable] operator[SEP] {
identifier[StackTraceElement] operator[SEP] operator[SEP] identifier[stack] operator[=] identifier[throwable] operator[SEP] identifier[getStackTrace] operator[SEP]... |
public void sessionPostInvoke(HttpSession sess) {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[SESSION_POST_INVOKE]);
}
SessionData s = (Sess... | class class_name[name] begin[{]
method[sessionPostInvoke, return_type[void], modifier[public], parameter[sess]] begin[{]
if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLoggable, parameter[member[Level.FINE]]]... | Keyword[public] Keyword[void] identifier[sessionPostInvoke] operator[SEP] identifier[HttpSession] identifier[sess] operator[SEP] {
Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[... |
@Override
public String getBatchAppNameFromInstance(long instanceId) throws NoSuchJobInstanceException, JobSecurityException {
return persistenceManagerService.getJobInstanceAppName(authorizedInstanceRead(instanceId));
} | class class_name[name] begin[{]
method[getBatchAppNameFromInstance, return_type[type[String]], modifier[public], parameter[instanceId]] begin[{]
return[call[persistenceManagerService.getJobInstanceAppName, parameter[call[.authorizedInstanceRead, parameter[member[.instanceId]]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getBatchAppNameFromInstance] operator[SEP] Keyword[long] identifier[instanceId] operator[SEP] Keyword[throws] identifier[NoSuchJobInstanceException] , identifier[JobSecurityException] {
Keyword[return] identifier[persistenceManager... |
public static int framebufferStatusToGL(
final JCGLFramebufferStatus status)
{
switch (status) {
case FRAMEBUFFER_STATUS_COMPLETE:
return GL30.GL_FRAMEBUFFER_COMPLETE;
case FRAMEBUFFER_STATUS_ERROR_INCOMPLETE_ATTACHMENT:
return GL30.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
case ... | class class_name[name] begin[{]
method[framebufferStatusToGL, return_type[type[int]], modifier[public static], parameter[status]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['FRAMEBUFFER_STATUS_COMPLETE'], statements=[ReturnStatement(expression=MemberReference(member=GL_FRAMEBUFFER_COMPLE... | Keyword[public] Keyword[static] Keyword[int] identifier[framebufferStatusToGL] operator[SEP] Keyword[final] identifier[JCGLFramebufferStatus] identifier[status] operator[SEP] {
Keyword[switch] operator[SEP] identifier[status] operator[SEP] {
Keyword[case] identifier[FRAMEBUFFER_STATUS_COMPLETE] operat... |
@Override
public void removeInstance(long key, T instance) {
if (first.value == key && instance == first.element) {
removeMin();
return;
}
if (last.value == key && instance == last.element) {
removeMax();
return;
}
// if both children of root are black, s... | class class_name[name] begin[{]
method[removeInstance, return_type[void], modifier[public], parameter[key, instance]] begin[{]
if[binary_operation[binary_operation[member[first.value], ==, member[.key]], &&, binary_operation[member[.instance], ==, member[first.element]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeInstance] operator[SEP] Keyword[long] identifier[key] , identifier[T] identifier[instance] operator[SEP] {
Keyword[if] operator[SEP] identifier[first] operator[SEP] identifier[value] operator[==] identifier[key] operator[&&] ident... |
public void set(List<Double> coefficients, Engine engine) {
setCoefficients(coefficients);
setEngine(engine);
} | class class_name[name] begin[{]
method[set, return_type[void], modifier[public], parameter[coefficients, engine]] begin[{]
call[.setCoefficients, parameter[member[.coefficients]]]
call[.setEngine, parameter[member[.engine]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[List] operator[<] identifier[Double] operator[>] identifier[coefficients] , identifier[Engine] identifier[engine] operator[SEP] {
identifier[setCoefficients] operator[SEP] identifier[coefficients] operator[SEP] operator[SEP] identifier[setEn... |
private static final int findSameDataBlock(int data[], int dataLength,
int otherBlock, int step)
{
// ensure that we do not even partially get past dataLength
dataLength -= DATA_BLOCK_LENGTH;
for (int block = 0; block <= dataLength; block += s... | class class_name[name] begin[{]
method[findSameDataBlock, return_type[type[int]], modifier[final private static], parameter[data, dataLength, otherBlock, step]] begin[{]
assign[member[.dataLength], member[.DATA_BLOCK_LENGTH]]
ForStatement(body=BlockStatement(label=None, statements=[IfSt... | Keyword[private] Keyword[static] Keyword[final] Keyword[int] identifier[findSameDataBlock] operator[SEP] Keyword[int] identifier[data] operator[SEP] operator[SEP] , Keyword[int] identifier[dataLength] , Keyword[int] identifier[otherBlock] , Keyword[int] identifier[step] operator[SEP] {
identifier[dataLength] ... |
public ServiceFuture<CheckNameAvailabilityResponseInner> checkNameAvailabilityLocalAsync(String location, CheckNameAvailabilityRequest checkNameAvailability, final ServiceCallback<CheckNameAvailabilityResponseInner> serviceCallback) {
return ServiceFuture.fromResponse(checkNameAvailabilityLocalWithServiceRespon... | class class_name[name] begin[{]
method[checkNameAvailabilityLocalAsync, return_type[type[ServiceFuture]], modifier[public], parameter[location, checkNameAvailability, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.checkNameAvailabilityLocalWithServiceResponseAsync, p... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[CheckNameAvailabilityResponseInner] operator[>] identifier[checkNameAvailabilityLocalAsync] operator[SEP] identifier[String] identifier[location] , identifier[CheckNameAvailabilityRequest] identifier[checkNameAvailability] , Keyword[final] identifier[Se... |
@Override
public int indexOf(Object arg0) {
int indexOf = allResults.indexOf(arg0);
if ( indexOf >= 0 )
return indexOf;
while ( nextResultsAvailable() ) {
indexOf = nextResults.indexOf(arg0);
int size = allResults.size();
moveNextResults();
... | class class_name[name] begin[{]
method[indexOf, return_type[type[int]], modifier[public], parameter[arg0]] begin[{]
local_variable[type[int], indexOf]
if[binary_operation[member[.indexOf], >=, literal[0]]] begin[{]
return[member[.indexOf]]
else begin[{]
None
end[}]
... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[indexOf] operator[SEP] identifier[Object] identifier[arg0] operator[SEP] {
Keyword[int] identifier[indexOf] operator[=] identifier[allResults] operator[SEP] identifier[indexOf] operator[SEP] identifier[arg0] operator[SEP] operator[SEP] Ke... |
public static mail_profile update(nitro_service client, mail_profile resource) throws Exception
{
resource.validate("modify");
return ((mail_profile[]) resource.update_resource(client))[0];
} | class class_name[name] begin[{]
method[update, return_type[type[mail_profile]], modifier[public static], parameter[client, resource]] begin[{]
call[resource.validate, parameter[literal["modify"]]]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_... | Keyword[public] Keyword[static] identifier[mail_profile] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[mail_profile] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[resource] operator[SEP] identifier[validate] operator[SEP] liter... |
public ScheduleInner createOrUpdate(String resourceGroupName, String automationAccountName, String scheduleName, ScheduleCreateOrUpdateParameters parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, automationAccountName, scheduleName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[createOrUpdate, return_type[type[ScheduleInner]], modifier[public], parameter[resourceGroupName, automationAccountName, scheduleName, parameters]] begin[{]
return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.automatio... | Keyword[public] identifier[ScheduleInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[automationAccountName] , identifier[String] identifier[scheduleName] , identifier[ScheduleCreateOrUpdateParameters] identifier[parameters] operator[SEP] ... |
void transferBlocksTo(RegularFile target, int count) {
copyBlocksTo(target, count);
truncateBlocks(blockCount - count);
} | class class_name[name] begin[{]
method[transferBlocksTo, return_type[void], modifier[default], parameter[target, count]] begin[{]
call[.copyBlocksTo, parameter[member[.target], member[.count]]]
call[.truncateBlocks, parameter[binary_operation[member[.blockCount], -, member[.coun... | Keyword[void] identifier[transferBlocksTo] operator[SEP] identifier[RegularFile] identifier[target] , Keyword[int] identifier[count] operator[SEP] {
identifier[copyBlocksTo] operator[SEP] identifier[target] , identifier[count] operator[SEP] operator[SEP] identifier[truncateBlocks] operator[SEP] identifier[bloc... |
private void rollover(RollingSegmentHandle handle) throws StreamSegmentException {
Preconditions.checkArgument(handle.getHeaderHandle() != null, "Cannot rollover a Segment with no header.");
Preconditions.checkArgument(!handle.isReadOnly(), "Cannot rollover using a read-only handle.");
Precondit... | class class_name[name] begin[{]
method[rollover, return_type[void], modifier[private], parameter[handle]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[call[handle.getHeaderHandle, parameter[]], !=, literal[null]], literal["Cannot rollover a Segment with no header."]]]
... | Keyword[private] Keyword[void] identifier[rollover] operator[SEP] identifier[RollingSegmentHandle] identifier[handle] operator[SEP] Keyword[throws] identifier[StreamSegmentException] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[handle] operator[SEP] identifier[getH... |
public CollectionRequest<Task> getTasksWithTag(String tag) {
String path = String.format("/tags/%s/tasks", tag);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | class class_name[name] begin[{]
method[getTasksWithTag, return_type[type[CollectionRequest]], modifier[public], parameter[tag]] begin[{]
local_variable[type[String], path]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReferenc... | Keyword[public] identifier[CollectionRequest] operator[<] identifier[Task] operator[>] identifier[getTasksWithTag] operator[SEP] identifier[String] identifier[tag] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , ... |
private static int EquivalentYear(int year)
{
int day = (int) DayFromYear(year) + 4;
day = day % 7;
if (day < 0)
day += 7;
// Years and leap years on which Jan 1 is a Sunday, Monday, etc.
if (IsLeapYear(year)) {
switch (day) {
case 0: r... | class class_name[name] begin[{]
method[EquivalentYear, return_type[type[int]], modifier[private static], parameter[year]] begin[{]
local_variable[type[int], day]
assign[member[.day], binary_operation[member[.day], %, literal[7]]]
if[binary_operation[member[.day], <, lite... | Keyword[private] Keyword[static] Keyword[int] identifier[EquivalentYear] operator[SEP] Keyword[int] identifier[year] operator[SEP] {
Keyword[int] identifier[day] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[DayFromYear] operator[SEP] identifier[year] operator[SEP] operator[+] Other[4] operator... |
public Connection getConnection(final String username, final String password)
throws SQLException {
try {
if (pool == null) {
this.user = username;
this.password = password;
initialize();
return pool.getConnection();
}
if ((urlParser.getUsername() != null ? ... | class class_name[name] begin[{]
method[getConnection, return_type[type[Connection]], modifier[public], parameter[username, password]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[public] identifier[Connection] identifier[getConnection] operator[SEP] Keyword[final] identifier[String] identifier[username] , Keyword[final] identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.