nus-yam/ex-repair huggingface dataset:
Program: 40227
Project: 40227
Buggy source:
@Test public void shouldSerializeAndDeserializeRowKey() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  Object[] values={123,"String_Node_Str",456L};
  SerializableKey key=new SerializableKey(new RowKey("String_Node_Str",columnNames,values));
  byte[] bytes=marshall(key);
  SerializableKey unmarshalledKey=unmarshall(bytes);
  assertThat(unmarshalledKey.getClass()).isEqualTo(SerializableKey.class);
  assertThat(unmarshalledKey.getTable()).isEqualTo(key.getTable());
  assertThat(unmarshalledKey.getColumnNames()).isEqualTo(key.getColumnNames());
  assertThat(unmarshalledKey.getColumnValues()).isEqualTo(key.getColumnValues());
  assertTrue(key.equals(unmarshalledKey));
  assertTrue(unmarshalledKey.equals(key));
  assertThat(unmarshalledKey.hashCode()).isEqualTo(key.hashCode());
}

Fixed version (ground truth):
@Test public void shouldSerializeAndDeserializeRowKey() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  Object[] values={123,"String_Node_Str",456L};
  SerializableKey key=new SerializableKey(new RowKey("String_Node_Str",columnNames,values,null));
  byte[] bytes=marshall(key);
  SerializableKey unmarshalledKey=unmarshall(bytes);
  assertThat(unmarshalledKey.getClass()).isEqualTo(SerializableKey.class);
  assertThat(unmarshalledKey.getTable()).isEqualTo(key.getTable());
  assertThat(unmarshalledKey.getColumnNames()).isEqualTo(key.getColumnNames());
  assertThat(unmarshalledKey.getColumnValues()).isEqualTo(key.getColumnValues());
  assertTrue(key.equals(unmarshalledKey));
  assertTrue(unmarshalledKey.equals(key));
  assertThat(unmarshalledKey.hashCode()).isEqualTo(key.hashCode());
}
Program: 40228
Project: 40228
Buggy source:
@Override public AssociationKey readObject(ObjectInput input) throws IOException, ClassNotFoundException {
  input.readInt();
  String tableName=input.readUTF();
  String[] columnNames=(String[])input.readObject();
  Object[] values=(Object[])input.readObject();
  AssociationKeyMetadata associationKeyMetadata=new AssociationKeyMetadata(tableName,columnNames,null);
  return new AssociationKey(associationKeyMetadata,values,null,null,null);
}

Fixed version (ground truth):
@Override public AssociationKey readObject(ObjectInput input) throws IOException, ClassNotFoundException {
  input.readInt();
  String tableName=input.readUTF();
  String[] columnNames=(String[])input.readObject();
  Object[] values=(Object[])input.readObject();
  AssociationKeyMetadata associationKeyMetadata=new AssociationKeyMetadata(tableName,columnNames,null,null,null,null);
  return new AssociationKey(associationKeyMetadata,values,null,null,null);
}
Program: 40229
Project: 40229
Buggy source:
@Override public RowKey readObject(ObjectInput input) throws IOException, ClassNotFoundException {
  input.readInt();
  String tableName=input.readUTF();
  String[] columnNames=(String[])input.readObject();
  Object[] values=(Object[])input.readObject();
  return new RowKey(tableName,columnNames,values);
}

Fixed version (ground truth):
@Override public RowKey readObject(ObjectInput input) throws IOException, ClassNotFoundException {
  input.readInt();
  String tableName=input.readUTF();
  String[] columnNames=(String[])input.readObject();
  Object[] values=(Object[])input.readObject();
  return new RowKey(tableName,columnNames,values,null);
}
Program: 40230
Project: 40230
Buggy source:
@Test public void shouldSerializeAndDeserializeAssociationKey() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  AssociationKeyMetadata keyMetadata=new AssociationKeyMetadata("String_Node_Str",columnNames,null);
  Object[] values={123,"String_Node_Str",456L};
  AssociationKey key=new AssociationKey(keyMetadata,values,null,null,null);
  byte[] bytes=externalizerHelper.marshall(key);
  Key unmarshalledKey=externalizerHelper.unmarshall(bytes);
  assertThat(unmarshalledKey.getClass()).isEqualTo(AssociationKey.class);
  assertThat(unmarshalledKey.getTable()).isEqualTo(key.getTable());
  assertThat(unmarshalledKey.getColumnNames()).isEqualTo(key.getColumnNames());
  assertThat(unmarshalledKey.getColumnValues()).isEqualTo(key.getColumnValues());
  assertTrue(key.equals(unmarshalledKey));
  assertTrue(unmarshalledKey.equals(key));
  assertThat(unmarshalledKey.hashCode()).isEqualTo(key.hashCode());
}

Fixed version (ground truth):
@Test public void shouldSerializeAndDeserializeAssociationKey() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  AssociationKeyMetadata keyMetadata=new AssociationKeyMetadata("String_Node_Str",columnNames,null,null,null,null);
  Object[] values={123,"String_Node_Str",456L};
  AssociationKey key=new AssociationKey(keyMetadata,values,null,null,null);
  byte[] bytes=externalizerHelper.marshall(key);
  Key unmarshalledKey=externalizerHelper.unmarshall(bytes);
  assertThat(unmarshalledKey.getClass()).isEqualTo(AssociationKey.class);
  assertThat(unmarshalledKey.getTable()).isEqualTo(key.getTable());
  assertThat(unmarshalledKey.getColumnNames()).isEqualTo(key.getColumnNames());
  assertThat(unmarshalledKey.getColumnValues()).isEqualTo(key.getColumnValues());
  assertTrue(key.equals(unmarshalledKey));
  assertTrue(unmarshalledKey.equals(key));
  assertThat(unmarshalledKey.hashCode()).isEqualTo(key.hashCode());
}
Program: 40231
Project: 40231
Buggy source:
@Test public void shouldWriteAndReadAssociationInClusteredMode() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  AssociationKeyMetadata keyMetadata=new AssociationKeyMetadata("String_Node_Str",columnNames,null);
  Object[] values={123,"String_Node_Str",456L};
  AssociationKey key=new AssociationKey(keyMetadata,values,null,null,null);
  RowKey rowKey=new RowKey("String_Node_Str",columnNames,values);
  Tuple tuple=new Tuple();
  tuple.put("String_Node_Str","String_Node_Str");
  Association association=dialect1.createAssociation(key,null);
  association.put(rowKey,tuple);
  dialect1.updateAssociation(association,key,null);
  Association readAssociation=dialect2.getAssociation(key,null);
  Tuple readKey=readAssociation.get(rowKey);
  assertThat(readKey).isNotNull();
  assertThat(readKey.get("String_Node_Str")).isEqualTo("String_Node_Str");
}

