if (req.replaceDuplicates) {
List<Tuple<ITextSelection, SimpleNode>> duplicates = req.duplicates;
for (Tuple<ITextSelection, SimpleNode> dup : duplicates) {
try {
ReplaceDuplicateWithVariableEdit v = new ReplaceDuplicateWithVariableEdit(req, dup);
registerEdit(v, "Replace duplicate.");
} catch (Exception e) {
e.printStackTrace();
}
}