nus-yam/ex-repair huggingface dataset:
Program: 174037
Project: 174037
Buggy source:
private void $$arezi$$_link_myEntity(){
  if (Arez.shouldCheckApiInvariants()) {
    Guards.apiInvariant(() -> ComponentState.isActive(this.$$arezi$$_state),() -> "String_Node_Str" + ComponentState.describe(this.$$arezi$$_state) + "String_Node_Str"+ $$arezi$$_name()+ "String_Node_Str");
  }
  final String id=this.getMyEntityId();
  if (null != id) {
    this.$$arezr$$_myEntity=this.$$arezi$$_locator().findById(EagerLoadNulableObservableReferenceModel.MyEntity.class,id);
    if (Arez.shouldCheckApiInvariants()) {
      Guards.apiInvariant(() -> null != $$arezr$$_myEntity,() -> "String_Node_Str" + $$arezi$$_name() + "String_Node_Str"+ getMyEntityId());
    }
  }
}

Fixed version (ground truth):
private void $$arezi$$_link_myEntity(){
  if (Arez.shouldCheckApiInvariants()) {
    Guards.apiInvariant(() -> ComponentState.isActive(this.$$arezi$$_state),() -> "String_Node_Str" + ComponentState.describe(this.$$arezi$$_state) + "String_Node_Str"+ $$arezi$$_name()+ "String_Node_Str");
  }
  final String id=this.getMyEntityId();
  if (null != id) {
    this.$$arezr$$_myEntity=this.$$arezi$$_locator().findById(EagerLoadNulableObservableReferenceModel.MyEntity.class,id);
    if (Arez.shouldCheckApiInvariants()) {
      Guards.apiInvariant(() -> null != $$arezr$$_myEntity,() -> "String_Node_Str" + $$arezi$$_name() + "String_Node_Str"+ getMyEntityId());
    }
  }
 else {
    this.$$arezr$$_myEntity=null;
  }
}
Program: 174038
Project: 174038
Buggy source:
@SuppressWarnings("String_Node_Str") @Test public void disallowNullInSetter() throws Throwable {
  final Model model=Model.create(ValueUtil.randomString());
  assertThrows(AssertionError.class,() -> model.setLastName(null));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Test public void disallowNullInSetter() throws Throwable {
  final Model model=Model.create(ValueUtil.randomString());
  Arez.context().safeAction(() -> assertThrows(AssertionError.class,() -> model.setLastName(null)));
}
Program: 174039
Project: 174039
Buggy source:
/** 
 * Set the entity that this reference points to.
 * @param entity the associated entity.
 */
@Observable protected void setEntity(@Nullable final T entity){
  if (null != _entry) {
    detachEntry(_entry,false);
  }
  if (null == entity) {
    _entry=null;
  }
 else {
    _entry=createEntityEntry(entity,reference -> detachEntry(reference,false));
  }
}

Fixed version (ground truth):
/** 
 * Set the entity that this reference points to.
 * @param entity the associated entity.
 */
@Observable protected void setEntity(@Nullable final T entity){
  if (null != _entry) {
    detachEntry(_entry,false);
  }
  if (null == entity) {
    _entry=null;
  }
 else {
    _entry=createEntityEntry(entity,reference -> setEntity(null));
  }
}
Program: 174040
Project: 174040
Buggy source:
@Nullable static PackageElement getPackageElement(@Nonnull final TypeElement element){
  Element enclosingElement=element.getEnclosingElement();
  while (null != enclosingElement) {
    if (enclosingElement instanceof PackageElement) {
      return (PackageElement)enclosingElement;
    }
  }
  return null;
}

Fixed version (ground truth):
@Nullable static PackageElement getPackageElement(@Nonnull final TypeElement element){
  Element enclosingElement=element.getEnclosingElement();
  while (null != enclosingElement) {
    if (enclosingElement instanceof PackageElement) {
      return (PackageElement)enclosingElement;
    }
    enclosingElement=enclosingElement.getEnclosingElement();
  }
  return null;
}
Program: 174041
Project: 174041
Buggy source:
@Override public void doStuff(final long time){
  if (Arez.shouldCheckApiInvariants()) {
    Guards.apiInvariant(() -> ComponentState.isActive(this.$$arezi$$_state),() -> "String_Node_Str" + ComponentState.describe(this.$$arezi$$_state) + "String_Node_Str"+ $$arezi$$_name()+ "String_Node_Str");
  }
  try {
    $$arezi$$_context().safeAction(Arez.areNamesEnabled() ? $$arezi$$_name() + "String_Node_Str" : null,true,() -> super.doStuff(time),time);
  }
 catch (  final RuntimeException|Error $$arez_exception$$) {
    throw $$arez_exception$$;
  }
catch (  final Throwable $$arez_exception$$) {
    throw new IllegalStateException($$arez_exception$$);
  }
}

Fixed version (ground truth):
@Override void doStuff(final long time){
  if (Arez.shouldCheckApiInvariants()) {
    Guards.apiInvariant(() -> ComponentState.isActive(this.$$arezi$$_state),() -> "String_Node_Str" + ComponentState.describe(this.$$arezi$$_state) + "String_Node_Str"+ $$arezi$$_name()+ "String_Node_Str");
  }
  try {
    $$arezi$$_context().safeAction(Arez.areNamesEnabled() ? $$arezi$$_name() + "String_Node_Str" : null,true,() -> super.doStuff(time),time);
  }
 catch (  final RuntimeException|Error $$arez_exception$$) {
    throw $$arez_exception$$;
  }
catch (  final Throwable $$arez_exception$$) {
    throw new IllegalStateException($$arez_exception$$);
  }
}
Program: 174042
Project: 174042
Buggy source:
@Override public void doStuff(final long time){
  if (Arez.shouldCheckApiInvariants()) {
    Guards.apiInvariant(() -> ComponentState.isActive(this.$$arezi$$_state),() -> "String_Node_Str" + ComponentState.describe(this.$$arezi$$_state) + "String_Node_Str"+ $$arezi$$_name()+ "String_Node_Str");
  }
  try {
    $$arezi$$_context().safeAction(Arez.areNamesEnabled() ? $$arezi$$_name() + "String_Node_Str" : null,true,() -> super.doStuff(time),time);
  }
 catch (  final RuntimeException|Error $$arez_exception$$) {
    throw $$arez_exception$$;
  }
catch (  final Throwable $$arez_exception$$) {
    throw new IllegalStateException($$arez_exception$$);
  }
}

Fixed version (ground truth):
@Override void doStuff(final long time){
  if (Arez.shouldCheckApiInvariants()) {
    Guards.apiInvariant(() -> ComponentState.isActive(this.$$arezi$$_state),() -> "String_Node_Str" + ComponentState.describe(this.$$arezi$$_state) + "String_Node_Str"+ $$arezi$$_name()+ "String_Node_Str");
  }
  try {
    $$arezi$$_context().safeAction(Arez.areNamesEnabled() ? $$arezi$$_name() + "String_Node_Str" : null,true,() -> super.doStuff(time),time);
  }
 catch (  final RuntimeException|Error $$arez_exception$$) {
    throw $$arez_exception$$;
  }
catch (  final Throwable $$arez_exception$$) {
    throw new IllegalStateException($$arez_exception$$);
  }
}
Program: 174043
Project: 174043
Buggy source:
@Action public void doStuff(final long time){
}

Fixed version (ground truth):
@Action void doStuff(final long time){
}
Program: 174044
Project: 174044
Buggy source:
@Action public void doStuff(final long time){
}

Fixed version (ground truth):
@Action void doStuff(final long time){
}
Program: 174046
Project: 174046
Buggy source:
private static void enumerateMethods(@Nonnull final TypeElement scope,@Nonnull final Types typeUtils,@Nonnull final TypeElement element,@Nonnull final Map<String,ExecutableElement> methods){
  final TypeMirror superclass=element.getSuperclass();
  if (TypeKind.NONE != superclass.getKind()) {
    enumerateMethods(scope,typeUtils,(TypeElement)((DeclaredType)superclass).asElement(),methods);
  }
  for (  final TypeMirror interfaceType : element.getInterfaces()) {
    final TypeElement interfaceElement=(TypeElement)((DeclaredType)interfaceType).asElement();
    enumerateMethods(scope,typeUtils,interfaceElement,methods);
  }
  for (  final Element member : element.getEnclosedElements()) {
    if (member.getKind() == ElementKind.METHOD) {
      final ExecutableType methodType=(ExecutableType)typeUtils.asMemberOf((DeclaredType)scope.asType(),member);
      methods.put(methodType.toString(),(ExecutableElement)member);
    }
  }
}

Fixed version (ground truth):
private static void enumerateMethods(@Nonnull final TypeElement scope,@Nonnull final Types typeUtils,@Nonnull final TypeElement element,@Nonnull final Map<String,ExecutableElement> methods){
  final TypeMirror superclass=element.getSuperclass();
  if (TypeKind.NONE != superclass.getKind()) {
    enumerateMethods(scope,typeUtils,(TypeElement)((DeclaredType)superclass).asElement(),methods);
  }
  for (  final TypeMirror interfaceType : element.getInterfaces()) {
    final TypeElement interfaceElement=(TypeElement)((DeclaredType)interfaceType).asElement();
    enumerateMethods(scope,typeUtils,interfaceElement,methods);
  }
  for (  final Element member : element.getEnclosedElements()) {
    if (member.getKind() == ElementKind.METHOD) {
      final ExecutableType methodType=(ExecutableType)typeUtils.asMemberOf((DeclaredType)scope.asType(),member);
      methods.put(member.getSimpleName() + methodType.toString(),(ExecutableElement)member);
    }
  }
}
Program: 174048
Project: 174048
Buggy source:
public static void main(final String[] args) throws Throwable {
  final ArezContext context=Arez.context();
  ExampleUtil.logAllErrors(context);
  context.getSpy().addSpyEventHandler(ExamplesSpyUtil::emitEvent);
  final CodeModel codeModel=CodeModel.create("String_Node_Str","String_Node_Str");
  final Observer observer=context.autorun("String_Node_Str",() -> System.out.println("String_Node_Str" + codeModel.getQualifiedName()));
  context.action("String_Node_Str",true,() -> codeModel.setQualifiedName("String_Node_Str"));
  context.action("String_Node_Str",true,() -> codeModel.setQualifiedName(null));
  context.action("String_Node_Str",true,() -> codeModel.setName("String_Node_Str"));
  observer.dispose();
  context.action("String_Node_Str",true,((Disposable)codeModel)::dispose);
}

Fixed version (ground truth):
public static void main(final String[] args) throws Throwable {
  final ArezContext context=Arez.context();
  ExampleUtil.logAllErrors(context);
  context.getSpy().addSpyEventHandler(ExamplesSpyUtil::emitEvent);
  final CodeModel codeModel=CodeModel.create("String_Node_Str","String_Node_Str");
  final Observer observer=context.autorun("String_Node_Str",() -> System.out.println("String_Node_Str" + codeModel.getQualifiedName()));
  context.action("String_Node_Str",true,() -> codeModel.setQualifiedName("String_Node_Str"));
  context.action("String_Node_Str",true,() -> codeModel.setQualifiedName(null));
  context.action("String_Node_Str",true,() -> codeModel.setName("String_Node_Str"));
  observer.dispose();
  context.action("String_Node_Str",true,() -> Disposable.dispose(codeModel));
}
Program: 174049
Project: 174049
Buggy source:
@BeforeMethod protected void beforeTest() throws Exception {
  final ArezConfig.DynamicProvider provider=getConfigProvider();
  provider.setEnableNames(true);
  provider.setVerboseErrorMessages(true);
  provider.setCheckInvariants(true);
  provider.setPurgeReactionsWhenRunawayDetected(false);
  provider.setEnforceTransactionType(true);
  provider.setEnableSpy(true);
  getProxyLogger().setLogger(new TestLogger());
  Arez.setProvider(null);
}

Fixed version (ground truth):
@BeforeMethod protected void beforeTest() throws Exception {
  final ArezConfig.DynamicProvider provider=getConfigProvider();
  provider.setEnableNames(true);
  provider.setVerboseErrorMessages(true);
  provider.setCheckInvariants(true);
  provider.setPurgeReactionsWhenRunawayDetected(false);
  provider.setEnforceTransactionType(true);
  provider.setEnableSpy(true);
  getProxyLogger().setLogger(null);
  Arez.setProvider(null);
}
Program: 174051
Project: 174051
Buggy source:
/** 
 * Create a new transaction.
 * @param name    the name of the transaction. Should be non-null if {@link ArezConfig#enableNames()} is true, false otherwise.
 * @param mode    the transaction mode.
 * @param tracker the observer that is tracking transaction if any.
 * @return the new transaction.
 */
Transaction beginTransaction(@Nullable final String name,@Nonnull final TransactionMode mode,@Nullable final Observer tracker){
  if (TransactionMode.READ_WRITE == mode && null != _transaction) {
    Guards.invariant(() -> TransactionMode.READ_WRITE == _transaction.getMode(),() -> String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",name,_transaction.getName(),mode.name()));
  }
  _transaction=new Transaction(this,_transaction,name,mode,tracker);
  _transaction.begin();
  return _transaction;
}

Fixed version (ground truth):
/** 
 * Create a new transaction.
 * @param name    the name of the transaction. Should be non-null if {@link ArezConfig#enableNames()} is true, false otherwise.
 * @param mode    the transaction mode.
 * @param tracker the observer that is tracking transaction if any.
 * @return the new transaction.
 */
Transaction beginTransaction(@Nullable final String name,@Nonnull final TransactionMode mode,@Nullable final Observer tracker){
  if (TransactionMode.READ_WRITE == mode && null != _transaction) {
    Guards.invariant(() -> TransactionMode.READ_WRITE == _transaction.getMode(),() -> String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",name,_transaction.getName(),_transaction.getMode().name()));
  }
  _transaction=new Transaction(this,_transaction,name,mode,tracker);
  _transaction.begin();
  return _transaction;
}
Program: 174055
Project: 174055
Buggy source:
public Room getRoom(long id){
  try {
    PreparedStatement statement=connection.prepareStatement("String_Node_Str",ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.setLong(1,id);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery()){
      if (results.next())       return bot.endlessBuilder.entityBuilder.createRoom(results);
 else       return null;
    }
   }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
public Room getRoom(long id){
  try {
    PreparedStatement statement=connection.prepareStatement("String_Node_Str",ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.setLong(1,id);
    statement.setLong(2,id);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery()){
      if (results.next())       return bot.endlessBuilder.entityBuilder.createRoom(results);
 else       return null;
    }
   }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",e);
    return null;
  }
}
Program: 174056
Project: 174056
Buggy source:
public void addMessage(Message msg,int amount){
  try {
    PreparedStatement statement=connection.prepareStatement("String_Node_Str",ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery()){
      results.moveToInsertRow();
      results.updateLong("String_Node_Str",msg.getIdLong());
      results.updateLong("String_Node_Str",msg.getTextChannel().getIdLong());
      results.updateLong("String_Node_Str",msg.getGuild().getIdLong());
      results.updateInt("String_Node_Str",amount);
      results.insertRow();
    }
   }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",msg.getIdLong(),msg.getTextChannel().getIdLong(),e);
  }
}

Fixed version (ground truth):
public void addMessage(Message msg,int amount){
  try {
    PreparedStatement statement=connection.prepareStatement("String_Node_Str",ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery()){
      if (!(results.next())) {
        results.moveToInsertRow();
        results.updateLong("String_Node_Str",msg.getIdLong());
        results.updateLong("String_Node_Str",msg.getTextChannel().getIdLong());
        results.updateLong("String_Node_Str",msg.getGuild().getIdLong());
        results.updateInt("String_Node_Str",amount);
        results.insertRow();
      }
    }
   }
 catch (  SQLException e) {
    LOG.error("String_Node_Str",msg.getIdLong(),msg.getTextChannel().getIdLong(),e);
  }
}
Program: 174060
Project: 174060
Buggy source:
CreateCmd(){
  this.name="String_Node_Str";
  this.aliases=new String[]{"String_Node_Str"};
  this.help="String_Node_Str";
  this.arguments="String_Node_Str";
  this.botPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.userPermissions=new Permission[]{Permission.MANAGE_EMOTES};
  this.parent=EmoteCmd.this;
}

Fixed version (ground truth):
CreateCmd(){
  this.name="String_Node_Str";
  this.aliases=new String[]{"String_Node_Str"};
  this.help="String_Node_Str";
  this.arguments="String_Node_Str";
  this.botPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.userPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.parent=EmoteCmd.this;
}
Program: 174061
Project: 174061
Buggy source:
RemoveCmd(){
  this.name="String_Node_Str";
  this.aliases=new String[]{"String_Node_Str"};
  this.help="String_Node_Str";
  this.arguments="String_Node_Str";
  this.botPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.userPermissions=new Permission[]{Permission.MANAGE_EMOTES};
  this.parent=EmoteCmd.this;
}

Fixed version (ground truth):
RemoveCmd(){
  this.name="String_Node_Str";
  this.aliases=new String[]{"String_Node_Str"};
  this.help="String_Node_Str";
  this.arguments="String_Node_Str";
  this.botPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.userPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.parent=EmoteCmd.this;
}
Program: 174062
Project: 174062
Buggy source:
StealCmd(){
  this.name="String_Node_Str";
  this.aliases=new String[]{"String_Node_Str"};
  this.help="String_Node_Str";
  this.arguments="String_Node_Str";
  this.botPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.userPermissions=new Permission[]{Permission.MANAGE_EMOTES};
  this.parent=EmoteCmd.this;
}

Fixed version (ground truth):
StealCmd(){
  this.name="String_Node_Str";
  this.aliases=new String[]{"String_Node_Str"};
  this.help="String_Node_Str";
  this.arguments="String_Node_Str";
  this.botPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.userPerms=new Permission[]{Permission.MANAGE_EMOTES};
  this.parent=EmoteCmd.this;
}
Program: 174063
Project: 174063
Buggy source:
private static String getEmote(Guild guild,int count,String emote){
  if (!(emote.equals("String_Node_Str")))   return guild.getEmoteById(emote).getAsMention();
  if (count < 5)   return "String_Node_Str";
 else   if (count > 5)   return "String_Node_Str";
 else   if (count > 15)   return "String_Node_Str";
 else   return "String_Node_Str";
}

Fixed version (ground truth):
private static String getEmote(Guild guild,int count,String emote){
  if (!(emote.startsWith("String_Node_Str")))   return guild.getEmoteById(emote).getAsMention();
  if (count < 5)   return "String_Node_Str";
 else   if (count > 5)   return "String_Node_Str";
 else   if (count > 15)   return "String_Node_Str";
 else   return "String_Node_Str";
}
Program: 174064
Project: 174064
Buggy source:
public void logKick(Action action,CommandEvent event,OffsetDateTime time,String reason,User target){
  if (!(bot.dataEnabled))   return;
  Guild guild=event.getGuild();
  GuildSettings gs=event.getClient().getSettingsFor(guild);
  TextChannel modlog=guild.getTextChannelById(gs.getModlog());
  User author=event.getAuthor();
  if (modlog == null || !(modlog.canTalk()) || LogUtils.isActionIgnored(action,modlog) || LogUtils.isIssuerIgnored(author.getIdLong(),modlog) || LogUtils.isTargetIgnored(target.getIdLong(),modlog))   return;
  Sender.sendMessage(modlog,FormatUtil.formatLogBan(BAN_FORMAT));
}

Fixed version (ground truth):
public void logKick(Action action,CommandEvent event,OffsetDateTime time,String reason,User target){
  if (!(bot.dataEnabled))   return;
  Guild guild=event.getGuild();
  GuildSettings gs=event.getClient().getSettingsFor(guild);
  TextChannel modlog=guild.getTextChannelById(gs.getModlog());
  User author=event.getAuthor();
  if (modlog == null || !(modlog.canTalk()) || LogUtils.isActionIgnored(action,modlog) || LogUtils.isIssuerIgnored(author.getIdLong(),modlog) || LogUtils.isTargetIgnored(target.getIdLong(),modlog))   return;
  Sender.sendMessage(modlog,FormatUtil.formatLogKick(BAN_FORMAT));
}
Program: 174065
Project: 174065
Buggy source:
public void setRoomMode(Guild guild,Room.Mode mode){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",guild.getId()))){
      if (mode == null) {
        if (results.next()) {
          results.updateNull("String_Node_Str");
          results.updateRow();
        }
      }
 else {
        if (results.next()) {
          results.updateString("String_Node_Str",mode.getName());
          results.updateRow();
        }
 else {
          results.moveToInsertRow();
          results.updateLong("String_Node_Str",guild.getIdLong());
          results.updateString("String_Node_Str",mode.name());
          results.insertRow();
        }
      }
      GuildSettingsImpl settings=(GuildSettingsImpl)bot.endless.getGuildSettings(guild);
      settings.setRoomMode(mode);
      if (bot.endless.getGuildSettingsById(guild.getIdLong()).isDefault())       ((EndlessCoreImpl)bot.endless).addSettings(guild,settings);
    }
   }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + guild.getId(),e);
  }
}

