As a Computing and IT UG with IP and business laws modules, while not a lawyer I know some things regarding copyrights:
DOTA as a software is copyrighter to the original creator, but as an opensource/freeware software EVERYONE has the right of editing the actual software, as long as it is released free and with credits to the original creator. Thus the context of the game is free and any code used in the game can be used by anyone, as long as the specific parts of code are released in public. Same principles with OS X and UNIX, Apple releases the UNIX parts of OS X with every update as free and the final user only pays for the add-ons/other included software/UI.
As for the name it is similar with the Linux dispute. Linus Torvalds did not register the "Linux" trademark and when an enterpriser tried to register it for personal benefits, Torvald took legal action and the trademark is consider to be "royalty free" under a sub licence from Toryald. A problem in DOTA case is that the original creator is actually lost and Valve in reality only hired the person behind DOTA for the last 4 months (All Stars version) and not the original one.
I talked about code, this lawsuit is not about code, but as Blizzard pointed out the basic code where DOTA lies on, it is copyrighted to Blizzard, making this a complex legal dispute. If Warcraft 3 ToA has a loophole, a small window or something regarding mods TMs and copyrights then Blizzard legally is the owner of the name as well. If no such thing exist within W3 ToA, then my best guess it will be similar to Linux case with Valve failing to register the TM and Blizzard maybe forced to licence it with free or fair royalties.