This won't result in the problem you seem to be seeing, but will potentially be a problem down the line: do not modify a List while iterating over that List (at least in this way - which uses an Iterator and could throw a ConcurrentModificationException when you modify the list). As an example, try running the following:

After staring at the debugger like a Hawk, I figured out where the problem lies. You guys were right ! the Stack [s] was empty after all !!!!!!

Here's where the problem lies.

Java Code:

// A variable called [neighbours]. It represents the neighoubrs of the current node in the loop
ArrayList<Node<Adjustment>> neighbours = g.get(x);
// The Path [p] represented as a Stack. This will be inserted into our safe [paths] ArrayList later on.
Stack<String> p = new Stack<String>();
// Iterating through the neighbours of the current node, and foreach building a path [p] from them.
for(Node<Adjustment> n : neighbours)
{
p.push(x.getName());
p.push(n.getName());
// Adding the stacked path [p] to the safe paths list [paths]
paths.add(p);
nodesUsed.add(n.getName());
// Now that the stacked path [p] has been stored, we need to clear, empty [p] for the next path.
p.clear();
}

Notice the foreach loop. Each time it loops back around, my [paths] becomes zero-ed for some reason !!

You should put ids on printouts: ...println("s=" + s);
If you have more than one printout you will need to have ids.

This will remove p's contents: p.clear();
You have stored a reference to p in another container: paths.add(p);
You didn't copy the contents of p.
There is only one p object, when it is cleared, all references will be to the one cleared object.

Set p to a new object, leaving the old one that p referred to safely referred to in the container. It was the value of p that was copied to the container and it will be safe there. p can now be set to a new object.

Set p to a new object, leaving the old one that p referred to safely referred to in the container.

Do you mean like so:

Java Code:

// The Path [p] represented as a Stack. This will be inserted into our safe [paths] ArrayList later on.
Stack<String> p = new Stack<String>();
// Iterating through the neighbours of the current node, and foreach building a path [p] from them.
for(Node<Adjustment> n : neighbours)
{
p.push(x.getName());
p.push(n.getName());
// Adding the stacked path [p] to the safe paths list [paths]
paths.add(new Stack<String>());
nodesUsed.add(n.getName());
// Now that the stacked path [p] has been stored, we need to assign it to a new object.
p = new Stack<String>();
}

// A variable called [neighbours]. It represents the neighoubrs of the current node in the loop
ArrayList<Node<Adjustment>> neighbours = g.get(x);
// The Path [p] represented as a Stack. This will be inserted into our safe [paths] ArrayList later on.
Stack<String> p = new Stack<String>();
// Iterating through the neighbours of the current node, and foreach building a path [p] from them.
for(Node<Adjustment> n : neighbours)
{
p.push(x.getName());
p.push(n.getName());
// Adding the stacked path [p] to the safe paths list [paths]
paths.add(p);
nodesUsed.add(n.getName());
// Now that the stacked path [p] has been stored, we need a new empty [p] for the next path.
p[B] = new Stack<String>();[/B]
}