CAST Engineering Dashboard - Violations - False Violation - Avoid Classes with a High Public Data Ratio
Purpose (problem description)
This page handle the issue of false violation for the Quality rule “Avoid Classes with a High Public Data Ratio”
Observed in CAST AIP
| Release | Yes/No |
|---|---|
| 8.3.x | ✅ |
Observed on RDBMS
| RDBMS | Yes/No |
|---|---|
| CSS | ✅ |
Step by Step scenario
- Compute snapshot
- Open CED
- Observe that the violation “Avoid Classes with a High Public Data Ratio” is a false one
Action Plan
Perform the below actions
Check if the number of fields and public fields is correctly computed in the KB, the 2 parameters are computed correctly if there values are equal to the values from the source code, for example, if an object from the source code have 1 public field and 1 private field then “num_fields” should be equal to 2 and “num_pub_field” should be equal to 1:
Run the below query on Knowledge Base -
SELECT num_fields,
num_pub_fields
FROM dssapp_classes
WHERE object_id =
Get the OBJECT\_ID from page - [SQL Queries - CAST Knowledge Base - Queries on objects - How to get the ID of an object from its object name or full name](/export-v2/tg/sql-queries/sql-queries-cast-knowledge-base/sql-queries-cast-knowledge-base-queries-on-objects/sql-queries-cast-knowledge-base-queries-on-objects-how-to-get-the-id-of-an-object-from-its-object-name-or-full-name/)
1. If the number of fields and public fields is not correctly computed then this is a known bug fixed in 8.3.0, for more information refer to [Resolved issues in this release](https://doc-legacy.castsoftware.com/display/DOC83/Resolved+issues+in+this+release), If you are in a version < 8.3.0 then apply the below work around
1. 1. Install the procedure [DSSAPP\_SCOPE\_INIT\_CLASSESONLY.sql](https://doc-data.castsoftware.com/TG/attachments/566539158/566539159.sql) and [DSSAPP\_SCOPE\_INIT\_CPPABSTCLASSES.sql](https://doc-data.castsoftware.com/TG/attachments/566539158/566539157.sql) on the knowledge schema
2. Compute snapshot by skipping analysis.
3. Open CED
2. If you are using an AIP version >=8.3.0 or if you are using an AIP version 8.1 or 8.2 and the above steps do not resolve your issue then refer to [CAST Engineering Dashboard - Violations - False violation or no violation](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cast-engineering-dashboard-component-ced/cast-engineering-dashboard-violations/cast-engineering-dashboard-violations-false-violation-or-no-violation/)
**Notes/comments**
Ticket # 10739
**Related Pages**
*Specify pages indirectly related to this topic.(eg:side- effects)*