Program: 85832
Project: 85832
Buggy source:
private void checkTimeLockedDependency(boolean shouldAccept) throws Exception {
  control.replay();
  connect();
  ECKey key=new ECKey();
  Wallet wallet=new Wallet(unitTestParams);
  wallet.addKey(key);
  wallet.setAcceptTimeLockedTransactions(shouldAccept);
  peer.addWallet(wallet);
  final Transaction[] vtx=new Transaction[1];
  wallet.addEventListener(new AbstractWalletEventListener(){
    @Override public void onCoinsReceived(    Wallet wallet,    Transaction tx,    BigInteger prevBalance,    BigInteger newBalance){
      vtx[0]=tx;
    }
  }
);
  Transaction t2=new Transaction(unitTestParams);
  t2.setLockTime(999999);
  Sha256Hash t3=Sha256Hash.create("String_Node_Str".getBytes(Charset.forName("String_Node_Str")));
  t2.addInput(new TransactionInput(unitTestParams,t2,new byte[]{},new TransactionOutPoint(unitTestParams,0,t3)));
  t2.addOutput(Utils.toNanoCoins(1,0),new ECKey());
  Transaction t1=new Transaction(unitTestParams);
  t1.addInput(t2.getOutput(0));
  t1.addOutput(Utils.toNanoCoins(1,0),key);
  InventoryMessage inv=new InventoryMessage(unitTestParams);
  inv.addTransaction(t1);
  inbound(peer,inv);
  GetDataMessage getdata=(GetDataMessage)outbound();
  assertEquals(t1.getHash(),getdata.getItems().get(0).hash);
  inbound(peer,t1);
  assertNull(vtx[0]);
  getdata=(GetDataMessage)outbound();
  assertEquals(t2.getHash(),getdata.getItems().get(0).hash);
  inbound(peer,t2);
  getdata=(GetDataMessage)outbound();
  assertEquals(t3,getdata.getItems().get(0).hash);
  NotFoundMessage notFound=new NotFoundMessage(unitTestParams);
  notFound.addItem(new InventoryItem(InventoryItem.Type.Transaction,t3));
  inbound(peer,notFound);
  if (shouldAccept)   assertNotNull(vtx[0]);
 else   assertNull(vtx[0]);
}

Fixed version (ground truth):
private void checkTimeLockedDependency(boolean shouldAccept,boolean useNotFound) throws Exception {
  control.replay();
  connectWithVersion(useNotFound ? 70001 : 60001);
  ECKey key=new ECKey();
  Wallet wallet=new Wallet(unitTestParams);
  wallet.addKey(key);
  wallet.setAcceptTimeLockedTransactions(shouldAccept);
  peer.addWallet(wallet);
  final Transaction[] vtx=new Transaction[1];
  wallet.addEventListener(new AbstractWalletEventListener(){
    @Override public void onCoinsReceived(    Wallet wallet,    Transaction tx,    BigInteger prevBalance,    BigInteger newBalance){
      vtx[0]=tx;
    }
  }
);
  Transaction t2=new Transaction(unitTestParams);
  t2.setLockTime(999999);
  Sha256Hash t3=Sha256Hash.create("String_Node_Str".getBytes(Charset.forName("String_Node_Str")));
  t2.addInput(new TransactionInput(unitTestParams,t2,new byte[]{},new TransactionOutPoint(unitTestParams,0,t3)));
  t2.addOutput(Utils.toNanoCoins(1,0),new ECKey());
  Transaction t1=new Transaction(unitTestParams);
  t1.addInput(t2.getOutput(0));
  t1.addOutput(Utils.toNanoCoins(1,0),key);
  InventoryMessage inv=new InventoryMessage(unitTestParams);
  inv.addTransaction(t1);
  inbound(peer,inv);
  GetDataMessage getdata=(GetDataMessage)outbound();
  assertEquals(t1.getHash(),getdata.getItems().get(0).hash);
  inbound(peer,t1);
  assertNull(vtx[0]);
  getdata=(GetDataMessage)outbound();
  assertEquals(t2.getHash(),getdata.getItems().get(0).hash);
  inbound(peer,t2);
  if (!useNotFound)   bouncePing();
  getdata=(GetDataMessage)outbound();
  assertEquals(t3,getdata.getItems().get(0).hash);
  if (useNotFound) {
    NotFoundMessage notFound=new NotFoundMessage(unitTestParams);
    notFound.addItem(new InventoryItem(InventoryItem.Type.Transaction,t3));
    inbound(peer,notFound);
  }
 else {
    bouncePing();
  }
  if (shouldAccept)   assertNotNull(vtx[0]);
 else   assertNull(vtx[0]);
}