nus-yam/ex-repair huggingface dataset:
Program: 34277
Project: 34277
Buggy source:
private void registerPlayerSkinListener(){
  listener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.NAMED_ENTITY_SPAWN).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
      GameProfile profile=profiles.read(0);
      String name=profile.getName();
      SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile));
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(listener);
}

Fixed version (ground truth):
private void registerPlayerSkinListener(){
  listener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.NAMED_ENTITY_SPAWN).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
      GameProfile profile=profiles.read(0);
      String name=profile.getName();
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile));
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(listener);
}
Program: 34278
Project: 34278
Buggy source:
public static GameProfile recreateProfile(GameProfile oldprofile,SkinProfile skinprofile,boolean keepUUID){
  GameProfile newProfile=new GameProfile(keepUUID ? oldprofile.getId() : skinprofile.getUUID(),oldprofile.getName());
  newProfile.getProperties().putAll(oldprofile.getProperties());
  PropertyMap properties=oldprofile.getProperties();
  Property skinProperty=convertProperty(skinprofile.getPlayerSkinProperty());
  if (!properties.containsKey(skinProperty.getName())) {
    properties.put(skinProperty.getName(),skinProperty);
  }
  return newProfile;
}

Fixed version (ground truth):
public static GameProfile recreateProfile(GameProfile oldprofile,SkinProfile skinprofile){
  GameProfile newProfile=new GameProfile(skinprofile.getUUID(),oldprofile.getName());
  newProfile.getProperties().putAll(oldprofile.getProperties());
  PropertyMap properties=oldprofile.getProperties();
  Property skinProperty=convertProperty(skinprofile.getPlayerSkinProperty());
  if (!properties.containsKey(skinProperty.getName())) {
    properties.put(skinProperty.getName(),skinProperty);
  }
  return newProfile;
}
Program: 34279
Project: 34279
Buggy source:
@Override public void unregister(){
  ProtocolLibrary.getProtocolManager().removePacketListener(spawnListener);
  ProtocolLibrary.getProtocolManager().removePacketListener(tablistListener);
  HandlerList.unregisterAll(this);
}

Fixed version (ground truth):
@Override public void unregister(){
  for (  PacketListener listener : listeners) {
    ProtocolLibrary.getProtocolManager().removePacketListener(listener);
  }
  listeners.clear();
  HandlerList.unregisterAll(this);
}
Program: 34280
Project: 34280
Buggy source:
private void fixHeadSkin(ItemStack itemstack){
  try {
    SkullMeta meta=(SkullMeta)itemstack.getItemMeta();
    if (meta == null) {
      meta=(SkullMeta)Bukkit.getItemFactory().getItemMeta(Material.SKULL_ITEM);
    }
    if (meta.hasOwner()) {
      String name=meta.getOwner();
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        Field profileField=meta.getClass().getDeclaredField("String_Node_Str");
        profileField.setAccessible(true);
        profileField.set(meta,ProfileUtils.recreateProfile((GameProfile)profileField.get(meta),skinprofile,false));
        itemstack.setItemMeta(meta);
      }
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
private void fixHeadSkin(ItemStack itemstack){
  try {
    SkullMeta meta=(SkullMeta)itemstack.getItemMeta();
    if (meta == null) {
      meta=(SkullMeta)Bukkit.getItemFactory().getItemMeta(Material.SKULL_ITEM);
    }
    if (meta.hasOwner()) {
      String name=meta.getOwner();
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        Field profileField=meta.getClass().getDeclaredField("String_Node_Str");
        profileField.setAccessible(true);
        profileField.set(meta,ProfileUtils.recreateProfile((GameProfile)profileField.get(meta),skinprofile));
        itemstack.setItemMeta(meta);
      }
    }
  }
 catch (  Exception e) {
  }
}
Program: 34281
Project: 34281
Buggy source:
private void registerTabListItemSkinlistener(){
  tablistListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.PLAYER_INFO).listenerPriority(ListenerPriority.HIGHEST)){
    @SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<List> lists=event.getPacket().getSpecificModifier(List.class);
      List<PlayerInfoData> datas=lists.read(0);
      List<PlayerInfoData> newdatas=new ArrayList<PlayerInfoData>();
      for (      PlayerInfoData data : datas) {
        String name=data.a().getName();
        SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
        if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
          SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
          SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
          PlayerInfoData newdata=new PlayerInfoData((PacketPlayOutPlayerInfo)event.getPacket().getHandle(),ProfileUtils.recreateProfile(data.a(),skinprofile,name.equals(event.getPlayer().getName())),data.b(),data.c(),data.d());
          newdatas.add(newdata);
        }
 else {
          newdatas.add(data);
        }
      }
      lists.write(0,newdatas);
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(tablistListener);
}

