We present a new algorithm for the detection of flares in gamma-ray burst ( GRB ) light curves and use this algorithm to detect flares in the UV/optical . The algorithm makes use of the Bayesian Information Criterion ( BIC ) to analyze the residuals of the fitted light curve , removing all major features , and to determine the statistically best fit to the data by iteratively adding additional ‘ breaks ’ to the light curve . These additional breaks represent the individual components of the detected flares : T _ { start } , T _ { stop } , and T _ { peak } . We present the detection of 119 unique flaring periods detected by applying this algorithm to light curves taken from the Second Swift Ultraviolet/Optical Telescope ( UVOT ) GRB Afterglow Catalog . We analyzed 201 UVOT GRB light curves and found episodes of flaring in 68 of the light curves . For those light curves with flares , we find an average number of \sim 2 flares per GRB . Flaring is generally restricted to the first 1000 seconds of the afterglow , but can be observed and detected beyond 10 ^ { 5 } seconds . More than 80 % of the flares detected are short in duration with \Delta t / t of < 0.5 . Flares were observed with flux ratios relative to the underlying light curve of between 0.04 to 55.42 . Many of the strongest flares were also seen at greater than 1000 seconds after the burst .