private static void appendMonitoredReturnExit( Factory factory, LoopMonitor monitor, Collection<CtReturn<?>> returns) { String counterName = counterName(monitor); for (CtReturn<?> returnStatement : returns) { CtStatement invocationOnLoopReturn = newStatementFromSnippet(factory, monitor.invocationOnLoopReturn(counterName)); insertBeforeUnderSameParent(invocationOnLoopReturn, returnStatement); } }