We only handle emitAsShape in the pre-process stage; emitAsMember is
handled in post-process stage, after the marshaller/unmarshaller location
names are calculated in the intermediate model.
330682
private void preprocess_SubstituteShapeReferencesInShape(
            String shapeName, Shape shape, ServiceModel serviceModel) {

        // structure members
        if (shape.getMembers() != null) {
            for (Entry<String, Member> entry : shape.getMembers().entrySet()) {
                String memberName = entry.getKey();
                Member member = entry.getValue();
                String memberShapeName = member.getShape();
                Shape  memberShape = serviceModel.getShapes().get(memberShapeName);

                // First check if it's a list-type member and that the shape of
                // its list element should be substituted
                if (Utils.isListShape(memberShape)) {
                    Member nestedListMember = memberShape.getListMember();
                    String nestedListMemberOriginalShape = nestedListMember.getShape();

                    ShapeSubstitution appliedSubstitutionOnListMember = substitueMemberShape(nestedListMember);
                    if (appliedSubstitutionOnListMember != null &&
                            appliedSubstitutionOnListMember.getEmitFromMember() != null) {
                        // we will handle the emitFromMember customizations in post-process stage
                        trackListMemberSubstitution(shapeName, memberName, nestedListMemberOriginalShape);
                    }
                }
                // Then check if the shape of the member itself is to be substituted
                else {
                    ShapeSubstitution appliedSubstitution = substitueMemberShape(member);
                    if (appliedSubstitution != null &&
                        appliedSubstitution.getEmitFromMember() != null) {
                        // we will handle the emitFromMember customizations in post-process stage
                        trackShapeMemberSubstitution(shapeName, memberName, memberShapeName);
                    }
                }

            }
        }

        // no need to check if the shape is a list, since a list shape is
        // always referenced by a top-level structure shape and that's already
        // handled by the code above

        // map key is not allowed to be substituted
        else if (shape.getMapKeyType() != null) {
            String mapKeyShape = shape.getMapKeyType().getShape();

            if (shapeSubstitutions.containsKey(mapKeyShape)) {
                throw new IllegalStateException(
                        "shapeSubstitution customization found for shape "
                        + mapKeyShape + ", but this shape is the key for a map shape.");
            }
        }
        // map value is not allowed to be substituted
        else if (shape.getMapValueType() != null) {
            String mapValShape = shape.getMapValueType().getShape();

            if (shapeSubstitutions.containsKey(mapValShape)) {
                throw new IllegalStateException(
                        "shapeSubstitution customization found for shape "
                        + mapValShape + ", but this shape is the value for a map shape.");
            }
        }
    }
1109645
function() {
		if (this._chunkReceivedHandler) {
			this.client.removeListener("ChunkReceived", this._chunkReceivedHandler);
		}
		this._chunkReceivedHandler = null;

		//		logger.log("HERE - _waitForMissedChunks done waiting! ", this.getLogInfo());

		this.clearWatch("CompleteTransfer");

		this.stage = Flasher.stages.TEARDOWN;
		this.nextStep();
	}
154049
@Override
    protected void afterExecuteJavaProcess(int rc) {
        if ((rc & ExitCodes.ERROR_FLAG) != 0) {
            throw new BuildException("Execution of SpotBugs failed.");
        }
        if ((rc & ExitCodes.MISSING_CLASS_FLAG) != 0) {
            log("Classes needed for analysis were missing");
        }
        if (warningsProperty != null && (rc & ExitCodes.BUGS_FOUND_FLAG) != 0) {
            getProject().setProperty(warningsProperty, "true");
        }

        if (outputFileName != null) {
            log("Output saved to " + outputFileName);
        }
    }
1190385
@PostConstruct
	@SuppressWarnings("unused")
	protected void postConstruct() throws GeomajasException {
		crs = geoService.getCrs2(getLayerInfo().getCrs());
		srid = geoService.getSridFromCrs(crs);
		filterService.registerFeatureModel(featureModel);
		if (null == featureModel) {
			HibernateFeatureModel hibernateFeatureModel = applicationContext.getBean(HibernateFeatureModel.class);
			hibernateFeatureModel.setSessionFactory(getSessionFactory());
			hibernateFeatureModel.setLayerInfo(getLayerInfo());
			featureModel = hibernateFeatureModel;
		}

	}
854145
@Override
    public void processMessage() {
        // since our computations are symmetric - we aggregate dot everywhere
        if (chunks == null) {
            chunks = new TreeMap<>();
            chunksCounter = new AtomicInteger(1);
            addToChunks(payload);
        }

        clipboard.pin(this);

        //log.info("sI_{} dot aggregation received", transport.getShardIndex());

        if (clipboard.isReady(this.getOriginatorId(), this.getTaskId())) {
            trainer.aggregationFinished(clipboard.unpin(this.getOriginatorId(), this.taskId));
        }
    }
103471
private void processFields() {
    List<Field> children = IntrospectionUtils.getPersistableFields(clazz);
    for (Field child : children) {
      if (child.isAnnotationPresent(Embedded.class)) {
        processEmbeddedField(child);
      } else {
        processSimpleField(child);
      }
    }
  }
