nus-yam/ex-repair huggingface dataset:
Program: 69116
Project: 69116
Buggy source:
private void checkCryptoSetup(){
  BooleanProperty result=new SimpleBooleanProperty();
  Thread checkCryptoThread=new Thread(() -> {
    try {
      Thread.currentThread().setName("String_Node_Str");
      log.trace("String_Node_Str");
      Ping payload=new Ping(1,1);
      SealedAndSigned sealedAndSigned=EncryptionService.encryptHybridWithSignature(payload,keyRing.getSignatureKeyPair(),keyRing.getPubKeyRing().getEncryptionPubKey());
      DecryptedDataTuple tuple=encryptionService.decryptHybridWithSignature(sealedAndSigned,keyRing.getEncryptionKeyPair().getPrivate());
      if (tuple.getNetworkEnvelope() instanceof Ping && ((Ping)tuple.getNetworkEnvelope()).getNonce() == payload.getNonce() && ((Ping)tuple.getNetworkEnvelope()).getLastRoundTripTime() == payload.getLastRoundTripTime()) {
        log.debug("String_Node_Str");
        if (Security.getProvider("String_Node_Str") != null) {
          UserThread.execute(() -> result.set(true));
        }
 else {
          throw new CryptoException("String_Node_Str");
        }
      }
 else {
        throw new CryptoException("String_Node_Str");
      }
    }
 catch (    CryptoException e) {
      e.printStackTrace();
      String msg=Res.get("String_Node_Str",e.getMessage());
      log.error(msg);
      if (cryptoSetupFailedHandler != null)       cryptoSetupFailedHandler.accept(msg);
    }
  }
);
  checkCryptoThread.start();
}

Fixed version (ground truth):
private void checkCryptoSetup(){
  BooleanProperty result=new SimpleBooleanProperty();
  Thread checkCryptoThread=new Thread(() -> {
    try {
      Thread.currentThread().setName("String_Node_Str");
      log.trace("String_Node_Str");
      Ping payload=new Ping(1,1);
      SealedAndSigned sealedAndSigned=EncryptionService.encryptHybridWithSignature(payload,keyRing.getSignatureKeyPair(),keyRing.getPubKeyRing().getEncryptionPubKey());
      DecryptedDataTuple tuple=encryptionService.decryptHybridWithSignature(sealedAndSigned,keyRing.getEncryptionKeyPair().getPrivate());
      if (tuple.getNetworkEnvelope() instanceof Ping && ((Ping)tuple.getNetworkEnvelope()).getNonce() == payload.getNonce() && ((Ping)tuple.getNetworkEnvelope()).getLastRoundTripTime() == payload.getLastRoundTripTime()) {
        log.debug("String_Node_Str");
        if (Security.getProvider("String_Node_Str") != null) {
          UserThread.execute(() -> result.set(true));
        }
 else {
          throw new CryptoException("String_Node_Str");
        }
      }
 else {
        throw new CryptoException("String_Node_Str");
      }
    }
 catch (    CryptoException|ProtobufferException e) {
      e.printStackTrace();
      String msg=Res.get("String_Node_Str",e.getMessage());
      log.error(msg);
      if (cryptoSetupFailedHandler != null)       cryptoSetupFailedHandler.accept(msg);
    }
  }
);
  checkCryptoThread.start();
}
Program: 69117
Project: 69117
Buggy source:
boolean isValid(){
  if (!predicates.isMatchingCurrency(offer,account)) {
    return false;
  }
  boolean isEqualPaymentMethods=predicates.isEqualPaymentMethods(offer,account);
  if (!(account instanceof CountryBasedPaymentAccount)) {
    return isEqualPaymentMethods;
  }
  if (!predicates.isMatchingCountryCodes(offer,account)) {
    return false;
  }
  if (predicates.isSepaRelated(offer,account)) {
    return true;
  }
 else   if (predicates.isOfferRequireSameOrSpecificBank(offer,account)) {
    return predicates.isMatchingBankId(offer,account);
  }
 else {
    return isEqualPaymentMethods;
  }
}

