When copying the following code snippet:
List<String> a = new LinkedList<String>();
into a different source which contains no import statement for java.util.LinkedList type.
After pasting the code snippet the target source will have its imports section updated correctly but the type identifiers in the pasted par will get duplicated, resulting in:
ListList<StringString> a = new LinkedListLinkedList<StringString>();
I am attaching a test project where you can play by copying line 16 from the ClassB into line 19 of the ClassA. Also, it is worth noting that once you clean/build the project this error becomes rather random with cca. 70% probability of encountering it.
Created attachment 112045 [details]
Problem seems to be a race condition in ClipboardHandler.runQuickly that runs the task computing imports twice sometimes.
Oops. Thanks for the pointer. I intended to do create-schedule, but did post-schedule instead, which actually runs the task twice.
Integrated into 'main-golden'
User: Jan Lahoda <email@example.com>
Log: #203702: post already scheduled the task, no need (and actually harmful) to schedule it again.
*** Bug 203692 has been marked as a duplicate of this bug. ***