You must remember that alot of things in Japan and Japanese culture and life, originated from China. Kyoto was modelled on the captial city of China during the 9th century, studying Chinese was the part of the basic eductation for the higher classes during the Heian period (10th century), and even the modern Japanese writing system also uses alot of Chinese characters (Kanji) in it.
The two countries are very similar... I don't like one better than the other.
It's like asking which is better America or England.
And as for the darker side of China, don't forget that Japan doesn't exactly have a very clean history either.
But while we're comparing, what about Korea? Yes Korea, the forgoten Asian nation. I find all three countries to be very interesting. I want to visit all three one day. All through I can see myself spending more time in Japan, since it is the country I know more about, and the only one where I can somewhat speak the language.