nus-yam/ex-repair huggingface dataset:
Program: 28417
Project: 28417
Buggy source:
private String longToString(long val){
  return (new Long(val)).toString();
}

Fixed version (ground truth):
private String longToString(long val){
  return Long.toString(val);
}
Program: 28418
Project: 28418
Buggy source:
private String intToString(int val){
  return (new Integer(val)).toString();
}

Fixed version (ground truth):
private String intToString(int val){
  return Integer.toString(val);
}
Program: 28419
Project: 28419
Buggy source:
double getValue(){
  return this.value;
}

Fixed version (ground truth):
public double getValue(){
  return this.value;
}
Program: 28420
Project: 28420
Buggy source:
@Override void print(IndentingStringBuffer sb){
  sb.println("String_Node_Str" + getValue() + "String_Node_Str"+ getRegexp());
}

Fixed version (ground truth):
@Override public void print(IndentingStringBuffer sb){
  sb.println("String_Node_Str" + getValue() + "String_Node_Str"+ getRegexp());
}
Program: 28421
Project: 28421
Buggy source:
DoubleValue(){
}

Fixed version (ground truth):
public DoubleValue(){
}
Program: 28422
Project: 28422
Buggy source:
@Override Object getJsonValue() throws Exception {
  assertJsonable();
  return new Double(getValue());
}

Fixed version (ground truth):
@Override public Object getJsonValue() throws Exception {
  assertJsonable();
  return getValue();
}
Program: 28423
Project: 28423
Buggy source:
void println(String val){
  sb.append(indenter.getIndent()).append(val).append("String_Node_Str");
}

Fixed version (ground truth):
public void println(String val){
  sb.append(indenter.getIndent()).append(val).append("String_Node_Str");
}
Program: 28424
Project: 28424
Buggy source:
void undent(){
  indenter.undent();
}

Fixed version (ground truth):
public void undent(){
  indenter.undent();
}
Program: 28425
Project: 28425
Buggy source:
void indent(){
  indenter.indent();
}

Fixed version (ground truth):
public void indent(){
  indenter.indent();
}
Program: 28426
Project: 28426
Buggy source:
int getValue(){
  return this.value;
}

Fixed version (ground truth):
public int getValue(){
  return this.value;
}
Program: 28427
Project: 28427
Buggy source:
@Override void print(IndentingStringBuffer sb){
  sb.println("String_Node_Str" + getValue() + "String_Node_Str"+ getRegexp());
}

Fixed version (ground truth):
@Override public void print(IndentingStringBuffer sb){
  sb.println("String_Node_Str" + getValue() + "String_Node_Str"+ getRegexp());
}
Program: 28428
Project: 28428
Buggy source:
IntValue(){
}

Fixed version (ground truth):
public IntValue(){
}
Program: 28429
Project: 28429
Buggy source:
@Override Object getJsonValue() throws Exception {
  assertJsonable();
  return new Integer(getValue());
}

Fixed version (ground truth):
@Override public Object getJsonValue() throws Exception {
  assertJsonable();
  return getValue();
}
Program: 28430
Project: 28430
Buggy source:
@Override void print(IndentingStringBuffer sb){
  sb.println("String_Node_Str" + getValue() + "String_Node_Str"+ getRegexp());
}

Fixed version (ground truth):
@Override public void print(IndentingStringBuffer sb){
  sb.println("String_Node_Str" + getValue() + "String_Node_Str"+ getRegexp());
}
Program: 28431
Project: 28431
Buggy source:
@Override Object getJsonValue() throws Exception {
  assertJsonable();
  return new Long(getValue());
}

Fixed version (ground truth):
@Override public Object getJsonValue() throws Exception {
  assertJsonable();
  return getValue();
}
Program: 28432
Project: 28432
Buggy source:
String getRegexp(){
  return this.regexp;
}

Fixed version (ground truth):
public String getRegexp(){
  return regexp;
}
Program: 28433
Project: 28433
Buggy source:
public ScalarValue regexp(String val){
  this.regexp=val;
  return this;
}

Fixed version (ground truth):
public ScalarValue regexp(String val){
  regexp=val;
  return this;
}
Program: 28434
Project: 28434
Buggy source:
public boolean isValid(final String s,final ConstraintValidatorContext constraintValidatorContext){
  try {
    if (s == null) {
      return true;
    }
    int value=Integer.parseInt(s);
    return (value >= min && value <= max);
  }
 catch (  NumberFormatException e) {
    return s != null && s.charAt(0) == '$' && s.charAt(1) == '{' && s.charAt(s.length() - 1) == '}';
  }
}

Fixed version (ground truth):
public boolean isValid(final String s,final ConstraintValidatorContext constraintValidatorContext){
  if (s == null) {
    return true;
  }
  try {
    int value=Integer.parseInt(s);
    return (value >= min && value <= max);
  }
 catch (  NumberFormatException e) {
    return s.charAt(0) == '$' && s.charAt(1) == '{' && s.charAt(s.length() - 1) == '}';
  }
}
Program: 28435
Project: 28435
Buggy source:
/** 
 * if the connector is supporting non-SSL requests and a request is received for which a matching security-constraint requires SSL transport catalina will automatically redirect the request to the port number specified here
 */
@Attribute(dataType=Integer.class) String getRedirectPort();

Fixed version (ground truth):
/** 
 * if the connector is supporting non-SSL requests and a request is received for which a matching security-constraint requires SSL transport catalina will automatically redirect the request to the port number specified here
 */
@Attribute(dataType=Integer.class) @Range(min=0,max=65535) String getRedirectPort();
Program: 28436
Project: 28436
Buggy source:
/** 
 * @return the network port the request should be redirected to.  If novalue was specified, the default of <code>-1</code> will be returned which signifies a redirection to the same port the current request was made on
 */
@Attribute(defaultValue="String_Node_Str" + PORT,dataType=Integer.class) String getPort();

Fixed version (ground truth):
/** 
 * @return the network port the request should be redirected to.  If novalue was specified, the default of <code>-1</code> will be returned which signifies a redirection to the same port the current request was made on
 */
@Attribute(defaultValue="String_Node_Str" + PORT,dataType=Integer.class) @Range(min=-1,max=65535) String getPort();
Program: 28437
Project: 28437
Buggy source:
/** 
 * Port to listen on
 */
@Attribute(required=true,dataType=Integer.class) String getPort();

