Program: 102394
Project: 102394
Buggy source:
/** 
 * {@inheritDoc}
 */
@SuppressWarnings("String_Node_Str") public Space createSpace(Space space,String creator,String invitedGroupId){
  String[] managers=space.getManagers();
  String[] members=space.getMembers();
  managers=(String[])ArrayUtils.add(managers,creator);
  members=(String[])ArrayUtils.add(members,creator);
  space.setManagers(managers);
  space.setMembers(members);
  String groupId=null;
  try {
    groupId=SpaceUtils.createGroup(space.getDisplayName(),space.getPrettyName(),creator);
  }
 catch (  SpaceException e) {
    throw new RuntimeException("String_Node_Str" + space.getPrettyName(),e);
  }
  List<String> inviteds=new ArrayList<String>();
  if (invitedGroupId != null) {
    OrganizationService org=getOrgService();
    try {
      PageList<User> groupMembersAccess=org.getUserHandler().findUsersByGroup(invitedGroupId);
      List<User> users=groupMembersAccess.getAll();
      for (      User user : users) {
        String userId=user.getUserName();
        if (!userId.equals(creator)) {
          String[] invitedUsers=space.getInvitedUsers();
          if (userId.equals(getUserACL().getSuperUser())) {
            members=space.getMembers();
            if (!ArrayUtils.contains(members,userId)) {
              members=(String[])ArrayUtils.add(members,userId);
              space.setMembers(members);
            }
          }
 else           if (!ArrayUtils.contains(invitedUsers,userId)) {
            invitedUsers=(String[])ArrayUtils.add(invitedUsers,userId);
            inviteds.add(userId);
            space.setInvitedUsers(invitedUsers);
          }
        }
      }
    }
 catch (    Exception e) {
      throw new RuntimeException("String_Node_Str" + invitedGroupId,e);
    }
  }
  String prettyName=groupId.split("String_Node_Str")[2];
  if (!prettyName.equals(space.getPrettyName())) {
    space.setPrettyName(groupId.split("String_Node_Str")[2]);
  }
  space.setGroupId(groupId);
  space.setUrl(space.getPrettyName());
  try {
    SpaceApplicationHandler spaceApplicationHandler=getSpaceApplicationHandler(space);
    spaceApplicationHandler.initApps(space,getSpaceApplicationConfigPlugin());
    for (    SpaceApplication spaceApplication : getSpaceApplicationConfigPlugin().getSpaceApplicationList()) {
      setApp(space,spaceApplication.getPortletName(),spaceApplication.getAppTitle(),spaceApplication.isRemovable(),Space.ACTIVE_STATUS);
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + space.getPrettyName(),e);
  }
  saveSpace(space,true);
  spaceLifeCycle.spaceCreated(space,creator);
  for (  String invited : inviteds) {
    spaceLifeCycle.addInvitedUser(space,invited);
  }
  return space;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@SuppressWarnings("String_Node_Str") public Space createSpace(Space space,String creator,String invitedGroupId){
  String[] managers=space.getManagers();
  String[] members=space.getMembers();
  managers=(String[])ArrayUtils.add(managers,creator);
  members=(String[])ArrayUtils.add(members,creator);
  space.setManagers(managers);
  space.setMembers(members);
  String groupId=null;
  try {
    groupId=SpaceUtils.createGroup(space.getDisplayName(),space.getPrettyName(),creator);
  }
 catch (  SpaceException e) {
    throw new RuntimeException("String_Node_Str" + space.getPrettyName(),e);
  }
  List<String> inviteds=new ArrayList<String>();
  if (invitedGroupId != null) {
    OrganizationService org=getOrgService();
    try {
      ListAccess<User> groupMembersAccess=org.getUserHandler().findUsersByGroupId(invitedGroupId);
      User[] users=groupMembersAccess.load(0,groupMembersAccess.getSize());
      for (      User user : users) {
        String userId=user.getUserName();
        if (!userId.equals(creator)) {
          String[] invitedUsers=space.getInvitedUsers();
          if (userId.equals(getUserACL().getSuperUser())) {
            members=space.getMembers();
            if (!ArrayUtils.contains(members,userId)) {
              members=(String[])ArrayUtils.add(members,userId);
              space.setMembers(members);
            }
          }
 else           if (!ArrayUtils.contains(invitedUsers,userId)) {
            invitedUsers=(String[])ArrayUtils.add(invitedUsers,userId);
            inviteds.add(userId);
            space.setInvitedUsers(invitedUsers);
          }
        }
      }
    }
 catch (    Exception e) {
      throw new RuntimeException("String_Node_Str" + invitedGroupId,e);
    }
  }
  String prettyName=groupId.split("String_Node_Str")[2];
  if (!prettyName.equals(space.getPrettyName())) {
    space.setPrettyName(groupId.split("String_Node_Str")[2]);
  }
  space.setGroupId(groupId);
  space.setUrl(space.getPrettyName());
  try {
    SpaceApplicationHandler spaceApplicationHandler=getSpaceApplicationHandler(space);
    spaceApplicationHandler.initApps(space,getSpaceApplicationConfigPlugin());
    for (    SpaceApplication spaceApplication : getSpaceApplicationConfigPlugin().getSpaceApplicationList()) {
      setApp(space,spaceApplication.getPortletName(),spaceApplication.getAppTitle(),spaceApplication.isRemovable(),Space.ACTIVE_STATUS);
    }
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str" + space.getPrettyName(),e);
  }
  saveSpace(space,true);
  spaceLifeCycle.spaceCreated(space,creator);
  for (  String invited : inviteds) {
    spaceLifeCycle.addInvitedUser(space,invited);
  }
  return space;
}