nus-yam/ex-repair huggingface dataset:
Program: 28932
Project: 28932
Buggy source:
/** 
 * Creates a new instance of HAStoreBase 
 */
public HAStoreBase(ServerConfigLookup serverConfigLookup,JavaEEIOUtils ioUtils){
  this.ioUtils=ioUtils;
  this.serverConfigLookup=serverConfigLookup;
}

Fixed version (ground truth):
/** 
 * Creates a new instance of HAStoreBase 
 */
public HAStoreBase(JavaEEIOUtils ioUtils){
  this.ioUtils=ioUtils;
}
Program: 28933
Project: 28933
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
@Override public void doSave(Session session) throws IOException {
  if (!((StandardSession)session).getIsValid()) {
    return;
  }
  ModifiedAttributeHASession modAttrSession=(ModifiedAttributeHASession)session;
  BackingStore<String,CompositeMetadata> replicator=getCompositeMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + replicator);
  }
  CompositeMetadata compositeMetadata=createCompositeMetadata(modAttrSession);
  try {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.fine("String_Node_Str" + compositeMetadata + "String_Node_Str"+ session.getIdInternal());
    }
    replicator.save(session.getIdInternal(),compositeMetadata,!((HASession)session).isPersistent());
    modAttrSession.resetAttributeState();
    postSaveUpdate(modAttrSession);
  }
 catch (  BackingStoreException ex) {
  }
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
@Override public void doSave(Session session) throws IOException {
  if (!((StandardSession)session).getIsValid()) {
    return;
  }
  if (!(session instanceof ModifiedAttributeHASession) || !(session instanceof HASession)) {
    return;
  }
  ModifiedAttributeHASession modAttrSession=(ModifiedAttributeHASession)session;
  BackingStore<String,CompositeMetadata> replicator=getCompositeMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + replicator);
  }
  CompositeMetadata compositeMetadata=createCompositeMetadata(modAttrSession);
  try {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.fine("String_Node_Str" + compositeMetadata + "String_Node_Str"+ session.getIdInternal());
    }
    replicator.save(session.getIdInternal(),compositeMetadata,!((HASession)session).isPersistent());
    modAttrSession.resetAttributeState();
    postSaveUpdate(modAttrSession);
  }
 catch (  BackingStoreException ex) {
  }
}
Program: 28934
Project: 28934
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void save(Session session) throws IOException {
  HASession haSess=(HASession)session;
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void save(Session session) throws IOException {
  if (!(session instanceof HASession)) {
    return;
  }
  HASession haSess=(HASession)session;
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
}
Program: 28935
Project: 28935
Buggy source:
/** 
 * Creates a new instance of ReplicationAttributeStore 
 */
public ReplicationAttributeStore(ServerConfigLookup serverConfigLookup,JavaEEIOUtils ioUtils){
  super(serverConfigLookup,ioUtils);
  setLogLevel();
}

Fixed version (ground truth):
/** 
 * Creates a new instance of ReplicationAttributeStore 
 */
public ReplicationAttributeStore(JavaEEIOUtils ioUtils){
  super(ioUtils);
  setLogLevel();
}
Program: 28936
Project: 28936
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
@Override public void doValveSave(Session session) throws IOException {
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + ((StandardSession)session).getIsValid());
    _logger.fine("String_Node_Str" + ((HASession)session).getSsoId());
  }
  if (!((StandardSession)session).getIsValid()) {
    return;
  }
  ModifiedAttributeHASession modAttrSession=(ModifiedAttributeHASession)session;
  String userName="String_Node_Str";
  if (session.getPrincipal() != null) {
    userName=session.getPrincipal().getName();
    ((BaseHASession)session).setUserName(userName);
  }
  BackingStore<String,CompositeMetadata> replicator=getCompositeMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + replicator);
  }
  CompositeMetadata compositeMetadata=createCompositeMetadata(modAttrSession);
  try {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.fine("String_Node_Str" + compositeMetadata + "String_Node_Str"+ session.getIdInternal());
    }
    replicator.save(session.getIdInternal(),compositeMetadata,!((HASession)session).isPersistent());
    modAttrSession.resetAttributeState();
    postSaveUpdate(modAttrSession);
  }
 catch (  BackingStoreException ex) {
  }
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
@Override public void doValveSave(Session session) throws IOException {
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + ((StandardSession)session).getIsValid());
    if (session instanceof HASession) {
      _logger.fine("String_Node_Str" + ((HASession)session).getSsoId());
    }
  }
  if (!((StandardSession)session).getIsValid()) {
    return;
  }
  if (!(session instanceof ModifiedAttributeHASession) || !(session instanceof BaseHASession)) {
    return;
  }
  ModifiedAttributeHASession modAttrSession=(ModifiedAttributeHASession)session;
  String userName="String_Node_Str";
  if (session.getPrincipal() != null) {
    userName=session.getPrincipal().getName();
    ((BaseHASession)session).setUserName(userName);
  }
  BackingStore<String,CompositeMetadata> replicator=getCompositeMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + replicator);
  }
  CompositeMetadata compositeMetadata=createCompositeMetadata(modAttrSession);
  try {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.fine("String_Node_Str" + compositeMetadata + "String_Node_Str"+ session.getIdInternal());
    }
    replicator.save(session.getIdInternal(),compositeMetadata,!((HASession)session).isPersistent());
    modAttrSession.resetAttributeState();
    postSaveUpdate(modAttrSession);
  }
 catch (  BackingStoreException ex) {
  }
}
Program: 28937
Project: 28937
Buggy source:
/** 
 * Given a session, load its attributes
 * @param modifiedAttributeSession The session (header info only) having its attributes loaded
 * @param attributeList The List<AttributeMetadata> list of loaded attributes
 * @return A newly created object for the given session attribute data
 */