Fixed version (ground truth):
boolean isValid(){
  if (!predicates.isMatchingCurrency(offer,account)) {
    return false;
  }
  boolean isEqualPaymentMethods=predicates.isEqualPaymentMethods(offer,account);
  if (!(account instanceof CountryBasedPaymentAccount)) {
    return isEqualPaymentMethods;
  }
  if (!predicates.isMatchingCountryCodes(offer,account)) {
    return false;
  }
  if (predicates.isMatchingSepaOffer(offer,account)) {
    return true;
  }
  if (predicates.isMatchingSepaInstant(offer,account)) {
    return true;
  }
  if (predicates.isOfferRequireSameOrSpecificBank(offer,account)) {
    return predicates.isMatchingBankId(offer,account);
  }
  return isEqualPaymentMethods;
}
Program: 69119
Project: 69119
Buggy source:
@Test public void testIsValidWhenNationalBankAccount(){
  account=mock(NationalBankAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isSepaRelated(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(false);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}

Fixed version (ground truth):
@Test public void testIsValidWhenNationalBankAccount(){
  account=mock(NationalBankAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaInstant(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(false);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}
Program: 69120
Project: 69120
Buggy source:
@Test public void testIsValidWhenSpecificBankAccountAndOfferRequireSpecificBank(){
  account=mock(SpecificBanksAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isSepaRelated(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(false);
  assertFalse(new ReceiptValidator(offer,account,predicates).isValid());
}

Fixed version (ground truth):
@Test public void testIsValidWhenSpecificBankAccountAndOfferRequireSpecificBank(){
  account=mock(SpecificBanksAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaInstant(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(false);
  assertFalse(new ReceiptValidator(offer,account,predicates).isValid());
}
Program: 69121
Project: 69121
Buggy source:
@Test public void testIsValidWhenSameBankAccountAndOfferRequireSpecificBank(){
  account=mock(SameBankAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isSepaRelated(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(false);
  assertFalse(new ReceiptValidator(offer,account,predicates).isValid());
}

Fixed version (ground truth):
@Test public void testIsValidWhenSameBankAccountAndOfferRequireSpecificBank(){
  account=mock(SameBankAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaInstant(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(false);
  assertFalse(new ReceiptValidator(offer,account,predicates).isValid());
}
Program: 69122
Project: 69122
Buggy source:
@Test public void testIsValidWhenSameBankAccount(){
  account=mock(SameBankAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isSepaRelated(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(true);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}

Fixed version (ground truth):
@Test public void testIsValidWhenSameBankAccount(){
  account=mock(SameBankAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaInstant(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(true);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}
Program: 69123
Project: 69123
Buggy source:
@Test public void testIsValidWhenSpecificBankAccount(){
  account=mock(SpecificBanksAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isSepaRelated(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(true);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}

Fixed version (ground truth):
@Test public void testIsValidWhenSpecificBankAccount(){
  account=mock(SpecificBanksAccount.class);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaInstant(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(true);
  when(predicates.isMatchingBankId(offer,account)).thenReturn(true);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}
Program: 69124
Project: 69124
Buggy source:
@Test public void testIsValidWhenWesternUnionAccount(){
  account=mock(WesternUnionAccount.class);
  PaymentMethod.WESTERN_UNION=mock(PaymentMethod.class);
  when(offer.getPaymentMethod()).thenReturn(PaymentMethod.WESTERN_UNION);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isSepaRelated(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(false);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}

Fixed version (ground truth):
@Test public void testIsValidWhenWesternUnionAccount(){
  account=mock(WesternUnionAccount.class);
  PaymentMethod.WESTERN_UNION=mock(PaymentMethod.class);
  when(offer.getPaymentMethod()).thenReturn(PaymentMethod.WESTERN_UNION);
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaInstant(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(false);
  assertTrue(new ReceiptValidator(offer,account,predicates).isValid());
}
Program: 69125
Project: 69125
Buggy source:
@Test public void testIsValidWhenWesternIrregularAccount(){
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isSepaRelated(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(false);
  assertTrue(validator.isValid());
}

Fixed version (ground truth):
@Test public void testIsValidWhenWesternIrregularAccount(){
  when(predicates.isMatchingCurrency(offer,account)).thenReturn(true);
  when(predicates.isEqualPaymentMethods(offer,account)).thenReturn(true);
  when(predicates.isMatchingCountryCodes(offer,account)).thenReturn(true);
  when(predicates.isMatchingSepaOffer(offer,account)).thenReturn(false);
  when(predicates.isMatchingSepaInstant(offer,account)).thenReturn(false);
  when(predicates.isOfferRequireSameOrSpecificBank(offer,account)).thenReturn(false);
  assertTrue(validator.isValid());
}
Program: 69126
Project: 69126
Buggy source:
protected void applyInjector(){
  DevEnv.setup(injector);
  setupPersistedDataHosts(injector);
}

Fixed version (ground truth):
protected void applyInjector(){
  DevEnv.setup(injector);
  setCorruptedDataBaseFilesHandler();
  setupPersistedDataHosts(injector);
}
Program: 69128
Project: 69128
Buggy source:
protected void applyInjector(){
  DevEnv.setup(injector);
  setupPersistedDataHosts(injector);
}

Fixed version (ground truth):
protected void applyInjector(){
  DevEnv.setup(injector);
  setCorruptedDataBaseFilesHandler();
  setupPersistedDataHosts(injector);
}
Program: 69130
Project: 69130
Buggy source:
public void activateOpenOffer(OpenOffer openOffer,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  if (offersToBeEdited.containsKey(openOffer.getId())) {
    throw new IllegalStateException("String_Node_Str");
  }
  Offer offer=openOffer.getOffer();
  openOffer.setStorage(openOfferTradableListStorage);
  offerBookService.activateOffer(offer,() -> {
    openOffer.setState(OpenOffer.State.AVAILABLE);
    log.debug("String_Node_Str",offer.getId());
    resultHandler.handleResult();
  }
,errorMessageHandler);
}

Fixed version (ground truth):
public void activateOpenOffer(OpenOffer openOffer,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  if (!offersToBeEdited.containsKey(openOffer.getId())) {
    Offer offer=openOffer.getOffer();
    openOffer.setStorage(openOfferTradableListStorage);
    offerBookService.activateOffer(offer,() -> {
      openOffer.setState(OpenOffer.State.AVAILABLE);
      log.debug("String_Node_Str",offer.getId());
      resultHandler.handleResult();
    }
,errorMessageHandler);
  }
 else {
    errorMessageHandler.handleErrorMessage("String_Node_Str");
  }
}
Program: 69131
Project: 69131
Buggy source:
public void removeOpenOffer(OpenOffer openOffer,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  if (offersToBeEdited.containsKey(openOffer.getId())) {
    throw new IllegalStateException("String_Node_Str");
  }
  Offer offer=openOffer.getOffer();
  if (openOffer.isDeactivated()) {
    openOffer.setStorage(openOfferTradableListStorage);
    onRemoved(openOffer,resultHandler,offer);
  }
 else {
    offerBookService.removeOffer(offer.getOfferPayload(),() -> {
      onRemoved(openOffer,resultHandler,offer);
    }
,errorMessageHandler);
  }
}

Fixed version (ground truth):
public void removeOpenOffer(OpenOffer openOffer,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  if (!offersToBeEdited.containsKey(openOffer.getId())) {
    Offer offer=openOffer.getOffer();
    if (openOffer.isDeactivated()) {
      openOffer.setStorage(openOfferTradableListStorage);
      onRemoved(openOffer,resultHandler,offer);
    }
 else {
      offerBookService.removeOffer(offer.getOfferPayload(),() -> onRemoved(openOffer,resultHandler,offer),errorMessageHandler);
    }
  }
 else {
    errorMessageHandler.handleErrorMessage("String_Node_Str");
  }
}
Program: 69132
Project: 69132
Buggy source:
public void editOpenOfferPublish(Offer editedOffer,OpenOffer.State originalState,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  Optional<OpenOffer> openOfferOptional=getOpenOfferById(editedOffer.getId());
  if (openOfferOptional.isPresent()) {
    final OpenOffer openOffer=openOfferOptional.get();
    openOffer.setStorage(openOfferTradableListStorage);
    openOffer.getOffer().setState(Offer.State.REMOVED);
    openOffer.setState(OpenOffer.State.CANCELED);
    openOffers.remove(openOffer);
    final OpenOffer editedOpenOffer=new OpenOffer(editedOffer,openOfferTradableListStorage);
    editedOpenOffer.setState(originalState);
    openOffers.add(editedOpenOffer);
    republishOffer(editedOpenOffer);
    offersToBeEdited.remove(openOffer.getId());
    resultHandler.handleResult();
  }
 else {
    errorMessageHandler.handleErrorMessage("String_Node_Str");
  }
}

Fixed version (ground truth):
public void editOpenOfferPublish(Offer editedOffer,OpenOffer.State originalState,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  Optional<OpenOffer> openOfferOptional=getOpenOfferById(editedOffer.getId());
  if (openOfferOptional.isPresent()) {
    final OpenOffer openOffer=openOfferOptional.get();
    openOffer.setStorage(openOfferTradableListStorage);
    openOffer.getOffer().setState(Offer.State.REMOVED);
    openOffer.setState(OpenOffer.State.CANCELED);
    openOffers.remove(openOffer);
    final OpenOffer editedOpenOffer=new OpenOffer(editedOffer,openOfferTradableListStorage);
    editedOpenOffer.setState(originalState);
    openOffers.add(editedOpenOffer);
    if (!editedOpenOffer.isDeactivated())     republishOffer(editedOpenOffer);
    offersToBeEdited.remove(openOffer.getId());
    resultHandler.handleResult();
  }
 else {
    errorMessageHandler.handleErrorMessage("String_Node_Str");
  }
}
Program: 69133
Project: 69133
Buggy source:
public void editOpenOfferStart(OpenOffer openOffer,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  if (offersToBeEdited.containsKey(openOffer.getId())) {
    resultHandler.handleResult();
    return;
  }
  if (openOffer.isDeactivated()) {
    offersToBeEdited.put(openOffer.getId(),openOffer);
    resultHandler.handleResult();
  }
 else {
    deactivateOpenOffer(openOffer,() -> {
      offersToBeEdited.put(openOffer.getId(),openOffer);
      resultHandler.handleResult();
    }
,errorMessage -> {
      offersToBeEdited.remove(openOffer.getId());
      errorMessageHandler.handleErrorMessage(errorMessage);
    }
);
  }
}

Fixed version (ground truth):
public void editOpenOfferStart(OpenOffer openOffer,ResultHandler resultHandler,ErrorMessageHandler errorMessageHandler){
  if (offersToBeEdited.containsKey(openOffer.getId())) {
    log.warn("String_Node_Str");
    resultHandler.handleResult();
    return;
  }
  offersToBeEdited.put(openOffer.getId(),openOffer);
  if (openOffer.isDeactivated()) {
    resultHandler.handleResult();
  }
 else {
    deactivateOpenOffer(openOffer,() -> resultHandler.handleResult(),errorMessage -> {
      offersToBeEdited.remove(openOffer.getId());
      errorMessageHandler.handleErrorMessage(errorMessage);
    }
);
  }
}
Program: 69135
Project: 69135
Buggy source:
@SuppressWarnings("String_Node_Str") @Inject public FullNode(WritableBsqBlockChain writableBsqBlockChain,ReadableBsqBlockChain readableBsqBlockChain,SnapshotManager snapshotManager,P2PService p2PService,FullNodeExecutor bsqFullNodeExecutor,JsonBlockChainExporter jsonBlockChainExporter,FeeService feeService,FullNodeNetworkService fullNodeNetworkService){
  super(writableBsqBlockChain,readableBsqBlockChain,snapshotManager,p2PService,feeService);
  this.bsqFullNodeExecutor=bsqFullNodeExecutor;
  this.jsonBlockChainExporter=jsonBlockChainExporter;
  this.fullNodeNetworkService=fullNodeNetworkService;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Inject public FullNode(ReadableBsqBlockChain readableBsqBlockChain,SnapshotManager snapshotManager,P2PService p2PService,FullNodeExecutor bsqFullNodeExecutor,JsonBlockChainExporter jsonBlockChainExporter,FullNodeNetworkService fullNodeNetworkService){
  super(readableBsqBlockChain,snapshotManager,p2PService);
  this.bsqFullNodeExecutor=bsqFullNodeExecutor;
  this.jsonBlockChainExporter=jsonBlockChainExporter;
  this.fullNodeNetworkService=fullNodeNetworkService;
}
Program: 69136
Project: 69136
Buggy source:
@SuppressWarnings("String_Node_Str") @Inject public LiteNode(WritableBsqBlockChain writableBsqBlockChain,ReadableBsqBlockChain readableBsqBlockChain,SnapshotManager snapshotManager,P2PService p2PService,LiteNodeExecutor bsqLiteNodeExecutor,FeeService feeService,LiteNodeNetworkService liteNodeNetworkService){
  super(writableBsqBlockChain,readableBsqBlockChain,snapshotManager,p2PService,feeService);
  this.bsqLiteNodeExecutor=bsqLiteNodeExecutor;
  this.liteNodeNetworkService=liteNodeNetworkService;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Inject public LiteNode(ReadableBsqBlockChain readableBsqBlockChain,SnapshotManager snapshotManager,P2PService p2PService,LiteNodeExecutor bsqLiteNodeExecutor,LiteNodeNetworkService liteNodeNetworkService){
  super(readableBsqBlockChain,snapshotManager,p2PService);
  this.bsqLiteNodeExecutor=bsqLiteNodeExecutor;
  this.liteNodeNetworkService=liteNodeNetworkService;
}
Program: 69137
Project: 69137
Buggy source:
private ProposalList getSortedProposalList(){
  FilteredList<Proposal> proposals=proposalService.getActiveProposals();
  BlindVoteConsensus.sortProposalList(proposals);
  return new ProposalList(proposals);
}

Fixed version (ground truth):
private ProposalList getSortedProposalList(){
  List<Proposal> proposals=new ArrayList<>(proposalService.getActiveProposals());
  BlindVoteConsensus.sortProposalList(proposals);
  return new ProposalList(proposals);
}
Program: 69138
Project: 69138
Buggy source:
@Inject public ProposalService(P2PService p2PService,WalletsManager walletsManager,PeriodService periodService,ReadableBsqBlockChain readableBsqBlockChain,KeyRing keyRing,Storage<ProposalList> proposalListStorage){
  this.p2PService=p2PService;
  this.walletsManager=walletsManager;
  this.periodService=periodService;
  this.readableBsqBlockChain=readableBsqBlockChain;
  this.proposalListStorage=proposalListStorage;
  signaturePubKey=keyRing.getPubKeyRing().getSignaturePubKey();
  activeProposals.setPredicate(proposal -> periodService.isTxInCurrentCycle(proposal.getTxId()));
  closedProposals.setPredicate(proposal -> periodService.isTxInPastCycle(proposal.getTxId()));
}

Fixed version (ground truth):
@Inject public ProposalService(P2PService p2PService,WalletsManager walletsManager,PeriodService periodService,ReadableBsqBlockChain readableBsqBlockChain,KeyRing keyRing,Storage<ProposalList> proposalListStorage){
  this.p2PService=p2PService;
  this.walletsManager=walletsManager;
  this.periodService=periodService;
  this.readableBsqBlockChain=readableBsqBlockChain;
  this.proposalListStorage=proposalListStorage;
  signaturePubKey=keyRing.getPubKeyRing().getSignaturePubKey();
  readableBsqBlockChain.addListener(this);
}
Program: 69139
Project: 69139
Buggy source:
private void addProposal(ProposalPayload proposalPayload,boolean storeLocally){
  if (!listContains(proposalPayload)) {
    observableList.add(createSpecificProposal(proposalPayload));
    if (storeLocally)     persist();
  }
 else {
    if (!isMine(proposalPayload))     log.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
private void addProposal(ProposalPayload proposalPayload,boolean storeLocally){
  if (!listContains(proposalPayload)) {
    log.info("String_Node_Str" + proposalPayload);
    observableList.add(createSpecificProposal(proposalPayload));
    if (storeLocally)     persist();
    upDatePredicate();
  }
 else {
    if (!isMine(proposalPayload))     log.warn("String_Node_Str");
  }
}
Program: 69140
Project: 69140
Buggy source:
public Set<TxOutput> getBlindVoteStakeTxOutputs(){
  return lock.read(() -> getVerifiedTxOutputs().stream().filter(e -> e.getTxOutputType() == TxOutputType.BLIND_VOTE_LOCK_STAKE_OUTPUT).collect(Collectors.toSet()));
}

Fixed version (ground truth):
public Set<TxOutput> getBlindVoteStakeTxOutputs(){
  return lock.read(() -> getUnspentTxOutputs().stream().filter(e -> e.getTxOutputType() == TxOutputType.BLIND_VOTE_LOCK_STAKE_OUTPUT).collect(Collectors.toSet()));
}
Program: 69141
Project: 69141
Buggy source:
private Optional<OpReturnType> getOptionalOpReturnType(Tx tx,Model model){
  if (model.isBsqOutputFound()) {
    if (model.getOpReturnTypeCandidate() == model.getVerifiedOpReturnType()) {
      final OpReturnType verifiedOpReturnType=model.getVerifiedOpReturnType();
      return verifiedOpReturnType != null ? Optional.of(verifiedOpReturnType) : Optional.empty();
    }
 else {
      final String msg="String_Node_Str" + "String_Node_Str" + model.getOpReturnTypeCandidate() + "String_Node_Str"+ model.getVerifiedOpReturnType();
      DevEnv.logErrorAndThrowIfDevMode(msg);
    }
  }
 else {
    final String msg="String_Node_Str" + tx;
    log.warn(msg);
    if (DevEnv.isDevMode())     throw new RuntimeException(msg);
  }
  return Optional.empty();
}

Fixed version (ground truth):
private Optional<OpReturnType> getOptionalOpReturnType(Tx tx,Model model){
  if (model.isBsqOutputFound()) {
    if (model.getOpReturnTypeCandidate() == model.getVerifiedOpReturnType()) {
      final OpReturnType verifiedOpReturnType=model.getVerifiedOpReturnType();
      return verifiedOpReturnType != null ? Optional.of(verifiedOpReturnType) : Optional.empty();
    }
 else {
      final String msg="String_Node_Str" + "String_Node_Str" + model.getOpReturnTypeCandidate() + "String_Node_Str"+ model.getVerifiedOpReturnType();
      log.error(msg);
    }
  }
 else {
    final String msg="String_Node_Str" + tx;
    log.warn(msg);
    if (DevEnv.isDevMode())     throw new RuntimeException(msg);
  }
  return Optional.empty();
}
Program: 69143
Project: 69143
Buggy source:
@Override public TopicBean clone(){
  TopicBean bean=null;
  try {
    bean=(TopicBean)super.clone();
  }
 catch (  CloneNotSupportedException e) {
    e.printStackTrace();
  }
  return bean;
}

Fixed version (ground truth):
@Override public TopicBean clone(){
  TopicBean bean=null;
  try {
    bean=(TopicBean)super.clone();
    bean.newsArray=(ArrayList<TopicNewsBean>)newsArray.clone();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return bean;
}
Program: 69145
Project: 69145
Buggy source:
void bindData(@NonNull TopicNewsBean news){
  this.news=news;
  tvTitle.setText(news.getTitle());
  String infoText=mContext.getString(R.string.site_name___time,news.getSiteName(),FormatUtils.getRelativeTimeSpanString(news.getPublishDate()));
  SpannableString spannableInfoText=new SpannableString(infoText);
  spannableInfoText.setSpan(new StyleSpan(Typeface.BOLD),0,news.getSiteName().length(),Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
  tvInfo.setText(spannableInfoText);
}

Fixed version (ground truth):
void bindData(@NonNull TopicNewsBean news){
  this.news=news;
  tvTitle.setText(news.getTitle());
  Log.e("String_Node_Str","String_Node_Str" + news.getTitle());
  String infoText=mContext.getString(R.string.site_name___time,news.getSiteName(),FormatUtils.getRelativeTimeSpanString(news.getPublishDate()));
  SpannableString spannableInfoText=new SpannableString(infoText);
  spannableInfoText.setSpan(new StyleSpan(Typeface.BOLD),0,news.getSiteName().length(),Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
  tvInfo.setText(spannableInfoText);
}
Program: 69146
Project: 69146
Buggy source:
@Inject CommonPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
  initEvent();
}

Fixed version (ground truth):
@Inject CommonPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
}
Program: 69147
Project: 69147
Buggy source:
@Override public void onAttatch(MainContract.View view){
  super.onAttatch(view);
  registerEvent();
}

Fixed version (ground truth):
@Override public void onAttatch(MainContract.View view){
  super.onAttatch(view);
  initEvent();
}
Program: 69148
Project: 69148
Buggy source:
@OnClick(R.id.txt_new) void onClick(){
  mTxtNew.setVisibility(View.GONE);
  if (!mRefreshLayout.isRefreshing()) {
    mRefreshLayout.setRefreshing(true);
    onRefresh();
  }
}

Fixed version (ground truth):
@OnClick(R.id.txt_new) void onClick(){
  mTxtNew.setVisibility(View.GONE);
  mRecyclerView.scrollToPosition(0);
  mRefreshLayout.setRefreshing(true);
  onRefresh();
}
Program: 69149
Project: 69149
Buggy source:
@Override public void onFabClick(){
  mRecyclerView.scrollToPosition(0);
  mTxtNew.setVisibility(View.GONE);
}

Fixed version (ground truth):
@Override public void onFabClick(){
  mRecyclerView.scrollToPosition(0);
}
Program: 69150
Project: 69150
Buggy source:
@Override public void bindData(DataListBean<TopicBean> data){
  if (null != data) {
    if (null != data.getData() && !data.getData().isEmpty()) {
      List<TopicBean> dataList=data.getData();
      if (isPullToRefresh) {
        mRefreshLayout.setRefreshing(false);
        mAdapter.setNewData(dataList);
      }
 else {
        mAdapter.addData(dataList);
        mAdapter.loadMoreComplete();
        mAdapter.setEnableLoadMore(true);
      }
    }
 else {
      if (isPullToRefresh) {
      }
 else {
        mAdapter.loadMoreEnd(false);
      }
    }
  }
 else {
    if (isPullToRefresh) {
    }
 else {
      mAdapter.loadMoreFail();
    }
  }
}

Fixed version (ground truth):
@Override public void bindData(DataListBean<TopicBean> data){
  if (null != data) {
    if (null != data.getData() && !data.getData().isEmpty()) {
      List<TopicBean> dataList=data.getData();
      if (isPullToRefresh) {
        mTxtNew.setVisibility(View.GONE);
        mRefreshLayout.setRefreshing(false);
        mAdapter.setNewData(dataList);
        mRecyclerView.scrollToPosition(0);
      }
 else {
        mAdapter.addData(dataList);
        mAdapter.loadMoreComplete();
        mAdapter.setEnableLoadMore(true);
      }
    }
 else {
      if (isPullToRefresh) {
      }
 else {
        mAdapter.loadMoreEnd(false);
      }
    }
  }
 else {
    if (isPullToRefresh) {
    }
 else {
      mAdapter.loadMoreFail();
    }
  }
}
Program: 69151
Project: 69151
Buggy source:
@Inject TopicPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
  initEvent();
}

Fixed version (ground truth):
@Inject TopicPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
}
Program: 69152
Project: 69152
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  performInject();
  if (null != mPresenter) {
    mPresenter.onAttatch(this);
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  performInject();
}
Program: 69153
Project: 69153
Buggy source:
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  mContentView=inflater.inflate(getLayoutId(),container,false);
  unBinder=ButterKnife.bind(this,mContentView);
  initView();
  initDataAndEvent();
  return mContentView;
}

Fixed version (ground truth):
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  mContentView=inflater.inflate(getLayoutId(),container,false);
  unBinder=ButterKnife.bind(this,mContentView);
  initView();
  return mContentView;
}
Program: 69154
Project: 69154
Buggy source:
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  if (mContentView == null) {
    mContentView=inflater.inflate(getLayoutId(),container,false);
  }
  unBinder=ButterKnife.bind(this,mContentView);
  initView();
  initDataAndEvent();
  ViewGroup parent=(ViewGroup)mContentView.getParent();
  if (parent != null) {
    parent.removeView(mContentView);
  }
  return mContentView;
}

Fixed version (ground truth):
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  if (mContentView == null) {
    mContentView=inflater.inflate(getLayoutId(),container,false);
  }
  unBinder=ButterKnife.bind(this,mContentView);
  initView();
  ViewGroup parent=(ViewGroup)mContentView.getParent();
  if (parent != null) {
    parent.removeView(mContentView);
  }
  return mContentView;
}
Program: 69155
Project: 69155
Buggy source:
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  mContentView=inflater.inflate(getLayoutId(),container,false);
  unBinder=ButterKnife.bind(this,mContentView);
  RxBus.getInstance().post(new SetDrawerStatusEvent(DrawerLayout.LOCK_MODE_LOCKED_CLOSED));
  initView();
  initDataAndEvent();
  return attachToSwipeBack(mContentView);
}

Fixed version (ground truth):
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  mContentView=inflater.inflate(getLayoutId(),container,false);
  unBinder=ButterKnife.bind(this,mContentView);
  RxBus.getInstance().post(new SetDrawerStatusEvent(DrawerLayout.LOCK_MODE_LOCKED_CLOSED));
  initView();
  return attachToSwipeBack(mContentView);
}
Program: 69156
Project: 69156
Buggy source:
void adjustLayoutSourceChildren(LinearLayout layoutSource,int count){
  if (layoutSource.getChildCount() < count) {
    int offset=count - layoutSource.getChildCount();
    for (int i=0; i < offset; i++) {
      View view;
      if (newsViewPool.isEmpty()) {
        view=mLayoutInflater.inflate(R.layout.item_topic_news,layoutSource,false);
      }
 else {
        view=newsViewPool.remove(0);
      }
      layoutSource.addView(view);
    }
  }
 else   if (layoutSource.getChildCount() > count) {
    int offset=layoutSource.getChildCount() - count;
    for (int i=0; i < offset; i++) {
      View view=layoutSource.getChildAt(0);
      layoutSource.removeView(view);
      newsViewPool.add(view);
    }
  }
}

Fixed version (ground truth):
void adjustLayoutSourceChildren(LinearLayout layoutSource,int count){
  if (layoutSource.getChildCount() < count) {
    int offset=count - layoutSource.getChildCount();
    for (int i=0; i < offset; i++) {
      View view;
      if (newsViewPool.isEmpty()) {
        view=mLayoutInflater.inflate(R.layout.item_topic_news,null,false);
      }
 else {
        view=newsViewPool.remove(0);
      }
      layoutSource.addView(view);
    }
  }
 else   if (layoutSource.getChildCount() > count) {
    int offset=layoutSource.getChildCount() - count;
    for (int i=0; i < offset; i++) {
      View view=layoutSource.getChildAt(0);
      layoutSource.removeView(view);
      newsViewPool.add(view);
    }
  }
}
Program: 69158
Project: 69158
Buggy source:
void bindData(@NonNull TopicNewsBean news){
  this.news=news;
  tvTitle.setText(news.getTitle());
  Log.e("String_Node_Str","String_Node_Str" + news.getTitle());
  String infoText=mContext.getString(R.string.site_name___time,news.getSiteName(),FormatUtils.getRelativeTimeSpanString(news.getPublishDate()));
  SpannableString spannableInfoText=new SpannableString(infoText);
  spannableInfoText.setSpan(new StyleSpan(Typeface.BOLD),0,news.getSiteName().length(),Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
  tvInfo.setText(spannableInfoText);
}

Fixed version (ground truth):
void bindData(@NonNull TopicNewsBean news){
  this.news=news;
  tvTitle.setText(news.getTitle());
  String infoText=mContext.getString(R.string.site_name___time,news.getSiteName(),FormatUtils.getRelativeTimeSpanString(news.getPublishDate()));
  SpannableString spannableInfoText=new SpannableString(infoText);
  spannableInfoText.setSpan(new StyleSpan(Typeface.BOLD),0,news.getSiteName().length(),Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
  tvInfo.setText(spannableInfoText);
}
Program: 69159
Project: 69159
Buggy source:
@Override public void initDataAndEvent(){
  mTopicId=Objects.requireNonNull(getArguments()).getString(Constants.BUNDLE_TOPIC_ID);
  initWebSettings();
  mPresenter.getTopicInstantRead(mTopicId);
}

Fixed version (ground truth):
@Override public void initDataAndEvent(){
  mTopicId=Objects.requireNonNull(getArguments()).getString(Constants.BUNDLE_TOPIC_ID);
  initWebSettings();
}
Program: 69160
Project: 69160
Buggy source:
void onFabClick();

Fixed version (ground truth):
void onFabClick(int currentPageIndex);
Program: 69161
Project: 69161
Buggy source:
@Override public void onFabClick(){
  mRecyclerView.scrollToPosition(0);
  if (!mRefreshLayout.isRefreshing()) {
    mRefreshLayout.setRefreshing(true);
    onRefresh();
  }
}

Fixed version (ground truth):
@Override public void onFabClick(int currentPageIndex){
  if ((mNewsType == NewsBean.TYPE_NEWS && currentPageIndex == 1) || (mNewsType == NewsBean.TYPE_TECHNEWS && currentPageIndex == 2) || (mNewsType == NewsBean.TYPE_BLOCKCHAIN && currentPageIndex == 3)) {
    mRecyclerView.scrollToPosition(0);
    if (!mRefreshLayout.isRefreshing()) {
      mRefreshLayout.setRefreshing(true);
      onRefresh();
    }
  }
}
Program: 69162
Project: 69162
Buggy source:
private void initEvent(){
  addSubscribe(RxBus.getInstance().toFlowable(FabClickEvent.class).subscribe(fabClickEvent -> getView().onFabClick()));
}

Fixed version (ground truth):
private void initEvent(){
  addSubscribe(RxBus.getInstance().toFlowable(FabClickEvent.class).subscribe(fabClickEvent -> getView().onFabClick(fabClickEvent.getCurrentItemIndex())));
}
Program: 69163
Project: 69163
Buggy source:
@OnClick(R.id.fab) void onFabClick(){
  RxBus.getInstance().post(new FabClickEvent());
}

Fixed version (ground truth):
@OnClick(R.id.fab) void onFabClick(){
  RxBus.getInstance().post(new FabClickEvent(mViewPager.getCurrentItem()));
}
Program: 69164
Project: 69164
Buggy source:
private void initEvent(){
  addSubscribe(RxBus.getInstance().toFlowable(FabClickEvent.class).subscribe(fabClickEvent -> getView().onFabClick()));
}

Fixed version (ground truth):
private void initEvent(){
  addSubscribe(RxBus.getInstance().toFlowable(FabClickEvent.class).filter(fabClickEvent -> fabClickEvent.getCurrentItemIndex() == 0).subscribe(fabClickEvent -> getView().onFabClick()));
}
Program: 69165
Project: 69165
Buggy source:
@Override public void onDestroy(){
  super.onDestroy();
  if (null != unBinder) {
    unBinder.unbind();
  }
  Log.e("String_Node_Str",System.currentTimeMillis() + "String_Node_Str");
  Observable.timer(50,TimeUnit.MILLISECONDS).subscribe(timeout -> RxBus.getInstance().post(new SetDrawerStatusEvent(DrawerLayout.LOCK_MODE_UNDEFINED)));
}

Fixed version (ground truth):
@Override public void onDestroy(){
  super.onDestroy();
  if (null != unBinder) {
    unBinder.unbind();
  }
}
Program: 69166
Project: 69166
Buggy source:
@Override public void onDestroyView(){
  Log.e("String_Node_Str",System.currentTimeMillis() + "String_Node_Str");
  super.onDestroyView();
}

Fixed version (ground truth):
@Override public void onDestroyView(){
  super.onDestroyView();
  Observable.timer(50,TimeUnit.MILLISECONDS).subscribe(timeout -> RxBus.getInstance().post(new SetDrawerStatusEvent(DrawerLayout.LOCK_MODE_UNDEFINED)));
}
Program: 69167
Project: 69167
Buggy source:
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View view=inflater.inflate(getLayoutId(),container,false);
  unBinder=ButterKnife.bind(this,view);
  initView();
  initDataAndEvent();
  return attachToSwipeBack(view);
}

Fixed version (ground truth):
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View view=inflater.inflate(getLayoutId(),container,false);
  unBinder=ButterKnife.bind(this,view);
  RxBus.getInstance().post(new SetDrawerStatusEvent(DrawerLayout.LOCK_MODE_LOCKED_CLOSED));
  initView();
  initDataAndEvent();
  return attachToSwipeBack(view);
}
Program: 69168
Project: 69168
Buggy source:
@Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_web,container,false);
  ButterKnife.bind(this,view);
  mUrl=getArguments().getString(Constants.EXTRA_TOPIC_URL);
  return attachToSwipeBack(view);
}

Fixed version (ground truth):
@Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_web,container,false);
  ButterKnife.bind(this,view);
  RxBus.getInstance().post(new SetDrawerStatusEvent(DrawerLayout.LOCK_MODE_LOCKED_CLOSED));
  mUrl=getArguments().getString(Constants.EXTRA_TOPIC_URL);
  return attachToSwipeBack(view);
}
Program: 69169
Project: 69169
Buggy source:
public static void openInBrowser(@NonNull Activity context,@NonNull String url){
  new CustomTabsIntent.Builder().setToolbarColor(ResourceUtil.getThemeAttrColor(context,R.attr.readhubStatus)).build().launchUrl(context,Uri.parse(url));
}

Fixed version (ground truth):
public static void openInBrowser(@NonNull Activity context,@NonNull String url){
  String useableUrl=RegularUtil.matchWebSite(url);
  if (!TextUtils.isEmpty(useableUrl)) {
    new CustomTabsIntent.Builder().setToolbarColor(ResourceUtil.getThemeAttrColor(context,R.attr.readhubStatus)).build().launchUrl(context,Uri.parse(useableUrl));
  }
}
Program: 69170
Project: 69170
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  if (LeakCanary.isInAnalyzerProcess(this)) {
    return;
  }
  sInstance=this;
  String packageName=this.getPackageName();
  String processName=getProcessName(android.os.Process.myPid());
  CrashReport.UserStrategy strategy=new CrashReport.UserStrategy(this);
  strategy.setUploadProcess(processName == null || processName.equals(packageName));
  Beta.storageDir=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
  Beta.canShowUpgradeActs.add(MainActivity.class);
  Bugly.init(sInstance,"String_Node_Str",false,strategy);
  LeakCanary.install(this);
  AppStatusTracker.init(this);
  AndroidThreeTen.init(this);
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  if (LeakCanary.isInAnalyzerProcess(this)) {
    return;
  }
  sInstance=this;
  String packageName=this.getPackageName();
  String processName=getProcessName(android.os.Process.myPid());
  CrashReport.UserStrategy strategy=new CrashReport.UserStrategy(this);
  strategy.setUploadProcess(processName == null || processName.equals(packageName));
  Beta.storageDir=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
  Beta.autoCheckUpgrade=false;
  Beta.canShowUpgradeActs.add(MainActivity.class);
  Bugly.init(sInstance,"String_Node_Str",false,strategy);
  LeakCanary.install(this);
  AppStatusTracker.init(this);
  AndroidThreeTen.init(this);
}
Program: 69171
Project: 69171
Buggy source:
@Override public void onAttatch(V view){
  this.weakView=new WeakReference<>(view);
  proxyView=(V)Proxy.newProxyInstance(view.getClass().getClassLoader(),view.getClass().getInterfaces(),new MyInvocationHandler(this.weakView.get()));
  initEvent();
}

Fixed version (ground truth):
@Override public void onAttatch(V view){
  this.weakView=new WeakReference<>(view);
  proxyView=(V)Proxy.newProxyInstance(view.getClass().getClassLoader(),view.getClass().getInterfaces(),new MyInvocationHandler(this.weakView.get()));
}
Program: 69172
Project: 69172
Buggy source:
@Inject CommonPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
}

Fixed version (ground truth):
@Inject CommonPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
  initEvent();
}
Program: 69173
Project: 69173
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ButterKnife.bind(this);
  Beta.checkUpgrade();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  ButterKnife.bind(this);
}
Program: 69174
Project: 69174
Buggy source:
@Override public void initDataAndEvent(){
  ObjectAnimator desAnim=ObjectAnimator.ofFloat(mAppDes,"String_Node_Str",-500f,0f);
  desAnim.setDuration(700);
  desAnim.setInterpolator(new DecelerateInterpolator());
  desAnim.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationStart(    Animator animation){
      mAppName.setVisibility(View.INVISIBLE);
    }
    @Override public void onAnimationEnd(    Animator animation){
      mAppName.setVisibility(View.VISIBLE);
    }
  }
);
  ObjectAnimator nameAnim=ObjectAnimator.ofFloat(mAppName,"String_Node_Str",-500f,0f);
  nameAnim.setDuration(2000);
  nameAnim.setInterpolator(new BounceInterpolator());
  nameAnim.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      Observable.timer(1,TimeUnit.SECONDS).subscribe(aLong -> go2Main());
    }
  }
);
  AnimatorSet animSet=new AnimatorSet();
  animSet.play(nameAnim).after(desAnim);
  animSet.start();
}

Fixed version (ground truth):
@Override public void initDataAndEvent(){
  ObjectAnimator desAnim=ObjectAnimator.ofFloat(mAppDes,"String_Node_Str",-500f,0f);
  desAnim.setDuration(700);
  desAnim.setInterpolator(new DecelerateInterpolator());
  desAnim.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationStart(    Animator animation){
      mAppName.setVisibility(View.INVISIBLE);
    }
    @Override public void onAnimationEnd(    Animator animation){
      mAppName.setVisibility(View.VISIBLE);
    }
  }
);
  ObjectAnimator nameAnim=ObjectAnimator.ofFloat(mAppName,"String_Node_Str",-500f,0f);
  nameAnim.setDuration(2000);
  nameAnim.setInterpolator(new BounceInterpolator());
  nameAnim.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      Observable.timer(500,TimeUnit.MILLISECONDS).subscribe(aLong -> go2Main());
    }
  }
);
  AnimatorSet animSet=new AnimatorSet();
  animSet.play(nameAnim).after(desAnim);
  animSet.start();
}
Program: 69175
Project: 69175
Buggy source:
@Override public void onAnimationEnd(Animator animation){
  Observable.timer(1,TimeUnit.SECONDS).subscribe(aLong -> go2Main());
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animator animation){
  Observable.timer(500,TimeUnit.MILLISECONDS).subscribe(aLong -> go2Main());
}
Program: 69176
Project: 69176
Buggy source:
@Inject TopicPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
}

Fixed version (ground truth):
@Inject TopicPresenter(DataManager dataManager){
  super(dataManager);
  this.mDataManager=dataManager;
  initEvent();
}
Program: 69177
Project: 69177
Buggy source:
@OnClick(R.id.img_close) void onCloseClick(){
  dismiss();
}

Fixed version (ground truth):
@OnClick(R.id.imb_close) void onCloseClick(){
  dismiss();
}
Program: 69178
Project: 69178
Buggy source:
@Override public void initView(){
  Rect displayRectangle=new Rect();
  Objects.requireNonNull(getDialog().getWindow()).getDecorView().getWindowVisibleDisplayFrame(displayRectangle);
  FrameLayout.LayoutParams params=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,(int)(displayRectangle.height() * 0.8f));
  mContentWrapper.setLayoutParams(params);
}

Fixed version (ground truth):
@Override public void initView(){
}