I am experiencing the same issue. It seems to randomly happen unless the system is under load then it is more likely to occur.
I am more easily able to reproduce the issue by uploading large amount of content to the cloud such as a 5 gigabyte family movie, while watching a streaming video on the internet. The issue will usually occur within a few minutes. Remember to keep some of your desktop visible, about 3-4 inches on either side of the active window. When the issue occurs, any screen updates to the area where it occurs will clear it. The issue is also occasionally followed by a sudden system reset.
Most of the time refreshing the display where it occurs will make it disappear. You can not capture the anonymily with screen capture, you can try but it the capture image will show no display issues. I found shooting a video of the machine exhibiting the issue and then trying and succeeding to reproduce the issue in front of the a Genius at the Genius Bar got the quickest attention.
Typically the bars are on either side of the active window but they can show up somewhere in the middle of the active window. I took my MacBook Pro to Apple who at first couldn't find anything wrong in house, they sent it off to the shop and it was diagnosed with having a malfunctioning logic board which had also damaged the display. Both parts were replaced and I've had the system a few days and the issue has already started to re-occur. I am beginning to suspect it maybe a glitch in Yosemite when running on this model, that or a possible hardware issue made worse by using Yosemite.
The system passes the Apple Hardware Test (Short & Long) both before and after the logic board and display were replaced. I have also replaced the ram and the hard disk, and reinstalled Yosemite before I took it to the Genius Bar. Non of these helped to eliminate the issue.
My model is:
http://www.everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-i5-2.5-13-mid-2012-unibody-usb3-specs.html
Use this link to determine your Mac's correct model number by serial number:
http://www.everymac.com/ultimate-mac-lookup/
If you have experienced this issue please add a post in this area explaining what is happening, how if you can produce it, what you have done to try and remedy the issue, and have your efforts eliminated it.