protected void loadAttributes(ModifiedAttributeHASession modifiedAttributeSession,Collection attributeList){
  if (_logger.isLoggable(Level.FINEST)) {
    _logger.finest("String_Node_Str" + modifiedAttributeSession.getIdInternal());
  }
  String thisAttrName=null;
  SessionAttributeMetadata.Operation thisAttrOp=null;
  Object thisAttrVal=null;
  Iterator it=attributeList.iterator();
  while (it.hasNext()) {
    SessionAttributeMetadata nextAttrMetadata=(SessionAttributeMetadata)it.next();
    thisAttrName=nextAttrMetadata.getAttributeName();
    thisAttrOp=nextAttrMetadata.getOperation();
    byte[] nextAttrState=nextAttrMetadata.getState();
    thisAttrVal=null;
    try {
      thisAttrVal=getAttributeValue(nextAttrState);
    }
 catch (    ClassNotFoundException ex1) {
    }
catch (    IOException ex2) {
    }
    if (_logger.isLoggable(Level.FINEST)) {
      _logger.finest("String_Node_Str" + thisAttrName);
    }
    if (thisAttrVal != null) {
      if (_logger.isLoggable(Level.FINEST)) {
        _logger.finest("String_Node_Str" + thisAttrName);
      }
      modifiedAttributeSession.setAttribute(thisAttrName,thisAttrVal);
      modifiedAttributeSession.setAttributeStatePersistent(thisAttrName,false);
      modifiedAttributeSession.setAttributeStateDirty(thisAttrName,false);
    }
  }
}

Fixed version (ground truth):
/** 
 * Given a session, load its attributes
 * @param modifiedAttributeSession The session (header info only) having its attributes loaded
 * @param attributeList The List<AttributeMetadata> list of loaded attributes
 * @return A newly created object for the given session attribute data
 */
protected void loadAttributes(ModifiedAttributeHASession modifiedAttributeSession,Collection attributeList){
  if (_logger.isLoggable(Level.FINEST)) {
    _logger.finest("String_Node_Str" + modifiedAttributeSession.getIdInternal());
  }
  String thisAttrName=null;
  Object thisAttrVal=null;
  Iterator it=attributeList.iterator();
  while (it.hasNext()) {
    SessionAttributeMetadata nextAttrMetadata=(SessionAttributeMetadata)it.next();
    thisAttrName=nextAttrMetadata.getAttributeName();
    byte[] nextAttrState=nextAttrMetadata.getState();
    thisAttrVal=null;
    try {
      thisAttrVal=getAttributeValue(nextAttrState);
    }
 catch (    ClassNotFoundException ex1) {
    }
catch (    IOException ex2) {
    }
    if (_logger.isLoggable(Level.FINEST)) {
      _logger.finest("String_Node_Str" + thisAttrName);
    }
    if (thisAttrVal != null) {
      if (_logger.isLoggable(Level.FINEST)) {
        _logger.finest("String_Node_Str" + thisAttrName);
      }
      modifiedAttributeSession.setAttribute(thisAttrName,thisAttrVal);
      modifiedAttributeSession.setAttributeStatePersistent(thisAttrName,false);
      modifiedAttributeSession.setAttributeStateDirty(thisAttrName,false);
    }
  }
}
Program: 28938
Project: 28938
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void valveSave(Session session) throws IOException {
  HASession haSess=(HASession)session;
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doValveSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void valveSave(Session session) throws IOException {
  if (!(session instanceof HASession)) {
    return;
  }
  HASession haSess=(HASession)session;
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doValveSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
}
Program: 28939
Project: 28939
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void doSave(Session session) throws IOException {
  byte[] sessionState=this.getByteArray(session,isReplicationCompressionEnabled());
  BackingStore<String,SimpleMetadata> backingStore=getSimpleMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + backingStore);
  }
  SimpleMetadata simpleMetadata=SimpleMetadataFactory.createSimpleMetadata(session.getVersion(),session.getLastAccessedTime(),session.getMaxInactiveInterval() * 1000L,sessionState);
  try {
    backingStore.save(session.getIdInternal(),simpleMetadata,!((HASession)session).isPersistent());
  }
 catch (  BackingStoreException ex) {
    IOException ex1=(IOException)new IOException("String_Node_Str" + ex.getMessage()).initCause(ex);
    throw ex1;
  }
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void doSave(Session session) throws IOException {
  if (!(session instanceof HASession)) {
    return;
  }
  byte[] sessionState=this.getByteArray(session,isReplicationCompressionEnabled());
  BackingStore<String,SimpleMetadata> backingStore=getSimpleMetadataBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + backingStore);
  }
  SimpleMetadata simpleMetadata=SimpleMetadataFactory.createSimpleMetadata(session.getVersion(),session.getLastAccessedTime(),session.getMaxInactiveInterval() * 1000L,sessionState);
  try {
    backingStore.save(session.getIdInternal(),simpleMetadata,!((HASession)session).isPersistent());
  }
 catch (  BackingStoreException ex) {
    IOException ex1=(IOException)new IOException("String_Node_Str" + ex.getMessage()).initCause(ex);
    throw ex1;
  }
}
Program: 28940
Project: 28940
Buggy source:
/** 
 * update the lastaccess time of the specified Session into this Store.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void updateLastAccessTime(Session session) throws IOException {
  BackingStore<String,? extends Storeable> backingStore=getStoreableBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + backingStore);
  }
  try {
    backingStore.updateTimestamp(session.getIdInternal(),"String_Node_Str" + session.getVersion(),((BaseHASession)session).getLastAccessedTimeInternal());
  }
 catch (  BackingStoreException ex) {
  }
}

Fixed version (ground truth):
/** 
 * update the lastaccess time of the specified Session into this Store.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void updateLastAccessTime(Session session) throws IOException {
  if (!(session instanceof BaseHASession)) {
    return;
  }
  BackingStore<String,? extends Storeable> backingStore=getStoreableBackingStore();
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + backingStore);
  }
  try {
    backingStore.updateTimestamp(session.getIdInternal(),"String_Node_Str" + session.getVersion(),((BaseHASession)session).getLastAccessedTimeInternal());
  }
 catch (  BackingStoreException ex) {
  }
}
Program: 28941
Project: 28941
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void save(Session session) throws IOException {
  HASession haSess=(HASession)session;
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void save(Session session) throws IOException {
  if (!(session instanceof HASession)) {
    return;
  }
  HASession haSess=(HASession)session;
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
}
Program: 28943
Project: 28943
Buggy source:
/** 
 * Creates a new instance of ReplicationStore
 */
