/////////////////// PRIVATE METHODS ///////////////////
551966
function get (fileAndField) { //on main jsoncfg object
  var fields = fileAndField.split(/\:|\./)
    , file = fields.shift()

  if (typeof this[file] != 'undefined')
    return this[file].get(fields.join('.'))
  else
    return undefined
}
986331
@Override
    public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState,
                                String[] propertyNames, Type[] types) {
        if (entity.getClass().isAssignableFrom(AccessControlEntry.class)) {
            return false;
        }

        AccessControlContext accessControlContext = AccessControlContextOverride.exists() ? AccessControlContextOverride.get()
                                                                                          : accessControlContextProvider.getCurrent();

        accessControlHelper.validateContextAllowsWrite(entity.getClass(), id, accessControlContext, false);

        return false;
    }
75675
@Override
    public void out() throws Exception {
        Object val = fa.getFieldValue();
//        Object val = access;

        if (ens.shouldFire()) {
            DataflowEvent e = new DataflowEvent(ens.getController(), this, val);
////            DataflowEvent e = new DataflowEvent(ens.getController(), this, access.toObject());
            ens.fireOut(e);
//            // the value might be altered
            val = e.getValue();
        }
        // if data==null this unconsumed @Out, its OK but we do not want to set it.
        if (data != null) {
            data.setFieldValue(val);
        }
        fa.out();
    }
993801
@Override
    public void visitMethod(final Method obj) {
        methodName = obj.getName();
        if (Values.STATIC_INITIALIZER.equals(methodName) || Values.CONSTRUCTOR.equals(methodName)) {
            return;
        }

        List<String> parms = SignatureUtils.getParameterSignatures(obj.getSignature());

        if (!parms.isEmpty()) {
            boolean isStatic = obj.isStatic();
            isAbstract = obj.isAbstract();

            firstLocalReg = isStatic ? 0 : 1;
            for (String parmSig : parms) {
                firstLocalReg += SignatureUtils.getSignatureSize(parmSig);
            }

            sourceLines = getSourceLines(obj);
        }
    }
168780
public static void checkUnusedParameters(SQLiteModelMethod method, Set<String> usedMethodParameters, TypeName excludedClasses) {
		int paramsCount = method.getParameters().size();
		int usedCount = usedMethodParameters.size();

		if (paramsCount > usedCount) {
			StringBuilder sb = new StringBuilder();
			String separator = "";
			for (Pair<String, TypeName> item : method.getParameters()) {
				if (excludedClasses != null && item.value1.equals(excludedClasses)) {
					usedCount++;
				} else {
					if (!usedMethodParameters.contains(item.value0)) {
						sb.append(separator + "'" + item.value0 + "'");
						separator = ", ";
					}
				}
			}

			if (paramsCount > usedCount) {
				throw (new InvalidMethodSignException(method, "unused parameter(s) " + sb.toString()));
			}
		}
	}
727730
@Override
    public void onXml(ClientProperties cp)
    {
        hsmd.onInitialize();
        if (cp != null)
        {
            hsmd.setClientProperties(cp);
        }
    }
1126843
@Override
    public void onInteractionEvent(final InteractionEvent event) {
        QName id = event.getId();
        QName source = (QName)event.getSource();

        final Set<Procedure> collection = procedures.get(id);
        Procedure execution = null;

        if(collection!=null)
        {
            for(Procedure consumer : collection) {

                // TODO: This isn't optimal (creation of new resource with every comparison)
                Resource<ResourceType> resource = new Resource<ResourceType>(id, ResourceType.Interaction);
                resource.setSource(source);

                boolean justified = consumer.getJustification() == null
                        || source.equals(consumer.getJustification());

                if(consumer.doesConsume(resource) && justified)
                {
                    execution = consumer;
                    break;
                }
            }
        }

        if(null==execution)
        {
            Window.alert("No procedure for " + event);
            Log.warn("No procedure for " + event);
        }
        else if(execution.getPrecondition().isMet(getStatementContext(source)))   // guarded
        {
            try {
                execution.getCommand().execute(InteractionCoordinator.this.dialog, event.getPayload());
            } catch (Throwable e) {
                Log.error("Failed to execute procedure "+execution, e);
            }
        }

    }
695052
public void setAccessed(String id) {
		T obj=get(id,null);
		if (obj!=null){
			obj.setAccessed();
		}
	}
