code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public Result json() {
setContentType(MimeTypes.JSON);
charset = Charsets.UTF_8;
// If we already have a String content, we must set the type.
// The renderable object checks whether or not the given String is a valid JSON string,
// or if a transformation is required.
if... | class class_name[name] begin[{]
method[json, return_type[type[Result]], modifier[public], parameter[]] begin[{]
call[.setContentType, parameter[member[MimeTypes.JSON]]]
assign[member[.charset], member[Charsets.UTF_8]]
if[binary_operation[call[.getRenderable, para... | Keyword[public] identifier[Result] identifier[json] operator[SEP] operator[SEP] {
identifier[setContentType] operator[SEP] identifier[MimeTypes] operator[SEP] identifier[JSON] operator[SEP] operator[SEP] identifier[charset] operator[=] identifier[Charsets] operator[SEP] identifier[UTF_8] operator[SEP] Keyword[if... |
public ObjectComposer<PARENT> putObject(String fieldName, Object value)
throws IOException, JsonProcessingException
{
_generator.writeObjectField(fieldName, value);
return this;
} | class class_name[name] begin[{]
method[putObject, return_type[type[ObjectComposer]], modifier[public], parameter[fieldName, value]] begin[{]
call[_generator.writeObjectField, parameter[member[.fieldName], member[.value]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[ObjectComposer] operator[<] identifier[PARENT] operator[>] identifier[putObject] operator[SEP] identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JsonProcessingException] {
identifier[_gen... |
@SuppressWarnings("unchecked")
public final FindableDocument<? extends GedObject, ? extends GedDocument<?>>
get(final Class<? extends GedObject> clazz) {
return (FindableDocument<? extends GedObject, ? extends GedDocument<?>>)
classToRepoMap .get(clazz);
} | class class_name[name] begin[{]
method[get, return_type[type[FindableDocument]], modifier[final public], parameter[clazz]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[FindableDocument] operator[<] operator[?] Keyword[extends] identifier[GedObject] , operator[?] Keyword[extends] identifier[GedDocument] operator[<] operator[?] operator[>] operator[>] identi... |
public List<String> getVariables() {
return this.templateChunks.stream()
.filter(templateChunk -> Expression.class.isAssignableFrom(templateChunk.getClass()))
.map(templateChunk -> ((Expression) templateChunk).getName())
.filter(Objects::nonNull)
.collect(Collectors.toList());
} | class class_name[name] begin[{]
method[getVariables, return_type[type[List]], modifier[public], parameter[]] begin[{]
return[THIS[member[None.templateChunks]call[None.stream, parameter[]]call[None.filter, parameter[LambdaExpression(body=ClassReference(postfix_operators=[], prefix_operators=[], qualifie... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getVariables] operator[SEP] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[templateChunks] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] ide... |
public void setEnabled (boolean enabled)
{
// report incorrect usage
if (enabled && _target == null) {
log.warning("Attempt to enable uninitialized keyboard manager!", new Exception());
return;
}
// ignore NOOPs
if (enabled == _enabled) {
... | class class_name[name] begin[{]
method[setEnabled, return_type[void], modifier[public], parameter[enabled]] begin[{]
if[binary_operation[member[.enabled], &&, binary_operation[member[._target], ==, literal[null]]]] begin[{]
call[log.warning, parameter[literal["Attempt to... | Keyword[public] Keyword[void] identifier[setEnabled] operator[SEP] Keyword[boolean] identifier[enabled] operator[SEP] {
Keyword[if] operator[SEP] identifier[enabled] operator[&&] identifier[_target] operator[==] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[warning] operator[SEP... |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
int calculateEndTopBound(float yAxisDelta) {
return (int) (getView().getY() + yAxisDelta);
} | class class_name[name] begin[{]
method[calculateEndTopBound, return_type[type[int]], modifier[default], parameter[yAxisDelta]] begin[{]
return[Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[Method... | annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN] operator[SEP] annotation[@] identifier[Override] Keyword[int] identifier[calculateEndTopBound] operator[SEP] Keyword[float] identifier[yAxisDelta] operator[SEP] {
Keywo... |
public boolean compileFromPMML(final InputStream stream) {
pmmlDocument = compiler.loadModel(PMML.class.getPackage().getName(), stream);
return pmmlDocument != null;
} | class class_name[name] begin[{]
method[compileFromPMML, return_type[type[boolean]], modifier[public], parameter[stream]] begin[{]
assign[member[.pmmlDocument], call[compiler.loadModel, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(ar... | Keyword[public] Keyword[boolean] identifier[compileFromPMML] operator[SEP] Keyword[final] identifier[InputStream] identifier[stream] operator[SEP] {
identifier[pmmlDocument] operator[=] identifier[compiler] operator[SEP] identifier[loadModel] operator[SEP] identifier[PMML] operator[SEP] Keyword[class] operator[S... |
public void addItem(final InvoiceItem invoiceItem) {
Preconditions.checkState(!isBuilt, "Tree already built, unable to add new invoiceItem=%s", invoiceItem);
switch (invoiceItem.getInvoiceItemType()) {
case RECURRING:
if (invoiceItem.getAmount().compareTo(BigDecimal.ZERO) ==... | class class_name[name] begin[{]
method[addItem, return_type[void], modifier[public], parameter[invoiceItem]] begin[{]
call[Preconditions.checkState, parameter[member[.isBuilt], literal["Tree already built, unable to add new invoiceItem=%s"], member[.invoiceItem]]]
SwitchStatement(cases=... | Keyword[public] Keyword[void] identifier[addItem] operator[SEP] Keyword[final] identifier[InvoiceItem] identifier[invoiceItem] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] operator[!] identifier[isBuilt] , literal[String] , identifier[invoiceItem] operator[SEP] o... |
private Object getFirstResult(KunderaQuery query, String field, SearchHits hits, Class clazz, Metamodel metaModel,
EntityMetadata entityMetadata)
{
Object entity;
if (query.getEntityAlias().equals(field))
{
entity = getEntityObjects(clazz, entityMetadata, metaModel.e... | class class_name[name] begin[{]
method[getFirstResult, return_type[type[Object]], modifier[private], parameter[query, field, hits, clazz, metaModel, entityMetadata]] begin[{]
local_variable[type[Object], entity]
if[call[query.getEntityAlias, parameter[]]] begin[{]
... | Keyword[private] identifier[Object] identifier[getFirstResult] operator[SEP] identifier[KunderaQuery] identifier[query] , identifier[String] identifier[field] , identifier[SearchHits] identifier[hits] , identifier[Class] identifier[clazz] , identifier[Metamodel] identifier[metaModel] , identifier[EntityMetadata] i... |
public RequestResponse doDelete(String url, Map<String, Object> headers,
Map<String, Object> urlParams) {
return doDelete(url, headers, urlParams, null);
} | class class_name[name] begin[{]
method[doDelete, return_type[type[RequestResponse]], modifier[public], parameter[url, headers, urlParams]] begin[{]
return[call[.doDelete, parameter[member[.url], member[.headers], member[.urlParams], literal[null]]]]
end[}]
END[}] | Keyword[public] identifier[RequestResponse] identifier[doDelete] operator[SEP] identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[headers] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[urlPara... |
public void marshall(StopStackRequest stopStackRequest, ProtocolMarshaller protocolMarshaller) {
if (stopStackRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(stopStackRequest.getStackId(), ... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[stopStackRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.stopStackRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StopStackRequest] identifier[stopStackRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[stopStackRequest] operator[==] Other[null] operator[SEP] {
Ke... |
public static double latLonDist(double lon1, double lat1, double lon2,
double lat2) {
double[] aux;
try {
aux = PIGbsl(lon1, lat1, lon2, lat2, Ellipsoid.WGS84);
} catch (Exception e) {
// Calculator.debugThis(true, "Error while getting dist: " +
// e.getMessage(), logger);
return Double.MAX_VALUE;... | class class_name[name] begin[{]
method[latLonDist, return_type[type[double]], modifier[public static], parameter[lon1, lat1, lon2, lat2]] begin[{]
local_variable[type[double], aux]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aux, postfix_oper... | Keyword[public] Keyword[static] Keyword[double] identifier[latLonDist] operator[SEP] Keyword[double] identifier[lon1] , Keyword[double] identifier[lat1] , Keyword[double] identifier[lon2] , Keyword[double] identifier[lat2] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[aux] operator[SE... |
protected Article readArticleFromJson(String json) {
Gson gson = new Gson();
Article article = gson.fromJson(json, Article.class);
return article;
} | class class_name[name] begin[{]
method[readArticleFromJson, return_type[type[Article]], modifier[protected], parameter[json]] begin[{]
local_variable[type[Gson], gson]
local_variable[type[Article], article]
return[member[.article]]
end[}]
END[}] | Keyword[protected] identifier[Article] identifier[readArticleFromJson] operator[SEP] identifier[String] identifier[json] operator[SEP] {
identifier[Gson] identifier[gson] operator[=] Keyword[new] identifier[Gson] operator[SEP] operator[SEP] operator[SEP] identifier[Article] identifier[article] operator[=] identi... |
public List<String> getFieldValues(String fieldName) {
Utils.require(!Utils.isEmpty(fieldName), "fieldName");
return m_valueMap.get(fieldName);
} | class class_name[name] begin[{]
method[getFieldValues, return_type[type[List]], modifier[public], parameter[fieldName]] begin[{]
call[Utils.require, parameter[call[Utils.isEmpty, parameter[member[.fieldName]]], literal["fieldName"]]]
return[call[m_valueMap.get, parameter[member[.fieldNa... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getFieldValues] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] {
identifier[Utils] operator[SEP] identifier[require] operator[SEP] operator[!] identifier[Utils] operator[SEP] identifier[isEmpty] operator[... |
void parse(Reader reader) throws ParseException {
if (reader == null) {
//just log and return default properties
Log.warn("parsing NULL reader, so fallback on default configuration!");
return;
}
BufferedReader br = new BufferedReader(reader);
... | class class_name[name] begin[{]
method[parse, return_type[void], modifier[default], parameter[reader]] begin[{]
if[binary_operation[member[.reader], ==, literal[null]]] begin[{]
call[Log.warn, parameter[literal["parsing NULL reader, so fallback on default configuration!"... | Keyword[void] identifier[parse] operator[SEP] identifier[Reader] identifier[reader] operator[SEP] Keyword[throws] identifier[ParseException] {
Keyword[if] operator[SEP] identifier[reader] operator[==] Other[null] operator[SEP] {
identifier[Log] operator[SEP] identifier[warn] operator[SEP] literal[Stri... |
static Shell createTerminalConsoleShell(String prompt, String appName,
ShellCommandHandler mainHandler, InputStream input, OutputStream output) {
try {
PrintStream out = new PrintStream(output);
// Build jline terminal
jline.Terminal term = TerminalFactory.get();... | class class_name[name] begin[{]
method[createTerminalConsoleShell, return_type[type[Shell]], modifier[static], parameter[prompt, appName, mainHandler, input, output]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCr... | Keyword[static] identifier[Shell] identifier[createTerminalConsoleShell] operator[SEP] identifier[String] identifier[prompt] , identifier[String] identifier[appName] , identifier[ShellCommandHandler] identifier[mainHandler] , identifier[InputStream] identifier[input] , identifier[OutputStream] identifier[output] op... |
private static TagList getMonitorTags(Object obj) {
try {
Set<Field> fields = getFieldsAnnotatedBy(obj.getClass(), MonitorTags.class);
for (Field field : fields) {
field.setAccessible(true);
return (TagList) field.get(obj);
}
Set<Method> methods = getMethodsAnnotatedBy(obj.g... | class class_name[name] begin[{]
method[getMonitorTags, return_type[type[TagList]], modifier[private static], parameter[obj]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(argu... | Keyword[private] Keyword[static] identifier[TagList] identifier[getMonitorTags] operator[SEP] identifier[Object] identifier[obj] operator[SEP] {
Keyword[try] {
identifier[Set] operator[<] identifier[Field] operator[>] identifier[fields] operator[=] identifier[getFieldsAnnotatedBy] operator[SEP] identi... |
@BetaApi
public final ListAutoscalersPagedResponse listAutoscalers(ProjectZoneName zone) {
ListAutoscalersHttpRequest request =
ListAutoscalersHttpRequest.newBuilder()
.setZone(zone == null ? null : zone.toString())
.build();
return listAutoscalers(request);
} | class class_name[name] begin[{]
method[listAutoscalers, return_type[type[ListAutoscalersPagedResponse]], modifier[final public], parameter[zone]] begin[{]
local_variable[type[ListAutoscalersHttpRequest], request]
return[call[.listAutoscalers, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[ListAutoscalersPagedResponse] identifier[listAutoscalers] operator[SEP] identifier[ProjectZoneName] identifier[zone] operator[SEP] {
identifier[ListAutoscalersHttpRequest] identifier[request] operator[=] identifier[ListAutoscalersHttpReq... |
public ReloadableType getReloadableType(String slashedClassName) {
int id = getTypeIdFor(slashedClassName, true);
if (id >= reloadableTypesSize) {
return null;
}
return getReloadableType(id);
} | class class_name[name] begin[{]
method[getReloadableType, return_type[type[ReloadableType]], modifier[public], parameter[slashedClassName]] begin[{]
local_variable[type[int], id]
if[binary_operation[member[.id], >=, member[.reloadableTypesSize]]] begin[{]
return[literal[null... | Keyword[public] identifier[ReloadableType] identifier[getReloadableType] operator[SEP] identifier[String] identifier[slashedClassName] operator[SEP] {
Keyword[int] identifier[id] operator[=] identifier[getTypeIdFor] operator[SEP] identifier[slashedClassName] , literal[boolean] operator[SEP] operator[SEP] Keywor... |
public void close() {
synchronized (lock) {
while (!available.isEmpty()) {
PooledConnection pci = available.pop();
try {
pci.close();
} catch (SQLException e) {
}
}
available = null;
while (!used.isEmpty()) {
PooledConnection pci = used.pop()... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
while[call[available.isEmpty, parameter[]]] begin[{]
local_variable[type[PooledConnection], pci]
... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[while] operator[SEP] operator[!] identifier[available] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
... |
static CTFont resolveFont (Font font) {
CTFont ctFont = fonts.get(font == null ? DEFAULT_FONT : font);
if (ctFont == null) {
String iosName = getVariant(font.name, font.style);
fonts.put(font, ctFont = CTFont.create(iosName, font.size, CGAffineTransform.Identity()));
}
return ctFont;
} | class class_name[name] begin[{]
method[resolveFont, return_type[type[CTFont]], modifier[static], parameter[font]] begin[{]
local_variable[type[CTFont], ctFont]
if[binary_operation[member[.ctFont], ==, literal[null]]] begin[{]
local_variable[type[String], iosName]
... | Keyword[static] identifier[CTFont] identifier[resolveFont] operator[SEP] identifier[Font] identifier[font] operator[SEP] {
identifier[CTFont] identifier[ctFont] operator[=] identifier[fonts] operator[SEP] identifier[get] operator[SEP] identifier[font] operator[==] Other[null] operator[?] identifier[DEFAULT_FONT]... |
public Observable<ServiceResponse<AppInner>> updateWithServiceResponseAsync(String resourceGroupName, String resourceName, AppPatch appPatch) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
... | class class_name[name] begin[{]
method[updateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, resourceName, appPatch]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[AppInner] operator[>] operator[>] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[AppPatch] identif... |
protected RDFName getStateResource(String state)
throws ResourceIndexException {
if (state == null) {
throw new ResourceIndexException("State cannot be null");
} else if (state.equals("A")) {
return MODEL.ACTIVE;
} else if (state.equals("D")) {
ret... | class class_name[name] begin[{]
method[getStateResource, return_type[type[RDFName]], modifier[protected], parameter[state]] begin[{]
if[binary_operation[member[.state], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | Keyword[protected] identifier[RDFName] identifier[getStateResource] operator[SEP] identifier[String] identifier[state] operator[SEP] Keyword[throws] identifier[ResourceIndexException] {
Keyword[if] operator[SEP] identifier[state] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] ide... |
@Override
protected void paintComponent(Graphics g) {
final Graphics2D G2 = (Graphics2D) g.create();
G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
G2.se... | class class_name[name] begin[{]
method[paintComponent, return_type[void], modifier[protected], parameter[g]] begin[{]
local_variable[type[Graphics2D], G2]
call[G2.setRenderingHint, parameter[member[RenderingHints.KEY_ANTIALIASING], member[RenderingHints.VALUE_ANTIALIAS_ON]]]
... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[paintComponent] operator[SEP] identifier[Graphics] identifier[g] operator[SEP] {
Keyword[final] identifier[Graphics2D] identifier[G2] operator[=] operator[SEP] identifier[Graphics2D] operator[SEP] identifier[g] operator[SEP] identifie... |
public String consoleLogFormat(LogRecord logRecord, String txt) {
StringBuilder sb = new StringBuilder(256);
sb.append(BaseTraceFormatter.levelToString(logRecord.getLevel()));
sb.append(txt);
Throwable t = logRecord.getThrown();
if (t != null) {
String s = t.getLocali... | class class_name[name] begin[{]
method[consoleLogFormat, return_type[type[String]], modifier[public], parameter[logRecord, txt]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[call[BaseTraceFormatter.levelToString, parameter[call[logRecord.getLevel, parameter... | Keyword[public] identifier[String] identifier[consoleLogFormat] operator[SEP] identifier[LogRecord] identifier[logRecord] , identifier[String] identifier[txt] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[256] operator[SEP] operat... |
public void doSuggestOpenSearch(StaplerRequest req, StaplerResponse rsp, @QueryParameter String q) throws IOException, ServletException {
rsp.setContentType(Flavor.JSON.contentType);
DataWriter w = Flavor.JSON.createDataWriter(null, rsp);
w.startArray();
w.value(q);
w.startArray... | class class_name[name] begin[{]
method[doSuggestOpenSearch, return_type[void], modifier[public], parameter[req, rsp, q]] begin[{]
call[rsp.setContentType, parameter[member[Flavor.JSON.contentType]]]
local_variable[type[DataWriter], w]
call[w.startArray, parameter[]]
... | Keyword[public] Keyword[void] identifier[doSuggestOpenSearch] operator[SEP] identifier[StaplerRequest] identifier[req] , identifier[StaplerResponse] identifier[rsp] , annotation[@] identifier[QueryParameter] identifier[String] identifier[q] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletEx... |
protected double[] aggregateInternal(double[][] descriptors) {
double[] vlad = new double[numCentroids * descriptorLength];
// when there are 0 local descriptors extracted
if (descriptors.length == 0) {
return vlad;
}
for (double[] descriptor : descriptors) {
int nnIndex = computeNearestCentroi... | class class_name[name] begin[{]
method[aggregateInternal, return_type[type[double]], modifier[protected], parameter[descriptors]] begin[{]
local_variable[type[double], vlad]
if[binary_operation[member[descriptors.length], ==, literal[0]]] begin[{]
return[member[.vlad]]
... | Keyword[protected] Keyword[double] operator[SEP] operator[SEP] identifier[aggregateInternal] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[descriptors] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[vlad] operator[=] Keyword[new] Keyword[... |
private void parseClassList() {
try {
int classInfoLength = ByteUtils.byteToInt(this.value, this.count - classInfoByteLength, classInfoByteLength);
this.index = this.count - classInfoLength - classInfoByteLength;
this.dataEnd = this.index;
int end = this.count - classInfoByteLength;
classList = n... | class class_name[name] begin[{]
method[parseClassList, return_type[void], modifier[private], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operat... | Keyword[private] Keyword[void] identifier[parseClassList] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[int] identifier[classInfoLength] operator[=] identifier[ByteUtils] operator[SEP] identifier[byteToInt] operator[SEP] Keyword[this] operator[SEP] identifier[value] , Keyword[this] operator[SE... |
public Guid append(Guid... guids) throws IOException {
if (guids == null || guids.length == 0) {
return this;
}
return combine(ArrayUtils.add(guids, this));
} | class class_name[name] begin[{]
method[append, return_type[type[Guid]], modifier[public], parameter[guids]] begin[{]
if[binary_operation[binary_operation[member[.guids], ==, literal[null]], ||, binary_operation[member[guids.length], ==, literal[0]]]] begin[{]
return[THIS[]]
... | Keyword[public] identifier[Guid] identifier[append] operator[SEP] identifier[Guid] operator[...] identifier[guids] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[guids] operator[==] Other[null] operator[||] identifier[guids] operator[SEP] identifier[length] operator[... |
public SQLException exceptionWithQuery(ParameterHolder[] parameters, SQLException sqlEx,
PrepareResult serverPrepareResult) {
if (sqlEx.getCause() instanceof SocketTimeoutException) {
return new SQLException("Connection timed out", CONNECTION_EXCEPTION.getSqlState(), sqlEx);
}
if (options.dumpQu... | class class_name[name] begin[{]
method[exceptionWithQuery, return_type[type[SQLException]], modifier[public], parameter[parameters, sqlEx, serverPrepareResult]] begin[{]
if[binary_operation[call[sqlEx.getCause, parameter[]], instanceof, type[SocketTimeoutException]]] begin[{]
return... | Keyword[public] identifier[SQLException] identifier[exceptionWithQuery] operator[SEP] identifier[ParameterHolder] operator[SEP] operator[SEP] identifier[parameters] , identifier[SQLException] identifier[sqlEx] , identifier[PrepareResult] identifier[serverPrepareResult] operator[SEP] {
Keyword[if] operator[SEP]... |
private void setMessagingEngineUuid(SIBUuid8 uuid)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "setMessagingEngineUuid", new Object[] { uuid });
messagingEngineUuid = uuid;
if (tc.isEntryEnabled())
SibTr.exit(tc, "setMessagingEngineUuid");
} | class class_name[name] begin[{]
method[setMessagingEngineUuid, return_type[void], modifier[private], parameter[uuid]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["setMessagingEngineUuid"], ArrayCreator(dimensions=[None]... | Keyword[private] Keyword[void] identifier[setMessagingEngineUuid] operator[SEP] identifier[SIBUuid8] identifier[uuid] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] opera... |
@Override
public void createPartControl(Composite parent) {
Tree main =
new Tree(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL
| SWT.V_SCROLL);
main.setHeaderVisible(true);
main.setLinesVisible(false);
main.setLayoutData(new GridData(GridData.FILL_BOTH));
TreeColumn s... | class class_name[name] begin[{]
method[createPartControl, return_type[void], modifier[public], parameter[parent]] begin[{]
local_variable[type[Tree], main]
call[main.setHeaderVisible, parameter[literal[true]]]
call[main.setLinesVisible, parameter[literal[false]]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[createPartControl] operator[SEP] identifier[Composite] identifier[parent] operator[SEP] {
identifier[Tree] identifier[main] operator[=] Keyword[new] identifier[Tree] operator[SEP] identifier[parent] , identifier[SWT] operator[SEP] ident... |
public void setupSFields()
{
this.getRecord(UserGroup.USER_GROUP_FILE).getField(UserGroup.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
} | class class_name[name] begin[{]
method[setupSFields, return_type[void], modifier[public], parameter[]] begin[{]
THIS[call[None.getRecord, parameter[member[UserGroup.USER_GROUP_FILE]]]call[None.getField, parameter[member[UserGroup.DESCRIPTION]]]call[None.setupDefaultView, parameter[THIS[call[Non... | Keyword[public] Keyword[void] identifier[setupSFields] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[UserGroup] operator[SEP] identifier[USER_GROUP_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[UserGroup] operator[SEP] i... |
public final <TRight, TLeftEnd, TRightEnd, R> Flux<R> join(
Publisher<? extends TRight> other,
Function<? super T, ? extends Publisher<TLeftEnd>> leftEnd,
Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd,
BiFunction<? super T, ? super TRight, ? extends R> resultSelector
) {
return onAsse... | class class_name[name] begin[{]
method[join, return_type[type[Flux]], modifier[final public], parameter[other, leftEnd, rightEnd, resultSelector]] begin[{]
return[call[.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberRef... | Keyword[public] Keyword[final] operator[<] identifier[TRight] , identifier[TLeftEnd] , identifier[TRightEnd] , identifier[R] operator[>] identifier[Flux] operator[<] identifier[R] operator[>] identifier[join] operator[SEP] identifier[Publisher] operator[<] operator[?] Keyword[extends] identifier[TRight] operator[>] ... |
private void addFunGroup(String funGroupToken, int addPos) {
//BOND MODIFICATION
//Alkanes - Single bond
if ("an".equals(funGroupToken)) {
//Do nothing since all bonds are single by default.
}
//Alkenes - Double bond
else if ("en".equals(funGroupToken)) {
... | class class_name[name] begin[{]
method[addFunGroup, return_type[void], modifier[private], parameter[funGroupToken, addPos]] begin[{]
if[literal["an"]] begin[{]
else begin[{]
if[literal["en"]] begin[{]
if[binary_operation[member[.addPos], <, l... | Keyword[private] Keyword[void] identifier[addFunGroup] operator[SEP] identifier[String] identifier[funGroupToken] , Keyword[int] identifier[addPos] operator[SEP] {
Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] {
... |
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
return recordReader.loadFromMetaData(recordMetaDatas);
} | class class_name[name] begin[{]
method[loadFromMetaData, return_type[type[List]], modifier[public], parameter[recordMetaDatas]] begin[{]
return[call[recordReader.loadFromMetaData, parameter[member[.recordMetaDatas]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Record] operator[>] identifier[loadFromMetaData] operator[SEP] identifier[List] operator[<] identifier[RecordMetaData] operator[>] identifier[recordMetaDatas] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword... |
public static String getEsBuildVersion() {
URL url = ApimanEmbeddedElastic.class.getResource("apiman-embedded-elastic.properties");
if (url == null) {
throw new RuntimeException("embedded-elastic.properties missing.");
} else {
Properties allProperties = new Properties();... | class class_name[name] begin[{]
method[getEsBuildVersion, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[URL], url]
if[binary_operation[member[.url], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[static] identifier[String] identifier[getEsBuildVersion] operator[SEP] operator[SEP] {
identifier[URL] identifier[url] operator[=] identifier[ApimanEmbeddedElastic] operator[SEP] Keyword[class] operator[SEP] identifier[getResource] operator[SEP] literal[String] operator[SEP] operator[SEP]... |
public BufferedImage createImage() {
BufferedImage image = null;
Graphics2D graphics = null;
for (int layer = 0; layer < 4; layer++) {
BufferedImage layerImage = layeredImage[layer];
if (layerImage != null) {
if (image == null) {
image = layerImage;
graphics = layeredGraphics[layer];
... | class class_name[name] begin[{]
method[createImage, return_type[type[BufferedImage]], modifier[public], parameter[]] begin[{]
local_variable[type[BufferedImage], image]
local_variable[type[Graphics2D], graphics]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDecla... | Keyword[public] identifier[BufferedImage] identifier[createImage] operator[SEP] operator[SEP] {
identifier[BufferedImage] identifier[image] operator[=] Other[null] operator[SEP] identifier[Graphics2D] identifier[graphics] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[la... |
public static int readIntChild(
Node node, String childNodeName, int defaultValue)
{
if (node == null)
{
throw new XmlException(
"Tried to read int value from child of null node");
}
Node child = XmlUtils.getFirstChild(node, childNodeName);... | class class_name[name] begin[{]
method[readIntChild, return_type[type[int]], modifier[public static], parameter[node, childNodeName, defaultValue]] begin[{]
if[binary_operation[member[.node], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(post... | Keyword[public] Keyword[static] Keyword[int] identifier[readIntChild] operator[SEP] identifier[Node] identifier[node] , identifier[String] identifier[childNodeName] , Keyword[int] identifier[defaultValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] {
... |
public String getLength(String imgName) {
String ret = (String)m_lengths.get(imgName);
if (ret == null) {
return "";
}
return ret;
} | class class_name[name] begin[{]
method[getLength, return_type[type[String]], modifier[public], parameter[imgName]] begin[{]
local_variable[type[String], ret]
if[binary_operation[member[.ret], ==, literal[null]]] begin[{]
return[literal[""]]
else begin[{]
None
... | Keyword[public] identifier[String] identifier[getLength] operator[SEP] identifier[String] identifier[imgName] operator[SEP] {
identifier[String] identifier[ret] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[m_lengths] operator[SEP] identifier[get] operator[SEP] identifier[imgName] operato... |
public com.google.protobuf.ByteString
getPivotForPredNameBytes() {
java.lang.Object ref = pivotForPredName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
pivotForPredName... | class class_name[name] begin[{]
method[getPivotForPredNameBytes, return_type[type[com]], modifier[public], parameter[]] begin[{]
local_variable[type[java], ref]
if[binary_operation[member[.ref], instanceof, type[java]]] begin[{]
local_variable[type[com], b]
... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getPivotForPredNameBytes] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] ... |
@Override
public boolean relative(int rows) throws SQLException {
checkClosed();
if (rowCount == 0) {
return false;
}
if (cursorPosition == Position.afterLast && rows > 0) {
return false;
}
if (cursorPosition == Position.beforeFirst && rows <=... | class class_name[name] begin[{]
method[relative, return_type[type[boolean]], modifier[public], parameter[rows]] begin[{]
call[.checkClosed, parameter[]]
if[binary_operation[member[.rowCount], ==, literal[0]]] begin[{]
return[literal[false]]
else begin[{]
None... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[relative] operator[SEP] Keyword[int] identifier[rows] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rowCount] operator[=... |
private void readFields() throws IOException, ClassfileFormatException {
// Fields
final int fieldCount = inputStreamOrByteBuffer.readUnsignedShort();
for (int i = 0; i < fieldCount; i++) {
// Info on modifier flags: http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-... | class class_name[name] begin[{]
method[readFields, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], fieldCount]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], i... | Keyword[private] Keyword[void] identifier[readFields] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassfileFormatException] {
Keyword[final] Keyword[int] identifier[fieldCount] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operat... |
@Nullable
public static ImmutablePair<Schema, Schema> findSchema(Set<Schema> output, Set<Schema> input) {
ImmutablePair<Schema, Schema> compatibleSchema = null;
for (Schema outputSchema : output) {
for (Schema inputSchema : input) {
if (outputSchema.equals(inputSchema)) {
return new I... | class class_name[name] begin[{]
method[findSchema, return_type[type[ImmutablePair]], modifier[public static], parameter[output, input]] begin[{]
local_variable[type[ImmutablePair], compatibleSchema]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[ImmutablePair] operator[<] identifier[Schema] , identifier[Schema] operator[>] identifier[findSchema] operator[SEP] identifier[Set] operator[<] identifier[Schema] operator[>] identifier[output] , identifier[Set] operator[<] identifier[Schem... |
private KeyPersons getKeyPersons(BudgetPeriodDto periodInfo) {
KeyPersons keyPersons = KeyPersons.Factory.newInstance();
if (periodInfo != null) {
if (periodInfo.getKeyPersons() != null) {
KeyPersonDataType[] keyPersonDataTypeArray = new KeyPersonDataType[periodInfo.getKeyPer... | class class_name[name] begin[{]
method[getKeyPersons, return_type[type[KeyPersons]], modifier[private], parameter[periodInfo]] begin[{]
local_variable[type[KeyPersons], keyPersons]
if[binary_operation[member[.periodInfo], !=, literal[null]]] begin[{]
if[binary_op... | Keyword[private] identifier[KeyPersons] identifier[getKeyPersons] operator[SEP] identifier[BudgetPeriodDto] identifier[periodInfo] operator[SEP] {
identifier[KeyPersons] identifier[keyPersons] operator[=] identifier[KeyPersons] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP]... |
public void sleeShutdown() {
logger.info("Undeploying all Deployable Units due to SLEE shutdown");
// undeploy each DU in reverse order
while(!deployedDUs.isEmpty()) {
DeployableUnit du = deployedDUs.removeLast();
try {
uninstallDeployableUnit(du);
}
catch (Exception e) {
... | class class_name[name] begin[{]
method[sleeShutdown, return_type[void], modifier[public], parameter[]] begin[{]
call[logger.info, parameter[literal["Undeploying all Deployable Units due to SLEE shutdown"]]]
while[call[deployedDUs.isEmpty, parameter[]]] begin[{]
local... | Keyword[public] Keyword[void] identifier[sleeShutdown] operator[SEP] operator[SEP] {
identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[deployedDUs] operator[SEP] identifier[isEmpty] operator[SEP] operato... |
@Override
public BundleEntry getEntry(String path) {
path = preSlashify(path);
if (path.equals("/")) {
return new RootModuleEntry(container);
}
Entry entry = container.getEntry(path);
return entry == null ? null : new ModuleEntry(entry, postSlashify(path, entry));... | class class_name[name] begin[{]
method[getEntry, return_type[type[BundleEntry]], modifier[public], parameter[path]] begin[{]
assign[member[.path], call[.preSlashify, parameter[member[.path]]]]
if[call[path.equals, parameter[literal["/"]]]] begin[{]
return[ClassCreato... | annotation[@] identifier[Override] Keyword[public] identifier[BundleEntry] identifier[getEntry] operator[SEP] identifier[String] identifier[path] operator[SEP] {
identifier[path] operator[=] identifier[preSlashify] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pa... |
@Override
public boolean matches(TargetProperties targetConatiner, IBond targetBond) {
if (this.smartQueryBond != null) {
return smartQueryBond.matches(targetBond);
} else {
if (!isBondMatchFlag()) {
return true;
}
if (isBondMatchFlag()... | class class_name[name] begin[{]
method[matches, return_type[type[boolean]], modifier[public], parameter[targetConatiner, targetBond]] begin[{]
if[binary_operation[THIS[member[None.smartQueryBond]], !=, literal[null]]] begin[{]
return[call[smartQueryBond.matches, parameter[member[.ta... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[matches] operator[SEP] identifier[TargetProperties] identifier[targetConatiner] , identifier[IBond] identifier[targetBond] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[smartQueryBond] operator[!=] ... |
public java.util.List<ListPoliciesGrantingServiceAccessEntry> getPoliciesGrantingServiceAccess() {
if (policiesGrantingServiceAccess == null) {
policiesGrantingServiceAccess = new com.amazonaws.internal.SdkInternalList<ListPoliciesGrantingServiceAccessEntry>();
}
return policiesGrant... | class class_name[name] begin[{]
method[getPoliciesGrantingServiceAccess, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.policiesGrantingServiceAccess], ==, literal[null]]] begin[{]
assign[member[.policiesGrantingServiceAccess... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ListPoliciesGrantingServiceAccessEntry] operator[>] identifier[getPoliciesGrantingServiceAccess] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[policiesGrantingServiceAccess] ... |
@Override
public void start(PrintStream writer, String[] params) {
parse(params);
out = writer;
if (getId() == 0) {
Log.debug("round 1");
send(1, new Token2(1, 1));
}
} | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[writer, params]] begin[{]
call[.parse, parameter[member[.params]]]
assign[member[.out], member[.writer]]
if[binary_operation[call[.getId, parameter[]], ==, literal[0]]] b... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[PrintStream] identifier[writer] , identifier[String] operator[SEP] operator[SEP] identifier[params] operator[SEP] {
identifier[parse] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifie... |
@SuppressWarnings("unchecked")
public static <T> T execMethod(Method method, Object target, Object... params) {
allowAccess(method);
try {
return (T) method.invoke(target, params);
} catch (Throwable e) {
throw new ReflectException(e);
}
} | class class_name[name] begin[{]
method[execMethod, return_type[type[T]], modifier[public static], parameter[method, target, params]] begin[{]
call[.allowAccess, parameter[member[.method]]]
TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberR... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[execMethod] operator[SEP] identifier[Method] identifier[method] , identifier[Object] identifier[target] , identifier[Object] operator[..... |
private boolean validateAliasiablePrimitiveCall(NodeTraversal t, Node n, String methodName) {
return validatePrimitiveCallWithMessage(
t,
n,
methodName,
ProcessClosurePrimitives.CLOSURE_CALL_CANNOT_BE_ALIASED_OUTSIDE_MODULE_ERROR);
} | class class_name[name] begin[{]
method[validateAliasiablePrimitiveCall, return_type[type[boolean]], modifier[private], parameter[t, n, methodName]] begin[{]
return[call[.validatePrimitiveCallWithMessage, parameter[member[.t], member[.n], member[.methodName], member[ProcessClosurePrimitives.CLOSURE_CALL... | Keyword[private] Keyword[boolean] identifier[validateAliasiablePrimitiveCall] operator[SEP] identifier[NodeTraversal] identifier[t] , identifier[Node] identifier[n] , identifier[String] identifier[methodName] operator[SEP] {
Keyword[return] identifier[validatePrimitiveCallWithMessage] operator[SEP] identifier[... |
public void marshall(BatchGetItemRequest batchGetItemRequest, ProtocolMarshaller protocolMarshaller) {
if (batchGetItemRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(batchGetItemRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[batchGetItemRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.batchGetItemRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BatchGetItemRequest] identifier[batchGetItemRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[batchGetItemRequest] operator[==] Other[null] operator[SEP] {
... |
@Override
public EClass getIfcShapeRepresentation() {
if (ifcShapeRepresentationEClass == null) {
ifcShapeRepresentationEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(597);
}
return ifcShapeRepresentationEClass;
} | class class_name[name] begin[{]
method[getIfcShapeRepresentation, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcShapeRepresentationEClass], ==, literal[null]]] begin[{]
assign[member[.ifcShapeRepresentationEClass], Cast... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcShapeRepresentation] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcShapeRepresentationEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcShapeRepresentationEClass] operator[=] ope... |
private void obtainNavigationSelectionColor() {
int color;
try {
color = ThemeUtil.getColor(this, R.attr.navigationSelectionColor);
} catch (NotFoundException e) {
color = ContextCompat.getColor(this, R.color.preference_selection_color_light);
}
setNavig... | class class_name[name] begin[{]
method[obtainNavigationSelectionColor, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], color]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=color, postfix_operators=[], prefi... | Keyword[private] Keyword[void] identifier[obtainNavigationSelectionColor] operator[SEP] operator[SEP] {
Keyword[int] identifier[color] operator[SEP] Keyword[try] {
identifier[color] operator[=] identifier[ThemeUtil] operator[SEP] identifier[getColor] operator[SEP] Keyword[this] , identifier[R] operat... |
@Override
public void warn(final MessageItem messageItem) {
getLogger().log(messageItem.getMarker(), FQCN, LocationAwareLogger.WARN_INT, messageItem.getText(), null, null);
} | class class_name[name] begin[{]
method[warn, return_type[void], modifier[public], parameter[messageItem]] begin[{]
call[.getLogger, parameter[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[warn] operator[SEP] Keyword[final] identifier[MessageItem] identifier[messageItem] operator[SEP] {
identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[messageItem] operator[SEP] identi... |
public void save(@NonNull View view) {
int viewId = view.getId();
Preconditions.checkArgument(viewId != 0,
"Cannot save state for View with no id " + view.getClass().getSimpleName());
SparseArray<Parcelable> state = new SparseArray<>();
view.saveHierarchyState(state);
viewStateById.put(viewI... | class class_name[name] begin[{]
method[save, return_type[void], modifier[public], parameter[view]] begin[{]
local_variable[type[int], viewId]
call[Preconditions.checkArgument, parameter[binary_operation[member[.viewId], !=, literal[0]], binary_operation[literal["Cannot save state for Vi... | Keyword[public] Keyword[void] identifier[save] operator[SEP] annotation[@] identifier[NonNull] identifier[View] identifier[view] operator[SEP] {
Keyword[int] identifier[viewId] operator[=] identifier[view] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[Preconditions] operato... |
@Nonnull public <T> T getInstance(@Nonnull Class<T> type) {
return getInstance(new Key<>(type));
} | class class_name[name] begin[{]
method[getInstance, return_type[type[T]], modifier[public], parameter[type]] begin[{]
return[call[.getInstance, parameter[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_ty... | annotation[@] identifier[Nonnull] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[getInstance] operator[SEP] annotation[@] identifier[Nonnull] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] {
Keyword[return] identifier[getInstance] operator[S... |
protected XmlElement checkArrayWhere(IntrospectedTable introspectedTable) {
XmlElement where = new XmlElement("where");
XmlElement include = new XmlElement("include");
include.addAttribute(new Attribute("refid", IDENTIFIERS_ARRAY_CONDITIONS));
where.addElement(include);
return where;
} | class class_name[name] begin[{]
method[checkArrayWhere, return_type[type[XmlElement]], modifier[protected], parameter[introspectedTable]] begin[{]
local_variable[type[XmlElement], where]
local_variable[type[XmlElement], include]
call[include.addAttribute, parameter[ClassCreator(... | Keyword[protected] identifier[XmlElement] identifier[checkArrayWhere] operator[SEP] identifier[IntrospectedTable] identifier[introspectedTable] operator[SEP] {
identifier[XmlElement] identifier[where] operator[=] Keyword[new] identifier[XmlElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identi... |
public InsertAllResponse insert(String rowId1, String rowId2) {
// [START ]
List<RowToInsert> rows = new ArrayList<>();
Map<String, Object> row1 = new HashMap<>();
row1.put("stringField", "value1");
row1.put("booleanField", true);
Map<String, Object> row2 = new HashMap<>();
row2.put("stringF... | class class_name[name] begin[{]
method[insert, return_type[type[InsertAllResponse]], modifier[public], parameter[rowId1, rowId2]] begin[{]
local_variable[type[List], rows]
local_variable[type[Map], row1]
call[row1.put, parameter[literal["stringField"], literal["value1"]]]
... | Keyword[public] identifier[InsertAllResponse] identifier[insert] operator[SEP] identifier[String] identifier[rowId1] , identifier[String] identifier[rowId2] operator[SEP] {
identifier[List] operator[<] identifier[RowToInsert] operator[>] identifier[rows] operator[=] Keyword[new] identifier[ArrayList] operator[<... |
public UberNode getFirstByRel(String rel) {
// TODO consider less naive impl
for (UberNode node : data) {
List<String> myRels = node.getRel();
if (myRels != null) {
for (String myRel : myRels) {
if (rel.equals(myRel)) {
... | class class_name[name] begin[{]
method[getFirstByRel, return_type[type[UberNode]], modifier[public], parameter[rel]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arg... | Keyword[public] identifier[UberNode] identifier[getFirstByRel] operator[SEP] identifier[String] identifier[rel] operator[SEP] {
Keyword[for] operator[SEP] identifier[UberNode] identifier[node] operator[:] identifier[data] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] ide... |
public static boolean is_vargiya5(String str)
{
if (str.equals("Y") || str.equals("m") || str.equals("N") || str.equals("R") || str.equals("n")) return true;
return false;
} | class class_name[name] begin[{]
method[is_vargiya5, return_type[type[boolean]], modifier[public static], parameter[str]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[call[str.equals, parameter[literal["Y"]]], ||, call[str.equals, parameter[literal["m"]]]], ||,... | Keyword[public] Keyword[static] Keyword[boolean] identifier[is_vargiya5] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[str] operator[SEP] identifier[eq... |
private void printPlugins() {
final List<String> installedPlugins = Plugins.getInstalledPlugins();
for (final String plugin : installedPlugins) {
System.out.println(plugin);
}
} | class class_name[name] begin[{]
method[printPlugins, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[List], installedPlugins]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(membe... | Keyword[private] Keyword[void] identifier[printPlugins] operator[SEP] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[installedPlugins] operator[=] identifier[Plugins] operator[SEP] identifier[getInstalledPlugins] operator[SEP] operator[SEP] operator[SEP] Key... |
public void marshall(EnvironmentPropertyUpdates environmentPropertyUpdates, ProtocolMarshaller protocolMarshaller) {
if (environmentPropertyUpdates == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(e... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[environmentPropertyUpdates, protocolMarshaller]] begin[{]
if[binary_operation[member[.environmentPropertyUpdates], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[EnvironmentPropertyUpdates] identifier[environmentPropertyUpdates] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[environmentPropertyUpdates] operator[==] Other[null]... |
@SuppressWarnings({ "unchecked", "rawtypes" })
private List<AnnotationResolver> getAnnotationResolvers(GeneratorContext context, TreeLogger logger) {
java.lang.reflect.Method m;
ArrayList args = new ArrayList();
ArrayList types = new ArrayList();
types.add(GeneratorContext.class);
... | class class_name[name] begin[{]
method[getAnnotationResolvers, return_type[type[List]], modifier[private], parameter[context, logger]] begin[{]
local_variable[type[java], m]
local_variable[type[ArrayList], args]
local_variable[type[ArrayList], types]
call[types.add, para... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[private] identifier[List] operator[<] identifier[AnnotationResolver] operator[>] identifier[getAnnotationResolvers] operator[SEP] identifier[GeneratorContext] identifier[context] , identifier... |
private void readCalendars(Project project, HashMap<BigInteger, ProjectCalendar> map)
{
Project.Calendars calendars = project.getCalendars();
if (calendars != null)
{
LinkedList<Pair<ProjectCalendar, BigInteger>> baseCalendars = new LinkedList<Pair<ProjectCalendar, BigInteger>>();
... | class class_name[name] begin[{]
method[readCalendars, return_type[void], modifier[private], parameter[project, map]] begin[{]
local_variable[type[Project], calendars]
if[binary_operation[member[.calendars], !=, literal[null]]] begin[{]
local_variable[type[LinkedList], baseCa... | Keyword[private] Keyword[void] identifier[readCalendars] operator[SEP] identifier[Project] identifier[project] , identifier[HashMap] operator[<] identifier[BigInteger] , identifier[ProjectCalendar] operator[>] identifier[map] operator[SEP] {
identifier[Project] operator[SEP] identifier[Calendars] identifier[ca... |
public static Path addExtension(Path path, String... extensions) {
StringBuilder pathStringBuilder = new StringBuilder(path.toString());
for (String extension : extensions) {
if (!Strings.isNullOrEmpty(extension)) {
pathStringBuilder.append(extension);
}
}
return new Path(pathStringB... | class class_name[name] begin[{]
method[addExtension, return_type[type[Path]], modifier[public static], parameter[path, extensions]] begin[{]
local_variable[type[StringBuilder], pathStringBuilder]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arg... | Keyword[public] Keyword[static] identifier[Path] identifier[addExtension] operator[SEP] identifier[Path] identifier[path] , identifier[String] operator[...] identifier[extensions] operator[SEP] {
identifier[StringBuilder] identifier[pathStringBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[... |
private static void generateSerializeOnXml(BindTypeContext context, BindEntity entity) {
// @formatter:off
MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("serializeOnXml")
.addJavadoc("method for xml serialization\n").addAnnotation(Override.class)
.addModifiers(Modifier.PUBLIC)
// .addParam... | class class_name[name] begin[{]
method[generateSerializeOnXml, return_type[void], modifier[private static], parameter[context, entity]] begin[{]
local_variable[type[MethodSpec], methodBuilder]
call[methodBuilder.beginControlFlow, parameter[literal["if (currentEventType == 0)"]]]
... | Keyword[private] Keyword[static] Keyword[void] identifier[generateSerializeOnXml] operator[SEP] identifier[BindTypeContext] identifier[context] , identifier[BindEntity] identifier[entity] operator[SEP] {
identifier[MethodSpec] operator[SEP] identifier[Builder] identifier[methodBuilder] operator[=] identifier[Me... |
public static Config parseResources(String resource, ConfigParseOptions options) {
ConfigParseOptions withLoader = ensureClassLoader(options, "parseResources");
return Parseable.newResources(resource, withLoader).parse().toConfig();
} | class class_name[name] begin[{]
method[parseResources, return_type[type[Config]], modifier[public static], parameter[resource, options]] begin[{]
local_variable[type[ConfigParseOptions], withLoader]
return[call[Parseable.newResources, parameter[member[.resource], member[.withLoader]]]]
end[... | Keyword[public] Keyword[static] identifier[Config] identifier[parseResources] operator[SEP] identifier[String] identifier[resource] , identifier[ConfigParseOptions] identifier[options] operator[SEP] {
identifier[ConfigParseOptions] identifier[withLoader] operator[=] identifier[ensureClassLoader] operator[SEP] i... |
public static Webcam openDevice( String deviceName , int desiredWidth , int desiredHeight ) {
Webcam webcam = findDevice(deviceName);
if( webcam == null )
throw new IllegalArgumentException("Can't find camera "+deviceName);
adjustResolution(webcam,desiredWidth,desiredHeight);
webcam.open();
return webcam;
... | class class_name[name] begin[{]
method[openDevice, return_type[type[Webcam]], modifier[public static], parameter[deviceName, desiredWidth, desiredHeight]] begin[{]
local_variable[type[Webcam], webcam]
if[binary_operation[member[.webcam], ==, literal[null]]] begin[{]
ThrowStatement(expre... | Keyword[public] Keyword[static] identifier[Webcam] identifier[openDevice] operator[SEP] identifier[String] identifier[deviceName] , Keyword[int] identifier[desiredWidth] , Keyword[int] identifier[desiredHeight] operator[SEP] {
identifier[Webcam] identifier[webcam] operator[=] identifier[findDevice] operator[SE... |
@CheckResult
@NonNull
public final PowerAdapter prepend(@NonNull @LayoutRes int... layoutResources) {
checkNotNull(layoutResources, "layoutResources");
if (layoutResources.length == 0) {
return this;
}
return prepend(asAdapter(layoutResources));
} | class class_name[name] begin[{]
method[prepend, return_type[type[PowerAdapter]], modifier[final public], parameter[layoutResources]] begin[{]
call[.checkNotNull, parameter[member[.layoutResources], literal["layoutResources"]]]
if[binary_operation[member[layoutResources.length], ... | annotation[@] identifier[CheckResult] annotation[@] identifier[NonNull] Keyword[public] Keyword[final] identifier[PowerAdapter] identifier[prepend] operator[SEP] annotation[@] identifier[NonNull] annotation[@] identifier[LayoutRes] Keyword[int] operator[...] identifier[layoutResources] operator[SEP] {
identifier... |
private boolean updateDelivered(Message message) {
if (consumers.size() <= 1) {
return true;
}
String pubid = (String) message.getMetadata("cwf.pub.event");
return deliveredMessageCache.putIfAbsent(pubid, "") == null;
} | class class_name[name] begin[{]
method[updateDelivered, return_type[type[boolean]], modifier[private], parameter[message]] begin[{]
if[binary_operation[call[consumers.size, parameter[]], <=, literal[1]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[boolean] identifier[updateDelivered] operator[SEP] identifier[Message] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[consumers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] Other[1] operator[SEP] {
Keyword[return] literal[b... |
public void setTimeZoneType(com.google.api.ads.admanager.axis.v201811.TimeZoneType timeZoneType) {
this.timeZoneType = timeZoneType;
} | class class_name[name] begin[{]
method[setTimeZoneType, return_type[void], modifier[public], parameter[timeZoneType]] begin[{]
assign[THIS[member[None.timeZoneType]], member[.timeZoneType]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setTimeZoneType] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[TimeZoneType]... |
public com.squareup.okhttp.Call optionsPutAsync(OptionsPut body, final ApiCallback<OptionsPutResponseStatusSuccess> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (cal... | class class_name[name] begin[{]
method[optionsPutAsync, return_type[type[com]], modifier[public], parameter[body, callback]] begin[{]
local_variable[type[ProgressResponseBody], progressListener]
local_variable[type[ProgressRequestBody], progressRequestListener]
if[binary_operati... | Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[optionsPutAsync] operator[SEP] identifier[OptionsPut] identifier[body] , Keyword[final] identifier[ApiCallback] operator[<] identifier[OptionsPutResponseStatusSuccess] operator[... |
public void sort() {
Arrays.sort(freeOrdinals, 0, size);
/// reverse the ordering
int midpoint = size / 2;
for(int i=0;i<midpoint;i++) {
int temp = freeOrdinals[i];
freeOrdinals[i] = freeOrdinals[size-i-1];
freeOrdinals[size-i-1] = temp;
}
... | class class_name[name] begin[{]
method[sort, return_type[void], modifier[public], parameter[]] begin[{]
call[Arrays.sort, parameter[member[.freeOrdinals], literal[0], member[.size]]]
local_variable[type[int], midpoint]
ForStatement(body=BlockStatement(label=None, statements=[Loc... | Keyword[public] Keyword[void] identifier[sort] operator[SEP] operator[SEP] {
identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[freeOrdinals] , Other[0] , identifier[size] operator[SEP] operator[SEP] Keyword[int] identifier[midpoint] operator[=] identifier[size] operator[/] Other[2] ope... |
public Head createHead() {
final Head head = new Head(getRoot(), "Head");
getRoot().insert(head);
return head;
} | class class_name[name] begin[{]
method[createHead, return_type[type[Head]], modifier[public], parameter[]] begin[{]
local_variable[type[Head], head]
call[.getRoot, parameter[]]
return[member[.head]]
end[}]
END[}] | Keyword[public] identifier[Head] identifier[createHead] operator[SEP] operator[SEP] {
Keyword[final] identifier[Head] identifier[head] operator[=] Keyword[new] identifier[Head] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[getRoot] operato... |
protected Method findMatchingMethod() {
String targetMethod = getTargetMethod();
Object[] arguments = getArguments();
int argCount = arguments.length;
Method[] candidates = ReflectionUtils.getAllDeclaredMethods(getTargetClass());
int minTypeDiffWeight = Integer.MAX_VALUE;
... | class class_name[name] begin[{]
method[findMatchingMethod, return_type[type[Method]], modifier[protected], parameter[]] begin[{]
local_variable[type[String], targetMethod]
local_variable[type[Object], arguments]
local_variable[type[int], argCount]
local_variable[type[Method], ca... | Keyword[protected] identifier[Method] identifier[findMatchingMethod] operator[SEP] operator[SEP] {
identifier[String] identifier[targetMethod] operator[=] identifier[getTargetMethod] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[arguments] operator[=] identif... |
public static boolean isDateTime(String s)
{
DateFormat dateFormatter = new SimpleDateFormat(dateTimeFormat);
try
{
dateFormatter.parse(s);
return true;
}
catch (ParseException e)
{
// Exception noted so can be ignored.
... | class class_name[name] begin[{]
method[isDateTime, return_type[type[boolean]], modifier[public static], parameter[s]] begin[{]
local_variable[type[DateFormat], dateFormatter]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operato... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isDateTime] operator[SEP] identifier[String] identifier[s] operator[SEP] {
identifier[DateFormat] identifier[dateFormatter] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[dateTimeFormat] operator[SEP] operator[SEP] Keywor... |
public static byte[] hexStringToByteArray(String s) throws IOException {
int l = s.length();
byte[] data = new byte[l / 2 + (l % 2)];
int n,
b = 0;
boolean high = true;
int i = 0;
for (int j = 0; j < l; j++) {
char c = s... | class class_name[name] begin[{]
method[hexStringToByteArray, return_type[type[byte]], modifier[public static], parameter[s]] begin[{]
local_variable[type[int], l]
local_variable[type[byte], data]
local_variable[type[int], n]
local_variable[type[boolean], high]
local_vari... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[hexStringToByteArray] operator[SEP] identifier[String] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[l] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] ope... |
DispatchKey newKey(final Object pDirectoryKey, final Path pRelativePath) {
return fileKeyFactory.newKey(pDirectoryKey, pRelativePath);
} | class class_name[name] begin[{]
method[newKey, return_type[type[DispatchKey]], modifier[default], parameter[pDirectoryKey, pRelativePath]] begin[{]
return[call[fileKeyFactory.newKey, parameter[member[.pDirectoryKey], member[.pRelativePath]]]]
end[}]
END[}] | identifier[DispatchKey] identifier[newKey] operator[SEP] Keyword[final] identifier[Object] identifier[pDirectoryKey] , Keyword[final] identifier[Path] identifier[pRelativePath] operator[SEP] {
Keyword[return] identifier[fileKeyFactory] operator[SEP] identifier[newKey] operator[SEP] identifier[pDirectoryKey] , ... |
public void setRules(java.util.Collection<ScalingRule> rules) {
if (rules == null) {
this.rules = null;
return;
}
this.rules = new com.amazonaws.internal.SdkInternalList<ScalingRule>(rules);
} | class class_name[name] begin[{]
method[setRules, return_type[void], modifier[public], parameter[rules]] begin[{]
if[binary_operation[member[.rules], ==, literal[null]]] begin[{]
assign[THIS[member[None.rules]], literal[null]]
return[None]
else begin[{... | Keyword[public] Keyword[void] identifier[setRules] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ScalingRule] operator[>] identifier[rules] operator[SEP] {
Keyword[if] operator[SEP] identifier[rules] operator[==] Other[null] operator[SEP... |
@Override
public void motionDetected(WebcamMotionEvent wme) {
for (Point p : wme.getPoints()) {
motionPoints.put(p, 0);
}
} | class class_name[name] begin[{]
method[motionDetected, return_type[void], modifier[public], parameter[wme]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], q... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[motionDetected] operator[SEP] identifier[WebcamMotionEvent] identifier[wme] operator[SEP] {
Keyword[for] operator[SEP] identifier[Point] identifier[p] operator[:] identifier[wme] operator[SEP] identifier[getPoints] operator[SEP] operato... |
public ServiceFuture<ManagedClusterUpgradeProfileInner> getUpgradeProfileAsync(String resourceGroupName, String resourceName, final ServiceCallback<ManagedClusterUpgradeProfileInner> serviceCallback) {
return ServiceFuture.fromResponse(getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName), ... | class class_name[name] begin[{]
method[getUpgradeProfileAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, resourceName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.getUpgradeProfileWithServiceResponseAsync, parameter[member[.r... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[ManagedClusterUpgradeProfileInner] operator[>] identifier[getUpgradeProfileAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , Keyword[final] identifier[ServiceCallback] operator[<] ident... |
public void addMasterListeners()
{
super.addMasterListeners();
this.getField(UserInfo.USER_NAME).addListener(new CheckNonNumericListener(null));
this.addListener(new ReadOnlyRecordHandler(this.getField(UserInfo.READ_ONLY_RECORD), true));
this.addListener(new FileListener(null)
... | class class_name[name] begin[{]
method[addMasterListeners, return_type[void], modifier[public], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=addMasterListeners, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
THIS... | Keyword[public] Keyword[void] identifier[addMasterListeners] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[addMasterListeners] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[UserInfo] operator[SEP] identifier[USER_NAME] ... |
public static base_response unset(nitro_service client, nsacl resource, String[] args) throws Exception{
nsacl unsetresource = new nsacl();
unsetresource.aclname = resource.aclname;
return unsetresource.unset_resource(client,args);
} | class class_name[name] begin[{]
method[unset, return_type[type[base_response]], modifier[public static], parameter[client, resource, args]] begin[{]
local_variable[type[nsacl], unsetresource]
assign[member[unsetresource.aclname], member[resource.aclname]]
return[call[unsetresour... | Keyword[public] Keyword[static] identifier[base_response] identifier[unset] operator[SEP] identifier[nitro_service] identifier[client] , identifier[nsacl] identifier[resource] , identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[nsac... |
public void createEquiAngle(float radius, int numRotations, int numSamples, float jitter, Callback2d callback) {
float spacing = radius / numRotations;
for (int sample = 0; sample < numSamples; sample++) {
float angle = 2.0f * (float) Math.PI * (sample * numRotations) / numSamples;
... | class class_name[name] begin[{]
method[createEquiAngle, return_type[void], modifier[public], parameter[radius, numRotations, numSamples, jitter, callback]] begin[{]
local_variable[type[float], spacing]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations... | Keyword[public] Keyword[void] identifier[createEquiAngle] operator[SEP] Keyword[float] identifier[radius] , Keyword[int] identifier[numRotations] , Keyword[int] identifier[numSamples] , Keyword[float] identifier[jitter] , identifier[Callback2d] identifier[callback] operator[SEP] {
Keyword[float] identifier[s... |
@Override
public PairSet<T, I> symmetricDifference(Collection<? extends Pair<T, I>> other) {
return other == null ? clone() : createFromIndices(matrix.symmetricDifference(convert(other).matrix));
} | class class_name[name] begin[{]
method[symmetricDifference, return_type[type[PairSet]], modifier[public], parameter[other]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=L... | annotation[@] identifier[Override] Keyword[public] identifier[PairSet] operator[<] identifier[T] , identifier[I] operator[>] identifier[symmetricDifference] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Pair] operator[<] identifier[T] , identifier[I] operator[>] operator[>] ... |
@Override
public EJBHome getEJBHome() //d116376
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "getEJBHome");
Tr.error(tc, "METHOD_NOT_ALLOWED_CNTR0047E", "MessageDrivenBeanO.getEJBHome()");
throw new IllegalStateException("Method Not Allowed ... | class class_name[name] begin[{]
method[getEJBHome, return_type[type[EJBHome]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[Tr.debug, parameter[member[.tc],... | annotation[@] identifier[Override] Keyword[public] identifier[EJBHome] identifier[getEJBHome] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEn... |
public static void verifyThrowableHierarchy(Throwable throwable,
Class<? extends Throwable> expectedBaseType) {
if (expectedBaseType == null) {
return;
}
if (throwable == null) {
throw new IllegalArgumentException("Invalid throwable: null");
}
Class<? extends Throwable> throwableType = throwable.get... | class class_name[name] begin[{]
method[verifyThrowableHierarchy, return_type[void], modifier[public static], parameter[throwable, expectedBaseType]] begin[{]
if[binary_operation[member[.expectedBaseType], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
e... | Keyword[public] Keyword[static] Keyword[void] identifier[verifyThrowableHierarchy] operator[SEP] identifier[Throwable] identifier[throwable] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Throwable] operator[>] identifier[expectedBaseType] operator[SEP] {
Keyword[if] operator[SEP] ident... |
public static Optional<ExecutableElement> override(
TypeElement type, Types types, String methodName, TypeMirror... params) {
return methodsIn(type.getEnclosedElements())
.stream()
.filter(method -> signatureMatches(method, types, methodName, params))
.findAny();
} | class class_name[name] begin[{]
method[override, return_type[type[Optional]], modifier[public static], parameter[type, types, methodName, params]] begin[{]
return[call[.methodsIn, parameter[call[type.getEnclosedElements, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[ExecutableElement] operator[>] identifier[override] operator[SEP] identifier[TypeElement] identifier[type] , identifier[Types] identifier[types] , identifier[String] identifier[methodName] , identifier[TypeMirror] operator[...] identifier[pa... |
public static systemuser[] get(nitro_service service) throws Exception{
systemuser obj = new systemuser();
systemuser[] response = (systemuser[])obj.get_resources(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[systemuser]], modifier[public static], parameter[service]] begin[{]
local_variable[type[systemuser], obj]
local_variable[type[systemuser], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[systemuser] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[systemuser] identifier[obj] operator[=] Keyword[new] identifier[systemuser] operator[SEP]... |
public static CmsPermissionBean getBeanForPrincipal(Set<CmsPermissionBean> beans, String principalName) {
for (CmsPermissionBean bean : beans) {
if (bean.getPrincipalName().equals(principalName)) {
return bean;
}
}
return null;
} | class class_name[name] begin[{]
method[getBeanForPrincipal, return_type[type[CmsPermissionBean]], modifier[public static], parameter[beans, principalName]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getPrincipalName, pos... | Keyword[public] Keyword[static] identifier[CmsPermissionBean] identifier[getBeanForPrincipal] operator[SEP] identifier[Set] operator[<] identifier[CmsPermissionBean] operator[>] identifier[beans] , identifier[String] identifier[principalName] operator[SEP] {
Keyword[for] operator[SEP] identifier[CmsPermissionBe... |
public Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query) {
return delegate.queryMBeans(name, query);
} | class class_name[name] begin[{]
method[queryMBeans, return_type[type[Set]], modifier[public], parameter[name, query]] begin[{]
return[call[delegate.queryMBeans, parameter[member[.name], member[.query]]]]
end[}]
END[}] | Keyword[public] identifier[Set] operator[<] identifier[ObjectInstance] operator[>] identifier[queryMBeans] operator[SEP] identifier[ObjectName] identifier[name] , identifier[QueryExp] identifier[query] operator[SEP] {
Keyword[return] identifier[delegate] operator[SEP] identifier[queryMBeans] operator[SEP] ident... |
@Override
public String doOCR(List<IIOImage> imageList, String filename, Rectangle rect) throws TesseractException {
init();
setTessVariables();
try {
StringBuilder sb = new StringBuilder();
int pageNum = 0;
for (IIOImage oimage : imageList) {
... | class class_name[name] begin[{]
method[doOCR, return_type[type[String]], modifier[public], parameter[imageList, filename, rect]] begin[{]
call[.init, parameter[]]
call[.setTessVariables, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarator... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[doOCR] operator[SEP] identifier[List] operator[<] identifier[IIOImage] operator[>] identifier[imageList] , identifier[String] identifier[filename] , identifier[Rectangle] identifier[rect] operator[SEP] Keyword[throws] identifier[Tesserac... |
private String getSSLContextProperty(String propertyName, Properties prop) {
String value = null;
if (prop != null) {
value = prop.getProperty(propertyName);
} else {
value = System.getProperty(propertyName);
if (value == null) {
value = SSLC... | class class_name[name] begin[{]
method[getSSLContextProperty, return_type[type[String]], modifier[private], parameter[propertyName, prop]] begin[{]
local_variable[type[String], value]
if[binary_operation[member[.prop], !=, literal[null]]] begin[{]
assign[member[.... | Keyword[private] identifier[String] identifier[getSSLContextProperty] operator[SEP] identifier[String] identifier[propertyName] , identifier[Properties] identifier[prop] operator[SEP] {
identifier[String] identifier[value] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[prop] operator... |
@Nullable
static UfsJournalFile decodeLogFile(UfsJournal journal, String filename) {
URI location = URIUtils.appendPathOrDie(journal.getLogDir(), filename);
try {
String[] parts = filename.split("-");
// There can be temporary files in logs directory. Skip them.
if (parts.length != 2) {
... | class class_name[name] begin[{]
method[decodeLogFile, return_type[type[UfsJournalFile]], modifier[static], parameter[journal, filename]] begin[{]
local_variable[type[URI], location]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initi... | annotation[@] identifier[Nullable] Keyword[static] identifier[UfsJournalFile] identifier[decodeLogFile] operator[SEP] identifier[UfsJournal] identifier[journal] , identifier[String] identifier[filename] operator[SEP] {
identifier[URI] identifier[location] operator[=] identifier[URIUtils] operator[SEP] identifie... |
public Pandas getList() throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.panda.getList");
return jinx.flickrGet(params, Pandas.class, false);
} | class class_name[name] begin[{]
method[getList, return_type[type[Pandas]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], params]
call[params.put, parameter[literal["method"], literal["flickr.panda.getList"]]]
return[call[jinx.flickrGet, parameter[member[.para... | Keyword[public] identifier[Pandas] identifier[getList] operator[SEP] operator[SEP] Keyword[throws] identifier[JinxException] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] ope... |
public String getLocalizedResource(String namespace, String resourceId) throws Exception {
String resourceValue = "";
Class r = Class.forName(namespace + "$string");
Field f = r.getField(resourceId);
resourceValue = getCurrentActivity().getResources().getString(f.getInt(f));
re... | class class_name[name] begin[{]
method[getLocalizedResource, return_type[type[String]], modifier[public], parameter[namespace, resourceId]] begin[{]
local_variable[type[String], resourceValue]
local_variable[type[Class], r]
local_variable[type[Field], f]
assign[member[.r... | Keyword[public] identifier[String] identifier[getLocalizedResource] operator[SEP] identifier[String] identifier[namespace] , identifier[String] identifier[resourceId] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[resourceValue] operator[=] literal[String] operator[SEP] iden... |
protected boolean doFirstValidationPass(final ProcessorData processorData) {
final ContentSpec contentSpec = processorData.getContentSpec();
LOG.info("Starting first validation pass...");
// Validate the content spec syntax
if (!validator.preValidateContentSpec(contentSpec)) {
... | class class_name[name] begin[{]
method[doFirstValidationPass, return_type[type[boolean]], modifier[protected], parameter[processorData]] begin[{]
local_variable[type[ContentSpec], contentSpec]
call[LOG.info, parameter[literal["Starting first validation pass..."]]]
if[cal... | Keyword[protected] Keyword[boolean] identifier[doFirstValidationPass] operator[SEP] Keyword[final] identifier[ProcessorData] identifier[processorData] operator[SEP] {
Keyword[final] identifier[ContentSpec] identifier[contentSpec] operator[=] identifier[processorData] operator[SEP] identifier[getContentSpec] oper... |
@Override
public DescribeFleetHistoryResult describeFleetHistory(DescribeFleetHistoryRequest request) {
request = beforeClientExecution(request);
return executeDescribeFleetHistory(request);
} | class class_name[name] begin[{]
method[describeFleetHistory, return_type[type[DescribeFleetHistoryResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDescribeFleetHistory, parame... | annotation[@] identifier[Override] Keyword[public] identifier[DescribeFleetHistoryResult] identifier[describeFleetHistory] operator[SEP] identifier[DescribeFleetHistoryRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.