Source:
<code>public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException { List<String> command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, LTTngControlServiceConstants.OPTION_UST); command.add(LTTngControlServiceConstants.OPTION_FIELDS); ICommandResult result = executeCommand(command, monitor, false); List<IUstProviderInfo> allProviders = new ArrayList<>(); if (isError(result) && <START> result.getErrorOutput().size() > <END> 0) { if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_UST_NO_UST_PROVIDER_PATTERN)) { return allProviders; } throw new ExecutionException(Messages.TraceControl_CommandError + toCommandString(command)); } Document document = getDocumentFromStrings(result.getOutput()); NodeList rawProviders = document.getElementsByTagName(MIStrings.PID); IUstProviderInfo providerInfo = null; for (int i = 0; i < rawProviders.getLength(); i++) { Node provider = rawProviders.item(i); Node name = getFirstOf(provider.getChildNodes(), MIStrings.NAME); if (name == null) { throw new ExecutionException(Messages.TraceControl_MiInvalidProviderError); } providerInfo = new UstProviderInfo(name.getTextContent()); NodeList infos = provider.getChildNodes(); for (int j = 0; j < infos.getLength(); j++) { Node info = infos.item(j); switch (info.getNodeName()) { case MIStrings.PID_ID: providerInfo.setPid(Integer.parseInt(info.getTextContent())); break; case MIStrings.EVENTS: List<IBaseEventInfo> events = new ArrayList<>(); NodeList rawEvents = info.getChildNodes(); getBaseEventInfo(rawEvents, events); providerInfo.setEvents(events); break; default: break; } } allProviders.add(providerInfo); } return allProviders; }</code><technical_language>isEmpty</technical_language>

Target:
public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException { List<String> command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, LTTngControlServiceConstants.OPTION_UST); command.add(LTTngControlServiceConstants.OPTION_FIELDS); ICommandResult result = executeCommand(command, monitor, false); List<IUstProviderInfo> allProviders = new ArrayList<>(); if (isError(result)) { if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_UST_NO_UST_PROVIDER_PATTERN)) { return allProviders; } throw new ExecutionException(Messages.TraceControl_CommandError + toCommandString(command)); } Document document = getDocumentFromStrings(result.getOutput()); NodeList rawProviders = document.getElementsByTagName(MIStrings.PID); IUstProviderInfo providerInfo = null; for (int i = 0; i < rawProviders.getLength(); i++) { Node provider = rawProviders.item(i); Node name = getFirstOf(provider.getChildNodes(), MIStrings.NAME); if (name == null) { throw new ExecutionException(Messages.TraceControl_MiInvalidProviderError); } providerInfo = new UstProviderInfo(name.getTextContent()); NodeList infos = provider.getChildNodes(); for (int j = 0; j < infos.getLength(); j++) { Node info = infos.item(j); switch (info.getNodeName()) { case MIStrings.PID_ID: providerInfo.setPid(Integer.parseInt(info.getTextContent())); break; case MIStrings.EVENTS: List<IBaseEventInfo> events = new ArrayList<>(); NodeList rawEvents = info.getChildNodes(); getBaseEventInfo(rawEvents, events); providerInfo.setEvents(events); break; default: break; } } allProviders.add(providerInfo); } return allProviders; }