Program: 63160
Project: 63160
Buggy source:
@Test public void getProof() throws Exception {
  Identity identity=ontSdk.getWalletMgr().createIdentity(password);
  Account payer=ontSdk.getWalletMgr().createAccount(password);
  Transaction tx=ontSdk.nativevm().ontId().makeRegister(identity.ontid,password,payer.address,0);
  ontSdk.signTx(tx,identity.ontid,password);
  ontSdk.addSign(tx,payer.address,password);
  ontSdk.getConnect().sendRawTransaction(tx);
  Thread.sleep(6000);
  String hash=tx.hash().toHexString();
  Map proof=new HashMap();
  Map map=new HashMap();
  int height=ontSdk.getConnect().getBlockHeightByTxHash(hash);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str",hash);
  map.put("String_Node_Str",height);
  Map tmpProof=(Map)ontSdk.getConnect().getMerkleProof(hash);
  UInt256 txroot=UInt256.parse((String)tmpProof.get("String_Node_Str"));
  int blockHeight=(int)tmpProof.get("String_Node_Str");
  UInt256 curBlockRoot=UInt256.parse((String)tmpProof.get("String_Node_Str"));
  int curBlockHeight=(int)tmpProof.get("String_Node_Str");
  List hashes=(List)tmpProof.get("String_Node_Str");
  UInt256[] targetHashes=new UInt256[hashes.size()];
  for (int i=0; i < hashes.size(); i++) {
    targetHashes[i]=UInt256.parse((String)hashes.get(i));
  }
  map.put("String_Node_Str",curBlockRoot.toHexString());
  map.put("String_Node_Str",MerkleVerifier.getProof(txroot,blockHeight,targetHashes,curBlockHeight + 1));
  proof.put("String_Node_Str",map);
  MerkleVerifier.Verify(txroot,MerkleVerifier.getProof(txroot,blockHeight,targetHashes,curBlockHeight + 1),curBlockRoot);
}

Fixed version (ground truth):
@Test public void getProof() throws Exception {
  Identity identity=ontSdk.getWalletMgr().createIdentity(password);
  Account payer=ontSdk.getWalletMgr().createAccount(password);
  Transaction tx=ontSdk.nativevm().ontId().makeRegister(identity.ontid,password,payer.address,ontSdk.DEFAULT_GAS_LIMIT,0);
  ontSdk.signTx(tx,identity.ontid,password);
  ontSdk.addSign(tx,payer.address,password);
  ontSdk.getConnect().sendRawTransaction(tx);
  Thread.sleep(6000);
  String hash=tx.hash().toHexString();
  Map proof=new HashMap();
  Map map=new HashMap();
  int height=ontSdk.getConnect().getBlockHeightByTxHash(hash);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str",hash);
  map.put("String_Node_Str",height);
  Map tmpProof=(Map)ontSdk.getConnect().getMerkleProof(hash);
  UInt256 txroot=UInt256.parse((String)tmpProof.get("String_Node_Str"));
  int blockHeight=(int)tmpProof.get("String_Node_Str");
  UInt256 curBlockRoot=UInt256.parse((String)tmpProof.get("String_Node_Str"));
  int curBlockHeight=(int)tmpProof.get("String_Node_Str");
  List hashes=(List)tmpProof.get("String_Node_Str");
  UInt256[] targetHashes=new UInt256[hashes.size()];
  for (int i=0; i < hashes.size(); i++) {
    targetHashes[i]=UInt256.parse((String)hashes.get(i));
  }
  map.put("String_Node_Str",curBlockRoot.toHexString());
  map.put("String_Node_Str",MerkleVerifier.getProof(txroot,blockHeight,targetHashes,curBlockHeight + 1));
  proof.put("String_Node_Str",map);
  MerkleVerifier.Verify(txroot,MerkleVerifier.getProof(txroot,blockHeight,targetHashes,curBlockHeight + 1),curBlockRoot);
}