I am trying to create issue programmatically so which method to use.
Community moderators have prevented the ability to post new answers.
Use IssueService to create issues.You will find the details here: https://developer.atlassian.com/display/JIRADEV/Performing+Issue+Operations
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.