I find there are two variables named "appAttemptId" in ApplicationAttemptEventDispatcher.
The first one is named as "appAttemptID" which is the true attempt id.
The other one is named as "appAttemptId", but I think it's currect name should be "appId".
I'm not sure there are any reason to name the application id as "appAttemptId". But I think two "appAttemptId" in one function may cause some misleading, so it's better to fix the second one to "appId"