342163
private void postProcessOperands(OperatorImpl opImpl, String fullPath)
    throws InvalidXPathSyntaxException  
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(cclass,
               "postProcessOperands",
               "opImpl: " + opImpl + ", fullPath: " + fullPath);        
    // Check for Identifiers with ampersand strings
    for(int i = 0; i< opImpl.operands.length; i++)
    {
      Selector sel = opImpl.operands[i];
      postProcessSelectorTree(sel, fullPath);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "postProcessOperands");      
  }
601914
@Override
	public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException {
		if (bean instanceof Properties && bean != getPrefixedProperties() && getProcessOtherProperties()) {
			final Properties props = (Properties) bean;
			final PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(placeholderPrefix, placeholderSuffix,
					valueSeparator, ignoreUnresolvablePlaceholders);
			final PrefixedProperties clone = getPrefixedProperties().clone();
			clone.putAll(props);
			final Properties beanProperty = (Properties) bean;
			for (final Object key : beanProperty.keySet()) {
				if (key instanceof String) {
					final String stringKey = (String) key;
					props.setProperty(stringKey,
							helper.replacePlaceholders(beanProperty.getProperty(stringKey), clone));
				}
			}
		}
		return bean;
	}
241201
@Override
	public Object postProcessBeforeInitialization(final Object bean, final String beanName) throws BeansException {
		if (bean instanceof EventSubscriber) {
			Subscribe annotation = getAnnotation(bean.getClass(), beanName);
			if (annotation != null) {
				subscribers.put(beanName, annotation);
			}
		}
		return bean;
	}
1159772
@Override
  public void process(Node externs, Node root) {
    checkState(compiler.getLifeCycleStage().isNormalized());
    if (!allowRemovalOfExternProperties) {
      referencedPropertyNames.addAll(compiler.getExternProperties());
    }
    traverseAndRemoveUnusedReferences(root);
    // This pass may remove definitions of getter or setter properties.
    GatherGettersAndSetterProperties.update(compiler, externs, root);
  }
1295651
@Override
    protected void emitEndElement(final INodeReadTrx paramRTX) {
        try {
            indent();
            mOut.write(ECharsForSerializing.OPEN_SLASH.getBytes());
            mOut.write(paramRTX.nameForKey(((ITreeNameData)paramRTX.getNode()).getNameKey()).getBytes());
            mOut.write(ECharsForSerializing.CLOSE.getBytes());
            if (mIndent) {
                mOut.write(ECharsForSerializing.NEWLINE.getBytes());
            }
        } catch (final IOException exc) {
            exc.printStackTrace();
        }
    }
847561
private void postProcessEmbedded(Map<String, String> embNametoUDTQuery,
            Map<String, List<String>> embNametoDependentList)
    {
        for (Map.Entry<String, List<String>> entry : embNametoDependentList.entrySet())
        {
            checkRelationAndExecuteQuery(entry.getKey(), embNametoDependentList, embNametoUDTQuery);
        }
    }
768595
private void handleSerialApiGetInitDataResponse(
			SerialMessage incomingMessage) {
		logger.debug(String.format("Got MessageSerialApiGetInitData response."));
		this.isConnected = true;
		int nodeBytes = incomingMessage.getMessagePayloadByte(2);
		
		if (nodeBytes != NODE_BYTES) {
			logger.error("Invalid number of node bytes = {}", nodeBytes);
			return;
		}

		int nodeId = 1;
		
		// loop bytes
		for (int i = 3;i < 3 + nodeBytes;i++) {
			int incomingByte = incomingMessage.getMessagePayloadByte(i);
			// loop bits in byte
			for (int j=0;j<8;j++) {
				int b1 = incomingByte & (int)Math.pow(2.0D, j);
				int b2 = (int)Math.pow(2.0D, j);
				if (b1 == b2) {
					logger.info(String.format("Found node id = %d", nodeId));
					// Place nodes in the local ZWave Controller 
					this.zwaveNodes.put(nodeId, new ZWaveNode(this.homeId, nodeId, this));
					this.getNode(nodeId).advanceNodeStage();
				}
				nodeId++;
			}
		}
		
		logger.info("------------Number of Nodes Found Registered to ZWave Controller------------");
		logger.info(String.format("# Nodes = %d", this.zwaveNodes.size()));
		logger.info("----------------------------------------------------------------------------");
		
		// Advance node stage for the first node.
	}
428798
public void processIntermediateMatches(List targets, Object result)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "processIntermediateMatches",
        "targets: " + targets + ";results: " + result);

    //((List) result).addAll(targets);
    if (result != null)
       ((TopicAclTraversalResults) result).consolidate(targets);    
       
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "processIntermediateMatches");

  }
