nus-yam/ex-repair huggingface dataset:
Program: 34671
Project: 34671
Buggy source:
@Override public AttributeList getAttributes(ObjectName name,String[] attributes) throws InstanceNotFoundException, ReflectionException {
  try {
    registerMBeanIfDelayed(name);
  }
 catch (  NotCompliantMBeanException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  InstanceAlreadyExistsException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  MBeanRegistrationException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
  emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
  return super.getAttributes(name,attributes);
}

Fixed version (ground truth):
@Override @FFDCIgnore({InstanceNotFoundException.class,ReflectionException.class}) public AttributeList getAttributes(ObjectName name,String[] attributes) throws InstanceNotFoundException, ReflectionException {
  try {
    registerMBeanIfDelayed(name);
  }
 catch (  NotCompliantMBeanException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  InstanceAlreadyExistsException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  MBeanRegistrationException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
  AttributeList al=null;
  try {
    al=super.getAttributes(name,attributes);
  }
 catch (  InstanceNotFoundException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    throw e;
  }
catch (  ReflectionException e) {
    emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
    throw e;
  }
  emitJMXMBeanAttributeAction(name,attributes,"String_Node_Str","String_Node_Str","String_Node_Str");
  return al;
}
Program: 34672
Project: 34672
Buggy source:
@Override public void addNotificationListener(ObjectName name,ObjectName listener,NotificationFilter filter,Object handback) throws InstanceNotFoundException {
  try {
    registerMBeanIfDelayed(name);
    registerMBeanIfDelayed(listener);
  }
 catch (  NotCompliantMBeanException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  InstanceAlreadyExistsException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  MBeanRegistrationException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
  try {
    super.addNotificationListener(name,listener,filter,handback);
  }
 catch (  InstanceNotFoundException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
  emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override @FFDCIgnore(InstanceNotFoundException.class) public void addNotificationListener(ObjectName name,ObjectName listener,NotificationFilter filter,Object handback) throws InstanceNotFoundException {
  try {
    registerMBeanIfDelayed(name);
    registerMBeanIfDelayed(listener);
  }
 catch (  NotCompliantMBeanException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  InstanceAlreadyExistsException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  MBeanRegistrationException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
  try {
    super.addNotificationListener(name,listener,filter,handback);
  }
 catch (  InstanceNotFoundException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    throw e;
  }
  emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
}
Program: 34673
Project: 34673
Buggy source:
@Override public void removeNotificationListener(ObjectName name,NotificationListener listener,NotificationFilter filter,Object handback) throws InstanceNotFoundException, ListenerNotFoundException {
  try {
    registerMBeanIfDelayed(name);
  }
 catch (  NotCompliantMBeanException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  InstanceAlreadyExistsException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  MBeanRegistrationException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
  super.removeNotificationListener(name,listener,filter,handback);
  emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override @FFDCIgnore({InstanceNotFoundException.class,ListenerNotFoundException.class}) public void removeNotificationListener(ObjectName name,NotificationListener listener,NotificationFilter filter,Object handback) throws InstanceNotFoundException, ListenerNotFoundException {
  try {
    registerMBeanIfDelayed(name);
  }
 catch (  NotCompliantMBeanException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  InstanceAlreadyExistsException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
catch (  MBeanRegistrationException e) {
    emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
    newInstanceNotFoundException(e);
  }
  try {
    super.removeNotificationListener(name,listener,filter,handback);
  }
 catch (  InstanceNotFoundException e) {
    emitJMXNotificationEvent(name,listener,null,null,"String_Node_Str","String_Node_Str","String_Node_Str");
    throw e;
  }
catch (  ListenerNotFoundException e) {
    emitJMXNotificationEvent(name,listener,null,null,"String_Node_Str","String_Node_Str","String_Node_Str");
    throw e;
  }
  emitJMXNotificationEvent(name,listener,filter,handback,"String_Node_Str","String_Node_Str","String_Node_Str");
}
Program: 34675
Project: 34675
Buggy source:
/** 
 * Handle the receipt of the MAGIC string from the client: initialize the control stream 0 and and send out a settings frame to acknowledge the MAGIC string
 */
public void processConnectionPrefaceMagic(){
  connection_preface_string_rcvd=true;
  H2StreamProcessor controlStream=createNewInboundLink(0);
  controlStream.completeConnectionPreface();
  connection_preface_sent=true;
}

Fixed version (ground truth):
/** 
 * Handle the receipt of the MAGIC string from the client: initialize the control stream 0 and and send out a settings frame to acknowledge the MAGIC string
 * @throws StreamClosedException
 */
public void processConnectionPrefaceMagic() throws ProtocolException, StreamClosedException {
  connection_preface_string_rcvd=true;
  H2StreamProcessor controlStream=createNewInboundLink(0);
  controlStream.completeConnectionPreface();
  connection_preface_sent=true;
}
Program: 34676
Project: 34676
Buggy source:
@Override public void run(){
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + myID);
  }
  h2HttpInboundLinkWrap.ready(this.h2HttpInboundLinkWrap.vc);
  headersCompleted=false;
}

Fixed version (ground truth):
@Override public void run(){
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + myID);
  }
  if (!muxLink.checkIfGoAwaySendingOrClosing()) {
    h2HttpInboundLinkWrap.ready(this.h2HttpInboundLinkWrap.vc);
  }
  headersCompleted=false;
}
Program: 34679
Project: 34679
Buggy source:
@BeforeClass public static void setUp() throws Exception {
  client.addIgnoreErrors("String_Node_Str");
  JavaArchive appClientSecurity=ShrinkWrap.create(JavaArchive.class,"String_Node_Str").addClass("String_Node_Str").addClass("String_Node_Str").addClass("String_Node_Str").addClass("String_Node_Str").add(new FileAsset(new File("String_Node_Str")),"String_Node_Str").add(new FileAsset(new File("String_Node_Str")),"String_Node_Str");
  EnterpriseArchive appClientSecurityEar=ShrinkWrap.create(EnterpriseArchive.class,"String_Node_Str").add(new FileAsset(new File("String_Node_Str")),"String_Node_Str").addAsModule(appClientSecurity);
  ShrinkHelper.exportToClient(client,"String_Node_Str",appClientSecurityEar);
}

Fixed version (ground truth):
@BeforeClass public static void setUp() throws Exception {
  client.addIgnoreErrors("String_Node_Str");
  JavaArchive appClientSecurity=ShrinkWrap.create(JavaArchive.class,"String_Node_Str").addClass("String_Node_Str").addClass("String_Node_Str").addClass("String_Node_Str").addClass("String_Node_Str").add(new FileAsset(new File("String_Node_Str")),"String_Node_Str").add(new FileAsset(new File("String_Node_Str")),"String_Node_Str");
  EnterpriseArchive appClientSecurityEar=ShrinkWrap.create(EnterpriseArchive.class,"String_Node_Str").add(new FileAsset(new File("String_Node_Str")),"String_Node_Str").add(new FileAsset(new File("String_Node_Str")),"String_Node_Str").addAsModule(appClientSecurity);
  ShrinkHelper.exportToClient(client,"String_Node_Str",appClientSecurityEar);
}
Program: 34684
Project: 34684
Buggy source:
/** 
 * @param entity
 * @param ldapEntry
 * @param bases
 * @param level
 * @param propNames
 * @param object
 */
private void getGroupsByOperationalAttribute(Entity entity,LdapEntry ldapEntry,String[] bases,int level,List<String> propNames) throws WIMException {
  String filter="String_Node_Str";
  List<String> grpTypes=iLdapConfigMgr.getGroupTypes();
  List<String> supportedProps=iLdapConfigMgr.getSupportedProperties(SchemaConstants.DO_GROUP,propNames);
  SearchResult result=iLdapConn.searchByOperationalAttribute(ldapEntry.getDN(),filter,grpTypes,supportedProps,"String_Node_Str");
  if (result != null) {
    Attribute attribute=result.getAttributes().get(LDAP_ATTR_IBM_ALL_GROUP);
    if (attribute != null) {
      try {
        NamingEnumeration<?> groups=attribute.getAll();
        while (groups.hasMore()) {
          if (entity != null) {
            String groupDN=String.valueOf(groups.next());
            LdapEntry grpEntry=new LdapEntry(groupDN,null,groupDN,iLdapConfigMgr.getGroupTypes().get(0),null);
            createEntityFromLdapEntry(entity,SchemaConstants.DO_GROUP,grpEntry,supportedProps);
          }
        }
      }
 catch (      NamingException e) {
        throw new WIMSystemException(WIMMessageKey.NAMING_EXCEPTION,Tr.formatMessage(tc,WIMMessageKey.NAMING_EXCEPTION,WIMMessageHelper.generateMsgParms(e.toString(true))));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param entity
 * @param ldapEntry
 * @param bases
 * @param level
 * @param propNames
 * @param object
 */
private void getGroupsByOperationalAttribute(Entity entity,LdapEntry ldapEntry,String[] bases,int level,List<String> propNames) throws WIMException {
  String filter="String_Node_Str";
  List<String> grpTypes=iLdapConfigMgr.getGroupTypes();
  List<String> supportedProps=iLdapConfigMgr.getSupportedProperties(SchemaConstants.DO_GROUP,propNames);
  SearchResult result=iLdapConn.searchByOperationalAttribute(ldapEntry.getDN(),filter,grpTypes,supportedProps,LdapConstants.LDAP_ATTR_IBM_ALL_GROUP);
  if (result != null) {
    Attribute attribute=result.getAttributes().get(LDAP_ATTR_IBM_ALL_GROUP);
    if (attribute != null) {
      try {
        NamingEnumeration<?> groups=attribute.getAll();
        while (groups.hasMore()) {
          if (entity != null) {
            String groupDN=String.valueOf(groups.next());
            LdapEntry grpEntry=iLdapConn.getEntityByIdentifier(groupDN,null,null,iLdapConfigMgr.getGroupTypes(),propNames,false,false);
            createEntityFromLdapEntry(entity,SchemaConstants.DO_GROUP,grpEntry,supportedProps);
          }
        }
      }
 catch (      NamingException e) {
        throw new WIMSystemException(WIMMessageKey.NAMING_EXCEPTION,Tr.formatMessage(tc,WIMMessageKey.NAMING_EXCEPTION,WIMMessageHelper.generateMsgParms(e.toString(true))));
      }
    }
  }
}
Program: 34685
Project: 34685
Buggy source:
@Trivial public boolean updateGroupMembership(){
  if (getLdapType().startsWith("String_Node_Str") || getLdapType().startsWith("String_Node_Str"))   return true;
 else   return false;
}

Fixed version (ground truth):
@Trivial public boolean updateGroupMembership(){
  if (LdapConstants.DOMINO_LDAP_SERVER.equalsIgnoreCase(iLdapType) || LdapConstants.SUN_LDAP_SERVER.equalsIgnoreCase(iLdapType))   return true;
 else   return false;
}
Program: 34686
Project: 34686
Buggy source:
/** 
 * @return
 */
private String defaultDummyMember(){
  if (iLdapType.startsWith(LdapConstants.IDS_LDAP_SERVER) || iLdapType.startsWith(LdapConstants.DOMINO_LDAP_SERVER)) {
    return LdapConstants.LDAP_DUMMY_MEMBER_DEFAULT;
  }
 else   return null;
}

Fixed version (ground truth):
/** 
 * @return
 */
private String defaultDummyMember(){
  if (LdapConstants.IDS_LDAP_SERVER.equalsIgnoreCase(iLdapType) || LdapConstants.DOMINO_LDAP_SERVER.equalsIgnoreCase(iLdapType)) {
    return LdapConstants.LDAP_DUMMY_MEMBER_DEFAULT;
  }
 else   return null;
}
Program: 34690
Project: 34690
Buggy source:
private void processCSSUpdates(ScheduledExecutorService executor){
  if (cssUpdates.size() > 0) {
    final CustomCSSProcessor cssUpdator=this;
    Runnable bundleUpdater=new Runnable(){
      @Override public void run(){
synchronized (cssUpdator) {
          Iterator<CSSUpdate> it=cssUpdates.iterator();
          while (it.hasNext()) {
            CSSUpdate update=it.next();
            if (update.updateData != null) {
              updater.update(update.updateData);
            }
 else {
              updater.restoreDefaults();
            }
            it.remove();
          }
        }
      }
    }
;
    executor.execute(bundleUpdater);
  }
}

Fixed version (ground truth):
private void processCSSUpdates(ScheduledExecutorService executor){
  if (cssUpdates.size() > 0) {
    final Object cssUpdator=cssUpdaterLock;
    Runnable bundleUpdater=new Runnable(){
      @Override public void run(){
synchronized (cssUpdator) {
          Iterator<CSSUpdate> it=cssUpdates.iterator();
          while (it.hasNext()) {
            CSSUpdate update=it.next();
            if (update.updateData != null) {
              updater.update(update.updateData);
            }
 else {
              updater.restoreDefaults();
            }
            it.remove();
          }
        }
      }
    }
;
    executor.execute(bundleUpdater);
  }
}
Program: 34691
Project: 34691
Buggy source:
private void unsetServiceReferenceInternal(ServiceReference<?> ref){
  final ObjectName name=mBeanMap.remove(ref);
  if (name != null) {
    try {
      mDelayedMBeanActivator.unregisterMBean(name);
    }
 catch (    InstanceNotFoundException e) {
    }
catch (    MBeanRegistrationException e) {
    }
  }
}

Fixed version (ground truth):
@FFDCIgnore(InstanceNotFoundException.class) private void unsetServiceReferenceInternal(ServiceReference<?> ref){
  final ObjectName name=mBeanMap.remove(ref);
  if (name != null) {
    try {
      mDelayedMBeanActivator.unregisterMBean(name);
    }
 catch (    InstanceNotFoundException e) {
    }
catch (    MBeanRegistrationException e) {
    }
  }
}
Program: 34692
Project: 34692
Buggy source:
public void testTimeout(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  long start=System.currentTimeMillis();
  try {
    bean.connectA();
    throw new AssertionError("String_Node_Str");
  }
 catch (  TimeoutException e) {
    long timeout=System.currentTimeMillis();
    long duration=timeout - start;
    if (duration > 3000) {
      throw new AssertionError("String_Node_Str" + timeout);
    }
  }
catch (  ConnectException e) {
    throw new ServletException(e);
  }
}

Fixed version (ground truth):
public void testTimeout(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  long start=System.currentTimeMillis();
  try {
    bean.connectA();
    throw new AssertionError("String_Node_Str");
  }
 catch (  TimeoutException e) {
    long timeout=System.currentTimeMillis();
    long duration=timeout - start;
    if (duration > 3000) {
      throw new AssertionError("String_Node_Str" + duration);
    }
  }
catch (  ConnectException e) {
    throw new ServletException(e);
  }
}
Program: 34693
Project: 34693
Buggy source:
/** 
 * Test method level override of Timeout value on a synchronous service. A timeout will not occur unless the configuration overrides the value set on the connectG method.
 * @param request
 * @param response
 * @throws ServletException
 * @throws IOException
 */
public void testTimeoutConfig(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  long start=System.currentTimeMillis();
  try {
    bean.connectG();
    throw new AssertionError("String_Node_Str");
  }
 catch (  TimeoutException e) {
    long timeout=System.currentTimeMillis();
    long duration=timeout - start;
    if (duration > 1000) {
      throw new AssertionError("String_Node_Str" + timeout);
    }
  }
catch (  ConnectException e) {
    throw new ServletException(e);
  }
}

Fixed version (ground truth):
/** 
 * Test method level override of Timeout value on a synchronous service. A timeout will not occur unless the configuration overrides the value set on the connectG method.
 * @param request
 * @param response
 * @throws ServletException
 * @throws IOException
 */
public void testTimeoutConfig(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  long start=System.currentTimeMillis();
  try {
    bean.connectG();
    throw new AssertionError("String_Node_Str");
  }
 catch (  TimeoutException e) {
    long timeout=System.currentTimeMillis();
    long duration=timeout - start;
    if (duration > 1000) {
      throw new AssertionError("String_Node_Str" + duration);
    }
  }
catch (  ConnectException e) {
    throw new ServletException(e);
  }
}
Program: 34694
Project: 34694
Buggy source:
/** 
 * Test method level override of Timeout value on a synchronous service. A timeout will not occur unless the configuration overrides the value set on the classScopedConfigBean.
 * @param request
 * @param response
 * @throws ServletException
 * @throws IOException
 */
public void testTimeoutClassScopeConfig(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  long start=System.currentTimeMillis();
  try {
    classScopedConfigBean.connectA();
    throw new AssertionError("String_Node_Str");
  }
 catch (  TimeoutException e) {
    long timeout=System.currentTimeMillis();
    long duration=timeout - start;
    if (duration > 1000) {
      throw new AssertionError("String_Node_Str" + timeout);
    }
  }
catch (  ConnectException e) {
    throw new ServletException(e);
  }
}

Fixed version (ground truth):
/** 
 * Test method level override of Timeout value on a synchronous service. A timeout will not occur unless the configuration overrides the value set on the classScopedConfigBean.
 * @param request
 * @param response
 * @throws ServletException
 * @throws IOException
 */
public void testTimeoutClassScopeConfig(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  long start=System.currentTimeMillis();
  try {
    classScopedConfigBean.connectA();
    throw new AssertionError("String_Node_Str");
  }
 catch (  TimeoutException e) {
    long timeout=System.currentTimeMillis();
    long duration=timeout - start;
    if (duration > 1000) {
      throw new AssertionError("String_Node_Str" + duration);
    }
  }
catch (  ConnectException e) {
    throw new ServletException(e);
  }
}
Program: 34695
Project: 34695
Buggy source:
public static ClassLoader getClassLoader(Object defaultObject){
  ClassLoader cl;
  if (System.getSecurityManager() != null) {
    try {
      cl=AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>(){
        public ClassLoader run() throws PrivilegedActionException {
          return Thread.currentThread().getContextClassLoader();
        }
      }
);
    }
 catch (    PrivilegedActionException pae) {
      throw new FacesException(pae);
    }
  }
 else {
    cl=Thread.currentThread().getContextClassLoader();
  }
  if (cl == null) {
    cl=defaultObject.getClass().getClassLoader();
  }
  return cl;
}

Fixed version (ground truth):
public static ClassLoader getClassLoader(final Object defaultObject){
  ClassLoader cl;
  if (System.getSecurityManager() != null) {
    try {
      cl=AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>(){
        public ClassLoader run() throws PrivilegedActionException {
          return defaultObject.getClass().getClassLoader();
        }
      }
);
    }
 catch (    PrivilegedActionException pae) {
      throw new FacesException(pae);
    }
  }
 else {
    cl=defaultObject.getClass().getClassLoader();
  }
  return cl;
}
Program: 34698
Project: 34698
Buggy source:
@Override public Class<?> getProviderImplClass(){
  Class<?> implClass=implClassRef.get();
  if (implClass == null) {
    Object service=context.getService(reg.getReference());
    if (service != null)     implClassRef.set(implClass=service.getClass());
  }
  return implClass;
}

Fixed version (ground truth):
@Override public Class<?> getProviderImplClass(){
  Class<?> implClass=implClassRef.get();
  if (implClass == null) {
    Object service=AccessController.doPrivileged(new PrivilegedAction<Object>(){
      @Override public Object run(){
        return context.getService(reg.getReference());
      }
    }
);
    if (service != null)     implClassRef.set(implClass=service.getClass());
  }
  return implClass;
}
Program: 34700
Project: 34700
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,Contact t){
  if (t != null) {
    String url=t.getUrl();
    if (url != null) {
      if (!ValidatorUtils.isValidURL(url)) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",url);
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    String email=t.getEmail();
    if (email != null) {
      if (!ValidatorUtils.isValidEmailAddress(email)) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",email);
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,Contact t){
  if (t != null) {
    String url=t.getUrl();
    if (url != null) {
      if (!ValidatorUtils.isValidURI(url)) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",url);
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    String email=t.getEmail();
    if (email != null) {
      if (!ValidatorUtils.isValidEmailAddress(email)) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",email);
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
  }
}
Program: 34701
Project: 34701
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,ExternalDocumentation t){
  ValidatorUtils.validateRequiredField(t.getUrl(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
  if (t.getUrl() != null) {
    if (!ValidatorUtils.isValidURL(t.getUrl())) {
      final String message=Tr.formatMessage(tc,"String_Node_Str",t.getUrl());
      helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,ExternalDocumentation t){
  ValidatorUtils.validateRequiredField(t.getUrl(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
  if (t.getUrl() != null) {
    if (!ValidatorUtils.isValidURI(t.getUrl())) {
      final String message=Tr.formatMessage(tc,"String_Node_Str",t.getUrl());
      helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
    }
  }
}
Program: 34702
Project: 34702
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,Info t){
  if (t != null) {
    ValidatorUtils.validateRequiredField(t.getVersion(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
    ValidatorUtils.validateRequiredField(t.getTitle(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
    if (t.getTermsOfService() != null) {
      if (!ValidatorUtils.isValidURL(t.getTermsOfService())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getTermsOfService());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,Info t){
  if (t != null) {
    ValidatorUtils.validateRequiredField(t.getVersion(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
    ValidatorUtils.validateRequiredField(t.getTitle(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
    if (t.getTermsOfService() != null) {
      if (!ValidatorUtils.isValidURI(t.getTermsOfService())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getTermsOfService());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
  }
}
Program: 34703
Project: 34703
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,License t){
  if (t != null) {
    ValidatorUtils.validateRequiredField(t.getName(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
    if (t.getUrl() != null) {
      if (!ValidatorUtils.isValidURL(t.getUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation(),message));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,License t){
  if (t != null) {
    ValidatorUtils.validateRequiredField(t.getName(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
    if (t.getUrl() != null) {
      if (!ValidatorUtils.isValidURI(t.getUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation(),message));
      }
    }
  }
}
Program: 34704
Project: 34704
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,OAuthFlow t){
  if (t != null) {
    if (t.getAuthorizationUrl() != null) {
      if (!ValidatorUtils.isValidURL(t.getAuthorizationUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getAuthorizationUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    if (t.getTokenUrl() != null) {
      if (!ValidatorUtils.isValidURL(t.getTokenUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getTokenUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    if (t.getRefreshUrl() != null) {
      if (!ValidatorUtils.isValidURL(t.getRefreshUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getRefreshUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    ValidatorUtils.validateRequiredField(t.getScopes(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void validate(ValidationHelper helper,Context context,String key,OAuthFlow t){
  if (t != null) {
    if (t.getAuthorizationUrl() != null) {
      if (!ValidatorUtils.isValidURI(t.getAuthorizationUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getAuthorizationUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    if (t.getTokenUrl() != null) {
      if (!ValidatorUtils.isValidURI(t.getTokenUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getTokenUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    if (t.getRefreshUrl() != null) {
      if (!ValidatorUtils.isValidURI(t.getRefreshUrl())) {
        final String message=Tr.formatMessage(tc,"String_Node_Str",t.getRefreshUrl());
        helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR,context.getLocation("String_Node_Str"),message));
      }
    }
    ValidatorUtils.validateRequiredField(t.getScopes(),context,"String_Node_Str").ifPresent(helper::addValidationEvent);
  }
}
Program: 34709
Project: 34709
Buggy source:
@FFDCIgnore({URISyntaxException.class}) public static boolean isValidURI(String uriStr){
  try {
    @SuppressWarnings("String_Node_Str") URI url=new URI(uriStr);
    return true;
  }
 catch (  URISyntaxException e) {
    return false;
  }
}

Fixed version (ground truth):
@FFDCIgnore({URISyntaxException.class}) public static boolean isValidURI(String uriStr){
  try {
    @SuppressWarnings("String_Node_Str") URI uri=new URI(uriStr);
    return true;
  }
 catch (  URISyntaxException e) {
    return false;
  }
}
Program: 34710
Project: 34710
Buggy source:
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a WAR without server object is deployed
 * @throws Exception s
 */
@Test public void testContextRootWARWithoutServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_5);
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_5);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),APP_NAME_5));
}

Fixed version (ground truth):
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a WAR without server object is deployed
 * @throws Exception s
 */
@Test public void testContextRootWARWithoutServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_5);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),APP_NAME_5));
}
Program: 34711
Project: 34711
Buggy source:
@Test public void testCompleteFlow() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_11);
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_11);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  OpenAPITestUtil.checkPaths(openapiNode,3,"String_Node_Str","String_Node_Str","String_Node_Str");
  JsonNode infoNode=openapiNode.get("String_Node_Str");
  assertNotNull(infoNode);
  assertTrue(infoNode.isObject());
  JsonNode titleNode=infoNode.get("String_Node_Str");
  assertNotNull(titleNode);
  assertEquals(titleNode.asText(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testCompleteFlow() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_11);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  OpenAPITestUtil.checkPaths(openapiNode,3,"String_Node_Str","String_Node_Str","String_Node_Str");
  JsonNode infoNode=openapiNode.get("String_Node_Str");
  assertNotNull(infoNode);
  assertTrue(infoNode.isObject());
  JsonNode titleNode=infoNode.get("String_Node_Str");
  assertNotNull(titleNode);
  assertEquals(titleNode.asText(),"String_Node_Str");
}
Program: 34712
Project: 34712
Buggy source:
@Test public void testContextRootEARWithoutServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_7,"String_Node_Str" + APP_NAME_7 + "String_Node_Str","String_Node_Str");
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_7);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),APP_NAME_5));
}

Fixed version (ground truth):
@Test public void testContextRootEARWithoutServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_7,"String_Node_Str" + APP_NAME_7 + "String_Node_Str","String_Node_Str");
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),APP_NAME_5));
}
Program: 34713
Project: 34713
Buggy source:
@Test public void testPureJaxRsApp() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_10);
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_10);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),APP_NAME_10));
  OpenAPITestUtil.checkPaths(openapiNode,1,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testPureJaxRsApp() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_10);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),APP_NAME_10));
  OpenAPITestUtil.checkPaths(openapiNode,1,"String_Node_Str");
}
Program: 34714
Project: 34714
Buggy source:
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a WAR with server object is deployed
 * @throws Exception s
 */
@Test public void testContextRootWARWithServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_4);
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_4);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a WAR with server object is deployed
 * @throws Exception s
 */
@Test public void testContextRootWARWithServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_4);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,"String_Node_Str","String_Node_Str");
}
Program: 34715
Project: 34715
Buggy source:
@Test public void testOverwrittenContextRootEAR() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_8,"String_Node_Str" + APP_NAME_8 + "String_Node_Str","String_Node_Str");
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_8);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testOverwrittenContextRootEAR() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_8,"String_Node_Str" + APP_NAME_8 + "String_Node_Str","String_Node_Str");
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),"String_Node_Str"));
}
Program: 34717
Project: 34717
Buggy source:
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a EAR application includes a WAR with server object.
 * @throws Exception s
 */
@Test public void testContextRootEARWithServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_6,"String_Node_Str" + APP_NAME_6 + "String_Node_Str","String_Node_Str");
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_6);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a EAR application includes a WAR with server object.
 * @throws Exception s
 */
