Hi PravinD -
Cool, OK, let's see:
> occurences of String objects and throws a
> warning if the names of the objects do not
> start with the letters 'str'
Hm. The XPath rule below will catch field declarations of Strings that don't start with "str":
and not(starts-with(VariableDeclarator/VariableDeclaratorId/@Image, 'str'))
and you can write similar ones for parameters and local variable declarations.
> checks for open connection objects and
> throws a warning if these objects remain
Check out the CloseConnection rule here: