This is a mapping of create result message string to state.
487653
def initialize_create_state_map(self):
        
        self.fabric_state_map = {
            fw_const.INIT_STATE_STR: fw_const.OS_IN_NETWORK_STATE,
            fw_const.OS_IN_NETWORK_CREATE_FAIL:
                fw_const.OS_IN_NETWORK_STATE,
            fw_const.OS_IN_NETWORK_CREATE_SUCCESS:
                fw_const.OS_OUT_NETWORK_STATE,
            fw_const.OS_OUT_NETWORK_CREATE_FAIL:
                fw_const.OS_OUT_NETWORK_STATE,
            fw_const.OS_OUT_NETWORK_CREATE_SUCCESS:
                fw_const.OS_DUMMY_RTR_STATE,
            fw_const.OS_DUMMY_RTR_CREATE_FAIL:
                fw_const.OS_DUMMY_RTR_STATE,
            fw_const.OS_DUMMY_RTR_CREATE_SUCCESS:
                fw_const.DCNM_IN_NETWORK_STATE,
            fw_const.DCNM_IN_NETWORK_CREATE_FAIL:
                fw_const.DCNM_IN_NETWORK_STATE,
            fw_const.DCNM_IN_NETWORK_CREATE_SUCCESS:
                fw_const.DCNM_IN_PART_UPDATE_STATE,
            fw_const.DCNM_IN_PART_UPDATE_FAIL:
                fw_const.DCNM_IN_PART_UPDATE_STATE,
            fw_const.DCNM_IN_PART_UPDATE_SUCCESS:
                fw_const.DCNM_OUT_PART_STATE,
            fw_const.DCNM_OUT_PART_CREATE_FAIL:
                fw_const.DCNM_OUT_PART_STATE,
            fw_const.DCNM_OUT_PART_CREATE_SUCCESS:
                fw_const.DCNM_OUT_NETWORK_STATE,
            fw_const.DCNM_OUT_NETWORK_CREATE_FAIL:
                fw_const.DCNM_OUT_NETWORK_STATE,
            fw_const.DCNM_OUT_NETWORK_CREATE_SUCCESS:
                fw_const.DCNM_OUT_PART_UPDATE_STATE,
            fw_const.DCNM_OUT_PART_UPDATE_FAIL:
                fw_const.DCNM_OUT_PART_UPDATE_STATE,
            fw_const.DCNM_OUT_PART_UPDATE_SUCCESS:
                fw_const.FABRIC_PREPARE_DONE_STATE}
372713
def _generate_states_report(sorted_data):
    '''
    
    '''
    states = []
    for state, data in sorted_data:
        module, stateid, name, function = state.split('_|-')
        module_function = '.'.join((module, function))
        result = data.get('result', '')
        single = [
            {'function': module_function},
            {'name': name},
            {'result': result},
            {'duration': data.get('duration', 0.0)},
            {'comment': data.get('comment', '')}
        ]

        if not result:
            style = 'failed'
        else:
            changes = data.get('changes', {})
            if changes and isinstance(changes, dict):
                single.append({'changes': _dict_to_name_value(changes)})
                style = 'changed'
            else:
                style = 'unchanged'

        started = data.get('start_time', '')
        if started:
            single.append({'started': started})

        states.append({stateid: single, '__style__': style})
    return states
1232038
public static Result success(int code, String message) {
        return new Result(true, String.valueOf(code), message);
    }
711799
def process_initialization_message(message)
      entry = @connection.objects.convert_properties_to_object(message.entry)
      @connection.remote_entry.set(entry)
    end
1089157
protected void createRealizationAndState(
    MessageProcessor messageProcessor,
    TransactionCommon transaction)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "createRealizationAndState",
        new Object[] {
          messageProcessor,
          transaction });

                                         
    /*
     * Create associated state handler of appropriate type
     */
      _ptoPRealization = new LinkState(this,
                                          messageProcessor,
                                          getLocalisationManager());
      _protoRealization = _ptoPRealization;
    
          
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "createRealizationAndState");
  }
