/*
(non-Javadoc)

@see de.tudarmstadt.ukp.kulessa.delta.consumers.diff.calculation.
BlockManagementInterface#manage(char[], char[], java.util.ArrayList,
java.util.ArrayList)
173983
public Diff manage(char[] revA, char[] revB, ArrayList<DiffBlock> queueA,
			ArrayList<DiffBlock> queueB)
		throws UnsupportedEncodingException
	{

		this.diff = new Diff();
		this.codecData = new RevisionCodecData();

		this.bufferMap = new HashMap<Integer, String>();
		this.version = new StringBuilder();

		DiffBlock curA = null, curB = null;
		while (!queueA.isEmpty() || !queueB.isEmpty() || curB != null) {

			if (!queueA.isEmpty() && curA == null) {
				curA = queueA.remove(0);
			}
			if (!queueB.isEmpty() && curB == null) {
				curB = queueB.remove(0);
			}

			if (curA != null && curB != null) {

				if (curA.getId() == curB.getId()) {

					if (curA.getId() == -1) {
						replace(revA, revB, curA, curB);
					}
					else {
						version.append(copy(revA, curA.getRevAStart(),
								curA.getRevAEnd()));
					}

					curA = null;
					curB = null;

				}
				else if (curA.getId() == -1) {

					delete(curA);
					curA = null;

				}
				else if (curB.getId() == -1) {

					insert(revB, curB);
					curB = null;

				}
				else {

					// Difference :(
					if (bufferMap.containsKey(curB.getId())) {

						paste(curB);
						curB = null;

					}
					else {

						cut(revA, curA);
						curA = null;

						// System.out.println("@TO CUT: " + curA.getId() + "\t<"
						// + text + ">");
					}
				}

			}
			else if (curA != null) {

				delete(curA);
				curA = null;

			}
			else if (curB != null) {

				// Difference :(
				if (bufferMap.containsKey(curB.getId())) {

					paste(curB);
					curB = null;

				}
				else {

					insert(revB, curB);
					curB = null;
				}

			}
			else {
				System.err.println("INVALID CASE");
				System.exit(-1);
			}
		}

		diff.setCodecData(codecData);
		return diff;
	}
65486
private void doListGroup(final Message<JsonObject> message) {
    context.execute(new Action<Set<String>>() {
      @Override
      public Set<String> perform() {
        return groups.keySet();
      }
    }, new Handler<AsyncResult<Set<String>>>() {
      @Override
      public void handle(AsyncResult<Set<String>> result) {
        if (result.failed()) {
          message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
        } else {
          message.reply(new JsonObject().putString("status", "ok").putArray("result", new JsonArray(result.result().toArray(new String[result.result().size()]))));
        }
      }
    });
  }
130539
public boolean manage(final DeliveryReceipt result) {
		
		if (logger.isDebugEnabled()) {
			logger.debug("Invoking manage with parameter DeliveryReceipt method" + 
				     "  - smid : " + result.getSmid() + 
				     "  - msmisdn : " + result.getMsisdn() + 
				     "  - date : " + result.getDate() + 
				     "  - status : " + result.getStatus() + 
				     "  - message : " + result.getMessage() + 
				     "  - cause : " + result.getCause() + 
				     "  - country code : " + result.getCountryCode() + 
				     "  - operator : " + result.getOperator() + 
				     "  - pnm retry number : " + result.getPNMRetryNumber());
		}
		
		final int rcpStatus = result.getStatus();
		final int rcpCause = result.getCause();
		
		final Acknowledgment acknowledgment = new Acknowledgment();

		// common elements
		acknowledgment.setSmsId(result.getSmid());
		// Ok case
		if (rcpStatus == olmSentStatusCode) {
			acknowledgment.setSmsStatus(SmsStatus.DELIVERED);
		// Error invalid number case (msisdn to put in bl)	
		} else if (rcpStatus == olmErrorStatusCode	
				&& rcpCause == olmInvalidMSISDNCauseCode) {
			acknowledgment.setSmsStatus(SmsStatus.ERROR_POST_BL);
		// Other error
		} else {
			acknowledgment.setSmsStatus(SmsStatus.ERROR);
		}
		
		// managing ack
		ackManager.manageAck(acknowledgment);
		
		return true;
	}
45253
public void manage(Collection<SupervisedWorker> workers)
   {
      if(workers == null)
         return;
      
      this.workers.clear();
      
      SupervisedWorker worker = null;
      for (Iterator<SupervisedWorker> i = workers.iterator(); i.hasNext();)
      {
         worker = i.next();
         
         this.manage(worker);
      }
      
   }
758577
private static void handlePing(final Channel channel, final ManagementProtocolHeader header) throws IOException {
        final ManagementProtocolHeader response = new ManagementPongHeader(header.getVersion());
        final MessageOutputStream output = channel.writeMessage();
        try {
            writeHeader(response, output);
            output.close();
        } finally {
            StreamUtils.safeClose(output);
        }
    }
358942
public void onManagerEvent(ManagerEvent event)
    {
        // Handle Channel related events
        if (event instanceof ConnectEvent)
        {
            handleConnectEvent((ConnectEvent) event);
        }
        else if (event instanceof DisconnectEvent)
        {
            handleDisconnectEvent((DisconnectEvent) event);
        }
        else if (event instanceof NewChannelEvent)
        {
            channelManager.handleNewChannelEvent((NewChannelEvent) event);
        }
        else if (event instanceof NewExtenEvent)
        {
            channelManager.handleNewExtenEvent((NewExtenEvent) event);
        }
        else if (event instanceof NewStateEvent)
        {
            channelManager.handleNewStateEvent((NewStateEvent) event);
        }
        else if (event instanceof NewCallerIdEvent)
        {
            channelManager.handleNewCallerIdEvent((NewCallerIdEvent) event);
        }
        else if (event instanceof DialEvent)
        {
            channelManager.handleDialEvent((DialEvent) event);
        }
        else if (event instanceof BridgeEvent)
        {
            channelManager.handleBridgeEvent((BridgeEvent) event);
        }
        else if (event instanceof RenameEvent)
        {
            channelManager.handleRenameEvent((RenameEvent) event);
        }
        else if (event instanceof HangupEvent)
        {
            channelManager.handleHangupEvent((HangupEvent) event);
        }
        else if (event instanceof CdrEvent)
        {
            channelManager.handleCdrEvent((CdrEvent) event);
        }
        else if (event instanceof VarSetEvent)
        {
            channelManager.handleVarSetEvent((VarSetEvent) event);
        }
        else if (event instanceof DtmfEvent)
        {
            channelManager.handleDtmfEvent((DtmfEvent) event);
        }
        else if (event instanceof MonitorStartEvent)
        {
            channelManager.handleMonitorStartEvent((MonitorStartEvent) event);
        }
        else if (event instanceof MonitorStopEvent)
        {
            channelManager.handleMonitorStopEvent((MonitorStopEvent) event);
        }
        // End of channel related events
        // Handle parking related event
        else if (event instanceof ParkedCallEvent)
        {
            channelManager.handleParkedCallEvent((ParkedCallEvent) event);
        }
        else if (event instanceof ParkedCallGiveUpEvent)
        {
            channelManager.handleParkedCallGiveUpEvent((ParkedCallGiveUpEvent) event);
        }
        else if (event instanceof ParkedCallTimeOutEvent)
        {
            channelManager.handleParkedCallTimeOutEvent((ParkedCallTimeOutEvent) event);
        }
        else if (event instanceof UnparkedCallEvent)
        {
            channelManager.handleUnparkedCallEvent((UnparkedCallEvent) event);
        }
        // End of parking related events
        // Handle queue related event
        else if (event instanceof JoinEvent)
        {
            queueManager.handleJoinEvent((JoinEvent) event);
        }
        else if (event instanceof LeaveEvent)
        {
            queueManager.handleLeaveEvent((LeaveEvent) event);
        }
        else if (event instanceof QueueMemberStatusEvent)
        {
            queueManager.handleQueueMemberStatusEvent((QueueMemberStatusEvent) event);
        }
        else if (event instanceof QueueMemberPenaltyEvent)
        {
            queueManager.handleQueueMemberPenaltyEvent((QueueMemberPenaltyEvent) event);
        }
        else if (event instanceof QueueMemberAddedEvent)
        {
            queueManager.handleQueueMemberAddedEvent((QueueMemberAddedEvent) event);
        }
        else if (event instanceof QueueMemberRemovedEvent)
        {
            queueManager.handleQueueMemberRemovedEvent((QueueMemberRemovedEvent) event);
        }
        else if (event instanceof QueueMemberPausedEvent)
        {
            queueManager.handleQueueMemberPausedEvent((QueueMemberPausedEvent) event);
        }
        // >>>>>> AJ 94
        // Handle meetMeEvents
        else if (event instanceof AbstractMeetMeEvent)
        {
            meetMeManager.handleMeetMeEvent((AbstractMeetMeEvent) event);
        }
        else if (event instanceof OriginateResponseEvent)
        {
            handleOriginateEvent((OriginateResponseEvent) event);
        }
        // Handle agents-related events
        else if (event instanceof AgentsEvent)
        {
            agentManager.handleAgentsEvent((AgentsEvent) event);
        }
        else if (event instanceof AgentCalledEvent)
        {
            agentManager.handleAgentCalledEvent((AgentCalledEvent) event);
        }
        else if (event instanceof AgentConnectEvent)
        {
            agentManager.handleAgentConnectEvent((AgentConnectEvent) event);
        }
        else if (event instanceof AgentCompleteEvent)
        {
            agentManager.handleAgentCompleteEvent((AgentCompleteEvent) event);
        }
        else if (event instanceof AgentCallbackLoginEvent)
        {
            agentManager.handleAgentCallbackLoginEvent((AgentCallbackLoginEvent) event);
        }
        else if (event instanceof AgentCallbackLogoffEvent)
        {
            agentManager.handleAgentCallbackLogoffEvent((AgentCallbackLogoffEvent) event);
        }
        else if (event instanceof AgentLoginEvent)
        {
            agentManager.handleAgentLoginEvent((AgentLoginEvent) event);
        }
        else if (event instanceof AgentLogoffEvent)
        {
            agentManager.handleAgentLogoffEvent((AgentLogoffEvent) event);
        }
        // End of agent-related events

        // dispatch the events to the chainListener if they exist.
        fireChainListeners(event);
    }
787839
private Object manageListIfNecessary(List<Object> value) {
		boolean containsRuntimeRefs = false;
		for (ListIterator<Object> i = value.listIterator(); i.hasNext();) {
			Object e = i.next();
			if(e instanceof RuntimeBeanReference) {
				containsRuntimeRefs = true;
			}
            if (e instanceof BeanConfiguration) {
                BeanConfiguration c = (BeanConfiguration) e;
                i.set(c.getBeanDefinition());
                containsRuntimeRefs = true;
            }
        }
		if(containsRuntimeRefs) {
			List tmp = new ManagedList();
			tmp.addAll(value);
			value = tmp;
		}
		return value;
	}
226387
@Override
  public final void handle(final Map<String, Object> pReqVars,
    final IRequestData pRequestData) throws Exception {
    AccSettings as = srvAccSettings.lazyGetAccSettings(pReqVars);
    String curSign;
    if (as.getUseCurrencySign()) {
      curSign = as.getCurrency().getItsSign();
    } else {
      curSign = " " + as.getCurrency().getItsName() + " ";
    }
    pReqVars.put("quantityDp", as.getQuantityPrecision());
    pReqVars.put("priceDp", as.getPricePrecision());
    pReqVars.put("costDp", as.getCostPrecision());
    pReqVars.put("taxDp", as.getTaxPrecision());
    pReqVars.put("reportDp", as.getBalancePrecision());
    pReqVars.put("curSign", curSign);
    pReqVars.put("accSet", as);
    String lang = (String) pReqVars.get("lang");
    String langDef = (String) pReqVars.get("langDef");
    if (lang != null && langDef != null && !lang.equals(langDef)) {
      List<I18nAccounting> i18nAccTmp;
      List<I18nCurrency> i18nCurTmp;
      synchronized (this) {
        if (this.i18nAccountingList == null) {
          try {
            this.logger.info(null, HndlAccVarsRequest.class,
              "Refreshing I18N data...");
            this.srvDatabase.setIsAutocommit(false);
            this.srvDatabase.setTransactionIsolation(ISrvDatabase
              .TRANSACTION_READ_UNCOMMITTED);
            this.srvDatabase.beginTransaction();
            List<I18nAccounting> i18nac = this.srvOrm.retrieveList(pReqVars,
              I18nAccounting.class);
            List<I18nCurrency> i18ncur = this.srvOrm.retrieveList(pReqVars,
              I18nCurrency.class);
            this.srvDatabase.commitTransaction();
            //assigning fully initialized data:
            this.i18nAccountingList = i18nac;
            this.i18nCurrencyList = i18ncur;
          } catch (Exception ex) {
            if (!this.srvDatabase.getIsAutocommit()) {
              this.srvDatabase.rollBackTransaction();
            }
            throw ex;
          } finally {
            this.srvDatabase.releaseResources();
          }
        }
        i18nAccTmp = this.i18nAccountingList;
        i18nCurTmp = this.i18nCurrencyList;
      }
      for (I18nAccounting i18nAccounting : i18nAccTmp) {
        if (i18nAccounting.getLang().getItsId().equals(lang)) {
          pReqVars.put("i18nAccounting", i18nAccounting);
          break;
        }
      }
      for (I18nCurrency i18nCurrency : i18nCurTmp) {
        if (i18nCurrency.getHasName().getItsId()
          .equals(as.getCurrency().getItsId())
            && i18nCurrency.getLang().getItsId().equals(lang)) {
          pReqVars.put("i18nCurrency", i18nCurrency);
          break;
        }
      }
    }
    if (this.additionalI18nReqHndl != null) {
      this.additionalI18nReqHndl.handle(pReqVars, pRequestData);
    }
  }
751456
@Override
    public int complete(CommandContext ctx, String buffer, int cursor, List<String> candidates) {

        int nextCharIndex = 0;
        while(nextCharIndex < buffer.length()) {
            if(!Character.isWhitespace(buffer.charAt(nextCharIndex))) {
                break;
            }
            ++nextCharIndex;
        }

        if(nextCharIndex == buffer.length()) {
            candidates.addAll(all);
            return nextCharIndex;
        }

        String[] split = buffer.split("\\s+");
        int result;
        final String chunk;
        if(Character.isWhitespace(buffer.charAt(buffer.length() - 1))) {
            chunk = null;
            result = buffer.length();
        } else {
            chunk = split[split.length - 1];
            result = buffer.length() - 1;
            while(result >= 0 && !Character.isWhitespace(buffer.charAt(result))) {
                --result;
            }
            ++result;
        }

        final List<String> remainingArgs = new ArrayList<String>(all);
        int maxI = chunk == null ? split.length : split.length - 1;
        for(int i = 0; i < maxI; ++i) {
            String arg = split[i];
            int equalsIndex = arg.indexOf('=');
            if(equalsIndex >= 0) {
                arg = arg.substring(0, equalsIndex + 1);
            }
            remainingArgs.remove(arg);
        }

        if (chunk == null) {
            candidates.addAll(remainingArgs);
        } else {
            for(String name : remainingArgs) {
                if(name.startsWith(chunk)) {
                    candidates.add(name);
                }
            }
        }
        return result;
    }
203784
def to_manager(sdf, columns, index):
    

    # from BlockManager perspective
    axes = [ensure_index(columns), ensure_index(index)]

    return create_block_manager_from_arrays(
        [sdf[c] for c in columns], columns, axes)
364047
@Override
    public void handle(CommandContext ctx, String commandLine) {

        if (commandLine.contains("--help")) {
            this.printHelp(commandLine, ctx);
            return;
        }

        String[] commands = commandLine.split(" ");

        if (commands.length == 1) {
            this.printHistory(ctx);
        } else if (commands.length == 2) {
            String argument = commands[1];
            if ("clear".equals(argument)) {
                ctx.getHistory().clear();
            } else if ("enable".equals(argument)) {
                ctx.getHistory().setUseHistory(true);
            } else if ("disable".equals(argument)) {
                ctx.getHistory().setUseHistory(false);
            } else {
                ctx.printLine("Invalid command.");
            }
        } else {
            ctx.printLine("Invalid command.");
        }
    }
945085
@Override
    public void executeListMultiActions() throws CmsRuntimeException {

        if (getParamListAction().equals(LIST_MACTION_DELETE)) {
            // execute the delete multiaction
            Map<String, String[]> params = new HashMap<String, String[]>();
            params.put(A_CmsEditUserDialog.PARAM_USERID, new String[] {getParamSelItems()});
            // set action parameter to initial dialog call
            params.put(CmsDialog.PARAM_ACTION, new String[] {CmsDialog.DIALOG_INITIAL});

            try {
                getToolManager().jspForwardTool(this, getCurrentToolPath() + "/delete", params);
            } catch (Exception e) {
                throw new CmsRuntimeException(Messages.get().container(Messages.ERR_DELETE_SELECTED_USERS_0), e);
            }
        } else if (getParamListAction().equals(LIST_MACTION_ACTIVATE)) {
            // execute the activate multiaction
            try {
                Iterator<CmsListItem> itItems = getSelectedItems().iterator();
                while (itItems.hasNext()) {
                    CmsListItem listItem = itItems.next();
                    String usrName = listItem.get(LIST_COLUMN_LOGIN).toString();
                    CmsUser user = readUser(usrName);
                    if (!user.isEnabled()) {
                        user.setEnabled(true);
                        getCms().writeUser(user);
                    }
                }
            } catch (CmsException e) {
                throw new CmsRuntimeException(Messages.get().container(Messages.ERR_ACTIVATE_SELECTED_USERS_0), e);
            }
            // refreshing no needed becaus the activate action does not add/remove rows to the list
        } else if (getParamListAction().equals(LIST_MACTION_DEACTIVATE)) {
            // execute the activate multiaction
            try {
                Iterator<CmsListItem> itItems = getSelectedItems().iterator();
                while (itItems.hasNext()) {
                    CmsListItem listItem = itItems.next();
                    String usrName = listItem.get(LIST_COLUMN_LOGIN).toString();
                    CmsUser user = readUser(usrName);
                    if (user.isEnabled()) {
                        user.setEnabled(false);
                        getCms().writeUser(user);
                    }
                }
            } catch (CmsException e) {
                throw new CmsRuntimeException(Messages.get().container(Messages.ERR_DEACTIVATE_SELECTED_USERS_0), e);
            }
            // refreshing no needed becaus the activate action does not add/remove rows to the list
        } else {
            throwListUnsupportedActionException();
        }
        listSave();
    }
1175834
public void blockManagement() {
        Vector dwgObjectsWithoutBlocks = new Vector();
        boolean addingToBlock = false;
        for( int i = 0; i < dwgObjects.size(); i++ ) {
            try {
                DwgObject entity = (DwgObject) dwgObjects.get(i);
                if (entity instanceof DwgArc && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgEllipse && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgCircle && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgPolyline2D && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgPolyline3D && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgLwPolyline && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgSolid && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgLine && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgPoint && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgMText && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgText && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgAttrib && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgAttdef && !addingToBlock) {
                    dwgObjectsWithoutBlocks.add(entity);
                } else if (entity instanceof DwgBlock) {
                    addingToBlock = true;
                } else if (entity instanceof DwgEndblk) {
                    addingToBlock = false;
                } else if (entity instanceof DwgBlockHeader) {
                    addingToBlock = true;
                } else if (entity instanceof DwgInsert && !addingToBlock) {
                    /* double[] p = ((DwgInsert) entity).getInsertionPoint();
                     Point2D point = new Point2D.Double(p[0], p[1]);
                     double[] scale = ((DwgInsert) entity).getScale();
                     double rot = ((DwgInsert) entity).getRotation();
                     int blockHandle = ((DwgInsert) entity).getBlockHeaderHandle();
                     manageInsert(point, scale, rot, blockHandle, i,
                     dwgObjectsWithoutBlocks);*/
                } else {
                    // System.out.println("Detectado dwgObject pendiente de implementar");
                }
            } catch (StackOverflowError e) {
                e.printStackTrace();
                System.out.println("Overflowerror at object: " + i);
            }
        }
        dwgObjects = dwgObjectsWithoutBlocks;
    }
