final TmfTraceFolder tracesFolder = projectElement.getTracesFolder();
final List<TmfTraceElement> traces = tracesFolder.getTraces();
TmfTraceElement found = null;</BUG>
for (TmfTraceElement candidate : traces) {
if (candidate.getName().equals(connectionInfo.getSessionName())) {
<BUG>found = candidate;
}</BUG>
}
if (found == null) {
throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_LiveTraceElementError));

final TmfTraceFolder tracesFolder = projectElement.getTracesFolder();
if (tracesFolder != null) {
final List<TmfTraceElement> traces = tracesFolder.getTraces();
for (TmfTraceElement candidate : traces) {
if (candidate.getName().equals(connectionInfo.getSessionName())) {
found = candidate;
}
}
}
if (found == null) {
throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_LiveTraceElementError));
