public static String approxSourceLocation(Node node){
  StackTraceElement[] stackTraceElements=approxSourceStackTraceElement(node);
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement top=stackTraceElements[0];
    if (top.getFileName() != null && top.getLineNumber() >= 0) {
      return top.getFileName() + ":" + top.getLineNumber();
    }
  }
  return null;
}

public static String approxSourceLocation ( Node node ) { StackTraceElement [ ] stackTraceElements = approxSourceStackTraceElement ( node ) ; if ( stackTraceElements != null && stackTraceElements . length > 0 ) { StackTraceElement top = stackTraceElements [ 0 ] ; if ( top . getFileName ( ) != null && top . getLineNumber ( ) >= 0 ) { return top . getFileName ( ) + ":" + top . getLineNumber ( ) ; } } return null ; }
gets an approximate source code location for a node if possible .
