nus-yam/ex-repair huggingface dataset:
Program: 151323
Project: 151323
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userSetGroup(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionManager manager=PermissionsEx.getPermissionManager();
  PermissionUser user=manager.getUser(this.autoCompletePlayerName(args.get("String_Node_Str")));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  String groupName=args.get("String_Node_Str");
  PermissionGroup[] groups;
  if (groupName.contains("String_Node_Str")) {
    String[] groupsNames=groupName.split("String_Node_Str");
    groups=new PermissionGroup[groupsNames.length];
    for (int i=0; i < groupsNames.length; i++) {
      groups[i]=manager.getGroup(groupsNames[i]);
    }
  }
 else {
    groupName=this.autoCompleteGroupName(groupName);
    groups=new PermissionGroup[]{manager.getGroup(groupName)};
  }
  user.setGroups(groups);
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str");
  this.informPlayer(plugin,user.getName(),"String_Node_Str" + groupName + "String_Node_Str");
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userSetGroup(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionManager manager=PermissionsEx.getPermissionManager();
  PermissionUser user=manager.getUser(this.autoCompletePlayerName(args.get("String_Node_Str")));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  String groupName=args.get("String_Node_Str");
  PermissionGroup[] groups;
  if (groupName.contains("String_Node_Str")) {
    String[] groupsNames=groupName.split("String_Node_Str");
    groups=new PermissionGroup[groupsNames.length];
    for (int i=0; i < groupsNames.length; i++) {
      groups[i]=manager.getGroup(this.autoCompleteGroupName(groupsNames[i]));
    }
  }
 else {
    groupName=this.autoCompleteGroupName(groupName);
    groups=new PermissionGroup[]{manager.getGroup(groupName)};
  }
  user.setGroups(groups);
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str");
  this.informPlayer(plugin,user.getName(),"String_Node_Str" + groupName + "String_Node_Str");
}
Program: 151324
Project: 151324
Buggy source:
@Override public void setOption(String option,String world,String value){
  if (option == null || option.isEmpty()) {
    return;
  }
  Boolean newOption=true;
  if (this.commonOptions == null) {
    this.fetchPermissions();
  }
  if (world != null && !world.isEmpty() && worldsOptions.get(world) != null && worldsOptions.get(world).containsKey(option)) {
    newOption=false;
  }
  if (newOption && this.commonOptions.containsKey(option)) {
    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.getName(),option,value,world,this.type.ordinal());
  }
 else {
    this.db.updateQuery("String_Node_Str",value,this.getName(),this.type.ordinal(),option);
  }
  if (this.isVirtual()) {
    this.save();
  }
  this.fetchPermissions();
}

Fixed version (ground truth):
@Override public void setOption(String option,String world,String value){
  if (option == null || option.isEmpty()) {
    return;
  }
  if (world == null) {
    world="String_Node_Str";
  }
  if (value == null || value.isEmpty()) {
    this.db.updateQuery("String_Node_Str",this.getName(),option,this.type.ordinal(),world);
    return;
  }
  Boolean newOption=true;
  if (this.commonOptions == null) {
    this.fetchPermissions();
  }
  if (!world.isEmpty() && worldsOptions.containsKey(world) && worldsOptions.get(world).containsKey(option)) {
    newOption=false;
  }
 else   if (world.isEmpty() && commonOptions.containsKey(option)) {
    newOption=false;
  }
  if (newOption) {
    this.db.updateQuery("String_Node_Str",this.getName(),option,value,world,this.type.ordinal());
  }
 else {
    this.db.updateQuery("String_Node_Str",value,this.getName(),this.type.ordinal(),option);
  }
  if (this.isVirtual()) {
    this.save();
  }
  this.fetchPermissions();
}
Program: 151325
Project: 151325
Buggy source:
public void setProperty(String path,Object value){
  if (value instanceof ConfigurationNode) {
    value=((ConfigurationNode)value).getRoot();
  }
  super.setProperty(path,value);
}

Fixed version (ground truth):
@Override public void setProperty(String path,Object value){
  if (value instanceof ConfigurationNode) {
    value=((ConfigurationNode)value).getRoot();
  }
  super.setProperty(path,value);
}
Program: 151326
Project: 151326
Buggy source:
public FileEntity(String playerName,PermissionManager manager,FileBackend backend,String baseNode){
  super(playerName,manager);
  this.backend=backend;
  this.baseNode=baseNode + "String_Node_Str";
  this.node=backend.permissions.getNode(baseNode + this.getName());
  if (node == null) {
    node=new ConfigurationNode();
    this.virtual=true;
  }
  this.prefix=this.node.getString("String_Node_Str");
  if (this.prefix == null) {
    this.prefix="String_Node_Str";
  }
  this.suffix=this.node.getString("String_Node_Str");
  if (this.suffix == null) {
    this.suffix="String_Node_Str";
  }
}

Fixed version (ground truth):
public FileEntity(String entityName,PermissionManager manager,FileBackend backend,String baseNode){
  super(entityName,manager);
  this.backend=backend;
  this.baseNode=baseNode + "String_Node_Str" + entityName;
  this.node=backend.permissions.getNode(this.baseNode);
  if (node == null) {
    node=new ConfigurationNode();
    this.virtual=true;
  }
  this.prefix=this.node.getString("String_Node_Str");
  if (this.prefix == null) {
    this.prefix="String_Node_Str";
  }
  this.suffix=this.node.getString("String_Node_Str");
  if (this.suffix == null) {
    this.suffix="String_Node_Str";
  }
}
Program: 151327
Project: 151327
Buggy source:
@Override public void save(){
  this.backend.permissions.setProperty(baseNode + this.getName(),node);
  this.backend.permissions.save();
}

