void () { Object field = getField(); field = objectForAssignTest; synchronized (field) { } Object newObject = getField(); newObject = newObject(); synchronized (<warning descr="Synchronization on local variable 'newObject'">newObject</warning>) { } Integer i; i = 1 + 1; synchronized (<warning descr="Synchronization on local variable 'i'">i</warning>) { } }