public ReplicationStore(ServerConfigLookup serverConfigLookup,JavaEEIOUtils ioUtils){
  super(serverConfigLookup,ioUtils);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of ReplicationStore
 */
public ReplicationStore(JavaEEIOUtils ioUtils){
  super(ioUtils);
}
Program: 28944
Project: 28944
Buggy source:
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void valveSave(Session session) throws IOException {
  HASession haSess=(HASession)session;
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + haSess.getIdInternal() + "String_Node_Str"+ haSess.isPersistent()+ "String_Node_Str"+ haSess.isDirty());
  }
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doValveSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
  this.doValveSave(session);
}

Fixed version (ground truth):
/** 
 * Save the specified Session into this Store.  Any previously saved information for the associated session identifier is replaced.
 * @param session Session to be saved
 * @exception IOException if an input/output error occurs
 */
public void valveSave(Session session) throws IOException {
  if (!(session instanceof HASession)) {
    return;
  }
  HASession haSess=(HASession)session;
  if (_logger.isLoggable(Level.FINE)) {
    _logger.fine("String_Node_Str" + haSess.getIdInternal() + "String_Node_Str"+ haSess.isPersistent()+ "String_Node_Str"+ haSess.isDirty());
  }
  if (haSess.isPersistent() && !haSess.isDirty()) {
    this.updateLastAccessTime(session);
  }
 else {
    this.doValveSave(session);
    haSess.setPersistent(true);
  }
  haSess.setDirty(false);
  this.doValveSave(session);
}
Program: 28945
Project: 28945
Buggy source:
public void initializePersistenceStrategy(Context ctx,SessionManager smBean,ServerConfigLookup serverConfigLookup){
  super.initializePersistenceStrategy(ctx,smBean,serverConfigLookup);
  if (this.getPersistenceScope().equals("String_Node_Str")) {
    setupReplicationWebEventPersistentManager(SimpleMetadata.class,new FullSessionFactory(),new ReplicationStore(serverConfigLookup,ioUtils),ctx,serverConfigLookup);
  }
 else   if (this.getPersistenceScope().equals("String_Node_Str")) {
    setupReplicationWebEventPersistentManager(SimpleMetadata.class,new ModifiedSessionFactory(),new ReplicationStore(serverConfigLookup,ioUtils),ctx,serverConfigLookup);
  }
 else   if (this.getPersistenceScope().equals("String_Node_Str")) {
    setupReplicationWebEventPersistentManager(CompositeMetadata.class,new ModifiedAttributeSessionFactory(),new ReplicationAttributeStore(serverConfigLookup,ioUtils),ctx,serverConfigLookup);
  }
 else {
    throw new IllegalArgumentException(this.getPersistenceScope());
  }
  HASessionStoreValve haValve=new HASessionStoreValve();
  StandardContext stdCtx=(StandardContext)ctx;
  stdCtx.addValve((GlassFishValve)haValve);
}

Fixed version (ground truth):
public void initializePersistenceStrategy(Context ctx,SessionManager smBean,ServerConfigLookup serverConfigLookup){
  super.initializePersistenceStrategy(ctx,smBean,serverConfigLookup);
  if (this.getPersistenceScope().equals("String_Node_Str")) {
    setupReplicationWebEventPersistentManager(SimpleMetadata.class,new FullSessionFactory(),new ReplicationStore(ioUtils),ctx,serverConfigLookup);
  }
 else   if (this.getPersistenceScope().equals("String_Node_Str")) {
    setupReplicationWebEventPersistentManager(SimpleMetadata.class,new ModifiedSessionFactory(),new ReplicationStore(ioUtils),ctx,serverConfigLookup);
  }
 else   if (this.getPersistenceScope().equals("String_Node_Str")) {
    setupReplicationWebEventPersistentManager(CompositeMetadata.class,new ModifiedAttributeSessionFactory(),new ReplicationAttributeStore(ioUtils),ctx,serverConfigLookup);
  }
 else {
    throw new IllegalArgumentException(this.getPersistenceScope());
  }
  HASessionStoreValve haValve=new HASessionStoreValve();
  StandardContext stdCtx=(StandardContext)ctx;
  stdCtx.addValve((GlassFishValve)haValve);
}
Program: 28946
Project: 28946
Buggy source:
/** 
 */
public void _refresh_com_sun_ejb_containers_read_only_bean_(Object primaryKey) throws java.rmi.RemoteException {
  robContainer.setRefreshFlag(primaryKey);
}

Fixed version (ground truth):
/** 
 */
public void _refresh_com_sun_ejb_containers_read_only_bean_(Object primaryKey) throws java.rmi.RemoteException {
  if (robContainer != null) {
    robContainer.setRefreshFlag(primaryKey);
  }
}
Program: 28947
Project: 28947
Buggy source:
public void _refresh_All() throws java.rmi.RemoteException {
  robContainer.refreshAll();
}