Fixed version (ground truth):
@Override public void save(){
  this.backend.permissions.setProperty(baseNode,node);
  this.backend.permissions.save();
}
Program: 151328
Project: 151328
Buggy source:
@Override public void remove(){
  this.node.getRoot().clear();
  this.prefix="String_Node_Str";
  this.suffix="String_Node_Str";
  this.backend.permissions.removeProperty(baseNode + this.getName());
  this.backend.permissions.save();
}

Fixed version (ground truth):
@Override public void remove(){
  this.node.getRoot().clear();
  this.prefix="String_Node_Str";
  this.suffix="String_Node_Str";
  this.backend.permissions.removeProperty(baseNode);
  this.backend.permissions.save();
}
Program: 151329
Project: 151329
Buggy source:
public PermissionGroup[] getParentGroups(){
  Set<PermissionGroup> parentGroups=new HashSet<PermissionGroup>();
  for (  String parentGroup : this.getParentGroupsNamesImpl()) {
    parentGroup=parentGroup.trim();
    if (parentGroup.isEmpty()) {
      continue;
    }
    PermissionGroup group=this.manager.getGroup(parentGroup);
    if (!group.isChildOf(this.getName(),true)) {
      parentGroups.add(group);
    }
  }
  return parentGroups.toArray(new PermissionGroup[]{});
}

Fixed version (ground truth):
public PermissionGroup[] getParentGroups(){
  Set<PermissionGroup> parentGroups=new HashSet<PermissionGroup>();
  for (  String parentGroup : this.getParentGroupsNamesImpl()) {
    parentGroup=parentGroup.trim();
    if (parentGroup.isEmpty()) {
      continue;
    }
    if (parentGroup.equals(this.getName())) {
      continue;
    }
    PermissionGroup group=this.manager.getGroup(parentGroup);
    if (!group.isChildOf(this,true)) {
      parentGroups.add(group);
    }
  }
  return parentGroups.toArray(new PermissionGroup[0]);
}
Program: 151330
Project: 151330
Buggy source:
public String[] getPermissions(String world){
  List<String> permissions=new LinkedList<String>();
  if (commonPermissions == null) {
    this.fetchPermissions();
  }
  if (world != null && !world.isEmpty() && this.worldsPermissions != null) {
    List<String> worldPermissions=this.worldsPermissions.get(world);
    if (worldPermissions != null) {
      permissions.addAll(worldPermissions);
    }
  }
 else {
    permissions.addAll(commonPermissions);
  }
  return permissions.toArray(new String[0]);
}

Fixed version (ground truth):
public String[] getPermissions(String world){
  List<String> permissions=new LinkedList<String>();
  if (commonPermissions == null) {
    this.fetchPermissions();
  }
  if (world != null && !world.isEmpty() && this.worldsPermissions != null) {
    List<String> worldPermissions=this.worldsPermissions.get(world);
    if (worldPermissions != null) {
      permissions.addAll(worldPermissions);
    }
  }
 else {
    permissions=commonPermissions;
  }
  return permissions.toArray(new String[0]);
}
Program: 151331
Project: 151331
Buggy source:
protected String autoCompletePlayerName(String playerName){
  if (playerName == null) {
    return null;
  }
  List<String> players=new LinkedList<String>();
  playerName=playerName.toLowerCase();
  for (  Player player : Bukkit.getServer().getOnlinePlayers()) {
    if (player.getName().equalsIgnoreCase(playerName)) {
      return player.getName();
    }
    if (player.getName().toLowerCase().startsWith(playerName) && !players.contains(player.getName())) {
      players.add(player.getName());
    }
  }
  for (  PermissionUser user : PermissionsEx.getPermissionManager().getUsers()) {
    if (user.getName().equalsIgnoreCase(playerName)) {
      return user.getName();
    }
    if (user.getName().toLowerCase().startsWith(playerName.toLowerCase()) && !players.contains(user.getName())) {
      players.add(user.getName());
    }
  }
  if (players.size() > 1) {
    throw new AutoCompleteChoicesException(players.toArray(new String[0]),"String_Node_Str");
  }
 else   if (players.size() == 1) {
    return players.get(0);
  }
 else {
    return playerName;
  }
}

Fixed version (ground truth):
protected String autoCompletePlayerName(String playerName){
  if (playerName == null) {
    return null;
  }
  List<String> players=new LinkedList<String>();
  for (  Player player : Bukkit.getServer().getOnlinePlayers()) {
    if (player.getName().equalsIgnoreCase(playerName)) {
      return player.getName();
    }
    if (player.getName().toLowerCase().startsWith(playerName.toLowerCase()) && !players.contains(player.getName())) {
      players.add(player.getName());
    }
  }
  for (  PermissionUser user : PermissionsEx.getPermissionManager().getUsers()) {
    if (user.getName().equalsIgnoreCase(playerName)) {
      return user.getName();
    }
    if (user.getName().toLowerCase().startsWith(playerName.toLowerCase()) && !players.contains(user.getName())) {
      players.add(user.getName());
    }
  }
  if (players.size() > 1) {
    throw new AutoCompleteChoicesException(players.toArray(new String[0]),"String_Node_Str");
  }
 else   if (players.size() == 1) {
    return players.get(0);
  }
 else {
    return playerName;
  }
}
Program: 151332
Project: 151332
Buggy source:
public FileEntity(String playerName,PermissionManager manager,FileBackend backend,ConfigurationNode node){
  super(playerName,manager);
  this.backend=backend;
  if (node == null) {
    node=new ConfigurationNode();
    this.virtual=true;
  }
  this.node=node;
  this.prefix=this.node.getString("String_Node_Str");
  if (this.prefix == null) {
    this.prefix="String_Node_Str";
  }
  this.suffix=this.node.getString("String_Node_Str");
  if (this.suffix == null) {
    this.suffix="String_Node_Str";
  }
}