Fixed version (ground truth):
/** 
 * Port to listen on
 */
@Attribute(required=true,dataType=Integer.class) @Range(min=0,max=65535) String getPort();
Program: 28438
Project: 28438
Buggy source:
/** 
 * if the connector is supporting non-SSL requests and a request is received for which a matching security-constraint requires SSL transport catalina will automatically redirect the request to the port number specified here
 */
@Attribute(dataType=Integer.class) String getRedirectPort();

Fixed version (ground truth):
/** 
 * if the connector is supporting non-SSL requests and a request is received for which a matching security-constraint requires SSL transport catalina will automatically redirect the request to the port number specified here
 */
@Attribute(dataType=Integer.class) @Min(0) @Max(65535) String getRedirectPort();
Program: 28439
Project: 28439
Buggy source:
/** 
 * @return the network port the request should be redirected to.  If novalue was specified, the default of <code>-1</code> will be returned which signifies a redirection to the same port the current request was made on
 */
@Attribute(defaultValue="String_Node_Str" + PORT,dataType=Integer.class) String getPort();

Fixed version (ground truth):
/** 
 * @return the network port the request should be redirected to.  If novalue was specified, the default of <code>-1</code> will be returned which signifies a redirection to the same port the current request was made on
 */
@Attribute(defaultValue="String_Node_Str" + PORT,dataType=Integer.class) @Min(0) @Max(65535) String getPort();
Program: 28440
Project: 28440
Buggy source:
/** 
 * Port to listen on
 */
@Attribute(required=true,dataType=Integer.class) String getPort();

Fixed version (ground truth):
/** 
 * Port to listen on
 */
@Attribute(required=true,dataType=Integer.class) @Min(0) @Max(65535) String getPort();
Program: 28441
Project: 28441
Buggy source:
/** 
 * @return the network port the request should be redirected to.  If novalue was specified, the default of <code>-1</code> will be returned which signifies a redirection to the same port the current request was made on
 */
@Attribute(defaultValue="String_Node_Str" + PORT,dataType=Integer.class) @Min(0) @Max(65535) String getPort();

Fixed version (ground truth):
/** 
 * @return the network port the request should be redirected to.  If novalue was specified, the default of <code>-1</code> will be returned which signifies a redirection to the same port the current request was made on
 */
@Attribute(defaultValue="String_Node_Str" + PORT,dataType=Integer.class) @Min(-1) @Max(65535) String getPort();
Program: 28442
Project: 28442
Buggy source:
/** 
 * Change the session id of the current session associated with this request and return the new session id. 
 * @return the new session id
 * @throws IllegalStateException if there is no session associatedwith the request
 * @since Servlet 3.1
 */
@Override public String changeSessionId(){
  Manager manager=context.getManager();
  if (manager == null) {
    throw new IllegalStateException(rb.getString(CHANGE_SESSION_ID_BEEN_CALLED_EXCEPTION));
  }
  Session session=getSessionInternal(false);
  if (session == null) {
    throw new IllegalStateException(rb.getString(CHANGE_SESSION_ID_BEEN_CALLED_EXCEPTION));
  }
  String oldSessionId=session.getId();
  manager.changeSessionId(session);
  String newSessionId=session.getId();
  if (requestedSessionId != null && requestedSessionId.length() > 0) {
    requestedSessionId=newSessionId;
  }
  if (context != null && !context.getCookies())   return oldSessionId;
  if (response != null) {
    String sessionCookieName=((getContext() != null) ? getContext().getSessionCookieName() : Globals.SESSION_COOKIE_NAME);
    Cookie newCookie=new Cookie(sessionCookieName,newSessionId);
    configureSessionCookie(newCookie);
    ((HttpResponse)response).addSessionCookieInternal(newCookie);
  }
  return newSessionId;
}

Fixed version (ground truth):
/** 
 * Change the session id of the current session associated with this request and return the new session id. 
 * @return the new session id
 * @throws IllegalStateException if there is no session associatedwith the request
 * @since Servlet 3.1
 */
@Override public String changeSessionId(){
  Manager manager=context.getManager();
  if (manager == null) {
    throw new IllegalStateException(rb.getString(CHANGE_SESSION_ID_BEEN_CALLED_EXCEPTION));
  }
  Session session=getSessionInternal(false);
  if (session == null) {
    throw new IllegalStateException(rb.getString(CHANGE_SESSION_ID_BEEN_CALLED_EXCEPTION));
  }
  manager.changeSessionId(session);
  String newSessionId=session.getId();
  if (requestedSessionId != null && requestedSessionId.length() > 0) {
    requestedSessionId=newSessionId;
  }
  addSessionCookie();
  return newSessionId;
}
Program: 28444
Project: 28444
Buggy source:
/** 
 * Notifies this Request that the container-initiated dispatch during which ServletRequest#startAsync was called is about to return to the container
 */
void onAfterService(){
  if (asyncContext != null) {
    asyncContext.setOkToConfigure(false);
    if (asyncStarted.get()) {
      coyoteRequest.getResponse().getSuspendContext().setTimeout(asyncContext.getTimeout(),TimeUnit.MILLISECONDS);
    }
    delayAsyncDispatchAndComplete=false;
    processAsyncOperations();
  }
}

Fixed version (ground truth):
/** 
 * Notifies this Request that the container-initiated dispatch during which ServletRequest#startAsync was called is about to return to the container
 */
void onAfterService(){
  if (asyncContext != null) {
    asyncContext.setOkToConfigure(false);
    if (asyncStarted.get()) {
      coyoteRequest.getResponse().getSuspendContext().setTimeout(asyncContext.getTimeout(),TimeUnit.MILLISECONDS);
    }
    delayAsyncDispatchAndComplete=false;
    processAsyncOperations();
  }
  afterService=true;
  if (resume) {
    coyoteRequest.getResponse().resume();
  }
}
Program: 28446
Project: 28446
Buggy source:
@Override public void close() throws Exception {
  if (isClosed.compareAndSet(false,true)) {
    if ((request != null) && (request.isUpgrade())) {
      Context context=request.getContext();
      HttpUpgradeHandler httpUpgradeHandler=request.getHttpUpgradeHandler();
      Exception exception=null;
      try {
        try {
          context.fireContainerEvent(ContainerEvent.BEFORE_UPGRADE_HANDLER_DESTROYED,httpUpgradeHandler);
          httpUpgradeHandler.destroy();
        }
  finally {
          context.fireContainerEvent(ContainerEvent.AFTER_UPGRADE_HANDLER_DESTROYED,httpUpgradeHandler);
        }
        request.setUpgrade(false);
        if (response != null) {
          response.setUpgrade(false);
        }
      }
  finally {
        try {
          inputStream.close();
        }
 catch (        Exception ex) {
          exception=ex;
        }
        try {
          outputStream.close();
        }
 catch (        Exception ex) {
          exception=ex;
        }
        context.fireContainerEvent(ContainerEvent.PRE_DESTROY,httpUpgradeHandler);
        request.getCoyoteRequest().getResponse().resume();
      }
      if (exception != null) {
        throw exception;
      }
    }
  }
}

