Source tree repair