benchmark/api_example.json

112 lines
3.0 KiB
JSON
Raw Normal View History

2026-01-11 10:11:01 +08:00
"""
1
{
"project": "project_name",
"file": "file_path",
"functions": [
{
"id": "function_id",
"methodname": "function_name",
"description": "function_description",
"methodbody": "function_body",
"deepth": overall_depth,
"difficulty": "function_difficulty",
"apis": [ list_of_apis_used_in_function ]
}
]
}
2API
{
"apiname": "api_name",
"library": "library_name",
"id": "api_id",
"apisource": "api_source_type", // "custome" or "third_party"
"parameters": [
{
"name": "parameter_name",
"type": "parameter_type"
}
],
"returns": {
"name": "return_value_name",
"type": "return_value_type"
},
"deepth": api_depth,
"para_depend": [ list_of_parameter_dependencies ],
"chain_depend": [ list_of_chain_dependencies ],
"apis": [ list_of_nested_apis ]
}
3
a.id1id
b.deepthdeepthmax deepthapideepthapi
4
a使jdtjava
b
"""
{
"project": "projectA",
"file": "src/com/example/Example.java",
"functions": [
{
"id": "*****1",
"methodname": "FunctionA",
"description": "This function does A",
"methodbody": "public void FunctionA() { /* ... */ }",
"deepth": 3, //对于apic来说是3 对于apib是2maxdeepth来定义整体deepth更合理
"difficulty": "medium",
"apis": [
{
"apiname": "apiA",
"library": "",
"id": "*****2",
"apisource": "custome",
"parameters": [
{
"name": "param1",
"type": "String"
}
],
"returns": {
"name": "returnValue1",
"type": ""
},
"deepth": 2,
"para_depend": [],
"chain_depend": [],
"apis": [
{
"apiname": "apiC",
"library": "org.example",
"id": "*****4", //三方包是否需要id
"apisource": "third_party",
"parameters": [],
"returns": {
"name": "returnValue2",
"type": ""
},
"deepth": 1,
"para_depend": [],
"chain_depend": [],
"apis": []
}
]
},
{
"apiname": "apiB",
"library": "org.example",
"id": "*****3", //三方包是否需要id
"apisource": "third_party",
"parameters": [],
"returns": {
"name": "returnValue3",
"type": ""
},
"deepth": 1,
"para_depend": [],
"chain_depend": [],
"apis": []
}
]
}
]
}