Program: 35042
Project: 35042
Buggy source:
@Override public ValidateResult validate(AliasTransaction tx){
  Alias alias=tx.getTxData();
  Alias aliasDb=aliasService.getAlias(alias.getAlias());
  if (null != aliasDb) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_EXIST);
  }
  List<Account> list=accountService.getAccountList().getData();
  for (  Account account : list) {
    if (alias.getAlias().equals(account.getAlias())) {
      return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_EXIST);
    }
  }
  if (!Address.validAddress(alias.getAddress())) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ADDRESS_ERROR);
  }
  if (!StringUtils.validAlias(alias.getAlias())) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_ERROR);
  }
  AliasPo aliasPo=alisaStorageService.getAlias(alias.getAlias()).getData();
  if (aliasPo != null) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_EXIST);
  }
  if (tx.isFreeOfFee()) {
    return ValidateResult.getFailedResult(alias.getClass().getName(),TransactionErrorCode.FEE_NOT_RIGHT);
  }
  CoinData coinData=tx.getCoinData();
  if (null == coinData) {
    return ValidateResult.getFailedResult(this.getClass().getName(),TransactionErrorCode.FEE_NOT_RIGHT);
  }
  Na realFee=tx.getFee();
  Na fee=TransactionFeeCalculator.getFee(tx.size());
  if (realFee.isLessThan(fee.add(AccountConstant.ALIAS_NA))) {
    return ValidateResult.getFailedResult(this.getClass().getName(),TransactionErrorCode.FEE_NOT_RIGHT);
  }
  P2PKHScriptSig sig=new P2PKHScriptSig();
  try {
    sig.parse(tx.getScriptSig());
  }
 catch (  NulsException e) {
    Log.error(e);
    return ValidateResult.getFailedResult(this.getClass().getName(),e.getMessage());
  }
  if (!Arrays.equals(tx.getTxData().getAddress(),AddressTool.getAddress(sig.getPublicKey()))) {
    ValidateResult result=ValidateResult.getFailedResult(this.getClass().getName(),"String_Node_Str");
    result.setLevel(SeverityLevelEnum.FLAGRANT_FOUL);
    return result;
  }
  return ValidateResult.getSuccessResult();
}

Fixed version (ground truth):
@Override public ValidateResult validate(AliasTransaction tx){
  Alias alias=tx.getTxData();
  Alias aliasDb=aliasService.getAlias(alias.getAlias());
  if (null != aliasDb) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_EXIST);
  }
  List<AliasPo> list=aliasStorageService.getAliasList().getData();
  for (  AliasPo aliasPo : list) {
    if (Base58.encode(aliasPo.getAddress()).equals(Base58.encode(alias.getAddress()))) {
      return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_EXIST);
    }
  }
  if (!Address.validAddress(alias.getAddress())) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ADDRESS_ERROR);
  }
  if (!StringUtils.validAlias(alias.getAlias())) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_ERROR);
  }
  AliasPo aliasPo=aliasStorageService.getAlias(alias.getAlias()).getData();
  if (aliasPo != null) {
    return ValidateResult.getFailedResult(this.getClass().getName(),AccountErrorCode.ALIAS_EXIST);
  }
  if (tx.isFreeOfFee()) {
    return ValidateResult.getFailedResult(alias.getClass().getName(),TransactionErrorCode.FEE_NOT_RIGHT);
  }
  CoinData coinData=tx.getCoinData();
  if (null == coinData) {
    return ValidateResult.getFailedResult(this.getClass().getName(),TransactionErrorCode.FEE_NOT_RIGHT);
  }
  Na realFee=tx.getFee();
  Na fee=TransactionFeeCalculator.getFee(tx.size());
  if (realFee.isLessThan(fee.add(AccountConstant.ALIAS_NA))) {
    return ValidateResult.getFailedResult(this.getClass().getName(),TransactionErrorCode.FEE_NOT_RIGHT);
  }
  P2PKHScriptSig sig=new P2PKHScriptSig();
  try {
    sig.parse(tx.getScriptSig());
  }
 catch (  NulsException e) {
    Log.error(e);
    return ValidateResult.getFailedResult(this.getClass().getName(),e.getMessage());
  }
  if (!Arrays.equals(tx.getTxData().getAddress(),AddressTool.getAddress(sig.getPublicKey()))) {
    ValidateResult result=ValidateResult.getFailedResult(this.getClass().getName(),"String_Node_Str");
    result.setLevel(SeverityLevelEnum.FLAGRANT_FOUL);
    return result;
  }
  return ValidateResult.getSuccessResult();
}