1187727
public String buildResultsInfoMessageAndClose(FeatureIndexResults results, Projection projection) {
        return buildResultsInfoMessageAndClose(results, 0, null, projection);
    }
1317801
private synchronized void setState(int state) {
        mState = state;

        // Give the new state to the Handler so the UI Activity can update
        mHandler.obtainMessage(ISOBlueDemo.MESSAGE_STATE_CHANGE, state, -1)
                .sendToTarget();
    }
698624
protected Map<String, Message.Builder> getMessageMap() {
    return new HashMap<String, Message.Builder>(messageMap);
  }
304433
public static Result createResultForStage1(Result result) {
    VariableMap emptyVariableMap = new VariableMap(ImmutableMap.of());
    return new Result(
        result.errors,
        result.warnings,
        emptyVariableMap,
        emptyVariableMap,
        emptyVariableMap,
        null,
        null,
        "",
        null,
        null,
        null);
  }
507908
def set_result (self, msg, valid=True, overwrite=False):
        
        if self.has_result and not overwrite:
            log.warn(LOG_CHECK,
              "Double result %r (previous %r) for %s", msg, self.result, self)
        else:
            self.has_result = True
        if not isinstance(msg, unicode):
            log.warn(LOG_CHECK, "Non-unicode result for %s: %r", self, msg)
        elif not msg:
            log.warn(LOG_CHECK, "Empty result for %s", self)
        self.result = msg
        self.valid = valid
        # free content data
        self.data = None
777893
def _toState(self, state, *args, **kwargs):
        
        try:
            method = getattr(self, '_state_%s' % state)
        except AttributeError:
            raise ValueError("No such state %r" % state)

        log.msg("%s: to state %r" % (self.__class__.__name__, state))
        self._state = state
        method(*args, **kwargs)
1070456
def callback(self, result, message):
        
        self.results.put(result)
        message.ack()
215145
def write_result_msg(result)
      msg = if result then
              I18n.t 'config.recreated'
            else
              I18n.t 'config.updated'
            end
      @env.ui.info msg
    end
1074924
private Map processEvent(MatchResult result) {
    Map map = new HashMap();
    //group zero is the entire match - process all other groups
    for (int i = 1; i < result.groupCount() + 1; i++) {
      Object key = matchingKeywords.get(i - 1);
      Object value = result.group(i);
      map.put(key, value);

    }
    return map;
  }
976561
public static String composeMessage(List<ValidationResult> results) {
		StringBuilder builder = new StringBuilder();
		builder.append("Validation failed");

		if (results != null && results.size() > 0) {
			boolean first = true;
			for (ValidationResult result : results) {
				if (result.getType() != ValidationResultType.Information) {
					if (!first)
						builder.append(": ");
					else
						builder.append(", ");
					builder.append(result.getMessage());
					first = false;
				}
			}
		}

		return builder.toString();
	}
495293
function(state) {
	   if(state == inputEx.stateInvalid && this.options.minLength && this.el.value.length < this.options.minLength) {  
	      return inputEx.messages.stringTooShort[0]+this.options.minLength+inputEx.messages.stringTooShort[1];
	   
	   // Add message too long
      } else if (state == inputEx.stateInvalid && this.options.maxLength && this.el.value.length > this.options.maxLength) {
         return inputEx.messages.stringTooLong[0]+this.options.maxLength+inputEx.messages.stringTooLong[1];
      }
	   return inputEx.Textarea.superclass.getStateString.call(this, state);
	}
321731
protected void createRealizationAndState(
                                             MessageProcessor messageProcessor,
                                             TransactionCommon transaction)
                    throws SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "createRealizationAndState",
                        new Object[] {
                                      messageProcessor,
                                      transaction });

        /*
         * Create associated protocol suppor of appropriate type
         */
        if (isPubSub())
        {
            _pubSubRealization = new PubSubRealization(this,
                            messageProcessor,
                            getLocalisationManager(),
                            transaction);
            _protoRealization = _pubSubRealization;
        }
        else
        {

            _ptoPRealization = new JSPtoPRealization(this,
                            messageProcessor,
                            getLocalisationManager());
            _protoRealization = _ptoPRealization;

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createRealizationAndState");
    }