Fixed version (ground truth):
private void registerTabListItemSkinlistener(){
  PacketListener tablistListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.PLAYER_INFO).listenerPriority(ListenerPriority.HIGHEST)){
    @SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<List> lists=event.getPacket().getSpecificModifier(List.class);
      List<PlayerInfoData> datas=lists.read(0);
      List<PlayerInfoData> newdatas=new ArrayList<PlayerInfoData>();
      for (      PlayerInfoData data : datas) {
        String name=data.a().getName();
        if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
          SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
          PlayerInfoData newdata=new PlayerInfoData((PacketPlayOutPlayerInfo)event.getPacket().getHandle(),ProfileUtils.recreateProfile(data.a(),skinprofile),data.b(),data.c(),data.d());
          newdatas.add(newdata);
        }
 else {
          newdatas.add(data);
        }
      }
      lists.write(0,newdatas);
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(tablistListener);
}
Program: 34282
Project: 34282
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void onPacketSending(PacketEvent event){
  StructureModifier<List> lists=event.getPacket().getSpecificModifier(List.class);
  List<PlayerInfoData> datas=lists.read(0);
  List<PlayerInfoData> newdatas=new ArrayList<PlayerInfoData>();
  for (  PlayerInfoData data : datas) {
    String name=data.a().getName();
    SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
    if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
      SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
      SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
      PlayerInfoData newdata=new PlayerInfoData((PacketPlayOutPlayerInfo)event.getPacket().getHandle(),ProfileUtils.recreateProfile(data.a(),skinprofile,name.equals(event.getPlayer().getName())),data.b(),data.c(),data.d());
      newdatas.add(newdata);
    }
 else {
      newdatas.add(data);
    }
  }
  lists.write(0,newdatas);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public void onPacketSending(PacketEvent event){
  StructureModifier<List> lists=event.getPacket().getSpecificModifier(List.class);
  List<PlayerInfoData> datas=lists.read(0);
  List<PlayerInfoData> newdatas=new ArrayList<PlayerInfoData>();
  for (  PlayerInfoData data : datas) {
    String name=data.a().getName();
    if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
      SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
      PlayerInfoData newdata=new PlayerInfoData((PacketPlayOutPlayerInfo)event.getPacket().getHandle(),ProfileUtils.recreateProfile(data.a(),skinprofile),data.b(),data.c(),data.d());
      newdatas.add(newdata);
    }
 else {
      newdatas.add(data);
    }
  }
  lists.write(0,newdatas);
}
Program: 34283
Project: 34283
Buggy source:
private void registerPlayerSkinListener(){
  spawnListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.NAMED_ENTITY_SPAWN).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<UUID> uuids=event.getPacket().getSpecificModifier(UUID.class);
      UUID uuid=uuids.read(0);
      Player player=Bukkit.getPlayer(uuid);
      SkinsRestorer.getInstance().logDebug("String_Node_Str" + player.getName());
      if (player != null && SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(player.getName())) {
        SkinsRestorer.getInstance().logDebug("String_Node_Str" + player.getName());
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(player.getName());
        uuids.write(0,skinprofile.getUUID());
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(spawnListener);
}

Fixed version (ground truth):
private void registerPlayerSkinListener(){
  PacketListener spawnListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.NAMED_ENTITY_SPAWN).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<UUID> uuids=event.getPacket().getSpecificModifier(UUID.class);
      UUID uuid=uuids.read(0);
      Player player=Bukkit.getPlayer(uuid);
      if (player != null && SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(player.getName())) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(player.getName());
        uuids.write(0,skinprofile.getUUID());
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(spawnListener);
}
Program: 34284
Project: 34284
Buggy source:
@Override public void register(){
  Bukkit.getPluginManager().registerEvents(this,SkinsRestorer.getInstance());
  registerPlayerSkinListener();
  registerTabListItemSkinlistener();
}

Fixed version (ground truth):
@Override public void register(){
  Bukkit.getPluginManager().registerEvents(this,SkinsRestorer.getInstance());
  registerLoginOutSuccUUIDListener();
  registerPlayerSkinListener();
  registerTabListItemSkinlistener();
}
Program: 34285
Project: 34285
Buggy source:
public static GameProfile recreateProfile(GameProfile oldprofile,SkinProfile skinprofile,boolean keepUUID){
  GameProfile newProfile=new GameProfile(keepUUID ? oldprofile.getId() : skinprofile.getUUID(),oldprofile.getName());
  newProfile.getProperties().putAll(oldprofile.getProperties());
  PropertyMap properties=oldprofile.getProperties();
  Property skinProperty=convertProperty(skinprofile.getPlayerSkinProperty());
  if (!properties.containsKey(skinProperty.getName())) {
    properties.put(skinProperty.getName(),skinProperty);
  }
  return newProfile;
}

Fixed version (ground truth):
public static GameProfile recreateProfile(GameProfile oldprofile,SkinProfile skinprofile){
  GameProfile newProfile=new GameProfile(skinprofile.getUUID(),oldprofile.getName());
  newProfile.getProperties().putAll(oldprofile.getProperties());
  PropertyMap properties=oldprofile.getProperties();
  Property skinProperty=convertProperty(skinprofile.getPlayerSkinProperty());
  if (!properties.containsKey(skinProperty.getName())) {
    properties.put(skinProperty.getName(),skinProperty);
  }
  return newProfile;
}
Program: 34286
Project: 34286
Buggy source:
@Override public void unregister(){
  ProtocolLibrary.getProtocolManager().removePacketListener(spawnListener);
  ProtocolLibrary.getProtocolManager().removePacketListener(tablistListener);
  HandlerList.unregisterAll(this);
}

