A method and apparatus for extracting energy from wind and wave motion using a common floating platform comprising a ship hull which is moored in an offshore location and which supports wind turbines for extracting energy from wind and wave energy extraction devices positioned at least at one side of the hull for extracting energy from wave motion relative to the hull. During an analysis phase, the intermediate representation of a program code is analyzed to identify opportunities for second-order predictive commoning optimization. The semiconductor membrane is bonded to the substrate wafer and the predetermined contour is straightened to induce a predetermined strain in the semiconductor membrane.