Program: 19579
Project: 19579
Buggy source:
public void testExample() throws Exception {
  createServer(null);
  Oddjob oddjob=new Oddjob();
  oddjob.setConfiguration(new XMLConfiguration("String_Node_Str",getClass().getClassLoader()));
  oddjob.run();
  assertEquals(ParentState.ACTIVE,oddjob.lastStateEvent().getState());
  OddjobLookup lookup=new OddjobLookup(oddjob);
  Object test=lookup.lookup("String_Node_Str");
  String farm=lookup.lookup("String_Node_Str",String.class);
  assertEquals("String_Node_Str",farm);
  assertEquals(4.2,lookup.lookup("String_Node_Str",double.class),0.01);
  assertEquals(94.23,lookup.lookup("String_Node_Str",double.class),0.01);
  ChildCatcher domainsCatcher=new ChildCatcher();
  ((Structural)test).addStructuralListener(domainsCatcher);
  assertTrue(domainsCatcher.children.containsKey("String_Node_Str"));
  Structural fruitDomain=(Structural)domainsCatcher.children.get("String_Node_Str");
  ChildCatcher fruitCatcher=new ChildCatcher();
  fruitDomain.addStructuralListener(fruitCatcher);
  assertTrue(fruitCatcher.children.size() == 1);
  oddjob.stop();
  assertEquals(ParentState.COMPLETE,oddjob.lastStateEvent().getState());
  assertEquals(0,fruitCatcher.children.size());
  assertEquals(0,domainsCatcher.children.size());
  Object sequential=lookup.lookup("String_Node_Str");
  ((Resetable)sequential).hardReset();
  assertEquals(ParentState.READY,((Stateful)sequential).lastStateEvent().getState());
  ((Runnable)sequential).run();
  assertEquals(ParentState.ACTIVE,oddjob.lastStateEvent().getState());
  assertEquals(94.23,lookup.lookup("String_Node_Str",double.class),0.01);
  oddjob.stop();
  assertEquals(ParentState.COMPLETE,oddjob.lastStateEvent().getState());
  oddjob.destroy();
}

Fixed version (ground truth):
public void testExample() throws Exception {
  createServer(null);
  Oddjob oddjob=new Oddjob();
  oddjob.setConfiguration(new XMLConfiguration("String_Node_Str",getClass().getClassLoader()));
  oddjob.load();
  OddjobLookup lookup=new OddjobLookup(oddjob);
  Object test=lookup.lookup("String_Node_Str");
  ChildCatcher domainsCatcher=new ChildCatcher();
  ((Structural)test).addStructuralListener(domainsCatcher);
  oddjob.run();
  assertEquals(ParentState.ACTIVE,oddjob.lastStateEvent().getState());
  String farm=lookup.lookup("String_Node_Str",String.class);
  assertEquals("String_Node_Str",farm);
  assertEquals(4.2,lookup.lookup("String_Node_Str",double.class),0.01);
  assertEquals(94.23,lookup.lookup("String_Node_Str",double.class),0.01);
  assertTrue(domainsCatcher.children.containsKey("String_Node_Str"));
  Structural fruitDomain=(Structural)domainsCatcher.children.get("String_Node_Str");
  ChildCatcher fruitCatcher=new ChildCatcher();
  fruitDomain.addStructuralListener(fruitCatcher);
  assertTrue(fruitCatcher.children.size() == 1);
  oddjob.stop();
  assertEquals(ParentState.COMPLETE,oddjob.lastStateEvent().getState());
  assertEquals(0,fruitCatcher.children.size());
  assertEquals(0,domainsCatcher.children.size());
  Object sequential=lookup.lookup("String_Node_Str");
  ((Resetable)sequential).hardReset();
  assertEquals(ParentState.READY,((Stateful)sequential).lastStateEvent().getState());
  ((Runnable)sequential).run();
  assertEquals(ParentState.ACTIVE,oddjob.lastStateEvent().getState());
  assertEquals(94.23,lookup.lookup("String_Node_Str",double.class),0.01);
  oddjob.stop();
  assertEquals(ParentState.COMPLETE,oddjob.lastStateEvent().getState());
  oddjob.destroy();
}