You can use the same code for removeAllEdges as long as it does not depend on the underlying structure (e.g., the matrix or the list) or the functionality is implemented by encapsulated methods that use the underlying graph structure (e.g., getters, setters, and other common methods that you may need). In my perspective, the latter methods would be the abstract methods of this class, since they need to be implemented according to the underlying graph structure.
One of the benefits is code reuse. You write once, and use it in every graph implementation. In your case you have two graph classes, but you may end up having multiple representations for graphs depending on your application. Writing general methods is a nice way of saving time spent in coding, and it also helps you to maintain your code in a more efficient and organized way. The debugging is also easier!!