Fixed version (ground truth):
public FileEntity(String playerName,PermissionManager manager,FileBackend backend,String baseNode){
  super(playerName,manager);
  this.backend=backend;
  this.baseNode=baseNode + "String_Node_Str";
  this.node=backend.permissions.getNode(baseNode + this.getName());
  if (node == null) {
    node=new ConfigurationNode();
    this.virtual=true;
  }
  this.prefix=this.node.getString("String_Node_Str");
  if (this.prefix == null) {
    this.prefix="String_Node_Str";
  }
  this.suffix=this.node.getString("String_Node_Str");
  if (this.suffix == null) {
    this.suffix="String_Node_Str";
  }
}
Program: 151333
Project: 151333
Buggy source:
@Override public void save(){
  this.backend.permissions.setProperty("String_Node_Str" + this.getName(),node);
  this.backend.permissions.save();
}

Fixed version (ground truth):
@Override public void save(){
  this.backend.permissions.setProperty(baseNode + this.getName(),node);
  this.backend.permissions.save();
}
Program: 151334
Project: 151334
Buggy source:
@Override public void remove(){
  this.node.getRoot().clear();
  this.prefix="String_Node_Str";
  this.suffix="String_Node_Str";
  this.backend.permissions.removeProperty("String_Node_Str" + this.getName());
  this.backend.permissions.save();
}

Fixed version (ground truth):
@Override public void remove(){
  this.node.getRoot().clear();
  this.prefix="String_Node_Str";
  this.suffix="String_Node_Str";
  this.backend.permissions.removeProperty(baseNode + this.getName());
  this.backend.permissions.save();
}
Program: 151335
Project: 151335
Buggy source:
public FileGroup(String name,PermissionManager manager,FileBackend backend){
  super(new FileEntity(name,manager,backend,backend.permissions.getNode("String_Node_Str" + name)));
  this.node=backend.permissions.getNode("String_Node_Str" + name);
  if (this.node == null) {
    this.node=Configuration.getEmptyNode();
    this.virtual=true;
  }
}

Fixed version (ground truth):
public FileGroup(String name,PermissionManager manager,FileBackend backend){
  super(new FileEntity(name,manager,backend,"String_Node_Str"));
  this.node=((FileEntity)this.backendEntity).getConfigNode();
}
Program: 151336
Project: 151336
Buggy source:
public FileUser(String playerName,PermissionManager manager,FileBackend backend){
  super(new FileEntity(playerName,manager,backend,backend.permissions.getNode("String_Node_Str" + playerName)));
  this.node=backend.permissions.getNode("String_Node_Str" + playerName);
  if (this.node == null) {
    this.node=Configuration.getEmptyNode();
    this.virtual=true;
  }
}

