Learning the ways of APIs