@Test public void testContextRootEARWithServerObject() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_6,"String_Node_Str" + APP_NAME_6 + "String_Node_Str","String_Node_Str");
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,"String_Node_Str","String_Node_Str");
}
Program: 34718
Project: 34718
Buggy source:
/** 
 * This ensures all the applications are removed before running each test to make sure we start with a clean server.xml.
 */
@Before public void setUp() throws Exception {
  OpenAPITestUtil.removeAllApplication(server);
  OpenAPITestUtil.changeServerPorts(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort());
  server.setMarkToEndOfLog();
}

Fixed version (ground truth):
/** 
 * This ensures all the applications are removed before running each test to make sure we start with a clean server.xml.
 */
@Before public void setUp() throws Exception {
  OpenAPITestUtil.removeAllApplication(server);
  OpenAPITestUtil.changeServerPorts(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort());
  OpenAPITestUtil.setMarkToEndOfAllLogs(server);
}
Program: 34720
Project: 34720
Buggy source:
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a WAR without server object is deployed
 * @throws Exception s
 */
@Test public void testContextRootWARWithPathPrefixedContextRoot() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_9);
  OpenAPITestUtil.waitForApplicationProcessorAddedEvent(server,APP_NAME_9);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),null));
}

Fixed version (ground truth):
/** 
 * This test ensures that the OpenAPI document always reflects the correct server object when a WAR without server object is deployed
 * @throws Exception s
 */
