Update SNS.java

Clean duplicate code