Fixed version (ground truth):
@Test public void shouldWriteAndReadAssociationInClusteredMode() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  AssociationKeyMetadata keyMetadata=new AssociationKeyMetadata("String_Node_Str",columnNames,null,null,null,null);
  Object[] values={123,"String_Node_Str",456L};
  AssociationKey key=new AssociationKey(keyMetadata,values,null,null,null);
  RowKey rowKey=new RowKey("String_Node_Str",columnNames,values,null);
  Tuple tuple=new Tuple();
  tuple.put("String_Node_Str","String_Node_Str");
  Association association=dialect1.createAssociation(key,null);
  association.put(rowKey,tuple);
  dialect1.updateAssociation(association,key,null);
  Association readAssociation=dialect2.getAssociation(key,null);
  Tuple readKey=readAssociation.get(rowKey);
  assertThat(readKey).isNotNull();
  assertThat(readKey.get("String_Node_Str")).isEqualTo("String_Node_Str");
}
Program: 40232
Project: 40232
Buggy source:
@Test public void shouldSerializeAndDeserializeRowKey() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  Object[] values={123,"String_Node_Str",456L};
  RowKey key=new RowKey("String_Node_Str",columnNames,values);
  byte[] bytes=externalizerHelper.marshall(key);
  Key unmarshalledKey=externalizerHelper.unmarshall(bytes);
  assertThat(unmarshalledKey.getClass()).isEqualTo(RowKey.class);
  assertThat(unmarshalledKey.getTable()).isEqualTo(key.getTable());
  assertThat(unmarshalledKey.getColumnNames()).isEqualTo(key.getColumnNames());
  assertThat(unmarshalledKey.getColumnValues()).isEqualTo(key.getColumnValues());
  assertTrue(key.equals(unmarshalledKey));
  assertTrue(unmarshalledKey.equals(key));
  assertThat(unmarshalledKey.hashCode()).isEqualTo(key.hashCode());
}

Fixed version (ground truth):
@Test public void shouldSerializeAndDeserializeRowKey() throws Exception {
  String[] columnNames={"String_Node_Str","String_Node_Str","String_Node_Str"};
  Object[] values={123,"String_Node_Str",456L};
  RowKey key=new RowKey("String_Node_Str",columnNames,values,null);
  byte[] bytes=externalizerHelper.marshall(key);
  Key unmarshalledKey=externalizerHelper.unmarshall(bytes);
  assertThat(unmarshalledKey.getClass()).isEqualTo(RowKey.class);
  assertThat(unmarshalledKey.getTable()).isEqualTo(key.getTable());
  assertThat(unmarshalledKey.getColumnNames()).isEqualTo(key.getColumnNames());
  assertThat(unmarshalledKey.getColumnValues()).isEqualTo(key.getColumnValues());
  assertTrue(key.equals(unmarshalledKey));
  assertTrue(unmarshalledKey.equals(key));
  assertThat(unmarshalledKey.hashCode()).isEqualTo(key.hashCode());
}
Program: 40234
Project: 40234
Buggy source:
@Test public void testUnidirectionalCollectionWithIndex() throws Exception {
  getTransactionManager().begin();
  final EntityManager em=getFactory().createEntityManager();
  Child child1=new Child();
  child1.setName("String_Node_Str");
  em.persist(child1);
  Child child2=new Child();
  child2.setName("String_Node_Str");
  em.persist(child2);
  Father father=new Father();
  father.getOrderedChildren().add(child1);
  father.getOrderedChildren().add(child2);
  em.persist(father);
  Child child3=new Child();
  child3.setName("String_Node_Str");
  em.persist(child3);
  Child child4=new Child();
  child4.setName("String_Node_Str");
  em.persist(child4);
  Father father2=new Father();
  father2.getOrderedChildren().add(child3);
  father2.getOrderedChildren().add(child4);
  em.persist(father2);
  commitOrRollback(true);
  assertNumberOfNodes(3 * 2);
  assertRelationships(2 * 2);
}

Fixed version (ground truth):
@Test public void testUnidirectionalCollectionWithIndex() throws Exception {
  getTransactionManager().begin();
  final EntityManager em=getFactory().createEntityManager();
  Child child1=new Child();
  child1.setName("String_Node_Str");
  em.persist(child1);
  Child child2=new Child();
  child2.setName("String_Node_Str");
  em.persist(child2);
  Father father=new Father();
  father.getOrderedChildren().add(child1);
  father.getOrderedChildren().add(child2);
  em.persist(father);
  Child child3=new Child();
  child3.setName("String_Node_Str");
  em.persist(child3);
  Child child4=new Child();
  child4.setName("String_Node_Str");
  em.persist(child4);
  Father father2=new Father();
  father2.getOrderedChildren().add(child3);
  father2.getOrderedChildren().add(child4);
  em.persist(father2);
  commitOrRollback(true);
  assertNumberOfNodes(6);
  assertRelationships(4);
}
Program: 40235
Project: 40235
Buggy source:
@Override public Association createAssociation(AssociationKey key){
  if (isEmbeddedInEntity(key,provider.getAssociationStorage())) {
    DBObject entity=getObjectAsEmbeddedAssociation(key);
    boolean insert=false;
    if (entity == null) {
      insert=true;
      entity=this.prepareIdObject(key);
    }
    if (getAssociationFieldOrNull(key,entity) == null) {
      if (insert) {
        addEmptyAssociationField(key,entity);
        getCollection(key.getEntityKey()).insert(entity);
      }
 else {
        BasicDBObject updater=new BasicDBObject();
        this.addSubQuery("String_Node_Str",updater,key.getCollectionRole(),Collections.EMPTY_LIST);
        this.getCollection(key.getEntityKey()).update(entity,updater,true,false);
        addEmptyAssociationField(key,entity);
      }
    }
    return new Association(new MongoDBAssociationSnapshot(entity,key,provider.getAssociationStorage()));
  }
  DBCollection associations=getAssociationCollection(key);
  DBObject assoc=MongoHelpers.associationKeyToObject(provider.getAssociationStorage(),key);
  assoc.put(ROWS_FIELDNAME,Collections.EMPTY_LIST);
  associations.insert(assoc);
  return new Association(new MongoDBAssociationSnapshot(assoc,key,provider.getAssociationStorage()));
}

