Program: 96449
Project: 96449
Buggy source:
@Test public void testDefaultConnectOptions() throws Exception {
  final String sslCipherValue="String_Node_Str";
  GatewayConfiguration gc=new GatewayConfigurationBuilder().serviceDefaults().connectOption("String_Node_Str",sslCipherValue).connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").done().service().type("String_Node_Str").name("String_Node_Str").accept("String_Node_Str").done().done();
  Gateway gateway=new Gateway();
  GatewayContext gatewayContext=gateway.createGatewayContext(gc);
  ServiceContext service=(ServiceContext)gatewayContext.getServices().toArray()[0];
  ConnectOptionsContext connectOptionsContext=service.getConnectOptionsContext();
  Map<String,Object> connectOptionsMap=connectOptionsContext.asOptionsMap();
  Assert.assertNotNull(((String[])connectOptionsMap.get("String_Node_Str"))[0]);
  String[] sslProtocols=(String[])connectOptionsMap.get("String_Node_Str");
  Assert.assertTrue("String_Node_Str".equals(sslProtocols[0]));
  Assert.assertTrue("String_Node_Str".equals(connectOptionsMap.get("String_Node_Str")));
  final String trim=connectOptionsMap.get("String_Node_Str").toString().trim();
  Assert.assertTrue("String_Node_Str".equals(trim));
  Assert.assertFalse((Boolean)connectOptionsMap.get("String_Node_Str"));
  Assert.assertEquals(5,connectOptionsMap.get("String_Node_Str" + HTTP_KEEP_ALIVE_TIMEOUT_KEY));
  Assert.assertFalse((Boolean)connectOptionsMap.get("String_Node_Str" + HTTP_KEEP_ALIVE));
  Assert.assertEquals(7,connectOptionsMap.get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testDefaultConnectOptions() throws Exception {
  final String sslCipherValue="String_Node_Str";
  GatewayConfiguration gc=new GatewayConfigurationBuilder().serviceDefaults().connectOption("String_Node_Str",sslCipherValue).connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").connectOption("String_Node_Str","String_Node_Str").done().service().type("String_Node_Str").name("String_Node_Str").accept("String_Node_Str").done().done();
  Gateway gateway=new Gateway();
  GatewayContext gatewayContext=gateway.createGatewayContext(gc);
  ServiceContext service=(ServiceContext)gatewayContext.getServices().toArray()[0];
  ConnectOptionsContext connectOptionsContext=service.getConnectOptionsContext();
  Map<String,Object> connectOptionsMap=connectOptionsContext.asOptionsMap();
  Assert.assertNotNull(((String[])connectOptionsMap.get("String_Node_Str"))[0]);
  String[] sslProtocols=(String[])connectOptionsMap.get("String_Node_Str");
  Assert.assertTrue("String_Node_Str".equals(sslProtocols[0]));
  Assert.assertTrue("String_Node_Str".equals(connectOptionsMap.get("String_Node_Str")));
  Assert.assertEquals("String_Node_Str",connectOptionsMap.get("String_Node_Str").toString().trim());
  Assert.assertFalse((Boolean)connectOptionsMap.get("String_Node_Str"));
  Assert.assertEquals(5,connectOptionsMap.get("String_Node_Str" + HTTP_KEEP_ALIVE_TIMEOUT_KEY));
  Assert.assertFalse((Boolean)connectOptionsMap.get("String_Node_Str" + HTTP_KEEP_ALIVE));
  Assert.assertEquals(7,connectOptionsMap.get("String_Node_Str"));
}