public IList getProfileData() { TypeFactory TF = TypeFactory.getInstance(); Type elemType = TF.tupleType(TF.sourceLocationType(), TF.integerType()); Type listType = TF.listType(elemType); IValueFactory VF = ValueFactoryFactory.getValueFactory(); IListWriter w = listType.writer(VF); for (Map.Entry<AbstractAST, Count> e : sortData()) { w.insert(VF.tuple(e.getKey().getLocation(), VF.integer(e.getValue().getTicks()))); } return w.done(); }