Fixed version (ground truth):
public void setRoomMode(Guild guild,Room.Mode mode){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",guild.getId()))){
      if (mode == null) {
        if (results.next()) {
          results.updateNull("String_Node_Str");
          results.updateRow();
        }
      }
 else {
        if (results.next()) {
          results.updateString("String_Node_Str",mode.name());
          results.updateRow();
        }
 else {
          results.moveToInsertRow();
          results.updateLong("String_Node_Str",guild.getIdLong());
          results.updateString("String_Node_Str",mode.name());
          results.insertRow();
        }
      }
      GuildSettingsImpl settings=(GuildSettingsImpl)bot.endless.getGuildSettings(guild);
      settings.setRoomMode(mode);
      if (bot.endless.getGuildSettingsById(guild.getIdLong()).isDefault())       ((EndlessCoreImpl)bot.endless).addSettings(guild,settings);
    }
   }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + guild.getId(),e);
  }
}
Program: 174066
Project: 174066
Buggy source:
public void removePunishment(long user,long guild,Const.PunishmentType type){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",user,guild,type.name()))){
      if (results.next()) {
        results.updateInt("String_Node_Str",0);
        results.updateRow();
      }
    }
     statement.executeUpdate(String.format("String_Node_Str",user,guild,type.name()));
    statement.closeOnCompletion();
  }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + user + "String_Node_Str"+ guild,e);
  }
}

