nus-yam/ex-repair huggingface dataset:
Program: 90857
Project: 90857
Buggy source:
protected static Context createContext(String factoryName,String providerURL,String urlPkgPrefixes,String securityPrincipalName,String securityCredentials) throws NamingException {
  Properties props=getEnvironment(factoryName,providerURL,urlPkgPrefixes,securityPrincipalName,securityCredentials);
  return new InitialContext(props);
}

Fixed version (ground truth):
/** 
 * Create the InitialContext.
 * @param factoryName The fully qualified class name of the InitialContextFactory.
 * @param providerURL The URL of the provider to use.
 * @param urlPkgPrefixes A colon-separated list of package prefixes for the class name of the factory class thatwill create a URL context factory
 * @param securityPrincipalName The name of the identity of the Principal.
 * @param securityCredentials The security credentials of the Principal.
 * @return the InitialContext.
 * @throws NamingException if a naming error occurs.
 */
protected static Context createContext(String factoryName,String providerURL,String urlPkgPrefixes,String securityPrincipalName,String securityCredentials) throws NamingException {
  Properties props=getEnvironment(factoryName,providerURL,urlPkgPrefixes,securityPrincipalName,securityCredentials);
  return new InitialContext(props);
}
Program: 90858
Project: 90858
Buggy source:
public synchronized void send(Serializable object,Session session,MessageProducer producer) throws Exception {
  try {
    Message msg;
    if (object instanceof String) {
      msg=session.createTextMessage();
      ((TextMessage)msg).setText((String)object);
    }
 else {
      msg=session.createObjectMessage();
      ((ObjectMessage)msg).setObject(object);
    }
    producer.send(msg);
  }
 catch (  JMSException ex) {
    LOGGER.error("String_Node_Str" + getName());
    throw ex;
  }
}

Fixed version (ground truth):
/** 
 * Send the Object.
 * @param object The Object to send.
 * @param session The Session.
 * @param producer The MessageProducer.
 * @throws Exception if an error occurs.
 */
public synchronized void send(Serializable object,Session session,MessageProducer producer) throws Exception {
  try {
    Message msg;
    if (object instanceof String) {
      msg=session.createTextMessage();
      ((TextMessage)msg).setText((String)object);
    }
 else {
      msg=session.createObjectMessage();
      ((ObjectMessage)msg).setObject(object);
    }
    producer.send(msg);
  }
 catch (  JMSException ex) {
    LOGGER.error("String_Node_Str" + getName());
    throw ex;
  }
}
Program: 90859
Project: 90859
Buggy source:
protected Object lookup(Context ctx,String name) throws NamingException {
  try {
    return ctx.lookup(name);
  }
 catch (  NameNotFoundException e) {
    logger.error("String_Node_Str" + name + "String_Node_Str");
    throw e;
  }
}

Fixed version (ground truth):
/** 
 * Looks up an object from the Context.
 * @param ctx The Context.
 * @param name The name of the object to locate.
 * @return The object.
 * @throws NamingException if an error occurs.
 */
protected Object lookup(Context ctx,String name) throws NamingException {
  try {
    return ctx.lookup(name);
  }
 catch (  NameNotFoundException e) {
    logger.error("String_Node_Str" + name + "String_Node_Str");
    throw e;
  }
}
Program: 90860
Project: 90860
Buggy source:
public void onMessage(javax.jms.Message message){
  try {
    if (message instanceof ObjectMessage) {
      ObjectMessage objectMessage=(ObjectMessage)message;
      log((LogEvent)objectMessage.getObject());
    }
 else {
      logger.warn("String_Node_Str" + message.getJMSType() + "String_Node_Str");
    }
  }
 catch (  JMSException jmse) {
    logger.error("String_Node_Str",jmse);
  }
}

Fixed version (ground truth):
/** 
 * Listener that receives the event.
 * @param message The received message.
 */
public void onMessage(javax.jms.Message message){
  try {
    if (message instanceof ObjectMessage) {
      ObjectMessage objectMessage=(ObjectMessage)message;
      log((LogEvent)objectMessage.getObject());
    }
 else {
      logger.warn("String_Node_Str" + message.getJMSType() + "String_Node_Str");
    }
  }
 catch (  JMSException jmse) {
    logger.error("String_Node_Str",jmse);
  }
}
Program: 90861
Project: 90861
Buggy source:
public AbstractSocketManager(String name,OutputStream os,InetAddress addr,String host,int port){
  super(os,name);
  this.address=addr;
  this.host=host;
  this.port=port;
}

Fixed version (ground truth):
/** 
 * The Constructor.
 * @param name The unique name of this connection.
 * @param os The OutputStream to manage.
 * @param addr The internet address.
 * @param host The target host name.
 * @param port The target port number.
 */
public AbstractSocketManager(String name,OutputStream os,InetAddress addr,String host,int port){
  super(os,name);
  this.address=addr;
  this.host=host;
  this.port=port;
}
Program: 90862
Project: 90862
Buggy source:
public DatagramOutputStream(String host,int port){
  this.port=port;
  try {
    address=InetAddress.getByName(host);
  }
 catch (  UnknownHostException ex) {
    String msg="String_Node_Str" + host;
    logger.error(msg,ex);
    throw new AppenderRuntimeException(msg,ex);
  }
  try {
    ds=new DatagramSocket();
  }
 catch (  SocketException ex) {
    String msg="String_Node_Str" + host;
    logger.error(msg,ex);
    throw new AppenderRuntimeException(msg,ex);
  }
}

Fixed version (ground truth):
/** 
 * The Constructor.
 * @param host The host to connect to.
 * @param port The port on the host.
 */