988271
public void doNewRecord(boolean bDisplayOption)
    {
        UserInfo userTemplate = this.getUserTemplate();
        if (userTemplate != null)
        {
            Record userInfo = this.getOwner();
            boolean[] fileListenerStates = userInfo.setEnableListeners(false);
            Object[] fieldListenerStates = userInfo.setEnableFieldListeners(false);
            userInfo.moveFields(userTemplate, null, bDisplayOption, DBConstants.INIT_MOVE, false, false, false, false);
            userInfo.getField(UserInfo.ID).initField(bDisplayOption);
            userInfo.getField(UserInfo.FIRST_NAME).initField(bDisplayOption);
            userInfo.getField(UserInfo.LAST_NAME).initField(bDisplayOption);
            userInfo.getField(UserInfo.USER_NAME).initField(bDisplayOption);
            userInfo.getField(UserInfo.PASSWORD).initField(bDisplayOption);
            userInfo.getField(UserInfo.ID).setModified(false);
            userInfo.getField(UserInfo.FIRST_NAME).setModified(false);
            userInfo.getField(UserInfo.LAST_NAME).setModified(false);
            userInfo.getField(UserInfo.USER_NAME).setModified(false);
            userInfo.getField(UserInfo.PASSWORD).setModified(false);
            userInfo.setEnableListeners(fileListenerStates);
            userInfo.setEnableFieldListeners(fieldListenerStates);
        }
        super.doNewRecord(bDisplayOption);
    }
953704
@Override
	public void init() {
		int count = 10485760;
		RandomAccessFile randomAccessFile;
		String realPath = FileHandlerUtil.generateOutputFilePath(path);

		try {
			if (FileHandlerUtil.isFileAlreadyExists(realPath)) {
				randomAccessFile = new RandomAccessFile(realPath, CoreConstants.READ_WRITE);
			} else {
				randomAccessFile = new RandomAccessFile(new File(realPath), CoreConstants.READ_WRITE);
			}
			// move the cursor to the end of the file
			randomAccessFile.seek(randomAccessFile.length());

			 out = randomAccessFile.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, count);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
858669
public void doNewRecord(boolean bDisplayOption)
    {
        super.doNewRecord(bDisplayOption);
        if (this.getOwner().isOpen())   // Don't do first time!
        {
            String strUserID = ((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID();
            int iUserID = -1;
            if ((strUserID != null) && (strUserID.length() > 0))
                iUserID = Integer.parseInt(strUserID);
            this.getOwner().getField(UserInfo.ID).setValue(iUserID);
            String strOldKey = this.getOwner().getKeyName();
            try   {
                this.getOwner().setKeyArea(UserInfo.ID_KEY);
                if (!this.getOwner().seek("="))
                {
                    this.getOwner().addNew(); // Make a new one
                }
            } catch (DBException ex)    {
                ex.printStackTrace();
            } finally   {
                this.getOwner().setKeyArea(strOldKey);
            }
        }
    }
857416
public static void javaProperty2WhereCondition(MethodSpec.Builder methodBuilder, SQLiteModelMethod method,
			String paramName, TypeName paramType, ModelProperty property) {
		if (property != null && property.hasTypeAdapter()) {
			methodBuilder.addCode(
					AbstractSQLTransform.PRE_TYPE_ADAPTER_TO_STRING + "$L" + AbstractSQLTransform.POST_TYPE_ADAPTER,
					SQLTypeAdapterUtils.class, typeName(property.typeAdapter.adapterClazz),
					PropertyUtility.getter(paramName, paramType, property));
		} else if (property != null) {
			SQLTransform transform = lookup(property.getPropertyType().getTypeName());

			AssertKripton.assertTrueOrUnsupportedFieldTypeException(transform != null, paramType);
			transform.generateWriteProperty2WhereCondition(methodBuilder, paramName, paramType, property);
		} else {
			AssertKripton.assertTrueOrUnsupportedFieldTypeException(false, paramType);
		}
	}
1257882
private void init()
	{

		sum = BigInteger.ZERO;
		sumByMillisec = BigInteger.ZERO;
		currentVal = -1;
		count =0;
		avg = -1;
		max = -1;
		min = -1;
	}
244383
@Override
    public void setMethod(MethodValues method) {
        this.myMethod = method;
        super.setFirstLineChanged();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "setMethod(v): " + (null != method ? method.getName() : null));
        }
    }
949985
@Override
    public void sawOpcode(int seen) {
        boolean sawTextLabel = false;
        boolean sawUIManager = false;
        boolean sawAppend = false;
        try {
            stack.precomputation(this);

            if (OpcodeUtils.isAStore(seen)) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    if ("Ljavax/swing/JLabel;".equals(item.getSignature()) && (S508UserValue.SAW_TEXT_LABEL == item.getUserValue())) {
                        int reg = RegisterUtils.getAStoreReg(this, seen);
                        localLabels.put(Integer.valueOf(reg), SourceLineAnnotation.fromVisitedInstruction(this));
                    }
                }
            } else if (seen == Const.PUTFIELD) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    if (S508UserValue.SAW_TEXT_LABEL != item.getUserValue()) {
                        FieldAnnotation fa = new FieldAnnotation(getDottedClassName(), getNameConstantOperand(), getSigConstantOperand(), false);
                        fieldLabels.remove(XFactory.createXField(fa));
                    }
                }
            } else if (seen == Const.INVOKESPECIAL) {
                String className = getClassConstantOperand();
                String methodName = getNameConstantOperand();
                if ("javax/swing/JLabel".equals(className) && Values.CONSTRUCTOR.equals(methodName)) {
                    String signature = getSigConstantOperand();
                    if (signature.indexOf(Values.SIG_JAVA_LANG_STRING) >= 0) {
                        sawTextLabel = true;
                    }
                }
            } else if (seen == Const.INVOKEVIRTUAL) {
                String className = getClassConstantOperand();
                String methodName = getNameConstantOperand();

                if ("javax/swing/JLabel".equals(className)) {
                    if ("setLabelFor".equals(methodName) && (stack.getStackDepth() > 1)) {
                        OpcodeStack.Item item = stack.getStackItem(1);
                        XField field = item.getXField();
                        if (field != null) {
                            fieldLabels.remove(field);
                        } else {
                            int reg = item.getRegisterNumber();
                            if (reg >= 0) {
                                localLabels.remove(Integer.valueOf(reg));
                            }
                        }
                    }
                } else if (SignatureUtils.isPlainStringConvertableClass(className)) {
                    if ("append".equals(methodName)) {
                        if (stack.getStackDepth() > 0) {
                            OpcodeStack.Item item = stack.getStackItem(0);
                            Object con = item.getConstant();
                            if (con instanceof String) {
                                String literal = (String) con;
                                sawAppend = !literal.startsWith("<");
                            } else {
                                sawAppend = true;
                            }
                        }
                    } else if (Values.TOSTRING.equals(methodName) && (stack.getStackDepth() > 0)) {
                        OpcodeStack.Item item = stack.getStackItem(0);
                        if (S508UserValue.APPENDED_STRING == item.getUserValue()) {
                            sawAppend = true;
                        }
                    }
                }

                processSetSizeOps(methodName);
                processNullLayouts(className, methodName);
                processSetColorOps(methodName);
            } else if ((seen == Const.INVOKESTATIC) && "javax/swing/UIManager".equals(getClassConstantOperand())) {
                sawUIManager = true;
            }

            if ((seen == Const.INVOKEVIRTUAL) || (seen == Const.INVOKESPECIAL) || (seen == Const.INVOKEINTERFACE)) {
                processFaultyGuiStrings();
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if (sawTextLabel) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    item.setUserValue(S508UserValue.SAW_TEXT_LABEL);
                }
            } else if (sawUIManager) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    item.setUserValue(S508UserValue.FROM_UIMANAGER);
                }
            } else if (sawAppend && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(S508UserValue.APPENDED_STRING);
            }
        }
    }