Fixed version (ground truth):
public void removePunishment(long user,long guild,Const.PunishmentType type){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",user,guild,type.name()))){
      if (results.next())       results.deleteRow();
    }
     statement.executeUpdate(String.format("String_Node_Str",user,guild,type.name()));
    statement.closeOnCompletion();
  }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + user + "String_Node_Str"+ guild,e);
  }
}
Program: 174067
Project: 174067
Buggy source:
public void deleteMessage(Long msg,Long starboardMsg){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",msg))){
      if (results.next()) {
        results.updateLong("String_Node_Str",0);
        results.updateRow();
      }
    }
     statement.executeUpdate(String.format("String_Node_Str",starboardMsg));
    statement.closeOnCompletion();
  }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + msg + "String_Node_Str"+ starboardMsg,e);
  }
}

Fixed version (ground truth):
public void deleteMessage(Long msg,Long starboardMsg){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",msg))){
      if (results.next())       results.deleteRow();
    }
     statement.executeUpdate(String.format("String_Node_Str",starboardMsg));
    statement.closeOnCompletion();
  }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + msg + "String_Node_Str"+ starboardMsg,e);
  }
}
Program: 174068
Project: 174068
Buggy source:
@Override protected void executeCommand(CommandEvent event){
  if (!(event.getClient().getOwnerId().equals(String.valueOf(Const.ARTUTO_ID)))) {
    event.replyError("String_Node_Str");
    return;
  }
  if (event.getArgs().isEmpty()) {
    event.replyWarning("String_Node_Str");
    return;
  }
  User user;
  List<Member> list=FinderUtil.findMembers(event.getArgs(),event.getGuild());
  if (list.isEmpty()) {
    event.getJDA().retrieveUserById(event.getArgs()).queue(s -> {
      if (!(bot.ddm.hasDonated(s))) {
        bot.ddm.setDonation(s,null);
        event.replyError("String_Node_Str");
      }
 else {
        bot.ddm.setDonation(s,null);
        event.replySuccess(String.format("String_Node_Str",s));
      }
    }
,e -> event.replyError("String_Node_Str"));
  }
 else   if (list.size() > 1)   event.replyWarning(FormatUtil.listOfMembers(list,event.getArgs()));
 else {
    user=list.get(0).getUser();
    if (!(bot.ddm.hasDonated(user))) {
      bot.ddm.setDonation(user,null);
      event.replyError("String_Node_Str");
    }
 else {
      bot.ddm.setDonation(user,null);
      event.replySuccess(String.format("String_Node_Str",user));
    }
  }
}

