Structural Flaw Occurrences
Overview
Get the findings for a given structural flaw detection pattern. The findings are organized by objects and objects are ordered by the object name, then the findings are ordered using an internal key, then the bookmarks or steps are orderered by a logical rank.
URI
GET /rest/applications/{name}/insights/structural-flaws/detection-patterns/{id}/occurrences
Path parameters
name (string)
This parameter identifies the analyzed application. The application name must be properly encoded if it is required. Character back-quote is not allowed.
id (integer)
The Structural Flaw detection pattern ID.
Query parameters
limit (integer)
Required. The maximum number of objects to return.
skip (integer)
Optional. The number of objects to skip before including objects in the search limit.
Responses
The response structure depends on the finding type:
- “bookmark”: the finding is a primary bookmark of the source code, followed by a set of complementary bookmarks.
- “path”: the finding is an ordered set of call stack steps.
Finding type is “bookmark”
application/json
[
{
"type": "bookmark",
"findings": [
{
"key": "26679:13:361325",
"bookmarks": [
{
"rank": 1,
"endCol": 40,
"fileId": -4652,
"endLine": 130,
"startCol": 4,
"startLine": 130
}
]
},
...
}
],
"object": {
"fullName": "DEFAULT.M_PriceList_Create",
"id": "26679",
"mangling": "M_PriceList_Create()",
"name": "M_PriceList_Create",
"type": "Oracle Procedure",
"typeId": "SQLScriptProcedure"
},
},
...
]
JSON representation
Property | Type | Description |
---|---|---|
key | string | Internal key for traceability. |
type | string | The Finding type. |
findings[] | structure | A finding is a set of bookmarks: a primary bookmark followed by secondary bookmarks. |
findings[].bookmarks[].rank | integer | The bookmark rank, rank=1 is a primary bookmark. |
findings[].bookmarks[].fileId | integer | The source code file ID. |
findings[].bookmarks[].startCol | integer | The start column of this finding in the source code file. |
findings[].bookmarks[].startLine | integer | The start line of this finding in the source code file. |
findings[].bookmarks[].endCol | integer | The end column of this finding in the source code file. |
findings[].bookmarks[].endLine | integer | The end line of this finding in the source code file. |
object.id | string | The source object ID. |
object.name | string | The source object name. |
object.fullName | string | The source object long name, usually locates the object in a software architecture. |
object.mangling | string | The function signature or an empty string if not applicable. |
object.type | string | The source object type for a display. |
object.typeId | string | The source object type identifier is the type reference key. |
Finding type is “path”
application/json
[
{
"type": "path",
"object": {
"fullName": "org.eevolution.model.MPPMRP.C_Order",
"id": "418848",
"mangling": "C_Order(org.compiere.model.MOrder) return void",
"name": "C_Order",
"type": "Java Method",
"typeId": "JV_METHOD"
},
"findings": [
{
"key": "418848:277642",
"path": [
{
"rank": 1,
"fileId": -7373,
"endLine": 723,
"startLine": 723
},
{
"rank": 2,
"fileId": -7373,
"endLine": 781,
"startLine": 781
},
...
}
},
...
]
JSON representation
Property | Type | Description |
---|---|---|
key | string | Internal key for traceability. |
type | string | The Finding type. |
findings[] | structure | A path is a an array of call steps. |
findings[].path[] | array | A call step of a path. |
findings[].path[].rank | integer | The step rank. |
findings[].path[].fileId | integer | The source code file ID. |
findings[].path[].startCol | integer | The start column of this finding in the source code file. |
findings[].path[].startLine | integer | The start line of this finding in the source code file. |
findings[].path[].endCol | integer | The end column of this finding in the source code file. |
findings[].path[].endLine | integer | The end line of this finding in the source code file. |
object.id | string | The source object ID. |
object.name | string | The source object name. |
object.fullName | string | The source object long name, usually locates the object in a software architecture. |
object.mangling | string | The function signature or an empty string if not applicable. |
object.type | string | The source object type for a display. |
object.typeId | string | The source object type identifier is the type reference key. |