Fixed version (ground truth):
@Override public void unregister(){
  for (  PacketListener listener : listeners) {
    ProtocolLibrary.getProtocolManager().removePacketListener(listener);
  }
  listeners.clear();
  HandlerList.unregisterAll(this);
}
Program: 34287
Project: 34287
Buggy source:
private void fixHeadSkin(ItemStack itemstack){
  try {
    SkullMeta meta=(SkullMeta)itemstack.getItemMeta();
    if (meta == null) {
      meta=(SkullMeta)Bukkit.getItemFactory().getItemMeta(Material.SKULL_ITEM);
    }
    if (meta.hasOwner()) {
      String name=meta.getOwner();
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        Field profileField=meta.getClass().getDeclaredField("String_Node_Str");
        profileField.setAccessible(true);
        profileField.set(meta,ProfileUtils.recreateProfile((GameProfile)profileField.get(meta),skinprofile,false));
        itemstack.setItemMeta(meta);
      }
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
private void fixHeadSkin(ItemStack itemstack){
  try {
    SkullMeta meta=(SkullMeta)itemstack.getItemMeta();
    if (meta == null) {
      meta=(SkullMeta)Bukkit.getItemFactory().getItemMeta(Material.SKULL_ITEM);
    }
    if (meta.hasOwner()) {
      String name=meta.getOwner();
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        Field profileField=meta.getClass().getDeclaredField("String_Node_Str");
        profileField.setAccessible(true);
        profileField.set(meta,ProfileUtils.recreateProfile((GameProfile)profileField.get(meta),skinprofile));
        itemstack.setItemMeta(meta);
      }
    }
  }
 catch (  Exception e) {
  }
}
Program: 34288
Project: 34288
Buggy source:
private void registerTabListItemSkinlistener(){
  tablistListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.PLAYER_INFO).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
      GameProfile profile=profiles.read(0);
      String name=profile.getName();
      SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile,name.equals(event.getPlayer().getName())));
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(tablistListener);
}

Fixed version (ground truth):
private void registerTabListItemSkinlistener(){
  PacketListener tablistListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.PLAYER_INFO).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
      GameProfile profile=profiles.read(0);
      String name=profile.getName();
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile));
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(tablistListener);
  listeners.add(tablistListener);
}
Program: 34289
Project: 34289
Buggy source:
@Override public void onPacketSending(PacketEvent event){
  StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
  GameProfile profile=profiles.read(0);
  String name=profile.getName();
  SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
  if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
    SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
    SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
    profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile,name.equals(event.getPlayer().getName())));
  }
}

Fixed version (ground truth):
@Override public void onPacketSending(PacketEvent event){
  StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
  GameProfile profile=profiles.read(0);
  String name=profile.getName();
  if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
    SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
    profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile));
  }
}
Program: 34290
Project: 34290
Buggy source:
private void registerPlayerSkinListener(){
  spawnListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.NAMED_ENTITY_SPAWN).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
      GameProfile profile=profiles.read(0);
      String name=profile.getName();
      SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile,false));
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(spawnListener);
}

Fixed version (ground truth):
private void registerPlayerSkinListener(){
  PacketListener spawnListener=new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(),PacketType.Play.Server.NAMED_ENTITY_SPAWN).listenerPriority(ListenerPriority.HIGHEST)){
    @Override public void onPacketSending(    PacketEvent event){
      StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
      GameProfile profile=profiles.read(0);
      String name=profile.getName();
      if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
        SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
        profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile));
      }
    }
  }
;
  ProtocolLibrary.getProtocolManager().addPacketListener(spawnListener);
  listeners.add(spawnListener);
}
Program: 34291
Project: 34291
Buggy source:
@Override public void register(){
  Bukkit.getPluginManager().registerEvents(this,SkinsRestorer.getInstance());
  registerPlayerSkinListener();
  registerTabListItemSkinlistener();
}

Fixed version (ground truth):
@Override public void register(){
  Bukkit.getPluginManager().registerEvents(this,SkinsRestorer.getInstance());
  registerLoginOutSuccUUIDListener();
  registerPlayerSkinListener();
  registerTabListItemSkinlistener();
}
Program: 34292
Project: 34292
Buggy source:
@Override public void visitNewIndividual(NewIndividual individual){
  URI path=individual.path();
  this.hasSelf=this.hasSelf || path.equals(SELF);
  this.newIds.add(path);
}