Fixed version (ground truth):
@Override public void close() throws Exception {
  if (isClosed.compareAndSet(false,true)) {
    if ((request != null) && (request.isUpgrade())) {
      Context context=request.getContext();
      HttpUpgradeHandler httpUpgradeHandler=request.getHttpUpgradeHandler();
      Exception exception=null;
      try {
        try {
          context.fireContainerEvent(ContainerEvent.BEFORE_UPGRADE_HANDLER_DESTROYED,httpUpgradeHandler);
          httpUpgradeHandler.destroy();
        }
  finally {
          context.fireContainerEvent(ContainerEvent.AFTER_UPGRADE_HANDLER_DESTROYED,httpUpgradeHandler);
        }
        request.setUpgrade(false);
        if (response != null) {
          response.setUpgrade(false);
        }
      }
  finally {
        try {
          inputStream.close();
        }
 catch (        Exception ex) {
          exception=ex;
        }
        try {
          outputStream.close();
        }
 catch (        Exception ex) {
          exception=ex;
        }
        context.fireContainerEvent(ContainerEvent.PRE_DESTROY,httpUpgradeHandler);
        request.resumeAfterService();
      }
      if (exception != null) {
        throw exception;
      }
    }
  }
}
Program: 28450
Project: 28450
Buggy source:
public void setupNetwork() throws IOException {
  validateConfig(config);
synchronized (listeners) {
    AbstractMemoryManager amm=null;
    for (    final NetworkListener listener : config.getNetworkListeners().getNetworkListener()) {
      final GenericGrizzlyListener grizzlyListener=new GenericGrizzlyListener();
      grizzlyListener.configure(habitat,listener);
      final MemoryManager mm=grizzlyListener.transport.getMemoryManager();
      if (mm instanceof AbstractMemoryManager) {
        amm=(AbstractMemoryManager)mm;
      }
      listeners.add(grizzlyListener);
      try {
        grizzlyListener.start();
      }
 catch (      IOException e) {
        logger.log(Level.SEVERE,e.getMessage(),e);
      }
    }
  }
}

Fixed version (ground truth):
public void setupNetwork() throws IOException {
  validateConfig(config);
synchronized (listeners) {
    for (    final NetworkListener listener : config.getNetworkListeners().getNetworkListener()) {
      final GenericGrizzlyListener grizzlyListener=new GenericGrizzlyListener();
      grizzlyListener.configure(habitat,listener);
      listeners.add(grizzlyListener);
      try {
        grizzlyListener.start();
      }
 catch (      IOException e) {
        logger.log(Level.SEVERE,e.getMessage(),e);
      }
    }
  }
}
Program: 28451
Project: 28451
Buggy source:
public void setupNetwork() throws IOException {
  validateConfig(config);
synchronized (listeners) {
    AbstractMemoryManager amm=null;
    for (    final NetworkListener listener : config.getNetworkListeners().getNetworkListener()) {
      final GenericGrizzlyListener grizzlyListener=new GenericGrizzlyListener();
      grizzlyListener.configure(habitat,listener);
      final MemoryManager mm=grizzlyListener.transport.getMemoryManager();
      if (mm instanceof AbstractMemoryManager) {
        amm=(AbstractMemoryManager)mm;
      }
      listeners.add(grizzlyListener);
      final Thread thread=new DefaultWorkerThread(Grizzly.DEFAULT_ATTRIBUTE_BUILDER,grizzlyListener.getName(),amm != null ? amm.createThreadLocalPool() : null,new ListenerRunnable(grizzlyListener));
      thread.setDaemon(true);
      thread.start();
    }
    try {
      listeners.wait(1000);
    }
 catch (    InterruptedException e) {
      logger.warning(e.getMessage());
      throw new RuntimeException(e.getMessage());
    }
  }
}

Fixed version (ground truth):
public void setupNetwork() throws IOException {
  validateConfig(config);
synchronized (listeners) {
    AbstractMemoryManager amm=null;
    for (    final NetworkListener listener : config.getNetworkListeners().getNetworkListener()) {
      final GenericGrizzlyListener grizzlyListener=new GenericGrizzlyListener();
      grizzlyListener.configure(habitat,listener);
      final MemoryManager mm=grizzlyListener.transport.getMemoryManager();
      if (mm instanceof AbstractMemoryManager) {
        amm=(AbstractMemoryManager)mm;
      }
      listeners.add(grizzlyListener);
      try {
        grizzlyListener.start();
      }
 catch (      IOException e) {
        logger.log(Level.SEVERE,e.getMessage(),e);
      }
    }
  }
}
Program: 28452
Project: 28452
Buggy source:
public abstract void addMimeMapping(MimeMapping mimeMapping);

Fixed version (ground truth):
public abstract String addMimeMapping(MimeMapping mimeMapping);
Program: 28453
Project: 28453
Buggy source:
public abstract void add(WebComponentDescriptor other,boolean combineUrlPatterns);

Fixed version (ground truth):
public abstract void add(WebComponentDescriptor other,boolean combineUrlPatterns,boolean combineConflict);
Program: 28454
Project: 28454
Buggy source:
/** 
 * This method combines descriptor except urlPattern and add to current bundle descriptor if necessary. It returns the web component descriptor in the current bundle descriptor.
 * @param webComponentDescriptor the new descriptor
 * @return web component descriptor in current bundle
 */
