Created attachment 29635 [details] original workbook
Created attachment 29636 [details] rows shifted, v3.8-20120326
Created attachment 29637 [details] rows shifted, patched code
Created attachment 29638 [details] java test code
Created attachment 29639 [details] tested patch
Probably the tested patch converts all shared formulas to unshared (if adjusted), the shared formula should be adjusted instead.
Thanks for the patch, applied in r1416917, junit added. Regards, Yegor