Program: 49255
Project: 49255
Buggy source:
@Test public void testTxnReplaceIfSame() throws TransactionException {
  Config config=new Config();
  StaticNodeFactory factory=new StaticNodeFactory(2);
  HazelcastInstance h1=factory.newHazelcastInstance(config);
  HazelcastInstance h2=factory.newHazelcastInstance(config);
  final IMap map2=h2.getMap("String_Node_Str");
  map2.put("String_Node_Str","String_Node_Str");
  map2.put("String_Node_Str","String_Node_Str");
  boolean b=h1.executeTransaction(new TransactionalTask<Boolean>(){
    public Boolean execute(    TransactionalTaskContext context) throws TransactionException {
      final TransactionalMap<Object,Object> txMap=context.getMap("String_Node_Str");
      assertEquals(true,txMap.replace("String_Node_Str","String_Node_Str","String_Node_Str"));
      assertEquals(false,txMap.replace("String_Node_Str","String_Node_Str","String_Node_Str"));
      assertEquals(false,txMap.replace("String_Node_Str","String_Node_Str","String_Node_Str"));
      assertEquals("String_Node_Str",map2.get("String_Node_Str"));
      assertEquals("String_Node_Str",txMap.get("String_Node_Str"));
      assertEquals("String_Node_Str",map2.get("String_Node_Str"));
      assertEquals("String_Node_Str",txMap.get("String_Node_Str"));
      return true;
    }
  }
);
  assertTrue(b);
  IMap map1=h1.getMap("String_Node_Str");
  assertEquals("String_Node_Str",map1.get("String_Node_Str"));
  assertEquals("String_Node_Str",map2.get("String_Node_Str"));
  assertEquals("String_Node_Str",map1.get("String_Node_Str"));
  assertEquals("String_Node_Str",map2.get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testTxnReplaceIfSame() throws TransactionException {
  Config config=new Config();
  final TestHazelcastInstanceFactory factory=createHazelcastInstanceFactory(2);
  final HazelcastInstance h1=factory.newHazelcastInstance(config);
  final HazelcastInstance h2=factory.newHazelcastInstance(config);
  final IMap map2=h2.getMap("String_Node_Str");
  map2.put("String_Node_Str","String_Node_Str");
  map2.put("String_Node_Str","String_Node_Str");
  boolean b=h1.executeTransaction(new TransactionalTask<Boolean>(){
    public Boolean execute(    TransactionalTaskContext context) throws TransactionException {
      final TransactionalMap<Object,Object> txMap=context.getMap("String_Node_Str");
      assertEquals(true,txMap.replace("String_Node_Str","String_Node_Str","String_Node_Str"));
      assertEquals(false,txMap.replace("String_Node_Str","String_Node_Str","String_Node_Str"));
      assertEquals(false,txMap.replace("String_Node_Str","String_Node_Str","String_Node_Str"));
      assertEquals("String_Node_Str",map2.get("String_Node_Str"));
      assertEquals("String_Node_Str",txMap.get("String_Node_Str"));
      assertEquals("String_Node_Str",map2.get("String_Node_Str"));
      assertEquals("String_Node_Str",txMap.get("String_Node_Str"));
      return true;
    }
  }
);
  assertTrue(b);
  IMap map1=h1.getMap("String_Node_Str");
  assertEquals("String_Node_Str",map1.get("String_Node_Str"));
  assertEquals("String_Node_Str",map2.get("String_Node_Str"));
  assertEquals("String_Node_Str",map1.get("String_Node_Str"));
  assertEquals("String_Node_Str",map2.get("String_Node_Str"));
}