I am having the following java code, in which I am trying to copy the ArrayList to another ArrayList.
ArrayList nodes = new ArrayList
The problem you have is caused that you use the same ArrayList NodeList over all iterations in main for loop. Each iterations NodeList is enlarged by new elements.
After first loop, NodeList has 5 elements (PropertyStart,a,b,c,PropertyEnd) and list has 1 element (NodeList: (PropertyStart,a,b,c,PropertyEnd))
After second loop NodeList has 10 elements (PropertyStart,a,b,c,PropertyEnd,PropertyStart,d,e,f,PropertyEnd) and list has 2 elements (NodeList (with 10 elements), NodeList (with 10 elements))
To get you expectations you must replace
NodeList.addAll(nodes);
list.add(NodeList)
by
List childrenList = new ArrayList(nodes);
list.add(childrenList);
PS. Your code is not readable, keep Java code conventions to have readble code. For example is hard to recognize if NodeList is a class or object