content
stringlengths
40
137k
"private void goUpGroupHierarchyLdap(Set<String> groupDNs, int groupHierarchyLevels, UserInfo userInfo) throws Throwable {\n LOG.debug(\"String_Node_Str\" + groupDNs);\n if (groupHierarchyLevels <= 0 || groupDNs.isEmpty()) {\n return;\n }\n Set<String> nextLevelGroups = new HashSet<String>();\n NamingEnumeration<SearchResult> groupSearchResultEnum = null;\n try {\n createLdapContext();\n int total;\n if (pagedResultsEnabled) {\n ldapContext.setRequestControls(new Control[] { new PagedResultsControl(pagedResultsSize, Control.NONCRITICAL) });\n }\n String groupFilter = \"String_Node_Str\" + groupObjectClass + \"String_Node_Str\";\n if (groupSearchFilter != null && !groupSearchFilter.trim().isEmpty()) {\n String customFilter = groupSearchFilter.trim();\n if (!customFilter.startsWith(\"String_Node_Str\")) {\n customFilter = \"String_Node_Str\" + customFilter + \"String_Node_Str\";\n }\n groupFilter += customFilter + \"String_Node_Str\";\n }\n StringBuilder filter = new StringBuilder();\n for (String groupDN : groupDNs) {\n filter.append(\"String_Node_Str\").append(groupMemberAttributeName).append(\"String_Node_Str\").append(groupDN).append(\"String_Node_Str\");\n }\n filter.append(\"String_Node_Str\");\n groupFilter += filter;\n LOG.debug(\"String_Node_Str\" + groupFilter);\n for (String ou : groupSearchBase) {\n byte[] cookie = null;\n int counter = 0;\n try {\n do {\n groupSearchResultEnum = ldapContext.search(ou, groupFilter, groupSearchControls);\n while (groupSearchResultEnum.hasMore()) {\n final SearchResult groupEntry = groupSearchResultEnum.next();\n if (groupEntry == null) {\n if (LOG.isInfoEnabled()) {\n LOG.info(\"String_Node_Str\");\n }\n continue;\n }\n counter++;\n Attribute groupNameAttr = groupEntry.getAttributes().get(groupNameAttribute);\n if (groupNameAttr == null) {\n if (LOG.isInfoEnabled()) {\n LOG.info(groupNameAttribute + \"String_Node_Str\" + groupEntry.getNameInNamespace() + \"String_Node_Str\");\n }\n continue;\n }\n String groupDN = groupEntry.getNameInNamespace();\n nextLevelGroups.add(groupDN);\n String gName = (String) groupNameAttr.get();\n if (groupNameCaseConversionFlag) {\n if (groupNameLowerCaseFlag) {\n gName = gName.toLowerCase();\n } else {\n gName = gName.toUpperCase();\n }\n }\n if (groupNameRegExInst != null) {\n gName = groupNameRegExInst.transform(gName);\n }\n userInfo.addGroup(gName);\n }\n Control[] controls = ldapContext.getResponseControls();\n if (controls != null) {\n for (Control control : controls) {\n if (control instanceof PagedResultsResponseControl) {\n PagedResultsResponseControl prrc = (PagedResultsResponseControl) control;\n total = prrc.getResultSize();\n if (total != 0) {\n LOG.debug(\"String_Node_Str\" + total);\n } else {\n LOG.debug(\"String_Node_Str\");\n }\n cookie = prrc.getCookie();\n }\n }\n } else {\n LOG.debug(\"String_Node_Str\");\n }\n if (pagedResultsEnabled) {\n ldapContext.setRequestControls(new Control[] { new PagedResultsControl(PAGE_SIZE, cookie, Control.CRITICAL) });\n }\n } while (cookie != null);\n LOG.info(\"String_Node_Str\" + counter);\n } catch (RuntimeException re) {\n LOG.error(\"String_Node_Str\", re);\n throw re;\n } catch (Exception t) {\n LOG.error(\"String_Node_Str\", t);\n LOG.info(\"String_Node_Str\" + counter);\n }\n }\n } catch (RuntimeException re) {\n LOG.error(\"String_Node_Str\", re);\n throw re;\n } finally {\n if (groupSearchResultEnum != null) {\n groupSearchResultEnum.close();\n }\n closeLdapContext();\n }\n goUpGroupHierarchyLdap(nextLevelGroups, groupHierarchyLevels - 1, userInfo);\n}\n"
"private static void serializeResponseObjFieldsXML(StringBuilder sb, ResponseObject obj) {\n boolean isAsync = false;\n if (obj instanceof AsyncJobResponse)\n isAsync = true;\n Field[] fields = obj.getClass().getDeclaredFields();\n for (Field field : fields) {\n if ((field.getModifiers() & Modifier.TRANSIENT) != 0) {\n continue;\n }\n SerializedName serializedName = field.getAnnotation(SerializedName.class);\n if (serializedName == null) {\n continue;\n }\n String propName = field.getName();\n Method method = getGetMethod(obj, propName);\n if (method != null) {\n try {\n Object fieldValue = method.invoke(obj);\n if (fieldValue != null) {\n if (fieldValue instanceof ResponseObject) {\n ResponseObject subObj = (ResponseObject) fieldValue;\n if (isAsync) {\n sb.append(\"String_Node_Str\");\n }\n serializeResponseObjXML(sb, subObj);\n if (isAsync) {\n sb.append(\"String_Node_Str\");\n }\n } else if (fieldValue instanceof List<?>) {\n List<?> subResponseList = (List<Object>) fieldValue;\n for (Object value : subResponseList) {\n if (value instanceof ResponseObject) {\n ResponseObject subObj = (ResponseObject) value;\n serializeResponseObjXML(sb, subObj);\n }\n }\n } else if (fieldValue instanceof Date) {\n sb.append(\"String_Node_Str\" + serializedName.value() + \"String_Node_Str\" + BaseCmd.getDateString((Date) fieldValue) + \"String_Node_Str\" + serializedName.value() + \"String_Node_Str\");\n } else {\n sb.append(\"String_Node_Str\" + serializedName.value() + \"String_Node_Str\" + fieldValue.toString() + \"String_Node_Str\" + serializedName.value() + \"String_Node_Str\");\n }\n }\n } catch (IllegalArgumentException e) {\n s_logger.error(\"String_Node_Str\" + obj.getClass().getName() + \"String_Node_Str\" + propName);\n } catch (IllegalAccessException e) {\n s_logger.error(\"String_Node_Str\" + obj.getClass().getName() + \"String_Node_Str\" + propName);\n } catch (InvocationTargetException e) {\n s_logger.error(\"String_Node_Str\" + obj.getClass().getName() + \"String_Node_Str\" + propName);\n }\n }\n }\n}\n"
"private void assertOpen() throws IOException {\n if (isClosed) {\n throw new IOException(\"String_Node_Str\" + systemId);\n }\n}\n"
"private void adjustScreenOrientation(State state) {\n if (state.isKeyguardShowingAndNotOccluded()) {\n if (mKeyguardScreenRotation) {\n mLp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER;\n } else {\n mLp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;\n }\n } else {\n mLp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;\n }\n}\n"
"public void create() throws ResourceAllocationException {\n try {\n IpAddress ip = null;\n if (!isPortable()) {\n ip = _networkService.allocateIP(_accountService.getAccount(getEntityOwnerId()), getZoneId(), getNetworkId());\n } else {\n ip = _networkService.allocatePortableIP(_accountService.getAccount(getEntityOwnerId()), 1, getZoneId(), getNetworkId(), getVpcId());\n }\n if (ip != null) {\n setEntityId(ip.getId());\n setEntityUuid(ip.getUuid());\n } else {\n throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, \"String_Node_Str\");\n }\n } catch (ConcurrentOperationException ex) {\n s_logger.warn(\"String_Node_Str\", ex);\n throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());\n } catch (InsufficientAddressCapacityException ex) {\n s_logger.info(ex);\n s_logger.trace(ex);\n throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());\n }\n}\n"
"public boolean classEquals(IType type) {\n return this.isSameType(type);\n}\n"
"public void onItemRangeChanged(int startPosition, int itemCount) {\n headersViewByHeadersIds.clear();\n if (startPosition >= isHeaderByItemPosition.size()) {\n return;\n }\n for (int i = 0; i < itemCount; i++) {\n isHeaderByItemPosition.set(i + startPosition, null);\n }\n long startPositionId = adapter.getHeaderId(startPosition);\n if (startPosition > 0) {\n long beforeStartPositionId = adapter.getHeaderId(startPosition - 1);\n isHeaderByItemPosition.set(startPosition, startPositionId != beforeStartPositionId);\n }\n if (startPosition + itemCount < isHeaderByItemPosition.size()) {\n long afterStartPositionId = adapter.getHeaderId(startPosition + itemCount);\n isHeaderByItemPosition.set(startPosition + itemCount, startPositionId != afterStartPositionId);\n }\n}\n"
"private static InnerStateRuntime parse(StateElement stateElement, Map<String, AbstractDefinition> streamDefinitionMap, Map<String, AbstractDefinition> tableDefinitionMap, Map<String, AbstractDefinition> windowDefinitionMap, Map<String, AbstractDefinition> aggregationDefinitionMap, Map<String, Table> tableMap, MetaStateEvent metaStateEvent, SiddhiAppContext siddhiAppContext, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String, ProcessStreamReceiver> processStreamReceiverMap, StreamPreStateProcessor streamPreStateProcessor, StreamPostStateProcessor streamPostStateProcessor, StateInputStream.Type stateType, ArrayList<Map.Entry<Long, Set<Integer>>> withinStates, LatencyTracker latencyTracker, String queryName) {\n if (stateElement instanceof StreamStateElement) {\n BasicSingleInputStream basicSingleInputStream = ((StreamStateElement) stateElement).getBasicSingleInputStream();\n SingleStreamRuntime singleStreamRuntime = SingleInputStreamParser.parseInputStream(basicSingleInputStream, siddhiAppContext, variableExpressionExecutors, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, metaStateEvent, processStreamReceiverMap.get(basicSingleInputStream.getUniqueStreamIds().get(0)), false, false, queryName);\n int stateIndex = metaStateEvent.getStreamEventCount() - 1;\n if (streamPreStateProcessor == null) {\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateset = new HashSet<Integer>();\n withinStateset.add(SiddhiConstants.ANY);\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateset));\n }\n if (stateElement instanceof AbsentStreamStateElement) {\n AbsentStreamPreStateProcessor absentProcessor = new AbsentStreamPreStateProcessor(stateType, clonewithinStates(withinStates), ((AbsentStreamStateElement) stateElement).getWaitingTime());\n siddhiAppContext.addEternalReferencedHolder(absentProcessor);\n EntryValveProcessor entryValveProcessor = new EntryValveProcessor(siddhiAppContext);\n entryValveProcessor.setToLast(absentProcessor);\n Scheduler scheduler = SchedulerParser.parse(siddhiAppContext.getScheduledExecutorService(), entryValveProcessor, siddhiAppContext);\n absentProcessor.setScheduler(scheduler);\n streamPreStateProcessor = absentProcessor;\n } else {\n streamPreStateProcessor = new StreamPreStateProcessor(stateType, clonewithinStates(withinStates));\n }\n streamPreStateProcessor.init(siddhiAppContext, queryName);\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n }\n streamPreStateProcessor.setStateId(stateIndex);\n streamPreStateProcessor.setNextProcessor(singleStreamRuntime.getProcessorChain());\n singleStreamRuntime.setProcessorChain(streamPreStateProcessor);\n if (streamPostStateProcessor == null) {\n if (stateElement instanceof AbsentStreamStateElement) {\n streamPostStateProcessor = new AbsentStreamPostStateProcessor();\n } else {\n streamPostStateProcessor = new StreamPostStateProcessor();\n }\n }\n streamPostStateProcessor.setStateId(stateIndex);\n singleStreamRuntime.getProcessorChain().setToLast(streamPostStateProcessor);\n streamPostStateProcessor.setThisStatePreProcessor(streamPreStateProcessor);\n streamPreStateProcessor.setThisStatePostProcessor(streamPostStateProcessor);\n streamPreStateProcessor.setThisLastProcessor(streamPostStateProcessor);\n StreamInnerStateRuntime innerStateRuntime = new StreamInnerStateRuntime(stateType);\n innerStateRuntime.setFirstProcessor(streamPreStateProcessor);\n innerStateRuntime.setLastProcessor(streamPostStateProcessor);\n innerStateRuntime.addStreamRuntime(singleStreamRuntime);\n return innerStateRuntime;\n } else if (stateElement instanceof NextStateElement) {\n StateElement currentElement = ((NextStateElement) stateElement).getStateElement();\n InnerStateRuntime currentInnerStateRuntime = parse(currentElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, streamPreStateProcessor, streamPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateSet = new HashSet<Integer>();\n withinStateSet.add(currentInnerStateRuntime.getFirstProcessor().getStateId());\n withinStateSet.add(currentInnerStateRuntime.getLastProcessor().getStateId());\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateSet));\n }\n StateElement nextElement = ((NextStateElement) stateElement).getNextStateElement();\n InnerStateRuntime nextInnerStateRuntime = parse(nextElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, streamPreStateProcessor, streamPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n currentInnerStateRuntime.getLastProcessor().setNextStatePreProcessor(nextInnerStateRuntime.getFirstProcessor());\n NextInnerStateRuntime nextStateRuntime = new NextInnerStateRuntime(currentInnerStateRuntime, nextInnerStateRuntime, stateType);\n nextStateRuntime.setFirstProcessor(currentInnerStateRuntime.getFirstProcessor());\n nextStateRuntime.setLastProcessor(nextInnerStateRuntime.getLastProcessor());\n for (SingleStreamRuntime singleStreamRuntime : currentInnerStateRuntime.getSingleStreamRuntimeList()) {\n nextStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n for (SingleStreamRuntime singleStreamRuntime : nextInnerStateRuntime.getSingleStreamRuntimeList()) {\n nextStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n return nextStateRuntime;\n } else if (stateElement instanceof EveryStateElement) {\n StateElement currentElement = ((EveryStateElement) stateElement).getStateElement();\n InnerStateRuntime innerStateRuntime = parse(currentElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, streamPreStateProcessor, streamPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n EveryInnerStateRuntime everyInnerStateRuntime = new EveryInnerStateRuntime(innerStateRuntime, stateType);\n everyInnerStateRuntime.setFirstProcessor(innerStateRuntime.getFirstProcessor());\n everyInnerStateRuntime.setLastProcessor(innerStateRuntime.getLastProcessor());\n for (SingleStreamRuntime singleStreamRuntime : innerStateRuntime.getSingleStreamRuntimeList()) {\n everyInnerStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n everyInnerStateRuntime.getLastProcessor().setNextEveryStatePerProcessor(everyInnerStateRuntime.getFirstProcessor());\n return everyInnerStateRuntime;\n } else if (stateElement instanceof LogicalStateElement) {\n LogicalStateElement.Type type = ((LogicalStateElement) stateElement).getType();\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateset = new HashSet<Integer>();\n withinStateset.add(SiddhiConstants.ANY);\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateset));\n }\n ReentrantLock lock = new ReentrantLock();\n LogicalPreStateProcessor logicalPreStateProcessor1;\n if (((LogicalStateElement) stateElement).getStreamStateElement1() instanceof AbsentStreamStateElement) {\n logicalPreStateProcessor1 = new AbsentLogicalPreStateProcessor(type, stateType, clonewithinStates(withinStates), ((AbsentStreamStateElement) ((LogicalStateElement) stateElement).getStreamStateElement1()).getWaitingTime());\n siddhiAppContext.addEternalReferencedHolder((AbsentLogicalPreStateProcessor) logicalPreStateProcessor1);\n EntryValveProcessor entryValveProcessor = new EntryValveProcessor(siddhiAppContext);\n entryValveProcessor.setToLast(logicalPreStateProcessor1);\n Scheduler scheduler = SchedulerParser.parse(siddhiAppContext.getScheduledExecutorService(), entryValveProcessor, siddhiAppContext);\n ((SchedulingProcessor) logicalPreStateProcessor1).setScheduler(scheduler);\n } else {\n logicalPreStateProcessor1 = new LogicalPreStateProcessor(type, stateType, clonewithinStates(withinStates));\n }\n logicalPreStateProcessor1.init(siddhiAppContext, queryName);\n LogicalPostStateProcessor logicalPostStateProcessor1;\n if (((LogicalStateElement) stateElement).getStreamStateElement1() instanceof AbsentStreamStateElement) {\n logicalPostStateProcessor1 = new AbsentLogicalPostStateProcessor(type);\n } else {\n logicalPostStateProcessor1 = new LogicalPostStateProcessor(type);\n }\n LogicalPreStateProcessor logicalPreStateProcessor2;\n if (((LogicalStateElement) stateElement).getStreamStateElement2() instanceof AbsentStreamStateElement) {\n logicalPreStateProcessor2 = new AbsentLogicalPreStateProcessor(type, stateType, clonewithinStates(withinStates), ((AbsentStreamStateElement) ((LogicalStateElement) stateElement).getStreamStateElement2()).getWaitingTime(), lock);\n siddhiAppContext.addEternalReferencedHolder((AbsentLogicalPreStateProcessor) logicalPreStateProcessor2);\n EntryValveProcessor entryValveProcessor = new EntryValveProcessor(siddhiAppContext);\n entryValveProcessor.setToLast(logicalPreStateProcessor2);\n Scheduler scheduler = SchedulerParser.parse(siddhiAppContext.getScheduledExecutorService(), entryValveProcessor, siddhiAppContext);\n ((SchedulingProcessor) logicalPreStateProcessor2).setScheduler(scheduler);\n } else {\n logicalPreStateProcessor2 = new LogicalPreStateProcessor(type, stateType, clonewithinStates(withinStates));\n }\n logicalPreStateProcessor2.init(siddhiAppContext, queryName);\n LogicalPostStateProcessor logicalPostStateProcessor2;\n if (((LogicalStateElement) stateElement).getStreamStateElement2() instanceof AbsentStreamStateElement) {\n logicalPostStateProcessor2 = new AbsentLogicalPostStateProcessor(type);\n } else {\n logicalPostStateProcessor2 = new LogicalPostStateProcessor(type);\n }\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n logicalPostStateProcessor1.setPartnerPreStateProcessor(logicalPreStateProcessor2);\n logicalPostStateProcessor2.setPartnerPreStateProcessor(logicalPreStateProcessor1);\n logicalPostStateProcessor1.setPartnerPostStateProcessor(logicalPostStateProcessor2);\n logicalPostStateProcessor2.setPartnerPostStateProcessor(logicalPostStateProcessor1);\n logicalPreStateProcessor1.setPartnerStatePreProcessor(logicalPreStateProcessor2);\n logicalPreStateProcessor2.setPartnerStatePreProcessor(logicalPreStateProcessor1);\n StateElement stateElement2 = ((LogicalStateElement) stateElement).getStreamStateElement2();\n InnerStateRuntime innerStateRuntime2 = parse(stateElement2, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, logicalPreStateProcessor2, logicalPostStateProcessor2, stateType, withinStates, latencyTracker, queryName);\n StateElement stateElement1 = ((LogicalStateElement) stateElement).getStreamStateElement1();\n InnerStateRuntime innerStateRuntime1 = parse(stateElement1, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, logicalPreStateProcessor1, logicalPostStateProcessor1, stateType, withinStates, latencyTracker, queryName);\n LogicalInnerStateRuntime logicalInnerStateRuntime = new LogicalInnerStateRuntime(innerStateRuntime1, innerStateRuntime2, stateType);\n logicalInnerStateRuntime.setFirstProcessor(innerStateRuntime1.getFirstProcessor());\n logicalInnerStateRuntime.setLastProcessor(innerStateRuntime2.getLastProcessor());\n for (SingleStreamRuntime singleStreamRuntime : innerStateRuntime2.getSingleStreamRuntimeList()) {\n logicalInnerStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n for (SingleStreamRuntime singleStreamRuntime : innerStateRuntime1.getSingleStreamRuntimeList()) {\n logicalInnerStateRuntime.addStreamRuntime(singleStreamRuntime);\n }\n return logicalInnerStateRuntime;\n } else if (stateElement instanceof CountStateElement) {\n int minCount = ((CountStateElement) stateElement).getMinCount();\n int maxCount = ((CountStateElement) stateElement).getMaxCount();\n if (minCount == SiddhiConstants.ANY) {\n minCount = 0;\n }\n if (maxCount == SiddhiConstants.ANY) {\n maxCount = Integer.MAX_VALUE;\n }\n if (stateElement.getWithin() != null) {\n Set<Integer> withinStateset = new HashSet<Integer>();\n withinStateset.add(SiddhiConstants.ANY);\n withinStates.add(0, new AbstractMap.SimpleEntry<Long, Set<Integer>>(stateElement.getWithin().getValue(), withinStateset));\n }\n CountPreStateProcessor countPreStateProcessor = new CountPreStateProcessor(minCount, maxCount, stateType, withinStates);\n countPreStateProcessor.init(siddhiAppContext, queryName);\n CountPostStateProcessor countPostStateProcessor = new CountPostStateProcessor(minCount, maxCount);\n if (stateElement.getWithin() != null) {\n withinStates.remove(0);\n }\n countPreStateProcessor.setCountPostStateProcessor(countPostStateProcessor);\n StateElement currentElement = ((CountStateElement) stateElement).getStreamStateElement();\n InnerStateRuntime innerStateRuntime = parse(currentElement, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap, tableMap, metaStateEvent, siddhiAppContext, variableExpressionExecutors, processStreamReceiverMap, countPreStateProcessor, countPostStateProcessor, stateType, withinStates, latencyTracker, queryName);\n return new CountInnerStateRuntime((StreamInnerStateRuntime) innerStateRuntime);\n } else {\n throw new OperationNotSupportedException();\n }\n}\n"
"protected void onDraw(Canvas c) {\n fpsCounter.inc();\n isBusy = true;\n c.concat(matrix0);\n c.save();\n if (showMode == 0) {\n spectrumPlot.drawSpectrumPlot(c, savedDBSpectrum);\n } else {\n drawSpectrogramPlot(c);\n }\n isBusy = false;\n}\n"
"public void execute() throws IOException {\n final ReadsWriter writer = new ReadsWriter(new FileOutputStream(outputFilename));\n try {\n final ProgressLogger progress = new ProgressLogger(LOG);\n final SAMFileReader parser = new SAMFileReader(new File(inputFilename));\n parser.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);\n progress.start();\n for (final SAMRecord samRecord : parser) {\n final String readId = samRecord.getReadName();\n writer.setIdentifier(readId);\n writer.setSequence(byteToString(samRecord.getReadBases()));\n writer.setQualityScores(remove33(samRecord.getBaseQualities()));\n writer.appendEntry();\n progress.lightUpdate();\n }\n } finally {\n writer.close();\n }\n}\n"
"private void parseRelations(String persistenceUnit, List<TableInfo> tableInfos, EntityMetadata entityMetadata, TableInfo tableInfo, List<Relation> relations) {\n for (Relation relation : relations) {\n Class entityClass = relation.getTargetEntity();\n EntityMetadata targetEntityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass);\n if (targetEntityMetadata == null) {\n log.error(\"String_Node_Str\" + entityClass + \"String_Node_Str\");\n throw new SchemaGenerationException(\"String_Node_Str\" + entityClass + \"String_Node_Str\");\n }\n ForeignKey relationType = relation.getType();\n if (targetEntityMetadata != null && relationType.equals(ForeignKey.ONE_TO_MANY) && relation.getJoinColumnName(kunderaMetadata) != null) {\n if (targetEntityMetadata.equals(entityMetadata)) {\n tableInfo.addColumnInfo(getJoinColumn(tableInfo, relation.getJoinColumnName(kunderaMetadata), entityMetadata.getIdAttribute().getJavaType()));\n } else {\n String pu = targetEntityMetadata.getPersistenceUnit();\n Type targetEntityType = targetEntityMetadata.getType();\n Class idClass = targetEntityMetadata.getIdAttribute().getJavaType();\n String idName = ((AbstractAttribute) targetEntityMetadata.getIdAttribute()).getJPAColumnName();\n TableInfo targetTableInfo = new TableInfo(targetEntityMetadata.getTableName(), targetEntityType.name(), idClass, idName);\n if (!pu.equals(persistenceUnit)) {\n List<TableInfo> targetTableInfos = getSchemaInfo(pu);\n addJoinColumnToInfo(relation.getJoinColumnName(kunderaMetadata), targetTableInfo, targetTableInfos, entityMetadata);\n puToSchemaMetadata.put(pu, targetTableInfos);\n } else {\n addJoinColumnToInfo(relation.getJoinColumnName(kunderaMetadata), targetTableInfo, tableInfos, entityMetadata);\n }\n }\n } else if (relation.isUnary() && relation.getJoinColumnName(kunderaMetadata) != null) {\n if (!relation.isJoinedByPrimaryKey()) {\n tableInfo.addColumnInfo(getJoinColumn(tableInfo, relation.getJoinColumnName(kunderaMetadata), targetEntityMetadata.getIdAttribute().getJavaType()));\n }\n } else if ((relationType.equals(ForeignKey.MANY_TO_MANY)) && (entityMetadata.isRelationViaJoinTable())) {\n JoinTableMetadata joinTableMetadata = relation.getJoinTableMetadata();\n String joinTableName = joinTableMetadata != null ? joinTableMetadata.getJoinTableName() : null;\n String joinColumnName = joinTableMetadata != null ? (String) joinTableMetadata.getJoinColumns().toArray()[0] : null;\n String inverseJoinColumnName = joinTableMetadata != null ? (String) joinTableMetadata.getInverseJoinColumns().toArray()[0] : null;\n if (joinTableName != null) {\n TableInfo joinTableInfo = new TableInfo(joinTableName, Type.COLUMN_FAMILY.name(), String.class, \"String_Node_Str\");\n if (!tableInfos.isEmpty() && !tableInfos.contains(joinTableInfo) || tableInfos.isEmpty()) {\n joinTableInfo.addColumnInfo(getJoinColumn(joinTableInfo, joinColumnName, entityMetadata.getIdAttribute().getJavaType()));\n joinTableInfo.addColumnInfo(getJoinColumn(joinTableInfo, inverseJoinColumnName, targetEntityMetadata.getIdAttribute().getJavaType()));\n tableInfos.add(joinTableInfo);\n }\n }\n }\n }\n}\n"
"private void parse() {\n int nargs = args.length;\n int skip = 0;\n for (int i = 0; i < nargs; i += 1 + skip) {\n skip = 0;\n String nextArg = args[i];\n if (nextArg.length() < 2 || nextArg.charAt(0) != '-') {\n nonOptionArgs.add(nextArg);\n continue;\n }\n if (\"String_Node_Str\".equals(nextArg)) {\n for (int j = i + 1; j < nargs; j++) {\n nonOptionArgs.add(args[j]);\n }\n return;\n }\n if (nextArg.charAt(1) == '-') {\n int equalPos = nextArg.indexOf('=');\n String flag = (equalPos != -1) ? nextArg.substring(2, equalPos) : nextArg.substring(2);\n List opts = programOptions.getLongOptions(flag);\n if (opts.size() == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\" + flag);\n }\n if (opts.size() > 1) {\n throw new IllegalArgumentException(\"String_Node_Str\" + flag);\n }\n Option option = (Option) opts.get(0);\n if (option.getArgumentType().equals(ArgumentType.NO_ARGUMENT)) {\n suppliedOptions.put(option, null);\n continue;\n }\n if (equalPos != -1) {\n String argument = (equalPos + 1 < nextArg.length()) ? nextArg.substring(equalPos + 1) : \"String_Node_Str\";\n suppliedOptions.put(option, argument);\n continue;\n }\n if (option.getArgumentType().equals(ArgumentType.REQUIRED_ARGUMENT)) {\n if (i + 1 < nargs) {\n String argument = args[i++];\n suppliedOptions.put(option, argument);\n continue;\n }\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n } else {\n int shortSeqSize = nextArg.length();\n for (int j = 1; j < shortSeqSize; j++) {\n char curChar = nextArg.charAt(j);\n Option option = programOptions.getShortOption(curChar);\n if (option == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + curChar);\n }\n if (option.getArgumentType().equals(ArgumentType.NO_ARGUMENT)) {\n suppliedOptions.put(option, null);\n continue;\n }\n if (j < shortSeqSize) {\n String argument = nextArg.substring(j + 1);\n suppliedOptions.put(option, argument);\n continue;\n }\n if (option.getArgumentType().equals(ArgumentType.REQUIRED_ARGUMENT)) {\n if (i + 1 < nargs) {\n String argument = args[i++];\n suppliedOptions.put(option, argument);\n continue;\n }\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n }\n }\n}\n"
"private void updateNotifications() {\n mSortedDevices = new ArrayList<>(mDeviceAddressToUrl.keySet());\n Collections.sort(mSortedDevices, mComparator);\n if (mSortedDevices.size() == 0) {\n mNotificationManager.cancelAll();\n return;\n }\n if (mSortedDevices.size() > 0) {\n updateNearbyBeaconNotification(mDeviceAddressToUrl.get(mSortedDevices.get(0)), NEAREST_BEACON_NOTIFICATION_ID);\n }\n if (mSortedDevices.size() > 1) {\n updateNearbyBeaconNotification(mDeviceAddressToUrl.get(mSortedDevices.get(1)), SECOND_NEAREST_BEACON_NOTIFICATION_ID);\n updateSummaryNotification();\n }\n}\n"
"public void onClick(ClickEvent event) {\n hablarEventBus.fireEvent(new OpenPageEvent(PageLogic.this));\n}\n"
"public void addEntryOrdered(Entry e) {\n if (e == null)\n return;\n float val = e.getVal();\n if (mYVals == null) {\n mYVals = new ArrayList<T>();\n }\n if (mYVals.size() == 0) {\n mYMax = val;\n mYMin = val;\n } else {\n if (mYMax < val)\n mYMax = val;\n if (mYMin > val)\n mYMin = val;\n }\n mYValueSum += val;\n if (mYVals.size() > 0 && mYVals.get(mYVals.size() - 1).getXIndex() > e.getXIndex()) {\n int closestIndex = getEntryIndex(e.getXIndex(), Rounding.UP);\n mYVals.add(closestIndex, (T) e);\n return;\n }\n mYVals.add((T) e);\n}\n"
"public float getSwfFrameRate(int swfIndex) {\n return iggySwfs.get(swfIndex).getHdr().getFrameRate();\n}\n"
"public void setColumnBinary(byte[] columnBinary) {\n realmSetter$columnBinary(columnBinary);\n}\n"
"public static ValueLobDb createTempClob(Reader in, long length, DataHandler handler) {\n try {\n boolean compress = handler.getLobCompressionAlgorithm(Value.CLOB) != null;\n long remaining = Long.MAX_VALUE;\n if (length >= 0 && length < remaining) {\n remaining = length;\n }\n int len = getBufferSize(handler, compress, remaining);\n char[] buff;\n if (len >= Integer.MAX_VALUE) {\n String data = IOUtils.readStringAndClose(reader, -1);\n buff = data.toCharArray();\n len = buff.length;\n } else {\n buff = new char[len];\n len = IOUtils.readFully(in, buff, len);\n len = len < 0 ? 0 : len;\n }\n if (len <= handler.getMaxLengthInplaceLob()) {\n byte[] small = new String(buff, 0, len).getBytes(Constants.UTF8);\n return ValueLobDb.createSmallLob(Value.CLOB, small, len);\n }\n ValueLobDb lob = new ValueLobDb(handler, buff, len, in, remaining);\n return lob;\n } catch (IOException e) {\n throw DbException.convertIOException(e, null);\n }\n}\n"
"void addCallableMemberDescriptor(CallableMemberDescriptor memberDesc) {\n final int paramCount = memberDesc.paramTypes.length;\n memberDescs.add(memberDesc);\n final Class[] preprocessedParamTypes = preprocessParameterTypes(memberDesc);\n final Class[] unwrappingHints = (Class[]) preprocessedParamTypes.clone();\n if (unwrappingHintsByParamCount == null) {\n unwrappingHintsByParamCount = new Class[paramCount + 1][];\n unwrappingHintsByParamCount[paramCount] = unwrappingHints;\n } else if (unwrappingHintsByParamCount.length <= paramCount) {\n Class[][] newUnwrappingHintsByParamCount = new Class[paramCount + 1][];\n System.arraycopy(unwrappingHintsByParamCount, 0, newUnwrappingHintsByParamCount, 0, unwrappingHintsByParamCount.length);\n unwrappingHintsByParamCount = newUnwrappingHintsByParamCount;\n unwrappingHintsByParamCount[paramCount] = unwrappingHints;\n } else {\n Class[] prevUnwrappingHints = unwrappingHintsByParamCount[paramCount];\n if (prevUnwrappingHints == null) {\n unwrappingHintsByParamCount[paramCount] = unwrappingHints;\n } else {\n for (int i = 0; i < prevUnwrappingHints.length; ++i) {\n prevUnwrappingHints[i] = MethodUtilities.getMostSpecificCommonType(prevUnwrappingHints[i], unwrappingHints[i]);\n }\n }\n }\n afterWideningUnwrappingHints(incompatibleImprovements >= 2003021 ? preprocessedParamTypes : unwrappingHints);\n}\n"
"public static boolean setProperty(Object o, String name, String value) {\n if (debugLevel > 1) {\n debug(\"String_Node_Str\" + o.getClass() + \"String_Node_Str\" + name + \"String_Node_Str\" + value + \"String_Node_Str\");\n }\n String setter = \"String_Node_Str\" + capitalize(name);\n try {\n Method[] methods = findMethods(o.getClass());\n Method setPropertyMethodVoid = null;\n Method setPropertyMethodBool = null;\n for (Method method : methods) {\n Class<?>[] paramTypes = method.getParameterTypes();\n if (setter.equals(method.getName()) && paramTypes.length == 1 && \"String_Node_Str\".equals(paramTypes[0].getName())) {\n method.invoke(o, value);\n return true;\n }\n }\n for (Method method : methods) {\n boolean ok = true;\n if (setter.equals(method.getName()) && method.getParameterTypes().length == 1) {\n Class<?> paramType = method.getParameterTypes()[0];\n Object[] params = new Object[1];\n if (\"String_Node_Str\".equals(paramType.getName()) || \"String_Node_Str\".equals(paramType.getName())) {\n try {\n params[0] = new Integer(value);\n } catch (NumberFormatException ex) {\n ok = false;\n }\n } else if (\"String_Node_Str\".equals(paramType.getName()) || \"String_Node_Str\".equals(paramType.getName())) {\n try {\n params[0] = new Long(value);\n } catch (NumberFormatException ex) {\n ok = false;\n }\n } else if (\"String_Node_Str\".equals(paramType.getName()) || \"String_Node_Str\".equals(paramType.getName())) {\n params[0] = Boolean.valueOf(value);\n } else if (\"String_Node_Str\".equals(paramType.getName())) {\n try {\n params[0] = InetAddress.getByName(value);\n } catch (UnknownHostException exc) {\n debug(\"String_Node_Str\" + value);\n ok = false;\n }\n } else {\n debug(\"String_Node_Str\" + paramType.getName());\n }\n if (ok) {\n method.invoke(o, params);\n return true;\n }\n }\n if (\"String_Node_Str\".equals(method.getName())) {\n if (method.getReturnType().equals(Boolean.TYPE)) {\n setPropertyMethodBool = method;\n } else {\n setPropertyMethodVoid = method;\n }\n }\n }\n if (setPropertyMethodBool != null || setPropertyMethodVoid != null) {\n Object[] params = new Object[2];\n params[0] = name;\n params[1] = value;\n if (setPropertyMethodBool != null) {\n try {\n return (Boolean) setPropertyMethodBool.invoke(o, params);\n } catch (IllegalArgumentException biae) {\n if (setPropertyMethodVoid != null) {\n setPropertyMethodVoid.invoke(o, params);\n return true;\n } else {\n throw biae;\n }\n }\n } else {\n setPropertyMethodVoid.invoke(o, params);\n return true;\n }\n }\n } catch (IllegalArgumentException ex2) {\n logger.log(Level.INFO, \"String_Node_Str\" + o + \"String_Node_Str\" + name + \"String_Node_Str\" + value, ex2);\n } catch (SecurityException ex1) {\n if (debugLevel > 0) {\n debug(\"String_Node_Str\" + o.getClass() + \"String_Node_Str\" + name + \"String_Node_Str\" + value + \"String_Node_Str\");\n }\n if (debugLevel > 1) {\n ex1.printStackTrace();\n }\n } catch (IllegalAccessException iae) {\n if (debugLevel > 0) {\n debug(\"String_Node_Str\" + o.getClass() + \"String_Node_Str\" + name + \"String_Node_Str\" + value + \"String_Node_Str\");\n }\n if (debugLevel > 1) {\n iae.printStackTrace();\n }\n } catch (InvocationTargetException ie) {\n if (debugLevel > 0) {\n debug(\"String_Node_Str\" + o.getClass() + \"String_Node_Str\" + name + \"String_Node_Str\" + value + \"String_Node_Str\");\n }\n if (debugLevel > 1) {\n ie.printStackTrace();\n }\n }\n return false;\n}\n"
"private ComponentInfo internalRequestDefaultComponent(int requestor, String type) throws NoDefaultComponentException {\n String defaultComponentName = null;\n ComponentInfo defaultComponentInfo = null;\n synchronized (defaultComponents) {\n defaultComponentInfo = defaultComponents.get(type);\n }\n if (defaultComponentInfo != null)\n defaultComponentName = defaultComponentInfo.getName();\n if (defaultComponentName == null) {\n DAOProxy componentsDAO = getComponentsDAOProxy();\n if (componentsDAO != null) {\n try {\n componentsDAO.get_field_data(\"String_Node_Str\");\n String[] ids = getComponentsList();\n for (int i = 0; i < ids.length; i++) {\n String name = ids[i];\n if (name == null) {\n logger.log(Level.WARNING, \"String_Node_Str\" + ids[i] + \"String_Node_Str\");\n continue;\n }\n if (!name.equals(ComponentSpec.COMPSPEC_ANY)) {\n String componentType = readStringCharacteristics(componentsDAO, ids[i] + \"String_Node_Str\");\n if (type == null) {\n logger.log(Level.WARNING, \"String_Node_Str\" + name + \"String_Node_Str\");\n continue;\n }\n final String TRUE_STRING = \"String_Node_Str\";\n if (type.equals(componentType)) {\n String isDefault = readStringCharacteristics(componentsDAO, ids[i] + \"String_Node_Str\", true);\n if (isDefault == null || !isDefault.equalsIgnoreCase(TRUE_STRING))\n continue;\n defaultComponentName = name;\n break;\n }\n }\n }\n } catch (Throwable ex) {\n CoreException ce = new CoreException(\"String_Node_Str\", ex);\n reportException(ce);\n }\n }\n }\n if (defaultComponentInfo != null) {\n try {\n StatusHolder status = new StatusHolder();\n ContainerInfo containerInfo = getContainerInfo(defaultComponentInfo.getContainer());\n if (containerInfo == null) {\n CoreException huse = new CoreException(\"String_Node_Str\" + defaultComponentName + \"String_Node_Str\" + HandleHelper.toString(defaultComponentInfo.getContainer()) + \"String_Node_Str\");\n reportException(huse);\n return null;\n }\n ComponentInfo componentInfo = internalRequestComponent(requestor, defaultComponentInfo.getName(), defaultComponentInfo.getType(), defaultComponentInfo.getCode(), containerInfo.getName(), RELEASE_IMMEDIATELY, status, true);\n if (componentInfo == null || status.getStatus() != ComponentStatus.COMPONENT_ACTIVATED) {\n CoreException huse = new CoreException(\"String_Node_Str\" + defaultComponentName + \"String_Node_Str\");\n reportException(huse);\n return null;\n }\n return componentInfo;\n } catch (Throwable t) {\n CoreException huse = new CoreException(\"String_Node_Str\" + defaultComponentName + \"String_Node_Str\", t);\n reportException(huse);\n return null;\n }\n } else if (defaultComponentName != null) {\n URI curl = null;\n try {\n curl = CURLHelper.createURI(defaultComponentName);\n } catch (URISyntaxException use) {\n CoreException huse = new CoreException(\"String_Node_Str\" + defaultComponentName + \"String_Node_Str\", use);\n reportException(huse);\n return null;\n }\n try {\n StatusHolder status = new StatusHolder();\n Component component = internalRequestComponent(requestor, curl, status, true);\n if (component == null || status.getStatus() != ComponentStatus.COMPONENT_ACTIVATED) {\n CoreException huse = new CoreException(\"String_Node_Str\" + defaultComponentName + \"String_Node_Str\");\n reportException(huse);\n return null;\n }\n ComponentInfo[] componentInfo = getComponentInfo(requestor, new int[0], defaultComponentName, type, true);\n if (componentInfo == null || componentInfo.length != 1) {\n CoreException huse = new CoreException(\"String_Node_Str\" + defaultComponentName + \"String_Node_Str\");\n reportException(huse);\n return null;\n } else\n return componentInfo[0];\n } catch (Throwable t) {\n CoreException huse = new CoreException(\"String_Node_Str\" + defaultComponentName + \"String_Node_Str\", t);\n reportException(huse);\n return null;\n }\n }\n NoDefaultComponentException ndce = new NoDefaultComponentException(\"String_Node_Str\" + type + \"String_Node_Str\");\n throw ndce;\n}\n"
"public void recalculateEventHeightInInterval(int startPosition, int stopPosition) {\n if (startPosition < 0) {\n startPosition = 0;\n }\n if (stopPosition >= elementTable.length) {\n stopPosition = (elementTable.length - 1);\n }\n for (int x = startPosition; x < stopPosition; x++) {\n elementTable[x].intervalHeight = (int) Math.ceil((double) elementTable[x].intervalNbEvents * heightFactor);\n }\n}\n"
"public void setLastCreatedID(String id) {\n try {\n int year = Integer.parseInt(id.substring(0, 4));\n int month = Integer.parseInt(id.substring(4, 6));\n int day = Integer.parseInt(id.substring(6, 8));\n int count = Integer.parseInt(id.substring(8));\n this.count = count + 1;\n lastTimeStamp.set(Calendar.YEAR, year);\n lastTimeStamp.set(Calendar.MONTH, month);\n lastTimeStamp.set(Calendar.DAY_OF_MONTH, day);\n } catch (Exception e) {\n LOGGER.error(\"String_Node_Str\", e);\n }\n}\n"
"public void closeYear(Year year) throws AxelorException {\n year = Year.find(year.getId());\n Status status = Status.findByCode(\"String_Node_Str\");\n for (Period period : year.getPeriodList()) {\n period.setStatus(status);\n }\n Company company = year.getCompany();\n if (company == null) {\n throw new AxelorException(String.format(\"String_Node_Str\", GeneralServiceAccount.getExceptionAccountingMsg(), year.getName()), IException.CONFIGURATION_ERROR);\n }\n Query q = JPA.em().createQuery(\"String_Node_Str\");\n q.setParameter(1, year.getFromDate());\n q.setParameter(2, year.getToDate());\n q.setParameter(3, year.getCompany());\n List<Partner> partnerList = q.getResultList();\n List<? extends Partner> partnerListAll = Partner.all().fetch();\n LOG.debug(\"String_Node_Str\", partnerListAll.size());\n LOG.debug(\"String_Node_Str\", partnerList.size());\n AccountConfig accountConfig = accountConfigService.getAccountConfig(company);\n Account customerAccount = accountConfigService.getCustomerAccount(accountConfig);\n Account doubtfulCustomerAccount = accountConfigService.getDoubtfulCustomerAccount(accountConfig);\n for (Partner partner : partnerList) {\n partner = Partner.find(partner.getId());\n LOG.debug(\"String_Node_Str\", partner.getName());\n boolean find = false;\n for (ReportedBalance reportedBalance : partner.getReportedBalanceList()) {\n if (reportedBalance.getCompany().equals(company)) {\n LOG.debug(\"String_Node_Str\");\n ReportedBalanceLine reportedBalanceLine = this.createReportedBalanceLine(reportedBalance, this.computeReportedBalance(year.getFromDate(), year.getToDate(), partner, customerAccount, doubtfulCustomerAccount), year);\n LOG.debug(\"String_Node_Str\", reportedBalanceLine);\n reportedBalance.getReportedBalanceLineList().add(reportedBalanceLine);\n reportedBalance.save();\n find = true;\n }\n }\n if (!find) {\n LOG.debug(\"String_Node_Str\");\n ReportedBalance reportedBalance = this.createReportedBalance(company, partner);\n ReportedBalanceLine reportedBalanceLine = this.createReportedBalanceLine(reportedBalance, this.computeReportedBalance(year.getFromDate(), year.getToDate(), partner, customerAccount, doubtfulCustomerAccount), year);\n LOG.debug(\"String_Node_Str\", reportedBalanceLine);\n reportedBalance.getReportedBalanceLineList().add(reportedBalanceLine);\n reportedBalance.save();\n }\n partner.save();\n }\n year.setStatus(status);\n year.save();\n}\n"
"public static IFile findReferenceFile(ERepositoryObjectType type, Item item, String fileExtension) {\n IFolder folder = RepositoryResourceUtil.getFolder(type);\n String path = item.getState().getPath();\n if (path != null && path.length() > 0) {\n folder = folder.getFolder(path);\n }\n String name = null;\n Property property = item.getProperty();\n name = property.getLabel();\n String fileName = name + UNDERLINE + property.getVersion() + DOT + (fileExtension != null ? fileExtension : \"String_Node_Str\");\n IFile file = folder.getFile(fileName);\n return file;\n}\n"
"private void createIndexFiles() throws OutputFormatterException {\n Map<String, IndexerDataObject> completeMap = getCompleteIndexerMap();\n StringBuffer keyLinks = getKeyLinks(completeMap);\n int i = 1;\n for (Map.Entry<String, IndexerDataObject> entry : completeMap.entrySet()) {\n StringBuffer html = new StringBuffer();\n html.append(HtmlUtils.getStartTags(\"String_Node_Str\" + i, \"String_Node_Str\"));\n Map<String, String> replacementMap = new HashMap<String, String>();\n replacementMap.put(\"String_Node_Str\", \"String_Node_Str\");\n replacementMap.put(\"String_Node_Str\", \"String_Node_Str\");\n replacementMap.put(\"String_Node_Str\", keyLinks.toString());\n buildHeader(html, replacementMap, \"String_Node_Str\");\n html.append(\"String_Node_Str\" + entry.getKey() + \"String_Node_Str\");\n List<IndexerBaseDataObject> data = entry.getValue().getDataObjects();\n Collections.sort(data);\n for (IndexerBaseDataObject dataObj : data) {\n if (!(dataObj instanceof IndexerType)) {\n String baseHref = \"String_Node_Str\" + dataObj.getPackageName();\n String typeDesc = \"String_Node_Str\";\n String baseTitleDesc = \"String_Node_Str\";\n String baseName = \"String_Node_Str\";\n String baseDoc = \"String_Node_Str\";\n String inPageHref = dataObj.getBaseName();\n if (dataObj instanceof IndexerOperationHolder) {\n baseHref = baseHref + SEPARATOR + dataObj.getServiceName() + Constants.DOT_HTML;\n typeDesc = \"String_Node_Str\";\n baseName = dataObj.getServiceName();\n baseTitleDesc = typeDesc + baseName;\n IndexerOperationHolder opHolder = (IndexerOperationHolder) dataObj;\n if (opHolder.getOperation().getAnnotations() != null && opHolder.getOperation().getAnnotations().getDocumentation() != null) {\n baseDoc = opHolder.getOperation().getAnnotations().getDocumentation();\n }\n }\n if (dataObj instanceof IndexerElementHolder) {\n IndexerElementHolder elemHolder = (IndexerElementHolder) dataObj;\n if (elemHolder.isReqResp()) {\n baseHref = baseHref + SEPARATOR + dataObj.getServiceName() + Constants.DOT_HTML;\n if (elemHolder.isInput()) {\n typeDesc = \"String_Node_Str\";\n } else {\n typeDesc = \"String_Node_Str\";\n }\n baseName = dataObj.getServiceName();\n baseTitleDesc = typeDesc + baseName;\n inPageHref = elemHolder.getOperationHolder().getBaseName();\n } else {\n baseHref = baseHref + TYPES + elemHolder.getElement().getContainerComplexType().getName() + Constants.DOT_HTML;\n if (elemHolder.getElement() instanceof Element) {\n typeDesc = \"String_Node_Str\";\n } else {\n typeDesc = \"String_Node_Str\";\n }\n baseName = elemHolder.getElement().getContainerComplexType().getName();\n baseTitleDesc = typeDesc + baseName;\n }\n if (elemHolder.getElement().getAnnotationInfo() != null && elemHolder.getElement().getAnnotationInfo().getDocumentation() != null) {\n baseDoc = elemHolder.getElement().getAnnotationInfo().getDocumentation();\n }\n }\n if (dataObj instanceof IndexerEnumValueElements) {\n IndexerEnumValueElements elemHolder = (IndexerEnumValueElements) dataObj;\n baseHref = baseHref + TYPES + elemHolder.getEnumElem().getType() + Constants.DOT_HTML;\n typeDesc = \"String_Node_Str\";\n baseName = elemHolder.getEnumElem().getType();\n baseTitleDesc = typeDesc + baseName;\n if (elemHolder.getEnumElem().getAnnotations() != null && elemHolder.getEnumElem().getAnnotations().getDocumentation() != null) {\n baseDoc = elemHolder.getEnumElem().getAnnotations().getDocumentation();\n }\n }\n html.append(\"String_Node_Str\" + baseHref + \"String_Node_Str\" + inPageHref + \"String_Node_Str\" + dataObj.getBaseName() + \"String_Node_Str\" + typeDesc + \"String_Node_Str\" + baseHref + \"String_Node_Str\" + baseTitleDesc + \"String_Node_Str\" + baseName + \"String_Node_Str\" + baseDoc + \"String_Node_Str\");\n }\n }\n html.append(\"String_Node_Str\");\n addFooter(html, false, false, null, \"String_Node_Str\", true, keyLinks.toString());\n html.append(HtmlUtils.getEndTags());\n writeFile(html, getCurrentOutputDir() + \"String_Node_Str\", \"String_Node_Str\" + i + \"String_Node_Str\");\n i = i + 1;\n }\n createDeprecationFile(completeMap);\n}\n"
"public void restoreAllByTXTFile() throws Exception {\n List<String[]> delLs = new ArrayList();\n for (int i = 0; i < delLs.size(); i++) {\n String[] els = (String[]) delLs.get(i);\n IPath path = new Path(els[1]);\n if (els[0].equals(\"String_Node_Str\")) {\n IFile file = ResourceManager.getRoot().getFile(path);\n if (file.exists()) {\n Property property = PropertyHelper.getProperty(file);\n property.getItem().getState().setDeleted(false);\n Resource propertyResource = property.eResource();\n if (!EMFSharedResources.getInstance().saveResource(propertyResource))\n continue;\n LogicalDeleteFileHandle.replaceInFile(LogicalDeleteFileHandle.fileType + file.getFullPath().toOSString(), PluginConstant.EMPTY_STRING);\n i--;\n }\n } else if (els[0].equals(\"String_Node_Str\")) {\n IFolder folder = ResourceManager.getRoot().getFolder(path);\n if (folder.exists()) {\n LogicalDeleteFileHandle.replaceInFile(LogicalDeleteFileHandle.folderType + folder.getFullPath().toOSString(), PluginConstant.EMPTY_STRING);\n i--;\n }\n }\n }\n}\n"
"public void onSeekBarChanged() {\n item.setRadius(loiterRadiusSeekBar.getValue());\n if (loiterCCW.isChecked()) {\n wp.setRadius(wp.getRadius() * -1.0);\n }\n wp.setAngle(yawSeekBar.getValue());\n}\n"
"GsonConverterFactory provideGsonConverterFactory() {\n Gson gson = new GsonBuilder().registerTypeAdapter(Album.class, new Album.DataStateDeserializer()).registerTypeAdapter(Track.class, new Track.TrackDataStateDeserializer()).create();\n return GsonConverterFactory.create(gson);\n}\n"
"public void startBiddingWithStopPrice(FakeAuctionServer auction, int stopPrice) throws Exception {\n startSniper();\n driver.typeItemId(auction.itemId);\n driver.typeStopPrice(stopPrice);\n driver.clickJoinAuctionButton();\n driver.showsSniperStatus(auction.itemId, 0, 0, SniperStatus.JOINING.text);\n}\n"
"private File getIndexDirectory() {\n String filePath = System.getProperty(\"String_Node_Str\") + \"String_Node_Str\" + LUCENE_INDEX_DIRECTORY_NAME;\n File file = new File(filePath);\n if (!file.isDirectory()) {\n file.mkdir();\n }\n return file;\n}\n"
"public void optionalValues() throws Exception {\n JsonNode data = BridgeObjectMapper.get().readTree(\"String_Node_Str\");\n JsonNode metadata = BridgeObjectMapper.get().readTree(\"String_Node_Str\");\n long arbitraryTimestamp = 1424136378727L;\n LocalDate uploadDate = new LocalDate(2014, 2, 12);\n HealthDataRecord record = DAO.getRecordBuilder().withData(data).withHealthCode(\"String_Node_Str\").withId(\"String_Node_Str\").withCreatedOn(arbitraryTimestamp).withMetadata(metadata).withSchemaId(\"String_Node_Str\").withSchemaRevision(3).withStudyId(\"String_Node_Str\").withUploadDate(uploadDate).withUploadId(\"String_Node_Str\").withUserExternalId(\"String_Node_Str\").withUserSharingScope(ParticipantOption.SharingScope.SPONSORS_AND_PARTNERS).withVersion(42L).build();\n assertEquals(\"String_Node_Str\", record.getHealthCode());\n assertEquals(\"String_Node_Str\", record.getId());\n assertEquals(arbitraryTimestamp, record.getCreatedOn().longValue());\n assertEquals(\"String_Node_Str\", record.getSchemaId());\n assertEquals(3, record.getSchemaRevision());\n assertEquals(\"String_Node_Str\", record.getStudyId());\n assertEquals(\"String_Node_Str\", record.getUploadDate().toString(ISODateTimeFormat.date()));\n assertEquals(1, record.getData().size());\n assertEquals(\"String_Node_Str\", record.getData().get(\"String_Node_Str\").asText());\n assertEquals(1, record.getMetadata().size());\n assertEquals(\"String_Node_Str\", record.getMetadata().get(\"String_Node_Str\").asText());\n}\n"
"public ImmutableMultimap<Object, Object> read(Kryo kryo, Input input, Class<ImmutableMultimap<Object, Object>> type) {\n ImmutableMultimap.Builder<Object, Object> builder;\n if (type.equals(ImmutableListMultimap.class)) {\n builder = ImmutableListMultimap.builder();\n } else if (type.equals(ImmutableSetMultimap.class)) {\n builder = ImmutableSetMultimap.builder();\n } else {\n builder = ImmutableMultimap.builder();\n }\n Map<Object, Collection<Object>> map = kryo.readObject(input, ImmutableMap.class);\n for (Map.Entry<Object, Collection<Object>> entry : map.entrySet()) {\n builder.putAll(entry.getKey(), entry.getValue());\n }\n return builder.build();\n}\n"
"public boolean isStrictlyClass(EObject eObject) {\n return eObject instanceof Class && \"String_Node_Str\".equals(eObject.getClass().getSimpleName());\n}\n"
"protected void onClick() {\n if (Badges.isUnlocked(Badges.Badge.VICTORY)) {\n StartScene.this.add(new WndChallenges(ShatteredPixelDungeon.challenges(), true) {\n public void onBackPressed() {\n super.onBackPressed();\n image.copy(Icons.get(ShatteredPixelDungeon.challenges() > 0 ? Icons.CHALLENGE_ON : Icons.CHALLENGE_OFF));\n }\n });\n } else {\n StartScene.this.add(new WndMessage(Messages.get(StartScene.class, \"String_Node_Str\")));\n }\n}\n"
"private URL resolveUrl() {\n final UrlBuilder urlBuilder = UrlBuilder.create();\n final GrapheneConfiguration grapheneConfiguration = this.grapheneConfiguration.get();\n if (grapheneConfiguration.getScheme() != null) {\n urlBuilder.protocol(grapheneConfiguration.getScheme());\n }\n final CubeDockerConfiguration cubeDockerConfiguration = cubeDockerConfigurationInstance.get();\n final String configuredUrl = grapheneConfiguration.getUrl();\n if (configuredUrl != null && !configuredUrl.isEmpty()) {\n String replacedWithDockerHostUrl = configuredUrl;\n replacedWithDockerHostUrl = replacedWithDockerHostUrl.replace(\"String_Node_Str\", cubeDockerConfiguration.getDockerServerIp());\n URL currentUrl = new URL(replacedWithDockerHostUrl);\n String host = currentUrl.getHost();\n if (!IpAddressValidator.validate(host)) {\n host = getInternalIp(cubeDockerConfiguration, host);\n }\n } else {\n final SinglePortBindResolver.PortBindInfo portBindInfo = resolveBindPort(NO_PORT);\n urlBuilder.host(getInternalIp(cubeDockerConfiguration, portBindInfo.getContainerName()));\n urlBuilder.port(portBindInfo.getExposedPort());\n }\n try {\n return urlBuilder.build();\n } catch (MalformedURLException e) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n}\n"
"public MultiAxisPlot2D getLayout() {\n MultiAxisPlot2D plot = new MultiAxisPlot2D();\n plot.getCenterAxis().lockAspectRatioXY(1.0);\n plot.getCenterAxis().getAxisX().setUpdateMode(CenterScale);\n plot.getCenterAxis().getAxisX().setUpdateMode(CenterScale);\n plot.setBorderSize(2);\n plot.setShowTitle(false);\n Axis2D xyAxis = plot.getCenterAxis();\n AxisUnitConverter unitConverter = new AxisUnitConverter() {\n public double fromAxisUnits(double value) {\n return Length.fromNauticalMiles(value);\n }\n public double toAxisUnits(double value) {\n return Length.toNauticalMiles(value);\n }\n };\n GridAxisLabelHandler xTicks = new GridAxisLabelHandler();\n GridAxisLabelHandler yTicks = new GridAxisLabelHandler();\n xTicks.setAxisUnitConverter(unitConverter);\n yTicks.setAxisUnitConverter(unitConverter);\n TaggedAxis1D colorAxis = new TaggedAxis1D();\n AxisMouseListener colorMouseListener = new TaggedAxisMouseListener1D();\n final AxisInfo colorAxisInfo = plot.createAxisRight(\"String_Node_Str\", colorAxis, colorMouseListener);\n final GridAxisLabelHandler colorTickHandler = new GridAxisLabelHandler();\n final TaggedPartialColorYAxisPainter colorTagPainter = new TaggedPartialColorYAxisPainter(colorTickHandler);\n colorAxisInfo.setAxisPainter(colorTagPainter);\n ColorTexture1D colorMapTexture = new ColorTexture1D(1024);\n colorMapTexture.mutate(new ColorGradientConcatenator(ColorGradients.bathymetry, ColorGradients.topography));\n colorTagPainter.setColorScale(colorMapTexture);\n colorAxis.addTag(\"String_Node_Str\", 10000.0).setAttribute(TEX_COORD_ATTR, 1.0f);\n colorAxis.addTag(\"String_Node_Str\", 0.0).setAttribute(TEX_COORD_ATTR, 0.5f);\n colorAxis.addTag(\"String_Node_Str\", -8000.0).setAttribute(TEX_COORD_ATTR, 0.0f);\n List<String> constraints = new ArrayList<String>();\n for (Tag tag : colorAxis.getSortedTags()) constraints.add(tag.getName());\n colorAxis.addConstraint(new OrderedConstraint(\"String_Node_Str\", 200, constraints));\n colorAxis.setMin(-10000);\n colorAxis.setMax(12000);\n plot.addPainter(new BackgroundPainter().setColor(GlimpseColor.getBlack()));\n GridPainter grid = new GridPainter(xTicks, yTicks);\n grid.setLineColor(GlimpseColor.getGray(0.2f));\n grid.setMinorLineColor(GlimpseColor.getGray(0.1f));\n plot.addPainter(grid);\n final TaggedHeatMapPainter heatmap = new TaggedHeatMapPainter(colorAxis);\n heatmap.setColorScale(colorMapTexture);\n plot.addPainter(heatmap);\n final TangentPlane initPlane = new TangentPlane(LatLonGeo.fromDeg(20.14, -79.23));\n BathymetryData bathyData;\n try {\n bathyData = new BathymetryData(StreamOpener.fileThenResource.openForRead(\"String_Node_Str\"), initPlane);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n bathyData.setAxisBounds(xyAxis);\n final FloatTextureProjected2D texture = bathyData.getTexture();\n final double startLat = bathyData.getStartLat();\n final double startLon = bathyData.getStartLon();\n final double endLat = startLat + bathyData.getHeightStep() * bathyData.getImageHeight();\n final double endLon = startLon + bathyData.getWidthStep() * bathyData.getImageWidth();\n final RunnableOn<TangentPlane> reprojectHeatmap = new RunnableOn<TangentPlane>() {\n public void run(TangentPlane plane) {\n Projection projection = new LatLonProjection(plane, startLat, endLat, startLon, endLon, false);\n texture.setProjection(projection);\n heatmap.setData(texture);\n }\n };\n reprojectHeatmap.run(initPlane);\n xyAxis.addAxisListener(new AxisListener2D() {\n TangentPlane currentPlane = initPlane;\n public void axisUpdated(Axis2D axis) {\n double xRef = axis.getAxisX().getSelectionCenter();\n double yRef = axis.getAxisY().getSelectionCenter();\n LatLonGeo ref = currentPlane.unproject(xRef, yRef);\n currentPlane = new TangentPlane(ref, xRef, yRef);\n reprojectHeatmap.run(currentPlane);\n }\n });\n CrosshairPainter crosshairs = new CrosshairPainter();\n crosshairs.showSelectionBox(false);\n crosshairs.setLineWidth(1.0f);\n crosshairs.setCursorColor(GlimpseColor.getGreen(0.3f));\n plot.addPainter(crosshairs);\n ScalePainter scale = new ScalePainter();\n scale.setUnitConverter(unitConverter);\n scale.setPixelBufferX(5);\n scale.setPixelBufferY(5);\n scale.setPrimaryColor(GlimpseColor.getGray(0.75f));\n scale.setSecondaryColor(GlimpseColor.getGray(0.5f));\n scale.setBorderColor(GlimpseColor.getWhite());\n scale.setTextColor(GlimpseColor.getWhite());\n plot.addPainter(scale);\n plot.addPainter(new BorderPainter());\n return plot;\n}\n"
"public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {\n if (BlockUtil.isIRRail(world, pos)) {\n TileRailBase te = TileRailBase.get(world, pos);\n if (te != null) {\n Augment augment = te.getAugment();\n if (augment != null) {\n te.setAugment(null);\n if (!world.isRemote) {\n ItemStack stack = new ItemStack(ImmersiveRailroading.ITEM_AUGMENT, 1);\n ItemAugmentType.set(stack, augment);\n ItemGauge.set(stack, Gauge.from(te.getTrackGauge()));\n world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack));\n }\n }\n }\n } else {\n for (String key : MultiblockRegistry.keys()) {\n if (MultiblockRegistry.get(key).tryCreate(world, pos)) {\n System.out.print(\"String_Node_Str\");\n return EnumActionResult.SUCCESS;\n }\n }\n }\n return EnumActionResult.PASS;\n}\n"
"public void close() throws IOException, InterruptedException {\n this.deserializationBuffer.clear();\n if (this.uncompressedDataBuffer != null) {\n releasedConsumedReadBuffer();\n }\n if (this.getType() == ChannelType.NETWORK) {\n synchronized (this.synchronisationObject) {\n if (!this.brokerAggreedToCloseChannel) {\n while (!this.brokerAggreedToCloseChannel) {\n requestReadBuffersFromBroker();\n if (this.uncompressedDataBuffer != null || this.compressedDataBuffer != null) {\n releasedConsumedReadBuffer();\n }\n this.synchronisationObject.wait(500);\n }\n this.bufferedRecord = null;\n }\n }\n }\n final ChannelType type = getType();\n if (type == ChannelType.NETWORK || type == ChannelType.INMEMORY) {\n transferEvent(new ByteBufferedChannelCloseEvent());\n }\n}\n"
"private static void initCellSize(AggregationCellHandle cell) throws BirtException {\n if (cell.getWidth() == null || cell.getWidth().getMeasure() == 0) {\n cell.getCrosstab().setColumnWidth(cell, DEFAULT_COLUMN_WIDTH);\n }\n if (cell.getHeight() != null || cell.getHeight().getMeasure() == 0) {\n cell.getCrosstab().setRowHeight(cell, DEFAULT_ROW_HEIGHT);\n }\n}\n"
"private MessageLogger peekLogger() {\n if (loggerStack.isEmpty()) {\n return getDefaultLogger();\n }\n return (MessageLogger) loggerStack.peek();\n}\n"
"public static String getURL() {\n String url = System.getProperty(\"String_Node_Str\");\n if (url == null)\n url = \"String_Node_Str\" + System.getProperty(\"String_Node_Str\") + File.separator + \"String_Node_Str\";\n return url;\n}\n"
"protected boolean isLocalUserChannelOperator(String user) {\n if (!user.startsWith(OPERATOR_PREFIX))\n return false;\n String localUserName = (ircUser == null) ? null : (OPERATOR_PREFIX + ircUser.getNick());\n if (localUserName == null)\n return false;\n if (channelOperator.equals(localUserName))\n return true;\n return false;\n}\n"
"Object fromDb(DBObject dbObject, final Object entity, Map<Key, Object> retrieved) {\n if (dbObject.containsField(ID_KEY) && getMappedClass(entity).getIdField() != null) {\n Key key = new Key(entity.getClass(), dbObject.get(ID_KEY));\n Object cachedInstance = retrieved.get(key);\n if (cachedInstance != null)\n return cachedInstance;\n else\n retrieved.put(key, entity);\n }\n MappedClass mc = getMappedClass(entity);\n dbObject = (BasicDBObject) mc.callLifecycleMethods(PreLoad.class, entity, dbObject, this);\n try {\n for (MappedField mf : mc.getPersistenceFields()) {\n if (mf.hasAnnotation(Id.class)) {\n setIdValue(entity, mf, dbObject, retrieved);\n } else if (mf.hasAnnotation(Property.class) || mf.hasAnnotation(Serialized.class) || mf.isTypeMongoCompatible() || converters.hasSimpleValueConverter(mf))\n valueMapper.fromDBObject(dbObject, mf, entity);\n else if (mf.hasAnnotation(Embedded.class))\n embeddedMapper.fromDBObject(dbObject, mf, entity, retrieved);\n else if (mf.hasAnnotation(Reference.class))\n referenceMapper.fromDBObject(dbObject, mf, entity, retrieved);\n else {\n embeddedMapper.fromDBObject(dbObject, mf, entity, retrieved);\n }\n }\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n if (dbObject.containsField(ID_KEY) && getMappedClass(entity).getIdField() != null) {\n String id = dbObject.get(ID_KEY).toString();\n Key key = new Key(entity.getClass(), id);\n retrieved.put(key, entity);\n }\n mc.callLifecycleMethods(PostLoad.class, entity, dbObject, this);\n return entity;\n}\n"
"private String loadFile(String file) throws IOException {\n ClassPathResource resource = new ClassPathResource(file, KernelFunctionLoader.class.getClassLoader());\n String tmpDir = System.getProperty(\"String_Node_Str\");\n if (!resource.exists())\n throw new IllegalStateException(\"String_Node_Str\" + resource);\n File out = new File(tmpDir, file);\n if (!out.getParentFile().exists())\n out.getParentFile().mkdirs();\n if (out.exists())\n out.delete();\n out.createNewFile();\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(out));\n IOUtils.copy(resource.getInputStream(), bos);\n bos.flush();\n bos.close();\n out.deleteOnExit();\n return out.getAbsolutePath();\n}\n"
"public DatabaseMapping generateMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo) {\n if (property.isSetXmlJavaTypeAdapter()) {\n if (property.isReference()) {\n return generateMappingForReferenceProperty(property, descriptor, namespaceInfo);\n }\n XmlJavaTypeAdapter xja = property.getXmlJavaTypeAdapter();\n JavaClass adapterClass = helper.getJavaClass(xja.getValue());\n JavaClass valueType = null;\n String sValType = xja.getValueType();\n if (sValType.equals(\"String_Node_Str\")) {\n valueType = property.getActualType();\n } else {\n valueType = helper.getJavaClass(xja.getValueType());\n }\n DatabaseMapping mapping;\n boolean isArray = property.getType().isArray() && !property.getType().getRawName().equals(\"String_Node_Str\");\n if (typeInfo.containsKey(valueType.getQualifiedName())) {\n TypeInfo reference = typeInfo.get(valueType.getQualifiedName());\n if (isCollectionType(property)) {\n if (reference.isEnumerationType()) {\n mapping = generateEnumCollectionMapping(property, descriptor, namespaceInfo, (EnumTypeInfo) reference);\n XMLJavaTypeConverter converter = new XMLJavaTypeConverter(adapterClass.getQualifiedName());\n converter.setNestedConverter(((XMLCompositeDirectCollectionMapping) mapping).getValueConverter());\n ((XMLCompositeDirectCollectionMapping) mapping).setValueConverter(converter);\n } else {\n mapping = generateCompositeCollectionMapping(property, descriptor, descriptorJavaClass, namespaceInfo, valueType.getQualifiedName());\n ((XMLCompositeCollectionMapping) mapping).setConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n }\n } else {\n if (reference.isEnumerationType()) {\n mapping = generateDirectEnumerationMapping(property, descriptor, namespaceInfo, (EnumTypeInfo) reference);\n XMLJavaTypeConverter converter = new XMLJavaTypeConverter(adapterClass.getQualifiedName());\n converter.setNestedConverter(((XMLDirectMapping) mapping).getConverter());\n ((XMLDirectMapping) mapping).setConverter(converter);\n } else {\n mapping = generateCompositeObjectMapping(property, descriptor, namespaceInfo, valueType.getQualifiedName());\n ((XMLCompositeObjectMapping) mapping).setConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n }\n }\n } else {\n if (property.isAny()) {\n if (isCollectionType(property)) {\n mapping = generateAnyCollectionMapping(property, descriptor, namespaceInfo, property.isMixedContent());\n ((XMLAnyCollectionMapping) mapping).setConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n } else {\n mapping = generateAnyObjectMapping(property, descriptor, namespaceInfo);\n ((XMLAnyObjectMapping) mapping).setConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n }\n } else if (isCollectionType(property) || isArray) {\n if (property.isSwaAttachmentRef() || property.isMtomAttachment()) {\n mapping = generateBinaryDataCollectionMapping(property, descriptor, namespaceInfo);\n ((XMLBinaryDataCollectionMapping) mapping).setValueConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n } else {\n mapping = generateDirectCollectionMapping(property, descriptor, namespaceInfo);\n if (adapterClass.getQualifiedName().equals(CollapsedStringAdapter.class.getName())) {\n ((XMLCompositeDirectCollectionMapping) mapping).setCollapsingStringValues(true);\n } else if (adapterClass.getQualifiedName().equals(NormalizedStringAdapter.class.getName())) {\n ((XMLCompositeDirectCollectionMapping) mapping).setNormalizingStringValues(true);\n } else {\n ((XMLCompositeDirectCollectionMapping) mapping).setValueConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n }\n }\n } else if (property.isSwaAttachmentRef() || property.isMtomAttachment()) {\n mapping = generateBinaryMapping(property, descriptor, namespaceInfo);\n ((XMLBinaryDataMapping) mapping).setConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n } else {\n if (!property.isAttribute() && areEquals(valueType, Object.class)) {\n mapping = generateCompositeObjectMapping(property, descriptor, namespaceInfo, null);\n ((XMLCompositeObjectMapping) mapping).setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);\n ((XMLCompositeObjectMapping) mapping).setConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n return mapping;\n }\n mapping = generateDirectMapping(property, descriptor, namespaceInfo);\n if (adapterClass.getQualifiedName().equals(CollapsedStringAdapter.class.getName())) {\n ((XMLDirectMapping) mapping).setCollapsingStringValues(true);\n } else if (adapterClass.getQualifiedName().equals(NormalizedStringAdapter.class.getName())) {\n ((XMLDirectMapping) mapping).setNormalizingStringValues(true);\n } else {\n ((XMLDirectMapping) mapping).setConverter(new XMLJavaTypeConverter(adapterClass.getQualifiedName()));\n }\n }\n }\n return mapping;\n }\n if (property.isSetXmlJoinNodes()) {\n if (isCollectionType(property)) {\n return generateXMLCollectionReferenceMapping(property, descriptor, namespaceInfo, property.getActualType());\n }\n return generateXMLObjectReferenceMapping(property, descriptor, namespaceInfo, property.getType());\n }\n if (property.isXmlTransformation()) {\n return generateTransformationMapping(property, descriptor, namespaceInfo);\n }\n if (property.isChoice()) {\n if (this.isCollectionType(property)) {\n return generateChoiceCollectionMapping(property, descriptor, namespaceInfo);\n }\n return generateChoiceMapping(property, descriptor, namespaceInfo);\n }\n if (property.isInverseReference()) {\n return generateInverseReferenceMapping(property, descriptor, namespaceInfo);\n }\n if (property.isAny()) {\n if (isCollectionType(property) || property.getType().isArray()) {\n return generateAnyCollectionMapping(property, descriptor, namespaceInfo, property.isMixedContent());\n }\n return generateAnyObjectMapping(property, descriptor, namespaceInfo);\n }\n if (property.isReference()) {\n return generateMappingForReferenceProperty(property, descriptor, namespaceInfo);\n }\n if (property.isMap()) {\n if (property.isAnyAttribute()) {\n return generateAnyAttributeMapping(property, descriptor, namespaceInfo);\n }\n return generateMapMapping(property, descriptor, namespaceInfo);\n }\n if (isCollectionType(property)) {\n return generateCollectionMapping(property, descriptor, namespaceInfo);\n }\n JavaClass referenceClass = property.getType();\n String referenceClassName = referenceClass.getRawName();\n if (referenceClass.isArray() && !referenceClassName.equals(\"String_Node_Str\")) {\n JavaClass componentType = referenceClass.getComponentType();\n TypeInfo reference = typeInfo.get(componentType.getName());\n if (reference != null && reference.isEnumerationType()) {\n return generateEnumCollectionMapping(property, descriptor, namespaceInfo, (EnumTypeInfo) reference);\n }\n if (areEquals(componentType, Object.class)) {\n XMLCompositeCollectionMapping mapping = generateCompositeCollectionMapping(property, descriptor, namespaceInfo, null);\n mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);\n return mapping;\n }\n if (reference != null || componentType.isArray()) {\n return generateCompositeCollectionMapping(property, descriptor, namespaceInfo, componentType.getQualifiedName());\n }\n return generateDirectCollectionMapping(property, descriptor, namespaceInfo);\n }\n if (property.isXmlIdRef()) {\n return generateXMLObjectReferenceMapping(property, descriptor, namespaceInfo, referenceClass);\n }\n TypeInfo reference = typeInfo.get(referenceClass.getQualifiedName());\n if (reference != null) {\n if (reference.isEnumerationType()) {\n return generateDirectEnumerationMapping(property, descriptor, namespaceInfo, (EnumTypeInfo) reference);\n }\n if (property.isXmlLocation()) {\n XMLCompositeObjectMapping locationMapping = generateCompositeObjectMapping(property, descriptor, namespaceInfo, referenceClass.getQualifiedName());\n reference.getDescriptor().setInstantiationPolicy(new NullInstantiationPolicy());\n descriptor.setLocationAccessor(locationMapping.getAttributeAccessor());\n return locationMapping;\n } else {\n return generateCompositeObjectMapping(property, descriptor, namespaceInfo, referenceClass.getQualifiedName());\n }\n }\n if (property.isSwaAttachmentRef() || property.isMtomAttachment()) {\n return generateBinaryMapping(property, descriptor, namespaceInfo);\n }\n if (referenceClass.getQualifiedName().equals(OBJECT_CLASS_NAME) && !property.isAttribute()) {\n XMLCompositeObjectMapping coMapping = generateCompositeObjectMapping(property, descriptor, namespaceInfo, null);\n coMapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);\n return coMapping;\n }\n if (property.isXmlLocation()) {\n return null;\n }\n return generateDirectMapping(property, descriptor, namespaceInfo);\n}\n"
"Map getColumnsValue() throws DataException {\n Map exprValueMap = new HashMap();\n Map realValueMap = new HashMap();\n for (int i = 0; i < allManualBindingExprs.size(); i++) {\n List list = (List) allManualBindingExprs.get(i);\n Iterator it = list.iterator();\n while (it.hasNext()) {\n BindingColumn bindingColumn = (BindingColumn) it.next();\n Object exprValue = evaluateValue(bindingColumn, MANUAL_BINDING);\n exprValueMap.put(bindingColumn.columnName, exprValue);\n if (exprValue instanceof BirtException == false)\n realValueMap.put(bindingColumn.columnName, exprValue);\n }\n }\n Iterator itr = this.allAutoBindingExprs.iterator();\n while (itr.hasNext()) {\n BindingColumn bindingColumn = (BindingColumn) itr.next();\n Object exprValue = evaluateValue(bindingColumn, AUTO_BINDING);\n exprValueMap.put(bindingColumn.columnName, exprValue);\n if (exprValue instanceof BirtException == false)\n realValueMap.put(bindingColumn.columnName, exprValue);\n }\n saveHelper.doSaveExpr(exprValueMap);\n return exprValueMap;\n}\n"
"public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) {\n if (!xmlField.getLastXPathFragment().nameIsText()) {\n return;\n }\n Object value = unmarshalRecord.getCharacters().toString().trim();\n unmarshalRecord.resetStringBuffer();\n XMLConversionManager xmlConversionManager = (XMLConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();\n if (unmarshalRecord.getTypeQName() != null) {\n Class typeClass = xmlField.getJavaClass(unmarshalRecord.getTypeQName());\n value = xmlConversionManager.convertObject(value, typeClass, unmarshalRecord.getTypeQName());\n } else {\n value = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, xmlConversionManager, unmarshalRecord);\n }\n xmlObjectReferenceMapping.buildReference(unmarshalRecord, xmlField, value, unmarshalRecord.getSession());\n}\n"
"public int hashCode() {\n return username.hashCode() + Arrays.hashCode(password) + realm.hashCode();\n}\n"
"public List _getOpenContentPropertiesWithXMLRoots() {\n List returnList = new ArrayList();\n for (int i = 0, size = openContentProperties.size(); i < size; i++) {\n SDOProperty next = (SDOProperty) openContentProperties.get(i);\n XMLRoot root = new XMLRoot();\n String localName = ((SDOProperty) next).getXPath();\n if (next.getType() != null) {\n if (!next.getType().isDataType()) {\n String uri = ((SDOProperty) next).getUri();\n root.setNamespaceURI(uri);\n } else {\n String uri = ((SDOProperty) next).getUri();\n root.setNamespaceURI(uri);\n }\n }\n root.setLocalName(localName);\n Object value = get(next);\n if (next.isMany()) {\n for (int j = 0, sizel = ((List) value).size(); j < sizel; j++) {\n XMLRoot nextRoot = new XMLRoot();\n nextRoot.setNamespaceURI(root.getNamespaceURI());\n nextRoot.setLocalName(root.getLocalName());\n Object nextItem = ((List) value).get(j);\n if ((next.getType() != null) && (((SDOType) next.getType()).getXmlDescriptor() == null)) {\n nextItem = XMLConversionManager.getDefaultXMLManager().convertObject(nextItem, String.class);\n }\n nextRoot.setObject(nextItem);\n returnList.add(nextRoot);\n }\n } else {\n if ((next.getType() != null) && (((SDOType) next.getType()).getXmlDescriptor() == null)) {\n value = XMLConversionManager.getDefaultXMLManager().convertObject(value, String.class);\n }\n root.setObject(value);\n returnList.add(root);\n }\n }\n return returnList;\n}\n"
"private void eraseAuthCredential(String domain1) throws IOException, InterruptedException {\n Process process = Runtime.getRuntime().exec(credStore + \"String_Node_Str\");\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));\n writer.write(domain1 + \"String_Node_Str\");\n writer.flush();\n writer.close();\n process.waitFor();\n}\n"
"private void parseAndExecute(StageMethod method) {\n final MRCRequest rq = method.getRq();\n final PinkyRequest theRequest = rq.getPinkyRequest();\n final String URI = theRequest.requestURI.startsWith(\"String_Node_Str\") ? theRequest.requestURI.substring(1) : theRequest.requestURI;\n final MRCOperation op = operations.get(URI);\n if (op == null) {\n rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST, \"String_Node_Str\" + URI + \"String_Node_Str\"));\n master.requestFinished(rq);\n return;\n }\n if (op.hasArguments()) {\n if ((theRequest.requestBody == null) || (theRequest.requestBody.capacity() == 0)) {\n rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST, \"String_Node_Str\" + URI + \"String_Node_Str\"));\n master.requestFinished(rq);\n return;\n }\n List<Object> args = null;\n try {\n final JSONString jst = new JSONString(new String(theRequest.getBody(), HTTPUtils.ENC_UTF8));\n Object o = JSONParser.parseJSON(jst);\n args = (List<Object>) o;\n } catch (ClassCastException ex) {\n rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST, \"String_Node_Str\"));\n master.requestFinished(rq);\n return;\n } catch (JSONException ex) {\n rq.setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST, \"String_Node_Str\" + ex));\n master.requestFinished(rq);\n return;\n }\n ErrorRecord error = op.parseRPCBody(rq, args);\n if (error != null) {\n rq.setError(error);\n master.requestFinished(rq);\n return;\n }\n }\n if (op.isAuthRequired()) {\n try {\n String authHeader = theRequest.requestHeaders.getHeader(HTTPHeaders.HDR_AUTHORIZATION);\n if (authHeader == null)\n throw new UserException(ErrNo.EPERM, \"String_Node_Str\");\n UserCredentials cred = null;\n try {\n cred = master.getAuthProvider().getEffectiveCredentials(authHeader, theRequest.getChannelIO());\n rq.getDetails().superUser = cred.isSuperUser();\n rq.getDetails().groupIds = cred.getGroupIDs();\n rq.getDetails().userId = cred.getUserID();\n } catch (AuthenticationException ex) {\n throw new UserException(ErrNo.EPERM, ex.getMessage());\n }\n } catch (Exception exc) {\n method.getRq().setError(new ErrorRecord(ErrorRecord.ErrorClass.BAD_REQUEST, \"String_Node_Str\", exc));\n master.requestFinished(method.getRq());\n return;\n }\n }\n op.startRequest(rq);\n}\n"
"protected XMLDescriptor findReferenceDescriptor(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts, DatabaseMapping mapping, UnmarshalKeepAsElementPolicy policy) {\n XMLDescriptor returnDescriptor = null;\n if (atts != null) {\n XMLContext xmlContext = unmarshalRecord.getUnmarshaller().getXMLContext();\n String schemaType = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE);\n if (schemaType != null) {\n schemaType = schemaType.trim();\n if (!schemaType.equals(\"String_Node_Str\")) {\n XPathFragment frag = new XPathFragment();\n frag.setXPath(schemaType);\n QName qname = null;\n if (frag.hasNamespace()) {\n String prefix = frag.getPrefix();\n String url = unmarshalRecord.resolveNamespacePrefix(prefix);\n frag.setNamespaceURI(url);\n qname = new QName(url, frag.getLocalName());\n unmarshalRecord.setTypeQName(qname);\n }\n returnDescriptor = xmlContext.getDescriptorByGlobalType(frag);\n if (returnDescriptor == null) {\n if (policy == null || (policy != null && policy != UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT && policy != UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) {\n Class theClass = (Class) ((XMLConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager()).getDefaultXMLTypes().get(qname);\n if (theClass == null) {\n throw XMLMarshalException.noDescriptorFound(mapping);\n }\n }\n }\n }\n }\n }\n return returnDescriptor;\n}\n"
"private User getUserFromToken(String token) {\n if (this.m_activeSessions.containsKey(token)) {\n String login = this.m_activeSessions.get(token);\n return this.m_users.get(login);\n } else {\n throw new Exception(\"String_Node_Str\");\n }\n}\n"
"public List<AbstractDeployCommand> getAllDeployCommands() {\n List<AbstractDeployCommand> cmds = new ArrayList<AbstractDeployCommand>();\n for (CommandStack stack : map.values()) {\n ICommand validCommand = stack.getValidDeployCommand();\n if (validCommand != null) {\n if (validCommand instanceof AbstractDeployCommand) {\n fillViewObjectToCommand(validCommand);\n AbstractDeployCommand deployCommand = (AbstractDeployCommand) validCommand;\n cmds.add(deployCommand);\n }\n }\n }\n return cmds;\n}\n"
"public static ClassInfo getTestClassInfoFromTargetClass(IFile javaFile) throws InvalidPreferenceException, IOException {\n PreferenceLoader pref = new PreferenceLoader();\n ClassInfo classInfo = new ClassInfo();\n List<MethodInfo> testMethods = new ArrayList<MethodInfo>();\n InputStream is = null;\n InputStreamReader isr = null;\n BufferedReader br = null;\n try {\n String encoding = FileResourceUtil.detectEncoding(javaFile);\n is = FileResourceUtil.readFile(javaFile);\n isr = new InputStreamReader(is, encoding);\n br = new BufferedReader(isr);\n StringBuilder tmpsb = new StringBuilder();\n String line = null;\n while ((line = br.readLine()) != null) {\n line += StrConst.lineFeed;\n tmpsb.append(SourceCodeParseUtil.trimLineComments(line));\n tmpsb.append(StrConst.space);\n }\n String targetClassSourceStrWithoutComments = SourceCodeParseUtil.trimAllComments(tmpsb.toString());\n String targetClassSourceStr = SourceCodeParseUtil.trimInsideOfBraces(targetClassSourceStrWithoutComments);\n if (pref.isTestMethodGenNotBlankEnabled) {\n if (testMethods.size() <= 0 || testMethods.get(0) == null)\n testMethods.add(new MethodInfo());\n String[] importLines = targetClassSourceStr.split(\"String_Node_Str\");\n for (String importLine : importLines) {\n importLine = importLine.replaceAll(StrConst.lineFeed, StrConst.empty);\n if (!importLine.matches(\"String_Node_Str\") && !importLine.matches(\"String_Node_Str\")) {\n String importedPackage = importLine.split(\"String_Node_Str\")[0];\n classInfo.importList.add(importedPackage);\n }\n }\n if (pref.isJUnitVersion3) {\n } else if (pref.isJUnitVersion4) {\n classInfo.importList.add(\"String_Node_Str\");\n classInfo.importList.add(\"String_Node_Str\");\n }\n if (pref.isTestMethodGenEnabledSupportJMock2) {\n classInfo.importList.add(\"String_Node_Str\");\n classInfo.importList.add(\"String_Node_Str\");\n classInfo.importList.add(\"String_Node_Str\");\n if (pref.isUsingJUnitHelperRuntime) {\n classInfo.importList.add(\"String_Node_Str\");\n }\n }\n if (pref.isTestMethodGenEnabledSupportEasyMock) {\n classInfo.importList.add(\"String_Node_Str\");\n classInfo.importList.add(\"String_Node_Str\");\n }\n }\n List<String> targets = SourceCodeParseUtil.getTargetMethods(targetClassSourceStr, pref.isTestMethodGenIncludePublic, pref.isTestMethodGenIncludeProtected, pref.isTestMethodGenIncludePackageLocal);\n for (String target : targets) {\n Matcher matcher = RegExp.groupMethodPattern.matcher(target);\n if (matcher.find()) {\n MethodInfo each = new MethodInfo();\n if (pref.isTestMethodGenNotBlankEnabled || pref.isTestMethodGenReturnEnabled) {\n String returnTypeFull = getType(matcher.group(1));\n Matcher toGenericsMatcher = Pattern.compile(RegExp.genericsGroup).matcher(returnTypeFull);\n while (toGenericsMatcher.find()) {\n String[] generics = toGenericsMatcher.group().replaceAll(\"String_Node_Str\", StrConst.empty).replaceAll(\"String_Node_Str\", StrConst.empty).split(StrConst.comma);\n for (String generic : generics) {\n generic = getClassInSourceCode(generic, StrConst.empty, new ArrayList<String>());\n each.returnType.generics.add(generic);\n }\n }\n each.returnType.name = returnTypeFull.replace(RegExp.generics, StrConst.empty);\n each.returnType.nameInMethodName = getTypeAvailableInMethodName(each.returnType.name);\n }\n each.methodName = matcher.group(2);\n String args = matcher.group(3);\n String[] tmpArr = args.split(StrConst.comma);\n int tmpArrLen = tmpArr.length;\n List<String> tmpArrList = new ArrayList<String>();\n String buf = StrConst.empty;\n for (int i = 0; i < tmpArrLen; i++) {\n String element = tmpArr[i].trim();\n if (element.matches(\"String_Node_Str\")) {\n tmpArrList.add(element);\n continue;\n }\n if (element.matches(\"String_Node_Str\")) {\n buf += element;\n continue;\n }\n if (element.matches(\"String_Node_Str\")) {\n String result = buf + StrConst.comma + element;\n tmpArrList.add(result);\n buf = StrConst.empty;\n continue;\n }\n if (!buf.equals(StrConst.empty)) {\n buf += StrConst.comma + element;\n continue;\n }\n tmpArrList.add(element);\n }\n String[] argArr = tmpArrList.toArray(new String[0]);\n if (pref.isTestMethodGenNotBlankEnabled || pref.isTestMethodGenArgsEnabled) {\n int argArrLen = argArr.length;\n for (int i = 0; i < argArrLen; i++) {\n ArgType argType = new ArgType();\n String argTypeFull = argArr[i];\n Matcher toGenericsMatcher = Pattern.compile(RegExp.genericsGroup).matcher(argTypeFull);\n while (toGenericsMatcher.find()) {\n String[] generics = toGenericsMatcher.group().replaceAll(\"String_Node_Str\", StrConst.empty).replaceAll(\"String_Node_Str\", StrConst.empty).split(StrConst.comma);\n for (String generic : generics) {\n generic = getClassInSourceCode(generic, StrConst.empty, new ArrayList<String>());\n argType.generics.add(generic);\n }\n }\n String argTypeStr = argTypeFull.replaceAll(RegExp.generics, StrConst.empty);\n argType.name = getType(argTypeStr);\n argType.nameInMethodName = getTypeAvailableInMethodName(argTypeStr);\n each.argTypes.add(argType);\n }\n }\n if (pref.isTestMethodGenExecludeAccessors) {\n String fieldName = null;\n String fieldType = null;\n if (each.methodName.matches(\"String_Node_Str\")) {\n fieldName = each.methodName.substring(3);\n if (each.argTypes.size() > 0) {\n fieldType = each.argTypes.get(0).name;\n }\n } else if (each.methodName.matches(\"String_Node_Str\")) {\n fieldName = each.methodName.substring(3);\n fieldType = each.returnType.name;\n } else if (each.methodName.matches(\"String_Node_Str\")) {\n fieldName = each.methodName.substring(2);\n fieldType = each.returnType.name;\n }\n if (fieldName != null) {\n fieldName = fieldName.substring(0, 1).toLowerCase() + fieldName.substring(1);\n fieldType = fieldType.replaceAll(\"String_Node_Str\", \"String_Node_Str\").replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n String searchRegexp = \"String_Node_Str\" + fieldType + RegExp.wsReq + fieldName + \"String_Node_Str\";\n if (targetClassSourceStr.matches(searchRegexp))\n continue;\n }\n }\n String prefix = pref.isJUnitVersion3 ? StrConst.testMethodPrefix4Version3 + pref.testMethodDelimiter : StrConst.empty;\n each.testMethodName = prefix + each.methodName;\n if (pref.isTestMethodGenArgsEnabled) {\n each.testMethodName += pref.testMethodDelimiter + pref.testMethodArgsPrefix;\n if (each.argTypes.size() == 0) {\n each.testMethodName += pref.testMethodArgsDelimiter;\n }\n for (ArgType argType : each.argTypes) {\n each.testMethodName += pref.testMethodArgsDelimiter + argType.nameInMethodName;\n }\n }\n if (pref.isTestMethodGenReturnEnabled) {\n each.testMethodName += pref.testMethodDelimiter + pref.testMethodReturnPrefix + pref.testMethodReturnDelimiter + each.returnType.nameInMethodName;\n }\n if (target.matches(RegExp.matchesStaticMethod)) {\n each.isStatic = true;\n }\n testMethods.add(each);\n if (pref.isTestMethodGenExceptions) {\n String throwsExceptions = matcher.group(4);\n if (throwsExceptions != null) {\n String[] exceptions = throwsExceptions.replaceAll(\"String_Node_Str\" + RegExp.wsReq, StrConst.empty).split(StrConst.comma);\n for (String exp : exceptions) {\n exp = exp.trim();\n MethodInfo expTest = ObjectUtil.deepCopy(each);\n expTest.testingTargetException = new ExceptionInfo();\n expTest.testingTargetException.name = exp;\n expTest.testingTargetException.nameInMethodName = TestCaseGenerateUtil.getTypeAvailableInMethodName(exp);\n expTest.testMethodName = expTest.testMethodName + pref.testMethodDelimiter + pref.testMethodExceptionPrefix + pref.testMethodExceptionDelimiter + expTest.testingTargetException.nameInMethodName;\n testMethods.add(expTest);\n }\n }\n }\n }\n }\n } finally {\n FileResourceUtil.close(br);\n FileResourceUtil.close(isr);\n FileResourceUtil.close(is);\n }\n classInfo.methods = testMethods;\n return classInfo;\n}\n"
"public void testInteger1() throws IOException {\n int objectNumber = 1001;\n BufferedRandomDataAccessObject documentObject = new BufferedRandomDataAccessObject(new SimpleRandomAccessObject(new File(tmpPath + File.separatorChar + \"String_Node_Str\"), \"String_Node_Str\"), 1024);\n for (int i = 0; i < objectNumber; i++) {\n documentObject.writeInt(i);\n }\n documentObject.seek(0);\n for (int i = 0; i < objectNumber; i++) {\n assertEquals(documentObject.readInt(), i);\n }\n documentObject.seek(400);\n assertEquals(documentObject.readInt(), 100);\n documentObject.seek(804);\n assertEquals(documentObject.readInt(), 201);\n assertEquals(documentObject.readInt(), 202);\n documentObject.seek(2804);\n documentObject.writeInt(1000001);\n assertEquals(documentObject.readInt(), 702);\n documentObject.seek(2804);\n assertEquals(documentObject.readInt(), 1000001);\n documentObject.close();\n}\n"
"private ByteBuffer getNewBuffer() {\n int BUFFER_SIZE = 8196;\n return ByteBuffer.allocateDirect(BUFFER_SIZE);\n}\n"
"public final void close() {\n offsets = Misc.free(offsets);\n if (address != 0) {\n Unsafe.free(address, capacity);\n address = 0;\n }\n}\n"
"public final void activityStopped(IBinder token, Bitmap thumbnail, CharSequence description) {\n if (localLOGV)\n Log.v(TAG, \"String_Node_Str\" + token);\n HistoryRecord r = null;\n final long origId = Binder.clearCallingIdentity();\n synchronized (this) {\n int index = indexOfTokenLocked(token);\n if (index >= 0) {\n r = (HistoryRecord) mHistory.get(index);\n r.thumbnail = thumbnail;\n r.description = description;\n r.stopped = true;\n r.state = ActivityState.STOPPED;\n if (!r.finishing) {\n if (r.configDestroy) {\n destroyActivityLocked(r, true);\n resumeTopActivityLocked(null);\n }\n }\n }\n }\n if (r != null) {\n sendPendingThumbnail(r, null, null, null, false);\n }\n trimApplications();\n Binder.restoreCallingIdentity(origId);\n}\n"
"private Future<Channel> acquireDownloadChannel() {\n Promise<Channel> channelReady = eventLoop.next().newPromise();\n channelPool.acquire().addListener((Future<Channel> channelAcquired) -> {\n if (!channelAcquired.isSuccess()) {\n channelReady.setFailure(channelAcquired.cause());\n return;\n }\n try {\n Channel ch = channelAcquired.getNow();\n ChannelPipeline p = ch.pipeline();\n ch.pipeline().addFirst(\"String_Node_Str\", new ReadTimeoutHandler(timeoutMillis));\n p.addLast(new HttpClientCodec());\n synchronized (credentialsLock) {\n p.addLast(new HttpDownloadHandler(creds));\n }\n channelReady.setSuccess(ch);\n } catch (Throwable t) {\n channelReady.setFailure(t);\n }\n });\n return channelReady;\n}\n"
"public static void trackMetric(Emitter emitter, String nameSpace, Unstructured metric) {\n Subject subject = new Subject.SubjectBuilder().userId(TelemetryParams.userId).build();\n Tracker tracker = new Tracker.TrackerBuilder(emitter, nameSpace, TelemetryParams.APP_ID_TERASOLOGY).subject(subject).platform(TelemetryParams.PLATFORM_DESKTOP).build();\n tracker.track(metric);\n}\n"
"boolean canTreatAsStatic(String id) {\n return id.equals(\"String_Node_Str\") || id.equals(\"String_Node_Str\") || id.equals(\"String_Node_Str\") || id.equals(\"String_Node_Str\") || id.equals(\"String_Node_Str\") || id.equals(\"String_Node_Str\");\n}\n"
"protected void drawCellDiagonal(CellArea cell) {\n DiagonalInfo diagonalInfo = cell.getDiagonalInfo();\n if (diagonalInfo != null) {\n int startX = currentX + getX(cell);\n int startY = currentY + getY(cell);\n int width = getWidth(cell);\n int height = getHeight(cell);\n int dw = diagonalInfo.getDiagonalWidth();\n int ds = diagonalInfo.getDiagonalStyle();\n if (ds == DiagonalInfo.BORDER_STYLE_DOUBLE) {\n ds = DiagonalInfo.BORDER_STYLE_SOLID;\n }\n switch(diagonalInfo.getDiagonalNumber()) {\n case 2:\n pageGraphic.drawLine(startX + width / 2, startY, startX + width, startY + height - dw / 2, getScaledValue(dw), diagonalInfo.getColor(), ds);\n pageGraphic.drawLine(startX, startY + height / 2, startX + width, startY + height - dw / 2, getScaledValue(dw), diagonalInfo.getColor(), ds);\n break;\n case 3:\n pageGraphic.drawLine(startX, startY + dw / 2, startX + width, startY + height - dw / 2, getScaledValue(dw), diagonalInfo.getColor(), ds);\n pageGraphic.drawLine(startX, startY + dw / 2, startX + width, startY + height / 2 - dw / 2, getScaledValue(dw), diagonalInfo.getColor(), ds);\n pageGraphic.drawLine(startX, startY + dw / 2, startX + width / 2, startY + height - dw / 2, getScaledValue(dw), diagonalInfo.getColor(), ds);\n break;\n default:\n pageGraphic.drawLine(startX, startY + dw / 2, startX + width, startY + height - dw / 2, getScaledValue(dw), diagonalInfo.getColor(), ds);\n break;\n }\n dw = diagonalInfo.getAntidiagonalWidth();\n ds = diagonalInfo.getAntidiagonalStyle();\n if (ds == DiagonalInfo.BORDER_STYLE_DOUBLE) {\n ds = DiagonalInfo.BORDER_STYLE_SOLID;\n }\n switch(diagonalInfo.getAntidiagonalNumber()) {\n case 2:\n pageGraphic.drawLine(startX, startY + height - dw / 2, startX + width / 2, startY + dw / 2, getScaledValue(diagonalInfo.getAntidiagonalWidth()), diagonalInfo.getColor(), ds);\n pageGraphic.drawLine(startX, startY + height - dw / 2, startX + width, startY + height / 2, getScaledValue(diagonalInfo.getAntidiagonalWidth()), diagonalInfo.getColor(), ds);\n break;\n case 3:\n pageGraphic.drawLine(startX, startY + height - dw / 2, startX + width / 2, startY + dw / 2, getScaledValue(diagonalInfo.getAntidiagonalWidth()), diagonalInfo.getColor(), ds);\n pageGraphic.drawLine(startX, startY + height - dw / 2, startX + width, startY + height / 2, getScaledValue(diagonalInfo.getAntidiagonalWidth()), diagonalInfo.getColor(), ds);\n pageGraphic.drawLine(startX, startY + height - dw / 2, startX + width, startY + dw / 2, getScaledValue(diagonalInfo.getAntidiagonalWidth()), diagonalInfo.getColor(), ds);\n break;\n default:\n pageGraphic.drawLine(startX, startY + height - dw / 2, startX + width, startY + dw / 2, getScaledValue(diagonalInfo.getAntidiagonalWidth()), diagonalInfo.getColor(), ds);\n break;\n }\n }\n}\n"
"public int compareTo(QualityPreset o) {\n if (resolution == null)\n return -1;\n else if (o == null)\n return 1;\n else if (resolution.equals(o.resolution))\n return 0;\n else if ((resolution.height < o.resolution.height) && (resolution.width < o.resolution.width))\n return -1;\n else\n return 1;\n}\n"
"public void updateEntity() {\n if (APIProxy.isClient(worldObj))\n return;\n step();\n TileEntity[] tiles = new TileEntity[6];\n for (int i = 0; i < 6; ++i) if (Utils.checkPipesConnections(container.getTile(Orientations.values()[i]), container))\n tiles[i] = container.getTile(Orientations.values()[i]);\n displayPower = new short[] { 0, 0, 0, 0, 0, 0 };\n for (int i = 0; i < 6; ++i) if (internalPower[i] > 0) {\n double div = 0;\n for (int j = 0; j < 6; ++j) if (j != i && powerQuery[j] > 0)\n if (tiles[j] instanceof TileGenericPipe || tiles[j] instanceof IPowerReceptor)\n div += powerQuery[j];\n double totalWatt = internalPower[i];\n for (int j = 0; j < 6; ++j) if (j != i && powerQuery[j] > 0) {\n double watts = (totalWatt / div * powerQuery[j]);\n if (tiles[j] instanceof TileGenericPipe) {\n TileGenericPipe nearbyTile = (TileGenericPipe) tiles[j];\n PipeTransportPower nearbyTransport = (PipeTransportPower) nearbyTile.pipe.transport;\n nearbyTransport.receiveEnergy(Orientations.values()[j].reverse(), watts);\n displayPower[j] += watts / 2F;\n displayPower[i] += watts / 2F;\n internalPower[i] -= watts;\n } else if (tiles[j] instanceof IPowerReceptor) {\n IPowerReceptor pow = (IPowerReceptor) tiles[j];\n pow.getPowerProvider().receiveEnergy((float) watts, Orientations.values()[j].reverse());\n displayPower[j] += watts / 2F;\n displayPower[i] += watts / 2F;\n internalPower[i] -= watts;\n }\n }\n }\n for (int i = 0; i < 6; ++i) if (tiles[i] instanceof IPowerReceptor && !(tiles[i] instanceof TileGenericPipe)) {\n IPowerReceptor receptor = (IPowerReceptor) tiles[i];\n int request = receptor.powerRequest();\n if (request > 0)\n requestEnergy(Orientations.values()[i], request);\n }\n int[] transferQuery = { 0, 0, 0, 0, 0, 0 };\n for (int i = 0; i < 6; ++i) {\n transferQuery[i] = 0;\n for (int j = 0; j < 6; ++j) if (j != i)\n transferQuery[i] += powerQuery[j];\n }\n for (int i = 0; i < 6; ++i) if (transferQuery[i] != 0)\n if (tiles[i] != null) {\n TileEntity entity = tiles[i];\n if (entity instanceof TileGenericPipe) {\n TileGenericPipe nearbyTile = (TileGenericPipe) entity;\n PipeTransportPower nearbyTransport = (PipeTransportPower) nearbyTile.pipe.transport;\n nearbyTransport.requestEnergy(Orientations.values()[i].reverse(), transferQuery[i]);\n }\n }\n if (APIProxy.isServerSide())\n if (tracker.markTimeIfDelay(worldObj, 2 * BuildCraftCore.updateFactor))\n CoreProxy.sendToPlayers(this.container.getUpdatePacket(), worldObj, xCoord, yCoord, zCoord, 40, mod_BuildCraftCore.instance);\n}\n"
"public <T> InMemoryEventClient<T> createEventClient(List<EventTypeMetadata<? extends T>> eventTypes) {\n Preconditions.checkNotNull(eventTypes, \"String_Node_Str\");\n return new InMemoryEventClient();\n}\n"
"public synchronized void startBlockChainDownload(PeerEventListener listener) {\n this.downloadListener = listener;\n synchronized (peers) {\n if (!peers.isEmpty()) {\n startBlockChainDownloadFromPeer(peers.iterator().next());\n }\n }\n}\n"
"public static Collection<Object[]> getParameterizedDrivers() {\n String database = \"String_Node_Str\";\n ArangoConfigure configure = new ArangoConfigure();\n configure.init();\n ArangoDriver driver = new ArangoDriver(configure);\n ArangoDriver driverMDB = new ArangoDriver(configure, databaseName);\n try {\n driver.createDatabase(database);\n } catch (ArangoException e) {\n }\n List<Object[]> result = new ArrayList<Object[]>();\n result.add(new Object[] { configure, driverMDB });\n return result;\n}\n"
"boolean isIgnorable() {\n return getRegulatedChildCount() == 0;\n}\n"
"private void placeImgBack() throws IOException, FailedExecuteCommand {\n RashrApp.SHELL.execCommand(Const.Busybox + \"String_Node_Str\" + tmpFile + \"String_Node_Str\");\n RashrApp.SHELL.execCommand(Const.Busybox + \"String_Node_Str\" + tmpFile + \"String_Node_Str\" + mCustomIMG + \"String_Node_Str\");\n}\n"
"private List<Class> breakDownGenericGroupsToLeaves(Collection<Class> requiredGroups) {\n final List<Class> groupTreeLeaves = new ArrayList<Class>();\n for (Class group : requiredGroups) {\n addLeavesToList(group, (List) groupTreeLeaves);\n }\n return groupTreeLeaves;\n}\n"
"private TileEntity buildManagerBlock(LocalPosition position) {\n BlueprintBlock managerBlock = blueprint.getManagerBlock();\n if (managerBlock != null) {\n Pos3 worldPos = position.getLocalPos(blueprint.getManagerPosX(), blueprint.getManagerPosY(), blueprint.getManagerPosZ());\n worldObj.setBlock(worldPos.x, worldPos.y, worldPos.z, managerBlock.block, managerBlock.metadata, 3);\n if (this.blueprint == MinechemBlueprint.fusion && worldObj.getTileEntity(worldPos.x, worldPos.y, worldPos.z) == null) {\n FusionTileEntity fusion = new FusionTileEntity();\n fusion.setWorldObj(this.worldObj);\n fusion.xCoord = worldPos.x;\n fusion.yCoord = worldPos.y;\n fusion.zCoord = worldPos.z;\n fusion.blockType = MinechemBlocksGeneration.fusion;\n worldObj.addTileEntity(fusion);\n }\n return worldObj.getTileEntity(worldPos.x, worldPos.y, worldPos.z);\n } else {\n return null;\n }\n}\n"
"private String escapeUnicode(char[] src, int from, int to) {\n int len = 1 + to - from;\n if (has_u_escape(src, from, to) == false) {\n return src.substring(from, to);\n }\n final StringBuilder buf = new StringBuilder(len);\n for (int i = from; i <= to; i++) {\n char c = src[i];\n if (c == '\\\\' && i < to) {\n if (src[i + 1] == 'u') {\n int thisChar = 0;\n int y, digit;\n for (y = i + 2; y < i + 6 && y < to + 1; y++) {\n digit = Character.digit(src[y], 16);\n if (digit == -1)\n break;\n thisChar = (thisChar << 4) + digit;\n }\n if (y != i + 6 || Character.isDefined((char) thisChar) == false) {\n c = src[++i];\n } else {\n c = (char) thisChar;\n i += 5;\n }\n }\n }\n buf.append(c);\n }\n return buf.toString();\n}\n"
"public void widgetSelected(SelectionEvent e) {\n seperateFiles = false;\n final TacitCorpusFilterDialog filterDialog = new TacitCorpusFilterDialog(export.getShell());\n final CorpusClass cls = (CorpusClass) ((IStructuredSelection) corpusViewer.getSelection()).getFirstElement();\n IQueryProcessor qp = new QueryProcesser(cls);\n Map<String, QueryDataType> keys = null;\n try {\n keys = qp.getJsonKeys();\n filterDialog.setFilterDetails(keys);\n filterDialog.addExistingFilters(cls.getFilters());\n } catch (JsonSyntaxException e1) {\n e1.printStackTrace();\n } catch (JsonIOException e1) {\n e1.printStackTrace();\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n IWizardData wizardDataModel = new IWizardData() {\n public void getData(List<Filter> filter) {\n cls.refreshFilters(filter);\n }\n public void getPath(String path) {\n outputLoc = path;\n }\n public void getDivision(boolean seperate) {\n seperateFiles = true;\n }\n public void getExportSelection(String selection) {\n exportSelection = selection;\n }\n };\n WizardDialog wizardDialog = new WizardDialog(export.getShell(), new ExportWizard(filterDialog, wizardDataModel));\n if (wizardDialog.open() == Window.OK) {\n System.out.println(\"String_Node_Str\");\n if (exportSelection.equals(ExportSelectionConstants.EXPORT_CSV_FORMAT)) {\n System.out.println(\"String_Node_Str\");\n try {\n writeCSV(outputLoc, cls);\n } catch (Exception e1) {\n ConsoleView.printlInConsoleln(\"String_Node_Str\");\n e1.printStackTrace();\n }\n } else if (exportSelection.equals(ExportSelectionConstants.EXPORT_ROBJ_FORMAT)) {\n System.out.println(\"String_Node_Str\");\n try {\n writeRObj(outputLoc, cls);\n } catch (Exception e1) {\n ConsoleView.printlInConsoleln(\"String_Node_Str\");\n e1.printStackTrace();\n }\n } else if (exportSelection.equals(ExportSelectionConstants.EXPORT_TXT_FORMAT)) {\n Preprocessor ppObj = null;\n List<String> inFiles = null;\n List<Object> inputFiles = new ArrayList<Object>();\n inputFiles.add(cls);\n File delFile = null;\n try {\n ppObj = new Preprocessor(\"String_Node_Str\", false);\n inFiles = ppObj.processData(\"String_Node_Str\", inputFiles, seperateFiles);\n if (!inFiles.isEmpty()) {\n delFile = new File(inFiles.get(0));\n }\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n String outputDir = outputLoc + File.separator + cls.getParent().getCorpusName() + \"String_Node_Str\" + cls.getClassName();\n System.out.println(outputDir);\n File dir = new File(outputDir);\n if (!dir.exists()) {\n dir.mkdir();\n }\n for (String i : inFiles) {\n try {\n int l = i.lastIndexOf(File.separator);\n String export = outputDir + File.separator + i.substring(l + 1);\n File exportFile = new File(export);\n FileUtils.copyFile(new File(i), exportFile);\n ConsoleView.printlInConsoleln(\"String_Node_Str\" + exportFile.getName() + \"String_Node_Str\" + outputDir);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n if (!inFiles.isEmpty()) {\n try {\n FileUtils.deleteDirectory(delFile.getParentFile().getParentFile());\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }\n } else {\n System.out.println(\"String_Node_Str\");\n }\n}\n"
"public void shutdown() {\n dispatchAndWait(new Runnable() {\n\n public void run() {\n removeAll();\n remove();\n tray.remove(trayIcon);\n }\n });\n}\n"
"public FormStatus process(String actionName) {\n FormStatus retStatus = FormStatus.InfoError;\n String host = \"String_Node_Str\";\n if (\"String_Node_Str\".equals(actionName)) {\n URI appUri = URI.create(modelFiles.retrieveEntry(\"String_Node_Str\").getValue());\n boolean isRemote = \"String_Node_Str\".equals(appUri.getScheme());\n if (!fullTreeValidation(appUri, isRemote)) {\n logger.error(\"String_Node_Str\");\n return FormStatus.InfoError;\n }\n if (isRemote) {\n IRemoteConnection remoteConnection = mooseLauncher.getRemoteConnection(appUri.getHost());\n host = remoteConnection.getService(IRemoteConnectionHostService.class).getHostname();\n }\n String thisHost = \"String_Node_Str\";\n try {\n thisHost = InetAddress.getLocalHost().getCanonicalHostName();\n } catch (UnknownHostException e) {\n e.printStackTrace();\n logger.error(this.getClass().getName() + \"String_Node_Str\", e);\n }\n if (!thisHost.isEmpty()) {\n createICEUpdaterBlock(thisHost);\n }\n if (populateListOfLauncherFiles() != FormStatus.ReadyToProcess) {\n logger.error(getClass().getName() + \"String_Node_Str\");\n return FormStatus.InfoError;\n }\n if (isRemote) {\n mooseLauncher.setExecutable(Paths.get(appUri.getRawPath()).getFileName().toString(), \"String_Node_Str\", appUri.getRawPath() + \"String_Node_Str\");\n TableComponent hostsTable = (TableComponent) mooseLauncher.getForm().getComponent(JobLauncherForm.parallelId + 1);\n int index = hostsTable.addRow();\n ArrayList<Entry> row = hostsTable.getRow(index);\n ArrayList<Integer> selected = new ArrayList<Integer>();\n selected.add(new Integer(index));\n row.get(0).setValue(host);\n hostsTable.setSelectedRows(selected);\n } else {\n mooseLauncher.setExecutable(new File(appUri).getName(), \"String_Node_Str\", appUri.getPath() + \"String_Node_Str\");\n }\n ((ResourceComponent) mooseLauncher.getForm().getComponent(JobLauncherForm.outputId)).register(this);\n retStatus = mooseLauncher.process(actionName);\n outputFile = mooseLauncher.getOutputFile();\n } else if (\"String_Node_Str\".equals(actionName)) {\n retStatus = mooseModel.process(actionName);\n }\n status = retStatus;\n if (status.equals(FormStatus.Processing)) {\n Thread statusThread = new Thread(new Runnable() {\n public void run() {\n while (!status.equals(FormStatus.Processed)) {\n Thread.currentThread();\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n logger.error(getClass().getName() + \"String_Node_Str\", e);\n }\n status = mooseLauncher.getStatus();\n }\n return;\n }\n });\n statusThread.start();\n }\n return retStatus;\n}\n"
"protected void refreshProjects() {\n long ts = System.currentTimeMillis();\n Object selected = treeTable.getValue();\n List<Project> projects = configurationService.findProjects();\n treeTable.removeAllItems();\n for (Project project : projects) {\n List<ProjectVersion> versions = project.getProjectVersions();\n treeTable.addItem(project);\n treeTable.setItemIcon(project, Icons.PROJECT);\n treeTable.setChildrenAllowed(project, versions.size() > 0);\n }\n if (selected == null) {\n String selectedId = context.getUser().findSetting(UserSetting.SETTING_DESIGN_NAVIGATOR_SELECTION_ID).getValue();\n if (isNotBlank(selectedId)) {\n String projectId = context.getUser().findSetting(UserSetting.SETTING_DESIGN_NAVIGATOR_SELECTED_PROJECT_ID).getValue();\n if (isNotBlank(projectId)) {\n Collection<?> items = treeTable.getItemIds();\n for (Object object : items) {\n if (object instanceof Project && ((Project) object).getId().equals(projectId) && !((Project) object).isDeleted()) {\n addProjectVersions((Project) object);\n selected = findChild(selectedId, object);\n break;\n }\n }\n }\n }\n }\n selectAndExpand(selected);\n log.info(\"String_Node_Str\", (System.currentTimeMillis() - ts));\n}\n"
"private static ArrayList<AggregationGroup> processItems(Context context, TableDefinition definition, ArrayList<Item> items) {\n AggregationGroup aggregationGroup = new AggregationGroup(definition);\n TableDefinition tableDef = definition;\n boolean fieldDetected = false;\n ArrayList<AggregationGroup> result = new ArrayList<AggregationGroup>();\n int startPos = -1;\n int lastPos = -1;\n boolean includeList = false;\n for (int i = 0; i < items.size(); i++) {\n Item item = items.get(i);\n if (item.item.getPtr() != -1) {\n lastPos = item.item.getPtr() + item.item.getValue().length();\n }\n if (startPos == -1)\n startPos = item.item.getPtr();\n if (item.item.getType().equals(\"String_Node_Str\")) {\n SetFilter(aggregationGroup, tableDef, item);\n continue;\n }\n if (item.item.getType().equals(\"String_Node_Str\")) {\n SetFilter(aggregationGroup, tableDef, item);\n continue;\n }\n if (item.item.getType().equals(\"String_Node_Str\")) {\n lastPos = item.item.getPtr();\n if (aggregationGroup.items != null) {\n result.add(aggregationGroup);\n aggregationGroup.text = context.inputString.substring(startPos, item.item.getPtr());\n startPos = item.item.getPtr() + item.item.getValue().length();\n aggregationGroup = new AggregationGroup(definition);\n tableDef = definition;\n fieldDetected = false;\n }\n } else if (item.item.getValue().equals(\"String_Node_Str\")) {\n result.add(aggregationGroup);\n aggregationGroup.text = context.inputString.substring(startPos, item.item.getPtr());\n startPos = item.item.getPtr() + item.item.getValue().length();\n aggregationGroup = new AggregationGroup(definition);\n SetFilter(aggregationGroup, tableDef, item);\n tableDef = definition;\n fieldDetected = false;\n } else {\n String type = item.item.getType();\n if (type.equals(SemanticNames.TRUNCATE_VALUE)) {\n aggregationGroup.truncate = item.item.getValue();\n continue;\n }\n if (type.equals(SemanticNames.TRUNCATE_SUBFIELD_VALUE)) {\n aggregationGroup.subField = AggregationGroup.SubField.valueOf(item.item.getValue());\n continue;\n }\n if (type.equals(SemanticNames.TIMEZONEVALUE)) {\n aggregationGroup.timeZone = item.item.getValue().trim();\n char ch = aggregationGroup.timeZone.charAt(0);\n if (ch == '+' || ch == '-') {\n aggregationGroup.timeZone = \"String_Node_Str\" + aggregationGroup.timeZone;\n } else if (Character.getType(ch) == Character.DECIMAL_DIGIT_NUMBER) {\n aggregationGroup.timeZone = \"String_Node_Str\" + aggregationGroup.timeZone;\n }\n String prefix = aggregationGroup.timeZone.substring(0, 4);\n String val = aggregationGroup.timeZone.substring(4);\n switch(val.length()) {\n case 1:\n aggregationGroup.timeZone = prefix + \"String_Node_Str\" + val + \"String_Node_Str\";\n break;\n case 2:\n aggregationGroup.timeZone = prefix + val + \"String_Node_Str\";\n break;\n case 3:\n aggregationGroup.timeZone = prefix + \"String_Node_Str\" + val.substring(0, 1) + \"String_Node_Str\" + val.substring(1);\n break;\n case 4:\n if (val.charAt(1) == ':')\n aggregationGroup.timeZone = prefix + \"String_Node_Str\" + val;\n else {\n aggregationGroup.timeZone = prefix + val.substring(0, 2) + \"String_Node_Str\" + val.substring(2);\n }\n break;\n case 5:\n break;\n default:\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n TimeZone zone = TimeZone.getTimeZone(aggregationGroup.timeZone);\n String id = zone.getID();\n if (id.compareTo(aggregationGroup.timeZone) != 0) {\n throw new IllegalArgumentException(\"String_Node_Str\" + aggregationGroup.timeZone + \"String_Node_Str\");\n }\n continue;\n }\n if (type.equals(SemanticNames.TIMEZONEDISPLAYNAME)) {\n aggregationGroup.timeZone = item.item.getValue();\n if (!isCorrectTimeZone(aggregationGroup.timeZone))\n throw new IllegalArgumentException(\"String_Node_Str\" + aggregationGroup.timeZone + \"String_Node_Str\");\n continue;\n }\n if (type.equals(SemanticNames.GROUP)) {\n continue;\n }\n if (type.equals(SemanticNames.BATCH_VALUE)) {\n if (aggregationGroup.batch == null)\n aggregationGroup.batch = new ArrayList<Object>();\n aggregationGroup.batch.add(item.item.getValue());\n continue;\n }\n if (type.equals(SemanticNames.TOPBOTTOMVALUE)) {\n aggregationGroup.selectionValue = Integer.parseInt(item.item.getValue());\n continue;\n }\n if (type.equals(SemanticNames.UPPER)) {\n aggregationGroup.tocase = SemanticNames.UPPER;\n continue;\n }\n if (type.equals(SemanticNames.LOWER)) {\n aggregationGroup.tocase = SemanticNames.LOWER;\n continue;\n }\n if (type.equals(SemanticNames.TRUNCATE) || type.equals(SemanticNames.BATCH)) {\n SetFilter(aggregationGroup, tableDef, item);\n continue;\n }\n if (type.equals(SemanticNames.TERMS))\n continue;\n if (type.equals(SemanticNames.EXCLUDELIST)) {\n includeList = false;\n continue;\n }\n if (type.equals(SemanticNames.INCLUDELIST)) {\n includeList = true;\n continue;\n }\n if (type.equals(SemanticNames.EXCLUDE)) {\n continue;\n }\n if (type.equals(SemanticNames.STOPVALUEANY)) {\n if (aggregationGroup.stopWords == null) {\n aggregationGroup.stopWords = new ArrayList<String>();\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n continue;\n }\n if (type.equals(SemanticNames.STOPVALUE)) {\n if (aggregationGroup.stopWords == null) {\n aggregationGroup.stopWords = new ArrayList<String>();\n }\n aggregationGroup.stopWords.add(item.item.getValue());\n continue;\n }\n if (type.equals(SemanticNames.EXCLUDEVALUE)) {\n String value = item.item.getValue();\n if (\"String_Node_Str\".equals(value))\n value = null;\n if (includeList) {\n if (aggregationGroup.include == null) {\n aggregationGroup.include = new ArrayList<String>();\n }\n aggregationGroup.include.add(value);\n continue;\n } else {\n if (aggregationGroup.exclude == null) {\n aggregationGroup.exclude = new ArrayList<String>();\n }\n aggregationGroup.exclude.add(value);\n continue;\n }\n }\n if (type.equals(SemanticNames.ALIAS)) {\n aggregationGroup.name = item.item.getValue();\n continue;\n }\n if (item.item.getValue().equals(\"String_Node_Str\")) {\n continue;\n }\n if (type.equals(SemanticNames.TOPBOTTOM)) {\n if (item.item.getValue().equals(\"String_Node_Str\"))\n aggregationGroup.selection = AggregationGroup.Selection.Top;\n else\n aggregationGroup.selection = AggregationGroup.Selection.Bottom;\n SetFilter(aggregationGroup, tableDef, item);\n continue;\n }\n AggregationGroupItem ai = new AggregationGroupItem();\n if (aggregationGroup.items == null)\n aggregationGroup.items = new ArrayList<AggregationGroupItem>();\n aggregationGroup.items.add(ai);\n ai.name = item.item.getValue();\n if (tableDef != null) {\n FieldDefinition fd = tableDef.getFieldDef(ai.name);\n ai.fieldDef = fd;\n if (fd == null)\n throw new IllegalArgumentException(\"String_Node_Str\" + QueryUtils.FullLinkName(aggregationGroup.items));\n if (fd.isGroupField()) {\n ai.nestedLinks = GetNestedFieldsInfo(fd);\n ai.isLink = true;\n for (FieldDefinition nestedFieldDef : fd.getNestedFields()) {\n if (nestedFieldDef.isGroupField()) {\n List<LinkInfo> info = GetNestedFieldsInfo(nestedFieldDef);\n if (info.size() == 0)\n throw new IllegalArgumentException(\"String_Node_Str\" + nestedFieldDef.getName());\n nestedFieldDef = info.get(0).fieldDef;\n }\n if (tableDef.isLinkField(nestedFieldDef.getName()) || nestedFieldDef.isXLinkField()) {\n TableDefinition td = tableDef.getLinkExtentTableDef(nestedFieldDef);\n if (td == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + QueryUtils.FullLinkName(aggregationGroup.items));\n }\n tableDef = td;\n }\n ai.tableDef = tableDef;\n break;\n }\n } else if (fd.isLinkField() || fd.isXLinkField()) {\n ai.isLink = true;\n if (fieldDetected)\n throw new IllegalArgumentException(\"String_Node_Str\" + QueryUtils.FullLinkName(aggregationGroup.items));\n tableDef = tableDef.getLinkExtentTableDef(fd);\n if (tableDef == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + QueryUtils.FullLinkName(aggregationGroup.items));\n }\n } else {\n if (fieldDetected)\n throw new IllegalArgumentException(\"String_Node_Str\" + QueryUtils.FullLinkName(aggregationGroup.items));\n fieldDetected = true;\n }\n ai.tableDef = tableDef;\n }\n if (item.queryItems != null) {\n for (int j = 0; j < item.queryItems.size(); j++) {\n ArrayList<GrammarItem> filterItems = item.queryItems.get(j);\n ai.query = CompileQuery(tableDef, ai.query, filterItems);\n GrammarItem last = filterItems.get(filterItems.size() - 2);\n lastPos = last.getPtr() + last.getValue().length();\n }\n }\n }\n }\n if (aggregationGroup != null && aggregationGroup.items != null) {\n aggregationGroup.text = context.inputString.substring(startPos, lastPos);\n result.add(aggregationGroup);\n }\n for (int i = 0; i < result.size(); i++) {\n AggregationGroup group = result.get(i);\n if (group.batch != null && group.items != null) {\n AggregationGroupItem item = group.items.get(group.items.size() - 1);\n if (item.fieldDef == null)\n throw new IllegalArgumentException(\"String_Node_Str\" + item.name);\n FieldType itemType = item.fieldDef.getType();\n if (itemType == FieldType.GROUP || itemType == FieldType.LINK || itemType == FieldType.XLINK || itemType == FieldType.BINARY || itemType == FieldType.BOOLEAN)\n throw new IllegalArgumentException(\"String_Node_Str\" + itemType.toString() + \"String_Node_Str\");\n for (int j = 0; j < group.batch.size(); j++) {\n try {\n group.batch.set(j, convert(itemType, (String) group.batch.get(j)));\n } catch (Exception e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + group.batch.get(j) + \"String_Node_Str\" + item.fieldDef.getName());\n }\n }\n if (group.batch.size() > 1) {\n Object first = group.batch.get(0);\n for (int j = 1; j < group.batch.size(); j++) {\n switch(compareBatchValues(itemType, first, group.batch.get(j))) {\n case 0:\n throw new IllegalArgumentException(\"String_Node_Str\");\n case 1:\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n first = group.batch.get(j);\n }\n }\n }\n if (group.truncate != null && group.items != null) {\n AggregationGroupItem item = group.items.get(group.items.size() - 1);\n if (item.fieldDef == null)\n throw new IllegalArgumentException(\"String_Node_Str\" + item.name);\n if (!(item.fieldDef.getType() == FieldType.TIMESTAMP))\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n for (int i = 0; i < result.size(); i++) {\n AggregationGroup group = result.get(i);\n group.whereFilter = getWhereQuery(group);\n }\n return result;\n}\n"
"public Vector extractPrimaryKeyFromObject(Object domainObject, AbstractSession session, boolean shouldReturnNullIfNull) {\n boolean isPersistenceEntity = domainObject instanceof PersistenceEntity;\n if (isPersistenceEntity) {\n Vector key = ((PersistenceEntity) domainObject)._persistence_getPKVector();\n if (key != null) {\n return key;\n }\n }\n ClassDescriptor descriptor = this.descriptor;\n boolean isNull = false;\n if (descriptor.hasInheritance() && (domainObject.getClass() != descriptor.getJavaClass()) && (!domainObject.getClass().getSuperclass().equals(descriptor.getJavaClass()))) {\n return session.getDescriptor(domainObject).getObjectBuilder().extractPrimaryKeyFromObject(domainObject, session, shouldReturnNullIfNull);\n } else {\n List primaryKeyFields = descriptor.getPrimaryKeyFields();\n Vector primaryKeyValues = new NonSynchronizedVector(primaryKeyFields.size());\n List mappings = getPrimaryKeyMappings();\n int size = mappings.size();\n if (descriptor.hasSimplePrimaryKey()) {\n for (int index = 0; index < size; index++) {\n AbstractDirectMapping mapping = (AbstractDirectMapping) mappings.get(index);\n Object keyValue = mapping.valueFromObject(domainObject, (DatabaseField) primaryKeyFields.get(index), session);\n if (keyValue == null || ((size == 1) && Helper.isEquivalentToNull(keyValue))) {\n if (shouldReturnNullIfNull) {\n return null;\n }\n isNull = true;\n }\n primaryKeyValues.add(keyValue);\n }\n } else {\n AbstractRecord databaseRow = createRecord(size, session);\n for (int index = 0; index < size; index++) {\n DatabaseMapping mapping = (DatabaseMapping) mappings.get(index);\n if (mapping != null) {\n mapping.writeFromObjectIntoRow(domainObject, databaseRow, session);\n }\n }\n List primaryKeyClassifications = getPrimaryKeyClassifications();\n Platform platform = session.getPlatform(domainObject.getClass());\n for (int index = 0; index < size; index++) {\n Class classification = (Class) primaryKeyClassifications.get(index);\n Object value = databaseRow.get((DatabaseField) primaryKeyFields.get(index));\n if (value == null || ((size == 1) && Helper.isEquivalentToNull(value))) {\n if (shouldReturnNullIfNull) {\n return null;\n }\n isNull = true;\n }\n primaryKeyValues.add(platform.convertObject(value, classification));\n }\n }\n if (isPersistenceEntity && (!isNull)) {\n ((PersistenceEntity) domainObject)._persistence_setPKVector(primaryKeyValues);\n }\n return primaryKeyValues;\n }\n}\n"
"public String execute(String[] params, String content, Snip snip) throws IllegalArgumentException {\n StringBuffer buffer = new StringBuffer();\n buffer.append(\"String_Node_Str\");\n if (params.length == 2) {\n buffer.append(\"String_Node_Str\").append(params[1]).append(\"String_Node_Str\");\n } else if (params.length == 1) {\n buffer.append(append(params[0]));\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n return (buffer.append(params[0]).append(\"String_Node_Str\")).toString();\n}\n"
"public MetaView build(ChartBuilder chartBuilder) throws JAXBException, AxelorException {\n searchFields = new ArrayList<String>();\n onNewFields = new ArrayList<RecordField>();\n joins = new ArrayList<String>();\n String[] queryString = prepareQuery(chartBuilder);\n String xml = createXml(chartBuilder, queryString);\n log.debug(\"String_Node_Str\", xml);\n ObjectViews chartView = XMLViews.fromXML(xml);\n MetaView metaView = metaService.generateMetaView(chartView.getViews().get(0));\n if (metaView != null) {\n chartBuilder.setMetaViewGenerated(metaView);\n }\n}\n"
"public void refresh(final ContactDTO contactDTO) {\n computationTriggerManager.prepareForContact(contactDTO);\n valueChanges.clear();\n view.getDetailsContainer().removeAll();\n final LayoutDTO layout = contactDTO.getContactModel().getDetails().getLayout();\n int count = 0;\n for (final LayoutGroupDTO groupDTO : layout.getGroups()) {\n count += groupDTO.getConstraints().size();\n }\n if (count == 0) {\n view.fillContainer(new Label(I18N.CONSTANTS.contactDetailsNoDetails()));\n return;\n }\n formPanel = Forms.panel();\n final Grid gridLayout = new Grid(layout.getRowsCount(), layout.getColumnsCount());\n gridLayout.setCellPadding(0);\n gridLayout.setCellSpacing(0);\n formPanel.add(new Label(I18N.CONSTANTS.contactUniqueId() + contactDTO.getId()));\n final DispatchQueue queue = new DispatchQueue(dispatch, true);\n for (final LayoutGroupDTO groupLayout : layout.getGroups()) {\n if (!groupLayout.getHasIterations()) {\n FieldSet fieldSet = createGroupLayoutFieldSet(contactDTO, groupLayout, queue, null, null, null);\n fieldSet.setHeadingHtml(groupLayout.getTitle());\n fieldSet.setCollapsible(true);\n fieldSet.setBorders(true);\n gridLayout.setWidget(groupLayout.getRow(), groupLayout.getColumn(), fieldSet);\n continue;\n }\n final FieldSet fieldSet = (FieldSet) groupLayout.getWidget();\n gridLayout.setWidget(groupLayout.getRow(), groupLayout.getColumn(), fieldSet);\n final IterableGroupPanel tabPanel = Forms.iterableGroupPanel(dispatch, groupLayout, contactDTO, ProfileUtils.isGranted(auth(), GlobalPermissionEnum.CREATE_ITERATIONS), eventBus);\n tabPanel.setDelegate(this);\n fieldSet.add(tabPanel);\n tabPanel.setAutoHeight(true);\n tabPanel.setAutoWidth(true);\n tabPanel.setTabScroll(true);\n tabPanel.addStyleName(\"String_Node_Str\");\n tabPanel.setBorders(true);\n tabPanel.setBodyBorder(false);\n GetLayoutGroupIterations getIterations = new GetLayoutGroupIterations(groupLayout.getId(), contactDTO.getId(), -1);\n queue.add(getIterations, new CommandResultHandler<ListResult<LayoutGroupIterationDTO>>() {\n public void onCommandFailure(final Throwable throwable) {\n if (Log.isErrorEnabled()) {\n Log.error(\"String_Node_Str\", throwable);\n }\n throw new RuntimeException(throwable);\n }\n protected void onCommandSuccess(ListResult<LayoutGroupIterationDTO> result) {\n DispatchQueue iterationsQueue = new DispatchQueue(dispatch, true);\n for (final LayoutGroupIterationDTO iteration : result.getList()) {\n final IterableGroupItem tab = new IterableGroupItem(tabPanel, iteration.getId(), iteration.getName());\n tabPanel.addIterationTab(tab);\n Layout tabLayout = Layouts.fitLayout();\n tab.setLayout(tabLayout);\n FieldSet tabSet = createGroupLayoutFieldSet(contactDTO, groupLayout, iterationsQueue, iteration == null ? null : iteration.getId(), tabPanel, tab);\n tab.add(tabSet);\n }\n iterationsQueue.start();\n if (tabPanel.getItemCount() > 0) {\n tabPanel.setSelection(tabPanel.getItem(0));\n }\n }\n }, new LoadingMask(view.getDetailsContainer()));\n fieldSet.layout();\n }\n view.getSaveButton().removeAllListeners();\n view.getSaveButton().addSelectionListener(new SelectionListener<ButtonEvent>() {\n public void componentSelected(final ButtonEvent buttonEvent) {\n view.getSaveButton().disable();\n dispatch.execute(buildCheckContactDuplicationCommand(contactDTO), new CommandResultHandler<ListResult<ContactDTO>>() {\n protected void onCommandSuccess(ListResult<ContactDTO> result) {\n if (result == null || result.isEmpty()) {\n updateContact(contactDTO, new CommandResultHandler<ContactDTO>() {\n protected void onCommandSuccess(ContactDTO updatedContactDTO) {\n view.getSaveButton().enable();\n }\n }, view.getDetailsContainer());\n return;\n }\n final DedupeContactDialog dedupeContactDialog = view.generateDedupeDialog();\n dedupeContactDialog.getPossibleDuplicatesGrid().getStore().add(result.getList());\n dedupeContactDialog.getFirstStepMainButton().addSelectionListener(new SelectionListener<ButtonEvent>() {\n public void componentSelected(ButtonEvent ce) {\n updateContact(contactDTO, new CommandResultHandler<ContactDTO>() {\n protected void onCommandSuccess(ContactDTO result) {\n dedupeContactDialog.hide();\n }\n }, view.getDetailsContainer());\n }\n });\n dedupeContactDialog.setSecondStepHandler(new DedupeContactDialog.SecondStepHandler() {\n public void initialize(final Integer contactId, final ListStore<ContactDuplicatedProperty> propertiesStore) {\n updateContact(contactDTO, new CommandResultHandler<ContactDTO>() {\n protected void onCommandSuccess(ContactDTO updatedContactDTO) {\n dispatch.execute(new GetContactDuplicatedProperties(contactId, updatedContactDTO.getId(), null), new CommandResultHandler<ListResult<ContactDuplicatedProperty>>() {\n protected void onCommandSuccess(ListResult<ContactDuplicatedProperty> result) {\n propertiesStore.add(result.getList());\n }\n }, new LoadingMask(dedupeContactDialog));\n }\n }, dedupeContactDialog);\n }\n public void downloadImage(String id, final Image image) {\n imageProvider.provideDataUrl(id, new SuccessCallback<String>() {\n public void onSuccess(String dataUrl) {\n image.setUrl(dataUrl);\n }\n });\n }\n public void handleDedupeContact(final Integer targetedContactId, List<ContactDuplicatedProperty> selectedProperties) {\n dispatch.execute(new DedupeContact(selectedProperties, contactDTO.getId(), targetedContactId), new CommandResultHandler<ContactDTO>() {\n protected void onCommandSuccess(ContactDTO targetedContactDTO) {\n dedupeContactDialog.hide();\n final PageRequest currentRequest = injector.getPageManager().getCurrentPageRequest(false);\n eventBus.navigateRequest(Page.CONTACT_DASHBOARD.requestWith(RequestParameter.ID, targetedContactId));\n eventBus.fireEvent(new UpdateEvent(UpdateEvent.CONTACT_DELETE, currentRequest));\n }\n });\n }\n public void handleCancel() {\n dedupeContactDialog.hide();\n }\n });\n dedupeContactDialog.addWindowListener(new WindowListener() {\n public void windowHide(WindowEvent windowEvent) {\n super.windowHide(windowEvent);\n if (windowEvent.getType() == Events.Hide) {\n view.getSaveButton().enable();\n }\n }\n });\n dedupeContactDialog.show();\n }\n });\n }\n });\n view.getDeleteButton().removeAllListeners();\n view.getDeleteButton().addSelectionListener(new SelectionListener<ButtonEvent>() {\n public void componentSelected(final ButtonEvent ce) {\n onDeleteContact(contactDTO);\n }\n });\n view.getDeleteButton().setEnabled(canDeleteContact());\n view.getDeleteButton().setVisible(canDeleteContact());\n view.getExportButton().removeAllListeners();\n view.getExportButton().addSelectionListener(new SelectionListener<ButtonEvent>() {\n public void componentSelected(final ButtonEvent ce) {\n onExportContact(contactDTO);\n }\n });\n queue.start();\n formPanel.add(gridLayout);\n view.fillContainer(formPanel);\n}\n"
"private void performBundleAdjustment(CameraView seed, CameraPinholeRadial intrinsic) {\n BundleAdjustmentShur_DSCC sba = new BundleAdjustmentShur_DSCC(1e-3);\n sba.configure(1e-4, 1e-4, 20);\n BundleAdjustmentSceneStructure structure = new BundleAdjustmentSceneStructure();\n BundleAdjustmentObservations observations = new BundleAdjustmentObservations(graphNodes.size());\n structure.initialize(1, graphNodes.size(), featuresPruned.size());\n double scale = Math.max(intrinsic.width, intrinsic.height);\n intrinsic.fx /= scale;\n intrinsic.fy /= scale;\n intrinsic.cx /= scale;\n intrinsic.cy /= scale;\n intrinsic.skew /= scale;\n structure.setCamera(0, true, intrinsic);\n for (int i = 0; i < graphNodes.size(); i++) {\n CameraView v = graphNodes.get(i);\n structure.setView(i, v == seed, v.viewToWorld.invert(null));\n structure.connectViewToCamera(i, 0);\n }\n for (int indexPoint = 0; indexPoint < featuresPruned.size(); indexPoint++) {\n Feature3D f = featuresPruned.get(indexPoint);\n structure.setPoint(indexPoint, f.worldPt.x, f.worldPt.y, f.worldPt.z);\n for (int j = 0; j < f.views.size(); j++) {\n CameraView view = f.views.get(j);\n structure.connectPointToView(indexPoint, view.index);\n Point2D_F64 pixel = graphNodes.get(view.index).featurePixels.get(f.feature.get(j));\n observations.getView(view.index).add(indexPoint, (float) (pixel.x / scale), (float) (pixel.y / scale));\n }\n }\n if (!sba.optimize(structure, observations)) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n System.out.println(\"String_Node_Str\" + sba.getErrorBefore() + \"String_Node_Str\" + sba.getErrorAfter());\n for (int i = 0; i < graphNodes.size(); i++) {\n structure.views[i].worldToView.invert(graphNodes.get(i).viewToWorld);\n }\n for (int i = 0; i < featuresPruned.size(); i++) {\n featuresPruned.get(i).worldPt.set(structure.points[i]);\n }\n intrinsic.fx *= scale;\n intrinsic.fy *= scale;\n intrinsic.cx *= scale;\n intrinsic.cy *= scale;\n intrinsic.skew *= scale;\n}\n"
"public Collection<EdgeTripleWithStringEdgeLabel<GradoopId>> map(GraphTransaction<G, V, E> transaction) throws Exception {\n Map<GradoopId, Integer> vertexLabels = Maps.newHashMap();\n Collection<EdgeTripleWithStringEdgeLabel<GradoopId>> triples = Lists.newArrayList();\n for (V vertex : transaction.getVertices()) {\n Integer label = dictionary.get(vertex.getLabel());\n if (label != null) {\n vertexLabels.put(vertex.getId(), label);\n }\n }\n for (E edge : transaction.getEdges()) {\n Integer sourceLabel = vertexLabels.get(edge.getSourceId());\n if (sourceLabel != null) {\n Integer targetLabel = vertexLabels.get(edge.getTargetId());\n if (targetLabel != null) {\n triples.add(new EdgeTripleWithStringEdgeLabel<>(edge.getSourceId(), edge.getTargetId(), edge.getLabel(), sourceLabel, targetLabel));\n }\n }\n }\n return triples;\n}\n"
"public Pipeline createPipelineLatest(Pipeline pipeline) {\n AbstractBuild prevBuild = null;\n List<AbstractBuild> builds = new ArrayList<>();\n List<Stage> stages = new ArrayList<>();\n for (Stage stage : pipeline.getStages()) {\n List<Task> tasks = new ArrayList<>();\n for (Task task : stage.getTasks()) {\n AbstractProject job = Jenkins.getInstance().getItem(task.getId().toString(), Jenkins.getInstance(), AbstractProject.class);\n AbstractBuild build = job.getLastBuild();\n if (firstBuild == null) {\n firstBuild = build;\n }\n if (build != null && firstBuild.equals(getFirstUpstreamBuild(build))) {\n Status status = resolveStatus(build);\n tasks.add(new Task(task.getId(), task.getName(), status));\n } else {\n tasks.add(new Task(task.getId(), task.getName(), StatusFactory.idle()));\n }\n prevBuild = build;\n }\n stages.add(new Stage(stage.getName(), tasks));\n }\n return new Pipeline(pipeline.getName(), stages);\n}\n"
"public void testLog2() {\n Assert.assertEquals(2, LogMath.log2(4), 0.0001);\n Assert.assertEquals(3, LogMath.log2(8), 0.0001);\n Assert.assertEquals(10, LogMath.log2(1024), 0.0001);\n Assert.assertEquals(-1, LogMath.log2(0.5), 0.0001);\n}\n"
"protected boolean _transferInputs(IOPort port) throws IllegalActionException {\n if (!port.isInput() || !port.isOpaque()) {\n throw new IllegalActionException(this, port, \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (port instanceof RefinementPort) {\n return super._transferInputs(port);\n }\n boolean result = false;\n Tag physicalTag = getPhysicalTag();\n while (true) {\n if (_realTimeInputEventQueue.isEmpty()) {\n break;\n }\n RealTimeEvent realTimeEvent = (RealTimeEvent) _realTimeInputEventQueue.peek();\n int compare = realTimeEvent.deliveryTag.compareTo(physicalTag);\n if (compare > 0) {\n break;\n } else if (compare == 0) {\n Parameter parameter = (Parameter) ((NamedObj) realTimeEvent.port).getAttribute(\"String_Node_Str\");\n double realTimeDelay = 0.0;\n if (parameter != null) {\n realTimeDelay = ((DoubleToken) parameter.getToken()).doubleValue();\n } else {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n Time lastModelTime = _currentTime;\n if (isNetworkPort(realTimeEvent.port)) {\n _realTimeInputEventQueue.poll();\n realTimeEvent.port.sendInside(realTimeEvent.channel, realTimeEvent.token);\n } else {\n setTag(realTimeEvent.timestampTag.timestamp, realTimeEvent.timestampTag.microstep);\n _realTimeInputEventQueue.poll();\n realTimeEvent.port.sendInside(realTimeEvent.channel, realTimeEvent.token);\n setTag(lastModelTime, lastMicrostep);\n }\n if (_debugging) {\n _debug(getName(), \"String_Node_Str\" + realTimeEvent.port.getName());\n }\n _sensorInterruptOccurred = true;\n result = true;\n } else {\n throw new IllegalActionException(realTimeEvent.port, \"String_Node_Str\" + \"String_Node_Str\" + realTimeEvent.deliveryTag.timestamp + \"String_Node_Str\" + realTimeEvent.deliveryTag.microstep + \"String_Node_Str\" + physicalTag.timestamp + \"String_Node_Str\" + physicalTag.microstep);\n }\n }\n if (isNetworkPort(port)) {\n while (true) {\n if (!super._transferInputs(port)) {\n break;\n } else {\n result = true;\n _sensorInterruptOccurred = true;\n }\n }\n }\n Parameter parameter = (Parameter) ((NamedObj) port).getAttribute(\"String_Node_Str\");\n double realTimeDelay = 0.0;\n if (parameter != null) {\n realTimeDelay = ((DoubleToken) parameter.getToken()).doubleValue();\n }\n if (realTimeDelay == 0.0) {\n Time lastModelTime = _currentTime;\n int lastMicrostep = _microstep;\n setTag(physicalTag.timestamp, physicalTag.microstep);\n if (super._transferInputs(port)) {\n _sensorInterruptOccurred = true;\n result = true;\n }\n setTag(lastModelTime, lastMicrostep);\n } else {\n for (int i = 0; i < port.getWidth(); i++) {\n try {\n if (i < port.getWidthInside()) {\n if (port.hasToken(i)) {\n Token t = port.get(i);\n Time waitUntilTime = physicalTag.timestamp.add(realTimeDelay);\n RealTimeEvent realTimeEvent = new RealTimeEvent(port, i, t, new Tag(waitUntilTime, physicalTag.microstep));\n _realTimeInputEventQueue.add(realTimeEvent);\n result = true;\n Actor container = (Actor) getContainer();\n container.getExecutiveDirector().fireAt((Actor) container, waitUntilTime);\n }\n }\n } catch (NoTokenException ex) {\n throw new IllegalActionException(this, ex, null);\n }\n }\n }\n return result;\n}\n"
"public void setupNetworking() throws IOException {\n if (NetworkUtil.getNetworkInterface() == null) {\n LOG.error(\"String_Node_Str\");\n return;\n }\n try {\n if (!NetworkUtil.getNetworkInterface().supportsMulticast()) {\n LOG.error(\"String_Node_Str\");\n return;\n }\n } catch (SocketException ex) {\n LOG.error(\"String_Node_Str\", ex);\n return;\n }\n try {\n if (NetworkUtil.getNetworkInterface() == null || !NetworkUtil.getNetworkInterface().isUp()) {\n LOG.error(\"String_Node_Str\");\n return;\n }\n } catch (SocketException ex) {\n LOG.error(\"String_Node_Str\", ex);\n return;\n }\n socket = new MulticastSocket(multicastPort);\n socket.setReuseAddress(true);\n socket.setTimeToLive(multicastTtl);\n group = InetAddress.getByName(multicastGroup);\n switch(Parameters.INSTANCE.currentOS()) {\n case MAC_64:\n case MAC_32:\n socket.joinGroup(new InetSocketAddress(group, multicastPort), NetworkUtil.getNetworkInterface());\n break;\n case WIN_64:\n case WIN_32:\n case LINUX_64:\n case LINUX_32:\n default:\n socket.joinGroup(group);\n break;\n }\n LOG.info(\"String_Node_Str\");\n try {\n GossipMessage message = new GossipMessage(me.getIp(), me.getGossipPort(), me.getDataPort());\n message.setMillisecondsSinceMidnight(TimeUtil.getMillisecondsSinceMidnight());\n message.getTags().putAll(me.getTags());\n message.getMembers().add(MemberKey.getKey(me));\n message.getClock().add(me.getSequence().incrementAndGet());\n message.setPublicKey(me.getPublicKey());\n sendMessage(message);\n } catch (IOException ex) {\n LOG.error(\"String_Node_Str\", ex);\n }\n}\n"
"public int getChildCount() {\n if (condition == null || statement == null)\n throw new RuntimeException(\"String_Node_Str\");\n return super.getChildCount();\n}\n"
"protected ConnectionStatus checkConnection(boolean displayDialog) {\n HDFSConnectionBean connectionBean = getConnectionBean();\n ConnectionStatus connectionStatus = HadoopOperationManager.getInstance().testConnection(connectionBean);\n hdfsSettingIsValide = connectionStatus.getResult();\n String connectException = connectionStatus.getMessageException();\n if (hdfsSettingIsValide) {\n if (!isReadOnly()) {\n updateStatus(IStatus.OK, null);\n }\n if (displayDialog) {\n MessageDialog.openInformation(getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\", connectionItem.getProperty().getDisplayName()));\n }\n } else {\n String mainMsg = Messages.getString(\"String_Node_Str\");\n if (!isReadOnly()) {\n updateStatus(IStatus.WARNING, mainMsg);\n }\n if (displayDialog) {\n new ErrorDialogWidthDetailArea(getShell(), Activator.PLUGIN_ID, mainMsg, connectException);\n }\n }\n return connectionStatus;\n}\n"
"private Object createDataset() {\n String s = DefaultMessagesImpl.getString(\"String_Node_Str\");\n if (groupSize2GroupFrequency != null) {\n String[] array = groupSize2GroupFrequency.keySet().toArray(new String[0]);\n List<String> groups = Arrays.asList(array);\n Collections.sort(groups, new Comparator<String>() {\n\n public int compare(String o1, String o2) {\n return Integer.parseInt(o1) - Integer.parseInt(o2);\n }\n });\n return TOPChartUtil.getInstance().createDatasetForMatchRule(groupSize2GroupFrequency, groups, times, s);\n}\n"
"public Object calculate(Object value) {\n if (value == null) {\n return new Double(-1);\n }\n if (intervalStart == null) {\n return new Double(Math.floor(DateTimeUtil.diffDay(defaultStart, (Date) value) / getDateIntervalRange()));\n } else {\n if (DateTimeUtil.diffDay((Date) intervalStart, (Date) value) < 0) {\n return new Double(-1);\n } else {\n return new Double(Math.floor(DateTimeUtil.diffDay((Date) intervalStart, (Date) value) / intervalRange));\n }\n }\n}\n"
"public String toString() {\n return \"String_Node_Str\" + \"String_Node_Str\" + actors + '\\'' + \"String_Node_Str\" + awards + '\\'' + \"String_Node_Str\" + country + '\\'' + \"String_Node_Str\" + director + '\\'' + \"String_Node_Str\" + genre + '\\'' + \"String_Node_Str\" + imdbId + '\\'' + \"String_Node_Str\" + imdbRating + '\\'' + \"String_Node_Str\" + imdbVotes + '\\'' + \"String_Node_Str\" + language + '\\'' + \"String_Node_Str\" + metascore + '\\'' + \"String_Node_Str\" + poster + '\\'' + \"String_Node_Str\" + rated + '\\'' + \"String_Node_Str\" + released + '\\'' + \"String_Node_Str\" + response + '\\'' + \"String_Node_Str\" + runtime + '\\'' + \"String_Node_Str\" + title + '\\'' + \"String_Node_Str\" + type + '\\'' + \"String_Node_Str\" + writer + '\\'' + \"String_Node_Str\" + year + '\\'' + '}';\n}\n"
"public void loadModule(File dir, boolean updateCheck) {\n if (isLoaded(dir))\n return;\n File metadataFile = new File(dir, \"String_Node_Str\");\n ModuleMetadata metadata = new ModuleMetadata();\n if (metadataFile.exists()) {\n try {\n metadata = new Gson().fromJson(FileLib.read(metadataFile), ModuleMetadata.class);\n metadata.setFileName(dir.getName());\n } catch (Exception exception) {\n Console.getInstance().printStackTrace(exception);\n }\n }\n try {\n if (metadata != null && updateCheck) {\n try {\n Console.getInstance().out.println(\"String_Node_Str\" + metadata.getFileName());\n File newMetadataFile = new File(modulesDir, \"String_Node_Str\");\n FileUtils.copyURLToFile(new URL(\"String_Node_Str\" + metadata.getFileName()), newMetadataFile);\n String currVersion = metadata.getVersion();\n try {\n ModuleMetadata newMetadata = new Gson().fromJson(new FileReader(newMetadataFile), ModuleMetadata.class);\n String newVersion = newMetadata.getVersion();\n if (!newVersion.equals(currVersion)) {\n downloadModule(metadata.getFileName(), false);\n ChatLib.chat(\"String_Node_Str\" + metadata.getName());\n }\n } catch (Exception exception) {\n Console.getInstance().printStackTrace(exception);\n }\n newMetadataFile.delete();\n } catch (IOException e) {\n Console.getInstance().out.println(\"String_Node_Str\" + metadata.getName());\n }\n }\n String compiledScript = compileScripts(dir, metadata.getIgnored());\n Module module = new Module(dir.getName(), getAllFiles(dir, metadata.getIgnored()), metadata);\n getRequiredModules(metadata, updateCheck);\n TriggerRegister.currentModule = module;\n getScriptEngine().eval(compiledScript);\n TriggerRegister.currentModule = null;\n cachedModules.add(module);\n } catch (IOException | ScriptException exception) {\n Console.getInstance().printStackTrace(exception);\n }\n}\n"
"public int getMetaFromState(IBlockState state) {\n return state.getValue(TYPE_ORIENT).ordinal() | (state.getValue(TYPE_PRESSED).ordinal() << 1);\n}\n"
"public List disseminateList(DSpaceObject dso) throws CrosswalkException, IOException, SQLException, AuthorizeException {\n if (dso.getType() != Constants.ITEM) {\n throw new CrosswalkObjectNotSupported(\"String_Node_Str\" + dso.getID() + \"String_Node_Str\" + Constants.typeText[dso.getType()]);\n }\n Item item = (Item) dso;\n List<Element> metas = new ArrayList<Element>();\n DCValue[] values = item.getMetadata(Item.ANY, Item.ANY, Item.ANY, Item.ANY);\n Iterator<String> schemaIterator = schemaURLs.keySet().iterator();\n while (schemaIterator.hasNext()) {\n String s = schemaIterator.next();\n Element e = new Element(\"String_Node_Str\", XHTML_NAMESPACE);\n e.setAttribute(\"String_Node_Str\", s);\n e.setAttribute(\"String_Node_Str\", schemaURLs.get(s));\n metas.add(e);\n }\n for (int i = 0; i < values.length; i++) {\n DCValue v = values[i];\n String key = v.schema + \"String_Node_Str\" + v.element + (v.qualifier != null ? \"String_Node_Str\" + v.qualifier : \"String_Node_Str\");\n String originalKey = key;\n String name = names.get(key);\n if (name == null && v.qualifier != null) {\n key = v.schema + \"String_Node_Str\" + v.element;\n name = names.get(key);\n }\n if (name == null) {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + dso.getID());\n }\n } else {\n Element e = new Element(\"String_Node_Str\", XHTML_NAMESPACE);\n e.setAttribute(\"String_Node_Str\", name);\n if (v.value == null) {\n e.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n String reason = Verifier.checkCharacterData(v.value);\n if (reason == null) {\n e.setAttribute(\"String_Node_Str\", v.value == null ? \"String_Node_Str\" : v.value);\n } else {\n log.warn(\"String_Node_Str\" + reason);\n String simpleText = v.value.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n if (Verifier.checkCharacterData(simpleText) == null)\n e.setAttribute(\"String_Node_Str\", simpleText);\n }\n }\n if (v.language != null && !v.language.equals(\"String_Node_Str\")) {\n e.setAttribute(\"String_Node_Str\", v.language, Namespace.XML_NAMESPACE);\n }\n String schemeAttr = schemes.get(key);\n if (schemeAttr != null) {\n e.setAttribute(\"String_Node_Str\", schemeAttr);\n }\n metas.add(e);\n }\n }\n return metas;\n}\n"
"public Address pickAddress() throws Exception {\n String currentAddress = null;\n try {\n final Config config = node.getConfig();\n final String localAddress = System.getProperty(\"String_Node_Str\");\n if (localAddress != null) {\n currentAddress = InetAddress.getByName(localAddress.trim()).getHostAddress();\n }\n if (currentAddress == null) {\n final Set<String> interfaces = new HashSet<String>();\n if (config.getNetworkConfig().getJoin().getTcpIpConfig().isEnabled()) {\n Collection<Address> possibleAddresses = node.getPossibleMembers();\n for (Address possibleAddress : possibleAddresses) {\n interfaces.add(possibleAddress.getHost());\n }\n }\n if (config.getNetworkConfig().getInterfaces().isEnabled()) {\n interfaces.addAll(config.getNetworkConfig().getInterfaces().getInterfaces());\n }\n if (interfaces.contains(\"String_Node_Str\")) {\n currentAddress = \"String_Node_Str\";\n } else {\n final Enumeration<NetworkInterface> enums = NetworkInterface.getNetworkInterfaces();\n interfaces: while (enums.hasMoreElements()) {\n final NetworkInterface ni = enums.nextElement();\n final Enumeration<InetAddress> e = ni.getInetAddresses();\n while (e.hasMoreElements()) {\n final InetAddress inetAddress = e.nextElement();\n if (inetAddress instanceof Inet4Address) {\n final String address = inetAddress.getHostAddress();\n if (matchAddress(address, interfaces)) {\n currentAddress = address;\n break interfaces;\n }\n } else {\n if (!inetAddress.isLoopbackAddress()) {\n currentAddress = address;\n break interfaces;\n }\n }\n }\n }\n }\n if (config.getNetworkConfig().getInterfaces().isEnabled() && currentAddress == null) {\n String msg = \"String_Node_Str\";\n msg += \"String_Node_Str\";\n logger.log(Level.SEVERE, msg);\n throw new RuntimeException(msg);\n }\n }\n if (currentAddress == null) {\n currentAddress = \"String_Node_Str\";\n }\n final InetAddress inetAddress = InetAddress.getByName(currentAddress);\n final boolean reuseAddress = config.isReuseAddress();\n ServerSocket serverSocket = serverSocketChannel.socket();\n serverSocket.setReuseAddress(reuseAddress);\n InetSocketAddress isa;\n int port = config.getPort();\n for (int i = 0; i < 100; i++) {\n try {\n boolean bindAny = node.getGroupProperties().SOCKET_BIND_ANY.getBoolean();\n if (bindAny) {\n isa = new InetSocketAddress(port);\n } else {\n isa = new InetSocketAddress(inetAddress, port);\n }\n serverSocket.bind(isa, 100);\n break;\n } catch (final Exception e) {\n if (config.isPortAutoIncrement()) {\n serverSocket = serverSocketChannel.socket();\n serverSocket.setReuseAddress(reuseAddress);\n port++;\n } else {\n String msg = \"String_Node_Str\" + port + \"String_Node_Str\" + \"String_Node_Str\";\n logger.log(Level.SEVERE, msg);\n throw e;\n }\n }\n }\n serverSocketChannel.configureBlocking(false);\n return new Address(currentAddress, port);\n } catch (Exception e) {\n e.printStackTrace();\n throw e;\n }\n}\n"
"private void createInputSection(final Composite parent, FormToolkit toolkit, GridLayout layout, String title, String description) {\n Section section = toolkit.createSection(parent, Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION);\n GridDataFactory.fillDefaults().grab(true, false).span(1, 1).applyTo(section);\n GridLayoutFactory.fillDefaults().numColumns(3).applyTo(section);\n section.setText(title);\n section.setDescription(description);\n GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);\n section.setLayoutData(gd);\n Composite client = toolkit.createComposite(section, SWT.NONE);\n client.setLayout(layout);\n NlputilsFormComposite.createEmptyRow(toolkit, client);\n trainingClassPathTree = new Tree(client, SWT.NONE);\n GridData gd_tree = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 0);\n gd_tree.heightHint = 100;\n trainingClassPathTree.setLayoutData(gd_tree);\n TreeItem trainingItem = new TreeItem(trainingClassPathTree, SWT.NULL);\n trainingItem.setText(\"String_Node_Str\");\n trainingItem.setData(\"String_Node_Str\");\n trainingClassPathTree.addListener(SWT.Expand, new Listener() {\n public void handleEvent(Event event) {\n TreeItem root = (TreeItem) event.item;\n File file = new File(root.getData().toString());\n File[] files = file.listFiles();\n if (files == null) {\n return;\n } else {\n root.getItems()[0].dispose();\n }\n for (int i = 0; i < files.length; i++) {\n TreeItem item = new TreeItem(root, SWT.NULL);\n item.setText(files[i].getName());\n item.setData(files[i]);\n if (files[i].isDirectory()) {\n new TreeItem(item, SWT.NULL);\n }\n }\n }\n });\n testingClassPathTree = new Tree(client, SWT.NONE);\n testingClassPathTree.setLayoutData(gd_tree);\n TreeItem testingItem = new TreeItem(testingClassPathTree, SWT.NULL);\n testingItem.setText(\"String_Node_Str\");\n testingItem.setData(\"String_Node_Str\");\n testingClassPathTree.addListener(SWT.Expand, new Listener() {\n public void handleEvent(Event event) {\n TreeItem root = (TreeItem) event.item;\n File file = new File(root.getData().toString());\n File[] files = file.listFiles();\n if (files == null) {\n return;\n } else {\n root.getItems()[0].dispose();\n }\n for (int i = 0; i < files.length; i++) {\n TreeItem item = new TreeItem(root, SWT.NULL);\n item.setText(files[i].getName());\n item.setData(files[i]);\n if (files[i].isDirectory()) {\n new TreeItem(item, SWT.NULL);\n }\n }\n }\n });\n Composite buttonComposite = new Composite(client, SWT.NONE);\n GridLayout buttonLayout = new GridLayout();\n buttonLayout.marginWidth = buttonLayout.marginHeight = 0;\n buttonLayout.makeColumnsEqualWidth = true;\n buttonComposite.setLayout(buttonLayout);\n buttonComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));\n Button addClassButton = new Button(buttonComposite, SWT.PUSH);\n addClassButton.setText(\"String_Node_Str\");\n GridDataFactory.fillDefaults().grab(false, false).span(1, 1).applyTo(addClassButton);\n addClassButton.addSelectionListener(new SelectionAdapter() {\n\n public void widgetSelected(SelectionEvent e) {\n Shell shell = parent.getShell();\n ClassifierDialog cDialog = new ClassifierDialog(shell);\n cDialog.create();\n if (cDialog.open() == Window.OK) {\n File file = null;\n classPathCount++;\n TreeItem trainingSubItem = new TreeItem(trainingItem, SWT.NULL);\n trainingSubItem.setText(\"String_Node_Str\" + classPathCount + \"String_Node_Str\" + cDialog.getTrainDataPath());\n trainingSubItem.setData(cDialog.getTrainDataPath());\n file = new File(cDialog.getTrainDataPath());\n if (file.isDirectory()) {\n new TreeItem(trainingSubItem, SWT.NULL);\n }\n TreeItem testingSubItem = new TreeItem(testingItem, SWT.NONE);\n testingSubItem.setText(\"String_Node_Str\" + classPathCount + \"String_Node_Str\" + cDialog.getTestDataPath());\n testingSubItem.setData(cDialog.getTestDataPath());\n file = new File(cDialog.getTestDataPath());\n if (file.isDirectory()) {\n new TreeItem(testingSubItem, SWT.NULL);\n }\n trainingClassPathTree.getItems()[0].setExpanded(true);\n testingClassPathTree.getItems()[0].setExpanded(true);\n }\n }\n });\n Button remove = new Button(buttonComposite, SWT.PUSH);\n remove.setText(\"String_Node_Str\");\n GridDataFactory.fillDefaults().grab(false, false).span(1, 1).applyTo(remove);\n section.setClient(client);\n}\n"
"public void run() {\n if (!isRecoveryListUpToDate || !isKernelListUpToDate) {\n final int img_count = mDevice.getStockRecoveryVersions().size() + mDevice.getCwmRecoveryVersions().size() + mDevice.getTwrpRecoveryVersions().size() + mDevice.getPhilzRecoveryVersions().size() + mDevice.getStockKernelVersions().size();\n final URL recoveryURL;\n final URL kernelURL;\n try {\n recoveryURL = new URL(Const.RECOVERY_SUMS_URL);\n kernelURL = new URL(Const.KERNEL_SUMS_URL);\n } catch (MalformedURLException e) {\n return;\n }\n Downloader downloader = new Downloader(recoveryURL, Const.RecoveryCollectionFile);\n final DownloadDialog RecoveryUpdater = new DownloadDialog(mContext, downloader);\n downloader.setOverrideFile(true);\n RecoveryUpdater.setOnDownloadListener(new DownloadDialog.OnDownloadListener() {\n public void success(File file) {\n mDevice.loadRecoveryList();\n isRecoveryListUpToDate = true;\n final DownloadDialog KernelUpdater = new DownloadDialog(mContext, kernelURL, Const.KernelCollectionFile);\n KernelUpdater.setOverrideFile(true);\n KernelUpdater.setOnDownloadListener(new DownloadDialog.OnDownloadListener() {\n public void success(File file) {\n mDevice.loadKernelList();\n isKernelListUpToDate = true;\n final int new_img_count = (mDevice.getStockRecoveryVersions().size() + mDevice.getCwmRecoveryVersions().size() + mDevice.getTwrpRecoveryVersions().size() + mDevice.getPhilzRecoveryVersions().size() + mDevice.getStockKernelVersions().size()) - img_count;\n mActivity.runOnUiThread(new Runnable() {\n public void run() {\n if (isAdded()) {\n Toast.makeText(mActivity, String.format(getString(R.string.new_imgs_loaded), new_img_count), Toast.LENGTH_SHORT).show();\n }\n mSwipeUpdater.setRefreshing(false);\n }\n });\n }\n public void failed(final Exception e) {\n Toast.makeText(mActivity, e.getMessage(), Toast.LENGTH_SHORT).show();\n mSwipeUpdater.setRefreshing(false);\n }\n });\n KernelUpdater.execute();\n }\n public void failed(final Exception e) {\n Toast.makeText(mActivity, e.getMessage(), Toast.LENGTH_SHORT).show();\n mSwipeUpdater.setRefreshing(false);\n }\n });\n mActivity.runOnUiThread(new Runnable() {\n public void run() {\n if (ask) {\n AlertDialog.Builder updateDialog = new AlertDialog.Builder(mContext);\n updateDialog.setTitle(R.string.update_available).setMessage(R.string.lists_outdated).setPositiveButton(R.string.update, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(mActivity, R.string.refresh_list, Toast.LENGTH_SHORT).show();\n RecoveryUpdater.execute();\n }\n }).setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n }\n }).show();\n } else {\n Toast.makeText(mActivity, R.string.refresh_list, Toast.LENGTH_SHORT).show();\n RecoveryUpdater.execute();\n }\n }\n });\n } else {\n mActivity.runOnUiThread(new Runnable() {\n public void run() {\n if (!Common.getBooleanPref(mContext, Const.PREF_NAME, Const.PREF_KEY_HIDE_UPDATE_HINTS)) {\n Toast.makeText(mContext, R.string.uptodate, Toast.LENGTH_SHORT).show();\n }\n mSwipeUpdater.setRefreshing(false);\n }\n });\n }\n}\n"