test_class.declarator: log = LoggerFactory.getLogger(EventTest.class)
test_class.modifier: protected static
test_class.original_string: protected static Logger log = LoggerFactory.getLogger(EventTest.class);
test_class.type: Logger
test_class.var_name: log
test_class.file: src/agents/apps/floodlight/floodlight-1.0/src/test/java/net/floodlightcontroller/debugevent/EventTest.java
test_class.identifier: EventTest
test_case.body: @Test
      public void testIncorrectAnnotation() {
          Event e = new Event(1L, 32, "test",
                              new LakeEvent(199), 11L); // dpid cannot be int
          assertTrue(e.getFormattedEvent(LakeEvent.class, "test").getDataFields()
            .contains(new Metadata("Error",
                               "java.lang.Integer cannot be cast to org.projectfloodlight.openflow.types.DatapathId")));
  
          Event e2 = new Event(1L, 32, "test",
                              new LakeEvent2(199), 12L); // mac cannot be int
          assertTrue(e2.getFormattedEvent(LakeEvent2.class, "test").getDataFields()
                     .contains(new Metadata("Error",
                                        "java.lang.Integer cannot be cast to java.lang.Long")));
      }
test_case.class_method_signature: EventTest.testIncorrectAnnotation()
test_case.full_signature: @Test public void testIncorrectAnnotation()
test_case.identifier: testIncorrectAnnotation
test_case.invocations: assertTrue contains getDataFields getFormattedEvent assertTrue contains getDataFields getFormattedEvent
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIncorrectAnnotation()
focal_class.declarator: eventInstanceId
focal_class.modifier: private final
focal_class.original_string: private final long eventInstanceId;
focal_class.type: long
focal_class.var_name: eventInstanceId
focal_class.declarator: acked
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean acked;
focal_class.type: boolean
focal_class.var_name: acked
focal_class.declarator: timeMs
focal_class.modifier: private final
focal_class.original_string: private final long timeMs;
focal_class.type: long
focal_class.var_name: timeMs
focal_class.declarator: threadId
focal_class.modifier: private final
focal_class.original_string: private final long threadId;
focal_class.type: long
focal_class.var_name: threadId
focal_class.declarator: threadName
focal_class.modifier: private final
focal_class.original_string: private final String threadName;
focal_class.type: String
focal_class.var_name: threadName
focal_class.declarator: eventData
focal_class.modifier: private final
focal_class.original_string: private final Object eventData;
focal_class.type: Object
focal_class.var_name: eventData
focal_class.file: src/agents/apps/floodlight/floodlight-1.0/src/main/java/net/floodlightcontroller/debugevent/Event.java
focal_class.identifier: Event
focal_class.class_method_signature: Event.Event(long timeMs, long threadId, String threadName,
                   Object eventData, long eventInstanceId)
focal_class.full_signature: public  Event(long timeMs, long threadId, String threadName,
                   Object eventData, long eventInstanceId)
focal_class.identifier: Event
focal_class.modifiers: public
focal_class.parameters: (long timeMs, long threadId, String threadName,
                   Object eventData, long eventInstanceId)
focal_class.signature:  Event(long timeMs, long threadId, String threadName,
                   Object eventData, long eventInstanceId)
focal_class.class_method_signature: Event.getTimeMs()
focal_class.full_signature: public long getTimeMs()
focal_class.identifier: getTimeMs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getTimeMs()
focal_class.class_method_signature: Event.getThreadId()
focal_class.full_signature: public long getThreadId()
focal_class.identifier: getThreadId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getThreadId()
focal_class.class_method_signature: Event.getThreadName()
focal_class.full_signature: public String getThreadName()
focal_class.identifier: getThreadName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getThreadName()
focal_class.class_method_signature: Event.geteventData()
focal_class.full_signature: public Object geteventData()
focal_class.identifier: geteventData
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Object
focal_class.signature: Object geteventData()
focal_class.class_method_signature: Event.getEventInstanceId()
focal_class.full_signature: public long getEventInstanceId()
focal_class.identifier: getEventInstanceId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getEventInstanceId()
focal_class.class_method_signature: Event.isAcked()
focal_class.full_signature: public boolean isAcked()
focal_class.identifier: isAcked
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAcked()
focal_class.class_method_signature: Event.setAcked(boolean acked)
focal_class.full_signature: public void setAcked(boolean acked)
focal_class.identifier: setAcked
focal_class.modifiers: public
focal_class.parameters: (boolean acked)
focal_class.return: void
focal_class.signature: void setAcked(boolean acked)
focal_class.class_method_signature: Event.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: Event.getFormattedEvent(Class<?> eventClass,
                                             String moduleEventName)
focal_class.full_signature: public EventResource getFormattedEvent(Class<?> eventClass,
                                             String moduleEventName)
focal_class.identifier: getFormattedEvent
focal_class.modifiers: public
focal_class.parameters: (Class<?> eventClass,
                                             String moduleEventName)
focal_class.return: EventResource
focal_class.signature: EventResource getFormattedEvent(Class<?> eventClass,
                                             String moduleEventName)
focal_class.class_method_signature: Event.customFormat(Class<?> clazz, Object eventData,
                                EventResourceBuilder eventDataBuilder)
focal_class.full_signature: @SuppressWarnings("unchecked") private void customFormat(Class<?> clazz, Object eventData,
                                EventResourceBuilder eventDataBuilder)
focal_class.identifier: customFormat
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (Class<?> clazz, Object eventData,
                                EventResourceBuilder eventDataBuilder)
focal_class.return: void
focal_class.signature: void customFormat(Class<?> clazz, Object eventData,
                                EventResourceBuilder eventDataBuilder)
focal_method.body: public EventResource getFormattedEvent(Class<?> eventClass,
                                             String moduleEventName) {
          if (eventClass == null || !eventClass.equals(eventData.getClass())) {
              EventResourceBuilder edb = new EventResourceBuilder();
              edb.dataFields.add(new Metadata("Error",
                                              "null event data or event-class does not match event-data"));
              return edb.build();
          }
  
          EventResourceBuilder edb = new EventResourceBuilder();
          edb.setTimeStamp(timeMs);
          edb.setThreadId(threadId);
          edb.setThreadName(threadName);
          edb.setModuleEventName(moduleEventName);
          edb.setEventInstanceId(eventInstanceId);
          edb.setAcked(acked);
          customFormat(eventClass, eventData, edb);
          return edb.build();
      }
focal_method.class_method_signature: Event.getFormattedEvent(Class<?> eventClass,
                                             String moduleEventName)
focal_method.full_signature: public EventResource getFormattedEvent(Class<?> eventClass,
                                             String moduleEventName)
focal_method.identifier: getFormattedEvent
focal_method.invocations: equals getClass add build setTimeStamp setThreadId setThreadName setModuleEventName setEventInstanceId setAcked customFormat build
focal_method.modifiers: public
focal_method.parameters: (Class<?> eventClass,
                                             String moduleEventName)
focal_method.return: EventResource
focal_method.signature: EventResource getFormattedEvent(Class<?> eventClass,
                                             String moduleEventName)