We cluster a global data base of 3529 M>5.5 earthquakes in 1995-2018 based on a dynamic time warping dissimilarity of their source time functions (STFs). The clustering exhibits different degrees of STF shape complexity and suggests an association between STF complexity and earthquake source parameters. Thrust events are in large proportion with simple STF shapes and at all depths. In contrast, earthquakes with complex STF shapes tend to be located at shallow depth in complicated tectonic regions with preferentially strike slip mechanism and relatively longer duration. With 2D dynamic modeling of earthquake ruptures on heterogeneous pre-stress and linear slip-weakening friction, we find a systematic variation of the simulated STF complexity with frictional properties. Comparison between the observed and synthetic clustering distributions provides useful constraints on elements of the frictional properties. In particular, the characteristic slip-weakening distance could be constrained to be generally short (< 0.1 m) and depth dependent.