Fixed version (ground truth):
public void _refresh_All() throws java.rmi.RemoteException {
  if (robContainer != null) {
    robContainer.refreshAll();
  }
}
Program: 28948
Project: 28948
Buggy source:
private void callLoad(EntityBean ejb,EntityContextImpl entityCtx,int pkLevelSequenceNum,long pkLastRefreshedAt,long currentTime) throws Exception {
  ReadOnlyContextImpl context=(ReadOnlyContextImpl)entityCtx;
  if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,"String_Node_Str" + ejbDescriptor.getName() + "String_Node_Str"+ entityCtx.getPrimaryKey()+ "String_Node_Str"+ new Date(currentTime));
  }
  try {
    context.setInEjbLoad(true);
    ejb.ejbLoad();
    if (pkLevelSequenceNum > 0) {
      context.setPKLevelSequenceNum(pkLevelSequenceNum);
    }
    context.setLastRefreshedAt(pkLastRefreshedAt);
  }
  finally {
    context.setInEjbLoad(false);
  }
}

Fixed version (ground truth):
private void callLoad(EntityBean ejb,ReadOnlyContextImpl context,int pkLevelSequenceNum,long pkLastRefreshedAt,long currentTime) throws Exception {
  if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,"String_Node_Str" + ejbDescriptor.getName() + "String_Node_Str"+ context.getPrimaryKey()+ "String_Node_Str"+ new Date(currentTime));
  }
  try {
    context.setInEjbLoad(true);
    ejb.ejbLoad();
    if (pkLevelSequenceNum > 0) {
      context.setPKLevelSequenceNum(pkLevelSequenceNum);
    }
    context.setLastRefreshedAt(pkLastRefreshedAt);
  }
  finally {
    context.setInEjbLoad(false);
  }
}
Program: 28949
Project: 28949
Buggy source:
protected void callEJBLoad(EntityBean ejb,EntityContextImpl entityCtx,boolean activeTx) throws Exception {
  ReadOnlyContextImpl context=(ReadOnlyContextImpl)entityCtx;
  ReadOnlyBeanInfo robInfo=context.getReadOnlyBeanInfo();
  int pkLevelSequenceNum=0;
  long pkLastRefreshedAt=0;
synchronized (robInfo) {
    int currentBeanLevelSequenceNum=beanLevelSequenceNum;
    if (robInfo.beanLevelSequenceNum != currentBeanLevelSequenceNum) {
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str" + "String_Node_Str" + beanLevelSequenceNum + robInfo+ "String_Node_Str"+ new Date());
      }
      robInfo.refreshNeeded=true;
    }
 else     if (RELATIVE_TIME_CHECK_MODE && (refreshPeriodInMillis > 0)) {
      if ((currentTimeInMillis - robInfo.lastRefreshedAt) > refreshPeriodInMillis) {
        if (_logger.isLoggable(Level.FINE)) {
          _logger.log(Level.FINE,"String_Node_Str" + "String_Node_Str" + robInfo.lastRefreshedAt + "String_Node_Str"+ currentTimeInMillis);
        }
        robInfo.refreshNeeded=true;
      }
    }
    if (robInfo.refreshNeeded) {
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str" + robInfo + "String_Node_Str"+ new Date());
      }
      try {
        if (isContainerManagedPers) {
          BeanStateSynchronization beanStateSynch=(BeanStateSynchronization)ejb;
          beanStateSynch.ejb__refresh(entityCtx.getPrimaryKey());
          if (_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE,"String_Node_Str" + robInfo + "String_Node_Str"+ new Date());
          }
        }
 else {
          if (ejb instanceof BeanStateSynchronization) {
            BeanStateSynchronization beanStateSynch=(BeanStateSynchronization)ejb;
            beanStateSynch.ejb__refresh(entityCtx.getPrimaryKey());
          }
        }
      }
  finally {
        robInfo.refreshNeeded=false;
      }
      updateAfterRefresh(robInfo);
    }
    pkLevelSequenceNum=robInfo.pkLevelSequenceNum;
    pkLastRefreshedAt=robInfo.lastRefreshedAt;
  }
  if ((entityCtx.isNewlyActivated()) || (context.getPKLevelSequenceNum() != pkLevelSequenceNum)) {
    callLoad(ejb,context,pkLevelSequenceNum,pkLastRefreshedAt,currentTimeInMillis);
  }
}

Fixed version (ground truth):
protected void callEJBLoad(EntityBean ejb,EntityContextImpl entityCtx,boolean activeTx) throws Exception {
}
Program: 28950
Project: 28950
Buggy source:
protected void afterNewlyActivated(EntityContextImpl context){
  ReadOnlyBeanInfo robInfo=addToCache(context.getPrimaryKey(),true);
  ReadOnlyContextImpl readOnlyContext=(ReadOnlyContextImpl)context;
  readOnlyContext.setReadOnlyBeanInfo(robInfo);
}

Fixed version (ground truth):
protected void afterNewlyActivated(EntityContextImpl context){
}
Program: 28951
Project: 28951
Buggy source:
protected void addPooledEJB(EntityContextImpl ctx){
  try {
    ReadOnlyContextImpl readOnlyCtx=(ReadOnlyContextImpl)ctx;
    if (readOnlyCtx.getReadOnlyBeanInfo() != null) {
      readOnlyCtx.setReadOnlyBeanInfo(null);
      robCache.remove(ctx.getPrimaryKey(),true);
    }
  }
 catch (  Exception ex) {
    _logger.log(Level.SEVERE,"String_Node_Str",ex);
    EJBException ejbEx=new EJBException();
    ejbEx.initCause(ex);
    throw ejbEx;
  }
 finally {
    super.addPooledEJB(ctx);
  }
}

