clone incoming arrays (pmd:ArrayIsStoredDirectly)
added javadoc