There is a field on a document that flags any Notes document as a conflict called "$Conflict". If it's present on the document, then you know it's a conflict, (like Carlos is eluding to).
You can create a view in the database that has the formula.
Select @isAvailable("$Conflict")
and then loop through all documents in the view. It looks like you're doing it in Java so I think it would look like this
import lotus.domino.*;
import java.util.*;
//.....
//.....
Session s = NotesFactory.createSession();
Database db = s.getDatabase("server", "filename");
View vw = db.getView("viewname");
Document doc = null;
doc = vw.getFirstDocument();
while (doc != null) {
// do what you want in here.
doc = vw.getNextDocument(doc);
}
You'll need to make sure you have added the Domino jars to your project. This is a good reference for setting up the eclipse IDE for Domino java development.
PS. You can also modify the design of the database to minimise replication conflicts. But I won't bore you here with the details. Post a comment if you would like to know and ill provide instructions on this thread.