}
final Statement initializeResource = pp;
final Statement clearCaughtException = p;
final Match m = Match.createNew();
if (RESOURCE_INIT_PATTERN.matches(initializeResource, m) &&
CLEAR_SAVED_EXCEPTION_PATTERN.matches(clearCaughtException, m) &&
_tryPattern.matches(node, m)) {
final IdentifierExpression resource = first(m.<IdentifierExpression>get("resource"));
final ResolveResult resourceResult = _resolver.apply(resource);
if (resourceResult == null || resourceResult.getType() == null) {
return null;
}
final BlockStatement tryContent = first(m.<BlockStatement>get("tryContent"));
final Expression resourceInitializer = first(m.<Expression>get("resourceInitializer"));
final IdentifierExpression caughtException = first(m.<IdentifierExpression>get("caughtException"));
final IdentifierExpression caughtOnClose = first(m.<IdentifierExpression>get("caughtOnClose"));
final CatchClause caughtParent = first(caughtException.getAncestors(CatchClause.class));
final CatchClause caughtOnCloseParent = first(caughtOnClose.getAncestors(CatchClause.class));
if (caughtParent == null ||
caughtOnCloseParent == null ||