This method processes a comma separated list of correlation identifiers, defined as a scope|value pair.

@param correlations The correlation identifier set
@param encoded The string containing the encoded correlation identifiers
15841
public static void decodeCorrelationIdentifiers(Set<CorrelationIdentifier> correlations, String encoded) {
        if (encoded != null && !encoded.trim().isEmpty()) {
            StringTokenizer st = new StringTokenizer(encoded, ",");
            while (st.hasMoreTokens()) {
                String token = st.nextToken();
                String[] parts = token.split("[|]");
                if (parts.length == 2) {
                    String scope = parts[0].trim();
                    String value = parts[1].trim();

                    log.tracef("Extracted correlation identifier scope [%s] value [%s]", scope, value);

                    CorrelationIdentifier cid = new CorrelationIdentifier();
                    cid.setScope(Scope.valueOf(scope));
                    cid.setValue(value);

                    correlations.add(cid);
                }
            }
        }
    }
441034
public static String decode(final String encoded, final String charset) 
        throws UnsupportedEncodingException {
        try {
            return s_codec.decode(encoded, charset);
        } catch (DecoderException e) {
            throw new IllegalStateException(Bundle.getErrorString("URLCodec_decodeException", new String[] {e.getMessage()}), e);
        }
    }
591493
public void encode(AsnOutputStream aos) throws EncodeException {

        if (this.getProblem() == null)
            throw new EncodeException("Error encoding Reject: RejectProblem must not be null");

        try {
            // tag
            aos.writeTag(Tag.CLASS_PRIVATE, false, Reject._TAG_REJECT);
            int pos = aos.StartContentDefiniteLength();

            // correlationId
            byte[] buf;
            if (this.correlationId != null) {
                buf = new byte[1];
                buf[0] = (byte) (long) this.correlationId;
            } else {
                buf = new byte[0];
            }
            aos.writeOctetString(Tag.CLASS_PRIVATE, Component._TAG_INVOKE_ID, buf);

            // rejectProblem
            aos.writeInteger(Tag.CLASS_PRIVATE, Reject._TAG_REJECT_PROBLEM, this.rejectProblem.getType());

            // Empty parameter
            aos.writeTag(Tag.CLASS_PRIVATE, false, Parameter._TAG_SEQUENCE);
            aos.writeLength(0);

            aos.FinalizeContent(pos);

        } catch (IOException e) {
            throw new EncodeException("IOException while encoding Reject: " + e.getMessage(), e);
        } catch (AsnException e) {
            throw new EncodeException("AsnException while encoding Reject: " + e.getMessage(), e);
        }
    }
241522
public void setEncoding(String encoding) {

        checkFrozen();
        m_encoding = CmsEncoder.lookupEncoding(encoding, OpenCms.getSystemInfo().getDefaultEncoding());
    }
