java parser (basic level, store results and remove duplicates)