private static boolean expressionUsesVariable(
     PsiExpression expression, PsiLocalVariable localVar) {
   final UseVisitor useVisitor = new UseVisitor(localVar);
   expression.accept(useVisitor);
   return useVisitor.isUsed();
 }
 private static boolean statementUsesVariable(
     PsiStatement statement, PsiLocalVariable localVar) {
   final UseVisitor useVisitor = new UseVisitor(localVar);
   statement.accept(useVisitor);
   return useVisitor.isUsed();
 }