Fixed version (ground truth):
@Override public void visitNewIndividual(final NewIndividual individual){
  final URI path=individual.path();
  this.hasSelf=this.hasSelf || path.equals(SELF);
  this.newIds.add(path);
}
Program: 34293
Project: 34293
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper managedIndividual(Name<?> name,String managerId){
  ManagedIndividualId individualId=ManagedIndividualId.createId(name,managerId);
  ManagedIndividual individual=this.dataSet.individual(individualId,ManagedIndividual.class);
  return new IndividualHelperImpl(individual);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper managedIndividual(final Name<?> name,final String managerId){
  final ManagedIndividualId individualId=ManagedIndividualId.createId(name,managerId);
  final ManagedIndividual individual=this.dataSet.individual(individualId,ManagedIndividual.class);
  return new IndividualHelperImpl(individual);
}
Program: 34294
Project: 34294
Buggy source:
@Override public void visitLocalIndividual(LocalIndividual individual){
}

Fixed version (ground truth):
@Override public void visitLocalIndividual(final LocalIndividual individual){
}
Program: 34295
Project: 34295
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper externalIndividual(URI uri){
  Individual<?,?> individual=null;
  if (uri.isAbsolute()) {
    individual=this.dataSet.individual(uri,ExternalIndividual.class);
  }
 else {
    individual=this.dataSet.individual(uri,NewIndividual.class);
  }
  return new IndividualHelperImpl(individual);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper externalIndividual(final URI uri){
  Individual<?,?> individual=null;
  if (uri.isAbsolute()) {
    individual=this.dataSet.individual(uri,ExternalIndividual.class);
  }
 else {
    individual=this.dataSet.individual(uri,NewIndividual.class);
  }
  return new IndividualHelperImpl(individual);
}
Program: 34296
Project: 34296
Buggy source:
@Override public void visitIndividual(Individual<?,?> value){
  this.consumer.consume(this.individual,this.predicate,value);
}

Fixed version (ground truth):
@Override public void visitIndividual(final Individual<?,?> value){
  this.consumer.consume(this.individual,this.predicate,value);
}
Program: 34297
Project: 34297
Buggy source:
@Override public <T extends Serializable,S extends Individual<T,S>>S replace(Serializable from,T to,Class<? extends S> clazz){
  S target=null;
  Individual<?,?> src=this.dataSet.individualOfId(from);
  if (src != null) {
    target=this.dataSet.individual(to,clazz);
    rename(src,target);
  }
  return target;
}

Fixed version (ground truth):
@Override public <T extends Serializable,S extends Individual<T,S>>S replace(final Serializable from,final T to,final Class<? extends S> clazz){
  S target=null;
  final Individual<?,?> src=this.dataSet.individualOfId(from);
  if (src != null) {
    target=this.dataSet.individual(to,clazz);
    rename(src,target);
  }
  return target;
}
Program: 34298
Project: 34298
Buggy source:
@Override public void consume(Individual<?,?> subject,URI predicate,Individual<?,?> object){
  if (subject == this.from) {
    Value value=object;
    if (value == this.from) {
      value=this.to;
    }
    this.to.addValue(predicate,value);
  }
 else   if (subject != this.to && object == this.from) {
    subject.removeValue(predicate,object);
    subject.addValue(predicate,this.to);
  }
}

Fixed version (ground truth):
@Override public void consume(final Individual<?,?> subject,final URI predicate,final Individual<?,?> object){
  if (subject == this.from) {
    Value value=object;
    if (value == this.from) {
      value=this.to;
    }
    this.to.addValue(predicate,value);
  }
 else   if (subject != this.to && object == this.from) {
    subject.removeValue(predicate,object);
    subject.addValue(predicate,this.to);
  }
}
Program: 34299
Project: 34299
Buggy source:
private IndividualRenamer(Individual<?,?> from,Individual<?,?> to){
  this.from=from;
  this.to=to;
}

Fixed version (ground truth):
private IndividualRenamer(final Individual<?,?> from,final Individual<?,?> to){
  this.from=from;
  this.to=to;
}
Program: 34300
Project: 34300
Buggy source:
private TripleConsumerAdapter(Property property,Individual<?,?> individual,DataSetHelperImpl.TripleConsumer consumer){
  this.predicate=property.predicate();
  this.individual=individual;
  this.consumer=consumer;
}

Fixed version (ground truth):
private TripleConsumerAdapter(final Property property,final Individual<?,?> individual,final DataSetHelperImpl.TripleConsumer consumer){
  this.predicate=property.predicate();
  this.individual=individual;
  this.consumer=consumer;
}
Program: 34301
Project: 34301
Buggy source:
private NewIndividualIdCollector(ManagedIndividualId id){
  this.id=id;
}

Fixed version (ground truth):
private NewIndividualIdCollector(final ManagedIndividualId id){
  this.id=id;
}
Program: 34302
Project: 34302
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper relativeIndividual(Name<?> name,String managerId,URI path){
  ManagedIndividualId parentId=ManagedIndividualId.createId(name,managerId);
  RelativeIndividualId individualId=RelativeIndividualId.createId(parentId,path);
  RelativeIndividual individual=this.dataSet.individual(individualId,RelativeIndividual.class);
  return new IndividualHelperImpl(individual);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper relativeIndividual(final Name<?> name,final String managerId,final URI path){
  final ManagedIndividualId parentId=ManagedIndividualId.createId(name,managerId);
  final RelativeIndividualId individualId=RelativeIndividualId.createId(parentId,path);
  final RelativeIndividual individual=this.dataSet.individual(individualId,RelativeIndividual.class);
  return new IndividualHelperImpl(individual);
}
Program: 34303
Project: 34303
Buggy source:
void iterate(DataSetHelperImpl.TripleConsumer processor){
  for (  Individual<?,?> individual : this.dataSet) {
    for (    Property property : individual) {
      DataSetIterator.TripleConsumerAdapter visitor=new TripleConsumerAdapter(property,individual,processor);
      for (      Value value : property) {
        value.accept(visitor);
      }
    }
  }
}

Fixed version (ground truth):
void iterate(final DataSetHelperImpl.TripleConsumer processor){
  for (  final Individual<?,?> individual : this.dataSet) {
    for (    final Property property : individual) {
      final DataSetIterator.TripleConsumerAdapter visitor=new TripleConsumerAdapter(property,individual,processor);
      for (      final Value value : property) {
        value.accept(visitor);
      }
    }
  }
}
Program: 34304
Project: 34304
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper localIndividual(Name<?> name){
  @SuppressWarnings("String_Node_Str") LocalIndividual individual=this.dataSet.individual((Name)name,LocalIndividual.class);
  return new IndividualHelperImpl(individual);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public IndividualHelper localIndividual(final Name<?> name){
  @SuppressWarnings("String_Node_Str") final LocalIndividual individual=this.dataSet.individual((Name)name,LocalIndividual.class);
  return new IndividualHelperImpl(individual);
}
Program: 34305
Project: 34305
Buggy source:
@Override public void visitRelativeIndividual(RelativeIndividual individual){
}

Fixed version (ground truth):
@Override public void visitRelativeIndividual(final RelativeIndividual individual){
}
Program: 34306
Project: 34306
Buggy source:
@Override public void visitExternalIndividual(ExternalIndividual individual){
}

Fixed version (ground truth):
@Override public void visitExternalIndividual(final ExternalIndividual individual){
}
Program: 34307
Project: 34307
Buggy source:
DataSetHelperImpl(DataSet dataSet){
  this.dataSet=dataSet;
}

Fixed version (ground truth):
DataSetHelperImpl(final DataSet dataSet){
  this.dataSet=dataSet;
}
Program: 34308
Project: 34308
Buggy source:
@Override public ManagedIndividual manage(final ManagedIndividualId id) throws DataSetModificationException {
  List<URI> newIds=getNewIds(id);
  newIds.remove(SELF);
  ManagedIndividual self=replace(SELF,id,ManagedIndividual.class);
  for (  URI newId : newIds) {
    RelativeIndividualId relativeId=RelativeIndividualId.createId(id,newId);
    replace(newId,relativeId,RelativeIndividual.class);
  }
  return self;
}

Fixed version (ground truth):
@Override public ManagedIndividual manage(final ManagedIndividualId id) throws DataSetModificationException {
  final List<URI> newIds=getNewIds(id);
  newIds.remove(SELF);
  final ManagedIndividual self=replace(SELF,id,ManagedIndividual.class);
  for (  final URI newId : newIds) {
    final RelativeIndividualId relativeId=RelativeIndividualId.createId(id,newId);
    replace(newId,relativeId,RelativeIndividual.class);
  }
  return self;
}
Program: 34309
Project: 34309
Buggy source:
private void rename(final Individual<?,?> from,final Individual<?,?> to){
  DataSetIterator iterator=new DataSetIterator(this.dataSet);
  TripleConsumer consumer=new IndividualRenamer(from,to);
  iterator.iterate(consumer);
  this.dataSet.remove(from);
}

Fixed version (ground truth):
private void rename(final Individual<?,?> from,final Individual<?,?> to){
  final DataSetIterator iterator=new DataSetIterator(this.dataSet);
  final TripleConsumer consumer=new IndividualRenamer(from,to);
  iterator.iterate(consumer);
  this.dataSet.remove(from);
}
Program: 34310
Project: 34310
Buggy source:
@Override public <T extends Individual<URI,T>>T self(){
  return relative(SELF);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public <T extends Individual<URI,T>>T self(){
  return (T)relative(SELF);
}
Program: 34311
Project: 34311
Buggy source:
@Override public void visitLiteral(Literal<?> value){
  this.consumer.consume(this.individual,this.predicate,value);
}

Fixed version (ground truth):
@Override public void visitLiteral(final Literal<?> value){
  this.consumer.consume(this.individual,this.predicate,value);
}
Program: 34312
Project: 34312
Buggy source:
@Override public void visitManagedIndividual(ManagedIndividual individual){
  this.idInUse=this.id.equals(individual.id());
}

Fixed version (ground truth):
@Override public void visitManagedIndividual(final ManagedIndividual individual){
  this.idInUse=this.id.equals(individual.id());
}
Program: 34313
Project: 34313
Buggy source:
private List<URI> getNewIds(ManagedIndividualId id) throws DataSetModificationException {
  NewIndividualIdCollector collector=new NewIndividualIdCollector(id);
  for (  Individual<?,?> individual : this.dataSet) {
    collector.collect(individual);
  }
  return collector.getCollectedIds();
}

Fixed version (ground truth):
private List<URI> getNewIds(final ManagedIndividualId id) throws DataSetModificationException {
  final NewIndividualIdCollector collector=new NewIndividualIdCollector(id);
  for (  final Individual<?,?> individual : this.dataSet) {
    collector.collect(individual);
  }
  return collector.getCollectedIds();
}
Program: 34314
Project: 34314
Buggy source:
void collect(Individual<?,?> individual) throws DataSetModificationException {
  individual.accept(this);
  if (this.idInUse) {
    throw new DataSetModificationException("String_Node_Str" + this.id + "String_Node_Str");
  }
}

Fixed version (ground truth):
void collect(final Individual<?,?> individual) throws DataSetModificationException {
  individual.accept(this);
  if (this.idInUse) {
    throw new DataSetModificationException("String_Node_Str" + this.id + "String_Node_Str");
  }
}
Program: 34315
Project: 34315
Buggy source:
private DataSetIterator(DataSet dataSet){
  this.dataSet=dataSet;
}

Fixed version (ground truth):
private DataSetIterator(final DataSet dataSet){
  this.dataSet=dataSet;
}
Program: 34316
Project: 34316
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public <T extends Individual<URI,T>>T relative(URI path){
  return (T)this.dataSet.individualOfId(path);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public <T extends Individual<URI,T>>T relative(final URI path){
  return (T)this.dataSet.individualOfId(path);
}
Program: 34317
Project: 34317
Buggy source:
private static boolean areCompatibleMediaTypes(final MediaType one,final MediaType other,boolean symmetric){
  requireNonNull(one,REFERENCE_MEDIA_TYPE_CANNOT_BE_NULL);
  if (other == null) {
    return false;
  }
  if (!equalsIgnoreCase(one.suffix(),other.suffix())) {
    return false;
  }
  return haveCompatibleMediaRange(one,other,symmetric);
}

Fixed version (ground truth):
private static boolean areCompatibleMediaTypes(final MediaType one,final MediaType other,boolean symmetric){
  requireNonNull(one,REFERENCE_MEDIA_TYPE_CANNOT_BE_NULL);
  if (other == null) {
    return false;
  }
  return haveCompatibleMediaRange(one,other,symmetric);
}
Program: 34318
Project: 34318
Buggy source:
private static boolean haveCompatibleMediaRange(final MediaType one,final MediaType other,boolean symmetric){
  if (isWildcardType(one)) {
    return true;
  }
  if (symmetric && isWildcardType(other)) {
    return true;
  }
  return one.type().equalsIgnoreCase(other.type()) && haveCompatibleSubtype(one,other,symmetric);
}

Fixed version (ground truth):
private static boolean haveCompatibleMediaRange(final MediaType one,final MediaType other,boolean symmetric){
  if (isWildcardType(one)) {
    return true;
  }
  if (symmetric && isWildcardType(other)) {
    return true;
  }
  if (!equalsIgnoreCase(one.suffix(),other.suffix())) {
    return false;
  }
  return one.type().equalsIgnoreCase(other.type()) && haveCompatibleSubtype(one,other,symmetric);
}
Program: 34319
Project: 34319
Buggy source:
@Test public void testGetDeclaredPrefixes() throws Exception {
  assertThat(this.sut.getDeclaredPrefixes(),contains(DEFAULT_PR1,DEFAULT_PR2));
}

Fixed version (ground truth):
@Test public void testGetDeclaredPrefixes() throws Exception {
  assertThat(this.sut.getDeclaredPrefixes(),containsInAnyOrder(DEFAULT_PR1,DEFAULT_PR2));
}
Program: 34320
Project: 34320
Buggy source:
@Test public void testGetPrefixes$found() throws Exception {
  assertThat(this.sut.getPrefixes(DEFAULT_NAMESPACE),contains(DEFAULT_PR1,DEFAULT_PR2));
}

Fixed version (ground truth):
@Test public void testGetPrefixes$found() throws Exception {
  assertThat(this.sut.getPrefixes(DEFAULT_NAMESPACE),containsInAnyOrder(DEFAULT_PR1,DEFAULT_PR2));
}
Program: 34321
Project: 34321
Buggy source:
@Test public void testWithPrefix$valid() throws Exception {
  ImmutableNamespaces ns=this.sut.withPrefix(NS1,VALID_NAMESPACE);
  assertThat(ns,not(sameInstance(this.sut)));
  assertThat(ns.getDeclaredPrefixes(),contains(NS1,DEFAULT_PR1,DEFAULT_PR2));
  assertThat(ns.getNamespaceURI(NS1),equalTo(VALID_NAMESPACE));
  assertThat(ns.getPrefix(VALID_NAMESPACE),equalTo(NS1));
  assertThat(ns.getPrefixes(VALID_NAMESPACE),contains(NS1));
}

Fixed version (ground truth):
@Test public void testWithPrefix$valid() throws Exception {
  final ImmutableNamespaces ns=this.sut.withPrefix(NS1,VALID_NAMESPACE);
  assertThat(ns,not(sameInstance(this.sut)));
  assertThat(ns.getDeclaredPrefixes(),containsInAnyOrder(NS1,DEFAULT_PR1,DEFAULT_PR2));
  assertThat(ns.getNamespaceURI(NS1),equalTo(VALID_NAMESPACE));
  assertThat(ns.getPrefix(VALID_NAMESPACE),equalTo(NS1));
  assertThat(ns.getPrefixes(VALID_NAMESPACE),contains(NS1));
}
Program: 34322
Project: 34322
Buggy source:
@Test public void testWithoutPrefix() throws Exception {
  ImmutableNamespaces ns=this.sut.withoutPrefix(DEFAULT_PR1,DEFAULT_PR2);
  assertThat(ns,not(sameInstance(this.sut)));
  assertThat(ns.getDeclaredPrefixes(),hasSize(0));
}

Fixed version (ground truth):
@Test public void testWithoutPrefix() throws Exception {
  final ImmutableNamespaces ns=this.sut.withoutPrefix(DEFAULT_PR1,DEFAULT_PR2);
  assertThat(ns,not(sameInstance(this.sut)));
  assertThat(ns.getDeclaredPrefixes(),hasSize(0));
}
Program: 34323
Project: 34323
Buggy source:
@Test public void testToString$empty() throws Exception {
  ImmutableNamespaces ns=new ImmutableNamespaces();
  assertThat(ns.toString(),not(equalTo(Utils.defaultToString(ns))));
}

Fixed version (ground truth):
@Test public void testToString$empty() throws Exception {
  final ImmutableNamespaces ns=new ImmutableNamespaces();
  assertThat(ns.toString(),not(equalTo(Utils.defaultToString(ns))));
}
Program: 34324
Project: 34324
Buggy source:
private static boolean isRoot(URI base){
  return base.getPath().equals("String_Node_Str");
}

Fixed version (ground truth):
private static boolean isRoot(URI base){
  return base.getPath().equals("String_Node_Str") || base.getPath().equals("String_Node_Str");
}
Program: 34325
Project: 34325
Buggy source:
private Resource<?> toResource(Individual<?,?> individual){
  final AtomicReference<Resource<?>> result=new AtomicReference<Resource<?>>();
  individual.accept(new IndividualVisitor(){
    @Override public void visitManagedIndividual(    ManagedIndividual individual){
      ManagedIndividualId id=individual.id();
      URI indirectId=id.indirectId();
      if (indirectId == null) {
        id=ManagedIndividualId.createId(id.name(),id.managerId());
      }
      URI path=resourceResolver.resolveResource(id);
      if (path == null) {
        throw new IllegalStateException("String_Node_Str" + id + "String_Node_Str");
      }
 else       if (indirectId != null) {
        path=path.resolve(indirectId);
      }
      result.set(uriRef(base.resolve(path)));
    }
    @Override public void visitLocalIndividual(    LocalIndividual individual){
      result.set(toSessionResource(individual.name()));
    }
    @Override public void visitExternalIndividual(    ExternalIndividual individual){
      result.set(uriRef(individual.id()));
    }
  }
);
  return result.get();
}

Fixed version (ground truth):
private Resource<?> toResource(Individual<?,?> individual){
  final AtomicReference<Resource<?>> result=new AtomicReference<Resource<?>>();
  individual.accept(new IndividualVisitor(){
    @Override public void visitManagedIndividual(    ManagedIndividual individual){
      ManagedIndividualId id=individual.id();
      URI indirectId=id.indirectId();
      if (indirectId != null) {
        id=ManagedIndividualId.createId(id.name(),id.managerId());
      }
      URI path=resourceResolver.resolveResource(id);
      if (path == null) {
        throw new IllegalStateException("String_Node_Str" + id + "String_Node_Str");
      }
 else       if (indirectId != null) {
        path=path.resolve(indirectId);
      }
      result.set(uriRef(base.resolve(path)));
    }
    @Override public void visitLocalIndividual(    LocalIndividual individual){
      result.set(toSessionResource(individual.name()));
    }
    @Override public void visitExternalIndividual(    ExternalIndividual individual){
      result.set(uriRef(individual.id()));
    }
  }
);
  return result.get();
}
Program: 34326
Project: 34326
Buggy source:
@Override public void visitManagedIndividual(ManagedIndividual individual){
  ManagedIndividualId id=individual.id();
  URI indirectId=id.indirectId();
  if (indirectId == null) {
    id=ManagedIndividualId.createId(id.name(),id.managerId());
  }
  URI path=resourceResolver.resolveResource(id);
  if (path == null) {
    throw new IllegalStateException("String_Node_Str" + id + "String_Node_Str");
  }
 else   if (indirectId != null) {
    path=path.resolve(indirectId);
  }
  result.set(uriRef(base.resolve(path)));
}

Fixed version (ground truth):
@Override public void visitManagedIndividual(ManagedIndividual individual){
  ManagedIndividualId id=individual.id();
  URI indirectId=id.indirectId();
  if (indirectId != null) {
    id=ManagedIndividualId.createId(id.name(),id.managerId());
  }
  URI path=resourceResolver.resolveResource(id);
  if (path == null) {
    throw new IllegalStateException("String_Node_Str" + id + "String_Node_Str");
  }
 else   if (indirectId != null) {
    path=path.resolve(indirectId);
  }
  result.set(uriRef(base.resolve(path)));
}
Program: 34327
Project: 34327
Buggy source:
@Before public void setUp() throws Exception {
  sut=DataTransformator.create(uri("String_Node_Str")).mediaType(new MediaType("String_Node_Str","String_Node_Str")).permanentEndpoint(uri("String_Node_Str")).enableResolution(new ResourceResolver(){
    @Override public URI resolveResource(    ManagedIndividualId id){
      if (id.equals(NANDANA_ID)) {
        return NANDANA_LOCATION;
      }
      return null;
    }
    @Override public ManagedIndividualId resolveLocation(    URI path){
      if (path.equals(NANDANA_LOCATION)) {
        return NANDANA_ID;
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  sut=DataTransformator.create(APPLICATION_BASE).mediaType(new MediaType("String_Node_Str","String_Node_Str")).permanentEndpoint(NANDANA_ENDPOINT).enableResolution(new ResourceResolver(){
    @Override public URI resolveResource(    ManagedIndividualId id){
      if (id.equals(NANDANA_ID)) {
        return NANDANA_LOCATION;
      }
      return null;
    }
    @Override public ManagedIndividualId resolveLocation(    URI path){
      if (path.equals(NANDANA_LOCATION)) {
        return NANDANA_ID;
      }
      return null;
    }
  }
);
}
Program: 34328
Project: 34328
Buggy source:
@Test public void testUnmarshall() throws Exception {
  DataSet dataSet=sut.unmarshall(loadResource("String_Node_Str"));
  sut.marshall(dataSet);
}

Fixed version (ground truth):
@Test public void testUnmarshall() throws Exception {
  DataSet dataSet=sut.unmarshall(loadResource("String_Node_Str"));
  assertThat(dataSet.numberOfIndividuals(),greaterThan(2));
  assertThat(dataSet.individualOfId(NANDANA_ID),notNullValue());
  assertThat(dataSet.individualOfId(NANDANA_ME_ID),notNullValue());
  sut.marshall(dataSet);
}
Program: 34329
Project: 34329
Buggy source:
public ContentPreferencesBuilder withOmit(Preference preference){
  this.contentPreferences.omit(preference);
  return this;
}

Fixed version (ground truth):
public ContentPreferencesBuilder withOmit(Preference preference){
  this.contentPreferences.omit(normalize(preference));
  return this;
}
Program: 34330
Project: 34330
Buggy source:
public ContentPreferencesBuilder withInclude(Preference preference){
  this.contentPreferences.include(preference);
  return this;
}

Fixed version (ground truth):
public ContentPreferencesBuilder withInclude(Preference preference){
  this.contentPreferences.include(normalize(preference));
  return this;
}
Program: 34331
Project: 34331
Buggy source:
public PublicResource createResource(DataSet dataSet) throws ApplicationExecutionException {
  Resource resource=applicationContext().createResource(endpoint(),dataSet);
  return createResource(resource.id());
}

Fixed version (ground truth):
public PublicResource createResource(DataSet dataSet,InteractionModel interactionModel) throws ApplicationExecutionException {
  Resource resource=applicationContext().createResource(endpoint(),dataSet);
  return createResource(resource.id());
}
Program: 34332
Project: 34332
Buggy source:
@Override protected final DataSet resourceData(ContentPreferences contentPreferences) throws ApplicationExecutionException {
  DataSet dataSet=super.resourceData(contentPreferences);
  if (contentPreferences.isRequired(Preference.MINIMAL_CONTAINER) || contentPreferences.isRequired(Preference.EMPTY_CONTAINER)) {
    List<Individual<?,?>> toClean=new ArrayList<Individual<?,?>>();
    for (    Individual<?,?> individual : dataSet) {
      individual.accept(new IndividualFilter(toClean));
    }
    for (    Individual<?,?> individual : toClean) {
      cleanIndividual(individual);
    }
  }
  return dataSet;
}

Fixed version (ground truth):
@Override protected final DataSet resourceData(ContentPreferences contentPreferences) throws ApplicationExecutionException {
  DataSet dataSet=super.resourceData(contentPreferences);
  if (contentPreferences.isMinimalInclusionRequired()) {
    List<Individual<?,?>> toClean=new ArrayList<Individual<?,?>>();
    for (    Individual<?,?> individual : dataSet) {
      individual.accept(new IndividualFilter(toClean));
    }
    for (    Individual<?,?> individual : toClean) {
      cleanIndividual(individual);
    }
  }
  return dataSet;
}
Program: 34333
Project: 34333
Buggy source:
@Override protected void fillInMetadata(ContentPreferences contentPreferences,Individual<?,?> individual,Context ctx){
  super.fillInMetadata(contentPreferences,individual,ctx);
  individual.addValue(ctx.property(RDF.TYPE),ctx.reference(LDP.CONTAINER));
  if (contentPreferences.isRequired(Preference.CONTAINMENT_TRIPLES)) {
    for (    PublicResource member : members()) {
      individual.addValue(ctx.property(LDP.CONTAINS),ctx.newIndividual(member));
    }
  }
}

Fixed version (ground truth):
@Override protected void fillInMetadata(ContentPreferences contentPreferences,Individual<?,?> individual,Context ctx){
  super.fillInMetadata(contentPreferences,individual,ctx);
  individual.addValue(ctx.property(RDF.TYPE),ctx.reference(LDP.CONTAINER));
  if (contentPreferences.mayInclude(Preference.CONTAINMENT_TRIPLES)) {
    for (    PublicResource member : members()) {
      individual.addValue(ctx.property(LDP.CONTAINS),ctx.newIndividual(member));
    }
  }
}
Program: 34334
Project: 34334
Buggy source:
final void fillInMemberMetadata(ContentPreferences contentPreferences,Individual<?,?> individual,Context ctx){
  if (!contentPreferences.isRequired(Preference.MEMBERSHIP_TRIPLES)) {
    return;
  }
  URI predicate=containerTemplate().membershipPredicate();
switch (containerTemplate().membershipRelation()) {
case HAS_MEMBER:
    populateHasMember(individual,ctx,predicate);
  break;
case IS_MEMBER_OF:
populateIsMemberOf(individual,ctx,predicate);
break;
}
}

Fixed version (ground truth):
final void fillInMemberMetadata(ContentPreferences contentPreferences,Individual<?,?> individual,Context ctx){
  if (!contentPreferences.mayInclude(Preference.MEMBERSHIP_TRIPLES)) {
    return;
  }
  URI predicate=containerTemplate().membershipPredicate();
switch (containerTemplate().membershipRelation()) {
case HAS_MEMBER:
    populateHasMember(individual,ctx,predicate);
  break;
case IS_MEMBER_OF:
populateIsMemberOf(individual,ctx,predicate);
break;
}
}