The findByValue() function returns array of nodes, or empty array if nothing was found. The reason is that Value is not unique field.
So your code should look like the following
var sourceNodes = currentNode.getTreeView().findByValue(currentNode.getValue());
if (sourceNodes.length > 0)
sourceNodes[0].expand();
also, if you're trying to look for the node recursively, you should probably need to use the findAll method:
currentNode.getTreeView().findAll(function(node) { return node.getValue() == 'requiredValue'; })