Mining software repositories for automatic software bug management from bug triaging to patch backporting