Fixed version (ground truth):
@Override protected void executeCommand(CommandEvent event){
  if (!(event.getClient().getOwnerId().equals(String.valueOf(Const.ARTUTO_ID)))) {
    event.replyError("String_Node_Str");
    return;
  }
  if (event.getArgs().isEmpty()) {
    event.replyWarning("String_Node_Str");
    return;
  }
  User user;
  List<Member> list=FinderUtil.findMembers(event.getArgs(),event.getGuild());
  if (list.isEmpty()) {
    event.getJDA().retrieveUserById(event.getArgs()).queue(s -> {
      if (!(bot.ddm.hasDonated(s))) {
        bot.ddm.setDonation(s.getIdLong(),null);
        event.replyError("String_Node_Str");
      }
 else {
        bot.ddm.setDonation(s.getIdLong(),null);
        event.replySuccess(String.format("String_Node_Str",s));
      }
    }
,e -> event.replyError("String_Node_Str"));
  }
 else   if (list.size() > 1)   event.replyWarning(FormatUtil.listOfMembers(list,event.getArgs()));
 else {
    user=list.get(0).getUser();
    if (!(bot.ddm.hasDonated(user))) {
      bot.ddm.setDonation(user.getIdLong(),null);
      event.replyError("String_Node_Str");
    }
 else {
      bot.ddm.setDonation(user.getIdLong(),null);
      event.replySuccess(String.format("String_Node_Str",user));
    }
  }
}
Program: 174069
Project: 174069
Buggy source:
public List<User> getUsersThatDonated(JDA jda){
  try {
    Statement statement=connection.createStatement();
    statement.closeOnCompletion();
    List<User> users;
    try (ResultSet results=statement.executeQuery("String_Node_Str")){
      users=new LinkedList<>();
      while (results.next()) {
        jda.retrieveUserById(results.getLong("String_Node_Str")).queue(u -> {
          if (hasDonated(u))           users.add(u);
        }
,e -> {
        }
);
      }
    }
     return users;
  }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
public List<User> getUsersThatDonated(JDA jda){
  try {
    Statement statement=connection.createStatement();
    statement.closeOnCompletion();
    List<User> users;
    try (ResultSet results=statement.executeQuery("String_Node_Str")){
      users=new LinkedList<>();
      while (results.next()) {
        long id=results.getLong("String_Node_Str");
        jda.retrieveUserById(id).queue(u -> {
          if (hasDonated(u))           users.add(u);
        }
,e -> setDonation(id,null));
      }
    }
     return users;
  }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str",e);
    return null;
  }
}
Program: 174070
Project: 174070
Buggy source:
public void setDonation(User user,String amount){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",user.getId()))){
      if (results.next()) {
        results.updateString("String_Node_Str",amount);
        results.updateRow();
      }
 else {
        results.moveToInsertRow();
        results.updateLong("String_Node_Str",user.getIdLong());
        results.updateString("String_Node_Str",amount);
        results.insertRow();
      }
    }
   }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + user.getId(),e);
  }
}