283703
@Override
    public void sawOpcode(int seen) {
        switch (state) {
            case SAW_NOTHING:
                if ((seen == Const.IF_ICMPGE) || (seen == Const.IF_ICMPGT)) {
                    state = State.SAW_ICMP;
                }
            break;

            case SAW_ICMP:
                if (OpcodeUtils.isALoad(seen)) {
                    state = State.SAW_ARRAY1_LOAD;
                }
            break;

            case SAW_ARRAY1_LOAD:
                if (seen == Const.ILOAD) {
                    arrayIndexReg = getRegisterOperand();
                    state = State.SAW_ARRAY1_INDEX;
                } else if ((seen >= Const.ILOAD_0) && (seen <= Const.ILOAD_3)) {
                    arrayIndexReg = seen - Const.ILOAD_0;
                    state = State.SAW_ARRAY1_INDEX;
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_ARRAY1_INDEX:
                if (OpcodeUtils.isALoad(seen)) {
                    state = State.SAW_ARRAY2_LOAD;
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_ARRAY2_LOAD:
                if (seen == Const.ILOAD) {
                    if (arrayIndexReg == this.getRegisterOperand()) {
                        state = State.SAW_ARRAY2_INDEX;
                    } else {
                        state = State.SAW_NOTHING;
                    }
                } else if ((seen >= Const.ILOAD_0) && (seen <= Const.ILOAD_3)) {
                    if (arrayIndexReg == (seen - Const.ILOAD_0)) {
                        state = State.SAW_ARRAY2_INDEX;
                    } else {
                        state = State.SAW_NOTHING;
                    }
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_ARRAY2_INDEX:
                if ((seen == Const.AALOAD) || (seen == Const.BALOAD) || (seen == Const.CALOAD) || (seen == Const.SALOAD) || (seen == Const.IALOAD)
                        || (seen == Const.LALOAD) || (seen == Const.DALOAD) || (seen == Const.FALOAD)) {
                    loadInstruction = seen;
                    state = State.SAW_ELEM_LOAD;
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_ELEM_LOAD:
                if ((seen == Const.AASTORE) || (seen == Const.BASTORE) || (seen == Const.CASTORE) || (seen == Const.SASTORE) || (seen == Const.IASTORE)
                        || (seen == Const.LASTORE) || (seen == Const.DASTORE) || (seen == Const.FASTORE)) {
                    if (similarArrayInstructions(loadInstruction, seen)) {
                        state = State.SAW_ELEM_STORE;
                    } else {
                        state = State.SAW_NOTHING;
                    }
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_ELEM_STORE:
                if (seen == Const.IINC) {
                    bugReporter.reportBug(new BugInstance(this, "MAC_MANUAL_ARRAY_COPY", NORMAL_PRIORITY).addClass(this).addMethod(this).addSourceLine(this));
                }
                state = State.SAW_NOTHING;
            break;
        }
    }
1370989
public void decode(AsnInputStream ais) throws ParseException {

        this.correlationId = null;
        this.rejectProblem = null;
        this.localOriginated = false;

        try {
            AsnInputStream localAis = ais.readSequenceStream();

            // correlationId
            byte[] buf = TcapFactory.readComponentId(localAis, 0, 1);
            if (buf.length > 0)
                this.setCorrelationId((long) buf[0]);

            // rejectProblem
            int tag = localAis.readTag();
            if (tag != Reject._TAG_REJECT_PROBLEM || localAis.getTagClass() != Tag.CLASS_PRIVATE
                    || !localAis.isTagPrimitive()) {
                throw new ParseException(RejectProblem.generalIncorrectComponentPortion,
                        "RejectProblem in Reject has bad tag or tag class or is not primitive: tag=" + tag + ", tagClass=" + localAis.getTagClass());
            }
            long i1 = localAis.readInteger();
            this.rejectProblem = RejectProblem.getFromInt(i1);

            // Empty parameter
            // we do not parse an empty parameter because it is useless

        } catch (IOException e) {
            throw new ParseException(RejectProblem.generalBadlyStructuredCompPortion, "IOException while decoding Reject: " + e.getMessage(), e);
        } catch (AsnException e) {
            throw new ParseException(RejectProblem.generalBadlyStructuredCompPortion, "AsnException while decoding Reject: " + e.getMessage(), e);
        }
    }
794450
public static void decode(CharSequence in, Appendable out) throws IOException{
		decode(in, UTF_8, out);
	}
974761
public void setCorrelationId(String correlationId) {
        if (correlationId == null) {
            _properties.remove(AMQP_PROP_CORRELATION_ID);
            return;
        }
        
        _properties.put(AMQP_PROP_CORRELATION_ID, correlationId);
    }
83097
private String getCorrelationId(Properties jobParameters) {

        if (jobParameters != null) {
            return jobParameters.getProperty("com_ibm_ws_batch_events_correlationId", null);
        } else {
            return null;
        }
    }
1117972
static void validateDecodingTable(final short[] decodingTable, final short[] encodingTable) {
    for (int decodeThis = 0; decodeThis < 4096; decodeThis++) {
      final int tmpD = decodingTable[decodeThis] & 0xFFFF;
      final int decodedByte   = tmpD & 0xff;
      final int decodedLength = tmpD >> 8;

      final int tmpE = encodingTable[decodedByte] & 0xFFFF;
      final int encodedBitpattern = tmpE & 0xfff;
      final int encodedLength = tmpE >> 12;

      // encodedBitpattern++; // uncomment this line to force failure when testing this method
      // encodedLength++;     // uncomment this line to force failure when testing this method

      assert (decodedLength == encodedLength)
        : "deLen: " + decodedLength + ", enLen: " + encodedLength;
      assert (encodedBitpattern == (decodeThis & ((1 << decodedLength) - 1)));
    }
  }
699926
public void setCharacterEncoding(String encoding)
        throws UnsupportedEncodingException
    {
        if (_inputState!=0)
            throw new IllegalStateException("getReader() or getInputStream() called");
        "".getBytes(encoding);
        _httpRequest.setCharacterEncoding(encoding,false);
    }
584604
public void setCcAddresses(java.util.Collection<String> ccAddresses) {
        if (ccAddresses == null) {
            this.ccAddresses = null;
            return;
        }

        this.ccAddresses = new java.util.ArrayList<String>(ccAddresses);
    }
1104190
@Override
    public String decode( String encodedText ) {
        if (encodedText == null) return null;
        StringBuilder sb = new StringBuilder();
        CharacterIterator iter = new StringCharacterIterator(encodedText);
        for (char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) {
            if (c == '&') {
                int index = iter.getIndex();

                do {
                    // CHECKSTYLE IGNORE check FOR NEXT 1 LINES
                    c = iter.next();
                } while (c != CharacterIterator.DONE && c != ';');

                // We found a closing semicolon
                if (c == ';') {
                    String s = encodedText.substring(index + 1, iter.getIndex());

                    if (SPECIAL_ENTITIES.containsKey(s)) {
                        sb.append(SPECIAL_ENTITIES.get(s));
                        continue;

                    }

                    if (s.length() > 0 && s.charAt(0) == '#') {
                        try {
                            sb.append((char)Short.parseShort(s.substring(1, s.length())));
                            continue;
                        } catch (NumberFormatException nfe) {
                            // This is possible in malformed encodings, but let it fall through
                        }
                    }
                }

                // Malformed encoding, restore state and pass poorly encoded data back
                // CHECKSTYLE IGNORE check FOR NEXT 1 LINES
                c = '&';
                iter.setIndex(index);
            }

            sb.append(c);

        }
        return sb.toString();
    }
819707
public List<ConnectionParams> resolveAll(String correlationId, String key) {
		List<ConnectionParams> connections = new ArrayList<ConnectionParams>();

		synchronized (_lock) {
			for (DiscoveryItem item : _items) {
				if (item.key == key && item.connection != null)
					connections.add(item.connection);
			}
		}

		return connections;
	}
1167223
public void setLinkSpecifiers(java.util.Collection<TypedLinkSpecifier> linkSpecifiers) {
        if (linkSpecifiers == null) {
            this.linkSpecifiers = null;
            return;
        }

        this.linkSpecifiers = new java.util.ArrayList<TypedLinkSpecifier>(linkSpecifiers);
    }
647978
public void nextIteration(double[][] means) {
    this.means = means;
    changed = false;
    final int k = means.length;
    final int dim = means[0].length;
    centroids = new double[k][dim];
    sizes = new int[k];
    Arrays.fill(varsum, 0.);
  }
984588
public static String encode(final String decoded, final String charset) 
        throws UnsupportedEncodingException {
        return s_codec.encode(decoded, charset);
    }