int start = 0, end = 0;
if (location != null) {
if (location instanceof InvocationSite) {
InvocationSite site = (InvocationSite) location;
start = site.sourceStart();
end = site.sourceEnd();
} else if (location instanceof ASTNode) {
ASTNode node = (ASTNode) location;
start = node.sourceStart();
end = node.sourceEnd();
}