Fixed version (ground truth):
public void setDonation(long user,String donation){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",user))){
      if (results.next()) {
        results.updateString("String_Node_Str",donation);
        results.updateRow();
      }
 else {
        results.moveToInsertRow();
        results.updateLong("String_Node_Str",user);
        results.updateString("String_Node_Str",donation);
        results.insertRow();
      }
    }
   }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + user,e);
  }
}
Program: 174071
Project: 174071
Buggy source:
public void setModlogChannel(Guild guild,TextChannel tc){
  try {
    Statement statement=connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    statement.closeOnCompletion();
    try (ResultSet results=statement.executeQuery(String.format("String_Node_Str",guild.getId()))){
      if (results.next()) {
        results.updateLong("String_Node_Str",tc == null ? null : tc.getIdLong());
        results.updateRow();
      }
 else {
        results.moveToInsertRow();
        results.updateLong("String_Node_Str",guild.getIdLong());
        results.updateLong("String_Node_Str",tc == null ? null : tc.getIdLong());
        results.insertRow();
      }
    }
   }
 catch (  SQLException e) {
    Database.LOG.error("String_Node_Str" + guild.getId(),e);
  }
}

Fixed version (ground truth):
public void setModlogChannel(Guild guild,TextChannel tc){
}
Program: 174072
Project: 174072
Buggy source:
public static String checkBadGuild(Guild guild){
  if (isBadGuild(guild)) {
    String msg="String_Node_Str" + guild.getName() + "String_Node_Str";
    TextChannel tc=FinderUtil.getDefaultChannel(guild);
    if (!(tc == null))     tc.sendMessage(msg).queue(null,(e) -> guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage(msg).queue()));
    guild.leave().queue();
    return "String_Node_Str";
  }
 else   if (isABotListGuild(guild)) {
    User owner=guild.getJDA().getUserById(bot.config.getOwnerId());
    guild.getJDA().getUserById("String_Node_Str").openPrivateChannel().queue(s -> s.sendMessage("String_Node_Str" + owner.getName() + "String_Node_Str"+ owner.getDiscriminator()+ "String_Node_Str"+ guild.getName()).queue());
    return "String_Node_Str";
  }
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public static String checkBadGuild(Guild guild){
  if (isBadGuild(guild)) {
    String msg="String_Node_Str" + guild.getName() + "String_Node_Str";
    TextChannel tc=FinderUtil.getDefaultChannel(guild);
    if (!(tc == null))     tc.sendMessage(msg).queue(null,(e) -> guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage(msg).queue(null,e2 -> {
    }
)));
    guild.leave().queue();
    return "String_Node_Str";
  }
 else   if (isABotListGuild(guild)) {
    User owner=guild.getJDA().getUserById(bot.config.getOwnerId());
    guild.getJDA().getUserById("String_Node_Str").openPrivateChannel().queue(s -> s.sendMessage("String_Node_Str" + owner.getName() + "String_Node_Str"+ owner.getDiscriminator()+ "String_Node_Str"+ guild.getName()).queue());
    return "String_Node_Str";
  }
 else   return "String_Node_Str";
}
Program: 174076
Project: 174076
Buggy source:
public void initializeData() throws SQLException {
  db=new DatabaseManager(config.getDatabaseUrl(),config.getDatabaseUsername(),config.getDatabasePassword());
  bdm=new BlacklistDataManager(db);
  ldm=new LoggingDataManager(db);
  jldm=new JLDataManager(db);
}

