You should create an `Scm` interface like this: public interface Scm { public String getRevisionCommand(); public String getDiffCommand(); public String getCodebaseInfoCommand(); } and two implementations: Svn, Git. It would improve type safety a lot. (With a `Map<String, Object>` you usually have to cast the values which is error-prone). Furthermore, it eliminates the magic constants. It's easy to call `Map.get()` with a mistyped key. With the interface the compiler warns you if the method name is wrong.