Source:
<code>private CtfTmfEventField[] parseFields(EventDefinition eventDef) { List<CtfTmfEventField> fields = new ArrayList<CtfTmfEventField>(); StructDefinition structFields = eventDef.getFields(); HashMap<String, Definition> definitions = structFields.getDefinitions(); String curFieldName = null; Definition curFieldDef; CtfTmfEventField curField; Iterator<Entry<String, Definition>> it = definitions.entrySet().iterator(); while(it.hasNext()) { Entry<String, Definition> entry = it.next(); curFieldName = entry.getKey(); curFieldDef = entry.getValue(); curField = CtfTmfEventField.parseField(curFieldDef, curFieldName); fields.add(curField); } long ip = -1; StructDefinition structContext = eventDef.getContext(); if (structContext != null) { definitions = structContext.getDefinitions(); String curContextName; Definition curContextDef; CtfTmfEventField curContext; it = definitions.entrySet().iterator(); while(it.hasNext()) { Entry<String, Definition> entry = it.next(); <START> if (entry.getKey().equals("_ip")) { END> ip = ((IntegerDefinition) entry.getValue()).getValue(); } curContextName = CONTEXT_FIELD_PREFIX + entry.getKey(); curContextDef = entry.getValue(); curContext = CtfTmfEventField.parseField(curContextDef, curContextName); fields.add(curContext); } } final String name = eventDef.getDeclaration().getName(); List<CTFCallsite> eventList = this.fTrace.getCTFTrace().getCallsiteCandidates(name); if (eventList != null) { final String callsite = "callsite"; if (eventList.size() == 1 || ip == -1) { CTFCallsite cs = eventList.get(0); fields.add(new CTFStringField(cs.toString(), callsite)); } else { fields.add(new CTFStringField( this.fTrace.getCTFTrace().getCallsite(name, ip).toString(), callsite)); } } return fields.toArray(new CtfTmfEventField[fields.size()]); }</code><technical_language>add "&& entry.getValue() instanceof IntegerDefinition"</technical_language>

Target:
private CtfTmfEventField[] parseFields(EventDefinition eventDef) { List<CtfTmfEventField> fields = new ArrayList<CtfTmfEventField>(); StructDefinition structFields = eventDef.getFields(); HashMap<String, Definition> definitions = structFields.getDefinitions(); String curFieldName = null; Definition curFieldDef; CtfTmfEventField curField; Iterator<Entry<String, Definition>> it = definitions.entrySet().iterator(); while(it.hasNext()) { Entry<String, Definition> entry = it.next(); curFieldName = entry.getKey(); curFieldDef = entry.getValue(); curField = CtfTmfEventField.parseField(curFieldDef, curFieldName); fields.add(curField); } long ip = -1; StructDefinition structContext = eventDef.getContext(); if (structContext != null) { definitions = structContext.getDefinitions(); String curContextName; Definition curContextDef; CtfTmfEventField curContext; it = definitions.entrySet().iterator(); while(it.hasNext()) { Entry<String, Definition> entry = it.next(); if (entry.getKey().equals("_ip") && (entry.getValue() instanceof IntegerDefinition)) { ip = ((IntegerDefinition) entry.getValue()).getValue(); } curContextName = CONTEXT_FIELD_PREFIX + entry.getKey(); curContextDef = entry.getValue(); curContext = CtfTmfEventField.parseField(curContextDef, curContextName); fields.add(curContext); } } final String name = eventDef.getDeclaration().getName(); List<CTFCallsite> eventList = fTrace.getCTFTrace().getCallsiteCandidates(name); if (eventList != null) { final String callsite = "callsite"; if (eventList.size() == 1 || ip == -1) { CTFCallsite cs = eventList.get(0); fields.add(new CTFStringField(cs.toString(), callsite)); } else { fields.add(new CTFStringField( fTrace.getCTFTrace().getCallsite(name, ip).toString(), callsite)); } } return fields.toArray(new CtfTmfEventField[fields.size()]); }