Fixed version (ground truth):
protected void addPooledEJB(EntityContextImpl ctx){
}
Program: 28952
Project: 28952
Buggy source:
protected Object internalGet(int hashCode,Object key,boolean incrementRefCount){
  int index=getIndex(hashCode);
  Object value=null;
  CacheItem item=null;
synchronized (bucketLocks[index]) {
    item=buckets[index];
    for (; item != null; item=item.getNext()) {
      if ((hashCode == item.getHashCode()) && eq(key,item.getKey())) {
        break;
      }
    }
    if (item != null) {
      value=item.getValue();
      if (incrementRefCount) {
        EJBObjectCacheItem eoItem=(EJBObjectCacheItem)item;
        eoItem.refCount++;
        if (_printRefCount) {
          incrementReferenceCount();
        }
        if (!eoItem.isTrimmed()) {
          itemRemoved(eoItem);
        }
      }
    }
  }
  if (item != null)   incrementHitCount();
 else   incrementMissCount();
  return value;
}

Fixed version (ground truth):
protected Object internalGet(int hashCode,Object key,boolean incrementRefCount){
}
Program: 28953
Project: 28953
Buggy source:
protected Object internalPut(int hashCode,Object key,Object value,int size,boolean incrementRefCount){
  int index=getIndex(hashCode);
  CacheItem item, oldItem=null, overflow=null;
  EJBObjectCacheItem newItem=null;
  Object oldValue=null;
  int oldSize=0;
synchronized (bucketLocks[index]) {
    for (item=buckets[index]; item != null; item=item.getNext()) {
      if ((hashCode == item.getHashCode()) && eq(key,item.getKey())) {
        oldItem=item;
        break;
      }
    }
    if (oldItem == null) {
      newItem=(EJBObjectCacheItem)createItem(hashCode,key,value,size);
      newItem.setTrimmed(incrementRefCount);
      newItem.setNext(buckets[index]);
      buckets[index]=newItem;
      if (incrementRefCount) {
        newItem.refCount++;
        if (_printRefCount) {
          incrementReferenceCount();
        }
      }
 else {
        overflow=itemAdded(newItem);
      }
    }
 else {
      oldValue=oldItem.getValue();
      if (incrementRefCount) {
        EJBObjectCacheItem oldEJBO=(EJBObjectCacheItem)oldItem;
        oldEJBO.refCount++;
        if (_printRefCount) {
          incrementReferenceCount();
        }
      }
    }
  }
  if (newItem != null) {
    incrementEntryCount();
    if ((overflow != null) && (listener != null)) {
      listener.handleOverflow(overflow.getKey());
    }
  }
  return oldValue;
}

Fixed version (ground truth):
protected Object internalPut(int hashCode,Object key,Object value,int size,boolean incrementRefCount){
}
Program: 28954
Project: 28954
Buggy source:
protected void itemRemoved(CacheItem item){
  LruCacheItem l=(LruCacheItem)item;
synchronized (this) {
    if (l.isTrimmed()) {
      return;
    }
    LruCacheItem prev=l.getLPrev();
    LruCacheItem next=l.getLNext();
    l.setTrimmed(true);
    if (prev != null)     prev.setLNext(next);
 else     head=next;
    if (next != null)     next.setLPrev(prev);
 else     tail=prev;
    l.setLNext(null);
    l.setLPrev(null);
    listSize--;
  }
}

Fixed version (ground truth):
protected void itemRemoved(CacheItem item){
}
Program: 28955
Project: 28955
Buggy source:
protected Object internalRemove(Object key,boolean decrementRefCount){
  int hashCode=hash(key);
  int index=getIndex(hashCode);
  CacheItem prev=null, item=null;
synchronized (bucketLocks[index]) {
    for (item=buckets[index]; item != null; item=item.getNext()) {
      if (hashCode == item.getHashCode() && key.equals(item.getKey())) {
        EJBObjectCacheItem eoItem=(EJBObjectCacheItem)item;
        if (decrementRefCount) {
          if (eoItem.refCount > 0) {
            eoItem.refCount--;
            if (_printRefCount) {
              decrementReferenceCount();
            }
          }
        }
        if (eoItem.refCount > 0) {
          return null;
        }
        if (prev == null) {
          buckets[index]=item.getNext();
        }
 else {
          prev.setNext(item.getNext());
        }
        item.setNext(null);
        itemRemoved(item);
        break;
      }
      prev=item;
    }
  }
  if (item != null) {
    decrementEntryCount();
    incrementRemovalCount();
    incrementHitCount();
    return item.getValue();
  }
 else {
    incrementMissCount();
    return null;
  }
}

Fixed version (ground truth):
protected Object internalRemove(Object key,boolean decrementRefCount){
}
Program: 28956
Project: 28956
Buggy source:
void clear(){
synchronized (asyncListenerContexts) {
    asyncListenerContexts.clear();
  }
}

Fixed version (ground truth):
void clear(){
synchronized (asyncListenerContexts) {
    asyncListenerContexts.clear();
  }
  StandardContext ctx=(StandardContext)origRequest.getContext();
  if (ctx != null) {
    for (    AsyncListener l : listenerQueue) {
      ctx.fireContainerEvent(ContainerEvent.PRE_DESTROY,l);
    }
  }
  listenerQueue.clear();
  servletRequest=null;
  servletResponse=null;
  origRequest=null;
}
Program: 28957
Project: 28957
Buggy source:
@Override public <T extends AsyncListener>T createListener(Class<T> clazz) throws ServletException {
  T listener=null;
  StandardContext ctx=(StandardContext)origRequest.getContext();
  if (ctx != null) {
    try {
      listener=ctx.createListenerInstance(clazz);
    }
 catch (    Throwable t) {
      throw new ServletException(t);
    }
  }
  return listener;
}

