code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static ExtractionFn fromQueryGranularity(final Granularity queryGranularity)
{
if (queryGranularity == null) {
return null;
} else {
return new TimeFormatExtractionFn(null, null, null, queryGranularity, true);
}
} | class class_name[name] begin[{]
method[fromQueryGranularity, return_type[type[ExtractionFn]], modifier[public static], parameter[queryGranularity]] begin[{]
if[binary_operation[member[.queryGranularity], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
... | Keyword[public] Keyword[static] identifier[ExtractionFn] identifier[fromQueryGranularity] operator[SEP] Keyword[final] identifier[Granularity] identifier[queryGranularity] operator[SEP] {
Keyword[if] operator[SEP] identifier[queryGranularity] operator[==] Other[null] operator[SEP] {
Keyword[return] Ot... |
public static List<SourceInfo> getSourceInfo(String tenantId, List<Trace> items)
throws RetryAttemptException {
List<SourceInfo> sourceInfoList = new ArrayList<SourceInfo>();
int curpos=0;
// This method initialises the deriver with a list of trace fragments
... | class class_name[name] begin[{]
method[getSourceInfo, return_type[type[List]], modifier[public static], parameter[tenantId, items]] begin[{]
local_variable[type[List], sourceInfoList]
local_variable[type[int], curpos]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariabl... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[SourceInfo] operator[>] identifier[getSourceInfo] operator[SEP] identifier[String] identifier[tenantId] , identifier[List] operator[<] identifier[Trace] operator[>] identifier[items] operator[SEP] Keyword[throws] identifier[RetryAttemptException] ... |
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String url = this.getURL(req);
LOGGER.debug("Started processing request : {}", url);
List<String> resourcesToMerge = findResourcesToMerge(req.getContextPath(... | class class_name[name] begin[{]
method[doGet, return_type[void], modifier[protected], parameter[req, resp]] begin[{]
local_variable[type[String], url]
call[LOGGER.debug, parameter[literal["Started processing request : {}"], member[.url]]]
local_variable[type[List], resourcesToMe... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doGet] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[resp] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] {
identifier[String] identif... |
public ServiceFuture<List<KeyItem>> getKeyVersionsNextAsync(final String nextPageLink, final ServiceFuture<List<KeyItem>> serviceFuture, final ListOperationCallback<KeyItem> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
getKeyVersionsNextSinglePageAsync(nextPageLink),
ne... | class class_name[name] begin[{]
method[getKeyVersionsNextAsync, return_type[type[ServiceFuture]], modifier[public], parameter[nextPageLink, serviceFuture, serviceCallback]] begin[{]
return[call[AzureServiceFuture.fromPageResponse, parameter[call[.getKeyVersionsNextSinglePageAsync, parameter[member[.nex... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[KeyItem] operator[>] operator[>] identifier[getKeyVersionsNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] , Keyword[final] identifier[ServiceFuture] operator[<] identifier[List] operator[<]... |
@Override
public String getDateLiteral(final String isoDate) {
if (isDateOnly(isoDate) || isTimeOnly(isoDate)) {
return "'" + isoDate + "'";
} else if (isDateTime(isoDate)) {
return "'" + isoDate.replace('T', ' ') + "'";
} else {
return "BAD_DATE_FORMAT:" ... | class class_name[name] begin[{]
method[getDateLiteral, return_type[type[String]], modifier[public], parameter[isoDate]] begin[{]
if[binary_operation[call[.isDateOnly, parameter[member[.isoDate]]], ||, call[.isTimeOnly, parameter[member[.isoDate]]]]] begin[{]
return[binary_operation[... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getDateLiteral] operator[SEP] Keyword[final] identifier[String] identifier[isoDate] operator[SEP] {
Keyword[if] operator[SEP] identifier[isDateOnly] operator[SEP] identifier[isoDate] operator[SEP] operator[||] identifier[isTimeOnly]... |
private Jedis getAndSetConnection()
{
Jedis conn = factory.getConnection();
this.connection = conn;
// If resource is not null means a transaction in progress.
if (settings != null)
{
for (String key : settings.keySet())
{
conn.configS... | class class_name[name] begin[{]
method[getAndSetConnection, return_type[type[Jedis]], modifier[private], parameter[]] begin[{]
local_variable[type[Jedis], conn]
assign[THIS[member[None.connection]], member[.conn]]
if[binary_operation[member[.settings], !=, literal[null]]... | Keyword[private] identifier[Jedis] identifier[getAndSetConnection] operator[SEP] operator[SEP] {
identifier[Jedis] identifier[conn] operator[=] identifier[factory] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[connection] operator[=] iden... |
private void enlarge() {
int oldCapacity = keys.length;
if (oldCapacity == LinearProbing.MAXIMUM_CAPACITY)
throw new IllegalArgumentException(
"Map cannot grow beyond capacity: "
+ LinearProbing.MAXIMUM_CAPACITY);
K oldKeys[] = keys;
V oldValues[] = values;
int newCapacity = oldCapacity << 1;
... | class class_name[name] begin[{]
method[enlarge, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], oldCapacity]
if[binary_operation[member[.oldCapacity], ==, member[LinearProbing.MAXIMUM_CAPACITY]]] begin[{]
ThrowStatement(expression=ClassCreator(argum... | Keyword[private] Keyword[void] identifier[enlarge] operator[SEP] operator[SEP] {
Keyword[int] identifier[oldCapacity] operator[=] identifier[keys] operator[SEP] identifier[length] operator[SEP] Keyword[if] operator[SEP] identifier[oldCapacity] operator[==] identifier[LinearProbing] operator[SEP] identifier[MAXIM... |
public static PylonStream fromString(String str) {
if (str == null || str.isEmpty()) {
throw new IllegalArgumentException("Cannot create a stream from an empty or null string");
}
PylonStream stream = new PylonStream();
stream.hash = str;
return stream;
} | class class_name[name] begin[{]
method[fromString, return_type[type[PylonStream]], modifier[public static], parameter[str]] begin[{]
if[binary_operation[binary_operation[member[.str], ==, literal[null]], ||, call[str.isEmpty, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCr... | Keyword[public] Keyword[static] identifier[PylonStream] identifier[fromString] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[||] identifier[str] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SE... |
public Cookie[] getCookieObjects() {
Cookie[] result = request.getCookies();
return result != null ? result : new Cookie[0];
} | class class_name[name] begin[{]
method[getCookieObjects, return_type[type[Cookie]], modifier[public], parameter[]] begin[{]
local_variable[type[Cookie], result]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], ... | Keyword[public] identifier[Cookie] operator[SEP] operator[SEP] identifier[getCookieObjects] operator[SEP] operator[SEP] {
identifier[Cookie] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[request] operator[SEP] identifier[getCookies] operator[SEP] operator[SEP] operator[SEP] Keyword[return... |
public static LicenseProvider createInstance(ZipFile zipFile, String laPrefix) {
JarFile jar = null;
try {
jar = getJarFile(zipFile);
} catch (IOException e) {
}
if (jar == null) {
return null;
}
return ContentLicenseProvider.createInstance... | class class_name[name] begin[{]
method[createInstance, return_type[type[LicenseProvider]], modifier[public static], parameter[zipFile, laPrefix]] begin[{]
local_variable[type[JarFile], jar]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jar, pos... | Keyword[public] Keyword[static] identifier[LicenseProvider] identifier[createInstance] operator[SEP] identifier[ZipFile] identifier[zipFile] , identifier[String] identifier[laPrefix] operator[SEP] {
identifier[JarFile] identifier[jar] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[ja... |
@Override
public SwapEnvironmentCNAMEsResult swapEnvironmentCNAMEs(SwapEnvironmentCNAMEsRequest request) {
request = beforeClientExecution(request);
return executeSwapEnvironmentCNAMEs(request);
} | class class_name[name] begin[{]
method[swapEnvironmentCNAMEs, return_type[type[SwapEnvironmentCNAMEsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeSwapEnvironmentCNAMEs, par... | annotation[@] identifier[Override] Keyword[public] identifier[SwapEnvironmentCNAMEsResult] identifier[swapEnvironmentCNAMEs] operator[SEP] identifier[SwapEnvironmentCNAMEsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[reques... |
protected void deleteEntryFiles() throws IOException {
File[] files = getDirectory().listFiles();
if(files == null) return;
String prefix = getEntryLogPrefix();
String suffix = getEntryLogSuffix();
for (File file : files) {
String fileName = file.getName();
if (fileName.startsW... | class class_name[name] begin[{]
method[deleteEntryFiles, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[File], files]
if[binary_operation[member[.files], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_... | Keyword[protected] Keyword[void] identifier[deleteEntryFiles] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[getDirectory] operator[SEP] operator[SEP] operator[SEP] identifier[listFiles] operator[SEP] ope... |
public void fixupVariables(java.util.Vector vars, int globalsSize)
{
super.fixupVariables(vars, globalsSize);
if(null != m_arg2)
m_arg2.fixupVariables(vars, globalsSize);
} | class class_name[name] begin[{]
method[fixupVariables, return_type[void], modifier[public], parameter[vars, globalsSize]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=globalsSi... | Keyword[public] Keyword[void] identifier[fixupVariables] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Vector] identifier[vars] , Keyword[int] identifier[globalsSize] operator[SEP] {
Keyword[super] operator[SEP] identifier[fixupVariables] operator[SEP] identifier[vars] ,... |
public boolean importStylesheetList(String listNr, List listIn) {
RtfList rtfList = new RtfList(this.rtfDoc, listIn);
rtfList.setRtfDocument(this.rtfDoc);
// TODO HGS - Finish implementation of import
//this.importStylesheetListMapping.put(listNr, Integer.toString(this.rtfDoc.getDocument... | class class_name[name] begin[{]
method[importStylesheetList, return_type[type[boolean]], modifier[public], parameter[listNr, listIn]] begin[{]
local_variable[type[RtfList], rtfList]
call[rtfList.setRtfDocument, parameter[THIS[member[None.rtfDoc]]]]
return[literal[true]]
end[... | Keyword[public] Keyword[boolean] identifier[importStylesheetList] operator[SEP] identifier[String] identifier[listNr] , identifier[List] identifier[listIn] operator[SEP] {
identifier[RtfList] identifier[rtfList] operator[=] Keyword[new] identifier[RtfList] operator[SEP] Keyword[this] operator[SEP] identifier[rt... |
public static Intent getCameraCaptureIntent(Context ctx, String authority){
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
try {
// Get the app's local file storage
mCurrentCaptureUri = createAccessibleTempFile(ctx, authority);
grantPermissions(ctx, mCur... | class class_name[name] begin[{]
method[getCameraCaptureIntent, return_type[type[Intent]], modifier[public static], parameter[ctx, authority]] begin[{]
local_variable[type[Intent], intent]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mCurrentCa... | Keyword[public] Keyword[static] identifier[Intent] identifier[getCameraCaptureIntent] operator[SEP] identifier[Context] identifier[ctx] , identifier[String] identifier[authority] operator[SEP] {
identifier[Intent] identifier[intent] operator[=] Keyword[new] identifier[Intent] operator[SEP] identifier[MediaStore... |
public void pad(int width) throws JSONException {
try {
this.bitwriter.pad(width);
} catch (Throwable e) {
throw new JSONException(e);
}
} | class class_name[name] begin[{]
method[pad, return_type[void], modifier[public], parameter[width]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=bitwriter, postfix_operators=None, prefix_oper... | Keyword[public] Keyword[void] identifier[pad] operator[SEP] Keyword[int] identifier[width] operator[SEP] Keyword[throws] identifier[JSONException] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[bitwriter] operator[SEP] identifier[pad] operator[SEP] identifier[width] operator[SEP] operator[SEP... |
@Handler(priority = -10000)
public void onStop(Stop event) throws InterruptedException {
synchronized (this) {
if (runner == null) {
return;
}
// It just might happen that the wakeup() occurs between the
// check for running and the select() in... | class class_name[name] begin[{]
method[onStop, return_type[void], modifier[public], parameter[event]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[binary_operation[member[.runner], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
... | annotation[@] identifier[Handler] operator[SEP] identifier[priority] operator[=] operator[-] Other[10000] operator[SEP] Keyword[public] Keyword[void] identifier[onStop] operator[SEP] identifier[Stop] identifier[event] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[synchronized] operator... |
public void openDrawer() {
if (drawerLayout != null && sliderLayout != null) {
if (drawerGravity != 0) {
drawerLayout.openDrawer(drawerGravity);
} else {
drawerLayout.openDrawer(sliderLayout);
}
}
} | class class_name[name] begin[{]
method[openDrawer, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.drawerLayout], !=, literal[null]], &&, binary_operation[member[.sliderLayout], !=, literal[null]]]] begin[{]
if[bina... | Keyword[public] Keyword[void] identifier[openDrawer] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[drawerLayout] operator[!=] Other[null] operator[&&] identifier[sliderLayout] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[drawerGravity] operator[!=]... |
public static List<HBaseConsumerState> create(SortedMap<byte[], byte[]> stateMap) {
List<HBaseConsumerState> states = new ArrayList<HBaseConsumerState>(stateMap.size());
for (Map.Entry<byte[], byte[]> entry : stateMap.entrySet()) {
// Intentionally using HBase Bytes.
long groupId = Bytes.toLong(entr... | class class_name[name] begin[{]
method[create, return_type[type[List]], modifier[public static], parameter[stateMap]] begin[{]
local_variable[type[List], states]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[HBaseConsumerState] operator[>] identifier[create] operator[SEP] identifier[SortedMap] operator[<] Keyword[byte] operator[SEP] operator[SEP] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[stateMap] operator[SEP] {
identi... |
private KeyPersonCompensationDataType getCompensation(
KeyPersonDto keyPerson, int budgetPeriod) {
KeyPersonCompensationDataType keyPersonCompensation = KeyPersonCompensationDataType.Factory
.newInstance();
ScaleTwoDecimal baseSalaryByPeriod;
if (keyPerson != null) {
if (keyPerson.getAcademicM... | class class_name[name] begin[{]
method[getCompensation, return_type[type[KeyPersonCompensationDataType]], modifier[private], parameter[keyPerson, budgetPeriod]] begin[{]
local_variable[type[KeyPersonCompensationDataType], keyPersonCompensation]
local_variable[type[ScaleTwoDecimal], baseSalaryBy... | Keyword[private] identifier[KeyPersonCompensationDataType] identifier[getCompensation] operator[SEP] identifier[KeyPersonDto] identifier[keyPerson] , Keyword[int] identifier[budgetPeriod] operator[SEP] {
identifier[KeyPersonCompensationDataType] identifier[keyPersonCompensation] operator[=] identifier[KeyPerson... |
public Currency addCurrency(String name, String plural, String minor, String minorPlural, String sign, boolean save) {
return addCurrency(name, plural, minor, minorPlural, sign, save, false);
} | class class_name[name] begin[{]
method[addCurrency, return_type[type[Currency]], modifier[public], parameter[name, plural, minor, minorPlural, sign, save]] begin[{]
return[call[.addCurrency, parameter[member[.name], member[.plural], member[.minor], member[.minorPlural], member[.sign], member[.save], li... | Keyword[public] identifier[Currency] identifier[addCurrency] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[plural] , identifier[String] identifier[minor] , identifier[String] identifier[minorPlural] , identifier[String] identifier[sign] , Keyword[boolean] identifier[save] operat... |
public ListAccess<User> findUsersByQuery(Query query, UserStatus status) throws Exception
{
return query.isEmpty() ? new SimpleJCRUserListAccess(service, status) : new UserByQueryJCRUserListAccess(
service, query, status);
} | class class_name[name] begin[{]
method[findUsersByQuery, return_type[type[ListAccess]], modifier[public], parameter[query, status]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_a... | Keyword[public] identifier[ListAccess] operator[<] identifier[User] operator[>] identifier[findUsersByQuery] operator[SEP] identifier[Query] identifier[query] , identifier[UserStatus] identifier[status] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[query] operator[SEP] identif... |
public static void fastinverseDelta(int[] data) {
int sz0 = data.length / 4 * 4;
int i = 1;
if (sz0 >= 4) {
int a = data[0];
for (; i < sz0 - 4; i += 4) {
a = data[i] += a;
... | class class_name[name] begin[{]
method[fastinverseDelta, return_type[void], modifier[public static], parameter[data]] begin[{]
local_variable[type[int], sz0]
local_variable[type[int], i]
if[binary_operation[member[.sz0], >=, literal[4]]] begin[{]
local_variable[type[... | Keyword[public] Keyword[static] Keyword[void] identifier[fastinverseDelta] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[int] identifier[sz0] operator[=] identifier[data] operator[SEP] identifier[length] operator[/] Other[4] operator[*] Other[4] operator[SEP] Key... |
public Statistics doCell( Example cell ) throws Exception
{
Statistics stats = new Statistics();
Call call = new Call( send );
call.will(Annotate.exception( cell )).when(ResultIs.exception());
call.will(Compile.statistics(stats)).when(ResultIs.exception());
call.execute( c... | class class_name[name] begin[{]
method[doCell, return_type[type[Statistics]], modifier[public], parameter[cell]] begin[{]
local_variable[type[Statistics], stats]
local_variable[type[Call], call]
call[call.will, parameter[call[Annotate.exception, parameter[member[.cell]]]]]
... | Keyword[public] identifier[Statistics] identifier[doCell] operator[SEP] identifier[Example] identifier[cell] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Statistics] identifier[stats] operator[=] Keyword[new] identifier[Statistics] operator[SEP] operator[SEP] operator[SEP] identifier[Call] id... |
public Properties producerConfig() {
Properties props = new Properties();
props.put("bootstrap.servers", connectionString());
props.put("acks", "all");
props.put("batch.size", "100");
props.put("client.id", "kafka-junit");
props.put("request.timeout.ms", "5000");
... | class class_name[name] begin[{]
method[producerConfig, return_type[type[Properties]], modifier[public], parameter[]] begin[{]
local_variable[type[Properties], props]
call[props.put, parameter[literal["bootstrap.servers"], call[.connectionString, parameter[]]]]
call[props... | Keyword[public] identifier[Properties] identifier[producerConfig] operator[SEP] operator[SEP] {
identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[put] operator[SEP] literal[String] , ident... |
private static RelatedTablesCoreExtension getRelatedTableExtension(
GeoPackageCore geoPackage) {
return new RelatedTablesCoreExtension(geoPackage) {
@Override
public String getPrimaryKeyColumnName(String tableName) {
return null;
}
};
} | class class_name[name] begin[{]
method[getRelatedTableExtension, return_type[type[RelatedTablesCoreExtension]], modifier[private static], parameter[geoPackage]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=geoPackage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]... | Keyword[private] Keyword[static] identifier[RelatedTablesCoreExtension] identifier[getRelatedTableExtension] operator[SEP] identifier[GeoPackageCore] identifier[geoPackage] operator[SEP] {
Keyword[return] Keyword[new] identifier[RelatedTablesCoreExtension] operator[SEP] identifier[geoPackage] operator[SEP] {
... |
public ConciseSet convert(int... a)
{
ConciseSet res = empty();
if (a != null) {
a = Arrays.copyOf(a, a.length);
Arrays.sort(a);
for (int i : a) {
if (res.last != i) {
res.add(i);
}
}
}
return res;
} | class class_name[name] begin[{]
method[convert, return_type[type[ConciseSet]], modifier[public], parameter[a]] begin[{]
local_variable[type[ConciseSet], res]
if[binary_operation[member[.a], !=, literal[null]]] begin[{]
assign[member[.a], call[Arrays.copyOf, param... | Keyword[public] identifier[ConciseSet] identifier[convert] operator[SEP] Keyword[int] operator[...] identifier[a] operator[SEP] {
identifier[ConciseSet] identifier[res] operator[=] identifier[empty] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[!=] Other[null] operato... |
public static List<LasCell> getLasCells( ASpatialDb db, Envelope envelope, Geometry exactGeometry, boolean doPosition,
boolean doIntensity, boolean doReturns, boolean doTime, boolean doColor, int limitTo ) throws Exception {
List<LasCell> lasCells = new ArrayList<>();
String sql = "SELECT " ... | class class_name[name] begin[{]
method[getLasCells, return_type[type[List]], modifier[public static], parameter[db, envelope, exactGeometry, doPosition, doIntensity, doReturns, doTime, doColor, limitTo]] begin[{]
local_variable[type[List], lasCells]
local_variable[type[String], sql]
... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[LasCell] operator[>] identifier[getLasCells] operator[SEP] identifier[ASpatialDb] identifier[db] , identifier[Envelope] identifier[envelope] , identifier[Geometry] identifier[exactGeometry] , Keyword[boolean] identifier[doPosition] , Keyword[bo... |
@SuppressWarnings("unchecked")
public CliValueContainer getOrCreate(CliParameterContainer parameterContainer) {
CliValueContainer result = this.map.get(parameterContainer);
if (result == null) {
PojoPropertyAccessorOneArg setter = parameterContainer.getSetter();
Class<?> propertyClass = setter.ge... | class class_name[name] begin[{]
method[getOrCreate, return_type[type[CliValueContainer]], modifier[public], parameter[parameterContainer]] begin[{]
local_variable[type[CliValueContainer], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
local_variabl... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[CliValueContainer] identifier[getOrCreate] operator[SEP] identifier[CliParameterContainer] identifier[parameterContainer] operator[SEP] {
identifier[CliValueContainer] identifier[result] operator[=] ... |
public static StringConsumers buildConsumer(Properties props, final String topic,//
final String groupId,//
final IMessageListener<String> listener,//
final int threads
) {... | class class_name[name] begin[{]
method[buildConsumer, return_type[type[StringConsumers]], modifier[public static], parameter[props, topic, groupId, listener, threads]] begin[{]
if[binary_operation[binary_operation[member[.props], ==, literal[null]], ||, call[props.isEmpty, parameter[]]]] begin[... | Keyword[public] Keyword[static] identifier[StringConsumers] identifier[buildConsumer] operator[SEP] identifier[Properties] identifier[props] , Keyword[final] identifier[String] identifier[topic] , Keyword[final] identifier[String] identifier[groupId] , Keyword[final] identifier[IMessageListener] operator[<] identifi... |
public void tableSwitch(final int[] keys,
final TableSwitchGenerator generator, final boolean useTable) {
for (int i = 1; i < keys.length; ++i) {
if (keys[i] < keys[i - 1]) {
throw new IllegalArgumentException(
"keys must be sorted ascending");
... | class class_name[name] begin[{]
method[tableSwitch, return_type[void], modifier[public], parameter[keys, generator, useTable]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=keys, postfix_operators=[], prefix_opera... | Keyword[public] Keyword[void] identifier[tableSwitch] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[keys] , Keyword[final] identifier[TableSwitchGenerator] identifier[generator] , Keyword[final] Keyword[boolean] identifier[useTable] operator[SEP] {
Keyword[for] operator[SEP] ... |
@Override
public List<Metric> transform(QueryContext context, List<Metric> metrics) {
if (metrics == null) {
throw new MissingDataException("The metrics list cannot be null or empty while performing arithmetic transformations.");
}
if (metrics.isEmpty()) {
return metr... | class class_name[name] begin[{]
method[transform, return_type[type[List]], modifier[public], parameter[context, metrics]] begin[{]
if[binary_operation[member[.metrics], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Metric] operator[>] identifier[transform] operator[SEP] identifier[QueryContext] identifier[context] , identifier[List] operator[<] identifier[Metric] operator[>] identifier[metrics] operator[SEP] {
Keyword[if] operator[S... |
@Override
public List<DefinedUnit> getDefinedForms(String code) throws UcumException {
assert checkStringParam(code) : paramError("getDefinedForms", "code", "must not be null or empty");
List<DefinedUnit> result = new ArrayList<DefinedUnit>();
BaseUnit base = model.getBaseUnit(code);
if (base != null) {
... | class class_name[name] begin[{]
method[getDefinedForms, return_type[type[List]], modifier[public], parameter[code]] begin[{]
AssertStatement(condition=MethodInvocation(arguments=[MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkStringParam,... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[DefinedUnit] operator[>] identifier[getDefinedForms] operator[SEP] identifier[String] identifier[code] operator[SEP] Keyword[throws] identifier[UcumException] {
Keyword[assert] identifier[checkStringParam] operator[SEP] id... |
private boolean checkFailover() throws InterruptedException {
boolean isPrimary = isPrimaryServiceCached();
if (!isPrimary && isPrimaryService()) {
this.servicePair.setPrimaryOfferService(this);
return true;
}
return false;
} | class class_name[name] begin[{]
method[checkFailover, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
local_variable[type[boolean], isPrimary]
if[binary_operation[member[.isPrimary], &&, call[.isPrimaryService, parameter[]]]] begin[{]
THIS[me... | Keyword[private] Keyword[boolean] identifier[checkFailover] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[boolean] identifier[isPrimary] operator[=] identifier[isPrimaryServiceCached] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifi... |
public static void checkIntInRange(int index, int start, int end) {
if (index < start) {
throw new IndexOutOfBoundsException(ExceptionMessageMap.getMessage("000006") + " { index=["
+ index + "], start=[" + start + "], end=[" + end + "] }");
}
if (index >= end) {
throw new IndexOutOfBo... | class class_name[name] begin[{]
method[checkIntInRange, return_type[void], modifier[public static], parameter[index, start, end]] begin[{]
if[binary_operation[member[.index], <, member[.start]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Bina... | Keyword[public] Keyword[static] Keyword[void] identifier[checkIntInRange] operator[SEP] Keyword[int] identifier[index] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[if] operator[SEP] identifier[index] operator[<] identifier[start] operator[SEP] {
Keyword[thr... |
public ServiceFuture<ExpressRouteCircuitConnectionInner> beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback<ExpressRouteCircuitConnectionInner> serviceCallback... | class class_name[name] begin[{]
method[beginCreateOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, paramet... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[ExpressRouteCircuitConnectionInner] operator[>] identifier[beginCreateOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[circuitName] , identifier[String] identifier[peeringName] , identifier[S... |
static public String normalize(String path) {
if (path == null || path.length() == 0) return ROOT;
if (path.charAt(0) != PATH_SEPARATOR) {
throw new IllegalArgumentException(
"Network Location path does not start with "
... | class class_name[name] begin[{]
method[normalize, return_type[type[String]], modifier[public static], parameter[path]] begin[{]
if[binary_operation[binary_operation[member[.path], ==, literal[null]], ||, binary_operation[call[path.length, parameter[]], ==, literal[0]]]] begin[{]
return[member[.... | Keyword[static] Keyword[public] identifier[String] identifier[normalize] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[||] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Ot... |
public void setTemporaryDirectory(File dir) throws IOException {
if (dir != null) {
if (!dir.exists() || !dir.isDirectory())
if (!dir.mkdirs())
throw new IOException("Unable to create temporary directory: " + dir.getAbsolutePath());
}
tempDir = dir;
} | class class_name[name] begin[{]
method[setTemporaryDirectory, return_type[void], modifier[public], parameter[dir]] begin[{]
if[binary_operation[member[.dir], !=, literal[null]]] begin[{]
if[binary_operation[call[dir.exists, parameter[]], ||, call[dir.isDirectory, paramet... | Keyword[public] Keyword[void] identifier[setTemporaryDirectory] operator[SEP] identifier[File] identifier[dir] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[dir] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[dir... |
public JServiceMethod[] methods() {
List<CServiceMethod> methods = new ArrayList<>(service.getMethodsIncludingExtended());
CServiceMethod[] ma = methods.toArray(new CServiceMethod[methods.size()]);
JServiceMethod[] ret = new JServiceMethod[ma.length];
for (int i = 0; i < methods.size();... | class class_name[name] begin[{]
method[methods, return_type[type[JServiceMethod]], modifier[public], parameter[]] begin[{]
local_variable[type[List], methods]
local_variable[type[CServiceMethod], ma]
local_variable[type[JServiceMethod], ret]
ForStatement(body=BlockStatement(labe... | Keyword[public] identifier[JServiceMethod] operator[SEP] operator[SEP] identifier[methods] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[CServiceMethod] operator[>] identifier[methods] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[service]... |
public static String password(int length) {
StringBuilder result = new StringBuilder();
byte[] values = byteArray(length);
// We use a modulus of an increasing index rather than of the byte values
// to avoid certain characters coming up more often.
int index = 0;
for (... | class class_name[name] begin[{]
method[password, return_type[type[String]], modifier[public static], parameter[length]] begin[{]
local_variable[type[StringBuilder], result]
local_variable[type[byte], values]
local_variable[type[int], index]
ForStatement(body=BlockStatement(label... | Keyword[public] Keyword[static] identifier[String] identifier[password] operator[SEP] Keyword[int] identifier[length] operator[SEP] {
identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP]... |
private void finishTask(TaskControllerContext context,
TaskCommands command) throws IOException{
if(context.task == null) {
LOG.info("Context task null not killing the JVM");
return;
}
ShellCommandExecutor shExec = buildTaskControllerExecutor(
command, context.env.conf.getUser(),
... | class class_name[name] begin[{]
method[finishTask, return_type[void], modifier[private], parameter[context, command]] begin[{]
if[binary_operation[member[context.task], ==, literal[null]]] begin[{]
call[LOG.info, parameter[literal["Context task null not killing the JVM"]... | Keyword[private] Keyword[void] identifier[finishTask] operator[SEP] identifier[TaskControllerContext] identifier[context] , identifier[TaskCommands] identifier[command] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[context] operator[SEP] identifier[task] operator[=... |
public final void mapExpressionList() throws RecognitionException {
try {
// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:570:5: ( mapEntry ( COMMA mapEntry )* )
// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:570:7: mapEntry ( COMMA mapEntry )*
{
pushFollow(FOLLOW_mapEnt... | class class_name[name] begin[{]
method[mapExpressionList, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_mapEntry_in_mapExpressionList315... | Keyword[public] Keyword[final] Keyword[void] identifier[mapExpressionList] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
{
identifier[pushFollow] operator[SEP] identifier[FOLLOW_mapEntry_in_mapExpressionList3151] operator[SEP] operator[SEP... |
public EntryStream<K, V> peekKeys(Consumer<? super K> keyAction) {
return peek(e -> keyAction.accept(e.getKey()));
} | class class_name[name] begin[{]
method[peekKeys, return_type[type[EntryStream]], modifier[public], parameter[keyAction]] begin[{]
return[call[.peek, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], quali... | Keyword[public] identifier[EntryStream] operator[<] identifier[K] , identifier[V] operator[>] identifier[peekKeys] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[K] operator[>] identifier[keyAction] operator[SEP] {
Keyword[return] identifier[peek] operator[SEP] identifier[e... |
void addArrayList(Node firstInList) {
boolean lastWasEmpty = false;
for (Node n = firstInList; n != null; n = n.getNext()) {
if (n != firstInList) {
cc.listSeparator();
}
addExpr(n, 1, Context.OTHER);
lastWasEmpty = n.isEmpty();
}
if (lastWasEmpty) {
cc.listSeparat... | class class_name[name] begin[{]
method[addArrayList, return_type[void], modifier[default], parameter[firstInList]] begin[{]
local_variable[type[boolean], lastWasEmpty]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=... | Keyword[void] identifier[addArrayList] operator[SEP] identifier[Node] identifier[firstInList] operator[SEP] {
Keyword[boolean] identifier[lastWasEmpty] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[n] operator[=] identifier[firstInList] operator[SEP] identifier... |
private void writeBufferChain(BufferChainOutputStream bufferChain, boolean compressed) {
ByteBuffer header = ByteBuffer.wrap(headerScratch);
header.put(compressed ? COMPRESSED : UNCOMPRESSED);
int messageLength = bufferChain.readableBytes();
header.putInt(messageLength);
WritableBuffer writeableHead... | class class_name[name] begin[{]
method[writeBufferChain, return_type[void], modifier[private], parameter[bufferChain, compressed]] begin[{]
local_variable[type[ByteBuffer], header]
call[header.put, parameter[TernaryExpression(condition=MemberReference(member=compressed, postfix_operator... | Keyword[private] Keyword[void] identifier[writeBufferChain] operator[SEP] identifier[BufferChainOutputStream] identifier[bufferChain] , Keyword[boolean] identifier[compressed] operator[SEP] {
identifier[ByteBuffer] identifier[header] operator[=] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP... |
public AsImpl getAs(int dpc, int opc, short si) {
for (FastList.Node<DPCNode> n = dpcList.head(), end = dpcList.tail(); (n = n.getNext()) != end;) {
DPCNode dpcNode = n.getValue();
if (dpcNode.dpc == dpc) {
return dpcNode.getAs(opc, si);
}
}
re... | class class_name[name] begin[{]
method[getAs, return_type[type[AsImpl]], modifier[public], parameter[dpc, opc, si]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argu... | Keyword[public] identifier[AsImpl] identifier[getAs] operator[SEP] Keyword[int] identifier[dpc] , Keyword[int] identifier[opc] , Keyword[short] identifier[si] operator[SEP] {
Keyword[for] operator[SEP] identifier[FastList] operator[SEP] identifier[Node] operator[<] identifier[DPCNode] operator[>] identifier[n]... |
public Observable<ServiceResponse<SignalRKeysInner>> beginRegenerateKeyWithServiceResponseAsync(String resourceGroupName, String resourceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
... | class class_name[name] begin[{]
method[beginRegenerateKeyWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, resourceName]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[SignalRKeysInner] operator[>] operator[>] identifier[beginRegenerateKeyWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] operator[SE... |
public static Camera createPerspective(float fieldOfView, int windowWidth, int windowHeight, float near, float far) {
return new Camera(Matrix4f.createPerspective(fieldOfView, (float) windowWidth / windowHeight, near, far));
} | class class_name[name] begin[{]
method[createPerspective, return_type[type[Camera]], modifier[public static], parameter[fieldOfView, windowWidth, windowHeight, near, far]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=fieldOfView, postfix_operators=[], prefi... | Keyword[public] Keyword[static] identifier[Camera] identifier[createPerspective] operator[SEP] Keyword[float] identifier[fieldOfView] , Keyword[int] identifier[windowWidth] , Keyword[int] identifier[windowHeight] , Keyword[float] identifier[near] , Keyword[float] identifier[far] operator[SEP] {
Keyword[retur... |
public static final Color getColorForValue(double val) {
// Color positions
double[] pos = new double[] { 0.0, 0.6, 0.8, 1.0 };
// Colors at these positions
Color[] cols = new Color[] { new Color(0.0f, 0.0f, 0.0f, 0.6f), new Color(0.0f, 0.0f, 1.0f, 0.8f), new Color(1.0f, 0.0f, 0.0f, 0.9f), new Color(1.0... | class class_name[name] begin[{]
method[getColorForValue, return_type[type[Color]], modifier[final public static], parameter[val]] begin[{]
local_variable[type[double], pos]
local_variable[type[Color], cols]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=length... | Keyword[public] Keyword[static] Keyword[final] identifier[Color] identifier[getColorForValue] operator[SEP] Keyword[double] identifier[val] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[pos] operator[=] Keyword[new] Keyword[double] operator[SEP] operator[SEP] {
literal[Float] ... |
public BoxSharedLink getSharedLink() {
return mBodyMap.containsKey(BoxItem.FIELD_SHARED_LINK) ?
((BoxSharedLink) mBodyMap.get(BoxItem.FIELD_SHARED_LINK)) :
null;
} | class class_name[name] begin[{]
method[getSharedLink, return_type[type[BoxSharedLink]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=FIELD_SHARED_LINK, postfix_operators=[], prefix_operators=[], qualifier=BoxItem, selector... | Keyword[public] identifier[BoxSharedLink] identifier[getSharedLink] operator[SEP] operator[SEP] {
Keyword[return] identifier[mBodyMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[BoxItem] operator[SEP] identifier[FIELD_SHARED_LINK] operator[SEP] operator[?] operator[SEP] operator[SEP] identifi... |
public QrCodeEncoder addAutomatic(String message) {
// very simple coding algorithm. Doesn't try to compress by using multiple formats
if(containsKanji(message)) {
// split into kanji and non-kanji segments
int start = 0;
boolean kanji = isKanji(message.charAt(0));
for (int i = 0; i < message.length(); ... | class class_name[name] begin[{]
method[addAutomatic, return_type[type[QrCodeEncoder]], modifier[public], parameter[message]] begin[{]
if[call[.containsKanji, parameter[member[.message]]]] begin[{]
local_variable[type[int], start]
local_variable[type[boolean], kanji]
... | Keyword[public] identifier[QrCodeEncoder] identifier[addAutomatic] operator[SEP] identifier[String] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[containsKanji] operator[SEP] identifier[message] operator[SEP] operator[SEP] {
Keyword[int] identifier[start] operator[=] Other[0... |
private static boolean checkIfCollectionExists(CloudSolrClient server, String collection) throws KeeperException, InterruptedException {
ZkStateReader zkStateReader = server.getZkStateReader();
zkStateReader.updateClusterState(true);
ClusterState clusterState = zkStateReader.getClusterState();
... | class class_name[name] begin[{]
method[checkIfCollectionExists, return_type[type[boolean]], modifier[private static], parameter[server, collection]] begin[{]
local_variable[type[ZkStateReader], zkStateReader]
call[zkStateReader.updateClusterState, parameter[literal[true]]]
local... | Keyword[private] Keyword[static] Keyword[boolean] identifier[checkIfCollectionExists] operator[SEP] identifier[CloudSolrClient] identifier[server] , identifier[String] identifier[collection] operator[SEP] Keyword[throws] identifier[KeeperException] , identifier[InterruptedException] {
identifier[ZkStateReader]... |
public Object remove(Serializable key) {
if(component.initialStateMarked()) {
Object retVal = deltaMap.remove(key);
if(retVal==null) {
return defaultMap.remove(key);
}
else {
defaultMap.remove(key);
return retVal;
... | class class_name[name] begin[{]
method[remove, return_type[type[Object]], modifier[public], parameter[key]] begin[{]
if[call[component.initialStateMarked, parameter[]]] begin[{]
local_variable[type[Object], retVal]
if[binary_operation[member[.retVal], ==, lit... | Keyword[public] identifier[Object] identifier[remove] operator[SEP] identifier[Serializable] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[component] operator[SEP] identifier[initialStateMarked] operator[SEP] operator[SEP] operator[SEP] {
identifier[Object] identifier[retVal] op... |
public static boolean eqv(boolean left, boolean right) {
return (left == true && right == true) || (left == false && right == false);
} | class class_name[name] begin[{]
method[eqv, return_type[type[boolean]], modifier[public static], parameter[left, right]] begin[{]
return[binary_operation[binary_operation[binary_operation[member[.left], ==, literal[true]], &&, binary_operation[member[.right], ==, literal[true]]], ||, binary_operation[b... | Keyword[public] Keyword[static] Keyword[boolean] identifier[eqv] operator[SEP] Keyword[boolean] identifier[left] , Keyword[boolean] identifier[right] operator[SEP] {
Keyword[return] operator[SEP] identifier[left] operator[==] literal[boolean] operator[&&] identifier[right] operator[==] literal[boolean] operator... |
@Override public int compareTo(DateRange o)
{
int result = net.sf.mpxj.common.DateHelper.compare(m_start, o.m_start);
if (result == 0)
{
result = net.sf.mpxj.common.DateHelper.compare(m_end, o.m_end);
}
return result;
} | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[o]] begin[{]
local_variable[type[int], result]
if[binary_operation[member[.result], ==, literal[0]]] begin[{]
assign[member[.result], call[net.sf.mpxj.common.Dat... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[DateRange] identifier[o] operator[SEP] {
Keyword[int] identifier[result] operator[=] identifier[net] operator[SEP] identifier[sf] operator[SEP] identifier[mpxj] operator[SEP] identifier[common] operator... |
public Long getLong(String attr) {
Number n = (Number)attrs.get(attr);
return n != null ? n.longValue() : null;
} | class class_name[name] begin[{]
method[getLong, return_type[type[Long]], modifier[public], parameter[attr]] begin[{]
local_variable[type[Number], n]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[public] identifier[Long] identifier[getLong] operator[SEP] identifier[String] identifier[attr] operator[SEP] {
identifier[Number] identifier[n] operator[=] operator[SEP] identifier[Number] operator[SEP] identifier[attrs] operator[SEP] identifier[get] operator[SEP] identifier[attr] operator[SEP] operator[... |
boolean addHandle (SIMessageHandle handle,
Map ctxInfo,
final boolean canBeDeleted) {
final String methodName = "addHandle";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, new Object [] { han... | class class_name[name] begin[{]
method[addHandle, return_type[type[boolean]], modifier[default], parameter[handle, ctxInfo, canBeDeleted]] begin[{]
local_variable[type[String], methodName]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryE... | Keyword[boolean] identifier[addHandle] operator[SEP] identifier[SIMessageHandle] identifier[handle] , identifier[Map] identifier[ctxInfo] , Keyword[final] Keyword[boolean] identifier[canBeDeleted] operator[SEP] {
Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP]... |
static final public LocalRateOptions parseRateOptions(boolean rate, String spec) {
if (!rate || spec.length() < 6) {
return new LocalRateOptions();
}
String[] parts = spec.split(spec.substring(5, spec.length() - 1), ',');
if (parts.length < 1 || parts.length > 3) {
return new LocalRateOptio... | class class_name[name] begin[{]
method[parseRateOptions, return_type[type[LocalRateOptions]], modifier[final public static], parameter[rate, spec]] begin[{]
if[binary_operation[member[.rate], ||, binary_operation[call[spec.length, parameter[]], <, literal[6]]]] begin[{]
return[Class... | Keyword[static] Keyword[final] Keyword[public] identifier[LocalRateOptions] identifier[parseRateOptions] operator[SEP] Keyword[boolean] identifier[rate] , identifier[String] identifier[spec] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[rate] operator[||] identifier[spec] operator[SEP] identi... |
public EEnum getIfcInventoryTypeEnum() {
if (ifcInventoryTypeEnumEEnum == null) {
ifcInventoryTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(849);
}
return ifcInventoryTypeEnumEEnum;
} | class class_name[name] begin[{]
method[getIfcInventoryTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcInventoryTypeEnumEEnum], ==, literal[null]]] begin[{]
assign[member[.ifcInventoryTypeEnumEEnum], Cast(expressi... | Keyword[public] identifier[EEnum] identifier[getIfcInventoryTypeEnum] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcInventoryTypeEnumEEnum] operator[==] Other[null] operator[SEP] {
identifier[ifcInventoryTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] i... |
@SuppressWarnings("WeakerAccess")
@SuppressLint("RtlHardcoded")
@VisibleForTesting
static int textGravity(@NonNull Table.Alignment alignment, boolean cellTextCenterVertical) {
final int gravity;
switch (alignment) {
case LEFT:
gravity = Gravity.LEFT;
... | class class_name[name] begin[{]
method[textGravity, return_type[type[int]], modifier[static], parameter[alignment, cellTextCenterVertical]] begin[{]
local_variable[type[int], gravity]
SwitchStatement(cases=[SwitchStatementCase(case=['LEFT'], statements=[StatementExpression(expression=Assignment... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[SuppressLint] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[VisibleForTesting] Keyword[static] Keyword[int] identifier[textGravity] operator[SEP] annotation[@] identifier[NonNull] ident... |
public static int[] getRegionColsRows( GridCoverage2D gridCoverage ) {
GridGeometry2D gridGeometry = gridCoverage.getGridGeometry();
GridEnvelope2D gridRange = gridGeometry.getGridRange2D();
int height = gridRange.height;
int width = gridRange.width;
int[] params = new int[]{widt... | class class_name[name] begin[{]
method[getRegionColsRows, return_type[type[int]], modifier[public static], parameter[gridCoverage]] begin[{]
local_variable[type[GridGeometry2D], gridGeometry]
local_variable[type[GridEnvelope2D], gridRange]
local_variable[type[int], height]
local... | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[getRegionColsRows] operator[SEP] identifier[GridCoverage2D] identifier[gridCoverage] operator[SEP] {
identifier[GridGeometry2D] identifier[gridGeometry] operator[=] identifier[gridCoverage] operator[SEP] identifier[getGridGeometr... |
public static QueueContract create(String profile, Configuration config) {
return config.create(profile, QueueContract.class);
} | class class_name[name] begin[{]
method[create, return_type[type[QueueContract]], modifier[public static], parameter[profile, config]] begin[{]
return[call[config.create, parameter[member[.profile], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(ar... | Keyword[public] Keyword[static] identifier[QueueContract] identifier[create] operator[SEP] identifier[String] identifier[profile] , identifier[Configuration] identifier[config] operator[SEP] {
Keyword[return] identifier[config] operator[SEP] identifier[create] operator[SEP] identifier[profile] , identifier[Que... |
public static Compress.Feature parseCompressionFeature(XmlPullParser parser)
throws IOException, XmlPullParserException {
assert (parser.getEventType() == XmlPullParser.START_TAG);
String name;
final int initialDepth = parser.getDepth();
List<String> methods = new Lin... | class class_name[name] begin[{]
method[parseCompressionFeature, return_type[type[Compress]], modifier[public static], parameter[parser]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEventType, postfix_operators=[], prefix_operators=[], qualifier=p... | Keyword[public] Keyword[static] identifier[Compress] operator[SEP] identifier[Feature] identifier[parseCompressionFeature] operator[SEP] identifier[XmlPullParser] identifier[parser] operator[SEP] Keyword[throws] identifier[IOException] , identifier[XmlPullParserException] {
Keyword[assert] operator[SEP] identif... |
public void setDialogDeleteFileMode(String mode) {
CmsResourceDeleteMode deleteMode = CmsResource.DELETE_PRESERVE_SIBLINGS;
if (mode.equalsIgnoreCase(DELETEMODE_DELETE)) {
deleteMode = CmsResource.DELETE_REMOVE_SIBLINGS;
}
setDialogDeleteFileMode(deleteMode);
} | class class_name[name] begin[{]
method[setDialogDeleteFileMode, return_type[void], modifier[public], parameter[mode]] begin[{]
local_variable[type[CmsResourceDeleteMode], deleteMode]
if[call[mode.equalsIgnoreCase, parameter[member[.DELETEMODE_DELETE]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setDialogDeleteFileMode] operator[SEP] identifier[String] identifier[mode] operator[SEP] {
identifier[CmsResourceDeleteMode] identifier[deleteMode] operator[=] identifier[CmsResource] operator[SEP] identifier[DELETE_PRESERVE_SIBLINGS] operator[SEP] Keyword[if] operator[SE... |
@Override
public void handle(Throwable throwable, Map<String, Object> parameters) {
if (handlers.size() == 0) {
register(Exception.class, new HandlerException() {
@Override
public void handle(Throwable throwable,
Map<String, Object> parameters) {
throwable.printStackTrace();
}
});
}
if (t... | class class_name[name] begin[{]
method[handle, return_type[void], modifier[public], parameter[throwable, parameters]] begin[{]
if[binary_operation[call[handlers.size, parameter[]], ==, literal[0]]] begin[{]
call[.register, parameter[ClassReference(postfix_operators=[], p... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handle] operator[SEP] identifier[Throwable] identifier[throwable] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[SEP] {
Keyword[if] operator[SEP] identifier[handlers] o... |
public static base_responses add(nitro_service client, responderaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
responderaction addresources[] = new responderaction[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i... | class class_name[name] begin[{]
method[add, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[m... | Keyword[public] Keyword[static] identifier[base_responses] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[responderaction] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[result... |
public static IPAddressType getAddressType(String ipAddress)
{
if(IPAddressUtil.isIPv4LiteralAddress(ipAddress))
return IPAddressType.IPV4;
if(IPAddressUtil.isIPv6LiteralAddress(ipAddress))
return IPAddressType.IPV6;
return IPAddressType.INVALID;
} | class class_name[name] begin[{]
method[getAddressType, return_type[type[IPAddressType]], modifier[public static], parameter[ipAddress]] begin[{]
if[call[IPAddressUtil.isIPv4LiteralAddress, parameter[member[.ipAddress]]]] begin[{]
return[member[IPAddressType.IPV4]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[IPAddressType] identifier[getAddressType] operator[SEP] identifier[String] identifier[ipAddress] operator[SEP] {
Keyword[if] operator[SEP] identifier[IPAddressUtil] operator[SEP] identifier[isIPv4LiteralAddress] operator[SEP] identifier[ipAddress] operator[SEP] operator... |
public Class getRootDeclarationClass() {
ConfigPath res = this;
while (res.getRoot() != null) {
res = res.getRoot();
}
return res.getDeclarationClass();
} | class class_name[name] begin[{]
method[getRootDeclarationClass, return_type[type[Class]], modifier[public], parameter[]] begin[{]
local_variable[type[ConfigPath], res]
while[binary_operation[call[res.getRoot, parameter[]], !=, literal[null]]] begin[{]
assign[memb... | Keyword[public] identifier[Class] identifier[getRootDeclarationClass] operator[SEP] operator[SEP] {
identifier[ConfigPath] identifier[res] operator[=] Keyword[this] operator[SEP] Keyword[while] operator[SEP] identifier[res] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] operator[!=] Other[null] op... |
private void buildRecorderFromObject(
int opcode, String owner, String name, String signature, boolean itf) {
super.visitMethodInsn(opcode, owner, name, signature, itf);
// -> stack: ... newobj
super.visitInsn(Opcodes.DUP);
// -> stack: ... newobj newobj
super.visitInsn(Opcodes.DUP);
// ->... | class class_name[name] begin[{]
method[buildRecorderFromObject, return_type[void], modifier[private], parameter[opcode, owner, name, signature, itf]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=opcode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Me... | Keyword[private] Keyword[void] identifier[buildRecorderFromObject] operator[SEP] Keyword[int] identifier[opcode] , identifier[String] identifier[owner] , identifier[String] identifier[name] , identifier[String] identifier[signature] , Keyword[boolean] identifier[itf] operator[SEP] {
Keyword[super] operator[S... |
public Request<ResourceServer> get(String resourceServerIdOrIdentifier) {
Asserts.assertNotNull(resourceServerIdOrIdentifier, "Resource server ID");
HttpUrl.Builder builder = baseUrl
.newBuilder()
.addPathSegments("api/v2/resource-servers")
.addPathSegmen... | class class_name[name] begin[{]
method[get, return_type[type[Request]], modifier[public], parameter[resourceServerIdOrIdentifier]] begin[{]
call[Asserts.assertNotNull, parameter[member[.resourceServerIdOrIdentifier], literal["Resource server ID"]]]
local_variable[type[HttpUrl], builder]... | Keyword[public] identifier[Request] operator[<] identifier[ResourceServer] operator[>] identifier[get] operator[SEP] identifier[String] identifier[resourceServerIdOrIdentifier] operator[SEP] {
identifier[Asserts] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[resourceServerIdOrIdentifier] , li... |
private static boolean linearPathWithinLinearPath_(MultiPath multipathA,
MultiPath multipathB, double tolerance, boolean bEnforceOrientation) {
boolean bWithin = true;
double[] scalarsA = new double[2];
double[] scalarsB = new double[2];
int ievent = 0;
AttributeStreamOfInt32 eventIndices = new AttributeS... | class class_name[name] begin[{]
method[linearPathWithinLinearPath_, return_type[type[boolean]], modifier[private static], parameter[multipathA, multipathB, tolerance, bEnforceOrientation]] begin[{]
local_variable[type[boolean], bWithin]
local_variable[type[double], scalarsA]
local_varia... | Keyword[private] Keyword[static] Keyword[boolean] identifier[linearPathWithinLinearPath_] operator[SEP] identifier[MultiPath] identifier[multipathA] , identifier[MultiPath] identifier[multipathB] , Keyword[double] identifier[tolerance] , Keyword[boolean] identifier[bEnforceOrientation] operator[SEP] {
Keyword... |
@NotNull
public static InstanceSetter[] instanceFields2ValueSetters(final List<? extends Attribute> instanceFields, final InstanceType type) throws FOSException {
InstanceSetter[] instanceSetters = new InstanceSetter[instanceFields.size()];
for (int idx = 0; idx < instanceFields.size(); idx++) {
... | class class_name[name] begin[{]
method[instanceFields2ValueSetters, return_type[type[InstanceSetter]], modifier[public static], parameter[instanceFields, type]] begin[{]
local_variable[type[InstanceSetter], instanceSetters]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableD... | annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[InstanceSetter] operator[SEP] operator[SEP] identifier[instanceFields2ValueSetters] operator[SEP] Keyword[final] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Attribute] operator[>] identifier[instanceFields] , Keyword[... |
public Long getProcessInstanceByCorrelationKey(CorrelationKey correlationKey) {
Query processInstancesForEvent = getEntityManager().createNamedQuery( "GetProcessInstanceIdByCorrelation" );
processInstancesForEvent.setParameter( "ckey", correlationKey.toExternalForm());
try {
... | class class_name[name] begin[{]
method[getProcessInstanceByCorrelationKey, return_type[type[Long]], modifier[public], parameter[correlationKey]] begin[{]
local_variable[type[Query], processInstancesForEvent]
call[processInstancesForEvent.setParameter, parameter[literal["ckey"], call[cor... | Keyword[public] identifier[Long] identifier[getProcessInstanceByCorrelationKey] operator[SEP] identifier[CorrelationKey] identifier[correlationKey] operator[SEP] {
identifier[Query] identifier[processInstancesForEvent] operator[=] identifier[getEntityManager] operator[SEP] operator[SEP] operator[SEP] identifier[... |
@Override
public final boolean filter() {
boolean filterResult = true;
for (final AbsFilter filter : mFilter) {
filterResult = filterResult && filter.filter();
}
return filterResult;
} | class class_name[name] begin[{]
method[filter, return_type[type[boolean]], modifier[final public], parameter[]] begin[{]
local_variable[type[boolean], filterResult]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(mem... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[filter] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[filterResult] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[AbsFilter] identifier[filter] operator[:] ... |
public static <R> R getStaticField(Class<?> clazz, String fieldName) {
try {
return getStaticField(clazz.getDeclaredField(fieldName));
} catch (Exception e) {
throw new RuntimeException(e);
}
} | class class_name[name] begin[{]
method[getStaticField, return_type[type[R]], modifier[public static], parameter[clazz, fieldName]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=fieldName, postfix_operators=[], pref... | Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[R] identifier[getStaticField] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[fieldName] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[get... |
public Form getSearchForm(DomainBareJid serviceJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
TranscriptSearch search = new TranscriptSearch();
search.setType(IQ.Type.get);
search.setTo(serviceJID);
TranscriptSearch response = connect... | class class_name[name] begin[{]
method[getSearchForm, return_type[type[Form]], modifier[public], parameter[serviceJID]] begin[{]
local_variable[type[TranscriptSearch], search]
call[search.setType, parameter[member[IQ.Type.get]]]
call[search.setTo, parameter[member[.servi... | Keyword[public] identifier[Form] identifier[getSearchForm] operator[SEP] identifier[DomainBareJid] identifier[serviceJID] operator[SEP] Keyword[throws] identifier[NoResponseException] , identifier[XMPPErrorException] , identifier[NotConnectedException] , identifier[InterruptedException] {
identifier[Transcrip... |
public static Channel newJVM(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String,String> systemProperties) throws IOException {
JVMBuilder vmb = new JVMBuilder();
vmb.systemProperties(systemProperties);
return newJVM(displayName,listener,vmb,workD... | class class_name[name] begin[{]
method[newJVM, return_type[type[Channel]], modifier[public static], parameter[displayName, listener, workDir, classpath, systemProperties]] begin[{]
local_variable[type[JVMBuilder], vmb]
call[vmb.systemProperties, parameter[member[.systemProperties]]]
... | Keyword[public] Keyword[static] identifier[Channel] identifier[newJVM] operator[SEP] identifier[String] identifier[displayName] , identifier[TaskListener] identifier[listener] , identifier[FilePath] identifier[workDir] , identifier[ClasspathBuilder] identifier[classpath] , identifier[Map] operator[<] identifier[Str... |
public static long parseLong(final CharSequence s) {
final int n = s.length(); // Will NPE if necessary.
if (n == 0) {
throw new NumberFormatException("Empty string");
}
char c = s.charAt(0); // Current character.
int i = 1; // index in `s'.
if (c < '0' && (c == '+' || c == '-')) { // ... | class class_name[name] begin[{]
method[parseLong, return_type[type[long]], modifier[public static], parameter[s]] begin[{]
local_variable[type[int], n]
if[binary_operation[member[.n], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix... | Keyword[public] Keyword[static] Keyword[long] identifier[parseLong] operator[SEP] Keyword[final] identifier[CharSequence] identifier[s] operator[SEP] {
Keyword[final] Keyword[int] identifier[n] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operat... |
@Override
public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations) throws OperationApplicationException {
ContentProviderResult[] result = null;
SQLiteDatabase db = this.getHelper().getWritableDatabase();
db.beginTransaction();
try {
res... | class class_name[name] begin[{]
method[applyBatch, return_type[type[ContentProviderResult]], modifier[public], parameter[operations]] begin[{]
local_variable[type[ContentProviderResult], result]
local_variable[type[SQLiteDatabase], db]
call[db.beginTransaction, parameter[]]
... | annotation[@] identifier[Override] Keyword[public] identifier[ContentProviderResult] operator[SEP] operator[SEP] identifier[applyBatch] operator[SEP] identifier[ArrayList] operator[<] identifier[ContentProviderOperation] operator[>] identifier[operations] operator[SEP] Keyword[throws] identifier[OperationApplicationExc... |
public void eInit(XtendTypeDeclaration container, String name, IJvmTypeProvider context) {
if (this.sarlInterface == null) {
this.container = container;
this.sarlInterface = SarlFactory.eINSTANCE.createSarlInterface();
container.getMembers().add(this.sarlInterface);
if (!Strings.isEmpty(name)) {
this.... | class class_name[name] begin[{]
method[eInit, return_type[void], modifier[public], parameter[container, name, context]] begin[{]
if[binary_operation[THIS[member[None.sarlInterface]], ==, literal[null]]] begin[{]
assign[THIS[member[None.container]], member[.container]]
... | Keyword[public] Keyword[void] identifier[eInit] operator[SEP] identifier[XtendTypeDeclaration] identifier[container] , identifier[String] identifier[name] , identifier[IJvmTypeProvider] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[sarlInterface] operator[... |
@EventHandler("action")
private void onAction(PluginEvent event) {
PluginException exception = null;
PluginAction action = event.getAction();
boolean debug = log.isDebugEnabled();
if (pluginEventListeners1 != null) {
for (IPluginEvent listener : new ArrayList<>(pluginEve... | class class_name[name] begin[{]
method[onAction, return_type[void], modifier[private], parameter[event]] begin[{]
local_variable[type[PluginException], exception]
local_variable[type[PluginAction], action]
local_variable[type[boolean], debug]
if[binary_operation[member[.... | annotation[@] identifier[EventHandler] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[onAction] operator[SEP] identifier[PluginEvent] identifier[event] operator[SEP] {
identifier[PluginException] identifier[exception] operator[=] Other[null] operator[SEP] identifier[PluginA... |
public static ServerSocketPredicate tag(String... tags) {
return socket -> socket.tags().containsAll(Arrays.asList(tags));
} | class class_name[name] begin[{]
method[tag, return_type[type[ServerSocketPredicate]], modifier[public static], parameter[tags]] begin[{]
return[LambdaExpression(body=MethodInvocation(arguments=[], member=tags, postfix_operators=[], prefix_operators=[], qualifier=socket, selectors=[MethodInvocation(argu... | Keyword[public] Keyword[static] identifier[ServerSocketPredicate] identifier[tag] operator[SEP] identifier[String] operator[...] identifier[tags] operator[SEP] {
Keyword[return] identifier[socket] operator[->] identifier[socket] operator[SEP] identifier[tags] operator[SEP] operator[SEP] operator[SEP] identifier[... |
@Override
public ByteArrayInputStream compare(String jsonModels) throws JsonProcessingException, ApiException {
return compare(null, null, jsonModels);
} | class class_name[name] begin[{]
method[compare, return_type[type[ByteArrayInputStream]], modifier[public], parameter[jsonModels]] begin[{]
return[call[.compare, parameter[literal[null], literal[null], member[.jsonModels]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[ByteArrayInputStream] identifier[compare] operator[SEP] identifier[String] identifier[jsonModels] operator[SEP] Keyword[throws] identifier[JsonProcessingException] , identifier[ApiException] {
Keyword[return] identifier[compare] operator[SEP] Other[n... |
public void fixupVariables(java.util.Vector vars, int globalsSize)
{
super.fixupVariables(vars, globalsSize);
m_expr.fixupVariables(vars, globalsSize);
} | class class_name[name] begin[{]
method[fixupVariables, return_type[void], modifier[public], parameter[vars, globalsSize]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=globalsSi... | Keyword[public] Keyword[void] identifier[fixupVariables] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Vector] identifier[vars] , Keyword[int] identifier[globalsSize] operator[SEP] {
Keyword[super] operator[SEP] identifier[fixupVariables] operator[SEP] identifier[vars] ,... |
@Override
public XMLEventReader createXMLEventReader(InputStream in)
throws XMLStreamException
{
// false for auto-close, since caller has access to the input stream
return new WstxEventReader(createEventAllocator(),
createSR(null, in, null, true, false));
} | class class_name[name] begin[{]
method[createXMLEventReader, return_type[type[XMLEventReader]], modifier[public], parameter[in]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=createEventAllocator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_... | annotation[@] identifier[Override] Keyword[public] identifier[XMLEventReader] identifier[createXMLEventReader] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
Keyword[return] Keyword[new] identifier[WstxEventReader] operator[SEP] identifier[crea... |
public static boolean isCropAvailable(Context context) {
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setType("image/*");
return IntentUtils.isIntentAvailable(context, intent);
} | class class_name[name] begin[{]
method[isCropAvailable, return_type[type[boolean]], modifier[public static], parameter[context]] begin[{]
local_variable[type[Intent], intent]
call[intent.setType, parameter[literal["image/*"]]]
return[call[IntentUtils.isIntentAvailable, parameter... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isCropAvailable] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
identifier[Intent] identifier[intent] operator[=] Keyword[new] identifier[Intent] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[intent] operato... |
public List<MasterBlockLocation> getBlockLocations() {
List<MasterBlockLocation> ret = new ArrayList<>(mWorkerIdToAlias.size());
for (Map.Entry<Long, String> entry : mWorkerIdToAlias.entrySet()) {
ret.add(new MasterBlockLocation(entry.getKey(), entry.getValue()));
}
return ret;
} | class class_name[name] begin[{]
method[getBlockLocations, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], ret]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[... | Keyword[public] identifier[List] operator[<] identifier[MasterBlockLocation] operator[>] identifier[getBlockLocations] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[MasterBlockLocation] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] oper... |
private void cleanupIfNeccessary(JsonGetterContext excluded) {
int cacheCount;
while ((cacheCount = internalCache.size()) > maxContexts) {
int sampleCount = Math.max(cacheCount - maxContexts, cleanupRemoveAtLeastItems) + 1;
for (SamplingEntry sample: internalCache.getRandomSample... | class class_name[name] begin[{]
method[cleanupIfNeccessary, return_type[void], modifier[private], parameter[excluded]] begin[{]
local_variable[type[int], cacheCount]
while[binary_operation[assign[member[.cacheCount], call[internalCache.size, parameter[]]], >, member[.maxContexts]]] begi... | Keyword[private] Keyword[void] identifier[cleanupIfNeccessary] operator[SEP] identifier[JsonGetterContext] identifier[excluded] operator[SEP] {
Keyword[int] identifier[cacheCount] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[cacheCount] operator[=] identifier[internalCache] operator[SEP] i... |
public static Map<String, String> splitUrlQuery(String query) {
Map<String, String> result = new HashMap<String, String>();
String[] pairs = query.split("&");
if (pairs != null && pairs.length > 0) {
for (String pair : pairs) {
String[] param = pair.split("=", 2);
... | class class_name[name] begin[{]
method[splitUrlQuery, return_type[type[Map]], modifier[public static], parameter[query]] begin[{]
local_variable[type[Map], result]
local_variable[type[String], pairs]
if[binary_operation[binary_operation[member[.pairs], !=, literal[null]], &&, bi... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[splitUrlQuery] operator[SEP] identifier[String] identifier[query] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[result] operato... |
public static BigDecimal toBigDecimal(byte[] bytes, int offset, final int length) {
if (bytes == null || length < SIZEOF_INT + 1 ||
(offset + length > bytes.length)) {
return null;
}
int scale = toInt(bytes, offset);
byte[] tcBytes = new byte[length - SIZEOF_INT];
System.arraycopy(byt... | class class_name[name] begin[{]
method[toBigDecimal, return_type[type[BigDecimal]], modifier[public static], parameter[bytes, offset, length]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.bytes], ==, literal[null]], ||, binary_operation[member[.length], <, binary_opera... | Keyword[public] Keyword[static] identifier[BigDecimal] identifier[toBigDecimal] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[length] operator[SEP] {
Keyword[if] operator[SEP] identifier[bytes] operator[==] O... |
Boolean isFixedPrecisionScale() {
switch (type) {
case Types.SQL_BIGINT :
case Types.SQL_DECIMAL :
case Types.SQL_DOUBLE :
case Types.SQL_FLOAT :
case Types.SQL_INTEGER :
case Types.SQL_NUMERIC :
case Types.SQL_REAL :
... | class class_name[name] begin[{]
method[isFixedPrecisionScale, return_type[type[Boolean]], modifier[default], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SQL_BIGINT, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), MemberReferen... | identifier[Boolean] identifier[isFixedPrecisionScale] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[Types] operator[SEP] identifier[SQL_BIGINT] operator[:] Keyword[case] identifier[Types] operator[SEP] identifier[SQL_DECIMAL] ope... |
@Indexable(type = IndexableType.DELETE)
@Override
public CPRuleAssetCategoryRel deleteCPRuleAssetCategoryRel(
long CPRuleAssetCategoryRelId) throws PortalException {
return cpRuleAssetCategoryRelPersistence.remove(CPRuleAssetCategoryRelId);
} | class class_name[name] begin[{]
method[deleteCPRuleAssetCategoryRel, return_type[type[CPRuleAssetCategoryRel]], modifier[public], parameter[CPRuleAssetCategoryRelId]] begin[{]
return[call[cpRuleAssetCategoryRelPersistence.remove, parameter[member[.CPRuleAssetCategoryRelId]]]]
end[}]
END[}] | annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPRuleAssetCategoryRel] identifier[deleteCPRuleAssetCategoryRel] operator[SEP] Keyword[long] identifier[CP... |
protected PropertyData updatePropertyData(InternalQName name, List<ValueData> values) throws RepositoryException
{
PropertyData existed =
(PropertyData)dataManager.getItemData(nodeData(), new QPathEntry(name, 0), ItemType.PROPERTY);
if (existed == null)
{
throw new RepositoryExce... | class class_name[name] begin[{]
method[updatePropertyData, return_type[type[PropertyData]], modifier[protected], parameter[name, values]] begin[{]
local_variable[type[PropertyData], existed]
if[binary_operation[member[.existed], ==, literal[null]]] begin[{]
ThrowStatement(ex... | Keyword[protected] identifier[PropertyData] identifier[updatePropertyData] operator[SEP] identifier[InternalQName] identifier[name] , identifier[List] operator[<] identifier[ValueData] operator[>] identifier[values] operator[SEP] Keyword[throws] identifier[RepositoryException] {
identifier[PropertyData] identif... |
private Matrix buildMatrix(int maxWords, int maxDimensions) {
// Convert the vectors in the semantic map to a matrix.
SparseDoubleVector[] vectorList =
new SparseDoubleVector[wordToSemantics.size()];
for (Map.Entry<String, SparseDoubleVector> e :
wordToSemantics.entry... | class class_name[name] begin[{]
method[buildMatrix, return_type[type[Matrix]], modifier[private], parameter[maxWords, maxDimensions]] begin[{]
local_variable[type[SparseDoubleVector], vectorList]
ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=vect... | Keyword[private] identifier[Matrix] identifier[buildMatrix] operator[SEP] Keyword[int] identifier[maxWords] , Keyword[int] identifier[maxDimensions] operator[SEP] {
identifier[SparseDoubleVector] operator[SEP] operator[SEP] identifier[vectorList] operator[=] Keyword[new] identifier[SparseDoubleVector] operator[... |
private ComparisonState
compareDocTypes(DocumentType control,
XPathContext controlContext,
DocumentType test,
XPathContext testContext) {
return compare(new Comparison(ComparisonType.DOCTYPE_NAME,
... | class class_name[name] begin[{]
method[compareDocTypes, return_type[type[ComparisonState]], modifier[private], parameter[control, controlContext, test, testContext]] begin[{]
return[call[.compare, parameter[ClassCreator(arguments=[MemberReference(member=DOCTYPE_NAME, postfix_operators=[], prefix_operat... | Keyword[private] identifier[ComparisonState] identifier[compareDocTypes] operator[SEP] identifier[DocumentType] identifier[control] , identifier[XPathContext] identifier[controlContext] , identifier[DocumentType] identifier[test] , identifier[XPathContext] identifier[testContext] operator[SEP] {
Keyword[retur... |
@Override
public BatchUpdateUserResult batchUpdateUser(BatchUpdateUserRequest request) {
request = beforeClientExecution(request);
return executeBatchUpdateUser(request);
} | class class_name[name] begin[{]
method[batchUpdateUser, return_type[type[BatchUpdateUserResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeBatchUpdateUser, parameter[member[.req... | annotation[@] identifier[Override] Keyword[public] identifier[BatchUpdateUserResult] identifier[batchUpdateUser] operator[SEP] identifier[BatchUpdateUserRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] o... |
public boolean isWritable(int column) throws SQLException {
checkColumn(column);
return resultMetaData.colIndexes != null
&& resultMetaData.colIndexes[--column] > -1;
} | class class_name[name] begin[{]
method[isWritable, return_type[type[boolean]], modifier[public], parameter[column]] begin[{]
call[.checkColumn, parameter[member[.column]]]
return[binary_operation[binary_operation[member[resultMetaData.colIndexes], !=, literal[null]], &&, binary_operatio... | Keyword[public] Keyword[boolean] identifier[isWritable] operator[SEP] Keyword[int] identifier[column] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkColumn] operator[SEP] identifier[column] operator[SEP] operator[SEP] Keyword[return] identifier[resultMetaData] operator[SEP] identifier[c... |
public static float fieldOfView(float focalLength, float sensorWidth) {
double fov = 2 * Math.atan(.5 * sensorWidth / focalLength);
return (float) Math.toDegrees(fov);
} | class class_name[name] begin[{]
method[fieldOfView, return_type[type[float]], modifier[public static], parameter[focalLength, sensorWidth]] begin[{]
local_variable[type[double], fov]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=fov, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[static] Keyword[float] identifier[fieldOfView] operator[SEP] Keyword[float] identifier[focalLength] , Keyword[float] identifier[sensorWidth] operator[SEP] {
Keyword[double] identifier[fov] operator[=] Other[2] operator[*] identifier[Math] operator[SEP] identifier[atan] operator[SEP] lite... |
Rule IfieldOrigin() {
return Sequence(String("[O:"),
ZeroOrMore(WSP()).suppressNode(),
TexTextIfield(),
String("]"))
.label(IfieldOrigin);
} | class class_name[name] begin[{]
method[IfieldOrigin, return_type[type[Rule]], modifier[default], parameter[]] begin[{]
return[call[.Sequence, parameter[call[.String, parameter[literal["[O:"]]], call[.ZeroOrMore, parameter[call[.WSP, parameter[]]]], call[.TexTextIfield, parameter[]], call[.String, param... | identifier[Rule] identifier[IfieldOrigin] operator[SEP] operator[SEP] {
Keyword[return] identifier[Sequence] operator[SEP] identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[ZeroOrMore] operator[SEP] identifier[WSP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[supp... |
protected void bindLiteral(int paramIndex, String s, int oid) throws SQLException {
preparedParameters.setLiteralParameter(paramIndex, s, oid);
} | class class_name[name] begin[{]
method[bindLiteral, return_type[void], modifier[protected], parameter[paramIndex, s, oid]] begin[{]
call[preparedParameters.setLiteralParameter, parameter[member[.paramIndex], member[.s], member[.oid]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[bindLiteral] operator[SEP] Keyword[int] identifier[paramIndex] , identifier[String] identifier[s] , Keyword[int] identifier[oid] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[preparedParameters] operator[SEP] identifier[setLiteralParameter] oper... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.