add java single pattern