The U.S. Supreme Court sided with Google Monday in a copyright dispute with Oracle over lines of code used in the Android operating software.

Oracle had demanded up to $9 billion in compensation for the use of 12 lines of code copied into Android from Sun Microsystems' Java application programming interface, which Oracle purchased in 2010.

According to CNBC, the court ruled 6-2 in favor of Google.

Google claimed that Sun Microsystems, the maker of Java software that Oracle acquired in 2010, had no objections to Google developing its Android mobile operating system using Java APIs, or application program interfaces.

The Supreme Court stated in its decision that Google's copying of the API constituted "fair use of that material." Google used the API to enable Java developers to create Android apps.

In response to the ruling, Oracle's General Counsel Dorian Daley said,

"They [Google] stole Java and spent a decade litigating as only a monopolist can. This behavior is exactly why regulatory authorities around the world and in the United States are examining Google's business practices."

Meanwhile, Google claimed the ruling as "a victory for consumers, interoperability, and computer science."

On the Nasdaq, Google is currently trading at $2,227.95, up $90.20 or 4.22%.  According to IBD MarketSmith analysis, the gain pushed Google stock into a 5% buy zone that extends to $2,252.50.

Investors had also shrugged off the departure of Waymo CEO John Krafcik. He headed the company's driverless car project under the parent of Google, Alphabet.

Alphabet revealed on Friday that Krafcik, who has led the company's autonomous vehicle division since 2015, will be replaced by two co-CEOs, Tekedra Mawakana and Dmitri Dolgov. Waymo's chief operating officer was Mawakana, and its chief technology officer was Dolgov.

Meanwhile, Google's Relative Strength Rating is only 68 out of a possible 99, according to IBD Stock Checkup. The best stocks tend to have an RS rating of 80 or higher.