private String replaceUsernameToken(Matcher matcher,String string){
  return matcher != null ? matcher.replaceAll(username) : string;
}

private String replaceUsernameToken ( Matcher matcher , String string ) { return matcher != null ? matcher . replaceAll ( username ) : string ; }
replace the username token