Fixed version (ground truth):
@Override public <T extends AsyncListener>T createListener(Class<T> clazz) throws ServletException {
  T listener=null;
  StandardContext ctx=(StandardContext)origRequest.getContext();
  if (ctx != null) {
    try {
      listener=ctx.createListenerInstance(clazz);
      listenerQueue.add(listener);
    }
 catch (    Throwable t) {
      throw new ServletException(t);
    }
  }
  return listener;
}
Program: 28958
Project: 28958
Buggy source:
private boolean containsAnnotation(final ByteBuffer headerBuffer) throws IOException {
  if (headerBuffer.getInt() != magic) {
    return false;
  }
  majorVersion=headerBuffer.getShort();
  minorVersion=headerBuffer.getShort();
  int constantPoolSize=headerBuffer.getShort();
  return constantPoolInfo.containsAnnotation(constantPoolSize,headerBuffer);
}

Fixed version (ground truth):
private boolean containsAnnotation(final ByteBuffer headerBuffer) throws IOException {
  if (headerBuffer.getInt() != magic) {
    return false;
  }
  headerBuffer.getShort();
  headerBuffer.getShort();
  int constantPoolSize=headerBuffer.getShort();
  return constantPoolInfo.containsAnnotation(constantPoolSize,headerBuffer);
}
Program: 28959
Project: 28959
Buggy source:
void initializePump(){
  pump=new Thread(){
    public void run(){
      try {
        while (!done.isSignalled()) {
          log();
        }
      }
 catch (      RuntimeException e) {
      }
    }
  }
;
  pump.setDaemon(true);
  pump.start();
}

Fixed version (ground truth):
void initializePump(){
  pump=new Thread(){
    public void run(){
      while (!done.isSignalled()) {
        try {
          log();
        }
 catch (        Exception e) {
        }
      }
    }
  }
;
  pump.setDaemon(true);
  pump.start();
}
Program: 28960
Project: 28960
Buggy source:
/** 
 * Create a new start element based on the original but that does not include  the specified attribute.
 */
private StartElement getSkippedElementStartEvent(XMLEvent event){
  Set attributes=new HashSet();
  for (java.util.Iterator i=event.asStartElement().getAttributes(); i.hasNext(); ) {
    Attribute a=(Attribute)i.next();
    if (!DISABLE_SUB_ELEMENTS.contains(a.getName().getLocalPart())) {
      attributes.add(a);
    }
  }
  StartElement oldStartEvent=event.asStartElement();
  return xmlEventFactory.createStartElement(oldStartEvent.getName(),attributes.iterator(),oldStartEvent.getNamespaces());
}

Fixed version (ground truth):
/** 
 * Create a new start element based on the original but that does not include the specified attribute.
 */
private StartElement getSkippedElementStartEvent(XMLEvent event){
  Set attributes=new HashSet();
  for (java.util.Iterator i=event.asStartElement().getAttributes(); i.hasNext(); ) {
    Attribute a=(Attribute)i.next();
    if (!DISABLE_SUB_ELEMENTS.contains(a.getName().getLocalPart())) {
      attributes.add(a);
    }
  }
  StartElement oldStartEvent=event.asStartElement();
  return xmlEventFactory.createStartElement(oldStartEvent.getName(),attributes.iterator(),oldStartEvent.getNamespaces());
}
Program: 28963
Project: 28963
Buggy source:
private boolean addChecksFromExplicitAccessRequiredAnnos(final AdminCommand command,final List<AccessCheckWork> accessChecks,final boolean isTaggable) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
  boolean isAnnotated=false;
  for (ClassLineageIterator cIt=new ClassLineageIterator(command.getClass()); cIt.hasNext(); ) {
    final Class<?> c=cIt.next();
    final AccessRequired ar=c.getAnnotation(AccessRequired.class);
    if (ar != null) {
      isAnnotated=true;
      addAccessChecksFromAnno(ar,command,accessChecks,c,isTaggable);
    }
    final AccessRequired.List arList=c.getAnnotation(AccessRequired.List.class);
    if (arList != null) {
      isAnnotated=true;
      for (      final AccessRequired repeatedAR : arList.value()) {
        addAccessChecksFromAnno(repeatedAR,command,accessChecks,c,isTaggable);
      }
    }
    final AccessRequired.Typed arTyped=c.getAnnotation(AccessRequired.Typed.class);
    if (arTyped != null) {
      isAnnotated=true;
      addAccessChecksFromAnno(arTyped,command,accessChecks,c,isTaggable);
    }
    final AccessRequired.Typed.List arTypedList=c.getAnnotation(AccessRequired.Typed.List.class);
    if (arTypedList != null) {
      for (      AccessRequired.Typed arT : arTypedList.value()) {
        isAnnotated=true;
        addAccessChecksFromAnno(arT,command,accessChecks,c,isTaggable);
      }
    }
    isAnnotated|=addAccessChecksFromFields(c,command,accessChecks,isTaggable);
  }
  return isAnnotated;
}

Fixed version (ground truth):
private boolean addChecksFromExplicitAccessRequiredAnnos(final AdminCommand command,final List<AccessCheckWork> accessChecks,final boolean isTaggable) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
  boolean isAnnotated=false;
  for (ClassLineageIterator cIt=new ClassLineageIterator(command.getClass()); cIt.hasNext(); ) {
    final Class<?> c=cIt.next();
    final AccessRequired ar=c.getAnnotation(AccessRequired.class);
    if (ar != null) {
      isAnnotated=true;
      addAccessChecksFromAnno(ar,command,accessChecks,c,isTaggable);
    }
    final AccessRequired.List arList=c.getAnnotation(AccessRequired.List.class);
    if (arList != null) {
      isAnnotated=true;
      for (      final AccessRequired repeatedAR : arList.value()) {
        addAccessChecksFromAnno(repeatedAR,command,accessChecks,c,isTaggable);
      }
    }
    isAnnotated|=addAccessChecksFromFields(c,command,accessChecks,isTaggable);
  }
  return isAnnotated;
}
Program: 28964
Project: 28964
Buggy source:
private boolean addAccessChecksFromAnno(final AccessRequired.Typed arTyped,final AdminCommand command,final List<AccessCheckWork> accessChecks,final boolean isTaggable){
  return false;
}