@Test public void testContextRootWARWithPathPrefixedContextRoot() throws Exception {
  OpenAPITestUtil.addApplication(server,APP_NAME_9);
  String doc=OpenAPIConnection.openAPIDocsConnection(server,false).download();
  JsonNode openapiNode=OpenAPITestUtil.readYamlTree(doc);
  OpenAPITestUtil.checkServer(openapiNode,OpenAPITestUtil.getServerURLs(server,server.getHttpDefaultPort(),server.getHttpDefaultSecurePort(),null));
}
Program: 34721
Project: 34721
Buggy source:
/** 
 * Adds an WAR application inside the '${server.config.dir}/apps/' to the current config, or updates an application with a specific name if it already exists. This method waits for the app to be processed by OpenAPI Application Processor.
 * @param name the name of the application
 * @return the deployed application
 */
public static Application addApplication(LibertyServer server,String name) throws Exception {
  return addApplication(server,name,"String_Node_Str" + name + "String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public static Application addApplication(LibertyServer server,String name,boolean waitForAppProcessor) throws Exception {
  return addApplication(server,name,"String_Node_Str" + name + "String_Node_Str","String_Node_Str",waitForAppProcessor);
}
Program: 34722
Project: 34722
Buggy source:
/** 
 * Sets the http and https ports on the server configuration object. Note: After this method is called, you should also call <code>server.updateServerConfiguration(config);</code> for the configuration to take effect.
 * @param config
 * @param httpPort
 * @param httpsPort
 * @throws Exception
 */
public static void changeServerPorts(LibertyServer server,int httpPort,int httpsPort) throws Exception {
  ServerConfiguration config=server.getServerConfiguration();
  HttpEndpoint http=config.getHttpEndpoints().getById("String_Node_Str");
  if (http == null) {
    http=new HttpEndpoint();
    http.setId("String_Node_Str");
    http.setHttpPort(server.getHttpDefaultPort());
    http.setHttpPort(server.getHttpDefaultSecurePort());
    config.getHttpEndpoints().add(http);
  }
  if (http.getHttpPort() == httpPort && http.getHttpsPort() == httpsPort) {
    return;
  }
  http.setHttpPort(httpPort);
  http.setHttpsPort(httpsPort);
  if (server.isStarted()) {
    server.setMarkToEndOfLog();
    server.updateServerConfiguration(config);
    assertNotNull("String_Node_Str",server.waitForConfigUpdateInLogUsingMark(null,false));
    server.resetLogMarks();
  }
 else {
    server.updateServerConfiguration(config);
  }
}

Fixed version (ground truth):
public static void changeServerPorts(LibertyServer server,int httpPort,int httpsPort) throws Exception {
  ServerConfiguration config=server.getServerConfiguration();
  HttpEndpoint http=config.getHttpEndpoints().getById("String_Node_Str");
  if (http == null) {
    http=new HttpEndpoint();
    http.setId("String_Node_Str");
    http.setHttpPort(httpPort);
    http.setHttpsPort(httpsPort);
    config.getHttpEndpoints().add(http);
  }
 else   if (http.getHttpPort() == httpPort && http.getHttpsPort() == httpsPort) {
    return;
  }
  http.setHttpPort(httpPort);
  http.setHttpsPort(httpsPort);
  if (server.isStarted()) {
    setMarkToEndOfAllLogs(server);
    server.updateServerConfiguration(config);
    assertNotNull("String_Node_Str",server.waitForConfigUpdateInLogUsingMark(null,false));
    String regex="String_Node_Str" + "String_Node_Str" + (httpPort == -1 ? 0 : httpPort) + "String_Node_Str"+ (httpsPort == -1 ? 0 : httpsPort);
    server.waitForStringInTrace(regex,TIMEOUT);
  }
 else {
    server.updateServerConfiguration(config);
  }
}
Program: 34723
Project: 34723
Buggy source:
@Override public HttpOutputStreamImpl getBody(){
  if (null == this.body) {
    if (this.useEE7Streams) {
      this.body=new HttpOutputStreamEE7(this.isc);
    }
 else {
      this.body=new HttpOutputStreamImpl(this.isc);
    }
    this.body.setVirtualConnection(this.connlink.getVirtualConnection());
    if (this.message != null) {
      long messageContentLength=getContentLength();
      if (messageContentLength != -1) {
        this.body.setContentLength(getContentLength());
      }
    }
  }
  return this.body;
}

Fixed version (ground truth):
@Override public HttpOutputStreamImpl getBody(){
  if (null == this.body) {
    if (this.useEE7Streams) {
      this.body=new HttpOutputStreamEE7(this.isc);
      isLastStreamUsedEE7=true;
    }
 else {
      this.body=new HttpOutputStreamImpl(this.isc);
    }
    this.body.setVirtualConnection(this.connlink.getVirtualConnection());
    if (this.message != null) {
      long messageContentLength=getContentLength();
      if (messageContentLength != -1) {
        this.body.setContentLength(getContentLength());
      }
    }
  }
 else   if (this.useEE7Streams && !isLastStreamUsedEE7) {
    this.body=new HttpOutputStreamEE7(this.isc);
    isLastStreamUsedEE7=true;
  }
 else   if (!this.useEE7Streams && isLastStreamUsedEE7) {
    this.body=new HttpOutputStreamImpl(this.isc);
    isLastStreamUsedEE7=false;
  }
  return this.body;
}