
for (int i = 0; i < results.length; i++) {
</BUG>
MonitoredItemModifyRequest request = itemsToModify.get(i);
<BUG>MonitoredItemModifyResult result = results[i];
</BUG>
StatusCode statusCode = result.getStatusCode();
OpcUaMonitoredItem item = itemsByServerHandle.get(request.getMonitoredItemId());
if (item != null) {
item.setStatusCode(statusCode);

List<MonitoredItemModifyRequest> itemsToModify) {
CompletableFuture<ModifyMonitoredItemsResponse> future =
client.modifyMonitoredItems(subscriptionId, timestampsToReturn, itemsToModify);
return future.thenApply(response -> {
List<StatusCode> statusCodes = newArrayList();
List<MonitoredItemModifyResult> results = l(response.getResults());
for (int i = 0; i < results.size(); i++) {
MonitoredItemModifyRequest request = itemsToModify.get(i);
MonitoredItemModifyResult result = results.get(i);
StatusCode statusCode = result.getStatusCode();
OpcUaMonitoredItem item = itemsByServerHandle.get(request.getMonitoredItemId());
if (item != null) {
item.setStatusCode(statusCode);
