nus-yam/ex-repair huggingface dataset:
Program: 90745
Project: 90745
Buggy source:
/** 
 * Returns a FlumeAvroManager.
 * @param agents The agents to use.
 * @param batchSize The number of events to include in a batch.
 * @return A FlumeAvroManager.
 */
public static FlumeAvroManager getManager(final String name,final Agent[] agents,int batchSize){
  if (agents == null || agents.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (batchSize <= 0) {
    batchSize=1;
  }
  final StringBuilder sb=new StringBuilder("String_Node_Str");
  boolean first=true;
  for (  final Agent agent : agents) {
    if (!first) {
      sb.append("String_Node_Str");
    }
    sb.append(agent.getHost()).append("String_Node_Str").append(agent.getPort());
    first=false;
  }
  sb.append("String_Node_Str");
  return (FlumeAvroManager)getManager(sb.toString(),factory,new FactoryData(name,agents,batchSize));
}

Fixed version (ground truth):
/** 
 * Returns a FlumeAvroManager.
 * @param name The name of the manager.
 * @param agents The agents to use.
 * @param batchSize The number of events to include in a batch.
 * @return A FlumeAvroManager.
 */
public static FlumeAvroManager getManager(final String name,final Agent[] agents,int batchSize){
  if (agents == null || agents.length == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (batchSize <= 0) {
    batchSize=1;
  }
  final StringBuilder sb=new StringBuilder("String_Node_Str");
  boolean first=true;
  for (  final Agent agent : agents) {
    if (!first) {
      sb.append("String_Node_Str");
    }
    sb.append(agent.getHost()).append("String_Node_Str").append(agent.getPort());
    first=false;
  }
  sb.append("String_Node_Str");
  return (FlumeAvroManager)getManager(sb.toString(),factory,new FactoryData(name,agents,batchSize));
}
Program: 90748
Project: 90748
Buggy source:
public void stop(){
  logger.info("String_Node_Str");
  supervisor.stop();
  lifecycleState=LifecycleState.STOP;
}

Fixed version (ground truth):
public void stop(){
  LOGGER.info("String_Node_Str");
  supervisor.stop();
  lifecycleState=LifecycleState.STOP;
}
Program: 90749
Project: 90749
Buggy source:
public void start(){
  Preconditions.checkState(nodeManager != null,"String_Node_Str");
  supervisor.start();
  logger.info("String_Node_Str");
  supervisor.supervise(nodeManager,new LifecycleSupervisor.SupervisorPolicy.AlwaysRestartPolicy(),LifecycleState.START);
  lifecycleState=LifecycleState.START;
}

Fixed version (ground truth):
public void start(){
  Preconditions.checkState(nodeManager != null,"String_Node_Str");
  supervisor.start();
  LOGGER.info("String_Node_Str");
  supervisor.supervise(nodeManager,new LifecycleSupervisor.SupervisorPolicy.AlwaysRestartPolicy(),LifecycleState.START);
  lifecycleState=LifecycleState.START;
}
Program: 90750
Project: 90750
Buggy source:
@Override public synchronized void stop(){
  super.stop();
  logger.info("String_Node_Str",sourceCounter);
}

Fixed version (ground truth):
@Override public synchronized void stop(){
  super.stop();
  LOGGER.info("String_Node_Str",sourceCounter);
}
Program: 90751
Project: 90751
Buggy source:
@Override public synchronized void start(){
  super.start();
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void start(){
  super.start();
  LOGGER.info("String_Node_Str");
}
Program: 90752
Project: 90752
Buggy source:
public void send(final FlumeEvent event){
  sourceCounter.incrementAppendReceivedCount();
  sourceCounter.incrementEventReceivedCount();
  try {
    getChannelProcessor().processEvent(event);
  }
 catch (  final ChannelException ex) {
    logger.warn("String_Node_Str" + event,ex);
    throw ex;
  }
  sourceCounter.incrementAppendAcceptedCount();
  sourceCounter.incrementEventAcceptedCount();
}

Fixed version (ground truth):
public void send(final FlumeEvent event){
  sourceCounter.incrementAppendReceivedCount();
  sourceCounter.incrementEventReceivedCount();
  try {
    getChannelProcessor().processEvent(event);
  }
 catch (  final ChannelException ex) {
    LOGGER.warn("String_Node_Str" + event,ex);
    throw ex;
  }
  sourceCounter.incrementAppendAcceptedCount();
  sourceCounter.incrementEventAcceptedCount();
}
Program: 90753
Project: 90753
Buggy source:
@Override protected void log(final Marker marker,final String fqcn,final Level level,final Message data,final Throwable t){
  if (locationAwareLogger != null) {
    if (data instanceof LoggerNameAwareMessage) {
      ((LoggerNameAwareMessage)data).setLoggerName(getName());
    }
    locationAwareLogger.log(getMarker(marker),fqcn,convertLevel(level),data.getFormattedMessage(),data.getParameters(),t);
  }
 else {
switch (level) {
case DEBUG:
      logger.debug(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
case TRACE:
    logger.trace(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
case INFO:
  logger.info(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
case WARN:
logger.warn(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
case ERROR:
logger.error(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
default :
logger.error(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
}
}
}

Fixed version (ground truth):
@Override protected void log(final Marker marker,final String fqcn,final Level level,final Message data,final Throwable t){
  if (locationAwareLogger != null) {
    if (data instanceof LoggerNameAwareMessage) {
      ((LoggerNameAwareMessage)data).setLoggerName(getName());
    }
    locationAwareLogger.log(getMarker(marker),fqcn,convertLevel(level),data.getFormattedMessage(),data.getParameters(),t);
  }
 else {
switch (level) {
case DEBUG:
      logger.debug(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
    break;
case TRACE:
  logger.trace(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
break;
case INFO:
logger.info(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
break;
case WARN:
logger.warn(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
break;
case ERROR:
logger.error(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
break;
default :
logger.error(getMarker(marker),data.getFormattedMessage(),data.getParameters(),t);
break;
}
}
}
Program: 90754
Project: 90754
Buggy source:
public LoggerContext getContext(final String FQCN,final ClassLoader loader,final boolean currentContext){
  return context;
}

Fixed version (ground truth):
public LoggerContext getContext(final String fqcn,final ClassLoader loader,final boolean currentContext){
  return context;
}
Program: 90755
Project: 90755
Buggy source:
/** 
 * Creates   {@link StringFormattedMessage} instances.
 * @see MessageFactory#newMessage(String,Object)
 */
@Override public Message newMessage(final String message,final Object... params){
  return new FormattedMessage(message,params);
}

Fixed version (ground truth):
/** 
 * Creates   {@link StringFormattedMessage} instances.
 * @param message The message format.
 * @param params Message parameters.
 * @return The Message object.
 * @see MessageFactory#newMessage(String,Object)
 */
@Override public Message newMessage(final String message,final Object... params){
  return new FormattedMessage(message,params);
}
Program: 90756
Project: 90756
Buggy source:
/** 
 * Creates   {@link org.apache.logging.log4j.message.StringFormattedMessage} instances.
 * @see org.apache.logging.log4j.message.MessageFactory#newMessage(String,Object)
 */
@Override public Message newMessage(final String message,final Object... params){
  if (bundle == null) {
    return new LocalizedMessage(bundleId,message,params);
  }
  return new LocalizedMessage(bundle,message,params);
}

Fixed version (ground truth):
/** 
 * Creates   {@link org.apache.logging.log4j.message.StringFormattedMessage} instances.
 * @param message The message format String.
 * @param params The parameters for the message.
 * @return The Message.
 * @see org.apache.logging.log4j.message.MessageFactory#newMessage(String,Object)
 */
@Override public Message newMessage(final String message,final Object... params){
  if (bundle == null) {
    return new LocalizedMessage(bundleId,message,params);
  }
  return new LocalizedMessage(bundle,message,params);
}
Program: 90757
Project: 90757
Buggy source:
/** 
 * Creates   {@link org.apache.logging.log4j.message.StringFormattedMessage} instances.
 * @see org.apache.logging.log4j.message.MessageFactory#newMessage(String,Object)
 */
@Override public Message newMessage(final String message,final Object... params){
  return new MessageFormatMessage(message,params);
}

Fixed version (ground truth):
/** 
 * Creates   {@link org.apache.logging.log4j.message.StringFormattedMessage} instances.
 * @param message The message pattern.
 * @param params Parameters to the message.
 * @return The Message.
 * @see org.apache.logging.log4j.message.MessageFactory#newMessage(String,Object)
 */
@Override public Message newMessage(final String message,final Object... params){
  return new MessageFormatMessage(message,params);
}
Program: 90758
Project: 90758
Buggy source:
/** 
 * Set the name of this appender. The name is used by other components to identify this appender.
 * @since 0.8.1
 */
public void setName(String name);

Fixed version (ground truth):
/** 
 * Set the name of this appender. The name is used by other components to identify this appender.
 * @param name The appender name.
 * @since 0.8.1
 */
void setName(String name);
Program: 90759
Project: 90759
Buggy source:
/** 
 * Returns the head Filter. The Filters are organized in a linked list and so all Filters on this Appender are available through the result.
 * @return the head Filter or null, if no Filters are present
 * @since 1.1
 */
public Filter getFilter();

Fixed version (ground truth):
/** 
 * Returns the head Filter. The Filters are organized in a linked list and so all Filters on this Appender are available through the result.
 * @return the head Filter or null, if no Filters are present
 * @since 1.1
 */
Filter getFilter();
Program: 90760
Project: 90760
Buggy source:
/** 
 * Returns the   {@link ErrorHandler} for this appender.
 * @since 1.1
 */
public ErrorHandler getErrorHandler();

Fixed version (ground truth):
/** 
 * Returns the   {@link ErrorHandler} for this appender.
 * @return The error handler.
 * @since 1.1
 */
ErrorHandler getErrorHandler();
Program: 90761
Project: 90761
Buggy source:
/** 
 * Returns this appenders layout.
 * @since 1.1
 */
public Layout getLayout();

Fixed version (ground truth):
/** 
 * Returns this appenders layout.
 * @return the Layout.
 * @since 1.1
 */
Layout getLayout();
Program: 90762
Project: 90762
Buggy source:
/** 
 * Get the name of this appender.
 * @return name, may be null.
 */
public String getName();

Fixed version (ground truth):
/** 
 * Get the name of this appender.
 * @return name, may be null.
 */
String getName();
Program: 90763
Project: 90763
Buggy source:
/** 
 * Log in <code>Appender</code> specific way. When appropriate, Loggers will call the <code>doAppend</code> method of appender implementations in order to log.
 */
public void doAppend(LoggingEvent event);

Fixed version (ground truth):
/** 
 * Log in <code>Appender</code> specific way. When appropriate, Loggers will call the <code>doAppend</code> method of appender implementations in order to log.
 * @param event The LoggingEvent.
 */
void doAppend(LoggingEvent event);
Program: 90764
Project: 90764
Buggy source:
/** 
 * Set the   {@link ErrorHandler} for this appender.
 * @since 0.9.0
 */
public void setErrorHandler(ErrorHandler errorHandler);

Fixed version (ground truth):
/** 
 * Set the   {@link ErrorHandler} for this appender.
 * @param errorHandler The error handler.
 * @since 0.9.0
 */
void setErrorHandler(ErrorHandler errorHandler);
Program: 90765
Project: 90765
Buggy source:
/** 
 * Add a filter to the end of the filter list.
 * @since 0.9.0
 */
void addFilter(Filter newFilter);

Fixed version (ground truth):
/** 
 * Add a filter to the end of the filter list.
 * @param newFilter The filter to add.
 * @since 0.9.0
 */
void addFilter(Filter newFilter);
Program: 90766
Project: 90766
Buggy source:
/** 
 * Configurators call this method to determine if the appender requires a layout. If this method returns   {@code true}, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal.  If this method returns   {@code false}, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator.. <p/> <p>In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return   {@code true}.
 * @since 0.8.4
 */
public boolean requiresLayout();

Fixed version (ground truth):
/** 
 * Configurators call this method to determine if the appender requires a layout. If this method returns   {@code true}, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal.  If this method returns   {@code false}, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator.. <p/> <p>In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return   {@code true}.
 * @return true if a Layout is required.
 * @since 0.8.4
 */
boolean requiresLayout();
Program: 90767
Project: 90767
Buggy source:
/** 
 * Clear the list of filters by removing all the filters in it.
 * @since 0.9.0
 */
public void clearFilters();

Fixed version (ground truth):
/** 
 * Clear the list of filters by removing all the filters in it.
 * @since 0.9.0
 */
void clearFilters();
Program: 90768
Project: 90768
Buggy source:
/** 
 * Set the   {@link Layout} for this appender.
 * @since 0.8.1
 */
public void setLayout(Layout layout);

Fixed version (ground truth):
/** 
 * Set the   {@link Layout} for this appender.
 * @param layout The Layout.
 * @since 0.8.1
 */
void setLayout(Layout layout);
Program: 90769
Project: 90769
Buggy source:
/** 
 * Release any resources allocated within the appender such as file handles, network connections, etc. <p/> <p>It is a programming error to append to a closed appender.
 * @since 0.8.4
 */
public void close();

Fixed version (ground truth):
/** 
 * Release any resources allocated within the appender such as file handles, network connections, etc. <p/> <p>It is a programming error to append to a closed appender.
 * @since 0.8.4
 */
void close();
Program: 90770
Project: 90770
Buggy source:
/** 
 * No-op implementation.
 */
public static void configure(final Appender appender){
}

Fixed version (ground truth):
/** 
 * No-op implementation.
 * @param appender The appender.
 */
public static void configure(final Appender appender){
}
Program: 90771
Project: 90771
Buggy source:
/** 
 * Returns all the currently defined categories in the default hierarchy as an   {@link java.util.Enumeration Enumeration}. <p>The root category is <em>not</em> included in the returned  {@link Enumeration}.
 * @deprecated Please use {@link LogManager#getCurrentLoggers()} instead.
 */
@Deprecated public static Enumeration getCurrentCategories(){
  return LogManager.getCurrentLoggers();
}

Fixed version (ground truth):
/** 
 * Returns all the currently defined categories in the default hierarchy as an   {@link java.util.Enumeration Enumeration}. <p>The root category is <em>not</em> included in the returned  {@link Enumeration}.
 * @return and Enumeration of the Categories.
 * @deprecated Please use {@link LogManager#getCurrentLoggers()} instead.
 */
@Deprecated public static Enumeration getCurrentCategories(){
  return LogManager.getCurrentLoggers();
}
Program: 90772
Project: 90772
Buggy source:
/** 
 * Is the appender passed as parameter attached to this category?
 * @param appender The Appender to add.
 */
public boolean isAttached(final Appender appender){
  return false;
}

Fixed version (ground truth):
/** 
 * Is the appender passed as parameter attached to this category?
 * @param appender The Appender to add.
 * @return true if the appender is attached.
 */
public boolean isAttached(final Appender appender){
  return false;
}
Program: 90773
Project: 90773
Buggy source:
/** 
 * Returns the footer for the layout format. The base class returns <code>null</code>.
 */
public String getFooter(){
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the footer for the layout format. The base class returns <code>null</code>.
 * @return The footer.
 */
public String getFooter(){
  return null;
}
Program: 90774
Project: 90774
Buggy source:
/** 
 * Implement this method to create your own layout format.
 */
public abstract String format(LoggingEvent event);

Fixed version (ground truth):
/** 
 * Implement this method to create your own layout format.
 * @param event The LoggingEvent.
 * @return The formatted LoggingEvent.
 */
public abstract String format(LoggingEvent event);
Program: 90775
Project: 90775
Buggy source:
/** 
 * Returns the content type output by this layout. The base class returns "text/plain".
 */
public String getContentType(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Returns the content type output by this layout. The base class returns "text/plain".
 * @return the type of content rendered by the Layout.
 */
public String getContentType(){
  return "String_Node_Str";
}
Program: 90776
Project: 90776
Buggy source:
/** 
 * If the layout handles the throwable object contained within  {@link LoggingEvent}, then the layout should return  {@code false}. Otherwise, if the layout ignores throwable object, then the layout should return   {@code true}. If ignoresThrowable is true, the appender is responsible for rendering the throwable. <p/> <p>The   {@link SimpleLayout},   {@link TTCCLayout},   {@link PatternLayout} all return {@code true}. The   {@link org.apache.log4j.xml.XMLLayout} returns {@code false}.
 * @since 0.8.4
 */
public abstract boolean ignoresThrowable();

Fixed version (ground truth):
/** 
 * If the layout handles the throwable object contained within  {@link LoggingEvent}, then the layout should return  {@code false}. Otherwise, if the layout ignores throwable object, then the layout should return   {@code true}. If ignoresThrowable is true, the appender is responsible for rendering the throwable. <p/> <p>The   {@link SimpleLayout},   {@link TTCCLayout},   {@link PatternLayout} all return {@code true}. The   {@link org.apache.log4j.xml.XMLLayout} returns {@code false}.
 * @return true if the Layout ignores Throwables.
 * @since 0.8.4
 */
public abstract boolean ignoresThrowable();
Program: 90777
Project: 90777
Buggy source:
/** 
 * Returns the header for the layout format. The base class returns <code>null</code>.
 */
public String getHeader(){
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the header for the layout format. The base class returns <code>null</code>.
 * @return The header.
 */
public String getHeader(){
  return null;
}
Program: 90778
Project: 90778
Buggy source:
/** 
 * No-op implementation.
 * @param selector The RepositorySelector.
 * @param guard prevents calls at the incorrect time.
 * @throws IllegalArgumentException
 */
public static void setRepositorySelector(final RepositorySelector selector,final Object guard) throws IllegalArgumentException {
}

Fixed version (ground truth):
/** 
 * No-op implementation.
 * @param selector The RepositorySelector.
 * @param guard prevents calls at the incorrect time.
 * @throws IllegalArgumentException if a parameter is invalid.
 */
public static void setRepositorySelector(final RepositorySelector selector,final Object guard) throws IllegalArgumentException {
}
Program: 90779
Project: 90779
Buggy source:
/** 
 * Set the next filter pointer.
 */
public void setNext(final Filter next){
  this.next=next;
}

Fixed version (ground truth):
/** 
 * Set the next filter pointer.
 * @param next The next Filter.
 */
public void setNext(final Filter next){
  this.next=next;
}
Program: 90780
Project: 90780
Buggy source:
/** 
 * <p>If the decision is <code>DENY</code>, then the event will be dropped. If the decision is <code>NEUTRAL</code>, then the next filter, if any, will be invoked. If the decision is ACCEPT then the event will be logged without consulting with other filters in the chain.
 * @param event The LoggingEvent to decide upon.
 * @return decision The decision of the filter.
 */
abstract public int decide(LoggingEvent event);

Fixed version (ground truth):
/** 
 * <p>If the decision is <code>DENY</code>, then the event will be dropped. If the decision is <code>NEUTRAL</code>, then the next filter, if any, will be invoked. If the decision is ACCEPT then the event will be logged without consulting with other filters in the chain.
 * @param event The LoggingEvent to decide upon.
 * @return decision The decision of the filter.
 */
public abstract int decide(LoggingEvent event);
Program: 90781
Project: 90781
Buggy source:
/** 
 * Return the pointer to the next filter;
 */
public Filter getNext(){
  return next;
}

Fixed version (ground truth):
/** 
 * Return the pointer to the next filter.
 * @return The next Filter.
 */
public Filter getNext(){
  return next;
}
Program: 90782
Project: 90782
Buggy source:
public abstract void resetConfiguration();

Fixed version (ground truth):
abstract void resetConfiguration();
Program: 90783
Project: 90783
Buggy source:
/** 
 * Add a   {@link HierarchyEventListener} event to the repository.
 */
public void addHierarchyEventListener(HierarchyEventListener listener);

Fixed version (ground truth):
/** 
 * Add a   {@link HierarchyEventListener} event to the repository.
 */
void addHierarchyEventListener(HierarchyEventListener listener);
Program: 90784
Project: 90784
Buggy source:
public Logger getLogger(String name,LoggerFactory factory);

Fixed version (ground truth):
Logger getLogger(String name,LoggerFactory factory);
Program: 90785
Project: 90785
Buggy source:
/** 
 * Another form of   {@link #setThreshold(Level)} accepting a stringparameter instead of a <code>Level</code>.
 */
public void setThreshold(String val);

Fixed version (ground truth):
/** 
 * Another form of   {@link #setThreshold(Level)} accepting a stringparameter instead of a <code>Level</code>.
 */
void setThreshold(String val);
Program: 90786
Project: 90786
Buggy source:
public abstract void fireAddAppenderEvent(Category logger,Appender appender);

Fixed version (ground truth):
abstract void fireAddAppenderEvent(Category logger,Appender appender);
Program: 90787
Project: 90787
Buggy source:
/** 
 * Deprecated. Please use   {@link #getCurrentLoggers} instead.
 */
public Enumeration getCurrentCategories();

Fixed version (ground truth):
/** 
 * Deprecated. Please use   {@link #getCurrentLoggers} instead.
 */
Enumeration getCurrentCategories();
Program: 90788
Project: 90788
Buggy source:
public abstract Logger exists(String name);

Fixed version (ground truth):
abstract Logger exists(String name);
Program: 90789
Project: 90789
Buggy source:
/** 
 * Get the repository-wide threshold. See   {@link #setThreshold(Level)} for an explanation.
 */
public Level getThreshold();

Fixed version (ground truth):
/** 
 * Get the repository-wide threshold. See   {@link #setThreshold(Level)} for an explanation.
 */
Level getThreshold();
Program: 90790
Project: 90790
Buggy source:
public Enumeration getCurrentLoggers();

Fixed version (ground truth):
Enumeration getCurrentLoggers();
Program: 90791
Project: 90791
Buggy source:
public Logger getRootLogger();

Fixed version (ground truth):
Logger getRootLogger();
Program: 90792
Project: 90792
Buggy source:
public abstract void shutdown();

Fixed version (ground truth):
abstract void shutdown();
Program: 90793
Project: 90793
Buggy source:
public void emitNoAppenderWarning(Category cat);

Fixed version (ground truth):
void emitNoAppenderWarning(Category cat);
Program: 90794
Project: 90794
Buggy source:
/** 
 * Returns a   {@link org.apache.log4j.spi.LoggerRepository} depending on thecontext. Implementors must make sure that a valid (non-null) LoggerRepository is returned.
 */
public LoggerRepository getLoggerRepository();

Fixed version (ground truth):
/** 
 * Returns a   {@link org.apache.log4j.spi.LoggerRepository} depending on thecontext. Implementors must make sure that a valid (non-null) LoggerRepository is returned.
 * @return a LoggerRepository.
 */
LoggerRepository getLoggerRepository();
Program: 90795
Project: 90795
Buggy source:
/** 
 * Returns this appender's layout.
 * @return the Layout for the Appender or null if none is configured.
 * @issue LOG4J2-36 Refactor into Channel
 */
Layout<T> getLayout();

Fixed version (ground truth):
/** 
 * Returns this appender's layout.
 * @return the Layout for the Appender or null if none is configured.
 */
Layout<T> getLayout();
Program: 90796
Project: 90796
Buggy source:
/** 
 * Cause a reconfiguration to take place when the underlying configuration file changes.
 * @param reconfigurable The Configuration that can be reconfigured.
 */
public synchronized void onChange(final Reconfigurable reconfigurable){
  logger.debug("String_Node_Str" + name);
  final Configuration config=reconfigurable.reconfigure();
  if (config != null) {
    setConfiguration(config);
    logger.debug("String_Node_Str");
  }
 else {
    logger.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Cause a reconfiguration to take place when the underlying configuration file changes.
 * @param reconfigurable The Configuration that can be reconfigured.
 */
public synchronized void onChange(final Reconfigurable reconfigurable){
  LOGGER.debug("String_Node_Str" + name);
  final Configuration config=reconfigurable.reconfigure();
  if (config != null) {
    setConfiguration(config);
    LOGGER.debug("String_Node_Str");
  }
 else {
    LOGGER.debug("String_Node_Str");
  }
}
Program: 90797
Project: 90797
Buggy source:
/** 
 * Obtain a Logger from the Context.
 * @param name The name of the Logger to return.
 * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change the logger but will log a warning if mismatched.
 * @return The Logger.
 */
public Logger getLogger(final String name,final MessageFactory messageFactory){
  Logger logger=loggers.get(name);
  if (logger != null) {
    AbstractLogger.checkMessageFactory(logger,messageFactory);
    return logger;
  }
  logger=newInstance(this,name,messageFactory);
  final Logger prev=loggers.putIfAbsent(name,logger);
  return prev == null ? logger : prev;
}

Fixed version (ground truth):
/** 
 * Obtain a Logger from the Context.
 * @param name The name of the Logger to return.
 * @param messageFactory The message factory is used only when creating a logger, subsequent use does not changethe logger but will log a warning if mismatched.
 * @return The Logger.
 */
public Logger getLogger(final String name,final MessageFactory messageFactory){
  Logger logger=loggers.get(name);
  if (logger != null) {
    AbstractLogger.checkMessageFactory(logger,messageFactory);
    return logger;
  }
  logger=newInstance(this,name,messageFactory);
  final Logger prev=loggers.putIfAbsent(name,logger);
  return prev == null ? logger : prev;
}
Program: 90798
Project: 90798
Buggy source:
/** 
 * Reconfigure the context.
 */
public synchronized void reconfigure(){
  logger.debug("String_Node_Str" + name);
  final Configuration instance=ConfigurationFactory.getInstance().getConfiguration(name,configLocation);
  setConfiguration(instance);
  logger.debug("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Reconfigure the context.
 */
public synchronized void reconfigure(){
  LOGGER.debug("String_Node_Str" + name);
  final Configuration instance=ConfigurationFactory.getInstance().getConfiguration(name,configLocation);
  setConfiguration(instance);
  LOGGER.debug("String_Node_Str");
}
Program: 90799
Project: 90799
Buggy source:
/** 
 * Retrieves a Manager if it has been previously created or creates a new Manager.
 * @param name The name of the Manager to retrieve.
 * @param factory The Factory to use to create the Manager.
 * @param data An Object that should be passed to the factory when creating the Manager.
 * @param < M > The Type of the Manager to be created.
 * @return A Manager with the specified name and type.
 */
public static <M extends AbstractManager,T>M getManager(final String name,final ManagerFactory<M,T> factory,final T data){
  lock.lock();
  try {
    M manager=(M)map.get(name);
    if (manager == null) {
      manager=factory.createManager(name,data);
      if (manager == null) {
        throw new IllegalStateException("String_Node_Str");
      }
      map.put(name,manager);
    }
    manager.count++;
    return manager;
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Retrieves a Manager if it has been previously created or creates a new Manager.
 * @param name The name of the Manager to retrieve.
 * @param factory The Factory to use to create the Manager.
 * @param data An Object that should be passed to the factory when creating the Manager.
 * @param < M > The Type of the Manager to be created.
 * @param < T > The type of the Factory data.
 * @return A Manager with the specified name and type.
 */
public static <M extends AbstractManager,T>M getManager(final String name,final ManagerFactory<M,T> factory,final T data){
  LOCK.lock();
  try {
    M manager=(M)MAP.get(name);
    if (manager == null) {
      manager=factory.createManager(name,data);
      if (manager == null) {
        throw new IllegalStateException("String_Node_Str");
      }
      MAP.put(name,manager);
    }
    manager.count++;
    return manager;
  }
  finally {
    LOCK.unlock();
  }
}
Program: 90800
Project: 90800
Buggy source:
/** 
 * Called to signify that this Manager is no longer required by an Appender.
 */
public void release(){
  lock.lock();
  try {
    --count;
    if (count <= 0) {
      map.remove(name);
      LOGGER.debug("String_Node_Str",this.getClass().getSimpleName(),getName());
      releaseSub();
    }
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Called to signify that this Manager is no longer required by an Appender.
 */
public void release(){
  LOCK.lock();
  try {
    --count;
    if (count <= 0) {
      MAP.remove(name);
      LOGGER.debug("String_Node_Str",this.getClass().getSimpleName(),getName());
      releaseSub();
    }
  }
  finally {
    LOCK.unlock();
  }
}
Program: 90801
Project: 90801
Buggy source:
/** 
 * Determines if a Manager with the specified name exists.
 * @param name The name of the Manager.
 * @return True if the Manager exists, false otherwise.
 */
public static boolean hasManager(final String name){
  lock.lock();
  try {
    return map.containsKey(name);
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Determines if a Manager with the specified name exists.
 * @param name The name of the Manager.
 * @return True if the Manager exists, false otherwise.
 */
public static boolean hasManager(final String name){
  LOCK.lock();
  try {
    return MAP.containsKey(name);
  }
  finally {
    LOCK.unlock();
  }
}
Program: 90803
Project: 90803
Buggy source:
/** 
 * Create a Console Appender.
 * @param layout The layout to use (required).
 * @param filter The Filter or null.
 * @param t The target ("SYSTEM_OUT" or "SYSTEM_ERR"). The default is "SYSTEM_OUT".
 * @param name The name of the Appender (required).
 * @param suppress "true" if exceptions should be hidden from the application, "false" otherwise.The default is "true".
 * @return The ConsoleAppender.
 */
@PluginFactory public static ConsoleAppender createAppender(@PluginElement("String_Node_Str") Layout layout,@PluginElement("String_Node_Str") final Filter filter,@PluginAttr("String_Node_Str") final String t,@PluginAttr("String_Node_Str") final String name,@PluginAttr("String_Node_Str") final String follow,@PluginAttr("String_Node_Str") final String suppress){
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (layout == null) {
    layout=PatternLayout.createLayout(null,null,null,null);
  }
  final boolean isFollow=follow == null ? false : Boolean.valueOf(follow);
  final boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  final Target target=t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
  return new ConsoleAppender(name,layout,filter,getManager(isFollow,target),handleExceptions);
}

Fixed version (ground truth):
/** 
 * Create a Console Appender.
 * @param layout The layout to use (required).
 * @param filter The Filter or null.
 * @param t The target ("SYSTEM_OUT" or "SYSTEM_ERR"). The default is "SYSTEM_OUT".
 * @param follow If true will follow changes to the underlying output stream.
 * @param name The name of the Appender (required).
 * @param suppress "true" if exceptions should be hidden from the application, "false" otherwise.The default is "true".
 * @return The ConsoleAppender.
 */
@PluginFactory public static ConsoleAppender createAppender(@PluginElement("String_Node_Str") Layout layout,@PluginElement("String_Node_Str") final Filter filter,@PluginAttr("String_Node_Str") final String t,@PluginAttr("String_Node_Str") final String name,@PluginAttr("String_Node_Str") final String follow,@PluginAttr("String_Node_Str") final String suppress){
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (layout == null) {
    layout=PatternLayout.createLayout(null,null,null,null);
  }
  final boolean isFollow=follow == null ? false : Boolean.valueOf(follow);
  final boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  final Target target=t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
  return new ConsoleAppender(name,layout,filter,getManager(isFollow,target),handleExceptions);
}
Program: 90804
Project: 90804
Buggy source:
/** 
 * Returns the appender references.
 * @param refs The references to return.
 * @return The appender references.
 */
@PluginFactory public static String[] createFailovers(@PluginElement("String_Node_Str") final AppenderRef... refs){
  if (refs == null) {
    logger.error("String_Node_Str");
    return null;
  }
  final String[] arr=new String[refs.length];
  for (int i=0; i < refs.length; ++i) {
    arr[i]=refs[i].getRef();
  }
  return arr;
}

Fixed version (ground truth):
/** 
 * Returns the appender references.
 * @param refs The references to return.
 * @return The appender references.
 */
@PluginFactory public static String[] createFailovers(@PluginElement("String_Node_Str") final AppenderRef... refs){
  if (refs == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  final String[] arr=new String[refs.length];
  for (int i=0; i < refs.length; ++i) {
    arr[i]=refs[i].getRef();
  }
  return arr;
}
Program: 90805
Project: 90805
Buggy source:
/** 
 * Returns the FileManager.
 * @param fileName The name of the file to manage.
 * @param append true if the file should be appended to, false if it should be overwritten.
 * @param locking true if the file should be locked while writing, false otherwise.
 * @param bufferedIO true if the contents should be buffered as they are written.
 * @return A FileManager for the File.
 */
public static FileManager getFileManager(final String fileName,final boolean append,boolean locking,final boolean bufferedIO){
  if (locking && bufferedIO) {
    locking=false;
  }
  return (FileManager)getManager(fileName,new FactoryData(append,locking,bufferedIO),factory);
}

Fixed version (ground truth):
/** 
 * Returns the FileManager.
 * @param fileName The name of the file to manage.
 * @param append true if the file should be appended to, false if it should be overwritten.
 * @param locking true if the file should be locked while writing, false otherwise.
 * @param bufferedIO true if the contents should be buffered as they are written.
 * @return A FileManager for the File.
 */
public static FileManager getFileManager(final String fileName,final boolean append,boolean locking,final boolean bufferedIO){
  if (locking && bufferedIO) {
    locking=false;
  }
  return (FileManager)getManager(fileName,new FactoryData(append,locking,bufferedIO),FACTORY);
}
Program: 90806
Project: 90806
Buggy source:
public MimeMessageBuilder setFrom(final String from) throws MessagingException {
  InternetAddress address=parseAddress(from);
  if (null != address) {
    message.setFrom(address);
  }
 else {
    message.setFrom();
  }
  return this;
}

Fixed version (ground truth):
public MimeMessageBuilder setFrom(final String from) throws MessagingException {
  InternetAddress address=parseAddress(from);
  if (null != address) {
    message.setFrom(address);
  }
 else {
    try {
      message.setFrom();
    }
 catch (    Exception ex) {
      message.setFrom(null);
    }
  }
  return this;
}
Program: 90807
Project: 90807
Buggy source:
public SMTPManager createManager(final String name,final FactoryData data){
  final String prefix="String_Node_Str" + data.protocol;
  Properties properties=PropertiesUtil.getSystemProperties();
  properties.put("String_Node_Str",data.protocol);
  if (null != data.host) {
    properties.put(prefix + "String_Node_Str",data.host);
  }
  if (data.port > 0) {
    properties.put(prefix + "String_Node_Str",String.valueOf(data.port));
  }
  final Authenticator authenticator=buildAuthenticator(data.username,data.password);
  if (null != authenticator) {
    properties.put(prefix + "String_Node_Str","String_Node_Str");
  }
  final Session session=Session.getInstance(properties,authenticator);
  session.setProtocolForAddress("String_Node_Str",data.protocol);
  session.setDebug(data.isDebug);
  MimeMessage message;
  try {
    message=new MimeMessageBuilder(session).setFrom(data.from).setReplyTo(data.replyto).setRecipients(Message.RecipientType.TO,data.to).setRecipients(Message.RecipientType.CC,data.cc).setRecipients(Message.RecipientType.BCC,data.bcc).setSubject(data.subject).getMimeMessage();
  }
 catch (  MessagingException e) {
    LOGGER.error("String_Node_Str",e);
    message=null;
  }
  return new SMTPManager(name,session,message,data);
}

Fixed version (ground truth):
public SMTPManager createManager(final String name,final FactoryData data){
  final String prefix="String_Node_Str" + data.protocol;
  Properties properties=PropertiesUtil.getSystemProperties();
  properties.put("String_Node_Str",data.protocol);
  if (properties.getProperty("String_Node_Str") == null) {
    properties.put("String_Node_Str",NetUtils.getLocalHostname());
  }
  if (null != data.host) {
    properties.put(prefix + "String_Node_Str",data.host);
  }
  if (data.port > 0) {
    properties.put(prefix + "String_Node_Str",String.valueOf(data.port));
  }
  final Authenticator authenticator=buildAuthenticator(data.username,data.password);
  if (null != authenticator) {
    properties.put(prefix + "String_Node_Str","String_Node_Str");
  }
  final Session session=Session.getInstance(properties,authenticator);
  session.setProtocolForAddress("String_Node_Str",data.protocol);
  session.setDebug(data.isDebug);
  MimeMessage message;
  try {
    message=new MimeMessageBuilder(session).setFrom(data.from).setReplyTo(data.replyto).setRecipients(Message.RecipientType.TO,data.to).setRecipients(Message.RecipientType.CC,data.cc).setRecipients(Message.RecipientType.BCC,data.bcc).setSubject(data.subject).getMimeMessage();
  }
 catch (  MessagingException e) {
    LOGGER.error("String_Node_Str",e);
    message=null;
  }
  return new SMTPManager(name,session,message,data);
}
Program: 90808
Project: 90808
Buggy source:
@Test public void testMessageFactorySetFrom() throws MessagingException {
  final MimeMessageBuilder builder=new MimeMessageBuilder(null);
  final String address="String_Node_Str";
  assertNull(builder.getMimeMessage().getFrom());
  builder.setFrom(null);
  assertArrayEquals(new Address[]{InternetAddress.getLocalAddress(null)},builder.getMimeMessage().getFrom());
  builder.setFrom(address);
  assertArrayEquals(new Address[]{new InternetAddress(address)},builder.getMimeMessage().getFrom());
}

Fixed version (ground truth):
@Test public void testMessageFactorySetFrom() throws MessagingException {
  final MimeMessageBuilder builder=new MimeMessageBuilder(null);
  final String address="String_Node_Str";
  assertNull(builder.getMimeMessage().getFrom());
  builder.setFrom(null);
  Address[] array=null;
  Address addr=InternetAddress.getLocalAddress(null);
  if (addr != null) {
    array=new Address[]{addr};
  }
  assertArrayEquals(array,builder.getMimeMessage().getFrom());
  builder.setFrom(address);
  assertArrayEquals(new Address[]{new InternetAddress(address)},builder.getMimeMessage().getFrom());
}
Program: 90809
Project: 90809
Buggy source:
@Test public void testInfo(){
  currentLevel=Level.INFO;
  currentEvent=events[0];
  info("String_Node_Str");
  info(null,"String_Node_Str");
  currentEvent=events[1];
  info(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str");
  currentEvent=events[2];
  info("String_Node_Str",t);
  info(null,"String_Node_Str",t);
  currentEvent=events[3];
  info(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str",t);
  currentEvent=events[4];
  info(obj);
  currentEvent=events[5];
  info(MarkerManager.getMarker("String_Node_Str"),obj);
  currentEvent=events[6];
  info(obj,t);
  info(null,obj,t);
  currentEvent=events[7];
  info(MarkerManager.getMarker("String_Node_Str"),obj,t);
  currentEvent=events[8];
  info(pattern,p1,p2);
  currentEvent=events[9];
  info(MarkerManager.getMarker("String_Node_Str"),pattern,p1,p2);
  currentEvent=events[10];
  info(simple);
  info(null,simple);
  info(null,simple,null);
  currentEvent=events[11];
  info(simple,t);
  info(null,simple,t);
  currentEvent=events[12];
  info(MarkerManager.getMarker("String_Node_Str"),simple,null);
  currentEvent=events[13];
  info(MarkerManager.getMarker("String_Node_Str"),simple,t);
}

Fixed version (ground truth):
@Test public void testInfo(){
  currentLevel=Level.INFO;
  currentEvent=events[0];
  info("String_Node_Str");
  info(null,"String_Node_Str");
  currentEvent=events[1];
  info(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str");
  currentEvent=events[2];
  info("String_Node_Str",t);
  info(null,"String_Node_Str",t);
  currentEvent=events[3];
  info(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str",t);
  currentEvent=events[4];
  info(obj);
  currentEvent=events[5];
  info(MarkerManager.getMarker("String_Node_Str"),obj);
  currentEvent=events[6];
  info(obj,t);
  info(null,obj,t);
  currentEvent=events[7];
  info(MarkerManager.getMarker("String_Node_Str"),obj,t);
  currentEvent=events[8];
  info(pattern,p1,p2);
  currentEvent=events[9];
  info(MarkerManager.getMarker("String_Node_Str"),pattern,p1,p2);
  currentEvent=events[10];
  info(simple);
  info(null,simple);
  info(null,simple,null);
  currentEvent=events[11];
  info(simple,t);
  info(null,simple,t);
  currentEvent=events[12];
  info(MarkerManager.getMarker("String_Node_Str"),simple,null);
  currentEvent=events[13];
  info(MarkerManager.getMarker("String_Node_Str"),simple,t);
  currentEvent=events[14];
  info(MarkerManager.getMarker("String_Node_Str"),simple);
}
Program: 90810
Project: 90810
Buggy source:
@Test public void testFatal(){
  currentLevel=Level.FATAL;
  currentEvent=events[0];
  fatal("String_Node_Str");
  fatal(null,"String_Node_Str");
  currentEvent=events[1];
  fatal(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str");
  currentEvent=events[2];
  fatal("String_Node_Str",t);
  fatal(null,"String_Node_Str",t);
  currentEvent=events[3];
  fatal(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str",t);
  currentEvent=events[4];
  fatal(obj);
  currentEvent=events[5];
  fatal(MarkerManager.getMarker("String_Node_Str"),obj);
  currentEvent=events[6];
  fatal(obj,t);
  fatal(null,obj,t);
  currentEvent=events[7];
  fatal(MarkerManager.getMarker("String_Node_Str"),obj,t);
  currentEvent=events[8];
  fatal(pattern,p1,p2);
  currentEvent=events[9];
  fatal(MarkerManager.getMarker("String_Node_Str"),pattern,p1,p2);
  currentEvent=events[10];
  fatal(simple);
  fatal(null,simple);
  fatal(null,simple,null);
  currentEvent=events[11];
  fatal(simple,t);
  fatal(null,simple,t);
  currentEvent=events[12];
  fatal(MarkerManager.getMarker("String_Node_Str"),simple,null);
  currentEvent=events[13];
  fatal(MarkerManager.getMarker("String_Node_Str"),simple,t);
}

Fixed version (ground truth):
@Test public void testFatal(){
  currentLevel=Level.FATAL;
  currentEvent=events[0];
  fatal("String_Node_Str");
  fatal(null,"String_Node_Str");
  currentEvent=events[1];
  fatal(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str");
  currentEvent=events[2];
  fatal("String_Node_Str",t);
  fatal(null,"String_Node_Str",t);
  currentEvent=events[3];
  fatal(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str",t);
  currentEvent=events[4];
  fatal(obj);
  currentEvent=events[5];
  fatal(MarkerManager.getMarker("String_Node_Str"),obj);
  currentEvent=events[6];
  fatal(obj,t);
  fatal(null,obj,t);
  currentEvent=events[7];
  fatal(MarkerManager.getMarker("String_Node_Str"),obj,t);
  currentEvent=events[8];
  fatal(pattern,p1,p2);
  currentEvent=events[9];
  fatal(MarkerManager.getMarker("String_Node_Str"),pattern,p1,p2);
  currentEvent=events[10];
  fatal(simple);
  fatal(null,simple);
  fatal(null,simple,null);
  currentEvent=events[11];
  fatal(simple,t);
  fatal(null,simple,t);
  currentEvent=events[12];
  fatal(MarkerManager.getMarker("String_Node_Str"),simple,null);
  currentEvent=events[13];
  fatal(MarkerManager.getMarker("String_Node_Str"),simple,t);
  currentEvent=events[14];
  fatal(MarkerManager.getMarker("String_Node_Str"),simple);
}
Program: 90811
Project: 90811
Buggy source:
@Test public void testDebug(){
  currentLevel=Level.DEBUG;
  currentEvent=events[0];
  debug("String_Node_Str");
  debug(null,"String_Node_Str");
  currentEvent=events[1];
  debug(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str");
  currentEvent=events[2];
  debug("String_Node_Str",t);
  debug(null,"String_Node_Str",t);
  currentEvent=events[3];
  debug(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str",t);
  currentEvent=events[4];
  debug(obj);
  currentEvent=events[5];
  debug(MarkerManager.getMarker("String_Node_Str"),obj);
  currentEvent=events[6];
  debug(obj,t);
  debug(null,obj,t);
  currentEvent=events[7];
  debug(MarkerManager.getMarker("String_Node_Str"),obj,t);
  currentEvent=events[8];
  debug(pattern,p1,p2);
  currentEvent=events[9];
  debug(MarkerManager.getMarker("String_Node_Str"),pattern,p1,p2);
  currentEvent=events[10];
  debug(simple);
  debug(null,simple);
  debug(null,simple,null);
  currentEvent=events[11];
  debug(simple,t);
  debug(null,simple,t);
  currentEvent=events[12];
  debug(MarkerManager.getMarker("String_Node_Str"),simple,null);
  currentEvent=events[13];
  debug(MarkerManager.getMarker("String_Node_Str"),simple,t);
}

Fixed version (ground truth):
@Test public void testDebug(){
  currentLevel=Level.DEBUG;
  currentEvent=events[0];
  debug("String_Node_Str");
  debug(null,"String_Node_Str");
  currentEvent=events[1];
  debug(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str");
  currentEvent=events[2];
  debug("String_Node_Str",t);
  debug(null,"String_Node_Str",t);
  currentEvent=events[3];
  debug(MarkerManager.getMarker("String_Node_Str"),"String_Node_Str",t);
  currentEvent=events[4];
  debug(obj);
  currentEvent=events[5];
  debug(MarkerManager.getMarker("String_Node_Str"),obj);
  currentEvent=events[6];
  debug(obj,t);
  debug(null,obj,t);
  currentEvent=events[7];
  debug(MarkerManager.getMarker("String_Node_Str"),obj,t);
  currentEvent=events[8];
  debug(pattern,p1,p2);
  currentEvent=events[9];
  debug(MarkerManager.getMarker("String_Node_Str"),pattern,p1,p2);
  currentEvent=events[10];
  debug(simple);
  debug(null,simple);
  debug(null,simple,null);
  currentEvent=events[11];
  debug(simple,t);
  debug(null,simple,t);
  currentEvent=events[12];
  debug(MarkerManager.getMarker("String_Node_Str"),simple,null);
  currentEvent=events[13];
  debug(MarkerManager.getMarker("String_Node_Str"),simple,t);
  currentEvent=events[14];
  debug(MarkerManager.getMarker("String_Node_Str"),simple);
}