Adapt sample to some API changes in SourceManager