Is it possible to compensate a short sized frame by adjusting seatpost and stem?
There isn't always one size frame which fits a person well in a given model line of bikes (there may be 2 or more - probably 2 if someones on the border of sizes). In some cases, you can get multiple models to fit by swapping out stems and seatposts and saddle and handlebar adjustments or swaps. However, this is highly dependent on the particular model of the bike and the rider. 

The best solution for this sorta problem is to get a bike fit, which may show its not even possible. Otherwise, you have to just play with it on feel, which can get a bit expensive if you don't have all the parts on hand already. Pretty much all you can do though is put a longer stem, possibly raise and lower it, use wider handlebars and adjust the saddle angle+ position a bit further back (which may be easier with a different seat post).  

The biggest things you have to do are get the effective top tube right. Then you have seat height and angle and handlebar height and stuff. Its not exactly a science though so you have to play around with it.