protected WebComponentDescriptor combineWebComponentDescriptor(WebComponentDescriptor webComponentDescriptor){
  WebComponentDescriptor resultDesc=null;
  String name=webComponentDescriptor.getCanonicalName();
  WebComponentDescriptor webCompDesc=getWebComponentByCanonicalName(name);
  if (webCompDesc != null) {
    resultDesc=webCompDesc;
    if (!webCompDesc.isConflict(webComponentDescriptor,true)) {
      webCompDesc.add(webComponentDescriptor,false);
    }
    String implFile=webCompDesc.getWebComponentImplementation();
    if (webComponentDescriptor.isConflict() && (implFile == null || implFile.length() == 0)) {
      throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str"));
    }
  }
 else {
    resultDesc=webComponentDescriptor;
    if (webComponentDescriptor.isConflict()) {
      throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str"));
    }
 else {
      this.getWebComponentDescriptors().add(webComponentDescriptor);
    }
  }
  return resultDesc;
}

Fixed version (ground truth):
/** 
 * This method combines descriptor except urlPattern and add to current bundle descriptor if necessary. It returns the web component descriptor in the current bundle descriptor.
 * @param webComponentDescriptor the new descriptor
 * @return web component descriptor in current bundle
 */
protected WebComponentDescriptor combineWebComponentDescriptor(WebComponentDescriptor webComponentDescriptor){
  WebComponentDescriptor resultDesc=null;
  String name=webComponentDescriptor.getCanonicalName();
  WebComponentDescriptor webCompDesc=getWebComponentByCanonicalName(name);
  if (webCompDesc != null) {
    resultDesc=webCompDesc;
    if (!webCompDesc.isConflict(webComponentDescriptor,true)) {
      webCompDesc.add(webComponentDescriptor,false,false);
    }
    String implFile=webCompDesc.getWebComponentImplementation();
    if (resultDesc.isConflict() && (implFile == null || implFile.length() == 0)) {
      throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str"));
    }
    if (resultDesc.getConflictedInitParameterNames().size() > 0) {
      throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str"));
    }
  }
 else {
    resultDesc=webComponentDescriptor;
    if (resultDesc.isConflict()) {
      throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str"));
    }
 else {
      this.getWebComponentDescriptors().add(resultDesc);
    }
  }
  return resultDesc;
}
Program: 28455
Project: 28455
Buggy source:
/** 
 * add the given mime mapping to my list.
 */
public void addMimeMapping(MimeMappingDescriptor mimeMapping){
  addMimeMapping((MimeMapping)mimeMapping);
}

Fixed version (ground truth):
/** 
 * add the given mime mapping to my list.
 */
public String addMimeMapping(MimeMappingDescriptor mimeMapping){
  return addMimeMapping((MimeMapping)mimeMapping);
}
Program: 28458
Project: 28458
Buggy source:
/** 
 * The copy constructor.
 */
public WebComponentDescriptorImpl(WebComponentDescriptor other){
  setCanonicalName(other.getCanonicalName());
  setServlet(other.isServlet());
  setWebComponentImplementation(other.getWebComponentImplementation());
  getInitializationParameterSet().addAll(other.getInitializationParameterSet());
  getUrlPatternsSet().addAll(other.getUrlPatternsSet());
  setLoadOnStartUp(other.getLoadOnStartUp());
  getSecurityRoleReferenceSet().addAll(other.getSecurityRoleReferenceSet());
  setRunAsIdentity(other.getRunAsIdentity());
  setAsyncSupported(other.isAsyncSupported());
  setMultipartConfig(other.getMultipartConfig());
  setWebBundleDescriptor(other.getWebBundleDescriptor());
  setConflict(other.isConflict());
}

Fixed version (ground truth):
/** 
 * The copy constructor.
 */
public WebComponentDescriptorImpl(WebComponentDescriptor other){
  setCanonicalName(other.getCanonicalName());
  setServlet(other.isServlet());
  setWebComponentImplementation(other.getWebComponentImplementation());
  getInitializationParameterSet().addAll(other.getInitializationParameterSet());
  getUrlPatternsSet().addAll(other.getUrlPatternsSet());
  setLoadOnStartUp(other.getLoadOnStartUp());
  getSecurityRoleReferenceSet().addAll(other.getSecurityRoleReferenceSet());
  setRunAsIdentity(other.getRunAsIdentity());
  setAsyncSupported(other.isAsyncSupported());
  setMultipartConfig(other.getMultipartConfig());
  setWebBundleDescriptor(other.getWebBundleDescriptor());
  conflictedInitParameterNames=other.getConflictedInitParameterNames();
  setConflict(other.isConflict());
}
Program: 28459
Project: 28459
Buggy source:
@Override protected WebComponentDescriptor combineWebComponentDescriptor(WebComponentDescriptor webComponentDescriptor){
  WebComponentDescriptor resultDesc=null;
  String name=webComponentDescriptor.getCanonicalName();
  WebComponentDescriptor webCompDesc=getWebComponentByCanonicalName(name);
  if (webCompDesc != null) {
    resultDesc=webCompDesc;
    if (webCompDesc.isConflict(webComponentDescriptor,false)) {
      webCompDesc.setConflict(true);
    }
 else {
      webCompDesc.add(webComponentDescriptor);
    }
  }
 else {
    resultDesc=webComponentDescriptor;
    this.getWebComponentDescriptors().add(webComponentDescriptor);
  }
  return resultDesc;
}

Fixed version (ground truth):
@Override protected WebComponentDescriptor combineWebComponentDescriptor(WebComponentDescriptor webComponentDescriptor){
  WebComponentDescriptor resultDesc=null;
  String name=webComponentDescriptor.getCanonicalName();
  WebComponentDescriptor webCompDesc=getWebComponentByCanonicalName(name);
  if (webCompDesc != null) {
    resultDesc=webCompDesc;
    if (webCompDesc.isConflict(webComponentDescriptor,false)) {
      webCompDesc.setConflict(true);
    }
 else {
      webCompDesc.add(webComponentDescriptor,true,true);
    }
  }
 else {
    resultDesc=webComponentDescriptor;
    this.getWebComponentDescriptors().add(webComponentDescriptor);
  }
  return resultDesc;
}
Program: 28460
Project: 28460
Buggy source:
public void checkClientTrusted(X509Certificate[] certs,String authType){
}

Fixed version (ground truth):
@Override public void checkClientTrusted(X509Certificate[] certs,String authType){
}
Program: 28461
Project: 28461
Buggy source:
public void checkServerTrusted(X509Certificate[] certs,String authType){
}