1212855
public static void sortDescending(char[] charArray) {
        int index = 0;
        char value = 0;
        
        for(int i = 1; i < charArray.length; i++) {
            index = i;
            value = charArray[index];
            
            while(index > 0 && value > charArray[index - 1]) {
                charArray[index] = charArray[index - 1];
                
                index--;
            }
            
            charArray[index] = value;
        }
    }
887601
public static void insertFromArray(final Object[] values, final DeviceData deviceDataArgin,
	    final int dataType) throws DevFailed {
	if (values.length > 0) {
	    final Object firstValue = values[0];
	    if (firstValue instanceof Short) {
		final short[] tmpValues = new short[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = ((Short) values[i]).shortValue();
		}
		CommandHelper.insertFromShortArray(tmpValues, deviceDataArgin, dataType);
	    } else if (firstValue instanceof String) {
		final String[] tmpValues = new String[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = (String) values[i];
		}
		CommandHelper.insertFromStringArray(tmpValues, deviceDataArgin, dataType);
	    } else if (firstValue instanceof Integer) {
		final int[] tmpValues = new int[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = ((Integer) values[i]).intValue();
		}
		CommandHelper.insertFromIntegerArray(tmpValues, deviceDataArgin, dataType);
	    } else if (firstValue instanceof Long) {
		final long[] tmpValues = new long[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = ((Long) values[i]).intValue();
		}
		CommandHelper.insertFromLongArray(tmpValues, deviceDataArgin, dataType);
	    } else if (firstValue instanceof Float) {
		final float[] tmpValues = new float[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = ((Float) values[i]).floatValue();
		}
		CommandHelper.insertFromFloatArray(tmpValues, deviceDataArgin, dataType);
	    } else if (firstValue instanceof Byte) {
		final byte[] tmpValues = new byte[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = ((Byte) values[i]).byteValue();
		}
		CommandHelper.insertFromByteArray(tmpValues, deviceDataArgin, dataType);
	    } else if (firstValue instanceof Boolean) {
		final boolean[] tmpValues = new boolean[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = ((Boolean) values[i]).booleanValue();
		}

		CommandHelper.insertFromBooleanArray(tmpValues, deviceDataArgin, dataType);
	    } else if (firstValue instanceof Double) {
		final double[] tmpValues = new double[values.length];
		for (int i = 0; i < tmpValues.length; i++) {
		    tmpValues[i] = ((Double) values[i]).doubleValue();
		}

		CommandHelper.insertFromDoubleArray(tmpValues, deviceDataArgin, dataType);
	    }
	}
    }