Fixed version (ground truth):
private boolean addAccessChecksFromAnno(final Field f,final AdminCommand command,final List<AccessCheckWork> accessChecks,final boolean isTaggable) throws IllegalArgumentException, IllegalAccessException {
  boolean isAnnotated=false;
  f.setAccessible(true);
  final AccessRequired.To arTo=f.getAnnotation(AccessRequired.To.class);
  if (arTo != null) {
    isAnnotated=true;
    final String resourceNameForField=resourceNameFromField(f,command);
    for (    final String access : arTo.value()) {
      final AccessCheck a=new AccessCheck(resourceNameForField,access);
      String tag=null;
      if (isTaggable) {
        tag="String_Node_Str" + f.getDeclaringClass().getName() + "String_Node_Str"+ f.getName();
      }
      accessChecks.add(new AccessCheckWork(a,tag));
    }
  }
  final AccessRequired.NewChild arNC=f.getAnnotation(AccessRequired.NewChild.class);
  if (arNC != null) {
    isAnnotated=true;
    String resourceNameForField=resourceNameFromNewChildAnno(arNC,f,command);
    for (    final String action : arNC.action()) {
      final AccessCheck a=new AccessCheck(resourceNameForField,action);
      String tag=null;
      if (isTaggable) {
        tag="String_Node_Str" + f.getDeclaringClass().getName() + "String_Node_Str"+ f.getName();
      }
      accessChecks.add(new AccessCheckWork(a,tag));
    }
  }
  return isAnnotated;
}
Program: 28965
Project: 28965
Buggy source:
private void addAccessChecksFromReSTEndpoint(final RestEndpoint restEndpoint,final List<AccessCheckWork> accessChecks,final boolean isTaggable){
  if (!restEndpoint.useForAuthorization()) {
    return;
  }
  final String action=optypeToAction.get(restEndpoint.opType());
  String resource;
  if (restEndpoint.params().length == 0) {
    resource=resourceNameFromRestEndpoint(restEndpoint.configBean(),restEndpoint.path(),locator);
  }
 else {
    resource=resourceNameFromRestEndpoint(restEndpoint.configBean(),restEndpoint.path(),locator);
  }
  final AccessCheck a=new AccessCheck(resource,action);
  String tag=null;
  if (isTaggable) {
    tag="String_Node_Str" + restEndpoint.configBean().getName() + "String_Node_Str"+ restEndpoint.opType();
  }
  accessChecks.add(new AccessCheckWork(a,tag));
}

Fixed version (ground truth):
private void addAccessChecksFromReSTEndpoint(final RestEndpoint restEndpoint,final List<AccessCheckWork> accessChecks,final boolean isTaggable){
  if (!restEndpoint.useForAuthorization()) {
    return;
  }
  final String action=optypeToAction.get(restEndpoint.opType());
  String resource;
  resource=resourceNameFromRestEndpoint(restEndpoint.configBean(),restEndpoint.path(),locator);
  final AccessCheck a=new AccessCheck(resource,action);
  String tag=null;
  if (isTaggable) {
    tag="String_Node_Str" + restEndpoint.configBean().getName() + "String_Node_Str"+ restEndpoint.opType();
  }
  accessChecks.add(new AccessCheckWork(a,tag));
}
Program: 28966
Project: 28966
Buggy source:
private static String convertName(final String name){
  StringBuilder buf=new StringBuilder(name.length() + 5);
  for (  String t : TOKENIZER.split(name)) {
    if (buf.length() > 0)     buf.append('-');
    buf.append(t.toLowerCase());
  }
  return buf.toString();
}

Fixed version (ground truth):
private static String convertName(final String name){
  StringBuilder buf=new StringBuilder(name.length() + 5);
  for (  String t : TOKENIZER.split(name)) {
    if (buf.length() > 0)     buf.append('-');
    buf.append(t.toLowerCase(Locale.ENGLISH));
  }
  return buf.toString();
}
Program: 28967
Project: 28967
Buggy source:
/** 
 * This ensures we don't step on another domain's node files on a remote instance. See bug GLASSFISH-14985.
 */
public boolean validateDasOptions(AdminCommandContext context){
  boolean isDasOptionsValid=true;
  if (theNode.isLocal() || (!theNode.isLocal() && theNode.getType().equals("String_Node_Str"))) {
    ActionReport report=ctx.getActionReport();
    report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    NodeUtils nodeUtils=new NodeUtils(habitat,logger);
    Server dasServer=servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
    String dasHost=dasServer.getAdminHost();
    String dasPort=Integer.toString(dasServer.getAdminPort());
    ArrayList<String> command=new ArrayList<String>();
    String humanCommand=null;
    if (!theNode.isLocal()) {
      command.add("String_Node_Str");
      command.add(dasHost);
    }
    command.add("String_Node_Str");
    command.add(dasPort);
    command.add("String_Node_Str");
    if (nodeDir != null) {
      command.add("String_Node_Str");
      command.add(nodeDir);
    }
    command.add("String_Node_Str");
    command.add(node);
    command.add(instance);
    nodeUtils.runAdminCommandOnNode(theNode,command,ctx,"String_Node_Str",null,null);
    if (report.getActionExitCode() != ActionReport.ExitCode.SUCCESS) {
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      isDasOptionsValid=false;
    }
  }
  return isDasOptionsValid;
}

Fixed version (ground truth):
/** 
 * This ensures we don't step on another domain's node files on a remote instance. See bug GLASSFISH-14985.
 */
