nus-yam/ex-repair huggingface dataset:
Program: 151370
Project: 151370
Buggy source:
/** 
 * Group users management
 */
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupUsersList(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser[] users=PermissionsPlugin.getPermissionManager().getUsers(args.get("String_Node_Str"));
  if (users == null || users.length == 0) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Group users management
 */
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupUsersList(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser[] users=PermissionsPlugin.getPermissionManager().getUsers(args.get("String_Node_Str"));
  if (users == null || users.length == 0) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
  sender.sendMessage("String_Node_Str" + args.get("String_Node_Str") + "String_Node_Str");
  for (  PermissionUser user : users) {
    sender.sendMessage("String_Node_Str" + user.getName());
  }
}
Program: 151371
Project: 151371
Buggy source:
public void setPermission(String permission,String value,String world){
  Boolean newOption=true;
  if (this.worldsPermissions == null) {
    this.fetchPermissions();
  }
  if (world != null && !world.isEmpty() && worldsOptions.get(world) != null && worldsOptions.get(world).containsKey(permission)) {
    newOption=false;
  }
  if (newOption && this.commonOptions.containsKey(permission)) {
    newOption=false;
  }
  if (value == null) {
    value="String_Node_Str";
  }
  if (world == null) {
    world="String_Node_Str";
  }
  if (newOption) {
    this.db.updateQuery("String_Node_Str",this.name,permission,value,world,this.type.ordinal());
  }
 else {
    this.db.updateQuery("String_Node_Str",value,this.name,this.type.ordinal(),permission);
  }
  if (this.isVirtual()) {
    this.save();
  }
  this.fetchPermissions();
}

Fixed version (ground truth):
public void setPermission(String permission,String value,String world){
  if (permission == null || permission.isEmpty()) {
    return;
  }
  Boolean newOption=true;
  if (this.worldsPermissions == null) {
    this.fetchPermissions();
  }
  if (world != null && !world.isEmpty() && worldsOptions.get(world) != null && worldsOptions.get(world).containsKey(permission)) {
    newOption=false;
  }
  if (newOption && this.commonOptions.containsKey(permission)) {
    newOption=false;
  }
  if (value == null) {
    value="String_Node_Str";
  }
  if (world == null) {
    world="String_Node_Str";
  }
  if (newOption) {
    this.db.updateQuery("String_Node_Str",this.name,permission,value,world,this.type.ordinal());
  }
 else {
    this.db.updateQuery("String_Node_Str",value,this.name,this.type.ordinal(),permission);
  }
  if (this.isVirtual()) {
    this.save();
  }
  this.fetchPermissions();
}
Program: 151372
Project: 151372
Buggy source:
public void addGroup(PermissionGroup group){
  if (group == null) {
    return;
  }
  List<PermissionGroup> groups=new LinkedList<PermissionGroup>(Arrays.asList(this.getGroups()));
  Logger.getLogger("String_Node_Str").info("String_Node_Str" + groups.getClass().getSimpleName() + "String_Node_Str"+ groups);
  if (!groups.contains(group)) {
    groups.add(group);
    this.setGroups(groups.toArray(new PermissionGroup[0]));
  }
}

Fixed version (ground truth):
public void addGroup(PermissionGroup group){
  if (group == null) {
    return;
  }
  List<PermissionGroup> groups=new LinkedList<PermissionGroup>(Arrays.asList(this.getGroups()));
  if (this.getGroupsNamesImpl().length == 0 && groups.size() == 1 && groups.contains(this.manager.getDefaultGroup())) {
    groups.clear();
  }
  if (!groups.contains(group)) {
    groups.add(group);
    this.setGroups(groups.toArray(new PermissionGroup[0]));
  }
}
Program: 151373
Project: 151373
Buggy source:
@Override public void setPrefix(String prefix){
  super.setPrefix(prefix);
}

Fixed version (ground truth):
@Override public void setPrefix(String prefix){
  this.node.setProperty("String_Node_Str",prefix);
  super.setPrefix(prefix);
}
Program: 151374
Project: 151374
Buggy source:
@Override public void setSuffix(String postfix){
  super.setSuffix(postfix);
}

Fixed version (ground truth):
@Override public void setSuffix(String postfix){
  this.node.setProperty("String_Node_Str",prefix);
  super.setSuffix(postfix);
}
Program: 151375
Project: 151375
Buggy source:
@Override public void setPrefix(String prefix){
  backend.setPrefix(prefix);
  this.prefix=prefix;
}

Fixed version (ground truth):
@Override public void setPrefix(String prefix){
  backend.setPrefix(prefix);
  super.setPrefix(prefix);
}
Program: 151376
Project: 151376
Buggy source:
@Override public void setSuffix(String suffix){
  backend.setSuffix(suffix);
  this.suffix=suffix;
}

Fixed version (ground truth):
@Override public void setSuffix(String suffix){
  backend.setSuffix(suffix);
  super.setSuffix(suffix);
}
Program: 151377
Project: 151377
Buggy source:
@Override public void setPrefix(String prefix){
  backend.setPrefix(prefix);
  this.prefix=prefix;
}

Fixed version (ground truth):
@Override public void setPrefix(String prefix){
  backend.setPrefix(prefix);
  super.setPrefix(prefix);
}
Program: 151378
Project: 151378
Buggy source:
@Override public void setSuffix(String suffix){
  backend.setSuffix(suffix);
  this.suffix=suffix;
}

Fixed version (ground truth):
@Override public void setSuffix(String suffix){
  backend.setSuffix(suffix);
  super.setSuffix(suffix);
}
Program: 151379
Project: 151379
Buggy source:
@Override public void onEnable(){
  this.commandsManager.register(new ru.tehkode.permissions.bukkit.commands.PermissionsCommand());
  this.registerEvents();
  logger.log(Level.INFO,"String_Node_Str" + this.getDescription().getVersion() + "String_Node_Str"+ this.getDescription().getVersion()+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onEnable(){
  this.commandsManager.register(new ru.tehkode.permissions.bukkit.commands.PermissionsCommand());
  this.registerModifyworld();
  logger.log(Level.INFO,"String_Node_Str" + this.getDescription().getVersion() + "String_Node_Str"+ this.getDescription().getVersion()+ "String_Node_Str");
}
Program: 151380
Project: 151380
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command command,String commandLabel,String[] args){
  PluginDescriptionFile pdfFile=this.getDescription();
  if (args.length > 0) {
    return this.commandsManager.execute(sender,command,args);
  }
 else {
    if (sender instanceof Player) {
      sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + pdfFile.getVersion()+ "String_Node_Str");
    }
 else {
      sender.sendMessage("String_Node_Str" + pdfFile.getName() + "String_Node_Str"+ pdfFile.getVersion()+ "String_Node_Str");
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command command,String commandLabel,String[] args){
  PluginDescriptionFile pdfFile=this.getDescription();
  if (args.length > 0) {
    return this.commandsManager.execute(sender,command,args);
  }
 else {
    if (sender instanceof Player) {
      sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + pdfFile.getVersion()+ "String_Node_Str");
      return !this.permissionsManager.has((Player)sender,"String_Node_Str");
    }
 else {
      sender.sendMessage("String_Node_Str" + pdfFile.getName() + "String_Node_Str"+ pdfFile.getVersion()+ "String_Node_Str");
      return false;
    }
  }
}
Program: 151381
Project: 151381
Buggy source:
protected void updateInfo(){
  String sql;
  if (this.isVirtual()) {
    sql="String_Node_Str";
  }
 else {
    sql="String_Node_Str";
  }
  this.db.updateQuery(sql,this.suffix,this.prefix,this.name,this.type.ordinal());
}

Fixed version (ground truth):
protected void updateInfo(){
  String sql;
  if (this.isVirtual()) {
    sql="String_Node_Str";
  }
 else {
    sql="String_Node_Str";
  }
  this.db.updateQuery(sql,this.suffix,this.prefix,this.name,this.type.ordinal());
  this.virtual=false;
}
Program: 151382
Project: 151382
Buggy source:
public void setPermissions(String[] permissions,String world){
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal(),world);
  for (  String permission : permissions) {
    this.setPermission(permission,"String_Node_Str",world);
  }
}

Fixed version (ground truth):
public void setPermissions(String[] permissions,String world){
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal(),world);
  for (  String permission : permissions) {
    this.setPermission(permission,"String_Node_Str",world);
  }
  if (this.isVirtual()) {
    this.save();
  }
}
Program: 151383
Project: 151383
Buggy source:
public void setParents(PermissionGroup[] parentGroups){
  try {
    this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
    List<Object[]> rows=new LinkedList<Object[]>();
    for (    PermissionGroup group : parentGroups) {
      rows.add(new Object[]{this.name,group.getName(),this.type.ordinal()});
    }
    this.db.insert("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},rows);
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public void setParents(PermissionGroup[] parentGroups){
  try {
    this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
    List<Object[]> rows=new LinkedList<Object[]>();
    for (    PermissionGroup group : parentGroups) {
      if (group == null || group.getName().isEmpty()) {
        continue;
      }
      rows.add(new Object[]{this.name,group.getName(),this.type.ordinal()});
    }
    this.db.insert("String_Node_Str",new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},rows);
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
  if (this.isVirtual()) {
    this.save();
  }
}
Program: 151384
Project: 151384
Buggy source:
public void setPermission(String permission,String value,String world){
  Boolean newOption=true;
  if (this.worldsPermissions == null) {
    this.fetchPermissions();
  }
  if (world != null && !world.isEmpty() && worldsOptions.get(world) != null && worldsOptions.get(world).containsKey(permission)) {
    newOption=false;
  }
  if (newOption && this.commonOptions.containsKey(permission)) {
    newOption=false;
  }
  if (value == null) {
    value="String_Node_Str";
  }
  if (newOption) {
    this.db.updateQuery("String_Node_Str",this.name,permission,value,world,this.type.ordinal());
  }
 else {
    this.db.updateQuery("String_Node_Str",value,this.name,this.type.ordinal(),permission);
  }
}

Fixed version (ground truth):
public void setPermission(String permission,String value,String world){
  Boolean newOption=true;
  if (this.worldsPermissions == null) {
    this.fetchPermissions();
  }
  if (world != null && !world.isEmpty() && worldsOptions.get(world) != null && worldsOptions.get(world).containsKey(permission)) {
    newOption=false;
  }
  if (newOption && this.commonOptions.containsKey(permission)) {
    newOption=false;
  }
  if (value == null) {
    value="String_Node_Str";
  }
  if (world == null) {
    world="String_Node_Str";
  }
  if (newOption) {
    this.db.updateQuery("String_Node_Str",this.name,permission,value,world,this.type.ordinal());
  }
 else {
    this.db.updateQuery("String_Node_Str",value,this.name,this.type.ordinal(),permission);
  }
  if (this.isVirtual()) {
    this.save();
  }
}
Program: 151385
Project: 151385
Buggy source:
@Override public boolean has(String permission,String world){
  String expression=this.getMatchingExpression(permission,world);
  if (expression != null) {
    return this.explainExpression(expression);
  }
  for (  PermissionGroup parent : this.getParentGroups()) {
    if (parent.has(permission,world)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean has(String permission,String world){
  if (permission != null && permission.isEmpty()) {
    return true;
  }
  String expression=this.getMatchingExpression(permission,world);
  if (expression != null) {
    return this.explainExpression(expression);
  }
  for (  PermissionGroup parent : this.getParentGroups()) {
    if (parent.has(permission,world)) {
      return true;
    }
  }
  return false;
}
Program: 151386
Project: 151386
Buggy source:
private void initBackend(){
  String backEnd=this.config.getString("String_Node_Str");
  if (backEnd == null || backEnd.isEmpty()) {
    backEnd=PermissionBackendFactory.defaultBackend;
    this.config.setProperty("String_Node_Str",backEnd);
    this.config.save();
  }
  this.backend=PermissionBackendFactory.getBackend(backEnd,this,config);
}

Fixed version (ground truth):
private void initBackend(){
  String backEnd=this.config.getString("String_Node_Str");
  if (backEnd == null || backEnd.isEmpty()) {
    backEnd=PermissionBackend.defaultBackend;
    this.config.setProperty("String_Node_Str",backEnd);
    this.config.save();
  }
  this.backend=PermissionBackend.getBackend(backEnd,this,config);
}
Program: 151387
Project: 151387
Buggy source:
@Override public boolean has(String permission,String world){
  String expression=this.getMatchingExpression(permission,world);
  if (expression != null) {
    return this.explainExpression(expression);
  }
  for (  PermissionGroup group : this.getGroups()) {
    if (group.has(permission,world)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean has(String permission,String world){
  if (permission != null && permission.isEmpty()) {
    return true;
  }
  String expression=this.getMatchingExpression(permission,world);
  if (expression != null) {
    return this.explainExpression(expression);
  }
  for (  PermissionGroup group : this.getGroups()) {
    if (group.has(permission,world)) {
      return true;
    }
  }
  return false;
}
Program: 151388
Project: 151388
Buggy source:
public PermissionsPlugin(){
  super();
  logger.log(Level.INFO,"String_Node_Str");
}

Fixed version (ground truth):
public PermissionsPlugin(){
  super();
  PermissionBackend.registerBackendAlias("String_Node_Str",SQLBackend.class);
  PermissionBackend.registerBackendAlias("String_Node_Str",FileBackend.class);
  logger.log(Level.INFO,"String_Node_Str");
}
Program: 151389
Project: 151389
Buggy source:
@Override public void onEnable(){
  this.commandsManager.register(new ru.tehkode.permissions.bukkit.commands.PermissionsCommand());
  this.getServer().getPluginManager().registerEvent(Event.Type.BLOCK_PLACE,this.blockProtector,Priority.Low,this);
  this.getServer().getPluginManager().registerEvent(Event.Type.BLOCK_BREAK,this.blockProtector,Priority.Low,this);
  logger.log(Level.INFO,"String_Node_Str" + this.getDescription().getVersion() + "String_Node_Str"+ this.getDescription().getVersion()+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onEnable(){
  this.commandsManager.register(new ru.tehkode.permissions.bukkit.commands.PermissionsCommand());
  this.getServer().getPluginManager().registerEvent(Event.Type.BLOCK_PLACE,this.blockProtector,Priority.Low,this);
  this.getServer().getPluginManager().registerEvent(Event.Type.BLOCK_BREAK,this.blockProtector,Priority.Low,this);
  this.getServer().getPluginManager().registerEvent(Event.Type.PLAYER_QUIT,new org.bukkit.event.player.PlayerListener(),Priority.Low,this);
  logger.log(Level.INFO,"String_Node_Str" + this.getDescription().getVersion() + "String_Node_Str"+ this.getDescription().getVersion()+ "String_Node_Str");
}
Program: 151391
Project: 151391
Buggy source:
/** 
 * Gets a list of nodes. Non-valid entries will not be in the list. There will be no null slots. If the list is not defined, the default will be returned. 'null' can be passed for the default and an empty list will be returned instead. The node must be an actual node and cannot be just a boolean,
 * @param path path to node (dot notation)
 * @param def default value or null for an empty list as default
 * @return list of integers
 */
public List<ConfigurationNode> getNodesList(String path,List<ConfigurationNode> def){
  List<Object> raw=getList(path);
  if (raw == null) {
    return def != null ? def : new ArrayList<ConfigurationNode>();
  }
  List<ConfigurationNode> list=new ArrayList<ConfigurationNode>();
  for (  Object o : raw) {
    if (o instanceof Map) {
      list.add(new ConfigurationNode((Map<String,Object>)o));
    }
  }
  return list;
}

Fixed version (ground truth):
/** 
 * Gets a list of nodes. Non-valid entries will not be in the list. There will be no null slots. If the list is not defined, the default will be returned. 'null' can be passed for the default and an empty list will be returned instead. The node must be an actual node and cannot be just a boolean,
 * @param path path to node (dot notation)
 * @param def default value or null for an empty list as default
 * @return list of integers
 */
public List<ConfigurationNode> getNodesList(String path,List<ConfigurationNode> def){
  List<Object> raw=getList(path);
  if (raw == null) {
    return def != null ? def : new ArrayList<ConfigurationNode>();
  }
  List<ConfigurationNode> list=new ArrayList<ConfigurationNode>();
  for (  Object o : raw) {
    if (o instanceof ConfigurationNode) {
      list.add((ConfigurationNode)o);
    }
    if (o instanceof Map) {
      list.add(new ConfigurationNode((Map<String,Object>)o));
    }
  }
  return list;
}
Program: 151392
Project: 151392
Buggy source:
/** 
 * Get a list of nodes at a location. If the map at the particular location does not exist or it is not a map, null will be returned.
 * @param path path to node (dot notation)
 * @return map of nodes
 */
public Map<String,ConfigurationNode> getNodesMap(String path){
  Object o=getProperty(path);
  if (o == null) {
    return null;
  }
 else   if (o instanceof Map) {
    Map<String,ConfigurationNode> nodes=new HashMap<String,ConfigurationNode>();
    for (    Map.Entry<String,Object> entry : ((Map<String,Object>)o).entrySet()) {
      if (entry.getValue() instanceof Map) {
        nodes.put(entry.getKey(),new ConfigurationNode((Map<String,Object>)entry.getValue()));
      }
    }
    return nodes;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Get a list of nodes at a location. If the map at the particular location does not exist or it is not a map, null will be returned.
 * @param path path to node (dot notation)
 * @return map of nodes
 */
public Map<String,ConfigurationNode> getNodesMap(String path){
  Object o=getProperty(path);
  if (o == null) {
    return null;
  }
  if (o instanceof Map) {
    Map<String,ConfigurationNode> nodes=new HashMap<String,ConfigurationNode>();
    for (    Map.Entry<String,Object> entry : ((Map<String,Object>)o).entrySet()) {
      if (entry.getValue() instanceof ConfigurationNode) {
        nodes.put(entry.getKey(),(ConfigurationNode)entry.getValue());
      }
 else       if (entry.getValue() instanceof Map) {
        nodes.put(entry.getKey(),new ConfigurationNode((Map<String,Object>)entry.getValue()));
      }
    }
    return nodes;
  }
 else {
    return null;
  }
}
Program: 151393
Project: 151393
Buggy source:
/** 
 * Get a configuration node at a path. If the node doesn't exist or the path does not lead to a node, null will be returned. A node has key/value mappings.
 * @param path
 * @return node or null
 */
@Override public ConfigurationNode getNode(String path){
  Object raw=getProperty(path);
  if (raw instanceof Map) {
    return new ConfigurationNode((Map<String,Object>)raw);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get a configuration node at a path. If the node doesn't exist or the path does not lead to a node, null will be returned. A node has key/value mappings.
 * @param path
 * @return node or null
 */
@Override public ConfigurationNode getNode(String path){
  Object raw=getProperty(path);
  if (raw instanceof ConfigurationNode) {
    return (ConfigurationNode)raw;
  }
  if (raw instanceof Map) {
    return new ConfigurationNode((Map<String,Object>)raw);
  }
  return null;
}
Program: 151394
Project: 151394
Buggy source:
private void deleteOld(){
  Cursor old=null;
  try {
    SQLiteDatabase db=mFinchVideoProvider.getDatabase();
    old=db.query(FinchVideo.Videos.VIDEO,null,"String_Node_Str" + FinchVideo.Videos.TIMESTAMP + "String_Node_Str"+ FLUSH_TIME+ "String_Node_Str",null,null,null,null);
    int c=old.getCount();
    if (old.getCount() > 0) {
      StringBuffer sb=new StringBuffer();
      boolean next;
      if (old.moveToNext()) {
        do {
          String ID=old.getString(FinchVideo.ID_COLUMN);
          sb.append(BaseColumns._ID);
          sb.append("String_Node_Str");
          sb.append(ID);
          mFinchVideoProvider.deleteFile(ID);
          next=old.moveToNext();
          if (next) {
            sb.append("String_Node_Str");
          }
        }
 while (next);
      }
      String where=sb.toString();
      db.delete(FinchVideo.Videos.VIDEO,where,null);
      Log.d(Finch.LOG_TAG,"String_Node_Str" + c);
    }
  }
  finally {
    if (old != null) {
      old.close();
    }
  }
}

Fixed version (ground truth):
private void deleteOld(){
  Cursor old=null;
  try {
    SQLiteDatabase db=mFinchVideoProvider.getDatabase();
    old=db.query(FinchVideo.Videos.VIDEO,null,"String_Node_Str" + FinchVideo.Videos.TIMESTAMP + "String_Node_Str"+ FLUSH_TIME+ "String_Node_Str",null,null,null,null);
    int c=old.getCount();
    if (old.getCount() > 0) {
      StringBuilder sb=new StringBuilder();
      boolean next;
      if (old.moveToNext()) {
        do {
          String ID=old.getString(FinchVideo.ID_COLUMN);
          sb.append(BaseColumns._ID);
          sb.append("String_Node_Str");
          sb.append(ID);
          mFinchVideoProvider.deleteFile(ID);
          next=old.moveToNext();
          if (next) {
            sb.append("String_Node_Str");
          }
        }
 while (next);
      }
      String where=sb.toString();
      db.delete(FinchVideo.Videos.VIDEO,where,null);
      Log.d(Finch.LOG_TAG,"String_Node_Str" + c);
    }
  }
  finally {
    if (old != null) {
      old.close();
    }
  }
}
Program: 151395
Project: 151395
Buggy source:
@Override public boolean onCreate(){
  init();
  return true;
}

Fixed version (ground truth):
@Override public boolean onCreate(){
  mOpenDbHelper=new SimpleVideoDbHelper(getContext());
  return true;
}
Program: 151396
Project: 151396
Buggy source:
private SimpleVideoDbHelper(Context context,String name,SQLiteDatabase.CursorFactory factory){
  super(context,name,factory,DATABASE_VERSION);
}

Fixed version (ground truth):
SimpleVideoDbHelper(Context context){
  super(context,DATABASE_NAME,null,DATABASE_VERSION);
}
Program: 151397
Project: 151397
Buggy source:
@Override public Cursor query(Uri uri,String[] projection,String where,String[] whereArgs,String sortOrder){
  String orderBy;
  if (TextUtils.isEmpty(sortOrder)) {
    orderBy=FinchVideo.SimpleVideos.DEFAULT_SORT_ORDER;
  }
 else {
    orderBy=sortOrder;
  }
  int match=sUriMatcher.match(uri);
  Cursor c;
switch (match) {
case VIDEOS:
    c=mDb.query(VIDEO_TABLE_NAME,projection,where,whereArgs,null,null,sortOrder);
  c.setNotificationUri(getContext().getContentResolver(),FinchVideo.SimpleVideos.CONTENT_URI);
break;
case VIDEO_ID:
long videoID=ContentUris.parseId(uri);
c=mDb.query(VIDEO_TABLE_NAME,projection,BaseColumns._ID + "String_Node_Str" + videoID+ (!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs,null,null,sortOrder);
c.setNotificationUri(getContext().getContentResolver(),FinchVideo.SimpleVideos.CONTENT_URI);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
return c;
}

Fixed version (ground truth):
@Override public Cursor query(Uri uri,String[] projection,String where,String[] whereArgs,String sortOrder){
  String orderBy;
  if (TextUtils.isEmpty(sortOrder)) {
    orderBy=FinchVideo.SimpleVideos.DEFAULT_SORT_ORDER;
  }
 else {
    orderBy=sortOrder;
  }
  int match=sUriMatcher.match(uri);
  Cursor c;
switch (match) {
case VIDEOS:
    c=getDb().query(VIDEO_TABLE_NAME,projection,where,whereArgs,null,null,orderBy);
  c.setNotificationUri(getContext().getContentResolver(),FinchVideo.SimpleVideos.CONTENT_URI);
break;
case VIDEO_ID:
long videoID=ContentUris.parseId(uri);
c=getDb().query(VIDEO_TABLE_NAME,projection,BaseColumns._ID + "String_Node_Str" + videoID+ (!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs,null,null,orderBy);
c.setNotificationUri(getContext().getContentResolver(),FinchVideo.SimpleVideos.CONTENT_URI);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
return c;
}
Program: 151398
Project: 151398
Buggy source:
@Override public int update(Uri uri,ContentValues values,String where,String[] whereArgs){
  SQLiteDatabase db=mOpenDbHelper.getWritableDatabase();
  int affected;
switch (sUriMatcher.match(uri)) {
case VIDEOS:
    affected=db.update(VIDEO_TABLE_NAME,values,where,whereArgs);
  break;
case VIDEO_ID:
String videoId=uri.getPathSegments().get(1);
affected=db.update(VIDEO_TABLE_NAME,values,BaseColumns._ID + "String_Node_Str" + videoId+ (!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
getContext().getContentResolver().notifyChange(uri,null);
return affected;
}

Fixed version (ground truth):
@Override public int update(Uri uri,ContentValues values,String where,String[] whereArgs){
  int affected;
switch (sUriMatcher.match(uri)) {
case VIDEOS:
    affected=getDb().update(VIDEO_TABLE_NAME,values,where,whereArgs);
  break;
case VIDEO_ID:
String videoId=uri.getPathSegments().get(1);
affected=getDb().update(VIDEO_TABLE_NAME,values,BaseColumns._ID + "String_Node_Str" + videoId+ (!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
getContext().getContentResolver().notifyChange(uri,null);
return affected;
}
Program: 151399
Project: 151399
Buggy source:
private void verifyValues(ContentValues values){
  if (!values.containsKey(FinchVideo.SimpleVideos.TITLE_NAME)) {
    Resources r=Resources.getSystem();
    values.put(FinchVideo.SimpleVideos.URI_NAME,r.getString(android.R.string.untitled));
  }
  if (!values.containsKey(FinchVideo.SimpleVideos.DESCRIPTION_NAME)) {
    values.put(FinchVideo.SimpleVideos.URI_NAME,"String_Node_Str");
  }
  if (!values.containsKey(FinchVideo.SimpleVideos.URI_NAME)) {
    values.put(FinchVideo.SimpleVideos.URI_NAME,"String_Node_Str");
  }
}

Fixed version (ground truth):
private void verifyValues(ContentValues values){
  if (!values.containsKey(FinchVideo.SimpleVideos.TITLE_NAME)) {
    Resources r=Resources.getSystem();
    values.put(FinchVideo.SimpleVideos.TITLE_NAME,r.getString(android.R.string.untitled));
  }
  if (!values.containsKey(FinchVideo.SimpleVideos.DESCRIPTION_NAME)) {
    values.put(FinchVideo.SimpleVideos.DESCRIPTION_NAME,"String_Node_Str");
  }
  if (!values.containsKey(FinchVideo.SimpleVideos.URI_NAME)) {
    values.put(FinchVideo.SimpleVideos.URI_NAME,"String_Node_Str");
  }
}
Program: 151400
Project: 151400
Buggy source:
@Override public int delete(Uri uri,String where,String[] whereArgs){
  int match=sUriMatcher.match(uri);
  int affected;
switch (match) {
case VIDEOS:
    affected=mDb.delete(VIDEO_TABLE_NAME,(!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs);
  break;
case VIDEO_ID:
long videoId=ContentUris.parseId(uri);
affected=mDb.delete(VIDEO_TABLE_NAME,BaseColumns._ID + "String_Node_Str" + videoId+ (!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs);
getContext().getContentResolver().notifyChange(uri,null);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
return affected;
}

Fixed version (ground truth):
@Override public int delete(Uri uri,String where,String[] whereArgs){
  int match=sUriMatcher.match(uri);
  int affected;
switch (match) {
case VIDEOS:
    affected=getDb().delete(VIDEO_TABLE_NAME,(!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs);
  break;
case VIDEO_ID:
long videoId=ContentUris.parseId(uri);
affected=getDb().delete(VIDEO_TABLE_NAME,BaseColumns._ID + "String_Node_Str" + videoId+ (!TextUtils.isEmpty(where) ? "String_Node_Str" + where + ')' : "String_Node_Str"),whereArgs);
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
getContext().getContentResolver().notifyChange(uri,null);
return affected;
}
Program: 151401
Project: 151401
Buggy source:
@Override public <E>Resource<E> create(E underlyingResource){
  return create(Resource.class,underlyingResource);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public <E>Resource<E> create(E underlyingResource){
  return create(Resource.class,underlyingResource);
}
Program: 151402
Project: 151402
Buggy source:
private Imported<ResourceGenerator> getGenerators(){
  if (generators == null)   generators=SimpleContainer.getServices(getClass().getClassLoader(),ResourceGenerator.class);
  return generators;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private Iterable<ResourceGenerator> getGenerators(){
  if (getAddonRegistry().getVersion() != version) {
    version=getAddonRegistry().getVersion();
    generators.clear();
    for (    ResourceGenerator generator : getAddonRegistry().getServices(ResourceGenerator.class)) {
      generators.add(generator);
    }
  }
  return generators;
}
Program: 151403
Project: 151403
Buggy source:
private UICommand createAnnotatedCommand(Method method){
  Imported<?> service=registry.getServices(method.getDeclaringClass());
  if (service.isUnsatisfied()) {
    logger.log(Level.SEVERE,"String_Node_Str" + method.getDeclaringClass() + "String_Node_Str");
    return null;
  }
  Object instance=service.get();
  Command ann=method.getAnnotation(Command.class);
  List<Predicate<UIContext>> enabledPredicates=new ArrayList<>();
  for (  Class<? extends Predicate<UIContext>> type : ann.enabled()) {
    enabledPredicates.add(registry.getServices(type).get());
  }
  return new AnnotationCommandAdapter(method,instance,factory,enabledPredicates);
}

Fixed version (ground truth):
private UICommand createAnnotatedCommand(Method method){
  Imported<?> service=registry.getServices(method.getDeclaringClass());
  if (service.isUnsatisfied()) {
    logger.log(Level.FINE,"String_Node_Str" + method.getDeclaringClass() + "String_Node_Str");
    return null;
  }
  Object instance=service.get();
  Command ann=method.getAnnotation(Command.class);
  List<Predicate<UIContext>> enabledPredicates=new ArrayList<>();
  for (  Class<? extends Predicate<UIContext>> type : ann.enabled()) {
    enabledPredicates.add(registry.getServices(type).get());
  }
  return new AnnotationCommandAdapter(method,instance,factory,enabledPredicates);
}
Program: 151404
Project: 151404
Buggy source:
@Override public void associate(final Project project,final Resource<?> parentResource){
  if (canAssociate(project,parentResource)) {
    Project parent=projectFactory.findProject(parentResource);
    MavenFacet parentMavenFacet=parent.getFacet(MavenFacet.class);
    Model parentPom=parentMavenFacet.getModel();
    if (parentPom.getPackaging().equalsIgnoreCase("String_Node_Str")) {
      String moduleDir=project.getRoot().getFullyQualifiedName().substring(parent.getRoot().getFullyQualifiedName().length());
      if (moduleDir.startsWith(File.separator))       moduleDir=moduleDir.substring(1);
      parentPom.addModule(moduleDir);
      parentMavenFacet.setModel(parentPom);
      MavenFacet projectMavenFacet=project.getFacet(MavenFacet.class);
      Model pom=projectMavenFacet.getModel();
      Parent projectParent=new Parent();
      projectParent.setGroupId(parentPom.getGroupId());
      projectParent.setArtifactId(parentPom.getArtifactId());
      String version=resolveVersion(parentPom);
      projectParent.setVersion(version);
      Path parentPomPath=Paths.get(parentMavenFacet.getModelResource().getFullyQualifiedName());
      Path childPath=Paths.get(project.getRoot().getFullyQualifiedName());
      Path relativePath=childPath.relativize(parentPomPath).normalize();
      projectParent.setRelativePath(relativePath.toString());
      pom.setGroupId(null);
      pom.setVersion(null);
      pom.setParent(projectParent);
      projectMavenFacet.setModel(pom);
    }
  }
}

Fixed version (ground truth):
@Override public void associate(final Project project,final Resource<?> parentResource){
  if (canAssociate(project,parentResource)) {
    Project parent=projectFactory.findProject(parentResource);
    MavenFacet parentMavenFacet=parent.getFacet(MavenFacet.class);
    Model parentPom=parentMavenFacet.getModel();
    if (parentPom.getPackaging().equalsIgnoreCase("String_Node_Str")) {
      String moduleDir=project.getRoot().getFullyQualifiedName().substring(parent.getRoot().getFullyQualifiedName().length());
      if (moduleDir.startsWith(File.separator))       moduleDir=moduleDir.substring(1);
      parentPom.addModule(moduleDir);
      parentMavenFacet.setModel(parentPom);
      MavenFacet projectMavenFacet=project.getFacet(MavenFacet.class);
      Model pom=projectMavenFacet.getModel();
      Parent projectParent=new Parent();
      String groupId=parentPom.getGroupId();
      if (groupId == null) {
        groupId=parentPom.getParent().getGroupId();
      }
      projectParent.setGroupId(groupId);
      projectParent.setArtifactId(parentPom.getArtifactId());
      String version=resolveVersion(parentPom);
      projectParent.setVersion(version);
      Path parentPomPath=Paths.get(parentMavenFacet.getModelResource().getFullyQualifiedName());
      Path childPath=Paths.get(project.getRoot().getFullyQualifiedName());
      Path relativePath=childPath.relativize(parentPomPath).normalize();
      projectParent.setRelativePath(relativePath.toString());
      pom.setGroupId(null);
      pom.setVersion(null);
      pom.setParent(projectParent);
      projectMavenFacet.setModel(pom);
    }
  }
}
Program: 151405
Project: 151405
Buggy source:
@Deployment @AddonDeployments({@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str")}) public static AddonArchive getDeployment(){
  AddonArchive archive=ShrinkWrap.create(AddonArchive.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @AddonDependencies public static AddonArchive getDeployment(){
  return ShrinkWrap.create(AddonArchive.class).addBeansXML();
}
Program: 151406
Project: 151406
Buggy source:
@Test public void testCreateNestedProject() throws Exception {
  DirectoryResource addonDir=factory.create(forge.getRepositories().get(0).getRootDirectory()).reify(DirectoryResource.class);
  DirectoryResource projectDir=addonDir.createTempResource();
  Project parentProject=projectFactory.createProject(projectDir,locator);
  Assert.assertNotNull(parentProject);
  parentProject.getFacet(PackagingFacet.class).setPackagingType("String_Node_Str");
  MetadataFacet metadata=parentProject.getFacet(MetadataFacet.class);
  metadata.setProjectName("String_Node_Str");
  metadata.setProjectGroupName("String_Node_Str");
  DirectoryResource subProjectDir=parentProject.getRoot().reify(DirectoryResource.class).getChildDirectory("String_Node_Str");
  projectFactory.createProject(subProjectDir,locator);
  MavenFacet mavenFacet=parentProject.getFacet(MavenFacet.class);
  List<String> modules=mavenFacet.getModel().getModules();
  Assert.assertFalse(modules.isEmpty());
  Assert.assertEquals("String_Node_Str",modules.get(0));
}

Fixed version (ground truth):
@Test public void testCreateNestedProject() throws Exception {
  Project parentProject=projectFactory.createTempProject(buildSystem);
  Assert.assertNotNull(parentProject);
  parentProject.getFacet(PackagingFacet.class).setPackagingType("String_Node_Str");
  MetadataFacet metadata=parentProject.getFacet(MetadataFacet.class);
  metadata.setProjectName("String_Node_Str");
  metadata.setProjectGroupName("String_Node_Str");
  DirectoryResource subProjectDir=parentProject.getRoot().reify(DirectoryResource.class).getChildDirectory("String_Node_Str");
  projectFactory.createProject(subProjectDir,buildSystem);
  MavenFacet mavenFacet=parentProject.getFacet(MavenFacet.class);
  List<String> modules=mavenFacet.getModel().getModules();
  Assert.assertFalse(modules.isEmpty());
  Assert.assertEquals("String_Node_Str",modules.get(0));
}
Program: 151408
Project: 151408
Buggy source:
@Deployment @AddonDeployments({@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  return ShrinkWrap.create(ForgeArchive.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
}

Fixed version (ground truth):
@Deployment @AddonDeployments({@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str")}) public static AddonArchive getDeployment(){
  return ShrinkWrap.create(AddonArchive.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
}
Program: 151409
Project: 151409
Buggy source:
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addClass(ManagedObject.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @AddonDeployments({@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str")}) public static AddonArchive getDeployment(){
  AddonArchive archive=ShrinkWrap.create(AddonArchive.class).addClass(ManagedObject.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}
Program: 151410
Project: 151410
Buggy source:
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClass(ValidationCommand.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @AddonDeployments({@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str")}) public static AddonArchive getDeployment(){
  AddonArchive archive=ShrinkWrap.create(AddonArchive.class).addBeansXML().addClass(ValidationCommand.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}
Program: 151411
Project: 151411
Buggy source:
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @AddonDeployments({@AddonDeployment(name="String_Node_Str"),@AddonDeployment(name="String_Node_Str")}) public static AddonArchive getDeployment(){
  AddonArchive archive=ShrinkWrap.create(AddonArchive.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}
Program: 151412
Project: 151412
Buggy source:
@Override public boolean hasArchetypeCatalogFactories(){
  return factories.size() > 0 && !services.isUnsatisfied();
}

Fixed version (ground truth):
@Override public boolean hasArchetypeCatalogFactories(){
  return factories.size() > 0 || !services.isUnsatisfied();
}
Program: 151413
Project: 151413
Buggy source:
/** 
 * Registers the   {@link ArchetypeCatalogFactory} objects from the user{@link Configuration}
 */
@PostConstruct void initializeDefaultFactories(){
  Iterator<?> keys=archetypeConfiguration.getKeys();
  while (keys.hasNext()) {
    String name=keys.next().toString();
    if (!name.isEmpty()) {
      String url=archetypeConfiguration.getString(name);
      try {
        addArchetypeCatalogFactory(name,new URL(url));
      }
 catch (      MalformedURLException e) {
        log.log(Level.SEVERE,"String_Node_Str" + name,e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Registers the   {@link ArchetypeCatalogFactory} objects from the user {@link Configuration}
 */
@PostConstruct void initializeDefaultFactories(){
  Iterator<?> keys=archetypeConfiguration.getKeys();
  while (keys.hasNext()) {
    String name=keys.next().toString();
    if (!name.isEmpty()) {
      String url=archetypeConfiguration.getString(name);
      try {
        addArchetypeCatalogFactory(name,new URL(url));
      }
 catch (      MalformedURLException e) {
        log.log(Level.SEVERE,"String_Node_Str" + name,e);
      }
    }
  }
}
Program: 151414
Project: 151414
Buggy source:
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  return ShrinkWrap.create(ForgeArchive.class).addClass(ProjectHelper.class).addBeansXML.addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
}

Fixed version (ground truth):
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  return ShrinkWrap.create(ForgeArchive.class).addClass(ProjectHelper.class).addBeansXML().addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
}
Program: 151415
Project: 151415
Buggy source:
@Override public Result execute(UIExecutionContext context) throws Exception {
  List<Object> args=new ArrayList<>();
  int idx=0;
  for (  Class<?> type : method.getParameterTypes()) {
    Object value=null;
    if (ReservedParameters.isReservedParameter(type)) {
      value=ReservedParameters.getReservedParameter(context,type);
    }
 else {
      Option option=null;
      for (      Annotation annotation : method.getParameterAnnotations()[idx]) {
        if (annotation instanceof Option) {
          option=(Option)annotation;
        }
      }
      if (option != null) {
        value=InputComponents.getValueFor(inputs.get(idx));
        idx++;
      }
    }
    args.add(value);
  }
  Object result=null;
  try {
    result=method.invoke(instance,args.toArray(new Object[args.size()]));
  }
 catch (  InvocationTargetException ie) {
    throw (Exception)ie.getCause();
  }
  if (result == null) {
    return Results.success();
  }
 else   if (result instanceof Result) {
    return (Result)result;
  }
 else {
    return Results.success(result.toString());
  }
}

Fixed version (ground truth):
@Override public Result execute(UIExecutionContext context) throws Exception {
  List<Object> args=new ArrayList<>();
  int idx=0;
  for (  Class<?> type : method.getParameterTypes()) {
    Object value=null;
    if (ReservedParameters.isReservedParameter(type)) {
      value=ReservedParameters.getReservedParameter(context,type);
    }
 else {
      Option option=null;
      for (      Annotation annotation : method.getParameterAnnotations()[args.size()]) {
        if (annotation instanceof Option) {
          option=(Option)annotation;
        }
      }
      if (option != null) {
        value=InputComponents.getValueFor(inputs.get(idx));
        idx++;
      }
    }
    args.add(value);
  }
  Object result=null;
  try {
    result=method.invoke(instance,args.toArray(new Object[args.size()]));
  }
 catch (  InvocationTargetException ie) {
    throw (Exception)ie.getCause();
  }
  if (result == null) {
    return Results.success();
  }
 else   if (result instanceof Result) {
    return (Result)result;
  }
 else {
    return Results.success(result.toString());
  }
}
Program: 151416
Project: 151416
Buggy source:
@SuppressWarnings("String_Node_Str") public void setupSelectComponent(SelectComponent selectComponent){
  Class<?> valueType=selectComponent.getValueType();
  Iterable<?> choices=null;
  if (valueType.isEnum()) {
    Class<? extends Enum> enumClass=valueType.asSubclass(Enum.class);
    choices=EnumSet.allOf(enumClass);
  }
 else   if (Boolean.class == valueType) {
    choices=Arrays.asList(Boolean.TRUE,Boolean.FALSE);
  }
 else {
    choices=addonRegistry.getServices(valueType);
  }
  selectComponent.setValueChoices(choices);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void setupSelectComponent(SelectComponent selectComponent){
  Class<?> valueType=selectComponent.getValueType();
  Iterable<?> choices=null;
  if (valueType.isEnum()) {
    Class<? extends Enum> enumClass=valueType.asSubclass(Enum.class);
    choices=EnumSet.allOf(enumClass);
  }
 else   if (Boolean.class == valueType || boolean.class == valueType) {
    choices=Arrays.asList(Boolean.TRUE,Boolean.FALSE);
  }
 else {
    choices=addonRegistry.getServices(valueType);
  }
  selectComponent.setValueChoices(choices);
}