Source:
public void execute( ExecutionContext context, final Request request ) throws RepositorySourceException { DateTime nowInUtc = context.getValueFactories().getDateFactory().createUtc(); boolean synchronousStep1 = shouldProcessSynchronously(request); if (stopwatch != null) stopwatch.start(); boolean abort = false; RequestProcessor processorWithEvents = null; try { final boolean awaitAllSubtasks = false; final Queue<FederatedRequest> requests = new LinkedBlockingQueue<FederatedRequest>(); final ForkRequestProcessor fork = new ForkRequestProcessor(repository, context, nowInUtc, requests); if (synchronousStep1) { try { fork.process(request); requests.add(new NoMoreFederatedRequests()); } finally { fork.close(); } } else { repository.getExecutor().submit(new Runnable() { public void run() { try { fork.process(request); requests.add(new NoMoreFederatedRequests()); } finally { fork.close(); } } }); } if (awaitAllSubtasks) { fork.await(); } JoinRequestProcessor join = new JoinRequestProcessor(repository, context, observer, nowInUtc); try { if (awaitAllSubtasks) { join.process(requests); } else { join.process((BlockingQueue<FederatedRequest>)requests); } } catch (RuntimeException e) { abort = true; throw e; } finally { if (!awaitAllSubtasks) { fork.await(); } join.close(); processorWithEvents = join; } if (RequestType.COMPOSITE == request.getType()) { ((CompositeRequest)request).checkForErrors(); } if (request.hasError() && !request.isReadOnly()) { abort = true; } } catch (InterruptedException e) { abort = true; request.setError(e); } catch (ExecutionException e) { abort = true; request.setError(e); } catch (CancellationException e) { abort = true; request.cancel(); } catch (RuntimeException e) { abort = true; throw e; } finally { if (stopwatch != null) stopwatch.stop(); if (abort) { } else { assert processorWithEvents != null; processorWithEvents.notifyObserverOfChanges(); } } }

Target:
public void execute( ExecutionContext context, final Request request ) throws RepositorySourceException { DateTime nowInUtc = context.getValueFactories().getDateFactory().createUtc(); boolean synchronousStep1 = shouldProcessSynchronously(request); if (stopwatch != null) stopwatch.start(); boolean abort = false; RequestProcessor processorWithEvents = null; try { final boolean awaitAllSubtasks = false; final Queue<FederatedRequest> requests = new LinkedBlockingQueue<FederatedRequest>(); final ForkRequestProcessor fork = new ForkRequestProcessor(repository, context, nowInUtc, requests); if (synchronousStep1) { try { fork.process(request); } finally { fork.close(); requests.add(new NoMoreFederatedRequests()); } } else { repository.getExecutor().submit(new Runnable() { public void run() { try { fork.process(request); } finally { fork.close(); requests.add(new NoMoreFederatedRequests()); } } }); } if (awaitAllSubtasks) { fork.await(); } JoinRequestProcessor join = new JoinRequestProcessor(repository, context, observer, nowInUtc); try { if (awaitAllSubtasks) { join.process(requests); } else { join.process((BlockingQueue<FederatedRequest>)requests); } } catch (RuntimeException e) { abort = true; throw e; } finally { if (!awaitAllSubtasks) { fork.await(); } join.close(); processorWithEvents = join; } if (RequestType.COMPOSITE == request.getType()) { ((CompositeRequest)request).checkForErrors(); } if (request.hasError() && !request.isReadOnly()) { abort = true; } } catch (InterruptedException e) { abort = true; request.setError(e); } catch (ExecutionException e) { abort = true; request.setError(e); } catch (CancellationException e) { abort = true; request.cancel(); } catch (RuntimeException e) { abort = true; throw e; } finally { if (stopwatch != null) stopwatch.stop(); if (abort) { } else { assert processorWithEvents != null; processorWithEvents.notifyObserverOfChanges(); } } }