rename mergeWithCHA parameters for better understandability
@@ -341,28 +341,28 @@ public class CGMerger {
/**
* Merges a call graph with its dependencies using CHA algorithm.
*
- * @param callGraphData DirectedGraph of the dependency to stitch
- * @param graphArcs GraphMetadata of the dependency to stitch
+ * @param callGraph DirectedGraph of the dependency to stitch
+ * @param metadata GraphMetadata of the dependency to stitch
* @return merged call graph
*/
- public DirectedGraph mergeWithCHA(final DirectedGraph callGraphData, final GraphMetadata graphArcs) {
+ public DirectedGraph mergeWithCHA(final DirectedGraph callGraph, final GraphMetadata metadata) {
final long totalTime = System.currentTimeMillis();
- if (callGraphData == null) {
+ if (callGraph == null) {
logger.error("Empty call graph data");
return null;
}
var result = new MergedDirectedGraph();
- if (graphArcs == null) {
+ if (metadata == null) {
return null;
}
logger.info("Merging graph with {} nodes and {} edges",
- callGraphData.numNodes(), callGraphData.numArcs());
+ callGraph.numNodes(), callGraph.numArcs());
final Set<LongLongPair> edges = ConcurrentHashMap.newKeySet();
- graphArcs.gid2NodeMetadata.long2ObjectEntrySet().parallelStream().forEach(entry -> {
+ metadata.gid2NodeMetadata.long2ObjectEntrySet().parallelStream().forEach(entry -> {
var sourceId = entry.getLongKey();
var nodeMetadata = entry.getValue();
for (var receiver : nodeMetadata.receiverRecords) {
@@ -372,7 +372,7 @@ public class CGMerger {
signature =
CallGraphUtils.decode(StringUtils.substringAfter(FastenJavaURI.create(receiver.receiverSignature).decanonicalize().getEntity(), "."));
}
- resolve(edges, arc, signature, callGraphData.isExternal(sourceId));
+ resolve(edges, arc, signature, callGraph.isExternal(sourceId));
}
});
