There are tricks to make this less likely to happen in the future. One such trick is to always make your method parameters final:
public AppServer(final int port, final String name). Then if you tried
name = name you would get a compile-time error that points to the offending line rather than a run-time behavior problem which occurs in a different method at some later point.
Behaviorally, another thing I like to do is get in the habit of
always using the
this keyword to qualify instance variable references.