private boolean validateDasOptions(AdminCommandContext context){
  boolean isDasOptionsValid=true;
  if (theNode.isLocal() || (!theNode.isLocal() && theNode.getType().equals("String_Node_Str"))) {
    ActionReport report=ctx.getActionReport();
    report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    NodeUtils nodeUtils=new NodeUtils(habitat,logger);
    Server dasServer=servers.getServer(SystemPropertyConstants.DAS_SERVER_NAME);
    String dasHost=dasServer.getAdminHost();
    String dasPort=Integer.toString(dasServer.getAdminPort());
    ArrayList<String> command=new ArrayList<String>();
    if (!theNode.isLocal()) {
      command.add("String_Node_Str");
      command.add(dasHost);
    }
    command.add("String_Node_Str");
    command.add(dasPort);
    command.add("String_Node_Str");
    if (nodeDir != null) {
      command.add("String_Node_Str");
      command.add(nodeDir);
    }
    command.add("String_Node_Str");
    command.add(node);
    command.add(instance);
    nodeUtils.runAdminCommandOnNode(theNode,command,ctx,"String_Node_Str",null,null);
    if (report.getActionExitCode() != ActionReport.ExitCode.SUCCESS) {
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      isDasOptionsValid=false;
    }
  }
  return isDasOptionsValid;
}
Program: 28968
Project: 28968
Buggy source:
/** 
 * Delivers bootstrap files for secure admin locally, because the instance is on the same system as the DAS (and therefore on the same system where this command is running).
 * @return 0 if successful, 1 otherwise
 */
private int bootstrapSecureAdminLocally(){
  final ActionReport report=ctx.getActionReport();
  try {
    final SecureAdminBootstrapHelper bootHelper=SecureAdminBootstrapHelper.getLocalHelper(env.getInstanceRoot(),getLocalInstanceDir());
    bootHelper.bootstrapInstance();
    bootHelper.close();
    return 0;
  }
 catch (  Exception ex) {
    String msg=Strings.get("String_Node_Str",instance,node,nodeHost);
    logger.log(Level.SEVERE,msg,ex);
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return 1;
  }
}

Fixed version (ground truth):
/** 
 * Delivers bootstrap files for secure admin locally, because the instance is on the same system as the DAS (and therefore on the same system where this command is running).
 * @return 0 if successful, 1 otherwise
 */
private int bootstrapSecureAdminLocally(){
  final ActionReport report=ctx.getActionReport();
  try {
    final SecureAdminBootstrapHelper bootHelper=SecureAdminBootstrapHelper.getLocalHelper(env.getInstanceRoot(),getLocalInstanceDir());
    bootHelper.bootstrapInstance();
    bootHelper.close();
    return 0;
  }
 catch (  IOException ex) {
    return reportFailure(ex,report);
  }
catch (  SecureAdminBootstrapHelper.BootstrapException ex) {
    return reportFailure(ex,report);
  }
}
Program: 28970
Project: 28970
Buggy source:
private void writeMainClass(final ClientArtifactsManager clientArtifactsManager) throws IOException {
  final String mainClassResourceName=GLASSFISH_APPCLIENT_GROUP_FACADE_CLASS_NAME.replace('.','/') + "String_Node_Str";
  final File mainClassFile=File.createTempFile("String_Node_Str","String_Node_Str");
  final OutputStream os=new BufferedOutputStream(new FileOutputStream(mainClassFile));
  try {
    InputStream is=openByteCodeStream(mainClassResourceName);
    DeploymentUtils.copyStream(is,os);
    os.close();
    is.close();
    clientArtifactsManager.add(mainClassFile,mainClassResourceName,true);
  }
 catch (  Exception e) {
    throw new DeploymentException(e);
  }
}

Fixed version (ground truth):
private void writeMainClass(final ClientArtifactsManager clientArtifactsManager) throws IOException {
  final String mainClassResourceName=GLASSFISH_APPCLIENT_GROUP_FACADE_CLASS_NAME.replace('.','/') + "String_Node_Str";
  final File mainClassFile=File.createTempFile("String_Node_Str","String_Node_Str");
  final OutputStream os=new BufferedOutputStream(new FileOutputStream(mainClassFile));
  InputStream is=null;
  try {
    is=openByteCodeStream(mainClassResourceName);
    DeploymentUtils.copyStream(is,os);
    is.close();
    clientArtifactsManager.add(mainClassFile,mainClassResourceName,true);
  }
 catch (  Exception e) {
    throw new DeploymentException(e);
  }
 finally {
    os.close();
    if (is != null) {
      is.close();
    }
  }
}
Program: 28971
Project: 28971
Buggy source:
/** 
 * Optional name-value pairs associated with this log event.
 * @return
 */
public abstract Properties getSupplementalAttributes();

Fixed version (ground truth):
/** 
 * Optional name-value pairs associated with this log event.
 * @return
 */
public abstract Map<String,Object> getSupplementalAttributes();
Program: 28972
Project: 28972
Buggy source:
@Override public Properties getSupplementalAttributes(){
  return suppAttrs;
}

Fixed version (ground truth):
@Override public Map<String,Object> getSupplementalAttributes(){
  return suppAttrs;
}
Program: 28974
Project: 28974
Buggy source:
private synchronized ResourceBundle getResourceBundle(String loggerName){
  if (loggerName == null) {
    return null;
  }
  ResourceBundle rb=(ResourceBundle)loggerResourceBundleTable.get(loggerName);
  if (rb == null && logManager.getLogger(loggerName) != null) {
    rb=logManager.getLogger(loggerName).getResourceBundle();
    loggerResourceBundleTable.put(loggerName,rb);
  }
  return rb;
}

Fixed version (ground truth):
private synchronized ResourceBundle getResourceBundle(String loggerName){
  if (loggerName == null) {
    return null;
  }
  ResourceBundle rb=loggerResourceBundleTable.get(loggerName);
  if (rb == null && logManager.getLogger(loggerName) != null) {
    rb=logManager.getLogger(loggerName).getResourceBundle();
    loggerResourceBundleTable.put(loggerName,rb);
  }
  return rb;
}