This rule is defined by the following XPath expression:
//Name[ (starts-with(@Image, 'System.') and (starts-with(@Image, 'System.gc') or starts-with(@Image, 'System.runFinalization'))) or ( starts-with(@Image,'Runtime.getRuntime') and ../../PrimarySuffix[ends-with(@Image,'gc')] ) ]
Example:
[ public class GCCall { public GCCall() { // Explicit gc call ! System.gc(); } public void doSomething() { // Explicit gc call ! Runtime.getRuntime().gc(); } public explicitGCcall() { // Explicit gc call ! System.gc(); } public void doSomething() { // Explicit gc call ! Runtime.getRuntime().gc(); } }