diff --git a/com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/JSCallGraphUtil.java b/com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/JSCallGraphUtil.java
index cdb1cef86..0d0409068 100755
--- a/com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/JSCallGraphUtil.java
+++ b/com.ibm.wala.cast.js/source/com/ibm/wala/cast/js/ipa/callgraph/JSCallGraphUtil.java
@@ -113,7 +113,15 @@ public class JSCallGraphUtil extends com.ibm.wala.cast.ipa.callgraph.CAstCallGra
return new JavaScriptEntryPoints(cha, cha.getLoader(JavaScriptTypes.jsLoader));
}
- public static Collection getNodes(CallGraph CG, String funName) {
+ /**
+ * Get all the nodes in CG with name funName. If funName is of the form
+ * "ctor:nm"
, return nodes corresponding to constructor function
+ * for nm
. If funName is of the form "suffix:nm"
,
+ * return nodes corresponding to functions whose names end with
+ * nm
. Otherwise, return nodes for functions whose name matches
+ * funName exactly.
+ */
+ public static Collection getNodes(CallGraph CG, String funName) {
boolean ctor = funName.startsWith("ctor:");
boolean suffix = funName.startsWith("suffix:");
if (ctor) {