Fixed version (ground truth):
@Override public void checkServerTrusted(X509Certificate[] certs,String authType){
}
Program: 28462
Project: 28462
Buggy source:
protected String getContent(URLConnection connection){
  try {
    InputStream inputStream=connection.getInputStream();
    InputStreamReader reader=new InputStreamReader(inputStream);
    try {
      StringBuilder builder=new StringBuilder();
      char[] buffer=new char[1024];
      int read;
      while ((read=reader.read(buffer)) != -1) {
        builder.append(buffer,0,read);
      }
      return builder.toString();
    }
  finally {
      if (reader != null) {
        reader.close();
      }
      if (inputStream != null) {
        inputStream.close();
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
    Assert.fail(e.getMessage());
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
protected String getContent(URLConnection connection){
  try {
    InputStream inputStream=connection.getInputStream();
    InputStreamReader reader=new InputStreamReader(inputStream);
    try {
      StringBuilder builder=new StringBuilder();
      char[] buffer=new char[1024];
      int read;
      while ((read=reader.read(buffer)) != -1) {
        builder.append(buffer,0,read);
      }
      return builder.toString();
    }
  finally {
      reader.close();
      if (inputStream != null) {
        inputStream.close();
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
    Assert.fail(e.getMessage());
  }
  return "String_Node_Str";
}
Program: 28463
Project: 28463
Buggy source:
public SSLSocketFactory getSSLSocketFactory() throws IOException {
  try {
    TrustManager[] trustAllCerts=new TrustManager[]{new X509TrustManager(){
      public X509Certificate[] getAcceptedIssuers(){
        return null;
      }
      public void checkClientTrusted(      X509Certificate[] certs,      String authType){
      }
      public void checkServerTrusted(      X509Certificate[] certs,      String authType){
      }
    }
};
    SSLContext sc=SSLContext.getInstance("String_Node_Str");
    sc.init(null,trustAllCerts,new SecureRandom());
    return sc.getSocketFactory();
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new IOException(e.getMessage());
  }
}

Fixed version (ground truth):
public SSLSocketFactory getSSLSocketFactory() throws IOException {
  try {
    TrustManager[] trustAllCerts=new TrustManager[]{new X509TrustManager(){
      @Override public X509Certificate[] getAcceptedIssuers(){
        return null;
      }
      @Override public void checkClientTrusted(      X509Certificate[] certs,      String authType){
      }
      @Override public void checkServerTrusted(      X509Certificate[] certs,      String authType){
      }
    }
};
    SSLContext sc=SSLContext.getInstance("String_Node_Str");
    sc.init(null,trustAllCerts,new SecureRandom());
    return sc.getSocketFactory();
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new IOException(e.getMessage());
  }
}
Program: 28464
Project: 28464
Buggy source:
public X509Certificate[] getAcceptedIssuers(){
  return null;
}

Fixed version (ground truth):
@Override public X509Certificate[] getAcceptedIssuers(){
  return null;
}
Program: 28465
Project: 28465
Buggy source:
protected void addStaticHttpHandler(GenericGrizzlyListener listener,int count){
  final String name=System.getProperty("String_Node_Str","String_Node_Str") + "String_Node_Str" + Dom.convertName(getClass().getSimpleName())+ count;
  File dir=new File(name);
  dir.mkdirs();
  FileWriter writer;
  try {
    writer=new FileWriter(new File(dir,"String_Node_Str"));
    try {
      writer.write("String_Node_Str" + listener.getPort() + "String_Node_Str");
      writer.flush();
    }
  finally {
      if (writer != null) {
        writer.close();
      }
    }
  }
 catch (  IOException e) {
    Assert.fail(e.getMessage());
  }
  final List<HttpServerFilter> httpServerFilters=listener.getFilters(HttpServerFilter.class);
  for (  HttpServerFilter httpServerFilter : httpServerFilters) {
    httpServerFilter.setHttpHandler(new StaticHttpHandler(name));
  }
}

Fixed version (ground truth):
protected void addStaticHttpHandler(GenericGrizzlyListener listener,int count){
  final String name="String_Node_Str" + Dom.convertName(getClass().getSimpleName()) + count;
  File dir=new File(name);
  dir.mkdirs();
  dir.deleteOnExit();
  FileWriter writer;
  try {
    final File file=new File(dir,"String_Node_Str");
    file.deleteOnExit();
    writer=new FileWriter(file);
    try {
      writer.write("String_Node_Str" + listener.getPort() + "String_Node_Str");
      writer.flush();
    }
  finally {
      writer.close();
    }
  }
 catch (  IOException e) {
    Assert.fail(e.getMessage());
  }
  final List<HttpServerFilter> httpServerFilters=listener.getFilters(HttpServerFilter.class);
  for (  HttpServerFilter httpServerFilter : httpServerFilters) {
    httpServerFilter.setHttpHandler(new StaticHttpHandler(name));
  }
}
Program: 28467
Project: 28467
Buggy source:
public PrivilededLookup(ServiceLocator serviceLocator,Class<T> serviceClass){
  this(serviceLocator,serviceClass,null);
}

Fixed version (ground truth):
/** 
 * @param serviceLocator   the HK2 service locator
 * @param serviceClass   the protected HK2 service to be looked up
 */
public PrivilededLookup(ServiceLocator serviceLocator,Class<T> serviceClass){
  this(serviceLocator,serviceClass,null);
}
Program: 28468
Project: 28468
Buggy source:
private static int getMask(String actions){
  int mask=NONE;
  if (actions == null) {
    return mask;
  }
  if (actions == READ_ACTION) {
    return READ;
  }
  if (actions == WRITE_ACTION) {
    return WRITE;
  }
 else   if (actions == RW_ACTION) {
    return READ | WRITE;
  }
  char[] a=actions.toCharArray();
  int i=a.length - 1;
  if (i < 0)   return mask;
  while (i != -1) {
    char c;
    while ((i != -1) && ((c=a[i]) == ' ' || c == '\r' || c == '\n' || c == '\f' || c == '\t'))     i--;
    int matchlen;
    if (i >= 3 && (a[i - 3] == 'r' || a[i - 3] == 'R') && (a[i - 2] == 'e' || a[i - 2] == 'E') && (a[i - 1] == 'a' || a[i - 1] == 'A') && (a[i] == 'd' || a[i] == 'D')) {
      matchlen=4;
      mask|=READ;
    }
 else     if (i >= 4 && (a[i - 4] == 'w' || a[i - 4] == 'W') && (a[i - 3] == 'r' || a[i - 3] == 'R') && (a[i - 2] == 'i' || a[i - 2] == 'I') && (a[i - 1] == 't' || a[i - 1] == 'T') && (a[i] == 'e' || a[i] == 'E')) {
      matchlen=5;
      mask|=WRITE;
    }
 else {
      throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str",actions));
    }
    boolean seencomma=false;
    while (i >= matchlen && !seencomma) {
switch (a[i - matchlen]) {
case ',':
        seencomma=true;
case ' ':
case '\r':
case '\n':
case '\f':
case '\t':
      break;
default :
    throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str",actions));
}
i--;
}
i-=matchlen;
}
return mask;
}

Fixed version (ground truth):
private static int getMask(String actions){
  int mask=NONE;
  if (actions == null) {
    return mask;
  }
  if (actions.equalsIgnoreCase(READ_ACTION)) {
    return READ;
  }
  if (actions.equalsIgnoreCase(WRITE_ACTION)) {
    return WRITE;
  }
 else   if (actions.equalsIgnoreCase(RW_ACTION)) {
    return READ | WRITE;
  }
  char[] a=actions.toCharArray();
  int i=a.length - 1;
  if (i < 0)   return mask;
  while (i != -1) {
    char c;
    while ((i != -1) && ((c=a[i]) == ' ' || c == '\r' || c == '\n' || c == '\f' || c == '\t'))     i--;
    int matchlen;
    if (i >= 3 && (a[i - 3] == 'r' || a[i - 3] == 'R') && (a[i - 2] == 'e' || a[i - 2] == 'E') && (a[i - 1] == 'a' || a[i - 1] == 'A') && (a[i] == 'd' || a[i] == 'D')) {
      matchlen=4;
      mask|=READ;
    }
 else     if (i >= 4 && (a[i - 4] == 'w' || a[i - 4] == 'W') && (a[i - 3] == 'r' || a[i - 3] == 'R') && (a[i - 2] == 'i' || a[i - 2] == 'I') && (a[i - 1] == 't' || a[i - 1] == 'T') && (a[i] == 'e' || a[i] == 'E')) {
      matchlen=5;
      mask|=WRITE;
    }
 else {
      throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str",actions));
    }
    boolean seencomma=false;
    while (i >= matchlen && !seencomma) {
switch (a[i - matchlen]) {
case ',':
        seencomma=true;
case ' ':
case '\r':
case '\n':
case '\f':
case '\t':
      break;
default :
    throw new IllegalArgumentException(localStrings.getLocalString("String_Node_Str","String_Node_Str",actions));
}
i--;
}
i-=matchlen;
}
return mask;
}
Program: 28469
Project: 28469
Buggy source:
private static boolean twoStringEq(String s1,String s2){
  if (s1 == null && s2 == null)   return true;
  if (s1 == null) {
    return twoStringEq(s2,s1);
  }
 else   return s1.equals(s2);
}

Fixed version (ground truth):
private static boolean twoStringEq(String s1,String s2){
  if (s1 == null && s2 == null)   return true;
  if (s1 == null) {
    return false;
  }
 else   return s1.equals(s2);
}
Program: 28470
Project: 28470
Buggy source:
public SecureServiceAccessPermission(String name,String actions,String targetName){
  this(name,actions);
  this.target=targetName;
}

Fixed version (ground truth):
/** 
 * @param accessPermissionName the permission name used inside the 'Secure' annotation of the protected service
 * @param actions use null (not used for now)
 * @param targetName use null (not used for now)
 */
public SecureServiceAccessPermission(String accessPermissionName,String actions,String targetName){
  this(accessPermissionName,actions);
  this.target=targetName;
}
Program: 28472
Project: 28472
Buggy source:
@Override public Future<Result<Thread>> start() throws IOException {
  final FutureImpl<Result<Thread>> future=UnsafeFutureImpl.<Result<Thread>>create();
  final long t1=System.currentTimeMillis();
  grizzlyListener.start();
  if (logger.isLoggable(Level.INFO)) {
    logger.log(Level.INFO,KernelLoggerInfo.grizzlyStarted,new Object[]{Grizzly.getDotedVersion(),System.currentTimeMillis() - t1,grizzlyListener.getAddress(),':',String.valueOf(grizzlyListener.getPort()),']'});
  }
  future.result(new Result<Thread>(Thread.currentThread()));
  return future;
}

Fixed version (ground truth):
@Override public Future<Result<Thread>> start() throws IOException {
  final FutureImpl<Result<Thread>> future=Futures.<Result<Thread>>createUnsafeFuture();
  if (!isAjpEnabled(grizzlyListener)) {
    start0();
  }
 else {
    grizzlyService.addServerReadyListener(new Callable<Void>(){
      @Override public Void call() throws Exception {
        start0();
        return null;
      }
    }
);
  }
  future.result(new Result<Thread>(Thread.currentThread()));
  return future;
}
Program: 28473
Project: 28473
Buggy source:
protected void createGrizzlyListener(final NetworkListener networkListener){
  if ("String_Node_Str".equals(networkListener.getProtocol())) {
    createServiceInitializerListener();
  }
 else {
    createGlassfishListener();
  }
}

Fixed version (ground truth):
protected GrizzlyListener createGrizzlyListener(final NetworkListener networkListener){
  if ("String_Node_Str".equals(networkListener.getProtocol())) {
    return createServiceInitializerListener();
  }
 else {
    return createGlassfishListener();
  }
}
Program: 28474
Project: 28474
Buggy source:
protected void createGlassfishListener(){
  grizzlyListener=new GlassfishNetworkListener(grizzlyService,logger);
}

Fixed version (ground truth):
protected GrizzlyListener createGlassfishListener(){
  return new GlassfishNetworkListener(grizzlyService,logger);
}
Program: 28475
Project: 28475
Buggy source:
protected void createServiceInitializerListener(){
  grizzlyListener=new ServiceInitializerListener(grizzlyService,logger);
}

Fixed version (ground truth):
protected GrizzlyListener createServiceInitializerListener(){
  return new ServiceInitializerListener(grizzlyService,logger);
}
Program: 28476
Project: 28476
Buggy source:
/** 
 * Create a <code>GrizzlyServiceListener</code> based on a NetworkListener configuration object.
 */
public void initialize() throws IOException {
  String port=networkListener.getPort();
  portNumber=8080;
  if (port == null) {
    logger.severe(KernelLoggerInfo.noPort);
    throw new RuntimeException("String_Node_Str");
  }
  try {
    portNumber=Integer.parseInt(port);
  }
 catch (  NumberFormatException e) {
    logger.log(Level.SEVERE,KernelLoggerInfo.badPort,port);
  }
  try {
    address=InetAddress.getByName(networkListener.getAddress());
  }
 catch (  UnknownHostException ex) {
    LogHelper.log(logger,Level.SEVERE,KernelLoggerInfo.badAddress,ex,address);
  }
  createGrizzlyListener(networkListener);
  grizzlyListener.configure(grizzlyService.getHabitat(),networkListener);
}

Fixed version (ground truth):
/** 
 * Create a <code>GrizzlyServiceListener</code> based on a NetworkListener configuration object.
 */
public void initialize() throws IOException {
  String port=networkListener.getPort();
  portNumber=8080;
  if (port == null) {
    logger.severe(KernelLoggerInfo.noPort);
    throw new RuntimeException("String_Node_Str");
  }
  try {
    portNumber=Integer.parseInt(port);
  }
 catch (  NumberFormatException e) {
    logger.log(Level.SEVERE,KernelLoggerInfo.badPort,port);
  }
  try {
    address=InetAddress.getByName(networkListener.getAddress());
  }
 catch (  UnknownHostException ex) {
    LogHelper.log(logger,Level.SEVERE,KernelLoggerInfo.badAddress,ex,address);
  }
  grizzlyListener=createGrizzlyListener(networkListener);
  grizzlyListener.configure(grizzlyService.getHabitat(),networkListener);
}
Program: 28478
Project: 28478
Buggy source:
/** 
 * Restart   {@link NetworkListener}.
 * @param networkListener {@link NetworkListener}
 * @param timeout restart timeout, if timeout value is negative - then no timeout will be applied.
 * @param timeUnit restart timeout unit
 * @throws TimeoutException thrown if timeout had expired before server succeeded to restart
 * @throws IOException
 */
public void restartNetworkListener(NetworkListener networkListener,long timeout,TimeUnit timeUnit) throws IOException, TimeoutException {
  if (!removeNetworkProxy(networkListener)) {
    removeNetworkProxy(networkListener.getName());
  }
  final Future future=createNetworkProxy(networkListener);
  if (future == null) {
    logger.log(Level.FINE,"String_Node_Str",networkListener.getName());
    return;
  }
  try {
    if (timeout <= 0) {
      future.get();
    }
 else {
      future.get(timeout,timeUnit);
    }
  }
 catch (  ExecutionException e) {
    throw new IOException(e.getCause());
  }
catch (  InterruptedException e) {
    throw new IOException(e);
  }
  registerContainerAdapters();
}

Fixed version (ground truth):
/** 
 * Restart   {@link NetworkListener}.
 * @param networkListener {@link NetworkListener}
 * @param timeout restart timeout, if timeout value is negative - then no timeout will be applied.
 * @param timeUnit restart timeout unit
 * @throws TimeoutException thrown if timeout had expired before server succeeded to restart
 * @throws IOException
 */
public void restartNetworkListener(NetworkListener networkListener,long timeout,TimeUnit timeUnit) throws IOException, TimeoutException {
  if (!removeNetworkProxy(networkListener)) {
    removeNetworkProxy(networkListener.getName());
  }
  final Future future=createNetworkProxy(networkListener);
  if (future == null) {
    LOGGER.log(Level.FINE,"String_Node_Str",networkListener.getName());
    return;
  }
  try {
    if (timeout <= 0) {
      future.get();
    }
 else {
      future.get(timeout,timeUnit);
    }
  }
 catch (  ExecutionException e) {
    throw new IOException(e.getCause());
  }
catch (  InterruptedException e) {
    throw new IOException(e);
  }
  registerContainerAdapters();
}
Program: 28479
Project: 28479
Buggy source:
/** 
 * Lookup   {@link GrizzlyProxy}, which corresponds to the   {@link NetworkListener}.
 * @param listener {@link NetworkListener}.
 * @return {@link GrizzlyProxy}, or <tt>null</tt>, if correspondent   {@link GrizzlyProxy} wasn't found.
 */
public NetworkProxy lookupNetworkProxy(NetworkListener listener){
  int listenerPort=-1;
  InetAddress address=null;
  try {
    listenerPort=Integer.parseInt(listener.getPort());
  }
 catch (  NumberFormatException e) {
    logger.log(Level.FINE,e.toString());
  }
  try {
    address=InetAddress.getByName(listener.getAddress());
  }
 catch (  UnknownHostException uhe) {
    logger.log(Level.FINE,uhe.toString());
  }
  if (listenerPort != -1) {
    for (    NetworkProxy p : proxies) {
      if (p.getPort() == listenerPort && p.getAddress().equals(address)) {
        return p;
      }
    }
  }
  final String listenerId=listener.getName();
  for (  NetworkProxy p : proxies) {
    if (p instanceof GrizzlyProxy) {
      GrizzlyProxy grizzlyProxy=(GrizzlyProxy)p;
      if (grizzlyProxy.networkListener != null && grizzlyProxy.networkListener.getName() != null && grizzlyProxy.networkListener.getName().equals(listenerId)) {
        return p;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Lookup   {@link GrizzlyProxy}, which corresponds to the   {@link NetworkListener}.
 * @param listener {@link NetworkListener}.
 * @return {@link GrizzlyProxy}, or <tt>null</tt>, if correspondent   {@link GrizzlyProxy} wasn't found.
 */
public NetworkProxy lookupNetworkProxy(NetworkListener listener){
  int listenerPort=-1;
  InetAddress address=null;
  try {
    listenerPort=Integer.parseInt(listener.getPort());
  }
 catch (  NumberFormatException e) {
    LOGGER.log(Level.FINE,e.toString());
  }
  try {
    address=InetAddress.getByName(listener.getAddress());
  }
 catch (  UnknownHostException uhe) {
    LOGGER.log(Level.FINE,uhe.toString());
  }
  if (listenerPort != -1) {
    for (    NetworkProxy p : proxies) {
      if (p.getPort() == listenerPort && p.getAddress().equals(address)) {
        return p;
      }
    }
  }
  final String listenerId=listener.getName();
  for (  NetworkProxy p : proxies) {
    if (p instanceof GrizzlyProxy) {
      GrizzlyProxy grizzlyProxy=(GrizzlyProxy)p;
      if (grizzlyProxy.networkListener != null && grizzlyProxy.networkListener.getName() != null && grizzlyProxy.networkListener.getName().equals(listenerId)) {
        return p;
      }
    }
  }
  return null;
}
Program: 28480
Project: 28480
Buggy source:
void registerContainerAdapters(){
  for (  org.glassfish.api.container.Adapter subAdapter : habitat.<org.glassfish.api.container.Adapter>getAllServices(org.glassfish.api.container.Adapter.class)) {
    try {
      if (!subAdapter.isRegistered()) {
        registerAdapter(subAdapter);
        subAdapter.setRegistered(true);
      }
    }
 catch (    EndpointRegistrationException e) {
      logger.log(Level.WARNING,KernelLoggerInfo.grizzlyEndpointRegistration,e);
    }
  }
}

Fixed version (ground truth):
void registerContainerAdapters(){
  for (  org.glassfish.api.container.Adapter subAdapter : habitat.<org.glassfish.api.container.Adapter>getAllServices(org.glassfish.api.container.Adapter.class)) {
    try {
      if (!subAdapter.isRegistered()) {
        registerAdapter(subAdapter);
        subAdapter.setRegistered(true);
      }
    }
 catch (    EndpointRegistrationException e) {
      LOGGER.log(Level.WARNING,KernelLoggerInfo.grizzlyEndpointRegistration,e);
    }
  }
}
Program: 28481
Project: 28481
Buggy source:
/** 
 * Gets the logger.
 * @return the logger
 */
public Logger getLogger(){
  return logger;
}

Fixed version (ground truth):
/** 
 * Gets the logger.
 * @return the logger
 */
public Logger getLogger(){
  return LOGGER;
}
Program: 28482
Project: 28482
Buggy source:
/** 
 * The component is about to be removed from commission
 */
@Override public void preDestroy(){
  for (  NetworkProxy proxy : proxies) {
    try {
      proxy.stop();
    }
 catch (    IOException e) {
      logger.log(Level.WARNING,KernelLoggerInfo.grizzlyStopProxy,e);
    }
  }
  unregisterMonitoringStatsProviders();
}

Fixed version (ground truth):
/** 
 * The component is about to be removed from commission
 */
@Override public void preDestroy(){
  for (  NetworkProxy proxy : proxies) {
    try {
      proxy.stop();
    }
 catch (    IOException e) {
      LOGGER.log(Level.WARNING,KernelLoggerInfo.grizzlyStopProxy,e);
    }
  }
  unregisterMonitoringStatsProviders();
}
Program: 28483
Project: 28483
Buggy source:
/** 
 * Remove the  proxy from our list of proxies.
 * @return <tt>true</tt>, if proxy on specified port was removed,<tt>false</tt> otherwise.
 */
public boolean removeNetworkProxy(NetworkProxy proxy){
  if (proxy != null) {
    try {
      proxy.stop();
    }
 catch (    IOException e) {
      logger.log(Level.WARNING,KernelLoggerInfo.grizzlyStopProxy,e);
    }
    proxy.destroy();
    proxies.remove(proxy);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Remove the  proxy from our list of proxies.
 * @return <tt>true</tt>, if proxy on specified port was removed,<tt>false</tt> otherwise.
 */
public boolean removeNetworkProxy(NetworkProxy proxy){
  if (proxy != null) {
    try {
      proxy.stop();
    }
 catch (    IOException e) {
      LOGGER.log(Level.WARNING,KernelLoggerInfo.grizzlyStopProxy,e);
    }
    proxy.destroy();
    proxies.remove(proxy);
    return true;
  }
  return false;
}
Program: 28484
Project: 28484
Buggy source:
private List<AddressInfo> getAddressInfoFromVirtualServers(Collection<String> virtualServers){
  List<AddressInfo> addressInfos=new ArrayList<AddressInfo>();
  List<NetworkListener> networkListenerList=config.getNetworkConfig().getNetworkListeners().getNetworkListener();
  for (  String vs : virtualServers) {
    VirtualServer virtualServer=config.getHttpService().getVirtualServerByName(vs);
    if (virtualServer == null) {
      logger.log(Level.WARNING,KernelLoggerInfo.grizzlyNonExistentVS,vs);
      continue;
    }
    String vsNetworkListeners=virtualServer.getNetworkListeners();
    List<String> vsNetworkListenerList=StringUtils.parseStringList(vsNetworkListeners,"String_Node_Str");
    if (vsNetworkListenerList != null && !vsNetworkListenerList.isEmpty()) {
      for (      String vsNetworkListener : vsNetworkListenerList) {
        for (        NetworkListener networkListener : networkListenerList) {
          if (networkListener.getName().equals(vsNetworkListener) && Boolean.valueOf(networkListener.getEnabled())) {
            addressInfos.add(new AddressInfo(networkListener.getAddress(),networkListener.getPort()));
            break;
          }
        }
      }
    }
  }
  return addressInfos;
}

Fixed version (ground truth):
private List<AddressInfo> getAddressInfoFromVirtualServers(Collection<String> virtualServers){
  List<AddressInfo> addressInfos=new ArrayList<AddressInfo>();
  List<NetworkListener> networkListenerList=config.getNetworkConfig().getNetworkListeners().getNetworkListener();
  for (  String vs : virtualServers) {
    VirtualServer virtualServer=config.getHttpService().getVirtualServerByName(vs);
    if (virtualServer == null) {
      LOGGER.log(Level.WARNING,KernelLoggerInfo.grizzlyNonExistentVS,vs);
      continue;
    }
    String vsNetworkListeners=virtualServer.getNetworkListeners();
    List<String> vsNetworkListenerList=StringUtils.parseStringList(vsNetworkListeners,"String_Node_Str");
    if (vsNetworkListenerList != null && !vsNetworkListenerList.isEmpty()) {
      for (      String vsNetworkListener : vsNetworkListenerList) {
        for (        NetworkListener networkListener : networkListenerList) {
          if (networkListener.getName().equals(vsNetworkListener) && Boolean.valueOf(networkListener.getEnabled())) {
            addressInfos.add(new AddressInfo(networkListener.getAddress(),networkListener.getPort()));
            break;
          }
        }
      }
    }
  }
  return addressInfos;
}