*/
private void replaceFragmentId() {
// TODO(rluble): this approach where the ast is patched is not very clean. Maybe the fragment
// information should be data instead of code in the ast.
final FragmentPartitioningResult result = jprogram.getFragmentPartitioningResult();
(new JsModVisitor() {
@Override
public void endVisit(JsNumericEntry x, JsContext ctx) {
if (x.getKey().equals("RunAsyncFragmentIndex")) {
int fragmentId = result.getFragmentForRunAsync(x.getValue());
x.setValue(fragmentId);