Buggy code:
private int blockNo ; private byte [ ] txHash ; private int txTime ; private long txVer ; private long txLockTime ; private int source ; private int sawByPeerCnt ; private List < In > ins ; private List < Out > outs ; private transient int optimalEncodingMessageSize ; public int getBlockNo ( ) { } public void setBlockNo ( int blockNo ) { } public byte [ ] getTxHash ( ) { } public void recalculateTxHash ( ) { } public void setTxHash ( byte [ ] txHash ) { } public int getTxTime ( ) { } public void setTxTime ( int txTime ) { } public long getTxVer ( ) { } public void setTxVer ( long txVer ) { } public long getTxLockTime ( ) { } public void setTxLockTime ( long txLockTime ) { } public int getSource ( ) { } public void setSource ( int source ) { } public List < In > getIns ( ) { } public void setIns ( List < In > ins ) { } public List < Out > getOuts ( ) { } public void setOuts ( List < Out > outs ) { } public int getSawByPeerCnt ( ) { } public void setSawByPeerCnt ( int sawByPeerCnt ) { } public void sawByPeer ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int compareTo ( @ Nonnull Tx tx ) { } public String getFirstOutAddressOtherThanChange ( String changeAddress ) { } public String getFirstOutAddress ( ) { } public String getFromAddress ( ) { } public long amountSentToAddress ( String address ) { } public long getFee ( ) { } public String getHashAsString ( ) { } public Date getTxDate ( ) { } protected static int calcLength ( byte [ ] buf , int offset ) { } protected void parse ( ) throws ProtocolException { } public int getOptimalEncodingMessageSize ( ) { } public boolean isCoinBase ( ) { } public boolean isMature ( ) { } public void clearInputs ( ) { } public In addInput ( Out from ) { } public In addInput ( In input ) { } public In addSignedInput ( Out prevOut , Script scriptPubKey , ECKey sigKey , TransactionSignature . SigHash sigHash , boolean anyoneCanPay ) throws ScriptException { } public In addSignedInput ( Out prevOut , Script scriptPubKey , ECKey sigKey ) throws ScriptException { } public void clearOutputs ( ) { } public Out addOutput ( Out to ) { } public Out addOutput ( long value , String address ) { } public Out addOutput ( long value , ECKey pubkey ) { } public Out addOutput ( long value , Script script ) { } public synchronized void signInputs ( TransactionSignature . SigHash hashType , Address address ) throws ScriptException { } public synchronized void signInputs ( TransactionSignature . SigHash hashType , Address address , CharSequence password ) throws ScriptException { } public synchronized TransactionSignature calculateSignature ( int inputIndex , ECKey key , @ Nullable KeyParameter aesKey , byte [ ] connectedPubKeyScript , TransactionSignature . SigHash hashType , boolean anyoneCanPay ) { } public synchronized TransactionSignature calculateSignature ( int inputIndex , ECKey key , Script connectedPubKeyScript , TransactionSignature . SigHash hashType , boolean anyoneCanPay ) { } public synchronized byte [ ] hashForSignature ( int inputIndex , byte [ ] connectedScript , TransactionSignature . SigHash type , boolean anyoneCanPay ) { } public synchronized byte [ ] hashForSignature ( int inputIndex , Script connectedScript , TransactionSignature . SigHash type , boolean anyoneCanPay ) { } public synchronized byte [ ] hashForSignature ( int inputIndex , byte [ ] connectedScript , byte sigHashType ) { } @ Override protected void bitcoinSerializeToStream ( OutputStream stream ) throws IOException { } @ Override public int hashCode ( ) { } private void writeObject ( ObjectOutputStream out ) throws IOException { } public int getSigOpCount ( ) throws ScriptException { } public void verify ( ) throws VerificationException { } public boolean isTimeLocked ( ) { } public boolean isFinal ( int height , long blockTimeSeconds ) { } public long amountReceivedFrom ( Address address ) { } public long amountSentFrom ( Address address ) { } public long amountSentTo ( Address address ) { } public long deltaAmountFrom ( Address address ) { } public int getConfirmationCount ( ) { } public List < byte [ ] > getUnsignedInHashes ( ) { } public List < byte [ ] > getUnsignedInHashesForHDM ( byte [ ] pubs ) { } public void signWithSignatures ( List < byte [ ] > signatures ) { } public boolean isSigned ( ) { } public List < byte [ ] > getSignPubs ( List < byte [ ] > pubKeys , byte [ ] params ) { } private byte [ ] getSignPubs ( byte [ ] messageHash , ECKey . ECDSASignature sig , List < byte [ ] > pubs ) { for ( int i = 0 ; i < 4 ; i ++ ) { ECPoint point = ECKey . recoverECPointFromSignature ( i , sig , messageHash ) ; ECKey ecKeyCompress = new ECKey ( null , point . getEncoded ( true ) ) ; ECKey ecKeyUnCompress = new ECKey ( null , point . getEncoded ( false ) ) ; <START_BUG> for ( int j = 0 ; j < ( pubs . size ( ) ) ; i ++ ) { <END_BUG> if ( Arrays . equals ( ecKeyCompress . getPubKey ( ) , pubs . get ( j ) ) ) { return ecKeyCompress . getPubKey ( ) ; } if ( Arrays . equals ( ecKeyUnCompress . getPubKey ( ) , pubs . get ( j ) ) ) { return ecKeyUnCompress . getPubKey ( ) ; } } } return null ; } public boolean verifySignatures ( ) { } public boolean hasDustOut ( ) { } }

Fix:
for ( int j = 0 ; j < ( pubs . size ( ) ) ; j ++ ) {