Program: 15498
Project: 15498
Buggy source:
/** 
 * If retry is enabled, wrap the bridge channel in another that will invoke send() within the scope of a retry template.
 * @param name The name.
 * @param bridgeToModuleChannel The channel.
 * @param properties The properties.
 * @return The channel, or a wrapper.
 */
private MessageChannel addRetryIfNeeded(final String name,final DirectChannel bridgeToModuleChannel,RedisPropertiesAccessor properties){
  final RetryTemplate retryTemplate=buildRetryTemplateIfRetryEnabled(properties);
  if (retryTemplate == null) {
    return bridgeToModuleChannel;
  }
 else {
    DirectChannel channel=new DirectChannel(){
      @Override protected boolean doSend(      final Message<?> message,      final long timeout){
        try {
          return retryTemplate.execute(new RetryCallback<Boolean,Exception>(){
            @Override public Boolean doWithRetry(            RetryContext context) throws Exception {
              return bridgeToModuleChannel.send(message,timeout);
            }
          }
,new RecoveryCallback<Boolean>(){
            /** 
 * Send the failed message to 'ERRORS:[name]'.
 */
            @Override public Boolean recover(            RetryContext context) throws Exception {
              logger.error("String_Node_Str",context.getLastThrowable());
              errorAdapter.handleMessage(getMessageBuilderFactory().fromMessage(message).setHeader(ERROR_HEADER,"String_Node_Str" + name).build());
              return true;
            }
          }
);
        }
 catch (        Exception e) {
          logger.error("String_Node_Str",e);
          return false;
        }
      }
    }
;
    channel.setBeanName(name + "String_Node_Str");
    return channel;
  }
}

Fixed version (ground truth):
/** 
 * If retry is enabled, wrap the bridge channel in another that will invoke send() within the scope of a retry template.
 * @param name The name.
 * @param bridgeToModuleChannel The channel.
 * @param properties The properties.
 * @return The channel, or a wrapper.
 */
private MessageChannel addRetryIfNeeded(final String name,final DirectChannel bridgeToModuleChannel,RedisPropertiesAccessor properties){
  final RetryTemplate retryTemplate=buildRetryTemplateIfRetryEnabled(properties);
  if (retryTemplate == null) {
    return bridgeToModuleChannel;
  }
 else {
    DirectChannel channel=new DirectChannel(){
      @Override protected boolean doSend(      final Message<?> message,      final long timeout){
        try {
          return retryTemplate.execute(new RetryCallback<Boolean,Exception>(){
            @Override public Boolean doWithRetry(            RetryContext context) throws Exception {
              return bridgeToModuleChannel.send(message,timeout);
            }
          }
,new RecoveryCallback<Boolean>(){
            /** 
 * Send the failed message to 'ERRORS:[name]'.
 */
            @Override public Boolean recover(            RetryContext context) throws Exception {
              logger.error("String_Node_Str" + name + "String_Node_Str"+ context.getLastThrowable());
              errorAdapter.handleMessage(getMessageBuilderFactory().fromMessage(message).setHeader(ERROR_HEADER,"String_Node_Str" + name).build());
              return true;
            }
          }
);
        }
 catch (        Exception e) {
          logger.error("String_Node_Str",e);
          return false;
        }
      }
    }
;
    channel.setBeanName(name + "String_Node_Str");
    return channel;
  }
}