1348497
@Override
    public void visitMethod(final Method obj) {
        methodName = obj.getName();
        methodIsStatic = obj.isStatic();
    }
507142
@Override
  @SuppressWarnings("unchecked")
  public void initialize() {
    LOG.initializeExecution(this);

    ScopeImpl scope = getScopeActivity();
    ensureParentInitialized();

    List<VariableDeclaration> variableDeclarations = (List<VariableDeclaration>) scope.getProperty(BpmnParse.PROPERTYNAME_VARIABLE_DECLARATIONS);
    if (variableDeclarations != null) {
      for (VariableDeclaration variableDeclaration : variableDeclarations) {
        variableDeclaration.initialize(this, parent);
      }
    }

    if (isProcessInstanceExecution()) {
      String initiatorVariableName = (String) processDefinition.getProperty(BpmnParse.PROPERTYNAME_INITIATOR_VARIABLE_NAME);
      if (initiatorVariableName != null) {
        String authenticatedUserId = Context.getCommandContext().getAuthenticatedUserId();
        setVariable(initiatorVariableName, authenticatedUserId);
      }
    }

    // create event subscriptions for the current scope
    for (EventSubscriptionDeclaration declaration : EventSubscriptionDeclaration.getDeclarationsForScope(scope).values()) {
      if(!declaration.isStartEvent()) {
        declaration.createSubscriptionForExecution(this);
      }
    }
  }