Override Material?

I tried to paste the script

now it comes up with this error

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 29, in
Exception: The given value for name is already in use as a material element name.
Parameter name: name