Fixed version (ground truth):
public FileUser(String playerName,PermissionManager manager,FileBackend backend){
  super(new FileEntity(playerName,manager,backend,"String_Node_Str"));
  this.node=((FileEntity)this.backendEntity).getConfigNode();
}
Program: 151337
Project: 151337
Buggy source:
public boolean checkPermissions(Player player){
  String[] permissions=this.getMethodAnnotation().permissions();
  if (permissions.length == 0 && !this.getMethodAnnotation().permission().isEmpty()) {
    permissions=new String[]{this.getMethodAnnotation().permission()};
  }
  PermissionManager manager=PermissionsEx.getPermissionManager();
  boolean lastORValue=false;
  for (int i=0; i < permissions.length; i++) {
    String permission=permissions[i];
    if (isOR(permission)) {
      continue;
    }
    if (permission.contains("String_Node_Str")) {
      String originalPermission=permission.toString();
      for (      Entry<String,String> entry : this.getParams().entrySet()) {
        if (entry.getValue() != null) {
          permission=permission.replace("String_Node_Str" + entry.getKey() + "String_Node_Str",entry.getValue());
        }
      }
      if (permission.equals(originalPermission)) {
        continue;
      }
    }
    if (!manager.has(player,permission)) {
      if (i < permissions.length - 2 && isOR(permissions[i + 1]) && !isOR(permissions[i + 2])) {
        continue;
      }
      if (i > 1 && isOR(permissions[i - 1]) && !isOR(permissions[i - 2]) && lastORValue) {
        continue;
      }
      return false;
    }
 else {
      if (i < permissions.length - 2 && isOR(permissions[i + 1]) && !isOR(permissions[i + 2])) {
        lastORValue=true;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean checkPermissions(Player player){
  String[] permissions=this.getMethodAnnotation().permissions();
  if (permissions.length == 0 && !this.getMethodAnnotation().permission().isEmpty()) {
    permissions=new String[]{this.getMethodAnnotation().permission()};
  }
  PermissionManager manager=PermissionsEx.getPermissionManager();
  boolean lastORValue=false;
  for (int i=0; i < permissions.length; i++) {
    String permission=permissions[i];
    if (isOR(permission)) {
      continue;
    }
    if (permission.contains("String_Node_Str")) {
      String originalPermission=permission.toString();
      for (      Entry<String,String> entry : this.getParams().entrySet()) {
        if (entry.getValue() != null) {
          permission=permission.replace("String_Node_Str" + entry.getKey() + "String_Node_Str",entry.getValue());
        }
      }
      if (permission.equals(originalPermission)) {
        continue;
      }
    }
    if (!manager.has(player,permission)) {
      if (i < permissions.length - 2 && isOR(permissions[i + 1]) && !isOR(permissions[i + 2])) {
        continue;
      }
      if (i > 1 && isOR(permissions[i - 1]) && !isOR(permissions[i - 2]) && lastORValue) {
        lastORValue=false;
        continue;
      }
      return false;
    }
 else {
      if (i < permissions.length - 2 && isOR(permissions[i + 1]) && !isOR(permissions[i + 2])) {
        lastORValue=true;
      }
    }
  }
  return true;
}
Program: 151338
Project: 151338
Buggy source:
public SQLBackend(PermissionManager manager,Configuration config){
  super(manager,config);
  String dbDriver=config.getString("String_Node_Str","String_Node_Str");
  String dbUri=config.getString("String_Node_Str","String_Node_Str");
  String dbUser=config.getString("String_Node_Str","String_Node_Str");
  String dbPassword=config.getString("String_Node_Str","String_Node_Str");
  if (dbUri == null || dbUri.isEmpty()) {
    config.setProperty("String_Node_Str","String_Node_Str");
    config.setProperty("String_Node_Str","String_Node_Str");
    config.setProperty("String_Node_Str","String_Node_Str");
    config.save();
    Logger.getLogger("String_Node_Str").severe("String_Node_Str");
    throw new RuntimeException("String_Node_Str");
  }
  Logger.getLogger("String_Node_Str").info("String_Node_Str" + dbUri + "String_Node_Str");
  sql=new SQLConnectionManager(dbUri,dbUser,dbPassword,dbDriver);
  Logger.getLogger("String_Node_Str").info("String_Node_Str");
  this.deployTables(dbDriver);
}

Fixed version (ground truth):
public SQLBackend(PermissionManager manager,Configuration config){
  super(manager,config);
  String dbDriver=config.getString("String_Node_Str","String_Node_Str");
  String dbUri=config.getString("String_Node_Str","String_Node_Str");
  String dbUser=config.getString("String_Node_Str","String_Node_Str");
  String dbPassword=config.getString("String_Node_Str","String_Node_Str");
  if (dbUri == null || dbUri.isEmpty()) {
    config.setProperty("String_Node_Str","String_Node_Str");
    config.setProperty("String_Node_Str","String_Node_Str");
    config.setProperty("String_Node_Str","String_Node_Str");
    config.save();
    Logger.getLogger("String_Node_Str").severe("String_Node_Str");
    throw new RuntimeException("String_Node_Str");
  }
  sql=new SQLConnectionManager(dbUri,dbUser,dbPassword,dbDriver);
  Logger.getLogger("String_Node_Str").info("String_Node_Str");
  this.deployTables(dbDriver);
}
Program: 151339
Project: 151339
Buggy source:
protected void checkConnection() throws SQLException {
  if (!this.db.isValid(0)) {
    Logger.getLogger("String_Node_Str").warning("String_Node_Str");
    this.connect();
  }
}

Fixed version (ground truth):
protected void checkConnection() throws SQLException {
  if (this.db.getClass().getName().startsWith("String_Node_Str")) {
    return;
  }
  if (!this.db.isValid(0)) {
    Logger.getLogger("String_Node_Str").warning("String_Node_Str");
    this.connect();
  }
}
Program: 151340
Project: 151340
Buggy source:
protected final void connect() throws SQLException {
  if (this.db != null && !this.db.isValid(0)) {
    return;
  }
  db=DriverManager.getConnection("String_Node_Str" + uri,user,password);
}

Fixed version (ground truth):
protected final void connect() throws SQLException {
  Logger.getLogger("String_Node_Str").info("String_Node_Str" + this.uri + "String_Node_Str");
  db=DriverManager.getConnection("String_Node_Str" + uri,user,password);
}
Program: 151341
Project: 151341
Buggy source:
@Override public String[] getPermissions(String world){
  if (this.cachedPermissions == null) {
    List<String> permissions=new LinkedList<String>();
    this.getInheritedPermissions(world,permissions);
    this.cachedPermissions=permissions.toArray(new String[0]);
  }
  return this.cachedPermissions;
}

Fixed version (ground truth):
@Override public String[] getPermissions(String world){
  if (!this.cachedPermissions.containsKey(world)) {
    List<String> permissions=new LinkedList<String>();
    this.getInheritedPermissions(world,permissions);
    this.cachedPermissions.put(world,permissions.toArray(new String[0]));
  }
  return this.cachedPermissions.get(world);
}
Program: 151342
Project: 151342
Buggy source:
protected void clearCache(){
  this.cachedGroups=null;
  this.cachedPermissions=null;
  this.cachedPrefix=null;
  this.cachedSuffix=null;
  this.cachedAnwsers.clear();
}

Fixed version (ground truth):
protected void clearCache(){
  this.cachedGroups=null;
  this.cachedPrefix=null;
  this.cachedSuffix=null;
  this.cachedPermissions.clear();
  this.cachedAnwsers.clear();
}
Program: 151343
Project: 151343
Buggy source:
public FilePermissionGroup(String name,PermissionManager manager,FileBackend backend){
  super(name,manager);
  this.backend=backend;
  this.node=backend.permissions.getNode("String_Node_Str" + name);
  if (this.node == null) {
    this.node=Configuration.getEmptyNode();
    this.virtual=true;
  }
  this.prefix=this.node.getString("String_Node_Str");
  if (this.prefix == null) {
    this.prefix="String_Node_Str";
  }
  this.suffix=this.node.getString("String_Node_Str");
  if (this.suffix == null) {
    this.prefix="String_Node_Str";
  }
}

Fixed version (ground truth):
public FilePermissionGroup(String name,PermissionManager manager,FileBackend backend){
  super(name,manager);
  this.backend=backend;
  this.node=backend.permissions.getNode("String_Node_Str" + name);
  if (this.node == null) {
    this.node=Configuration.getEmptyNode();
    this.virtual=true;
  }
  this.prefix=this.node.getString("String_Node_Str");
  if (this.prefix == null) {
    this.prefix="String_Node_Str";
  }
  this.suffix=this.node.getString("String_Node_Str");
  if (this.suffix == null) {
    this.suffix="String_Node_Str";
  }
}
Program: 151344
Project: 151344
Buggy source:
@Override public void setSuffix(String suffix){
  if (prefix != null && !suffix.isEmpty()) {
    this.node.setProperty("String_Node_Str",suffix);
  }
 else {
    this.node.removeProperty("String_Node_Str");
  }
  this.save();
  super.setSuffix(suffix);
}

Fixed version (ground truth):
@Override public void setSuffix(String suffix){
  if (suffix != null && !suffix.isEmpty()) {
    this.node.setProperty("String_Node_Str",suffix);
  }
 else {
    this.node.removeProperty("String_Node_Str");
  }
  this.save();
  super.setSuffix(suffix);
}
Program: 151345
Project: 151345
Buggy source:
@Override public void setSuffix(String suffix){
  if (prefix != null && !suffix.isEmpty()) {
    this.node.setProperty("String_Node_Str",suffix);
  }
 else {
    this.node.removeProperty("String_Node_Str");
  }
  this.save();
  super.setSuffix(suffix);
}

Fixed version (ground truth):
@Override public void setSuffix(String suffix){
  if (suffix != null && !suffix.isEmpty()) {
    this.node.setProperty("String_Node_Str",suffix);
  }
 else {
    this.node.removeProperty("String_Node_Str");
  }
  this.save();
  super.setSuffix(suffix);
}
Program: 151346
Project: 151346
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void dumpData(Plugin plugin,CommandSender sender,Map<String,String> args){
  if (!(plugin instanceof PermissionsEx)) {
    return;
  }
  try {
    PermissionBackend backend=PermissionBackend.getBackend(args.get("String_Node_Str"),PermissionsEx.getPermissionManager(),((PermissionsEx)plugin).getConfigurationNode(),null);
    File dstFile=new File("String_Node_Str",args.get("String_Node_Str"));
    backend.dumpData(new OutputStreamWriter(new FileOutputStream(dstFile),"String_Node_Str"));
    sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + dstFile.getName()+ "String_Node_Str");
  }
 catch (  RuntimeException e) {
    if (e.getCause() instanceof ClassNotFoundException) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
      logger.severe("String_Node_Str" + e.getCause().getClass().getName() + "String_Node_Str"+ e.getMessage());
    }
  }
catch (  IOException e) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void dumpData(Plugin plugin,CommandSender sender,Map<String,String> args){
  if (!(plugin instanceof PermissionsEx)) {
    return;
  }
  try {
    PermissionBackend backend=PermissionBackend.getBackend(args.get("String_Node_Str"),PermissionsEx.getPermissionManager(),((PermissionsEx)plugin).getConfigurationNode(),null);
    File dstFile=new File("String_Node_Str",args.get("String_Node_Str"));
    FileOutputStream outStream=new FileOutputStream(dstFile);
    backend.dumpData(new OutputStreamWriter(outStream,"String_Node_Str"));
    outStream.close();
    sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + dstFile.getName()+ "String_Node_Str");
  }
 catch (  RuntimeException e) {
    if (e.getCause() instanceof ClassNotFoundException) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
      logger.severe("String_Node_Str" + e.getCause().getClass().getName() + "String_Node_Str"+ e.getMessage());
    }
  }
catch (  IOException e) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
  }
}
Program: 151347
Project: 151347
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void dumpData(Plugin plugin,CommandSender sender,Map<String,String> args){
  if (!(plugin instanceof PermissionsEx)) {
    return;
  }
  try {
    PermissionBackend backend=PermissionBackend.getBackend(args.get("String_Node_Str"),PermissionsEx.getPermissionManager(),((PermissionsEx)plugin).getConfigurationNode(),null);
    File dstFile=new File("String_Node_Str",args.get("String_Node_Str"));
    FileOutputStream outStream=new FileOutputStream(dstFile);
    backend.dumpData(new OutputStreamWriter(outStream,"String_Node_Str"));
    outStream.close();
    sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + dstFile.getName()+ "String_Node_Str");
  }
 catch (  RuntimeException e) {
    if (e.getCause() instanceof ClassNotFoundException) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
      logger.severe("String_Node_Str" + e.getCause().getClass().getName() + "String_Node_Str"+ e.getMessage());
    }
  }
