+ private void setGraphForDescriptor(Descriptor d, OwnershipGraph og)
+ throws IOException {
+
+ mapDescriptorToCompleteOwnershipGraph.put(d, og);
+
+ // arguments to writeGraph are:
+ // boolean writeLabels,
+ // boolean labelSelect,
+ // boolean pruneGarbage,
+ // boolean writeReferencers
+
+ if( writeFinalGraphs ) {
+
+ if( !writeAllUpdates ) {
+ og.writeGraph(d, true, true, true, false);
+
+ } else {
+ if( !mapDescriptorToNumUpdates.containsKey(d) ) {
+ mapDescriptorToNumUpdates.put(d, new Integer(0) );
+ }
+ Integer n = mapDescriptorToNumUpdates.get(d);
+ og.writeGraph(d, n, true, true, true, false);
+ mapDescriptorToNumUpdates.put(d, n + 1);
+ }
+ }
+ }
+
+