If statements with empty then branch

Author: LGTM

import csharp

from IfStmt i
where i.getThen().(BlockStmt).isEmpty()
select i

Description

Finds 'if' statements where the 'then' branch is an empty block statement