There's a bunch of related issues here surrounding getName and related methods, that effectively need to be addressed together.
-- FileObject.getName should return a friendly name, typically as given when the FileObject was created. (primary goal)
-- abstract BaseFileObject.getName() should be deleted
-- BaseFileObject should have new method getBaseName or getRawName, which returns the name to be used in raw diagnostics -- is equal to file.getName for RegularFileObjects, or zipFile.getName + "(" + entryName + ")" for the family of ZipFileObjects.
-- Old199 should be eliminated
-- JavacFileManager.getJavacFileName and JavacFileManager.getBaseFileName should be eliminated
-- all methods marked /** @deprecated see bug 6410637 */ should be examined and either deleted or the deprecation marker removed
-- BaseFileObject.toString should be fixed -- either return FileObject.getName or getClass.getSimpleName + "[" + getName + "]" or similar for easier debugging
-- tests should be fixed, new tests for getName should be written, including custom Windows tests (eg C:relative-path.java), new tests for filenames in diagnostics, preferably including source-in-zip files (consider reusing fm infrastructure from recent URI tests.)