Fixed version (ground truth):
@Override public Association createAssociation(AssociationKey key){
  if (isEmbeddedInEntity(key,provider.getAssociationStorage())) {
    DBObject entity=getObjectAsEmbeddedAssociation(key);
    boolean insert=false;
    if (entity == null) {
      insert=true;
      entity=this.prepareIdObject(key.getEntityKey());
    }
    if (getAssociationFieldOrNull(key,entity) == null) {
      if (insert) {
        addEmptyAssociationField(key,entity);
        getCollection(key.getEntityKey()).insert(entity);
      }
 else {
        BasicDBObject updater=new BasicDBObject();
        this.addSubQuery("String_Node_Str",updater,key.getCollectionRole(),Collections.EMPTY_LIST);
        this.getCollection(key.getEntityKey()).update(entity,updater,true,false);
        addEmptyAssociationField(key,entity);
      }
    }
    return new Association(new MongoDBAssociationSnapshot(entity,key,provider.getAssociationStorage()));
  }
  DBCollection associations=getAssociationCollection(key);
  DBObject assoc=MongoHelpers.associationKeyToObject(provider.getAssociationStorage(),key);
  assoc.put(ROWS_FIELDNAME,Collections.EMPTY_LIST);
  associations.insert(assoc);
  return new Association(new MongoDBAssociationSnapshot(assoc,key,provider.getAssociationStorage()));
}
Program: 40236
Project: 40236
Buggy source:
@Override public void updateAssociation(Association association,AssociationKey key){
  DBCollection collection;
  DBObject query;
  MongoDBAssociationSnapshot assocSnapshot=(MongoDBAssociationSnapshot)association.getSnapshot();
  String associationField;
  if (isEmbeddedInEntity(key,provider.getAssociationStorage())) {
    collection=this.getCollection(key.getEntityKey());
    query=this.prepareIdObject(key);
    associationField=key.getCollectionRole();
  }
 else {
    collection=getAssociationCollection(key);
    query=assocSnapshot.getQueryObject();
    associationField=ROWS_FIELDNAME;
  }
  for (  AssociationOperation action : association.getOperations()) {
    RowKey rowKey=action.getKey();
    Tuple rowValue=action.getValue();
    DBObject update=null;
switch (action.getType()) {
case CLEAR:
      update=new BasicDBObject("String_Node_Str",new BasicDBObject(associationField,Collections.EMPTY_LIST));
    break;
case PUT_NULL:
case PUT:
  update=putAssociationRowKey(rowValue,associationField,key);
break;
case REMOVE:
update=removeAssociationRowKey(assocSnapshot,rowKey,associationField);
break;
}
if (update != null) {
collection.update(query,update,true,false);
}
}
}

Fixed version (ground truth):
@Override public void updateAssociation(Association association,AssociationKey key){
  DBCollection collection;
  DBObject query;
  MongoDBAssociationSnapshot assocSnapshot=(MongoDBAssociationSnapshot)association.getSnapshot();
  String associationField;
  if (isEmbeddedInEntity(key,provider.getAssociationStorage())) {
    collection=this.getCollection(key.getEntityKey());
    query=this.prepareIdObject(key.getEntityKey());
    associationField=key.getCollectionRole();
  }
 else {
    collection=getAssociationCollection(key);
    query=assocSnapshot.getQueryObject();
    associationField=ROWS_FIELDNAME;
  }
  for (  AssociationOperation action : association.getOperations()) {
    RowKey rowKey=action.getKey();
    Tuple rowValue=action.getValue();
    DBObject update=null;
switch (action.getType()) {
case CLEAR:
      update=new BasicDBObject("String_Node_Str",new BasicDBObject(associationField,Collections.EMPTY_LIST));
    break;
case PUT_NULL:
case PUT:
  update=putAssociationRowKey(rowValue,associationField,key);
break;
case REMOVE:
update=removeAssociationRowKey(assocSnapshot,rowKey,associationField);
break;
}
if (update != null) {
collection.update(query,update,true,false);
}
}
}
Program: 40237
Project: 40237
Buggy source:
@Override public Tuple getTuple(EntityKey key){
  DBObject found=this.getObject(key);
  return this.getObject(key) != null ? new Tuple(new MongoDBTupleSnapshot(found)) : null;
}

Fixed version (ground truth):
@Override public Tuple getTuple(EntityKey key){
  DBObject found=this.getObject(key);
  return found != null ? new Tuple(new MongoDBTupleSnapshot(found)) : null;
}
Program: 40238
Project: 40238
Buggy source:
public void put(String column,Object value){
  if (value == null) {
    currentState.put(column,new TupleOperation(column,null,PUT_NULL));
  }
  currentState.put(column,new TupleOperation(column,value,PUT));
}

Fixed version (ground truth):
public void put(String column,Object value){
  if (value == null) {
    currentState.put(column,new TupleOperation(column,null,PUT_NULL));
  }
 else {
    currentState.put(column,new TupleOperation(column,value,PUT));
  }
}
Program: 40239
Project: 40239
Buggy source:
public int size(){
  int size=cleared ? 0 : snapshot.size();
  for (  Map.Entry<RowKey,AssociationOperation> op : currentState.entrySet()) {
switch (op.getValue().getType()) {
case PUT:
case PUT_NULL:
      if (cleared || snapshot.get(op.getKey()) == null) {
        size++;
      }
    break;
case REMOVE:
  if (!cleared && snapshot.get(op.getKey()) != null) {
    size--;
  }
break;
}
}
return size;
}

Fixed version (ground truth):
public int size(){
  int size=cleared ? 0 : snapshot.size();
  for (  Map.Entry<RowKey,AssociationOperation> op : currentState.entrySet()) {
switch (op.getValue().getType()) {
case PUT:
case PUT_NULL:
      if (cleared || !snapshot.containsKey(op.getKey())) {
        size++;
      }
    break;
case REMOVE:
  if (!cleared && snapshot.containsKey(op.getKey())) {
    size--;
  }
break;
}
}
return size;
}
Program: 40240
Project: 40240
Buggy source:
@Test public void doTest() throws Exception {
  getTransactionManager().begin();
  final EntityManager em=getFactory().createEntityManager();
  Poem poem=new Poem();
  poem.setName("String_Node_Str");
  em.persist(poem);
  getTransactionManager().commit();
  em.clear();
  getTransactionManager().begin();
  poem=em.find(Poem.class,poem.getId());
  assertThat(poem).isNotNull();
  assertThat(poem.getName()).isEqualTo("String_Node_Str");
  em.remove(poem);
  getTransactionManager().commit();
}

