boolean found = false;
for (ListIterator<InstrumentationConfig> i = configs.listIterator(); i.hasNext();) {
InstrumentationConfig loopConfig = i.next();
String loopVersion = Versions.getVersion(loopConfig.toProto());
if (loopVersion.equals(priorVersion)) {
<BUG>i.set(InstrumentationConfig.create(instrumentationConfig));
found = true;
break;
}</BUG>
}

boolean found = false;
for (ListIterator<InstrumentationConfig> i = configs.listIterator(); i.hasNext();) {
InstrumentationConfig loopConfig = i.next();
String loopVersion = Versions.getVersion(loopConfig.toProto());
if (loopVersion.equals(priorVersion)) {
i.set(config);
found = true;
} else if (loopConfig.equals(config)) {
throw new IllegalStateException("This exact instrumentation already exists");
}
}
