Source:
public List<ProjectBuildingResult> build( List<File> pomFiles, boolean recursive, ProjectBuildingRequest request ) throws ProjectBuildingException { List<ProjectBuildingResult> results = synchronizedList( new ArrayList<ProjectBuildingResult>( 512 ) ); List<InterimResult> interimResults = synchronizedList( new ArrayList<InterimResult>( 512 ) ); ReactorModelPool modelPool = new ReactorModelPool(); InternalConfig config = new InternalConfig( request, modelPool, useGlobalModelCache() ? getModelCache() : new ReactorModelCache() ); Map<String, MavenProject> projectIndex = new ConcurrentHashMap<>( 512 ); long phase1Start = currentTimeMillis(); Set<File> aggregatorFiles = Sets.newConcurrentHashSet(); boolean noErrors = build( results, interimResults, projectIndex, pomFiles, aggregatorFiles, true, recursive, config ); if ( logger.isDebugEnabled() ) { logger.debug( "Graph build phase 1 completed in " + ( currentTimeMillis() - phase1Start ) ); } populateReactorModelPool( modelPool, interimResults ); ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader(); try { long phase2Start = currentTimeMillis(); noErrors &= build( results, synchronizedList( new ArrayList<MavenProject>() ), projectIndex, interimResults, request, new ConcurrentHashMap<File, Boolean>(), config.session ); if ( logger.isDebugEnabled() ) { logger.debug( "Graph build phase 2 completed in " + ( currentTimeMillis() - phase2Start ) ); } } finally { Thread.currentThread().setContextClassLoader( oldContextClassLoader ); } if ( !noErrors ) { throw new ProjectBuildingException( results ); } return results; }

Target:
public List<ProjectBuildingResult> build( List<File> pomFiles, boolean recursive, ProjectBuildingRequest request ) throws ProjectBuildingException { List<ProjectBuildingResult> results = synchronizedList( new ArrayList<>( 512 ) ); List<InterimResult> interimResults = synchronizedList( new ArrayList<>( 512 ) ); ReactorModelPool modelPool = new ReactorModelPool(); InternalConfig config = new InternalConfig( request, modelPool, useGlobalModelCache() ? getModelCache() : new ReactorModelCache() ); Map<String, MavenProject> projectIndex = new ConcurrentHashMap<>( 512 ); long phase1Start = currentTimeMillis(); Set<File> aggregatorFiles = Sets.newConcurrentHashSet(); boolean noErrors = build( results, interimResults, projectIndex, pomFiles, aggregatorFiles, true, recursive, config ); if ( logger.isDebugEnabled() ) { logger.debug( "Graph build phase 1 completed in " + ( currentTimeMillis() - phase1Start ) + " millis." ); } populateReactorModelPool( modelPool, interimResults ); ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader(); try { long phase2Start = currentTimeMillis(); noErrors &= build( results, synchronizedList( new ArrayList<>() ), projectIndex, interimResults, request, new ConcurrentHashMap<>(), config.session ); if ( logger.isDebugEnabled() ) { logger.debug( "Graph build phase 2 completed in " + ( currentTimeMillis() - phase2Start ) + " millis." ); } } finally { Thread.currentThread().setContextClassLoader( oldContextClassLoader ); } if ( !noErrors ) { throw new ProjectBuildingException( results ); } return results; }