Fixed version (ground truth):
public static void initializeData() throws SQLException {
  db=new DatabaseManager(config.getDatabaseUrl(),config.getDatabaseUsername(),config.getDatabasePassword());
  bdm=new BlacklistDataManager(db);
  ldm=new LoggingDataManager(db);
  jldm=new JLDataManager(db);
}
Program: 174077
Project: 174077
Buggy source:
public JDA startJda() throws LoginException, RateLimitedException, InterruptedException {
  jda=new JDABuilder(AccountType.BOT).setToken(config.getToken()).setStatus(OnlineStatus.DO_NOT_DISTURB).setGame(Game.of(Const.GAME_0)).addEventListener(waiter).addEventListener(createClient()).addEventListener(bot).addEventListener(new Endless()).addEventListener(new Logging(config)).addEventListener(new GuildBlacklist()).addEventListener(new ServerLogging(ldm)).addEventListener(new GuildEvents(config)).addEventListener(new UserEvents(config)).buildBlocking();
  return jda;
}

Fixed version (ground truth):
public static JDA startJda() throws LoginException, RateLimitedException, InterruptedException {
  jda=new JDABuilder(AccountType.BOT).setToken(config.getToken()).setStatus(OnlineStatus.DO_NOT_DISTURB).setGame(Game.of(Const.GAME_0)).addEventListener(waiter).addEventListener(createClient()).addEventListener(bot).addEventListener(new Endless()).addEventListener(new Logging(config)).addEventListener(new GuildBlacklist()).addEventListener(new ServerLogging(ldm,jldm)).addEventListener(new GuildEvents(config)).addEventListener(new UserEvents(config)).buildBlocking();
  return jda;
}
Program: 174078
Project: 174078
Buggy source:
public void main(String[] args) throws IOException, SQLException, LoginException, RateLimitedException, InterruptedException {
  log.setLevel(Level.INFO);
  LOG.info("String_Node_Str" + Const.VERSION + "String_Node_Str");
  LOG.info("String_Node_Str");
  try {
    config=new Config();
  }
 catch (  Exception e) {
    LOG.fatal("String_Node_Str");
    e.printStackTrace();
    return;
  }
  LOG.info("String_Node_Str");
  initializeData();
  LOG.info("String_Node_Str");
  LOG.info("String_Node_Str");
  startJda();
  LOG.info("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException, SQLException, LoginException, RateLimitedException, InterruptedException {
  log.setLevel(Level.INFO);
  LOG.info("String_Node_Str" + Const.VERSION + "String_Node_Str");
  LOG.info("String_Node_Str");
  try {
    config=new Config();
    LOG.info("String_Node_Str");
  }
 catch (  Exception e) {
    LOG.fatal("String_Node_Str");
    e.printStackTrace();
    return;
  }
  LOG.info("String_Node_Str");
  initializeData();
  LOG.info("String_Node_Str");
  LOG.info("String_Node_Str");
  startJda();
}
Program: 174079
Project: 174079
Buggy source:
@Override public void onReady(ReadyEvent event){
  LOG.info("String_Node_Str");
  GuildUtils.leaveBadGuilds(jda);
  LOG.info("String_Node_Str");
  SimpleLog LOG=SimpleLog.getLog("String_Node_Str");
  User selfuser=event.getJDA().getSelfUser();
  User owner=event.getJDA().getUserById(config.getOwnerId());
  String selfname=selfuser.getName() + "String_Node_Str" + selfuser.getDiscriminator();
  String selfid=selfuser.getId();
  String ownername=owner.getName() + "String_Node_Str" + owner.getDiscriminator();
  String ownerid=owner.getId();
  LOG.info("String_Node_Str");
  LOG.info("String_Node_Str" + selfname + "String_Node_Str"+ selfid+ "String_Node_Str");
  LOG.info("String_Node_Str" + config.getPrefix());
  LOG.info("String_Node_Str" + ownername + "String_Node_Str"+ ownerid+ "String_Node_Str");
  event.getJDA().getPresence().setGame(Game.of("String_Node_Str" + config.getPrefix() + "String_Node_Str"+ Const.VERSION+ "String_Node_Str"+ event.getJDA().getGuilds().size()+ "String_Node_Str"+ event.getJDA().getUsers().size()+ "String_Node_Str"+ event.getJDA().getTextChannels().size()+ "String_Node_Str"));
  if (event.getJDA().getGuilds().isEmpty()) {
    SimpleLog.getLog("String_Node_Str").warn("String_Node_Str");
    SimpleLog.getLog("String_Node_Str").warn(event.getJDA().asBot().getInviteUrl(Permission.ADMINISTRATOR));
  }
}

Fixed version (ground truth):
@Override public void onReady(ReadyEvent event){
  LOG.info("String_Node_Str");
  GuildUtils.leaveBadGuilds(event.getJDA());
  LOG.info("String_Node_Str");
  SimpleLog LOG=SimpleLog.getLog("String_Node_Str");
  User selfuser=event.getJDA().getSelfUser();
  User owner=event.getJDA().getUserById(config.getOwnerId());
  String selfname=selfuser.getName() + "String_Node_Str" + selfuser.getDiscriminator();
  String selfid=selfuser.getId();
  String ownername=owner.getName() + "String_Node_Str" + owner.getDiscriminator();
  String ownerid=owner.getId();
  LOG.info("String_Node_Str");
  LOG.info("String_Node_Str" + selfname + "String_Node_Str"+ selfid+ "String_Node_Str");
  LOG.info("String_Node_Str" + config.getPrefix());
  LOG.info("String_Node_Str" + ownername + "String_Node_Str"+ ownerid+ "String_Node_Str");
  event.getJDA().getPresence().setGame(Game.of("String_Node_Str" + config.getPrefix() + "String_Node_Str"+ Const.VERSION+ "String_Node_Str"+ event.getJDA().getGuilds().size()+ "String_Node_Str"+ event.getJDA().getUsers().size()+ "String_Node_Str"+ event.getJDA().getTextChannels().size()+ "String_Node_Str"));
  if (event.getJDA().getGuilds().isEmpty()) {
    SimpleLog.getLog("String_Node_Str").warn("String_Node_Str");
    SimpleLog.getLog("String_Node_Str").warn(event.getJDA().asBot().getInviteUrl(Permission.ADMINISTRATOR));
  }
}
Program: 174080
Project: 174080
Buggy source:
public Welcome(LoggingDataManager db){
  this.db=db;
  this.name="String_Node_Str";
  this.children=new Command[]{new Change(db)};
  this.aliases=new String[]{"String_Node_Str","String_Node_Str"};
  this.help="String_Node_Str";
  this.category=Categories.TOOLS;
  this.botPermissions=new Permission[]{Permission.MESSAGE_WRITE};
  this.userPermissions=new Permission[]{Permission.MESSAGE_WRITE};
  this.ownerCommand=false;
  this.guildOnly=true;
}

Fixed version (ground truth):
public Welcome(JLDataManager db){
  this.db=db;
  this.name="String_Node_Str";
  this.children=new Command[]{new Change()};
  this.aliases=new String[]{"String_Node_Str","String_Node_Str"};
  this.help="String_Node_Str";
  this.category=Categories.TOOLS;
  this.botPermissions=new Permission[]{Permission.MESSAGE_WRITE};
  this.userPermissions=new Permission[]{Permission.MESSAGE_WRITE};
  this.ownerCommand=false;
  this.guildOnly=true;
}
Program: 174081
Project: 174081
Buggy source:
public Change(LoggingDataManager db){
  this.db=db;
  this.name="String_Node_Str";
  this.help="String_Node_Str";
  this.category=Categories.TOOLS;
  this.botPermissions=new Permission[]{Permission.MESSAGE_WRITE};
  this.userPermissions=new Permission[]{Permission.MANAGE_SERVER};
  this.ownerCommand=false;
  this.guildOnly=true;
}

Fixed version (ground truth):
public Change(){
  this.name="String_Node_Str";
  this.help="String_Node_Str";
  this.category=Categories.TOOLS;
  this.botPermissions=new Permission[]{Permission.MESSAGE_WRITE};
  this.userPermissions=new Permission[]{Permission.MANAGE_SERVER};
  this.ownerCommand=false;
  this.guildOnly=true;
}
Program: 174083
Project: 174083
Buggy source:
public ServerLogging(LoggingDataManager db){
  ServerLogging.db=db;
  this.parser=new ParserBuilder().addMethods(Variables.getMethods()).setMaxOutput(2000).setMaxIterations(1000).build();
}

Fixed version (ground truth):
public ServerLogging(LoggingDataManager ldm,JLDataManager jldm){
  ServerLogging.ldm=ldm;
  this.jldm=jldm;
  this.parser=new ParserBuilder().addMethods(Variables.getMethods()).setMaxOutput(2000).setMaxIterations(1000).build();
}
Program: 174085
Project: 174085
Buggy source:
@Override public void onGuildMessageReceived(GuildMessageReceivedEvent event){
  TextChannel tc=db.getServerlogChannel(event.getGuild());
  if (!(tc == null) && !(event.getAuthor().isBot()))   MessagesLogging.addMessage(event.getMessage().getIdLong(),event.getMessage());
}

Fixed version (ground truth):
@Override public void onGuildMessageReceived(GuildMessageReceivedEvent event){
  TextChannel tc=ldm.getServerlogChannel(event.getGuild());
  if (!(tc == null) && !(event.getAuthor().isBot()))   MessagesLogging.addMessage(event.getMessage().getIdLong(),event.getMessage());
}
Program: 174086
Project: 174086
Buggy source:
@Override public void onGuildMemberLeave(GuildMemberLeaveEvent event){
  Guild guild=event.getGuild();
  TextChannel tc=db.getServerlogChannel(guild);
  TextChannel channel=FinderUtil.getDefaultChannel(event.getGuild());
  User oldmember=event.getMember().getUser();
  Calendar calendar=GregorianCalendar.getInstance();
  calendar.setTime(new Date());
  String hour=String.format("String_Node_Str",calendar.get(Calendar.HOUR_OF_DAY));
  String min=String.format("String_Node_Str",calendar.get(Calendar.MINUTE));
  String sec=String.format("String_Node_Str",calendar.get(Calendar.SECOND));
  if (!(tc == null)) {
    if (!(tc.getGuild().getSelfMember().hasPermission(tc,Permission.MESSAGE_READ,Permission.MESSAGE_WRITE,Permission.MESSAGE_EMBED_LINKS,Permission.MESSAGE_HISTORY)))     guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue(null,(e) -> channel.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue()));
 else     tc.sendMessage("String_Node_Str" + hour + "String_Node_Str"+ min+ "String_Node_Str"+ sec+ "String_Node_Str"+ oldmember.getName()+ "String_Node_Str"+ oldmember.getDiscriminator()+ "String_Node_Str"+ oldmember.getId()+ "String_Node_Str"+ guild.getMembers().size()+ "String_Node_Str").queue();
  }
}

