How to find JIRA duplicate ticket using Java?

Can you please help me with java code and the jars required for finding the duplicate Jira tickets and for editing an existing ticket? Thanks in advance.