759982
@Override
    protected void emitStartElement(final INodeReadTrx paramRTX) throws TTIOException {
        try {
            switch (paramRTX.getNode().getKind()) {
            case ROOT:
                if (mIndent) {
                    mOut.write(ECharsForSerializing.NEWLINE.getBytes());
                }
                break;
            case ELEMENT:
                // Emit start element.
                indent();
                final ITreeNameData namenode = (ITreeNameData)paramRTX.getNode();
                mOut.write(ECharsForSerializing.OPEN.getBytes());
                mOut.write(paramRTX.nameForKey(namenode.getNameKey()).getBytes());
                final long key = paramRTX.getNode().getDataKey();
                // Emit namespace declarations.
                for (int index = 0, length = ((ElementNode)namenode).getNamespaceCount(); index < length; index++) {
                    paramRTX.moveToNamespace(index);
                    if (paramRTX.nameForKey(((ITreeNameData)paramRTX.getNode()).getNameKey()).length() == 0) {
                        mOut.write(ECharsForSerializing.XMLNS.getBytes());
                        write(paramRTX.nameForKey(((ITreeNameData)paramRTX.getNode()).getURIKey()));
                        mOut.write(ECharsForSerializing.QUOTE.getBytes());
                    } else {
                        mOut.write(ECharsForSerializing.XMLNS_COLON.getBytes());
                        write(paramRTX.nameForKey(((ITreeNameData)paramRTX.getNode()).getNameKey()));
                        mOut.write(ECharsForSerializing.EQUAL_QUOTE.getBytes());
                        write(paramRTX.nameForKey(((ITreeNameData)paramRTX.getNode()).getURIKey()));
                        mOut.write(ECharsForSerializing.QUOTE.getBytes());
                    }
                    paramRTX.moveTo(key);
                }
                // Emit attributes.
                // Add virtual rest:id attribute.
                if (mSerializeId) {
                    if (mSerializeRest) {
                        mOut.write(ECharsForSerializing.REST_PREFIX.getBytes());
                    } else {
                        mOut.write(ECharsForSerializing.SPACE.getBytes());
                    }
                    mOut.write(ECharsForSerializing.ID.getBytes());
                    mOut.write(ECharsForSerializing.EQUAL_QUOTE.getBytes());
                    write(paramRTX.getNode().getDataKey());
                    mOut.write(ECharsForSerializing.QUOTE.getBytes());
                }

                // Iterate over all persistent attributes.
                for (int index = 0; index < ((ElementNode)paramRTX.getNode()).getAttributeCount(); index++) {
                    paramRTX.moveToAttribute(index);
                    mOut.write(ECharsForSerializing.SPACE.getBytes());
                    mOut.write(paramRTX.nameForKey(((ITreeNameData)paramRTX.getNode()).getNameKey()).getBytes());
                    mOut.write(ECharsForSerializing.EQUAL_QUOTE.getBytes());
                    mOut.write(paramRTX.getValueOfCurrentNode().getBytes());
                    mOut.write(ECharsForSerializing.QUOTE.getBytes());
                    paramRTX.moveTo(key);
                }
                if (((ITreeStructData)paramRTX.getNode()).hasFirstChild()) {
                    mOut.write(ECharsForSerializing.CLOSE.getBytes());
                } else {
                    mOut.write(ECharsForSerializing.SLASH_CLOSE.getBytes());
                }
                if (mIndent) {
                    mOut.write(ECharsForSerializing.NEWLINE.getBytes());
                }
                break;
            case TEXT:
                indent();
                mOut.write(paramRTX.getValueOfCurrentNode().getBytes());
                if (mIndent) {
                    mOut.write(ECharsForSerializing.NEWLINE.getBytes());
                }
                break;
            }
        } catch (final IOException exc) {
            exc.printStackTrace();
        }
    }
1213321
@Override
    public void doPostPhaseActions(FacesContext facesContext)
    {
        if (!_flashScopeDisabled)
        {
            // do the actions only if this is the last time
            // doPostPhaseActions() is called on this request
            if (_isLastPhaseInRequest(facesContext))
            {
                if (_isRedirectTrueOnThisRequest(facesContext))
                {
                    // copy entries from executeMap to renderMap, if they do not exist
                    Map<String, Object> renderMap = _getRenderFlashMap(facesContext);

                    for (Map.Entry<String, Object> entry 
                        : _getExecuteFlashMap(facesContext).entrySet())
                    {
                        if (!renderMap.containsKey(entry.getKey()))
                        {
                            renderMap.put(entry.getKey(), entry.getValue());
                        }
                    }
                }
            
                // remove execute Map entries from session (--> "destroy" executeMap)
                _clearExecuteFlashMap(facesContext);
            
                // save the current FacesMessages in the renderMap, if wanted
                // Note that this also works on a redirect even though the redirect
                // was already performed and the response has already been committed,
                // because the renderMap is stored in the session.
                _saveMessages(facesContext);
                
                _clearRenderFlashTokenIfMapEmpty(facesContext);
            }
        }
    }
574485
@Override
	public void process() {
		locations.reset();
		descriptions.reset();

		// see if the cell array needs to grow for this image.  Recycle data when growing
		growCellArray(derivX.width, derivX.height);

		computeCellHistograms();

		int cellRowMax = (cellRows - (cellsPerBlockY -1));
		int cellColMax = (cellCols - (cellsPerBlockX -1));

		for (int i = 0; i < cellRowMax; i += stepBlock) {
			for (int j = 0; j < cellColMax; j += stepBlock) {
				computeDescriptor(i,j);
			}
		}

	}