Fixed version (ground truth):
@Test public void doTest() throws Exception {
  getTransactionManager().begin();
  final EntityManager em=getFactory().createEntityManager();
  Poem poem=new Poem();
  poem.setName("String_Node_Str");
  em.persist(poem);
  getTransactionManager().commit();
  em.clear();
  getTransactionManager().begin();
  poem=em.find(Poem.class,poem.getId());
  assertThat(poem).isNotNull();
  assertThat(poem.getName()).isEqualTo("String_Node_Str");
  em.remove(poem);
  getTransactionManager().commit();
  em.close();
}
Program: 40241
Project: 40241
Buggy source:
@Before public void createFactory() throws MalformedURLException {
  GetterPersistenceUnitInfo info=new GetterPersistenceUnitInfo();
  info.setClassLoader(Thread.currentThread().getContextClassLoader());
  info.setExcludeUnlistedClasses(true);
  info.setJtaDataSource(null);
  List<String> classNames=new ArrayList<String>();
  for (  Class<?> clazz : getEntities()) {
    classNames.add(clazz.getName());
  }
  info.setManagedClassNames(classNames);
  info.setNonJtaDataSource(null);
  info.setPersistenceProviderClassName(HibernateOgmPersistence.class.getName());
  info.setPersistenceUnitName("String_Node_Str");
  final URL persistenceUnitRootUrl=new File("String_Node_Str").toURI().toURL();
  info.setPersistenceUnitRootUrl(persistenceUnitRootUrl);
  info.setPersistenceXMLSchemaVersion("String_Node_Str");
  info.setProperties(new Properties());
  info.setSharedCacheMode(SharedCacheMode.ENABLE_SELECTIVE);
  info.setTransactionType(PersistenceUnitTransactionType.JTA);
  info.setValidationMode(ValidationMode.AUTO);
  info.getProperties().setProperty(Environment.TRANSACTION_MANAGER_STRATEGY,JBossTSStandaloneTransactionManagerLookup.class.getName());
  factory=new HibernateOgmPersistence().createContainerEntityManagerFactory(info,Collections.EMPTY_MAP);
  transactionManager=new JBossTSStandaloneTransactionManagerLookup().getTransactionManager(null);
}