Fixed version (ground truth):
@Override public void onGuildMemberLeave(GuildMemberLeaveEvent event){
  Guild guild=event.getGuild();
  TextChannel tc=ldm.getServerlogChannel(guild);
  TextChannel channel=FinderUtil.getDefaultChannel(event.getGuild());
  User oldmember=event.getMember().getUser();
  Calendar calendar=GregorianCalendar.getInstance();
  calendar.setTime(new Date());
  String hour=String.format("String_Node_Str",calendar.get(Calendar.HOUR_OF_DAY));
  String min=String.format("String_Node_Str",calendar.get(Calendar.MINUTE));
  String sec=String.format("String_Node_Str",calendar.get(Calendar.SECOND));
  if (!(tc == null)) {
    if (!(tc.getGuild().getSelfMember().hasPermission(tc,Permission.MESSAGE_READ,Permission.MESSAGE_WRITE,Permission.MESSAGE_EMBED_LINKS,Permission.MESSAGE_HISTORY)))     guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue(null,(e) -> channel.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue()));
 else     tc.sendMessage("String_Node_Str" + hour + "String_Node_Str"+ min+ "String_Node_Str"+ sec+ "String_Node_Str"+ oldmember.getName()+ "String_Node_Str"+ oldmember.getDiscriminator()+ "String_Node_Str"+ oldmember.getId()+ "String_Node_Str"+ guild.getMembers().size()+ "String_Node_Str").queue();
  }
}
Program: 174087
Project: 174087
Buggy source:
@Override public void onGuildVoiceMove(GuildVoiceMoveEvent event){
  Guild guild=event.getGuild();
  TextChannel tc=db.getServerlogChannel(guild);
  TextChannel channel=FinderUtil.getDefaultChannel(event.getGuild());
  VoiceChannel vcold=event.getChannelLeft();
  VoiceChannel vcnew=event.getChannelJoined();
  User user=event.getMember().getUser();
  Calendar calendar=GregorianCalendar.getInstance();
  calendar.setTime(new Date());
  String hour=String.format("String_Node_Str",calendar.get(Calendar.HOUR_OF_DAY));
  String min=String.format("String_Node_Str",calendar.get(Calendar.MINUTE));
  String sec=String.format("String_Node_Str",calendar.get(Calendar.SECOND));
  if (!(tc == null) && !(user.isBot())) {
    if (!(tc.getGuild().getSelfMember().hasPermission(tc,Permission.MESSAGE_READ,Permission.MESSAGE_WRITE,Permission.MESSAGE_EMBED_LINKS,Permission.MESSAGE_HISTORY)))     guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue(null,(e) -> channel.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue()));
 else     tc.sendMessage("String_Node_Str" + hour + "String_Node_Str"+ min+ "String_Node_Str"+ sec+ "String_Node_Str"+ user.getName()+ "String_Node_Str"+ user.getDiscriminator()+ "String_Node_Str"+ vcold.getName()+ "String_Node_Str"+ vcnew.getName()+ "String_Node_Str").queue();
  }
}

