Two-sample Inference, Order Determination, and Data Integration for Functional Data