1115670
@Override
    public void handleText(
            final char[] buffer, final int offset, final int len,
            final int line, final int col)
            throws ParseException {

        this.someSelectorsMatch = false;
        for (int i = 0; i < this.selectorsLen; i++) {

            this.selectorMatches[i] =
                    this.selectorFilters[i].matchText(false, this.markupLevel, this.markupBlocks[this.markupLevel]);
            if (this.selectorMatches[i]) {
                this.someSelectorsMatch = true;
            }

        }

        if (this.someSelectorsMatch) {
            markCurrentSelection();
            this.selectedHandler.handleText(buffer, offset, len, line, col);
            unmarkCurrentSelection();
            return;
        }

        unmarkCurrentSelection();
        this.nonSelectedHandler.handleText(buffer, offset, len, line, col);

    }
683901
@Override
    public boolean parseManagementInterfaces(final XMLExtendedStreamReader reader, final ModelNode address,
            final List<ModelNode> list) throws XMLStreamException {
        requireNoAttributes(reader);

        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            requireNamespace(reader, namespace);
            final Element element = Element.forName(reader.getLocalName());
            switch (element) {
                case NATIVE_INTERFACE: {
                    parseManagementInterface(reader, address, false, list);
                    break;
                }
                case HTTP_INTERFACE: {
                    parseManagementInterface(reader, address, true, list);
                    break;
                }
                case NATIVE_REMOTING_INTERFACE: {
                    parseNativeRemotingManagementInterface(reader, address, list);
                    break;
                }
                default: {
                    throw unexpectedElement(reader);
                }
            }
        }

        return true;
    }