A US judge has dismissed Oracle’s copyright infringement allegation against Google for the use of Oracle’s Java software components in Android operating system saying that the company was free to replicate and use elements of Java programming language.

The judge ruled that the Google has copied a small number of lines of code in the Timsort.java file, but the damages were insignificant.

The United States District Court for the Northern District of California judge William Alsup wrote in his order, "So long as the specific code used to implement a method is different, anyone is free under the Copyright Act to write his or her own code to carry out exactly the same function or specification of any methods used in the Java API."

Oracle, which claimed nearly $1bn in damages, says it will appeal the court’s decision.

"Oracle is committed to the protection of Java as both a valuable development platform and a valuable intellectual property asset," the company said.

"It will vigorously pursue an appeal of this decision in order to maintain that protection and to continue to support the broader Java community of over nine million developers and countless law abiding enterprises."

In May, Google was cleared of patent infringement, and the judge’s ruling now clears copyright infringement claims too.

Sun Microsystems first developed the free computer programming language Java which Oracle got the rights to when it acquired Sun Microsystems for $7.3bn in January 2010.

Oracle claimed Google copied 37 different Java APIs now owned by it, though Google said that the Java language can be used for free to build Android, which was also agreed by Sun.

Sun’s Java platform is used as a standard software interface across all operating systems, allowing developers to write applications which can be run on any system.