sheet.shiftRows does not shifts the formula's effectively. The new cells have errors in the formula shifted.
Created attachment 22219 [details] XLS file for bug 45348
In the provided xls file run sheet.shiftRows(25,128,1); This will shift all the rows down by 1, but the formula in column 4 contains error.
Fixed in svn r675079. This turned out to be a formula token class transformation problem. The example code: cell.setCellFormula("sum(A1*1)") will reproduce this bug. The RVA stuff was not well supported before (3.1), but as it turns out, POI 3.0.2 handled this particular situation OK. Junit tests were added to cover this example. BTW It looks like there might be other bugs in HSSFSheet.updateFormulasAfterShift(). For example, movement of area references is currently not supported. The example provided only involves single cell refs, which seem to be handled OK.