catch (  IOException e) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void dumpData(Plugin plugin,CommandSender sender,Map<String,String> args){
  if (!(plugin instanceof PermissionsEx)) {
    return;
  }
  try {
    PermissionBackend backend=PermissionBackend.getBackend(args.get("String_Node_Str"),PermissionsEx.getPermissionManager(),((PermissionsEx)plugin).getConfigurationNode(),null);
    File dstFile=new File("String_Node_Str",args.get("String_Node_Str"));
    FileOutputStream outStream=new FileOutputStream(dstFile);
    backend.dumpData(new OutputStreamWriter(outStream,"String_Node_Str"));
    outStream.close();
    sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + dstFile.getName()+ "String_Node_Str");
  }
 catch (  RuntimeException e) {
    if (e.getCause() instanceof ClassNotFoundException) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
      logger.severe("String_Node_Str" + e.getMessage());
    }
  }
catch (  IOException e) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + e.getMessage());
  }
}
Program: 151348
Project: 151348
Buggy source:
public boolean has(String permission,String world){
  if (permission != null && permission.isEmpty()) {
    return true;
  }
  String expression=getMatchingExpression(permission,world);
  if (expression != null) {
    return this.explainExpression(expression);
  }
  return false;
}

Fixed version (ground truth):
public boolean has(String permission,String world){
  if (permission != null && permission.isEmpty()) {
    return true;
  }
  String expression=getMatchingExpression(permission,world);
  return this.explainExpression(expression);
}
Program: 151349
Project: 151349
Buggy source:
public static boolean isMatches(String expression,String permission,boolean additionalChecks){
  if (expression.startsWith("String_Node_Str")) {
    expression=expression.substring(1);
  }
  if (!patternCache.containsKey(expression)) {
    patternCache.put(expression,Pattern.compile(prepareRegexp(expression)));
  }
  if (patternCache.get(expression).matcher(permission).matches()) {
    return true;
  }
  if (additionalChecks && expression.endsWith("String_Node_Str") && isMatches(expression.substring(0,expression.length() - 2),permission,false)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isMatches(String expression,String permission,boolean additionalChecks){
  String localExpression=expression;
  if (localExpression.startsWith("String_Node_Str")) {
    localExpression=localExpression.substring(1);
  }
  if (!patternCache.containsKey(localExpression)) {
    patternCache.put(localExpression,Pattern.compile(prepareRegexp(localExpression)));
  }
  if (patternCache.get(localExpression).matcher(permission).matches()) {
    return true;
  }
  if (additionalChecks && localExpression.endsWith("String_Node_Str") && isMatches(localExpression.substring(0,localExpression.length() - 2),permission,false)) {
    return true;
  }
  return false;
}
Program: 151350
Project: 151350
Buggy source:
protected boolean explainExpression(String expression){
  return !expression.substring(0,1).equals("String_Node_Str");
}

Fixed version (ground truth):
protected boolean explainExpression(String expression){
  if (expression == null || expression.isEmpty()) {
    return false;
  }
  return !expression.startsWith("String_Node_Str");
}
Program: 151351
Project: 151351
Buggy source:
@Override public void onEntityTarget(EntityTargetEvent event){
  if (event.getTarget() instanceof Player) {
    Player player=(Player)event.getTarget();
    if (!permissionsManager.has(player,"String_Node_Str" + getEntityName(event.getEntity()))) {
      event.setCancelled(true);
    }
  }
}

Fixed version (ground truth):
@Override public void onEntityTarget(EntityTargetEvent event){
  if (event.getTarget() instanceof Player) {
    Player player=(Player)event.getTarget();
    player.sendMessage("String_Node_Str");
    if (!permissionsManager.has(player,"String_Node_Str" + getEntityName(event.getEntity()))) {
      event.setCancelled(true);
    }
  }
}
Program: 151352
Project: 151352
Buggy source:
@Override public void registerEvents(PluginManager pluginManager,PermissionsEx pex,ConfigurationNode config){
  pluginManager.registerEvent(Event.Type.ENTITY_TARGET,this,Priority.Low,pex);
  pluginManager.registerEvent(Event.Type.ENTITY_INTERACT,this,Priority.Low,pex);
  pluginManager.registerEvent(Event.Type.ENTITY_DAMAGE,this,Priority.Low,pex);
}

Fixed version (ground truth):
@Override public void registerEvents(PluginManager pluginManager,PermissionsEx pex,ConfigurationNode config){
  pluginManager.registerEvent(Event.Type.VEHICLE_COLLISION_ENTITY,this,Priority.Low,pex);
  pluginManager.registerEvent(Event.Type.VEHICLE_ENTER,this,Priority.Low,pex);
  pluginManager.registerEvent(Event.Type.VEHICLE_DAMAGE,this,Priority.Low,pex);
}
Program: 151353
Project: 151353
Buggy source:
public void remove(){
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
  this.virtual=true;
  this.commonOptions.clear();
  this.commonPermissions.clear();
  this.worldsOptions.clear();
  this.worldsPermissions.clear();
}

Fixed version (ground truth):
public void remove(){
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
  this.db.updateQuery("String_Node_Str",this.name,this.type.ordinal());
  this.virtual=true;
  this.commonOptions.clear();
  this.commonPermissions.clear();
  this.worldsOptions.clear();
  this.worldsPermissions.clear();
  this.parents.clear();
}
Program: 151354
Project: 151354
Buggy source:
@Override public void onInventoryOpen(PlayerInventoryEvent event){
  Inventory inventory=event.getPlayer().getInventory();
  for (  ItemStack stack : inventory.getContents()) {
    if (!permissionsManager.has(event.getPlayer(),"String_Node_Str" + stack.getTypeId())) {
      inventory.remove(stack);
      informUser(event.getPlayer(),"String_Node_Str" + stack.getType().name() + "String_Node_Str"+ stack.getAmount()+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void onInventoryOpen(PlayerInventoryEvent event){
  this.checkPlayerInventory(event.getPlayer());
}
Program: 151355
Project: 151355
Buggy source:
@Override public void onItemHeldChange(PlayerItemHeldEvent event){
  Inventory inventory=event.getPlayer().getInventory();
  for (  ItemStack stack : inventory.getContents()) {
    if (!permissionsManager.has(event.getPlayer(),"String_Node_Str" + stack.getTypeId())) {
      inventory.remove(stack);
      informUser(event.getPlayer(),"String_Node_Str" + stack.getType().name() + "String_Node_Str"+ stack.getAmount()+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void onItemHeldChange(PlayerItemHeldEvent event){
  this.checkPlayerInventory(event.getPlayer());
}
Program: 151356
Project: 151356
Buggy source:
public static boolean isMatches(String expression,String permission,boolean additionalChecks){
  if (expression.startsWith("String_Node_Str")) {
    expression=expression.substring(1);
  }
  if (!patternCache.containsKey(expression)) {
    patternCache.put(expression,Pattern.compile(prepareRegexp(expression)));
  }
  if (patternCache.get(expression).matcher(permission).matches()) {
    return true;
  }
  if (additionalChecks && expression.endsWith("String_Node_Str") && isMatches(expression.substring(0,expression.length() - 2),permission,false)) {
    return true;
  }
  if (additionalChecks && !expression.endsWith("String_Node_Str") && isMatches(expression + "String_Node_Str",permission,false)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isMatches(String expression,String permission,boolean additionalChecks){
  if (expression.startsWith("String_Node_Str")) {
    expression=expression.substring(1);
  }
  if (!patternCache.containsKey(expression)) {
    patternCache.put(expression,Pattern.compile(prepareRegexp(expression)));
  }
  if (patternCache.get(expression).matcher(permission).matches()) {
    return true;
  }
  if (additionalChecks && expression.endsWith("String_Node_Str") && isMatches(expression.substring(0,expression.length() - 2),permission,false)) {
    return true;
  }
  return false;
}
Program: 151357
Project: 151357
Buggy source:
protected Configuration loadConfig(String name){
  File configurationFile=new File(getDataFolder(),configFile);
  Configuration configuration;
  if (!configurationFile.exists()) {
    try {
      if (!getDataFolder().exists()) {
        getDataFolder().mkdirs();
      }
      configurationFile.createNewFile();
      configuration=new Configuration(configurationFile);
      configuration.setProperty("String_Node_Str",getDataFolder().getPath());
      configuration.save();
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
 else {
    configuration=new Configuration(configurationFile);
    configuration.load();
  }
  return configuration;
}

Fixed version (ground truth):
protected final Configuration loadConfig(String name){
  File configurationFile=new File(getDataFolder(),configFile);
  Configuration configuration;
  if (!configurationFile.exists()) {
    try {
      if (!getDataFolder().exists()) {
        getDataFolder().mkdirs();
      }
      configurationFile.createNewFile();
      configuration=new Configuration(configurationFile);
      configuration.setProperty("String_Node_Str",getDataFolder().getPath());
      configuration.save();
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
 else {
    configuration=new Configuration(configurationFile);
    configuration.load();
  }
  return configuration;
}
Program: 151358
Project: 151358
Buggy source:
public PermissionsEx(){
  super();
  PermissionBackend.registerBackendAlias("String_Node_Str",SQLBackend.class);
  PermissionBackend.registerBackendAlias("String_Node_Str",FileBackend.class);
  logger.log(Level.INFO,"String_Node_Str");
}

Fixed version (ground truth):
public PermissionsEx(){
  super();
  PermissionBackend.registerBackendAlias("String_Node_Str",SQLBackend.class);
  PermissionBackend.registerBackendAlias("String_Node_Str",FileBackend.class);
  this.config=this.loadConfig(configFile);
  this.commandsManager=new CommandsManager(this);
  this.permissionsManager=new PermissionManager(this.config);
  logger.log(Level.INFO,"String_Node_Str");
}
Program: 151359
Project: 151359
Buggy source:
public abstract void addPermission(String permission,String value,String world);

Fixed version (ground truth):
public abstract void addPermission(String permission,String world);
Program: 151360
Project: 151360
Buggy source:
public abstract String[] getPermissions(String world);

Fixed version (ground truth):
public String[] getPermissions(String world){
  List<String> permissions=new LinkedList<String>();
  this.getInheritedPermissions(world,permissions);
  return permissions.toArray(new String[0]);
}
Program: 151361
Project: 151361
Buggy source:
public abstract void setPermission(String permission,String value,String world);

Fixed version (ground truth):
public void setPermission(String permission,String value){
  this.setOption(permission,value,"String_Node_Str");
}
Program: 151362
Project: 151362
Buggy source:
public void addGroup(PermissionGroup group){
  if (group == null) {
    return;
  }
  List<PermissionGroup> groups=Arrays.asList(this.getGroups());
  if (!groups.contains(group)) {
    groups.add(group);
    this.setGroups(groups.toArray(new PermissionGroup[]{}));
  }
}

Fixed version (ground truth):
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]));
  }
}
Program: 151363
Project: 151363
Buggy source:
@Override public PermissionUser[] getUsers(){
  List<PermissionUser> users=new LinkedList<PermissionUser>();
  Map<String,ConfigurationNode> userMap=this.permissions.getNodesMap("String_Node_Str");
  for (  Map.Entry<String,ConfigurationNode> entry : userMap.entrySet()) {
    users.add(this.manager.getUser(entry.getKey()));
  }
  return users.toArray(new PermissionUser[]{});
}

Fixed version (ground truth):
@Override public PermissionUser[] getUsers(){
  List<PermissionUser> users=new LinkedList<PermissionUser>();
  Map<String,ConfigurationNode> userMap=this.permissions.getNodesMap("String_Node_Str");
  if (userMap != null) {
    for (    Map.Entry<String,ConfigurationNode> entry : userMap.entrySet()) {
      users.add(this.manager.getUser(entry.getKey()));
    }
  }
  return users.toArray(new PermissionUser[]{});
}
Program: 151364
Project: 151364
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupDelete(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionGroup group=PermissionsPlugin.getPermissionManager().getGroup(args.get("String_Node_Str"));
  if (group == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + group.getName()+ "String_Node_Str");
  group.remove();
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupDelete(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionGroup group=PermissionsPlugin.getPermissionManager().getGroup(args.get("String_Node_Str"));
  if (group == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + group.getName()+ "String_Node_Str");
  group.remove();
  PermissionsPlugin.getPermissionManager().resetGroup(group.getName());
  group=null;
}
Program: 151365
Project: 151365
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupSetPermission(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionGroup group=PermissionsPlugin.getPermissionManager().getGroup(args.get("String_Node_Str"));
  if (group == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  group.setPermission(args.get("String_Node_Str"),args.get("String_Node_Str"),args.get("String_Node_Str"));
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + group.getName()+ "String_Node_Str");
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupSetPermission(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionGroup group=PermissionsPlugin.getPermissionManager().getGroup(args.get("String_Node_Str"));
  if (group == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  group.setOption(args.get("String_Node_Str"),args.get("String_Node_Str"),args.get("String_Node_Str"));
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str" + group.getName()+ "String_Node_Str");
}
Program: 151366
Project: 151366
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userSetPermission(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser user=PermissionsPlugin.getPermissionManager().getUser(args.get("String_Node_Str"));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  user.setPermission(args.get("String_Node_Str"),args.get("String_Node_Str"),args.get("String_Node_Str"));
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str");
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userSetPermission(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser user=PermissionsPlugin.getPermissionManager().getUser(args.get("String_Node_Str"));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  user.setOption(args.get("String_Node_Str"),args.get("String_Node_Str"),args.get("String_Node_Str"));
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str");
}
Program: 151367
Project: 151367
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupListPermissions(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionGroup group=PermissionsPlugin.getPermissionManager().getGroup(args.get("String_Node_Str"));
  if (group == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  sender.sendMessage("String_Node_Str" + args.get("String_Node_Str") + "String_Node_Str");
  for (  String permission : group.getPermissions(args.get("String_Node_Str"))) {
    sender.sendMessage("String_Node_Str" + permission);
  }
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void groupListPermissions(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionGroup group=PermissionsPlugin.getPermissionManager().getGroup(args.get("String_Node_Str"));
  if (group == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  sender.sendMessage("String_Node_Str" + args.get("String_Node_Str") + "String_Node_Str");
  for (  String permission : group.getOwnPermissions(args.get("String_Node_Str"))) {
    sender.sendMessage("String_Node_Str" + permission);
  }
  sender.sendMessage("String_Node_Str");
  for (  Map.Entry<String,String> option : group.getOptions(args.get("String_Node_Str")).entrySet()) {
    sender.sendMessage("String_Node_Str" + option.getKey() + "String_Node_Str"+ option.getValue());
  }
}
Program: 151368
Project: 151368
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userListPermissions(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser user=PermissionsPlugin.getPermissionManager().getUser(args.get("String_Node_Str"));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  sender.sendMessage(args.get("String_Node_Str") + "String_Node_Str");
  for (  String permission : user.getPermissions(args.get("String_Node_Str"))) {
    sender.sendMessage("String_Node_Str" + permission);
  }
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userListPermissions(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser user=PermissionsPlugin.getPermissionManager().getUser(args.get("String_Node_Str"));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  sender.sendMessage(args.get("String_Node_Str") + "String_Node_Str");
  for (  String permission : user.getOwnPermissions(args.get("String_Node_Str"))) {
    sender.sendMessage("String_Node_Str" + permission);
  }
  user.getOptions(args.get("String_Node_Str"));
}
Program: 151369
Project: 151369
Buggy source:
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userAddPermission(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser user=PermissionsPlugin.getPermissionManager().getUser(args.get("String_Node_Str"));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  user.addPermission(args.get("String_Node_Str"),null,args.get("String_Node_Str"));
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str");
}

Fixed version (ground truth):
@Command(name="String_Node_Str",syntax="String_Node_Str",permission="String_Node_Str",description="String_Node_Str") public void userAddPermission(Plugin plugin,CommandSender sender,Map<String,String> args){
  PermissionUser user=PermissionsPlugin.getPermissionManager().getUser(args.get("String_Node_Str"));
  if (user == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  user.addPermission(args.get("String_Node_Str"),args.get("String_Node_Str"));
  sender.sendMessage(ChatColor.WHITE + "String_Node_Str");
}