Fixed version (ground truth):
@Before public void createFactory() throws MalformedURLException {
  arjPropertyManager.getCoordinatorEnvironmentBean().setActionStore(VolatileStore.class.getName());
  transactionManager=new JBossTSStandaloneTransactionManagerLookup().getTransactionManager(null);
  GetterPersistenceUnitInfo info=new GetterPersistenceUnitInfo();
  info.setClassLoader(Thread.currentThread().getContextClassLoader());
  info.setExcludeUnlistedClasses(true);
  info.setJtaDataSource(null);
  List<String> classNames=new ArrayList<String>();
  for (  Class<?> clazz : getEntities()) {
    classNames.add(clazz.getName());
  }
  info.setManagedClassNames(classNames);
  info.setNonJtaDataSource(null);
  info.setPersistenceProviderClassName(HibernateOgmPersistence.class.getName());
  info.setPersistenceUnitName("String_Node_Str");
  final URL persistenceUnitRootUrl=new File("String_Node_Str").toURI().toURL();
  info.setPersistenceUnitRootUrl(persistenceUnitRootUrl);
  info.setPersistenceXMLSchemaVersion("String_Node_Str");
  info.setProperties(new Properties());
  info.setSharedCacheMode(SharedCacheMode.ENABLE_SELECTIVE);
  info.setTransactionType(PersistenceUnitTransactionType.JTA);
  info.setValidationMode(ValidationMode.AUTO);
  info.getProperties().setProperty(Environment.TRANSACTION_MANAGER_STRATEGY,JBossTSStandaloneTransactionManagerLookup.class.getName());
  factory=new HibernateOgmPersistence().createContainerEntityManagerFactory(info,Collections.EMPTY_MAP);
}
Program: 40242
Project: 40242
Buggy source:
@Override public EntityManagerFactory createEntityManagerFactory(String emName,Map map){
  try {
    Map integration=map == null ? CollectionHelper.EMPTY_MAP : Collections.unmodifiableMap(map);
    Enumeration<URL> persistenceXml=Thread.currentThread().getContextClassLoader().getResources("String_Node_Str");
    if (!persistenceXml.hasMoreElements()) {
      LOG.warn("String_Node_Str" + "String_Node_Str" + (emName != null ? emName : "String_Node_Str"));
    }
    while (persistenceXml.hasMoreElements()) {
      URL url=persistenceXml.nextElement();
      List<PersistenceMetadata> metadataFiles=PersistenceXmlLoader.deploy(url,integration,new EJB3DTDEntityResolver(),PersistenceUnitTransactionType.RESOURCE_LOCAL);
      for (      PersistenceMetadata metadata : metadataFiles) {
        if (metadata.getProvider() == null || IMPLEMENTATION_NAME.equalsIgnoreCase(metadata.getProvider())) {
          Map<Object,Object> protectiveCopy=new HashMap<Object,Object>(map);
          enforceOgmConfig(protectiveCopy);
          protectiveCopy.put(HibernatePersistence.PROVIDER,delegate.getClass().getName());
          return delegate.createEntityManagerFactory(emName,protectiveCopy);
        }
      }
    }
    return null;
  }
 catch (  Exception e) {
    if (e instanceof PersistenceException) {
      throw (PersistenceException)e;
    }
 else {
      throw new PersistenceException("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public EntityManagerFactory createEntityManagerFactory(String emName,Map map){
  try {
    Map integration=map == null ? CollectionHelper.EMPTY_MAP : Collections.unmodifiableMap(map);
    Enumeration<URL> persistenceXml=Thread.currentThread().getContextClassLoader().getResources("String_Node_Str");
    if (!persistenceXml.hasMoreElements()) {
      LOG.warn("String_Node_Str" + "String_Node_Str" + (emName != null ? emName : "String_Node_Str"));
    }
    while (persistenceXml.hasMoreElements()) {
      URL url=persistenceXml.nextElement();
      List<PersistenceMetadata> metadataFiles=PersistenceXmlLoader.deploy(url,integration,new EJB3DTDEntityResolver(),PersistenceUnitTransactionType.RESOURCE_LOCAL);
      for (      PersistenceMetadata metadata : metadataFiles) {
        if (metadata.getProvider() == null || IMPLEMENTATION_NAME.equalsIgnoreCase(metadata.getProvider())) {
          Map<Object,Object> protectiveCopy=new HashMap<Object,Object>(integration);
          enforceOgmConfig(protectiveCopy);
          protectiveCopy.put(HibernatePersistence.PROVIDER,delegate.getClass().getName());
          return delegate.createEntityManagerFactory(emName,protectiveCopy);
        }
      }
    }
    return null;
  }
 catch (  Exception e) {
    if (e instanceof PersistenceException) {
      throw (PersistenceException)e;
    }
 else {
      throw new PersistenceException("String_Node_Str",e);
    }
  }
}
Program: 40243
Project: 40243
Buggy source:
private void enforceOgmConfig(Map<Object,Object> map){
  map.put(AvailableSettings.SESSION_FACTORY_OBSERVER,GridMetadataManager.class.getName());
  map.put(AvailableSettings.NAMING_STRATEGY,OgmNamingStrategy.class.getName());
  map.put(Environment.CONNECTION_PROVIDER,NoopConnectionProvider.class);
  map.put(Environment.DIALECT,NoopDialect.class);
}

Fixed version (ground truth):
private void enforceOgmConfig(Map<Object,Object> map){
  map.put(AvailableSettings.SESSION_FACTORY_OBSERVER,GridMetadataManager.class.getName());
  map.put(AvailableSettings.NAMING_STRATEGY,OgmNamingStrategy.class.getName());
  map.put(Environment.CONNECTION_PROVIDER,NoopConnectionProvider.class.getName());
  map.put(Environment.DIALECT,NoopDialect.class.getName());
}
Program: 40244
Project: 40244
Buggy source:
/** 
 * copied from Loader#endCollectionLoad
 */
private void endCollectionLoad(final Object resultSetId,final SessionImplementor session,final CollectionPersister collectionPersister){
  session.getPersistenceContext().getLoadContexts().getCollectionLoadContext(null).endLoadingCollections(collectionPersister);
}

Fixed version (ground truth):
/** 
 * copied from Loader#endCollectionLoad
 */
private void endCollectionLoad(final Object resultSetId,final SessionImplementor session,final CollectionPersister collectionPersister){
  session.getPersistenceContext().getLoadContexts().getCollectionLoadContext(resultSetId).endLoadingCollections(collectionPersister);
}
Program: 40245
Project: 40245
Buggy source:
/** 
 * Execute the physical query and initialize the various entities and collections
 */
private Object doQuery(SessionImplementor session,Serializable id,Type identifierType,Object optionalObject,String optionalEntityName,Serializable optionalId,LockOptions lockOptions,boolean returnProxies){
  int entitySpan=1;
  final List<Object> hydratedObjects=entitySpan == 0 ? null : new ArrayList<Object>(entitySpan * 10);
  TupleAsMapResultSet resultset=getResultSet(id,session);
  QueryParameters qp=new QueryParameters();
  qp.setPositionalParameterTypes(new Type[]{identifierType});
  qp.setPositionalParameterValues(new Object[]{id});
  qp.setOptionalObject(optionalObject);
  qp.setOptionalEntityName(optionalEntityName);
  qp.setOptionalId(optionalId);
  qp.setLockOptions(lockOptions);
  handleEmptyCollections(qp.getCollectionKeys(),resultset,session);
  final org.hibernate.engine.EntityKey[] keys=new org.hibernate.engine.EntityKey[entitySpan];
  Object result=null;
  try {
    while (resultset.next()) {
      result=getRowFromResultSet(resultset,session,qp,optionalId,hydratedObjects,keys,returnProxies);
    }
  }
 catch (  SQLException e) {
  }
  initializeEntitiesAndCollections(hydratedObjects,resultset,session,qp.isReadOnly(session));
  return result;
}

Fixed version (ground truth):
/** 
 * Execute the physical query and initialize the various entities and collections
 */
private Object doQuery(SessionImplementor session,Serializable id,Type identifierType,Object optionalObject,String optionalEntityName,Serializable optionalId,LockOptions lockOptions,boolean returnProxies){
  int entitySpan=entityPersisters.length;
  final List<Object> hydratedObjects=entitySpan == 0 ? null : new ArrayList<Object>(entitySpan * 10);
  TupleAsMapResultSet resultset=getResultSet(id,session);
  QueryParameters qp=new QueryParameters();
  qp.setPositionalParameterTypes(new Type[]{identifierType});
  qp.setPositionalParameterValues(new Object[]{id});
  qp.setOptionalObject(optionalObject);
  qp.setOptionalEntityName(optionalEntityName);
  qp.setOptionalId(optionalId);
  qp.setLockOptions(lockOptions);
  handleEmptyCollections(qp.getCollectionKeys(),resultset,session);
  final org.hibernate.engine.EntityKey[] keys=new org.hibernate.engine.EntityKey[entitySpan];
  Object result=null;
  try {
    while (resultset.next()) {
      result=getRowFromResultSet(resultset,session,qp,optionalId,hydratedObjects,keys,returnProxies);
    }
  }
 catch (  SQLException e) {
  }
  initializeEntitiesAndCollections(hydratedObjects,resultset,session,qp.isReadOnly(session));
  return result;
}
Program: 40248
Project: 40248
Buggy source:
public void stop(){
  _handler.removeCallbacks(_runnable);
}

Fixed version (ground truth):
public void stop(){
  if (_runnable != null)   _handler.removeCallbacks(_runnable);
}
Program: 40249
Project: 40249
Buggy source:
public void start(){
  _handler.postDelayed(_runnable,_time);
}

Fixed version (ground truth):
public void start(){
  if (_runnable != null)   _handler.postDelayed(_runnable,_time);
}
Program: 40250
Project: 40250
Buggy source:
@Bean public SpringAMQPMessageSource orderEvents(Serializer serializer){
  return new SpringAMQPMessageSource(new DefaultAMQPMessageConverter(serializer)){
    @RabbitListener(queues="String_Node_Str") @Override public void onMessage(    Message message,    Channel channel) throws Exception {
      Thread.sleep(1000);
      super.onMessage(message,channel);
    }
  }
;
}

Fixed version (ground truth):
@Bean public SpringAMQPMessageSource orderEvents(Serializer serializer){
  return new SpringAMQPMessageSource(new DefaultAMQPMessageConverter(serializer)){
    @Transactional @RabbitListener(queues="String_Node_Str") @Override public void onMessage(    Message message,    Channel channel) throws Exception {
      super.onMessage(message,channel);
    }
  }
;
}
Program: 40251
Project: 40251
Buggy source:
@RabbitListener(queues="String_Node_Str") @Override public void onMessage(Message message,Channel channel) throws Exception {
  Thread.sleep(1000);
  super.onMessage(message,channel);
}

Fixed version (ground truth):
@Transactional @RabbitListener(queues="String_Node_Str") @Override public void onMessage(Message message,Channel channel) throws Exception {
  super.onMessage(message,channel);
}
Program: 40252
Project: 40252
Buggy source:
public Optional<Credentials> extractCredentials(String line,boolean isBase64Encoded){
  if (line != null && !line.isEmpty()) {
    String[] part=line.split("String_Node_Str");
    Credentials credentials=new Credentials();
    credentials.setUsername(part[0]);
    String password;
    if (isBase64Encoded) {
      password=new String(Base64.getDecoder().decode(part[1]));
    }
 else {
      password=part[1];
    }
    credentials.setPassword(password);
    return Optional.of(credentials);
  }
 else {
    return Optional.empty();
  }
}

Fixed version (ground truth):
public Optional<Credentials> extractCredentials(String line,boolean isBase64Encoded){
  if (line != null && !line.isEmpty()) {
    String[] part=line.split("String_Node_Str");
    if (part.length != 2) {
      return Optional.empty();
    }
    Credentials credentials=new Credentials();
    credentials.setUsername(part[0]);
    String password;
    if (isBase64Encoded) {
      password=new String(Base64.getDecoder().decode(part[1]));
    }
 else {
      password=part[1];
    }
    credentials.setPassword(password);
    return Optional.of(credentials);
  }
 else {
    return Optional.empty();
  }
}
Program: 40253
Project: 40253
Buggy source:
private static void executeLogins(Configuration configuration,LoginExecutor executor){
  configuration.getCredentials().forEach(credentials -> loginWithCredentials(executor,credentials));
}

Fixed version (ground truth):
private static void executeLogins(Configuration configuration){
  configuration.getCredentials().forEach(credentials -> loginWithCredentials(configuration,credentials));
}
Program: 40254
Project: 40254
Buggy source:
public static void main(String[] args) throws Exception {
  CliLoader cliLoader=new CliLoader();
  Configuration configuration=cliLoader.parseArgs(args);
  LOGGER.info("String_Node_Str");
  LoginExecutor executor=new LoginExecutor(configuration);
  for (long i=0; i < configuration.getLoops(); i++) {
    configuration=cliLoader.parseArgs(args);
    executeLogins(configuration,executor);
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  CliLoader cliLoader=new CliLoader();
  Configuration configuration=cliLoader.parseArgs(args);
  LOGGER.info("String_Node_Str");
  for (long i=0; i < configuration.getLoops(); i++) {
    LOGGER.info("String_Node_Str",i);
    configuration=cliLoader.parseArgs(args);
    executeLogins(configuration);
  }
}
Program: 40255
Project: 40255
Buggy source:
/** 
 * Performs a single login with the given credentials object
 * @param executor the login executor to perform the login
 * @param credentials the credentials to attempt to login with
 */
private static void loginWithCredentials(LoginExecutor executor,Credentials credentials){
  LOGGER.info("String_Node_Str",credentials);
  Optional<String> sessionId;
  try {
    sessionId=executor.performLogin(credentials);
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str" + "String_Node_Str",credentials,e);
    return;
  }
  if (sessionId.isPresent()) {
    LOGGER.info("String_Node_Str" + sessionId.get());
  }
 else {
    LOGGER.info("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Performs a single login with the given credentials object
 * @param configuration the configuration for the login executor
 * @param credentials the credentials to attempt to login with
 */
private static void loginWithCredentials(Configuration configuration,Credentials credentials){
  LOGGER.info("String_Node_Str",credentials);
  LoginExecutor executor=new LoginExecutor(configuration);
  Optional<String> sessionId;
  try {
    sessionId=executor.performLogin(credentials);
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str" + "String_Node_Str",credentials,e);
    return;
  }
  if (sessionId.isPresent()) {
    LOGGER.info("String_Node_Str" + sessionId.get());
  }
 else {
    LOGGER.info("String_Node_Str");
  }
}
Program: 40256
Project: 40256
Buggy source:
private Stream<Credentials> getCredentials(String fileName,String[] cs){
  Stream<Credentials> cliCredentials=Stream.empty();
  if (cs != null && cs.length > 0) {
    cliCredentials=Stream.of(cs).map(credential -> credentialFileParser.extractCredentials(credential,false));
  }
  Stream<Credentials> fileCredentials=Stream.empty();
  if (fileName != null && Paths.get(fileName).toFile().exists()) {
    fileCredentials=credentialFileParser.loadFile(Paths.get(fileName)).orElse(Stream.empty());
  }
  return Stream.concat(cliCredentials,fileCredentials);
}

Fixed version (ground truth):
private Stream<Credentials> getCredentials(String fileName,String[] cs){
  Stream<Credentials> cliCredentials=Stream.empty();
  if (cs != null && cs.length > 0) {
    cliCredentials=Stream.of(cs).map(credential -> credentialFileParser.extractCredentials(credential,false)).flatMap(o -> o.isPresent() ? Stream.of(o.get()) : Stream.empty());
  }
  Stream<Credentials> fileCredentials=Stream.empty();
  if (fileName != null && Paths.get(fileName).toFile().exists()) {
    fileCredentials=credentialFileParser.loadFile(Paths.get(fileName)).orElse(Stream.empty());
  }
  return Stream.concat(cliCredentials,fileCredentials);
}
Program: 40257
Project: 40257
Buggy source:
public LoginExecutor(Configuration configuration){
  this.configuration=configuration;
  logger=LoggerFactory.getLogger(Application.class);
}

Fixed version (ground truth):
public LoginExecutor(Configuration configuration){
  this.configuration=configuration;
  logger=LoggerFactory.getLogger(LoginExecutor.class);
}
Program: 40258
Project: 40258
Buggy source:
/** 
 * Perform a http login and return the acquired session ID.
 * @param credentials the credentials to login with
 * @param csrfToken   the csrfToken form the login page
 * @return the sessionId if login was successful
 * @throws IOException
 */
private Optional<String> login(Credentials credentials,String csrfToken) throws IOException {
  Optional<String> sessionId;
  CloseableHttpClient httpclient=HttpClientBuilder.create().setRedirectStrategy(new LaxRedirectStrategy()).build();
  try {
    HttpPost httpPost=new HttpPost(configuration.getLoginUrl());
    List<NameValuePair> nvps=new ArrayList<>();
    nvps.add(new BasicNameValuePair("String_Node_Str",credentials.getUsername()));
    nvps.add(new BasicNameValuePair("String_Node_Str",credentials.getPassword()));
    nvps.add(new BasicNameValuePair("String_Node_Str",csrfToken));
    httpPost.setEntity(new UrlEncodedFormEntity(nvps));
    CloseableHttpResponse response2=httpclient.execute(httpPost,context);
    try {
      logger.debug(response2.getStatusLine().toString());
      sessionId=extractSessionId(context);
    }
  finally {
      response2.close();
    }
  }
  finally {
    httpclient.close();
  }
  return sessionId;
}

Fixed version (ground truth):
/** 
 * Perform a http login and return the acquired session ID.
 * @param credentials the credentials to login with
 * @param csrfToken   the csrfToken form the login page
 * @return the sessionId if login was successful
 * @throws IOException
 */
private Optional<String> login(Credentials credentials,String csrfToken) throws IOException {
  Optional<String> sessionId;
  CloseableHttpClient httpclient=HttpClientBuilder.create().setRedirectStrategy(new LaxRedirectStrategy()).build();
  try {
    HttpPost httpPost=new HttpPost(configuration.getLoginUrl());
    List<NameValuePair> nvps=new ArrayList<>();
    nvps.add(new BasicNameValuePair("String_Node_Str",credentials.getUsername()));
    nvps.add(new BasicNameValuePair("String_Node_Str",credentials.getPassword()));
    nvps.add(new BasicNameValuePair("String_Node_Str",csrfToken));
    String initialSession=getCurrentSession(context);
    httpPost.setEntity(new UrlEncodedFormEntity(nvps));
    CloseableHttpResponse response2=httpclient.execute(httpPost,context);
    try {
      logger.debug(response2.getStatusLine().toString());
      sessionId=extractSessionId(context);
      if (initialSession != null && initialSession.equals(sessionId.orElse("String_Node_Str"))) {
        return Optional.empty();
      }
    }
  finally {
      response2.close();
    }
  }
  finally {
    httpclient.close();
  }
  return sessionId;
}
Program: 40259
Project: 40259
Buggy source:
public Optional<Stream<Credentials>> loadFile(Path filePath){
  if (filePath == null) {
    return Optional.empty();
  }
  try {
    bufferedReader=Files.newBufferedReader(filePath);
    return Optional.of(bufferedReader.lines().map(line -> extractCredentials(line,true)));
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return Optional.empty();
  }
}

Fixed version (ground truth):
public Optional<Stream<Credentials>> loadFile(Path filePath){
  if (filePath == null) {
    return Optional.empty();
  }
  try {
    bufferedReader=Files.newBufferedReader(filePath);
    return Optional.of(bufferedReader.lines().map(line -> extractCredentials(line,true)).flatMap(o -> o.isPresent() ? Stream.of(o.get()) : Stream.empty()));
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return Optional.empty();
  }
}
Program: 40260
Project: 40260
Buggy source:
public Credentials extractCredentials(String line,boolean isBase64Encoded){
  String[] part=line.split("String_Node_Str");
  Credentials credentials=new Credentials();
  credentials.setUsername(part[0]);
  String password;
  if (isBase64Encoded) {
    password=new String(Base64.getDecoder().decode(part[1]));
  }
 else {
    password=part[1];
  }
  credentials.setPassword(password);
  return credentials;
}

Fixed version (ground truth):
public Optional<Credentials> extractCredentials(String line,boolean isBase64Encoded){
  if (line != null && !line.isEmpty()) {
    String[] part=line.split("String_Node_Str");
    Credentials credentials=new Credentials();
    credentials.setUsername(part[0]);
    String password;
    if (isBase64Encoded) {
      password=new String(Base64.getDecoder().decode(part[1]));
    }
 else {
      password=part[1];
    }
    credentials.setPassword(password);
    return Optional.of(credentials);
  }
 else {
    return Optional.empty();
  }
}
Program: 40261
Project: 40261
Buggy source:
@Override public long check(final AbstractCloudComputer c){
  if (c.isIdle() && !disabled) {
    final long milliBetweenCreationAndIdle=c.getIdleStartMilliseconds() - c.getConnectTime();
    boolean neverConnected=milliBetweenCreationAndIdle < TimeUnit2.SECONDS.toMillis(LAPSE);
    final long idleMilliseconds=System.currentTimeMillis() - c.getIdleStartMilliseconds();
    if (!neverConnected && idleMilliseconds > TimeUnit2.MINUTES.toMillis(IDLE_MINUTES)) {
      LOGGER.log(Level.INFO,"String_Node_Str",c.getName());
      done(c);
    }
  }
  return 1;
}

Fixed version (ground truth):
@Override public long check(final AbstractCloudComputer c){
  if (c.isIdle() && !disabled) {
    final long milliBetweenCreationAndIdle=c.getIdleStartMilliseconds() - c.getConnectTime();
    boolean neverConnected=milliBetweenCreationAndIdle < TimeUnit2.SECONDS.toMillis(LAPSE);
    if (c.getIdleStartMilliseconds() - Jenkins.getInstance().toComputer().getConnectTime() < TimeUnit2.SECONDS.toMillis(LAPSE)) {
      neverConnected=false;
    }
    final long idleMilliseconds=System.currentTimeMillis() - c.getIdleStartMilliseconds();
    if (!neverConnected && idleMilliseconds > TimeUnit2.MINUTES.toMillis(IDLE_MINUTES)) {
      LOGGER.log(Level.INFO,"String_Node_Str",c.getName());
      done(c);
    }
  }
  return 1;
}
Program: 40262
Project: 40262
Buggy source:
public static void deleteAciContainerGroup(String credentialsId,String resourceGroup,String containerGroupName,String deployName){
  final Azure azureClient=AzureContainerUtils.getAzureClient(credentialsId);
  final Map<String,String> properties=new HashMap<>();
  try {
    azureClient.genericResources().delete(resourceGroup,"String_Node_Str","String_Node_Str","String_Node_Str",containerGroupName,"String_Node_Str");
    LOGGER.log(Level.INFO,"String_Node_Str",containerGroupName);
    properties.put(Constants.AI_ACI_NAME,containerGroupName);
    ContainerPlugin.sendEvent(Constants.AI_ACI_AGENT,"String_Node_Str",properties);
    if (deployName != null) {
      azureClient.deployments().deleteByResourceGroup(resourceGroup,deployName);
      LOGGER.log(Level.INFO,"String_Node_Str",deployName);
    }
  }
 catch (  Exception e) {
    LOGGER.log(Level.WARNING,"String_Node_Str",new Object[]{containerGroupName,e});
    properties.put("String_Node_Str",e.getMessage());
    ContainerPlugin.sendEvent(Constants.AI_ACI_AGENT,"String_Node_Str",properties);
  }
}

Fixed version (ground truth):
public static void deleteAciContainerGroup(String credentialsId,String resourceGroup,String containerGroupName,String deployName){
  final Azure azureClient=AzureContainerUtils.getAzureClient(credentialsId);
  final Map<String,String> properties=new HashMap<>();
  try {
    azureClient.genericResources().delete(resourceGroup,"String_Node_Str","String_Node_Str","String_Node_Str",containerGroupName,"String_Node_Str");
    LOGGER.log(Level.INFO,"String_Node_Str",containerGroupName);
    properties.put(Constants.AI_ACI_NAME,containerGroupName);
    ContainerPlugin.sendEvent(Constants.AI_ACI_AGENT,"String_Node_Str",properties);
  }
 catch (  Exception e) {
    LOGGER.log(Level.WARNING,"String_Node_Str",new Object[]{containerGroupName,e});
    properties.put("String_Node_Str",e.getMessage());
    ContainerPlugin.sendEvent(Constants.AI_ACI_AGENT,"String_Node_Str",properties);
  }
  try {
    if (deployName != null) {
      azureClient.deployments().deleteByResourceGroup(resourceGroup,deployName);
      LOGGER.log(Level.INFO,"String_Node_Str",deployName);
    }
  }
 catch (  Exception e) {
    LOGGER.log(Level.WARNING,"String_Node_Str",new Object[]{deployName,e});
  }
}
Program: 40263
Project: 40263
Buggy source:
@Override public long check(final AbstractCloudComputer c){
  if (c.isIdle() && !disabled) {
    final long idleMilliseconds=System.currentTimeMillis() - c.getIdleStartMilliseconds();
    if (idleMilliseconds > TimeUnit2.MINUTES.toMillis(IDLE_MINUTES)) {
      LOGGER.log(Level.INFO,"String_Node_Str",c.getName());
      done(c);
    }
  }
  return 1;
}

Fixed version (ground truth):
@Override public long check(final AbstractCloudComputer c){
  if (c.isIdle() && !disabled) {
    final long milliBetweenCreationAndIdle=c.getConnectTime() - c.getIdleStartMilliseconds();
    boolean neverConnected=milliBetweenCreationAndIdle < TimeUnit2.SECONDS.toMillis(LAPSE);
    final long idleMilliseconds=System.currentTimeMillis() - c.getIdleStartMilliseconds();
    if (!neverConnected && idleMilliseconds > TimeUnit2.MINUTES.toMillis(IDLE_MINUTES)) {
      LOGGER.log(Level.INFO,"String_Node_Str",c.getName());
      done(c);
    }
  }
  return 1;
}
Program: 40264
Project: 40264
Buggy source:
public void deletePod(String podName){
  LOGGER.log(Level.INFO,"String_Node_Str",podName);
  try (KubernetesClient client=connect()){
    boolean result=client.pods().inNamespace(namespace).withName(podName).delete();
    if (result) {
      LOGGER.log(Level.INFO,"String_Node_Str",podName);
    }
 else {
      LOGGER.log(Level.WARNING,"String_Node_Str" + podName);
    }
  }
 catch (  Exception e) {
    LOGGER.log(Level.WARNING,"String_Node_Str" + podName,e);
  }
}

Fixed version (ground truth):
public void deletePod(String podName){
  LOGGER.log(Level.INFO,"String_Node_Str",podName);
  final Map<String,String> properties=new HashMap<>();
  try (KubernetesClient client=connect()){
    properties.put(Constants.AI_CONTAINER_NAME,podName);
    boolean result=client.pods().inNamespace(namespace).withName(podName).delete();
    ContainerPlugin.sendEvent(Constants.AI_CONTAINER_AGENT,"String_Node_Str",properties);
    if (result) {
      LOGGER.log(Level.INFO,"String_Node_Str",podName);
    }
 else {
      LOGGER.log(Level.WARNING,"String_Node_Str" + podName);
    }
  }
 catch (  Exception e) {
    LOGGER.log(Level.WARNING,"String_Node_Str" + podName,e);
    properties.put("String_Node_Str",e.getMessage());
    ContainerPlugin.sendEvent(Constants.AI_CONTAINER_AGENT,"String_Node_Str",properties);
  }
}
Program: 40266
Project: 40266
Buggy source:
@DataBoundSetter public void setEnvVars(List<PodEnvVar> envVars){
  this.envVars=envVars;
}

Fixed version (ground truth):
@DataBoundSetter public void setEnvVars(List<PodEnvVar> envVars){
  this.envVars=envVars == null ? new ArrayList<>() : envVars;
}
Program: 40267
Project: 40267
Buggy source:
@DataBoundSetter public void setPrivateRegistryCredentials(List<DockerRegistryEndpoint> privateRegistryCredentials){
  this.privateRegistryCredentials=privateRegistryCredentials;
}

Fixed version (ground truth):
@DataBoundSetter public void setPrivateRegistryCredentials(List<DockerRegistryEndpoint> privateRegistryCredentials){
  this.privateRegistryCredentials=privateRegistryCredentials == null ? new ArrayList<>() : privateRegistryCredentials;
}
Program: 40268
Project: 40268
Buggy source:
@DataBoundSetter public void setImagePullSecrets(List<PodImagePullSecrets> imagePullSecrets){
  this.imagePullSecrets=imagePullSecrets;
}

Fixed version (ground truth):
@DataBoundSetter public void setImagePullSecrets(List<PodImagePullSecrets> imagePullSecrets){
  this.imagePullSecrets=imagePullSecrets == null ? new ArrayList<>() : imagePullSecrets;
}
Program: 40269
Project: 40269
Buggy source:
@DataBoundSetter public void setVolumes(List<PodVolume> volumes){
  this.volumes=volumes;
}

Fixed version (ground truth):
@DataBoundSetter public void setVolumes(List<PodVolume> volumes){
  this.volumes=volumes == null ? new ArrayList<>() : volumes;
}