Dataset Viewer
Auto-converted to Parquet Duplicate
nwo
stringclasses
449 values
path
stringlengths
9
173
language
stringclasses
1 value
identifier
stringlengths
1
53
docstring
stringlengths
5
4.13k
function
stringlengths
10
87.2k
ast_function
stringlengths
351
354k
obf_function
stringlengths
10
87.2k
url
stringlengths
30
175
function_sha
stringlengths
40
40
source
stringclasses
3 values
LJ666-ui/harmony-health-care
entry/src/main/ets/aiagent/OphthalmologyAgent.ets
arkts
getMyopiaPreventionAdvice
近视预防建议
private getMyopiaPreventionAdvice(): string { return `【近视预防建议】 1. **科学用眼** - 保持正确读写姿势 - 读写距离保持33cm以上 - 每用眼40分钟休息10分钟 2. **户外活动** - 每天户外活动2小时以上 - 自然光有助于预防近视 - 多进行远眺活动 3. **光线环境** - 读写时光线要充足 - 避免在强光或暗光下用眼 - 使用护眼台灯 4. **营养均衡** - 补充维生素A、C、E - 多吃绿叶蔬菜和水果 - 适量补充DHA 5. **定期检查** ...
AST#program#Left AST#ERROR#Left AST#private#Left private AST#private#Right AST#call_expression#Left AST#identifier#Left getMyopiaPreventionAdvice AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left : AST#:#Right AST#string#Le...
private getMyopiaPreventionAdvice(): string { return `【近视预防建议】 1. **科学用眼** - 保持正确读写姿势 - 读写距离保持33cm以上 - 每用眼40分钟休息10分钟 2. **户外活动** - 每天户外活动2小时以上 - 自然光有助于预防近视 - 多进行远眺活动 3. **光线环境** - 读写时光线要充足 - 避免在强光或暗光下用眼 - 使用护眼台灯 4. **营养均衡** - 补充维生素A、C、E - 多吃绿叶蔬菜和水果 - 适量补充DHA 5. **定期检查** ...
https://github.com/LJ666-ui/harmony-health-care
b984cd5984c42f254fa38ae25a20055cdb67f854
github
openharmony/arkui_ace_engine
examples/Info/entry/src/main/ets/pages/progress/ProgressTestCase006.ets
arkts
progress2
contentModifier设置了小于Progress的宽高
@Builder function progress2(config: ProgressConfiguration) { Column() { Row({ space: 2 }) { Checkbox({ name: 'checkbox1', group: 'checkboxGroup' }) .select(config.enabled && config.value >= 20 ? true : false) .selectedColor(0xed6f21) .shape(CheckBoxShape.CIRCLE) Checkbox({ name...
AST#program#Left AST#function_declaration#Left AST#decorator#Left AST#@#Left @ AST#@#Right AST#identifier#Left Builder AST#identifier#Right AST#decorator#Right AST#function#Left function AST#function#Right AST#identifier#Left progress2 AST#identifier#Right AST#formal_parameters#Left AST#(#Left ( AST#(#Right AST#require...
@Builder function progress2(config: ProgressConfiguration) { Column() { Row({ space: 2 }) { Checkbox({ name: 'checkbox1', group: 'checkboxGroup' }) .select(config.enabled && config.value >= 20 ? true : false) .selectedColor(0xed6f21) .shape(CheckBoxShape.CIRCLE) Checkbox({ name...
https://gitee.com/openharmony/arkui_ace_engine.git
bd94a1b05bbe25f58bff4c546de09d9930b3ab66
gitee
killetom/ktretrofit
ktretrofit/src/main/ets/retrofit/util/MetadataUtil.ets
arkts
markMultipart
Mark a method as multipart
static markMultipart(target: Object, propertyKey: string | symbol): void { this.defineMetadata('retrofit:isMultipart', true, target, propertyKey); }
AST#program#Left AST#ERROR#Left AST#static#Left static AST#static#Right AST#call_expression#Left AST#identifier#Left markMultipart AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#ERROR#Left AST#identifier#Left target AST#identifier#Right AST#:#Left : AST#:#Right AST#ERROR#Right AST#identifier#Left ...
static markMultipart(target: Object, propertyKey: string | symbol): void { this.defineMetadata('retrofit:isMultipart', true, target, propertyKey); }
https://github.com/killetom/ktretrofit
028960936931cfe1acddda12250cbf471542a264
github
openharmony/applications_mms
entry/src/main/ets/utils/MmsPreferences.ets
arkts
getValueOfAutoRetrieveMmsSwitch
Obtains the value of the function of automatically downloading MMS messages.
public getValueOfAutoRetrieveMmsSwitch(): string { return <string> this.getValueFromMap(common.string.KEY_OF_AUTO_RETRIEVE_SWITCH, common.AUTO_RETRIEVE_MMS.NOT_WHEN_ROAMING); }
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#call_expression#Left AST#identifier#Left getValueOfAutoRetrieveMmsSwitch AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left : AST#:#Right AST#string...
public getValueOfAutoRetrieveMmsSwitch(): string { return <string> this.getValueFromMap(common.string.KEY_OF_AUTO_RETRIEVE_SWITCH, common.AUTO_RETRIEVE_MMS.NOT_WHEN_ROAMING); }
https://gitee.com/openharmony/applications_mms.git
89679dadcc4dccee4376865255b87da7c8e06f46
gitee
Joker-x-dev/CoolMallArkTS
feature/user/src/main/ets/viewmodel/FootprintViewModel.ets
arkts
convertFootprintsToGoods
将足迹列表转换为商品列表 @param {Footprint[]} footprints - 足迹列表 @returns {Goods[]} 商品列表
private convertFootprintsToGoods(footprints: Footprint[]): Goods[] { return footprints.map((item: Footprint): Goods => { const goods = new Goods(); goods.id = item.goodsId; goods.title = item.goodsName; goods.subTitle = item.goodsSubTitle ?? ""; goods.mainPic = item.goodsMainPic; ...
AST#program#Left AST#ERROR#Left AST#private#Left private AST#private#Right AST#call_expression#Left AST#identifier#Left convertFootprintsToGoods AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#ERROR#Left AST#identifier#Left footprints AST#identifier#Right AST#:#Left : AST#:#Right AST#ERROR#Right AS...
private convertFootprintsToGoods(footprints: Footprint[]): Goods[] { return footprints.map((item: Footprint): Goods => { const goods = new Goods(); goods.id = item.goodsId; goods.title = item.goodsName; goods.subTitle = item.goodsSubTitle ?? ""; goods.mainPic = item.goodsMainPic; ...
https://github.com/Joker-x-dev/CoolMallArkTS
296284c6cd880c8a48c83756cbdc16a38f71de74
github
openharmony-sig/arkcompiler_runtime_core
plugins/ets/stdlib/escompat/TypedUArrays.ets
arkts
set
Copies all elements of arr to the current Uint32Array starting from insertPos. @param arr array to copy data from @param insertPos start index where data from arr will be inserted {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set}
public set(arr: number[], insertPos1: number): void { const insertPos = insertPos1 as int if (insertPos < 0 || insertPos + arr.length > this.length) { throw new RangeError("set(insertPos: int, arr: number[]): size of arr is greater than Uint32Array.length") } for (let i =...
AST#program#Left AST#ERROR#Left AST#call_expression#Left AST#identifier#Left public AST#identifier#Right AST#ERROR#Left AST#identifier#Left set AST#identifier#Right AST#ERROR#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#ERROR#Left AST#identifier#Left arr AST#identifier#Right AST#:#Left : AST#:#Right AST#ERROR#...
public set(arr: number[], insertPos1: number): void { const insertPos = insertPos1 as int if (insertPos < 0 || insertPos + arr.length > this.length) { throw new RangeError("set(insertPos: int, arr: number[]): size of arr is greater than Uint32Array.length") } for (let i =...
https://gitee.com/openharmony-sig/arkcompiler_runtime_core.git
780789bd2241217070f9a1ef4b2e9557cb8e6c9e
gitee
miaochiahao/ark-ghidra
data/test_hap/arkts-decompile-test36_original_index.ets
arkts
testFlatten
--- Flatten nested array (manual) ---
function testFlatten(): string { let nested: number[][] = [[1, 2], [3, 4, 5], [6]]; let flat: number[] = []; for (let i: number = 0; i < nested.length; i++) { let inner: number[] = nested[i]; for (let j: number = 0; j < inner.length; j++) { flat.push(inner[j]); } } return String(flat.length)...
AST#program#Left AST#function_declaration#Left AST#function#Left function AST#function#Right AST#identifier#Left testFlatten AST#identifier#Right AST#formal_parameters#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#formal_parameters#Right AST#type_annotation#Left AST#:#Left : AST#:#Right AST#predefined_type...
function testFlatten(): string { let nested: number[][] = [[1, 2], [3, 4, 5], [6]]; let flat: number[] = []; for (let i: number = 0; i < nested.length; i++) { let inner: number[] = nested[i]; for (let j: number = 0; j < inner.length; j++) { flat.push(inner[j]); } } return String(flat.length)...
https://github.com/miaochiahao/ark-ghidra
9c037f341f51155e1e103184b5dc40ceee50fae8
github
openharmony/arkui_ace_engine
advanced_ui_component/treeview/source/treeview.ets
arkts
initSection
update delay init some nodes
public initSection(): void { this.initHandler(this.listNode, 0, 1); }
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#call_expression#Left AST#identifier#Left initSection AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left : AST#:#Right AST#ERROR#Right AST#expression...
public initSection(): void { this.initHandler(this.listNode, 0, 1); }
https://gitee.com/openharmony/arkui_ace_engine.git
109159c51dd6316822074d13c36ece04aa735a33
gitee
iop123123/arkts-static-skills
docs/ArkTS-Language-Guide/08-Stdlib/stdlib-source/std/core/Char.ets
arkts
isPartOfSurrogatePair
isPartOfSurrogatePair() checks whether the underlying char is low or high surrogate. @returns { boolean } @syscap SystemCapability.Utils.Lang @FaAndStageModel
public isPartOfSurrogatePair(): boolean { return Char.isPartOfSurrogatePair(this.value); }
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#call_expression#Left AST#identifier#Left isPartOfSurrogatePair AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left : AST#:#Right AST#boolean#Left boo...
public isPartOfSurrogatePair(): boolean { return Char.isPartOfSurrogatePair(this.value); }
https://gitcode.com/iop123123/arkts-static-skills
a9feba82bde196439e4fe73168c79e640a81c070
gitcode
openharmony/codelabs
ETSUI/PositioningDemo/entry/src/main/ets/service/ReminderService.ets
arkts
getUnreadReminderCount
获取未读提醒数量
getUnreadReminderCount(): number { return this.reminderHistory.filter(r => !r.isRead).length; }
AST#program#Left AST#ERROR#Left AST#call_expression#Left AST#identifier#Left getUnreadReminderCount AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left : AST#:#Right AST#number#Left number AST#number#Right AST#ERROR#Right AST...
getUnreadReminderCount(): number { return this.reminderHistory.filter(r => !r.isRead).length; }
https://gitcode.com/openharmony/codelabs
67eadc099f54d96b14b1972a9c86de598248cff5
gitcode
dingzhilin1990/zhilinclaw
src/security/SandboxedExecutor.ets
arkts
execute
在沙箱中执行代码 @param code 要执行的代码(WASM 字节码或 JS 字符串) @param input 输入数据 @param context 执行上下文
public async execute( code: Uint8Array | string, input?: any, context?: Record<string, any> ): Promise<SandboxResult> { const startTime = Date.now(); try { // 安全检查 await this.performSecurityChecks('execute_code'); console.log('[SandboxedExecutor] 开始执行沙箱代码...'); // 创建沙...
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#identifier#Left async AST#identifier#Right AST#call_expression#Left AST#identifier#Left execute AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#ERROR#Left AST#identifier#Left code AST#identifier#Right AST#:#Left : AST#:#Rig...
public async execute( code: Uint8Array | string, input?: any, context?: Record<string, any> ): Promise<SandboxResult> { const startTime = Date.now(); try { // 安全检查 await this.performSecurityChecks('execute_code'); console.log('[SandboxedExecutor] 开始执行沙箱代码...'); // 创建沙...
https://github.com/dingzhilin1990/zhilinclaw
d88ffa44c0ff839df8e4b0b85288ce3bb3785caa
github
NissonCX/CQU-HarmonyOS-APP-Dev-Final
entry/src/main/ets/utils/ExportManager.ets
arkts
getInstance
获取 ExportManager 单例
static getInstance(): ExportManager { if (!ExportManager.instance) { ExportManager.instance = new ExportManager(); } return ExportManager.instance; }
AST#program#Left AST#ERROR#Left AST#static#Left static AST#static#Right AST#call_expression#Left AST#identifier#Left getInstance AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left : AST#:#Right AST#identifier#Left ExportMana...
static getInstance(): ExportManager { if (!ExportManager.instance) { ExportManager.instance = new ExportManager(); } return ExportManager.instance; }
https://github.com/NissonCX/CQU-HarmonyOS-APP-Dev-Final
e9aebb15dc58a2e3365b04a827dbad5b73882e9f
github
DaLongZhuaZi/manxia
entry/src/main/ets/Framework/Animation/ItemTransitionAnimator.ets
arkts
calculateGridPositions
计算网格布局的条目位置 @param itemCount 条目总数 @param columns 列数 @param itemWidth 条目宽度 @param itemHeight 条目高度 @param columnGap 列间距 @param rowGap 行间距 @param paddingLeft 左内边距 @param paddingTop 上内边距
public calculateGridPositions( itemCount: number, columns: number, itemWidth: number, itemHeight: number, columnGap: number, rowGap: number, paddingLeft: number = 0, paddingTop: number = 0 ): ItemPosition[] { const positions: ItemPosition[] = []; for (let i = 0; i < item...
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#call_expression#Left AST#identifier#Left calculateGridPositions AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#identifier#Left itemCount AST#identifier#Right AST#ERROR#Left AST#:#Left : AST#:#Right AST#number#Left number A...
public calculateGridPositions( itemCount: number, columns: number, itemWidth: number, itemHeight: number, columnGap: number, rowGap: number, paddingLeft: number = 0, paddingTop: number = 0 ): ItemPosition[] { const positions: ItemPosition[] = []; for (let i = 0; i < item...
https://github.com/DaLongZhuaZi/manxia
0a5f28cd22244e6c3811dd2cd129a7ab31021b2f
github
openharmony-tpc/ohos_mpchart
library/src/main/ets/components/data/BarDataSet.ets
arkts
getGradient
This method is deprecated. Use getFill(...) instead. @param index
public getGradient(index: number): Fill | null { return this.getFill(index); }
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#call_expression#Left AST#identifier#Left getGradient AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#ERROR#Left AST#identifier#Left index AST#identifier#Right AST#:#Left : AST#:#Right AST#ERROR#Right AST#identifier#Left num...
public getGradient(index: number): Fill | null { return this.getFill(index); }
https://gitee.com/openharmony-tpc/ohos_mpchart.git
d6258960c3596b1ea5b525e2a3c3e541e8baee38
gitee
DaLongZhuaZi/manxia
entry/src/main/ets/Framework/Services/CacheStatusService.ets
arkts
getNovelCacheStatus
获取小说缓存状态 @param bookId 小说ID @param bookTitle 小说标题(可选) @param totalChapters 总章节数(可选)
async getNovelCacheStatus( bookId: string, bookTitle?: string, totalChapters?: number ): Promise<ContentCacheStats> { const startedAt: number = Date.now(); const flowId: string = this.ensureCacheStatusFlow(CacheContentType.NOVEL, 0, bookId, bookTitle || ''); try { logger.info(TAG, `获取小...
AST#program#Left AST#ERROR#Left AST#async#Left async AST#async#Right AST#ERROR#Left AST#identifier#Left getNovelCacheStatus AST#identifier#Right AST#ERROR#Right AST#formal_parameters#Left AST#(#Left ( AST#(#Right AST#required_parameter#Left AST#identifier#Left bookId AST#identifier#Right AST#type_annotation#Left AST#:#...
async getNovelCacheStatus( bookId: string, bookTitle?: string, totalChapters?: number ): Promise<ContentCacheStats> { const startedAt: number = Date.now(); const flowId: string = this.ensureCacheStatusFlow(CacheContentType.NOVEL, 0, bookId, bookTitle || ''); try { logger.info(TAG, `获取小...
https://github.com/DaLongZhuaZi/manxia
3c0c8648e889bae95a9e47f99f081b166fec3ed6
github
openharmony-tpc/ohos_coap
libcoap/src/main/ets/components/mainpage/CoapClient.ets
arkts
setPayloadBinary
客户端透传的字节内容 @param payload post,put透传的内容
setPayloadBinary(payload: Uint8Array) { this.coapClient.setPayloadBinary(payload, this.classId); }
AST#program#Left AST#expression_statement#Left AST#call_expression#Left AST#identifier#Left setPayloadBinary AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#ERROR#Left AST#identifier#Left payload AST#identifier#Right AST#:#Left : AST#:#Right AST#ERROR#Right AST#identifier#Left Uint8Array AST#identi...
setPayloadBinary(payload: Uint8Array) { this.coapClient.setPayloadBinary(payload, this.classId); }
https://gitee.com/openharmony-tpc/ohos_coap.git
7a4a014cc0c33f3a8f7c55ea558ea997f35cc577
gitee
openharmony-tpc/ohos_mpchart
library/src/main/ets/components/data/LineScatterCandleRadarDataSet.ets
arkts
disableDashedHighlightLine
Disables the highlight-line to be drawn in dashed mode.
public disableDashedHighlightLine(): void { this.mHighlightDashPathEffect = null; }
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#call_expression#Left AST#identifier#Left disableDashedHighlightLine AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left : AST#:#Right AST#ERROR#Right...
public disableDashedHighlightLine(): void { this.mHighlightDashPathEffect = null; }
https://gitee.com/openharmony-tpc/ohos_mpchart.git
451b135d2fc1ca22d5812cff1a87471c1481f09e
gitee
Joker-x-dev/CoolMallArkTS
entry/src/main/ets/entryability/EntryAbility.ets
arkts
onWindowStageCreate
窗口创建时调用 加载入口页面、初始化UI基础样式 @param {window.WindowStage} windowStage - 窗口阶段 @returns {Promise<void>} 无返回值的Promise
async onWindowStageCreate(windowStage: window.WindowStage): Promise<void> { await this.initIBestORM(); windowStage.loadContent('view/EntryPage', (_) => { IBestUIInitializer.initIBestUI(windowStage, this.context); }); }
AST#program#Left AST#ERROR#Left AST#async#Left async AST#async#Right AST#ERROR#Left AST#identifier#Left onWindowStageCreate AST#identifier#Right AST#ERROR#Right AST#formal_parameters#Left AST#(#Left ( AST#(#Right AST#required_parameter#Left AST#identifier#Left windowStage AST#identifier#Right AST#type_annotation#Left A...
async onWindowStageCreate(windowStage: window.WindowStage): Promise<void> { await this.initIBestORM(); windowStage.loadContent('view/EntryPage', (_) => { IBestUIInitializer.initIBestUI(windowStage, this.context); }); }
https://github.com/Joker-x-dev/CoolMallArkTS
95f5edb716fc182b6e99461c25dd235a59dcc6ea
github
offlinecat-dev/OCNetORM
src/main/ets/errors/RelationError.ets
arkts
constructor
构造函数 @param foreignKeySide 无效的外键位置配置
constructor(foreignKeySide: string) { const context = new ErrorContext() context.operation = '配置外键位置' context.details = `无效的外键位置: ${foreignKeySide}` super(`无效的外键位置配置: '${foreignKeySide}',有效值为 'source' 或 'target'`, ERROR_INVALID_FOREIGN_KEY_SIDE, context) this.name = 'InvalidForeignKeySideError' ...
AST#program#Left AST#expression_statement#Left AST#call_expression#Left AST#identifier#Left constructor AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#identifier#Left foreignKeySide AST#identifier#Right AST#ERROR#Left AST#:#Left : AST#:#Right AST#string#Left string AST#string#Right AST#ERROR#Right...
constructor(foreignKeySide: string) { const context = new ErrorContext() context.operation = '配置外键位置' context.details = `无效的外键位置: ${foreignKeySide}` super(`无效的外键位置配置: '${foreignKeySide}',有效值为 'source' 或 'target'`, ERROR_INVALID_FOREIGN_KEY_SIDE, context) this.name = 'InvalidForeignKeySideError' ...
https://github.com/offlinecat-dev/OCNetORM
4170fa5bf9c069c6273c0f9f9ee5389cfce20e74
github
mybricks/comlib-harmony-normal
packages/rt-arkts/comlib/src/main/ets/_ChooseFile.ets
arkts
formatFileType
格式化后缀
function formatFileType(arr: string[]): string[] { if (arr) { return arr.join(',').split(',') } return [] }
AST#program#Left AST#function_declaration#Left AST#function#Left function AST#function#Right AST#identifier#Left formatFileType AST#identifier#Right AST#formal_parameters#Left AST#(#Left ( AST#(#Right AST#required_parameter#Left AST#identifier#Left arr AST#identifier#Right AST#type_annotation#Left AST#:#Left : AST#:#Ri...
function formatFileType(arr: string[]): string[] { if (arr) { return arr.join(',').split(',') } return [] }
https://github.com/mybricks/comlib-harmony-normal
1b431108b1c603802298147e9cc01966c425ee15
github
tangwengang-del/freerdp-harmonyos
entry/src/main/ets/services/AudioFocusManager.ets
arkts
isMuted
Check if audio is muted Note: AudioVolumeManager.isMute is not available in current SDK
static async isMuted(): Promise<boolean> { // AudioVolumeManager doesn't expose isMute directly in current SDK return false; }
AST#program#Left AST#ERROR#Left AST#static#Left static AST#static#Right AST#identifier#Left async AST#identifier#Right AST#call_expression#Left AST#identifier#Left isMuted AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#:#Left :...
static async isMuted(): Promise<boolean> { // AudioVolumeManager doesn't expose isMute directly in current SDK return false; }
https://github.com/tangwengang-del/freerdp-harmonyos
db009a36033ff54dbeb319d22c77212ed6320f6f
github
luojiang001/Pulse
Pulse/oh_modules/collect_personal_info/src/main/ets/common/WindowModel.ets
arkts
registerWindowBottomPadding
监听底部避让区域变化
public registerWindowBottomPadding() { this.getWindowBottomPadding(); window.getLastWindow(getContext()).then(currentWindow => { currentWindow.on('avoidAreaChange', this.getWindowBottomPadding); }) }
AST#program#Left AST#ERROR#Left AST#public#Left public AST#public#Right AST#call_expression#Left AST#identifier#Left registerWindowBottomPadding AST#identifier#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#)#Left ) AST#)#Right AST#arguments#Right AST#call_expression#Right AST#ERROR#Right AST#statement_block#Lef...
public registerWindowBottomPadding() { this.getWindowBottomPadding(); window.getLastWindow(getContext()).then(currentWindow => { currentWindow.on('avoidAreaChange', this.getWindowBottomPadding); }) }
https://github.com/luojiang001/Pulse
ca128f163a46ef6102f0659c3abf65157cf372f0
github
iop123123/arkts-static-skills
docs/ArkTS-Language-Guide/08-Stdlib/stdlib-source/std/core/TypedArrays.ets
arkts
fill
Fills the Int16Array with specified value @param { number } value - new value @param { int } [start] - start index to begin fill from @param { int } [end] - last index to end fill from, excluded @returns { this } - modified Int16Array @syscap SystemCapability.Utils.Lang @FaAndStageModel
public fill(value: number, start?: int, end?: int): this { this.fill(Int16Array.doubleToInt(value), start, end) return this }
AST#program#Left AST#ERROR#Left AST#call_expression#Left AST#identifier#Left public AST#identifier#Right AST#ERROR#Left AST#identifier#Left fill AST#identifier#Right AST#ERROR#Right AST#arguments#Left AST#(#Left ( AST#(#Right AST#ERROR#Left AST#identifier#Left value AST#identifier#Right AST#:#Left : AST#:#Right AST#ERR...
public fill(value: number, start?: int, end?: int): this { this.fill(Int16Array.doubleToInt(value), start, end) return this }
https://gitcode.com/iop123123/arkts-static-skills
f7a5e936080f115c1899346dbed0bffe39adb264
gitcode
richshaw2015/nds
ohos/entry/src/test/DependencyRelations.test.ets
arkts
calculateMacAddressDependentDisabledState
计算MAC地址依赖设置的禁用状态 Requirements: 5.7 @param randomizeMac 是否随机MAC地址 @returns 依赖设置的禁用状态
function calculateMacAddressDependentDisabledState(randomizeMac: boolean): Record<string, boolean> { return { 'internal_mac_address': randomizeMac }; }
AST#program#Left AST#function_declaration#Left AST#function#Left function AST#function#Right AST#identifier#Left calculateMacAddressDependentDisabledState AST#identifier#Right AST#formal_parameters#Left AST#(#Left ( AST#(#Right AST#required_parameter#Left AST#identifier#Left randomizeMac AST#identifier#Right AST#type_a...
function calculateMacAddressDependentDisabledState(randomizeMac: boolean): Record<string, boolean> { return { 'internal_mac_address': randomizeMac }; }
https://github.com/richshaw2015/nds
d1f7d4da6d85682712a6475f4ed4b56c99612082
github
End of preview. Expand in Data Studio

ArkTS-CodeSearch-Pro: A Cleaned and License-Aware ArkTS Dataset

Original Dataset | Pro Dataset | Paper | Evaluation Code | Dataset Processing Code

This dataset is an improved version of ArkTS-CodeSearch. It contains function-level information from ArkTS (.ets) projects, including function source code, docstrings, AST representations, and repository metadata. It is intended for code retrieval, code understanding, and AST-based research.

601790fe-7182-4bb2-bceb-f246c666bcb8

Compared with the original dataset, this Pro version provides the following improvements:

  • License-aware collection: only repositories with locally identified open-source licenses are included. The supported license families include Apache-2.0, MIT, BSD, GPL, LGPL, and MPL.
  • Repository quality filtering: only repositories with more than zero stars are retained.
  • Comment normalization: comment delimiters such as //, /*, */, and leading * are removed from the docstrings.
  • Noise removal: copyright/license headers, code-only comments, and cleaned docstrings shorter than five characters are excluded.
  • Stronger deduplication: complete function texts and cleaned queries are globally unique.
  • Repository-isolated evaluation: repo_split_balanced groups repositories by normalized nwo across GitHub, Gitee, and GitCode, preventing the same cross-platform repository name from appearing in multiple splits.
  • Stable split sizes: both configurations are approximately 80%/10%/10%.

The final dataset contains 31,164 examples, all extracted from .ets files. The sha column was removed because commit SHA metadata was unavailable for most source repositories; function_sha is retained as a function-content identifier.

Dataset Structure

The dataset provides two configurations:

  • repo_split_balanced: repository-level split with normalized nwo repository isolation. It contains 24,932 training, 3,116 validation, and 3,116 test examples.
  • random_shuffle: globally shuffled split with seed 20260714. It contains 24,931 training, 3,117 validation, and 3,116 test examples.

Features / Columns

Field Type Description
nwo string Repository name
path string .ets file path
language string Programming language (arkts)
identifier string Function identifier / name
docstring string Cleaned, normalized function documentation
function string Original function source code
ast_function string AST representation generated with tree-sitter-arkts
obf_function string Legacy obfuscated-function field; currently equal to function
url string Repository or source-code URL when available
function_sha string Function-content identifier
source string Code source platform (GitHub / Gitee / GitCode)

Usage

from datasets import load_dataset

# Repository-isolated configuration
dataset = load_dataset(
    "hreyulog/arkts-code-docstring-pro",
    name="repo_split_balanced",
)

# Random-shuffle configuration
random_dataset = load_dataset(
    "hreyulog/arkts-code-docstring-pro",
    name="random_shuffle",
)

print(dataset["train"][0])
print(dataset["train"].features)

License Configuration

All included repositories were selected from locally identified open-source repositories. Users must still comply with the individual upstream repository licenses and attribution requirements. This Pro dataset does not grant a new license over the source code.

Citation

If you use this dataset in your research, please cite the following paper:

@misc{he2026arktscodesearchopensourcearktsdataset,
      title={ArkTS-CodeSearch: A Open-Source ArkTS Dataset for Code Retrieval},
      author={Yulong He and Artem Ermakov and Sergey Kovalchuk and Artem Aliev and Dmitry Shalymov},
      year={2026},
      eprint={2602.05550},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2602.05550},
}
Downloads last month
79

Paper for hreyulog/arkts-code-docstring-pro