public DatagramOutputStream(String host,int port){
  this.port=port;
  try {
    address=InetAddress.getByName(host);
  }
 catch (  UnknownHostException ex) {
    String msg="String_Node_Str" + host;
    LOGGER.error(msg,ex);
    throw new AppenderRuntimeException(msg,ex);
  }
  try {
    ds=new DatagramSocket();
  }
 catch (  SocketException ex) {
    String msg="String_Node_Str" + host;
    LOGGER.error(msg,ex);
    throw new AppenderRuntimeException(msg,ex);
  }
}
Program: 90863
Project: 90863
Buggy source:
public DatagramSocketManager(OutputStream os,String name,String host,int port){
  super(name,os,null,host,port);
}

Fixed version (ground truth):
/** 
 * The Constructor.
 * @param os The OutputStream.
 * @param name The unique name of the connection.
 * @param host The host to connect to.
 * @param port The port on the host.
 */
protected DatagramSocketManager(OutputStream os,String name,String host,int port){
  super(name,os,null,host,port);
}
Program: 90864
Project: 90864
Buggy source:
public static DatagramSocketManager getSocketManager(String host,int port){
  if (host == null || host.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (port <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (DatagramSocketManager)getManager("String_Node_Str" + host + "String_Node_Str"+ port,factory,new FactoryData(host,port));
}

Fixed version (ground truth):
/** 
 * Obtain a SocketManager.
 * @param host The host to connect to.
 * @param port The port on the host.
 * @return A DatagramSocketManager.
 */
public static DatagramSocketManager getSocketManager(String host,int port){
  if (host == null || host.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (port <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (DatagramSocketManager)getManager("String_Node_Str" + host + "String_Node_Str"+ port,factory,new FactoryData(host,port));
}
Program: 90865
Project: 90865
Buggy source:
public Throwable getThrown(){
  return event.getThrown();
}

Fixed version (ground truth):
/** 
 * Return the Throwable associated with the event, if any.
 * @return the Throwable.
 */
public Throwable getThrown(){
  return event.getThrown();
}
Program: 90866
Project: 90866
Buggy source:
public Message getMessage(){
  return event.getMessage();
}

Fixed version (ground truth):
/** 
 * Return the Message.
 * @return the Message.
 */
public Message getMessage(){
  return event.getMessage();
}
Program: 90867
Project: 90867
Buggy source:
public void setBody(byte[] body){
  if (body == null || body.length == 0) {
    this.body=new byte[0];
    return;
  }
  if (compress) {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    try {
      GZIPOutputStream os=new GZIPOutputStream(baos);
      os.write(body);
      os.close();
    }
 catch (    IOException ioe) {
      throw new LoggingException("String_Node_Str",ioe);
    }
    this.body=baos.toByteArray();
  }
 else {
    this.body=body;
  }
}

Fixed version (ground truth):
/** 
 * Set the body in the event.
 * @param body The body to add to the event.
 */
public void setBody(byte[] body){
  if (body == null || body.length == 0) {
    this.body=new byte[0];
    return;
  }
  if (compress) {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    try {
      GZIPOutputStream os=new GZIPOutputStream(baos);
      os.write(body);
      os.close();
    }
 catch (    IOException ioe) {
      throw new LoggingException("String_Node_Str",ioe);
    }
    this.body=baos.toByteArray();
  }
 else {
    this.body=body;
  }
}
Program: 90868
Project: 90868
Buggy source:
public long getMillis(){
  return event.getMillis();
}

Fixed version (ground truth):
/** 
 * Return the event timestamp.
 * @return the event timestamp.
 */
public long getMillis(){
  return event.getMillis();
}
Program: 90869
Project: 90869
Buggy source:
public Level getLevel(){
  return event.getLevel();
}

Fixed version (ground truth):
/** 
 * Return the logging Level.
 * @return the Level.
 */
public Level getLevel(){
  return event.getLevel();
}
Program: 90870
Project: 90870
Buggy source:
public Map<String,String> getContextMap(){
  return ctx;
}

Fixed version (ground truth):
/** 
 * Return a copy of the context Map.
 * @return a copy of the context Map.
 */
public Map<String,String> getContextMap(){
  return ctx;
}
Program: 90872
Project: 90872
Buggy source:
public String getFQCN(){
  return event.getFQCN();
}

Fixed version (ground truth):
/** 
 * Get the Frequently Qualified Class Name.
 * @return the FQCN String.
 */
public String getFQCN(){
  return event.getFQCN();
}
Program: 90873
Project: 90873
Buggy source:
public Marker getMarker(){
  return event.getMarker();
}

Fixed version (ground truth):
/** 
 * Return the Marker.
 * @return the Marker.
 */
public Marker getMarker(){
  return event.getMarker();
}
Program: 90874
Project: 90874
Buggy source:
public Stack<String> getContextStack(){
  return event.getContextStack();
}

Fixed version (ground truth):
/** 
 * Return a copy of the context stack.
 * @return a copy of the context stack.
 */
public Stack<String> getContextStack(){
  return event.getContextStack();
}
Program: 90875
Project: 90875
Buggy source:
public StackTraceElement getSource(){
  return event.getSource();
}

Fixed version (ground truth):
/** 
 * Return the StackTraceElement for the caller of the logging API.
 * @return the StackTraceElement of the caller.
 */
public StackTraceElement getSource(){
  return event.getSource();
}
Program: 90876
Project: 90876
Buggy source:
public String getThreadName(){
  return event.getThreadName();
}

Fixed version (ground truth):
/** 
 * Return the name of the Thread.
 * @return the name of the Thread.
 */
public String getThreadName(){
  return event.getThreadName();
}
Program: 90877
Project: 90877
Buggy source:
public String getLoggerName(){
  return event.getLoggerName();
}

Fixed version (ground truth):
/** 
 * Return the logger name.
 * @return the logger name.
 */
public String getLoggerName(){
  return event.getLoggerName();
}
Program: 90878
Project: 90878
Buggy source:
FlumeEvent createEvent(LogEvent event,String hostname,String includes,String excludes,String required,String mdcPrefix,String eventPrefix,boolean compress);

Fixed version (ground truth):
/** 
 * Create a Flume event.
 * @param event The Log4j LogEvent.
 * @param hostname The name of the host.
 * @param includes A comma separated list of MDC elements to include.
 * @param excludes A comma separated list of MDC elements to exclude.
 * @param required A comma separated list of MDC elements that are required.
 * @param mdcPrefix The value to prefix to MDC keys.
 * @param eventPrefix The value to prefix to event keys.
 * @param compress If true the event body should be compressed.
 * @return A FlumeEvent.
 */
FlumeEvent createEvent(LogEvent event,String hostname,String includes,String excludes,String required,String mdcPrefix,String eventPrefix,boolean compress);
Program: 90879
Project: 90879
Buggy source:
public String toString(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(mode);
  sb.append("String_Node_Str");
  boolean first=true;
  for (  Map.Entry<String,String> entry : map.entrySet()) {
    if (!first) {
      sb.append("String_Node_Str");
    }
    sb.append(entry.getKey()).append("String_Node_Str").append(entry.getValue());
    first=false;
  }
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Keys should be updated.
 */
@Override public String toString(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(mode);
  sb.append("String_Node_Str");
  boolean first=true;
  for (  Map.Entry<String,String> entry : map.entrySet()) {
    if (!first) {
      sb.append("String_Node_Str");
    }
    sb.append(entry.getKey()).append("String_Node_Str").append(entry.getValue());
    first=false;
  }
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 90880
Project: 90880
Buggy source:
/** 
 * The factory method to create the MapRewritePolicy.
 * @param mode The string representation of the Mode.
 * @param pairs key/value pairs for the new Map keys and values.
 * @return The MapRewritePolicy.
 */
@PluginFactory public static MapRewritePolicy createPolicy(@PluginAttr("String_Node_Str") String mode,@PluginElement("String_Node_Str") KeyValuePair[] pairs){
  Mode op;
  if (mode == null) {
    op=Mode.Add;
  }
 else {
    op=Mode.valueOf(mode);
    if (op == null) {
      logger.error("String_Node_Str" + mode);
      return null;
    }
  }
  if (pairs == null || pairs.length == 0) {
    logger.error("String_Node_Str");
    return null;
  }
  Map<String,String> map=new HashMap<String,String>();
  for (  KeyValuePair pair : pairs) {
    String key=pair.getKey();
    if (key == null) {
      logger.error("String_Node_Str");
      continue;
    }
    String value=pair.getValue();
    if (value == null) {
      logger.error("String_Node_Str" + key + "String_Node_Str");
      continue;
    }
    map.put(pair.getKey(),pair.getValue());
  }
  if (map.size() == 0) {
    logger.error("String_Node_Str");
    return null;
  }
  return new MapRewritePolicy(map,op);
}

Fixed version (ground truth):
/** 
 * The factory method to create the MapRewritePolicy.
 * @param mode The string representation of the Mode.
 * @param pairs key/value pairs for the new Map keys and values.
 * @return The MapRewritePolicy.
 */
@PluginFactory public static MapRewritePolicy createPolicy(@PluginAttr("String_Node_Str") String mode,@PluginElement("String_Node_Str") KeyValuePair[] pairs){
  Mode op;
  if (mode == null) {
    op=Mode.Add;
  }
 else {
    op=Mode.valueOf(mode);
    if (op == null) {
      LOGGER.error("String_Node_Str" + mode);
      return null;
    }
  }
  if (pairs == null || pairs.length == 0) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  Map<String,String> map=new HashMap<String,String>();
  for (  KeyValuePair pair : pairs) {
    String key=pair.getKey();
    if (key == null) {
      LOGGER.error("String_Node_Str");
      continue;
    }
    String value=pair.getValue();
    if (value == null) {
      LOGGER.error("String_Node_Str" + key + "String_Node_Str");
      continue;
    }
    map.put(pair.getKey(),pair.getValue());
  }
  if (map.size() == 0) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  return new MapRewritePolicy(map,op);
}
Program: 90881
Project: 90881
Buggy source:
public AppenderWrapper(Appender appender){
  super(appender);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param appender The Appender to wrap.
 */
public AppenderWrapper(Appender appender){
  super(appender);
}
Program: 90882
Project: 90882
Buggy source:
@PluginFactory public static RewriteAppender createAppender(@PluginAttr("String_Node_Str") String name,@PluginAttr("String_Node_Str") String suppress,@PluginElement("String_Node_Str") String[] appenderRefs,@PluginConfiguration Configuration config,@PluginElement("String_Node_Str") RewritePolicy rewritePolicy,@PluginElement("String_Node_Str") Filter filter){
  boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (appenderRefs == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  return new RewriteAppender(name,filter,handleExceptions,appenderRefs,rewritePolicy,config);
}

Fixed version (ground truth):
/** 
 * Create a RewriteAppender.
 * @param name The name of the Appender.
 * @param suppress If true, exceptions will be handled in the Appender.
 * @param appenderRefs An array of Appender names to call.
 * @param config The Configuration.
 * @param rewritePolicy The policy to use to modify the event.
 * @param filter A Filter to filter events.
 * @return The created RewriteAppender.
 */
@PluginFactory public static RewriteAppender createAppender(@PluginAttr("String_Node_Str") String name,@PluginAttr("String_Node_Str") String suppress,@PluginElement("String_Node_Str") String[] appenderRefs,@PluginConfiguration Configuration config,@PluginElement("String_Node_Str") RewritePolicy rewritePolicy,@PluginElement("String_Node_Str") Filter filter){
  boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (appenderRefs == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  return new RewriteAppender(name,filter,handleExceptions,appenderRefs,rewritePolicy,config);
}
Program: 90883
Project: 90883
Buggy source:
public void append(LogEvent event){
  if (rewritePolicy != null) {
    event=rewritePolicy.rewrite(event);
  }
  for (  AppenderControl control : appenders.values()) {
    control.callAppender(event);
  }
}

Fixed version (ground truth):
/** 
 * Modify the event and pass to the subordinate Appenders.
 * @param event The LogEvent.
 */
public void append(LogEvent event){
  if (rewritePolicy != null) {
    event=rewritePolicy.rewrite(event);
  }
  for (  AppenderControl control : appenders.values()) {
    control.callAppender(event);
  }
}
Program: 90884
Project: 90884
Buggy source:
@PluginFactory public static DefaultRolloverStrategy createStrategy(@PluginAttr("String_Node_Str") String max,@PluginAttr("String_Node_Str") String min){
  int minIndex;
  if (min != null) {
    minIndex=Integer.parseInt(min);
    if (minIndex < 1) {
      logger.error("String_Node_Str" + MIN_WINDOW_SIZE);
      minIndex=MIN_WINDOW_SIZE;
    }
  }
 else {
    minIndex=MIN_WINDOW_SIZE;
  }
  int maxIndex;
  if (max != null) {
    maxIndex=Integer.parseInt(max);
    if (maxIndex < minIndex) {
      maxIndex=minIndex < DEFAULT_WINDOW_SIZE ? DEFAULT_WINDOW_SIZE : minIndex;
      logger.error("String_Node_Str" + maxIndex);
    }
  }
 else {
    maxIndex=DEFAULT_WINDOW_SIZE;
  }
  return new DefaultRolloverStrategy(minIndex,maxIndex);
}

Fixed version (ground truth):
/** 
 * Create the DefaultRolloverStrategy.
 * @param max The maximum number of files to keep.
 * @param min The minimum number of files to keep.
 * @return A DefaultRolloverStrategy.
 */
@PluginFactory public static DefaultRolloverStrategy createStrategy(@PluginAttr("String_Node_Str") String max,@PluginAttr("String_Node_Str") String min){
  int minIndex;
  if (min != null) {
    minIndex=Integer.parseInt(min);
    if (minIndex < 1) {
      LOGGER.error("String_Node_Str" + MIN_WINDOW_SIZE);
      minIndex=MIN_WINDOW_SIZE;
    }
  }
 else {
    minIndex=MIN_WINDOW_SIZE;
  }
  int maxIndex;
  if (max != null) {
    maxIndex=Integer.parseInt(max);
    if (maxIndex < minIndex) {
      maxIndex=minIndex < DEFAULT_WINDOW_SIZE ? DEFAULT_WINDOW_SIZE : minIndex;
      LOGGER.error("String_Node_Str" + maxIndex);
    }
  }
 else {
    maxIndex=DEFAULT_WINDOW_SIZE;
  }
  return new DefaultRolloverStrategy(minIndex,maxIndex);
}
Program: 90885
Project: 90885
Buggy source:
public RolloverDescription rollover(RollingFileManager manager) throws SecurityException {
  if (maxIndex >= 0) {
    int purgeStart=minIndex;
    if (!purge(purgeStart,maxIndex,manager)) {
      return null;
    }
    StringBuilder buf=new StringBuilder();
    manager.getProcessor().formatFileName(purgeStart,buf);
    String currentFileName=manager.getFileName();
    String renameTo=buf.toString();
    String compressedName=renameTo;
    Action compressAction=null;
    if (renameTo.endsWith("String_Node_Str")) {
      renameTo=renameTo.substring(0,renameTo.length() - 3);
      compressAction=new GZCompressAction(new File(renameTo),new File(compressedName),true);
    }
 else     if (renameTo.endsWith("String_Node_Str")) {
      renameTo=renameTo.substring(0,renameTo.length() - 4);
      compressAction=new ZipCompressAction(new File(renameTo),new File(compressedName),true);
    }
    FileRenameAction renameAction=new FileRenameAction(new File(currentFileName),new File(renameTo),false);
    return new RolloverDescriptionImpl(currentFileName,false,renameAction,compressAction);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Perform the rollover.
 * @param manager The RollingFileManager name for current active log file.
 * @return A RolloverDescription.
 * @throws SecurityException if an error occurs.
 */
public RolloverDescription rollover(RollingFileManager manager) throws SecurityException {
  if (maxIndex >= 0) {
    int purgeStart=minIndex;
    if (!purge(purgeStart,maxIndex,manager)) {
      return null;
    }
    StringBuilder buf=new StringBuilder();
    manager.getProcessor().formatFileName(purgeStart,buf);
    String currentFileName=manager.getFileName();
    String renameTo=buf.toString();
    String compressedName=renameTo;
    Action compressAction=null;
    if (renameTo.endsWith("String_Node_Str")) {
      renameTo=renameTo.substring(0,renameTo.length() - 3);
      compressAction=new GZCompressAction(new File(renameTo),new File(compressedName),true);
    }
 else     if (renameTo.endsWith("String_Node_Str")) {
      renameTo=renameTo.substring(0,renameTo.length() - 4);
      compressAction=new ZipCompressAction(new File(renameTo),new File(compressedName),true);
    }
    FileRenameAction renameAction=new FileRenameAction(new File(currentFileName),new File(renameTo),false);
    return new RolloverDescriptionImpl(currentFileName,false,renameAction,compressAction);
  }
  return null;
}
Program: 90887
Project: 90887
Buggy source:
public String toString(){
  return "String_Node_Str" + minIndex + "String_Node_Str"+ maxIndex+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + minIndex + "String_Node_Str"+ maxIndex+ "String_Node_Str";
}
Program: 90888
Project: 90888
Buggy source:
/** 
 * The handler must be set before the appender is started.
 */
public void setHandler(ErrorHandler handler){
  if (handler == null) {
    logger.error("String_Node_Str");
  }
  if (isStarted()) {
    logger.error("String_Node_Str");
    return;
  }
  this.handler=handler;
}

Fixed version (ground truth):
/** 
 * The handler must be set before the appender is started.
 * @param handler The ErrorHandler to use.
 */
public void setHandler(ErrorHandler handler){
  if (handler == null) {
    LOGGER.error("String_Node_Str");
  }
  if (isStarted()) {
    LOGGER.error("String_Node_Str");
    return;
  }
  this.handler=handler;
}
Program: 90889
Project: 90889
Buggy source:
public AppenderBase(String name,Filter filter,Layout layout,boolean handleException){
  super(filter);
  this.name=name;
  this.layout=layout;
  this.handleException=handleException;
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param name The Appender name.
 * @param filter The Filter to associate with the Appender.
 * @param layout The layout to use to format the event.
 * @param handleException If true, exceptions will be logged and suppressed. If false errors will belogged and then passed to the application.
 */
protected AppenderBase(String name,Filter filter,Layout layout,boolean handleException){
  super(filter);
  this.name=name;
  this.layout=layout;
  this.handleException=handleException;
}
Program: 90890
Project: 90890
Buggy source:
public Layout getLayout(){
  return layout;
}

Fixed version (ground truth):
/** 
 * Returns the Layout for the appender.
 * @return The Layout used to format the event.
 */
public Layout getLayout(){
  return layout;
}
Program: 90891
Project: 90891
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
/** 
 * Returns the name of the Appender.
 * @return The name of the Appender.
 */
public String getName(){
  return name;
}
Program: 90892
Project: 90892
Buggy source:
public void stop(){
  this.started=false;
  stopFilter();
}

Fixed version (ground truth):
/** 
 * Stop the Appender.
 */
public void stop(){
  this.started=false;
  stopFilter();
}
Program: 90893
Project: 90893
Buggy source:
public void start(){
  startFilter();
  this.started=true;
}

Fixed version (ground truth):
/** 
 * Start the Appender.
 */
public void start(){
  startFilter();
  this.started=true;
}
Program: 90894
Project: 90894
Buggy source:
public String toString(){
  return name;
}

Fixed version (ground truth):
@Override public String toString(){
  return name;
}
Program: 90895
Project: 90895
Buggy source:
public boolean isStarted(){
  return started;
}

Fixed version (ground truth):
/** 
 * Returns true if the Appender is started, false otherwise.
 * @return true if the Appender is started, false otherwise.
 */
public boolean isStarted(){
  return started;
}
Program: 90896
Project: 90896
Buggy source:
public ErrorHandler getHandler(){
  return handler;
}

Fixed version (ground truth):
/** 
 * Return the ErrorHandler, if any.
 * @return The ErrorHandler.
 */
public ErrorHandler getHandler(){
  return handler;
}
Program: 90897
Project: 90897
Buggy source:
public void close(){
}

Fixed version (ground truth):
/** 
 * Close the stream associated with the Appender.
 */
public void close(){
}
Program: 90898
Project: 90898
Buggy source:
/** 
 * Some appenders need to propogate exceptions back to the application. When suppressException is false the AppenderControl will allow the exception to percolate.
 */
public boolean isExceptionSuppressed(){
  return handleException;
}

Fixed version (ground truth):
/** 
 * Some appenders need to propogate exceptions back to the application. When suppressException is false the AppenderControl will allow the exception to percolate.
 * @return true if exceptions will be supressed, false otherwise.
 */
public boolean isExceptionSuppressed(){
  return handleException;
}
Program: 90899
Project: 90899
Buggy source:
/** 
 * Standard error output 
 */
private ConsoleAppender(String name,Layout layout,Filter filter,OutputStreamManager manager,boolean handleExceptions){
  super(name,layout,filter,handleExceptions,true,manager);
}

Fixed version (ground truth):
/** 
 * Standard error output. 
 */
private ConsoleAppender(String name,Layout layout,Filter filter,OutputStreamManager manager,boolean handleExceptions){
  super(name,layout,filter,handleExceptions,true,manager);
}
Program: 90900
Project: 90900
Buggy source:
public OutputStreamManager createManager(String name,FactoryData data){
  return new OutputStreamManager(data.os,data.type);
}

Fixed version (ground truth):
/** 
 * Create an OutputStreamManager.
 * @param name The name of the entity to manage.
 * @param data The data required to create the entity.
 * @return The OutputStreamManager
 */
public OutputStreamManager createManager(String name,FactoryData data){
  return new OutputStreamManager(data.os,data.type);
}
Program: 90901
Project: 90901
Buggy source:
public FactoryData(OutputStream os,String type){
  this.os=os;
  this.type=type;
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param os The OutputStream.
 * @param type The name of the target.
 */
public FactoryData(OutputStream os,String type){
  this.os=os;
  this.type=type;
}
Program: 90902
Project: 90902
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") Filter filter,@PluginAttr("String_Node_Str") String t,@PluginAttr("String_Node_Str") String name,@PluginAttr("String_Node_Str") String suppress){
  if (name == null) {
    logger.error("String_Node_Str");
    return null;
  }
  if (layout == null) {
    layout=PatternLayout.createLayout(null,null,null,null);
  }
  boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  Target target=t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
  return new ConsoleAppender(name,layout,filter,getManager(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 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") Filter filter,@PluginAttr("String_Node_Str") String t,@PluginAttr("String_Node_Str") String name,@PluginAttr("String_Node_Str") String suppress){
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (layout == null) {
    layout=PatternLayout.createLayout(null,null,null,null);
  }
  boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  Target target=t == null ? Target.SYSTEM_OUT : Target.valueOf(t);
  return new ConsoleAppender(name,layout,filter,getManager(target),handleExceptions);
}
Program: 90903
Project: 90903
Buggy source:
/** 
 * Handle an error with a message, and exception and a logging event.
 * @param msg The message.
 * @param event The LogEvent.
 * @param t The Throwable.
 */
public void error(String msg,LogEvent event,Throwable t){
  long current=System.currentTimeMillis();
  if (lastException + EXCEPTION_INTERVAL < current || exceptionCount++ < MAX_EXCEPTIONS) {
    logger.error(msg,t);
  }
  lastException=current;
  if (!appender.isExceptionSuppressed() && t != null) {
    throw new AppenderRuntimeException(msg,t);
  }
}

Fixed version (ground truth):
/** 
 * Handle an error with a message, and exception and a logging event.
 * @param msg The message.
 * @param event The LogEvent.
 * @param t The Throwable.
 */
public void error(String msg,LogEvent event,Throwable t){
  long current=System.currentTimeMillis();
  if (lastException + EXCEPTION_INTERVAL < current || exceptionCount++ < MAX_EXCEPTIONS) {
    LOGGER.error(msg,t);
  }
  lastException=current;
  if (!appender.isExceptionSuppressed() && t != null) {
    throw new AppenderRuntimeException(msg,t);
  }
}
Program: 90904
Project: 90904
Buggy source:
@Override public void start(){
  Map<String,Appender> map=config.getAppenders();
  int errors=0;
  if (map.containsKey(primaryRef)) {
    primary=new AppenderControl(map.get(primaryRef));
  }
 else {
    logger.error("String_Node_Str" + primaryRef);
    ++errors;
  }
  for (  String name : failovers) {
    if (map.containsKey(name)) {
      failoverAppenders.add(new AppenderControl(map.get(name)));
    }
 else {
      logger.error("String_Node_Str" + name + "String_Node_Str");
    }
  }
  if (failoverAppenders.size() == 0) {
    logger.error("String_Node_Str");
    ++errors;
  }
  if (errors == 0) {
    super.start();
  }
}

Fixed version (ground truth):
@Override public void start(){
  Map<String,Appender> map=config.getAppenders();
  int errors=0;
  if (map.containsKey(primaryRef)) {
    primary=new AppenderControl(map.get(primaryRef));
  }
 else {
    LOGGER.error("String_Node_Str" + primaryRef);
    ++errors;
  }
  for (  String name : failovers) {
    if (map.containsKey(name)) {
      failoverAppenders.add(new AppenderControl(map.get(name)));
    }
 else {
      LOGGER.error("String_Node_Str" + name + "String_Node_Str");
    }
  }
  if (failoverAppenders.size() == 0) {
    LOGGER.error("String_Node_Str");
    ++errors;
  }
  if (errors == 0) {
    super.start();
  }
}
Program: 90905
Project: 90905
Buggy source:
/** 
 * Create a Failover Appender
 * @param name The name of the Appender (required).
 * @param primary The name of the primary Appender (required).
 * @param failovers The name of one or more Appenders to fail over to (at least one is required).
 * @param config The current Configuration (passed by the Configuration when the appender is created).
 * @param filter A Filter (optional).
 * @param suppress "true" if exceptions should be hidden from the application, "false" otherwise.The default is "true".
 * @return The FailoverAppender that was created.
 */
@PluginFactory public static FailoverAppender createAppender(@PluginAttr("String_Node_Str") String name,@PluginAttr("String_Node_Str") String primary,@PluginElement("String_Node_Str") String[] failovers,@PluginConfiguration Configuration config,@PluginElement("String_Node_Str") Filter filter,@PluginAttr("String_Node_Str") String suppress){
  if (name == null) {
    logger.error("String_Node_Str");
    return null;
  }
  if (primary == null) {
    logger.error("String_Node_Str");
    return null;
  }
  if (failovers == null || failovers.length == 0) {
    logger.error("String_Node_Str");
    return null;
  }
  boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  return new FailoverAppender(name,filter,primary,failovers,config,handleExceptions);
}

Fixed version (ground truth):
/** 
 * Create a Failover Appender.
 * @param name The name of the Appender (required).
 * @param primary The name of the primary Appender (required).
 * @param failovers The name of one or more Appenders to fail over to (at least one is required).
 * @param config The current Configuration (passed by the Configuration when the appender is created).
 * @param filter A Filter (optional).
 * @param suppress "true" if exceptions should be hidden from the application, "false" otherwise.The default is "true".
 * @return The FailoverAppender that was created.
 */
@PluginFactory public static FailoverAppender createAppender(@PluginAttr("String_Node_Str") String name,@PluginAttr("String_Node_Str") String primary,@PluginElement("String_Node_Str") String[] failovers,@PluginConfiguration Configuration config,@PluginElement("String_Node_Str") Filter filter,@PluginAttr("String_Node_Str") String suppress){
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (primary == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (failovers == null || failovers.length == 0) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  boolean handleExceptions=suppress == null ? true : Boolean.valueOf(suppress);
  return new FailoverAppender(name,filter,primary,failovers,config,handleExceptions);
}
Program: 90907
Project: 90907
Buggy source:
/** 
 * Constructor.
 * @param file The File to monitor.
 * @param listeners The List of ConfigurationListeners to notify upon a change.
 * @param interval The monitor interval in seconds. The minimum interval is 30 seconds.
 */
public FileConfigurationMonitor(File file,List<ConfigurationListener> listeners,int interval){
  this.file=file;
  this.lastModified=file.lastModified();
  this.listeners=listeners;
  this.interval=(interval < MIN_INTERVAL ? MIN_INTERVAL : interval) * 1000;
  this.nextCheck=System.currentTimeMillis() + interval;
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param file The File to monitor.
 * @param listeners The List of ConfigurationListeners to notify upon a change.
 * @param interval The monitor interval in seconds. The minimum interval is 30 seconds.
 */
public FileConfigurationMonitor(File file,List<ConfigurationListener> listeners,int interval){
  this.file=file;
  this.lastModified=file.lastModified();
  this.listeners=listeners;
  this.interval=(interval < MIN_INTERVAL ? MIN_INTERVAL : interval) * MILLIS_PER_SECOND;
  this.nextCheck=System.currentTimeMillis() + interval;
}
Program: 90908
Project: 90908
Buggy source:
protected byte[] toByteArray(InputStream is) throws IOException {
  ByteArrayOutputStream buffer=new ByteArrayOutputStream();
  int nRead;
  byte[] data=new byte[16384];
  while ((nRead=is.read(data,0,data.length)) != -1) {
    buffer.write(data,0,nRead);
  }
  return buffer.toByteArray();
}

Fixed version (ground truth):
protected byte[] toByteArray(InputStream is) throws IOException {
  ByteArrayOutputStream buffer=new ByteArrayOutputStream();
  int nRead;
  byte[] data=new byte[BUF_SIZE];
  while ((nRead=is.read(data,0,data.length)) != -1) {
    buffer.write(data,0,nRead);
  }
  return buffer.toByteArray();
}
Program: 90911
Project: 90911
Buggy source:
protected void close(){
  if (os == System.out || os == System.err) {
    return;
  }
  try {
    os.close();
  }
 catch (  IOException ex) {
    logger.error("String_Node_Str" + getName() + "String_Node_Str"+ ex);
  }
}

Fixed version (ground truth):
protected void close(){
  if (os == System.out || os == System.err) {
    return;
  }
  try {
    os.close();
  }
 catch (  IOException ex) {
    LOGGER.error("String_Node_Str" + getName() + "String_Node_Str"+ ex);
  }
}
Program: 90912
Project: 90912
Buggy source:
/** 
 * Set the header to write when the stream is opened.
 * @param header The header.
 */
public synchronized void setHeader(byte[] header){
  if (header != null) {
    try {
      this.os.write(header,0,header.length);
    }
 catch (    IOException ioe) {
      logger.error("String_Node_Str",ioe);
    }
  }
}

Fixed version (ground truth):
/** 
 * Set the header to write when the stream is opened.
 * @param header The header.
 */
public synchronized void setHeader(byte[] header){
  if (header != null) {
    try {
      this.os.write(header,0,header.length);
    }
 catch (    IOException ioe) {
      LOGGER.error("String_Node_Str",ioe);
    }
  }
}
Program: 90916
Project: 90916
Buggy source:
public int getPort(){
  return port;
}

Fixed version (ground truth):
/** 
 * Retrieve the port number.
 * @return The port number.
 */
public int getPort(){
  return port;
}
Program: 90917
Project: 90917
Buggy source:
public String toString(){
  return "String_Node_Str" + host + "String_Node_Str"+ port;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + host + "String_Node_Str"+ port;
}
Program: 90918
Project: 90918
Buggy source:
public String getHost(){
  return host;
}

Fixed version (ground truth):
/** 
 * Retrieve the host name.
 * @return The name of the host.
 */
public String getHost(){
  return host;
}
Program: 90919
Project: 90919
Buggy source:
@PluginFactory public static Agent createAgent(@PluginAttr("String_Node_Str") String host,@PluginAttr("String_Node_Str") String port){
  if (host == null) {
    host=DEFAULT_HOST;
  }
  int portNum;
  if (port != null) {
    try {
      portNum=Integer.parseInt(port);
    }
 catch (    Exception ex) {
      logger.error("String_Node_Str" + port,ex);
      return null;
    }
  }
 else {
    portNum=DEFAULT_PORT;
  }
  return new Agent(host,portNum);
}

Fixed version (ground truth):
/** 
 * Create an Agent.
 * @param host The host name.
 * @param port The port number.
 * @return The Agent.
 */
@PluginFactory public static Agent createAgent(@PluginAttr("String_Node_Str") String host,@PluginAttr("String_Node_Str") String port){
  if (host == null) {
    host=DEFAULT_HOST;
  }
  int portNum;
  if (port != null) {
    try {
      portNum=Integer.parseInt(port);
    }
 catch (    Exception ex) {
      LOGGER.error("String_Node_Str" + port,ex);
      return null;
    }
  }
 else {
    portNum=DEFAULT_PORT;
  }
  return new Agent(host,portNum);
}
Program: 90920
Project: 90920
Buggy source:
public FlumeEvent createEvent(LogEvent event,String hostname,String includes,String excludes,String required,String mdcPrefix,String eventPrefix,boolean compress){
  return new FlumeEvent(event,hostname,mdcIncludes,mdcExcludes,mdcRequired,mdcPrefix,eventPrefix,compressBody);
}

Fixed version (ground truth):
/** 
 * Create a Flume event.
 * @param event The Log4j LogEvent.
 * @param hostname The host name.
 * @param includes comma separated list of mdc elements to include.
 * @param excludes comma separated list of mdc elements to exclude.
 * @param required comma separated list of mdc elements that must be present with a value.
 * @param mdcPrefix The prefix to add to MDC key names.
 * @param eventPrefix The prefix to add to event fields.
 * @param compress If true the body will be compressed.
 * @return A Flume Event.
 */
public FlumeEvent createEvent(LogEvent event,String hostname,String includes,String excludes,String required,String mdcPrefix,String eventPrefix,boolean compress){
  return new FlumeEvent(event,hostname,mdcIncludes,mdcExcludes,mdcRequired,mdcPrefix,eventPrefix,compressBody);
}
Program: 90922
Project: 90922
Buggy source:
public void append(LogEvent event){
  FlumeEvent flumeEvent=factory.createEvent(event,hostname,mdcIncludes,mdcExcludes,mdcRequired,mdcPrefix,eventPrefix,compressBody);
  flumeEvent.setBody(getLayout().format(flumeEvent));
  manager.send(flumeEvent,reconnectDelay,retries);
}

Fixed version (ground truth):
/** 
 * Publish the event.
 * @param event The LogEvent.
 */
public void append(LogEvent event){
  FlumeEvent flumeEvent=factory.createEvent(event,hostname,mdcIncludes,mdcExcludes,mdcRequired,mdcPrefix,eventPrefix,compressBody);
  flumeEvent.setBody(getLayout().format(flumeEvent));
  manager.send(flumeEvent,reconnectDelay,retries);
}
Program: 90923
Project: 90923
Buggy source:
@Test public void testClassName(){
  Category category=Category.getInstance("String_Node_Str");
  Layout layout=PatternLayout.createLayout("String_Node_Str",null,null,null);
  ListAppender appender=new ListAppender("String_Node_Str",null,layout,false,false);
  appender.start();
  category.setAdditivity(false);
  category.getLogger().addAppender(appender);
  category.error("String_Node_Str");
  List<String> msgs=appender.getMessages();
  assertTrue("String_Node_Str" + msgs.size(),msgs.size() == 1);
  String msg=msgs.get(0);
  appender.clear();
  String expected="String_Node_Str";
  assertTrue("String_Node_Str",msg.endsWith(expected));
}

Fixed version (ground truth):
@Test public void testClassName(){
  Category category=Category.getInstance("String_Node_Str");
  Layout layout=PatternLayout.createLayout("String_Node_Str",null,null,null);
  ListAppender appender=new ListAppender("String_Node_Str",null,layout,false,false);
  appender.start();
  category.setAdditivity(false);
  category.getLogger().addAppender(appender);
  category.error("String_Node_Str");
  List<String> msgs=appender.getMessages();
  assertTrue("String_Node_Str" + msgs.size(),msgs.size() == 1);
  String msg=msgs.get(0);
  appender.clear();
  String expected="String_Node_Str";
  assertTrue("String_Node_Str" + msg + "String_Node_Str"+ "String_Node_Str"+ expected+ "String_Node_Str",msg.endsWith(expected));
}
Program: 90924
Project: 90924
Buggy source:
@Test public void testClassName(){
  Category category=Category.getInstance("String_Node_Str");
  Layout layout=PatternLayout.createLayout("String_Node_Str",null);
  ListAppender appender=new ListAppender("String_Node_Str",null,layout,false,false);
  appender.start();
  category.setAdditivity(false);
  category.getLogger().addAppender(appender);
  category.error("String_Node_Str");
  List<String> msgs=appender.getMessages();
  assertTrue("String_Node_Str" + msgs.size(),msgs.size() == 1);
  String msg=msgs.get(0);
  appender.clear();
  String expected="String_Node_Str";
  assertTrue("String_Node_Str",msg.endsWith(expected));
}

Fixed version (ground truth):
@Test public void testClassName(){
  Category category=Category.getInstance("String_Node_Str");
  Layout layout=PatternLayout.createLayout("String_Node_Str",null,null,null);
  ListAppender appender=new ListAppender("String_Node_Str",null,layout,false,false);
  appender.start();
  category.setAdditivity(false);
  category.getLogger().addAppender(appender);
  category.error("String_Node_Str");
  List<String> msgs=appender.getMessages();
  assertTrue("String_Node_Str" + msgs.size(),msgs.size() == 1);
  String msg=msgs.get(0);
  appender.clear();
  String expected="String_Node_Str";
  assertTrue("String_Node_Str",msg.endsWith(expected));
}
Program: 90925
Project: 90925
Buggy source:
public boolean hasLogger(String name){
  return loggers.containsKey(name);
}

Fixed version (ground truth):
/** 
 * Determine if the specified Logger exists.
 * @param name The Logger name to search for.
 * @return True if the Logger exists, false otherwise.
 */
public boolean hasLogger(String name){
  return loggers.containsKey(name);
}
Program: 90926
Project: 90926
Buggy source:
public void onChange(){
  reconfigure();
}

Fixed version (ground truth):
/** 
 * Cause a reconfiguration to take place when the underlying configuration file changes.
 */
public void onChange(){
  reconfigure();
}
Program: 90927
Project: 90927
Buggy source:
public void updateLoggers(Configuration config){
  for (  Logger logger : loggers.values()) {
    logger.updateConfiguration(config);
  }
}

Fixed version (ground truth):
/** 
 * Cause all Logger to be updated against the specified Configuration.
 * @param config The Configuration.
 */
public void updateLoggers(Configuration config){
  for (  Logger logger : loggers.values()) {
    logger.updateConfiguration(config);
  }
}
Program: 90928
Project: 90928
Buggy source:
public Logger getLogger(LoggerFactory factory,String name){
  Logger logger=loggers.get(name);
  if (logger != null) {
    return logger;
  }
  logger=(Logger)factory.newInstance(this,name);
  Logger prev=loggers.putIfAbsent(name,logger);
  return prev == null ? logger : prev;
}

Fixed version (ground truth):
/** 
 * Obtain a Logger from the Context using the specified LoggerFactory.
 * @param factory The LoggerFactory.
 * @param name The name of the Logger.
 * @return The Logger.
 */
public Logger getLogger(LoggerFactory factory,String name){
  Logger logger=loggers.get(name);
  if (logger != null) {
    return logger;
  }
  logger=(Logger)factory.newInstance(this,name);
  Logger prev=loggers.putIfAbsent(name,logger);
  return prev == null ? logger : prev;
}
Program: 90929
Project: 90929
Buggy source:
public void removeFiler(Filter filter){
  config.removeFilter(filter);
}

Fixed version (ground truth):
/** 
 * Removes a Filter from the current Configuration.
 * @param filter The Filter to remove.
 */
public void removeFiler(Filter filter){
  config.removeFilter(filter);
}
Program: 90930
Project: 90930
Buggy source:
public LoggerContext(String name,Object externalContext,String configLocn){
  contextName=name;
  this.externalContext=externalContext;
  if (configLocn != null) {
    URI uri;
    try {
      uri=new File(configLocn).toURI();
    }
 catch (    Exception ex) {
      uri=null;
    }
    configLocation=uri;
  }
 else {
    configLocation=null;
  }
  reconfigure();
}

Fixed version (ground truth):
/** 
 * Constructor taking a name external context and a configuration location String. The location must be resolvable to a File.
 * @param name The configuration location.
 * @param externalContext The external context.
 * @param configLocn The configuration location.
 */
public LoggerContext(String name,Object externalContext,String configLocn){
  contextName=name;
  this.externalContext=externalContext;
  if (configLocn != null) {
    URI uri;
    try {
      uri=new File(configLocn).toURI();
    }
 catch (    Exception ex) {
      uri=null;
    }
    configLocation=uri;
  }
 else {
    configLocation=null;
  }
  reconfigure();
}