Fixed version (ground truth):
@Override public void onGuildVoiceMove(GuildVoiceMoveEvent event){
  Guild guild=event.getGuild();
  TextChannel tc=ldm.getServerlogChannel(guild);
  TextChannel channel=FinderUtil.getDefaultChannel(event.getGuild());
  VoiceChannel vcold=event.getChannelLeft();
  VoiceChannel vcnew=event.getChannelJoined();
  User user=event.getMember().getUser();
  Calendar calendar=GregorianCalendar.getInstance();
  calendar.setTime(new Date());
  String hour=String.format("String_Node_Str",calendar.get(Calendar.HOUR_OF_DAY));
  String min=String.format("String_Node_Str",calendar.get(Calendar.MINUTE));
  String sec=String.format("String_Node_Str",calendar.get(Calendar.SECOND));
  if (!(tc == null) && !(user.isBot())) {
    if (!(tc.getGuild().getSelfMember().hasPermission(tc,Permission.MESSAGE_READ,Permission.MESSAGE_WRITE,Permission.MESSAGE_EMBED_LINKS,Permission.MESSAGE_HISTORY)))     guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue(null,(e) -> channel.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue()));
 else     tc.sendMessage("String_Node_Str" + hour + "String_Node_Str"+ min+ "String_Node_Str"+ sec+ "String_Node_Str"+ user.getName()+ "String_Node_Str"+ user.getDiscriminator()+ "String_Node_Str"+ vcold.getName()+ "String_Node_Str"+ vcnew.getName()+ "String_Node_Str").queue();
  }
}