  The energy storage and trigger mechanisms of solar flares are important for
understanding of solar activity. We analyzed multi-wavelength observations of a
M1.5 flare on 1 August 2014, in active region NOAA 12127 (SOL2014-08-01T18:13).
There are evident large scale sunspot rotations in positive magnetic field of
the main energy release region before the eruption; the rotations contain both
clockwise and counter-clockwise directions. Injection of magnetic helicity from
the photosphere prior to the flare. The sign of the helicity injection is
reversed after the flare. It is found that both persistent larger scale
($\approx$ one day) and impulse smaller scale ($\approx$ one to two hours)
magnetic-flux emergences are associated with the flare. We conclude that
larger-scale flux emergence, helicity injection and sunspot rotation contribute
to the energy build up, while the small-scale magnetic-flux emergence plays
crucial role in triggering the flare.
