content stringlengths 40 137k |
|---|
"public static RootStatement codeToJava(StructMethod mt, VarProcessor varproc) throws IOException {\n StructClass cl = mt.getClassStruct();\n boolean isInitializer = \"String_Node_Str\".equals(mt.getName());\n mt.expandData();\n InstructionSequence seq = mt.getInstructionSequence();\n ControlFlowGraph graph = new ControlFlowGraph(seq);\n DeadCodeHelper.removeDeadBlocks(graph);\n graph.inlineJsr(mt);\n DeadCodeHelper.connectDummyExitBlock(graph);\n DeadCodeHelper.removeGotos(graph);\n ExceptionDeobfuscator.removeCircularRanges(graph);\n ExceptionDeobfuscator.restorePopRanges(graph);\n if (DecompilerContext.getOption(IFernflowerPreferences.REMOVE_EMPTY_RANGES)) {\n ExceptionDeobfuscator.removeEmptyRanges(graph);\n }\n if (DecompilerContext.getOption(IFernflowerPreferences.NO_EXCEPTIONS_RETURN)) {\n DeadCodeHelper.incorporateValueReturns(graph);\n }\n ExceptionDeobfuscator.insertEmptyExceptionHandlerBlocks(graph);\n DeadCodeHelper.mergeBasicBlocks(graph);\n DecompilerContext.getCountercontainer().setCounter(CounterContainer.VAR_COUNTER, mt.getLocalVariables());\n if (ExceptionDeobfuscator.hasObfuscatedExceptions(graph)) {\n DecompilerContext.getLogger().writeMessage(\"String_Node_Str\", IFernflowerLogger.WARNING);\n }\n RootStatement root = DomHelper.parseGraph(graph);\n if (!DecompilerContext.getOption(IFernflowerPreferences.FINALLY_CATCHALL)) {\n FinallyProcessor fproc = new FinallyProcessor(varproc);\n while (fproc.iterateGraph(mt, root, graph)) {\n root = DomHelper.parseGraph(graph);\n }\n }\n DomHelper.removeSynchronizedHandler(root);\n SequenceHelper.condenseSequences(root);\n ClearStructHelper.clearStatements(root);\n ExprProcessor proc = new ExprProcessor();\n proc.processStatement(root, cl);\n for (; ; ) {\n StackVarsProcessor stackproc = new StackVarsProcessor();\n stackproc.simplifyStackVars(root, mt, cl);\n varproc.setVarVersions(root);\n if (!new PPandMMHelper().findPPandMM(root)) {\n break;\n }\n }\n for (; ; ) {\n LabelHelper.cleanUpEdges(root);\n for (; ; ) {\n MergeHelper.enhanceLoops(root);\n if (LoopExtractHelper.extractLoops(root)) {\n continue;\n }\n if (!IfHelper.mergeAllIfs(root)) {\n break;\n }\n }\n if (DecompilerContext.getOption(IFernflowerPreferences.IDEA_NOT_NULL_ANNOTATION)) {\n if (IdeaNotNullHelper.removeHardcodedChecks(root, mt)) {\n SequenceHelper.condenseSequences(root);\n StackVarsProcessor stackproc = new StackVarsProcessor();\n stackproc.simplifyStackVars(root, mt, cl);\n varproc.setVarVersions(root);\n }\n }\n LabelHelper.identifyLabels(root);\n if (InlineSingleBlockHelper.inlineSingleBlocks(root)) {\n continue;\n }\n if (isInitializer || !ExitHelper.condenseExits(root)) {\n break;\n }\n }\n ExitHelper.removeRedundantReturns(root);\n SecondaryFunctionsHelper.identifySecondaryFunctions(root);\n varproc.setVarDefinitions(root);\n LabelHelper.replaceContinueWithBreak(root);\n mt.releaseResources();\n return root;\n}\n"
|
"static String stackTraceAllStr(int numFrames) {\n Set<Map.Entry<Thread, StackTraceElement[]>> traces = Thread.getAllStackTraces().entrySet();\n StringBuilder buf = new StringBuilder();\n for (Thread th : traces.keySet()) {\n buf.append(th.toString());\n buf.append(LINE_SEPARATOR);\n buf.append(LINE_SEPARATOR);\n StackTraceElement[] st = traces.get(th);\n buf.append(stackTraceStr(\"String_Node_Str\", st, 0, numFrames));\n buf.append(LINE_SEPARATOR);\n }\n return buf.toString();\n}\n"
|
"public void putMapping(String index, String type, String mapping) throws IOException {\n logger.debug(\"String_Node_Str\", index, type);\n StringEntity entity = new StringEntity(mapping, StandardCharsets.UTF_8);\n Response restResponse = client.performRequest(\"String_Node_Str\", \"String_Node_Str\" + index + \"String_Node_Str\" + type, Collections.emptyMap(), entity);\n Map<String, Object> responseAsMap = JsonUtil.asMap(restResponse);\n logger.trace(\"String_Node_Str\", responseAsMap);\n}\n"
|
"public synchronized boolean addDownload(Collection<? extends RemoteFileDesc> c, boolean cache) {\n if (stopped || isCompleted())\n return false;\n List<RemoteFileDesc> l = new ArrayList<RemoteFileDesc>(c.size());\n for (RemoteFileDesc rfd : c) {\n if (allowAddition(rfd)) {\n if (hostIsAllowed(rfd)) {\n l.add(rfd);\n }\n }\n }\n if (l.size() > 0) {\n return addDownloadForced(l, cache);\n } else {\n return false;\n }\n}\n"
|
"public final void toSQL(RenderContext context) {\n if (context.declareFields() || context.declareTables()) {\n if (wrapInParentheses) {\n context.sql(\"String_Node_Str\");\n }\n context.sql(aliasProvider);\n if (wrapInParentheses) {\n context.sql(\"String_Node_Str\");\n }\n switch(context.getDialect()) {\n case POSTGRES:\n case HSQLDB:\n case DERBY:\n case MYSQL:\n context.sql(\"String_Node_Str\");\n break;\n }\n context.sql(\"String_Node_Str\");\n context.literal(alias);\n switch(context.getDialect()) {\n case HSQLDB:\n case POSTGRES:\n {\n if (context.declareTables() && aliasProvider instanceof ArrayTable) {\n Table<?> table = (Table<?>) aliasProvider;\n context.sql(\"String_Node_Str\");\n table.getFields().toSQLNames(context);\n context.sql(\"String_Node_Str\");\n }\n break;\n }\n }\n } else {\n context.literal(alias);\n }\n}\n"
|
"public final void parameters(final String[] par, final SnipeData v) {\n if (par.length == 0) {\n v.sendMessage(TextColors.RED, \"String_Node_Str\");\n return;\n }\n if (par[0].equalsIgnoreCase(\"String_Node_Str\")) {\n v.sendMessage(TextColors.GOLD, \"String_Node_Str\");\n v.sendMessage(TextColors.AQUA, \"String_Node_Str\" + \"String_Node_Str\");\n return;\n }\n if (!par[0].equals(this.filename)) {\n this.lastMod = 0;\n this.schematic = null;\n }\n this.filename = par[0];\n File schematic = SchematicHelper.getSchematicsDir().resolve(this.filename + \"String_Node_Str\").toFile();\n if (schematic.exists()) {\n v.sendMessage(TextColors.RED, \"String_Node_Str\" + this.filename + \"String_Node_Str\");\n } else {\n v.sendMessage(TextColors.AQUA, \"String_Node_Str\" + this.filename + \"String_Node_Str\");\n }\n this.file = schematic;\n if (par.length > 1) {\n if (par[1].equalsIgnoreCase(\"String_Node_Str\")) {\n this.pasteOption = PasteOption.FULL;\n } else if (par[1].equalsIgnoreCase(\"String_Node_Str\")) {\n this.pasteOption = PasteOption.FULL;\n } else if (par[1].equalsIgnoreCase(\"String_Node_Str\")) {\n this.pasteOption = PasteOption.FULL;\n } else {\n v.sendMessage(TextColors.RED, \"String_Node_Str\");\n return;\n }\n v.sendMessage(TextColors.YELLOW, \"String_Node_Str\" + this.pasteOption.name().toLowerCase());\n }\n}\n"
|
"protected void _parseArgs(String[] args) throws Exception {\n for (int i = 0; i < args.length; i++) {\n String arg = args[i];\n if (_parseArg(arg) == false) {\n if (arg.trim().startsWith(\"String_Node_Str\")) {\n if (i >= (args.length - 1)) {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\" + arg + \"String_Node_Str\" + \"String_Node_Str\");\n }\n _parameterNames.add(arg.substring(1));\n _parameterValues.add(args[i + 1]);\n i++;\n } else {\n throw new IllegalActionException(\"String_Node_Str\" + arg);\n }\n }\n }\n if (_expectingClass) {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n Iterator<String> names = _parameterNames.iterator();\n Iterator<String> values = _parameterValues.iterator();\n while (names.hasNext() && values.hasNext()) {\n String name = (String) names.next();\n String value = (String) values.next();\n boolean match = false;\n NamedObj model = _toplevel;\n System.out.println(\"String_Node_Str\" + model.getFullName());\n Attribute attribute = model.getAttribute(name);\n if (attribute instanceof Settable) {\n match = true;\n ((Settable) attribute).setExpression(value);\n if (attribute instanceof Variable) {\n ((Variable) attribute).getToken();\n }\n }\n if (model instanceof CompositeActor) {\n Director director = ((CompositeActor) model).getDirector();\n if (director != null) {\n attribute = director.getAttribute(name);\n if (attribute instanceof Settable) {\n match = true;\n ((Settable) attribute).setExpression(value);\n if (attribute instanceof Variable) {\n ((Variable) attribute).getToken();\n }\n }\n }\n }\n if (!match) {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\" + name);\n }\n }\n}\n"
|
"public void saveMonitor(PlayOrmMonitor monitor) {\n MonitorDbo m = CopyUtil.copy(monitor);\n NoSqlEntityManager mgr = factory.createEntityManager();\n mgr.put(m, false);\n mgr.flush();\n}\n"
|
"public void activeData() {\n if (SE_ID.equals(perspectiveId)) {\n IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getProject(org.talend.dataquality.PluginConstant.getRootProjectName()).getFolder(DQStructureManager.getMetaData()).getFolder(DQStructureManager.DB_CONNECTIONS);\n List<TdDataProvider> listTdDataProviders = DqRepositoryViewService.listTdDataProviders(folder, true);\n SQLExplorerPlugin default1 = SQLExplorerPlugin.getDefault();\n AliasManager aliasManager = default1.getAliasManager();\n aliasManager.getAliases().clear();\n Set<User> users = new HashSet<User>();\n try {\n aliasManager.closeAllConnections();\n } catch (ExplorerException e1) {\n log.error(e1, e1);\n }\n for (TdDataProvider tdDataProvider : listTdDataProviders) {\n try {\n TypedReturnCode<TdProviderConnection> tdPc = DataProviderHelper.getTdProviderConnection(tdDataProvider);\n TdProviderConnection providerConnection = tdPc.getObject();\n String url = providerConnection.getConnectionString();\n Alias alias = new Alias(tdDataProvider.getName());\n String user = DataProviderHelper.getClearTextUser(providerConnection);\n String password = DataProviderHelper.getClearTextPassword(providerConnection);\n if (\"String_Node_Str\".equals(user)) {\n user = \"String_Node_Str\";\n }\n User previousUser = new User(user, password);\n alias.setDefaultUser(previousUser);\n users.add(previousUser);\n alias.setAutoLogon(false);\n alias.setConnectAtStartup(true);\n alias.setUrl(url);\n ManagedDriver manDr = default1.getDriverModel().getDriver(EDriverName.getId(providerConnection.getDriverClassName()));\n alias.setDriver(manDr);\n aliasManager.addAlias(alias);\n } catch (ExplorerException e) {\n log.error(e, e);\n }\n }\n aliasManager.modelChanged();\n }\n}\n"
|
"public void mutableMethodsOutsideTransactions() {\n for (CollectionMutatorMethod method : CollectionMutatorMethod.values()) {\n Class<? extends Throwable> expected = IllegalStateException.class;\n if (collectionClass == ManagedCollection.REALMRESULTS || isSnapshot(collectionClass)) {\n switch(method) {\n case ADD_OBJECT:\n case ADD_ALL_OBJECTS:\n case CLEAR:\n case REMOVE_OBJECT:\n case REMOVE_ALL:\n case RETAIN_ALL:\n expected = UnsupportedOperationException.class;\n break;\n default:\n }\n }\n try {\n switch(method) {\n case DELETE_ALL:\n collection.deleteAllFromRealm();\n break;\n case ADD_OBJECT:\n collection.add(new AllJavaTypes());\n break;\n case ADD_ALL_OBJECTS:\n collection.addAll(Collections.singletonList(new AllJavaTypes()));\n break;\n case CLEAR:\n collection.clear();\n break;\n case REMOVE_OBJECT:\n collection.remove(new AllJavaTypes());\n break;\n case REMOVE_ALL:\n collection.removeAll(Collections.singletonList(new AllJavaTypes()));\n break;\n case RETAIN_ALL:\n collection.retainAll(Collections.singletonList(new AllJavaTypes()));\n break;\n }\n fail(\"String_Node_Str\" + method);\n } catch (IllegalStateException e) {\n assertEquals(expected, e.getClass());\n } catch (UnsupportedOperationException e) {\n assertEquals(expected, e.getClass());\n }\n }\n}\n"
|
"private void updateROMDataSetParams(DataSetParameterAdapter setParamAdapter, DataSetParameters cachedParameters) throws SemanticException {\n List newParams = setParamAdapter.newROMSetParams(cachedParameters);\n OdaDataSetHandle setHandle = setParamAdapter.getSetHandle();\n PropertyHandle propHandle = setHandle.getPropertyHandle(OdaDataSetHandle.PARAMETERS_PROP);\n propHandle.clearValue();\n IdentifierUtility.updateParams2UniqueName(newParams);\n setParamAdapter.updateRomDataSetParamsWithNewValues(setHandle, newParams);\n}\n"
|
"public static String getNormalizeParameterValue(INode node, IElementParameter ep) {\n String value = \"String_Node_Str\";\n List<EParameterFieldType> needQuoteList = Arrays.asList(EParameterFieldType.CLOSED_LIST, EParameterFieldType.OPENED_LIST, EParameterFieldType.COMPONENT_LIST, EParameterFieldType.COLUMN_LIST, EParameterFieldType.PREV_COLUMN_LIST);\n value = ElementParameterParser.getValue(node, \"String_Node_Str\" + ep.getName() + \"String_Node_Str\");\n if (needQuoteList.contains(ep.getFieldType())) {\n value = \"String_Node_Str\" + value + \"String_Node_Str\";\n }\n List<EParameterFieldType> needRemoveCRLFList = Arrays.asList(EParameterFieldType.MEMO, EParameterFieldType.MEMO_JAVA, EParameterFieldType.MEMO_SQL);\n if (needRemoveCRLFList.contains(ep.getFieldType())) {\n value = value.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n }\n return value;\n}\n"
|
"public void testBadCallSynch() throws Exception {\n final IRemoteService service = registerAndGetRemoteService();\n try {\n service.callSynch(createRemoteCall(\"String_Node_Str\", new Object[] { \"String_Node_Str\", \"String_Node_Str\" }));\n fail();\n } catch (ECFException e) {\n }\n try {\n service.callSynch(createRemoteCall(\"String_Node_Str\", new Object[] { \"String_Node_Str\" }));\n fail();\n } catch (ECFException e) {\n }\n}\n"
|
"protected void _execute() throws Exception {\n super._execute();\n link.setHead(newLinkHead);\n if (relationNameToAdd != null) {\n ComponentRelation relation = (ComponentRelation) container.getRelation(relationNameToAdd);\n link.setRelation(relation);\n } else {\n link.setRelation(null);\n }\n}\n"
|
"public void registerDimensionPerspective(DimensionPerspective dimensionPerspective) {\n if (dimensionPerspective.getPerspectiveID() == null)\n throw new IllegalStateException(\"String_Node_Str\" + dimensionPerspective);\n hashDimensionPerspectives.put(dimensionPerspective.getID(), dimensionPerspective);\n if (dimensionPerspective.isDefault()) {\n if (defaultDimensionPerspective != null)\n throw new IllegalStateException(\"String_Node_Str\");\n defaultDimensionPerspective = dimensionPerspective;\n }\n DataDomainUpdateEvent event = new DataDomainUpdateEvent(dataDomain);\n event.setSender(this);\n GeneralManager.get().getEventPublisher().triggerEvent(event);\n}\n"
|
"private void processExceptionHandled(OperationReport report) {\n for (String datId : datIdsCoveredByException) {\n Matcher matcher = Pattern.compile(\"String_Node_Str\").matcher(datId);\n matcher.find();\n String itemDatId = matcher.group();\n DispoItemData item = datIdToItem.get(itemDatId);\n String line = datId.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n line = line.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n String text = \"String_Node_Str\";\n Discrepancy matchingDiscrepancy = matchDiscrepancy(line, item.getDiscrepanciesList());\n if (matchingDiscrepancy != null) {\n text = matchingDiscrepancy.getText();\n Map<String, Discrepancy> discrepancies = item.getDiscrepanciesList();\n discrepancies.remove(matchingDiscrepancy.getId());\n addAnnotationForForCoveredLine(item, line, Exception_Handling_Resolution, text, \"String_Node_Str\");\n }\n }\n}\n"
|
"public void testSelectPhoneNumberAreaCodeWithEmployee() {\n org.eclipse.persistence.jpa.JpaEntityManager em = (org.eclipse.persistence.jpa.JpaEntityManager) createEntityManager();\n ExpressionBuilder employees = new ExpressionBuilder();\n Expression exp = employees.get(\"String_Node_Str\").equal(\"String_Node_Str\");\n exp = exp.and(employees.get(\"String_Node_Str\").equal(\"String_Node_Str\"));\n Employee emp = (Employee) em.getActiveSession().readAllObjects(Employee.class, exp).firstElement();\n PhoneNumber phone = (PhoneNumber) ((java.util.LinkedList) emp.getPhoneNumbers()).getFirst();\n String areaCode = phone.getAreaCode();\n String firstName = emp.getFirstName();\n ExpressionBuilder employeeBuilder = new ExpressionBuilder();\n Expression phones = employeeBuilder.anyOf(\"String_Node_Str\");\n Expression whereClause = phones.get(\"String_Node_Str\").equal(areaCode).and(phones.get(\"String_Node_Str\").get(\"String_Node_Str\").equal(firstName));\n ReportQuery rq = new ReportQuery();\n rq.setSelectionCriteria(whereClause);\n rq.addAttribute(\"String_Node_Str\", phones.get(\"String_Node_Str\"));\n rq.setReferenceClass(Employee.class);\n rq.dontMaintainCache();\n Vector expectedResult = getAttributeFromAll(\"String_Node_Str\", (Vector) em.getActiveSession().executeQuery(rq), Employee.class);\n clearCache();\n String ejbqlString;\n ejbqlString = \"String_Node_Str\" + \"String_Node_Str\" + areaCode + \"String_Node_Str\" + firstName + \"String_Node_Str\";\n List result = em.createQuery(ejbqlString).getResultList();\n Assert.assertTrue(\"String_Node_Str\", comparer.compareObjects(result, expectedResult));\n}\n"
|
"public static void main(String[] args) {\n final InputStream initialInput = new Base64InputStream(System.in);\n final PrintStream initialError = System.err;\n try {\n Class.forName(ConsoleHandler.class.getName(), true, ConsoleHandler.class.getClassLoader());\n } catch (Throwable ignored) {\n }\n StdioContext.install();\n final StdioContext context = StdioContext.create(new NullInputStream(), new LoggingOutputStream(org.jboss.logmanager.Logger.getLogger(\"String_Node_Str\"), Level.INFO), new LoggingOutputStream(org.jboss.logmanager.Logger.getLogger(\"String_Node_Str\"), Level.ERROR));\n StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));\n final byte[] authKey = new byte[16];\n try {\n StreamUtils.readFully(initialInput, authKey);\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(ExitCodes.FAILED);\n throw new IllegalStateException();\n }\n final MarshallerFactory factory = Marshalling.getMarshallerFactory(\"String_Node_Str\", DomainServerMain.class.getClassLoader());\n final Unmarshaller unmarshaller;\n final ByteInput byteInput;\n final AsyncFuture<ServiceContainer> containerFuture;\n try {\n Module.registerURLStreamHandlerFactoryModule(Module.getBootModuleLoader().loadModule(ModuleIdentifier.create(\"String_Node_Str\")));\n final MarshallingConfiguration configuration = new MarshallingConfiguration();\n configuration.setVersion(2);\n configuration.setClassResolver(new SimpleClassResolver(DomainServerMain.class.getClassLoader()));\n unmarshaller = factory.createUnmarshaller(configuration);\n byteInput = Marshalling.createByteInput(initialInput);\n unmarshaller.start(byteInput);\n final ServerTask task = unmarshaller.readObject(ServerTask.class);\n unmarshaller.finish();\n containerFuture = task.run(Arrays.<ServiceActivator>asList(new ServiceActivator() {\n public void activate(final ServiceActivatorContext serviceActivatorContext) {\n }\n }));\n } catch (Exception e) {\n e.printStackTrace(initialError);\n System.exit(ExitCodes.FAILED);\n throw new IllegalStateException();\n } finally {\n }\n for (; ; ) {\n try {\n final String hostName = StreamUtils.readUTFZBytes(initialInput);\n final int port = StreamUtils.readInt(initialInput);\n final boolean managementSubsystemEndpoint = StreamUtils.readBoolean(initialInput);\n final byte[] asAuthKey = new byte[16];\n StreamUtils.readFully(initialInput, asAuthKey);\n final ServiceContainer container = containerFuture.get();\n final HostControllerClient client = getRequiredService(container, HostControllerConnectionService.SERVICE_NAME, HostControllerClient.class);\n client.reconnect(hostName, port, asAuthKey, managementSubsystemEndpoint);\n } catch (InterruptedIOException e) {\n Thread.interrupted();\n } catch (EOFException e) {\n break;\n } catch (Exception e) {\n e.printStackTrace();\n break;\n }\n }\n final ServiceContainer container;\n try {\n container = containerFuture.get();\n ServiceController<?> controller = container.getService(GracefulShutdownService.SERVICE_NAME);\n if (controller != null) {\n ((GracefulShutdownService) controller.getValue()).awaitSuspend();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n System.exit(ExitCodes.NORMAL);\n throw new IllegalStateException();\n}\n"
|
"protected void doPreService(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String format = ParameterAccessor.getFormat(request);\n String openType = ParameterAccessor.getOpenType(request);\n if (IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase(request.getServletPath())) {\n response.setContentType(\"String_Node_Str\");\n response.setHeader(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {\n response.setContentType(\"String_Node_Str\");\n } else {\n String mimeType = ReportEngineService.getInstance().getMIMEType(format);\n if (mimeType != null && mimeType.length() > 0)\n response.setContentType(mimeType);\n else\n response.setContentType(\"String_Node_Str\");\n }\n if (!ParameterAccessor.isGetImageOperator(request)) {\n String filename = ParameterAccessor.generateFileName(request);\n response.setHeader(\"String_Node_Str\", openType + \"String_Node_Str\" + filename + \"String_Node_Str\");\n }\n }\n}\n"
|
"private MetricsFile<TestMetric, Integer> writeThenReadBack(MetricsFile<TestMetric, Integer> in) throws Exception {\n File f = File.createTempFile(\"String_Node_Str\", \"String_Node_Str\");\n f.deleteOnExit();\n FileWriter out = new FileWriter(f);\n in.write(out);\n MetricsFile<METRIC, Integer> retval = new MetricsFile<METRIC, Integer>();\n retval.read(new FileReader(f));\n return retval;\n}\n"
|
"public void onSneakClick(ItemStack stack, World world, EntityPlayer shooter) {\n if (isEmpty(stack)) {\n if (searchInventoryForAmmo(shooter, false) != null) {\n searchInventoryForAmmo(shooter, true);\n if (!world.isRemote) {\n System.out.println(searchInventoryForAmmo(shooter, false));\n reload(stack);\n }\n }\n}\n"
|
"public void onSetupConfig(AppSetup setup) throws Config.BadConfigurationException {\n if (setup.getConfig().getOption(OPT_DFA_CACHE_DIR) != null) {\n this.cacheDir = new File(setup.getConfig().getOption(OPT_DFA_CACHE_DIR));\n }\n}\n"
|
"public static Set<WrappedStack> getRecipeInputs(IRecipe recipe) {\n List<WrappedStack> recipeInputs = new ArrayList<>();\n if (recipe instanceof ShapedRecipes) {\n recipeInputs.addAll(Arrays.asList(((ShapedRecipes) recipe).recipeItems).stream().filter(itemStack -> itemStack != null && !itemStack.isEmpty()).map(itemStack -> WrappedStack.build(itemStack, 1)).collect(Collectors.toList()));\n } else if (recipe instanceof ShapelessRecipes) {\n recipeInputs.addAll(((ShapelessRecipes) recipe).recipeItems.stream().filter(itemStack -> itemStack != null).map(itemStack -> WrappedStack.build(itemStack, 1)).collect(Collectors.toList()));\n } else if (recipe instanceof ShapedOreRecipe) {\n ShapedOreRecipe shapedOreRecipe = (ShapedOreRecipe) recipe;\n if (validateOreDictionaryRecipe(Arrays.asList(shapedOreRecipe.getInput()))) {\n for (int i = 0; i < shapedOreRecipe.getInput().length; i++) {\n Object recipeInput = shapedOreRecipe.getInput()[i];\n if (recipeInput instanceof Collection) {\n WrappedStack oreStack = WrappedStack.build(recipeInput, 1);\n if (oreStack != null) {\n recipeInputs.add(oreStack);\n }\n } else if (recipeInput instanceof ItemStack) {\n recipeInputs.add(WrappedStack.build(recipeInput, 1));\n }\n }\n }\n } else if (recipe instanceof ShapelessOreRecipe) {\n ShapelessOreRecipe shapelessOreRecipe = ((ShapelessOreRecipe) recipe);\n if (validateOreDictionaryRecipe(shapelessOreRecipe.getInput())) {\n recipeInputs.addAll(shapelessOreRecipe.getInput().stream().filter(recipeInput -> recipeInput instanceof ItemStack || recipeInput instanceof Collection).map(recipeInput -> WrappedStack.build(recipeInput, 1)).collect(Collectors.toList()));\n }\n }\n return collateStacks(recipeInputs);\n}\n"
|
"public List<String> getList(final Request request, final String key) {\n final List<String> result = new ArrayList<String>();\n final String compound = get(request, key);\n if (StringUtils.hasText(compound)) {\n String[] items = compound.split(\"String_Node_Str\");\n if (items != null) {\n result.addAll(Arrays.asList(items));\n } else {\n LOG.error(\"String_Node_Str\" + compound);\n }\n }\n return result;\n}\n"
|
"protected void get(HttpServletRequest req) {\n this.cache = dataCached.get();\n this.lastModified = System.currentTimeMillis();\n}\n"
|
"public ExpressionDef internalVisitExpressionDefinition(cqlParser.ExpressionDefinitionContext ctx) {\n String identifier = parseString(ctx.identifier());\n ExpressionDef def = libraryBuilder.resolveExpressionRef(identifier);\n if (def == null) {\n libraryBuilder.pushExpressionDefinition(identifier);\n libraryBuilder.pushExpressionContext(currentContext);\n try {\n libraryBuilder.pushExpressionDefinition(identifier);\n try {\n def = of.createExpressionDef().withAccessLevel(parseAccessModifier(ctx.accessModifier())).withName(identifier).withContext(currentContext).withExpression((Expression) visit(ctx.expression()));\n def.setResultType(def.getExpression().getResultType());\n libraryBuilder.addExpression(def);\n } finally {\n libraryBuilder.popExpressionDefinition();\n }\n } finally {\n libraryBuilder.popExpressionDefinition();\n libraryBuilder.popExpressionContext();\n }\n }\n return def;\n}\n"
|
"private void summariseResults(HashMap<Integer, FilterCandidates> filterCandidates, long runTime, PreprocessedPeakResult[] preprocessedPeakResults) {\n createTable();\n StoredDataStatistics distanceStats = new StoredDataStatistics();\n StoredDataStatistics depthStats = new StoredDataStatistics();\n createFilterCriteria();\n StoredDataStatistics[][] stats = new StoredDataStatistics[3][filterCriteria.length];\n for (int i = 0; i < stats.length; i++) for (int j = 0; j < stats[i].length; j++) stats[i][j] = new StoredDataStatistics();\n final double nmPerPixel = simulationParameters.a;\n double tp = 0, fp = 0;\n int failcTP = 0, failcFP = 0;\n int cTP = 0, cFP = 0;\n int[] singleStatus = null, multiStatus = null, doubletStatus = null, multiDoubletStatus = null;\n singleStatus = new int[FitStatus.values().length];\n multiStatus = new int[singleStatus.length];\n doubletStatus = new int[singleStatus.length];\n multiDoubletStatus = new int[singleStatus.length];\n for (FilterCandidates result : filterCandidates.values()) {\n tp += result.tp;\n fp += result.fp;\n for (int i = 0; i < result.fitResult.length; i++) {\n if (result.spots[i].match)\n cTP++;\n else\n cFP++;\n final MultiPathFitResult fitResult = result.fitResult[i];\n if (singleStatus != null && result.spots[i].match) {\n addStatus(singleStatus, fitResult.getSingleFitResult());\n addStatus(multiStatus, fitResult.getMultiFitResult());\n addStatus(doubletStatus, fitResult.getDoubletFitResult());\n addStatus(multiDoubletStatus, fitResult.getMultiDoubletFitResult());\n }\n if (noMatch(fitResult)) {\n if (result.spots[i].match)\n failcTP++;\n else\n failcFP++;\n }\n addToStats(fitResult.getSingleFitResult(), stats);\n addToStats(fitResult.getMultiFitResult(), stats);\n addToStats(fitResult.getDoubletFitResult(), stats);\n addToStats(fitResult.getMultiDoubletFitResult(), stats);\n }\n for (int i = 0; i < result.match.length; i++) {\n if (!result.match[i].isFitResult())\n continue;\n FitMatch fitMatch = (FitMatch) result.match[i];\n distanceStats.add(fitMatch.d * nmPerPixel);\n depthStats.add(fitMatch.z * nmPerPixel);\n }\n }\n double[] i1 = new double[depthStats.getN()];\n double[] i2 = new double[i1.length];\n double[] is = new double[i1.length];\n int ci = 0;\n for (FilterCandidates result : filterCandidates.values()) {\n for (int i = 0; i < result.match.length; i++) {\n if (!result.match[i].isFitResult())\n continue;\n FitMatch fitMatch = (FitMatch) result.match[i];\n ScoredSpot spot = result.spots[fitMatch.i];\n i1[ci] = fitMatch.predictedSignal;\n i2[ci] = fitMatch.actualSignal;\n is[ci] = spot.spot.intensity;\n ci++;\n }\n }\n ArrayList<MultiPathFitResults> multiPathResults = new ArrayList<MultiPathFitResults>(filterCandidates.size());\n for (Entry<Integer, FilterCandidates> entry : filterCandidates.entrySet()) {\n int frame = entry.getKey();\n MultiPathFitResult[] multiPathFitResults = entry.getValue().fitResult;\n int totalCandidates = multiPathFitResults.length;\n int nActual = actualCoordinates.get(frame).size();\n multiPathResults.add(new MultiPathFitResults(frame, multiPathFitResults, totalCandidates, nActual));\n }\n List<FractionalAssignment[]> assignments = new ArrayList<FractionalAssignment[]>();\n final Set<Integer> set = new TreeSet<Integer>();\n FractionScoreStore scoreStore = new FractionScoreStore() {\n public void add(int uniqueId) {\n set.add(uniqueId);\n }\n };\n MultiPathFitResults[] multiResults = multiPathResults.toArray(new MultiPathFitResults[multiPathResults.size()]);\n MultiPathFilter mpf = new MultiPathFilter(new SignalFilter(0), null, multiFilter.residualsThreshold);\n FractionClassificationResult fractionResult = mpf.fractionScoreSubset(multiResults, Integer.MAX_VALUE, this.results.size(), assignments, scoreStore);\n double nPredicted = fractionResult.getTP() + fractionResult.getFP();\n double[][] matchScores = new double[set.size()][];\n int count = 0;\n for (int i = 0; i < assignments.size(); i++) {\n FractionalAssignment[] a = assignments.get(i);\n if (a == null)\n continue;\n for (int j = 0; j < a.length; j++) {\n final PreprocessedPeakResult r = ((PeakFractionalAssignment) a[j]).peakResult;\n set.remove(r.getUniqueId());\n final double precision = Math.sqrt(r.getLocationVariance());\n final double signal = r.getSignal();\n final double snr = r.getSNR();\n final double width = r.getXSDFactor();\n final double xShift = r.getXRelativeShift2();\n final double yShift = r.getYRelativeShift2();\n final double shift = (xShift > yShift) ? Math.sqrt(xShift) : Math.sqrt(yShift);\n final double eshift = Math.sqrt(xShift + yShift);\n final double[] score = new double[8];\n score[FILTER_SIGNAL] = signal;\n score[FILTER_SNR] = snr;\n score[FILTER_MIN_WIDTH] = width;\n score[FILTER_MAX_WIDTH] = width;\n score[FILTER_SHIFT] = shift;\n score[FILTER_ESHIFT] = eshift;\n score[FILTER_PRECISION] = precision;\n score[FILTER_PRECISION + 1] = a[j].getScore();\n matchScores[count++] = score;\n }\n }\n for (int uniqueId : set.toArray(new Integer[0])) {\n PreprocessedPeakResult r = preprocessedPeakResults[uniqueId];\n if (r == null)\n throw new RuntimeException(\"String_Node_Str\" + uniqueId);\n final double precision = Math.sqrt(r.getLocationVariance());\n final double signal = r.getSignal();\n final double snr = r.getSNR();\n final double width = r.getXSDFactor();\n final double xShift = r.getXRelativeShift2();\n final double yShift = r.getYRelativeShift2();\n final double shift = (xShift > yShift) ? Math.sqrt(xShift) : Math.sqrt(yShift);\n final double eshift = Math.sqrt(xShift + yShift);\n final double[] score = new double[8];\n score[FILTER_SIGNAL] = signal;\n score[FILTER_SNR] = snr;\n score[FILTER_MIN_WIDTH] = width;\n score[FILTER_MAX_WIDTH] = width;\n score[FILTER_SHIFT] = shift;\n score[FILTER_ESHIFT] = eshift;\n score[FILTER_PRECISION] = precision;\n matchScores[count++] = score;\n }\n if (singleStatus != null) {\n String name = PeakFit.getSolverName(fitConfig);\n if (fitConfig.getFitSolver() == FitSolver.MLE && fitConfig.isModelCamera())\n name += \"String_Node_Str\";\n System.out.println(\"String_Node_Str\" + name);\n printFailures(\"String_Node_Str\", singleStatus);\n printFailures(\"String_Node_Str\", multiStatus);\n printFailures(\"String_Node_Str\", doubletStatus);\n printFailures(\"String_Node_Str\", multiDoubletStatus);\n }\n StringBuilder sb = new StringBuilder();\n final double signal = simulationParameters.signalPerFrame;\n final int n = results.size();\n sb.append(imp.getStackSize()).append(\"String_Node_Str\");\n final int w = imp.getWidth();\n final int h = imp.getHeight();\n sb.append(w).append(\"String_Node_Str\");\n sb.append(h).append(\"String_Node_Str\");\n sb.append(n).append(\"String_Node_Str\");\n double density = ((double) n / imp.getStackSize()) / (w * h) / (simulationParameters.a * simulationParameters.a / 1e6);\n sb.append(Utils.rounded(density)).append(\"String_Node_Str\");\n sb.append(Utils.rounded(signal)).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.s)).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.a)).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.depth)).append(\"String_Node_Str\");\n sb.append(simulationParameters.fixedDepth).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.gain)).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.readNoise)).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.b)).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.b2)).append(\"String_Node_Str\");\n double noise = simulationParameters.b2;\n if (simulationParameters.emCCD) {\n final double readVariance = noise - simulationParameters.b;\n noise = simulationParameters.b * 2 + readVariance;\n }\n if (simulationParameters.fullSimulation) {\n }\n sb.append(Utils.rounded(signal / Math.sqrt(noise))).append(\"String_Node_Str\");\n sb.append(Utils.rounded(simulationParameters.s / simulationParameters.a)).append(\"String_Node_Str\");\n sb.append(spotFilter.getDescription());\n addCount(sb, nP + nN);\n addCount(sb, nP);\n addCount(sb, nN);\n addCount(sb, fP);\n addCount(sb, fN);\n String name = PeakFit.getSolverName(fitConfig);\n if (fitConfig.getFitSolver() == FitSolver.MLE && fitConfig.isModelCamera())\n name += \"String_Node_Str\";\n add(sb, name);\n add(sb, config.getFitting());\n resultPrefix = sb.toString();\n add(sb, (100.0 * cTP) / nP);\n add(sb, (100.0 * cFP) / nN);\n add(sb, cTP + cFP);\n add(sb, cTP);\n add(sb, cFP);\n FractionClassificationResult m = new FractionClassificationResult(cTP, cFP, 0, simulationParameters.molecules - cTP);\n add(sb, m.getRecall());\n add(sb, m.getPrecision());\n add(sb, m.getF1Score());\n add(sb, m.getJaccard());\n add(sb, failcTP);\n add(sb, failcFP);\n add(sb, tp);\n add(sb, fp);\n m = new FractionClassificationResult(tp, fp, 0, simulationParameters.molecules - tp);\n add(sb, m.getRecall());\n add(sb, m.getPrecision());\n add(sb, m.getF1Score());\n add(sb, m.getJaccard());\n m = new FractionClassificationResult(tp, 0, 0, simulationParameters.molecules - tp);\n add(sb, m.getF1Score());\n add(sb, m.getJaccard());\n double median = distanceStats.getMedian();\n add(sb, median);\n WindowOrganiser wo = new WindowOrganiser();\n String label = String.format(\"String_Node_Str\", Utils.rounded(m.getRecall()), distanceStats.getN(), Utils.rounded(median), Utils.rounded(distanceStats.getStandardDeviation()));\n int id = Utils.showHistogram(TITLE, distanceStats, \"String_Node_Str\", 0, 0, 0, label);\n if (Utils.isNewWindow())\n wo.add(id);\n median = depthStats.getMedian();\n add(sb, median);\n int[] indices = Utils.newArray(i1.length, 0, 1);\n if (showCorrelation)\n Sort.sort(indices, is, rankByIntensity);\n double[] r = (showCorrelation) ? new double[i1.length] : null;\n double[] sr = (showCorrelation) ? new double[i1.length] : null;\n double[] rank = (showCorrelation) ? new double[i1.length] : null;\n ci = 0;\n FastCorrelator fastCorrelator = new FastCorrelator();\n ArrayList<Ranking> pc1 = new ArrayList<Ranking>();\n ArrayList<Ranking> pc2 = new ArrayList<Ranking>();\n for (int ci2 : indices) {\n fastCorrelator.add((long) Math.round(i1[ci2]), (long) Math.round(i2[ci2]));\n pc1.add(new Ranking(i1[ci2], ci));\n pc2.add(new Ranking(i2[ci2], ci));\n if (showCorrelation) {\n r[ci] = fastCorrelator.getCorrelation();\n sr[ci] = Correlator.correlation(rank(pc1), rank(pc2));\n if (rankByIntensity)\n rank[ci] = is[0] - is[ci];\n else\n rank[ci] = ci;\n }\n ci++;\n }\n final double pearsonCorr = fastCorrelator.getCorrelation();\n final double rankedCorr = Correlator.correlation(rank(pc1), rank(pc2));\n SimpleRegression regression = new SimpleRegression(false);\n for (int i = 0; i < pc1.size(); i++) regression.addData(pc1.get(i).value, pc2.get(i).value);\n final double slope = regression.getSlope();\n if (showCorrelation) {\n String title = TITLE + \"String_Node_Str\";\n Plot plot = new Plot(title, \"String_Node_Str\", \"String_Node_Str\");\n double[] limits1 = Maths.limits(i1);\n double[] limits2 = Maths.limits(i2);\n plot.setLimits(limits1[0], limits1[1], limits2[0], limits2[1]);\n label = String.format(\"String_Node_Str\", Utils.rounded(pearsonCorr), Utils.rounded(rankedCorr), Utils.rounded(slope));\n plot.addLabel(0, 0, label);\n plot.setColor(Color.red);\n plot.addPoints(i1, i2, Plot.DOT);\n if (slope > 1)\n plot.drawLine(limits1[0], limits1[0] * slope, limits1[1], limits1[1] * slope);\n else\n plot.drawLine(limits2[0] / slope, limits2[0], limits2[1] / slope, limits2[1]);\n PlotWindow pw = Utils.display(title, plot);\n if (Utils.isNewWindow())\n wo.add(pw);\n title = TITLE + \"String_Node_Str\";\n plot = new Plot(title, \"String_Node_Str\", \"String_Node_Str\");\n double[] xlimits = Maths.limits(rank);\n double[] ylimits = Maths.limits(r);\n ylimits = Maths.limits(ylimits, sr);\n plot.setLimits(xlimits[0], xlimits[1], ylimits[0], ylimits[1]);\n plot.setColor(Color.red);\n plot.addPoints(rank, r, Plot.LINE);\n plot.setColor(Color.blue);\n plot.addPoints(rank, sr, Plot.LINE);\n plot.setColor(Color.black);\n plot.addLabel(0, 0, label);\n pw = Utils.display(title, plot);\n if (Utils.isNewWindow())\n wo.add(pw);\n }\n add(sb, pearsonCorr);\n add(sb, rankedCorr);\n add(sb, slope);\n label = String.format(\"String_Node_Str\", depthStats.getN(), Utils.rounded(median));\n id = Utils.showHistogram(TITLE, depthStats, \"String_Node_Str\", 0, 1, 0, label);\n if (Utils.isNewWindow())\n wo.add(id);\n double[] lower = new double[filterCriteria.length];\n double[] upper = new double[lower.length];\n double[] min = new double[lower.length];\n double[] max = new double[lower.length];\n for (int i = 0; i < stats[0].length; i++) {\n double[] limits = showDoubleHistogram(stats, i, wo, matchScores, nPredicted);\n lower[i] = limits[0];\n upper[i] = limits[1];\n min[i] = limits[2];\n max[i] = limits[3];\n }\n upper[FILTER_SIGNAL] *= 2;\n upper[FILTER_SNR] *= 2;\n double factor = 0.25;\n if (lower[FILTER_MIN_WIDTH] != 0)\n upper[FILTER_MIN_WIDTH] = 1 - Math.max(0, factor * (1 - lower[FILTER_MIN_WIDTH]));\n if (upper[FILTER_MIN_WIDTH] != 0)\n lower[FILTER_MAX_WIDTH] = 1 + Math.max(0, factor * (upper[FILTER_MAX_WIDTH] - 1));\n final double[] interval = new double[stats[0].length];\n interval[FILTER_SIGNAL] = SignalFilter.DEFAULT_INCREMENT;\n interval[FILTER_SNR] = SNRFilter.DEFAULT_INCREMENT;\n interval[FILTER_MIN_WIDTH] = WidthFilter2.DEFAULT_MIN_INCREMENT;\n interval[FILTER_MAX_WIDTH] = WidthFilter.DEFAULT_INCREMENT;\n interval[FILTER_SHIFT] = ShiftFilter.DEFAULT_INCREMENT;\n interval[FILTER_ESHIFT] = EShiftFilter.DEFAULT_INCREMENT;\n interval[FILTER_PRECISION] = PrecisionFilter.DEFAULT_INCREMENT;\n interval[FILTER_ITERATIONS] = 0.1;\n interval[FILTER_EVALUATIONS] = 0.1;\n double[] increment = new double[lower.length];\n for (int i = 0; i < increment.length; i++) {\n lower[i] = Maths.floor(lower[i], interval[i]);\n upper[i] = Maths.ceil(upper[i], interval[i]);\n double range = upper[i] - lower[i];\n double multiples = range / interval[i];\n if (multiples < 9) {\n multiples = Math.ceil(multiples);\n } else\n multiples = 9;\n increment[i] = Maths.ceil(range / multiples, interval[i]);\n if (i == FILTER_MIN_WIDTH)\n lower[i] = upper[i] - increment[i] * multiples;\n else\n upper[i] = lower[i] + increment[i] * multiples;\n }\n for (int i = 0; i < stats[0].length; i++) {\n lower[i] = Maths.round(lower[i]);\n upper[i] = Maths.round(upper[i]);\n min[i] = Maths.round(min[i]);\n max[i] = Maths.round(max[i]);\n increment[i] = Maths.round(increment[i]);\n sb.append(\"String_Node_Str\").append(min[i]).append(':').append(lower[i]).append('-').append(upper[i]).append(':').append(max[i]);\n }\n increment[FILTER_SIGNAL] = Double.POSITIVE_INFINITY;\n increment[FILTER_ESHIFT] = Double.POSITIVE_INFINITY;\n wo.tile();\n sb.append(\"String_Node_Str\").append(Utils.timeToString(runTime / 1000000.0));\n summaryTable.append(sb.toString());\n if (saveFilterRange) {\n GlobalSettings gs = SettingsManager.loadSettings();\n FilterSettings filterSettings = gs.getFilterSettings();\n String filename = Utils.getFilename(\"String_Node_Str\", filterSettings.filterSetFilename);\n if (filename == null)\n return;\n filename = Utils.removeExtension(filename);\n filterSettings.filterSetFilename = filename;\n ArrayList<Filter> filters = new ArrayList<Filter>(3);\n filters.add(new MultiFilter2(lower[0], (float) lower[1], lower[2], lower[3], lower[4], lower[5], lower[6]));\n filters.add(new MultiFilter2(upper[0], (float) upper[1], upper[2], upper[3], upper[4], upper[5], upper[6]));\n filters.add(new MultiFilter2(increment[0], (float) increment[1], increment[2], increment[3], increment[4], increment[5], increment[6]));\n if (saveFilters(filename + \"String_Node_Str\", filters))\n SettingsManager.saveSettings(gs);\n min[FILTER_SIGNAL] = Math.max(min[FILTER_SIGNAL], 30);\n max[FILTER_PRECISION] = Math.min(max[FILTER_PRECISION], 100);\n final boolean[] limitToLower = new boolean[min.length];\n limitToLower[FILTER_SIGNAL] = true;\n limitToLower[FILTER_SNR] = true;\n limitToLower[FILTER_MIN_WIDTH] = true;\n limitToLower[FILTER_MAX_WIDTH] = false;\n limitToLower[FILTER_SHIFT] = false;\n limitToLower[FILTER_ESHIFT] = false;\n limitToLower[FILTER_PRECISION] = true;\n for (int i = 0; i < limitToLower.length; i++) {\n final double range = (upper[i] - lower[i]) / 2;\n if (limitToLower[i])\n upper[i] = lower[i] + range;\n else\n lower[i] = upper[i] - range;\n }\n filters = new ArrayList<Filter>(4);\n filters.add(new MultiFilter2(min[0], (float) min[1], min[2], min[3], min[4], min[5], min[6]));\n filters.add(new MultiFilter2(lower[0], (float) lower[1], lower[2], lower[3], lower[4], lower[5], lower[6]));\n filters.add(new MultiFilter2(upper[0], (float) upper[1], upper[2], upper[3], upper[4], upper[5], upper[6]));\n filters.add(new MultiFilter2(max[0], (float) max[1], max[2], max[3], max[4], max[5], max[6]));\n saveFilters(filename + \"String_Node_Str\", filters);\n }\n}\n"
|
"public ScriptNode createContainer(String componentId, String folderType, Object permissions) {\n ScriptNode container = null;\n try {\n QName folderQName = (folderType == null) ? null : QName.createQName(folderType, serviceRegistry.getNamespaceService());\n final NodeRef containerNodeRef = this.siteService.createContainer(getShortName(), componentId, folderQName, null);\n if (permissions != null && permissions instanceof ScriptableObject) {\n ScriptableObject scriptable = (ScriptableObject) permissions;\n Object[] propIds = scriptable.getIds();\n for (int i = 0; i < propIds.length; i++) {\n Object propId = propIds[i];\n if (propId instanceof String) {\n final String key = (String) propId;\n final Object value = scriptable.get(key, scriptable);\n if (value instanceof String) {\n AuthenticationUtil.runAs(new RunAsWork<Object>() {\n public Object doWork() throws Exception {\n Site.this.serviceRegistry.getPermissionService().setPermission(containerNodeRef, key, (String) value, true);\n return null;\n }\n }\n }\n }\n }\n }\n container = new ScriptNode(containerNodeRef, this.serviceRegistry, this.scope);\n } catch (AlfrescoRuntimeException e) {\n }\n return container;\n}\n"
|
"public static void act(Long id, Point2D pos) {\n if (pos == null) {\n return;\n }\n Unit target = getUnit(id);\n Group group = new Group(selection);\n for (Unit u : group) {\n u.group.remove(u);\n u.group = group;\n }\n if (target != null && target.faction != selection.get(0).faction) {\n orderAttack(target);\n } else {\n orderMove(pos);\n }\n moveAttack = false;\n}\n"
|
"public void execute(ReportItemDesign item, IContentEmitter emitter) {\n BirtTimer timer = new BirtTimer();\n timer.start();\n TableItemDesign tableDesign = (TableItemDesign) item;\n tableInfo = new TABLEINFO(tableDesign);\n logger.log(Level.FINEST, \"String_Node_Str\");\n ITableContent tableContent = report.createTableContent();\n assert (tableContent instanceof TableContent);\n IContent parent = context.getContent();\n context.pushContent(tableContent);\n logger.log(Level.FINEST, \"String_Node_Str\");\n openResultSet(item);\n logger.log(Level.FINEST, \"String_Node_Str\");\n initializeContent(parent, item, tableContent);\n processStyle(item, tableContent);\n processVisibility(item, tableContent);\n processBookmark(item, tableContent);\n processAction(item, tableContent);\n for (int i = 0; i < tableDesign.getColumnCount(); i++) {\n ColumnDesign columnDesign = tableDesign.getColumn(i);\n Column column = new Column();\n column.setStyleClass(columnDesign.getStyleName());\n column.setWidth(columnDesign.getWidth());\n tableContent.addColumn(column);\n }\n if (context.isInFactory()) {\n try {\n context.newScope(tableContent);\n TableScriptExecutor.handleOnCreate((TableContent) tableContent, context);\n } finally {\n context.exitScope();\n }\n }\n if (emitter != null) {\n emitter.startTable(tableContent);\n }\n accessQuery(tableDesign, emitter);\n if (emitter != null) {\n emitter.endTable(tableContent);\n }\n context.popContent();\n closeResultSet();\n logger.log(Level.FINEST, \"String_Node_Str\");\n timer.stop();\n timer.logTimeTaken(logger, Level.FINEST, context.getTaskIDString(), \"String_Node_Str\");\n}\n"
|
"public void characters(CharSequence characters) throws SAXException {\n if (null != characters) {\n String string = characters.toString();\n characters(string.toCharArray(), 0, string.length());\n }\n}\n"
|
"private void generateEEEvent(String name) {\n if ((null != name) && !\"String_Node_Str\".equals(name)) {\n eventQueue.add(new EndElementEvent(createQName(name), new StaxLocation(lexer)));\n }\n}\n"
|
"protected NodeRef getCustomModelRef(String uri) {\n if ((uri.equals(\"String_Node_Str\")) || (uri.equals(RecordsManagementModel.RM_CUSTOM_URI))) {\n return RM_CUSTOM_MODEL_NODE_REF;\n } else {\n List<NodeRef> modelRefs = getDictionaryRepositoryBootstrap().getModelRefs();\n for (NodeRef modelRef : modelRefs) {\n try {\n M2Model model = readCustomContentModel(modelRef);\n for (M2Namespace namespace : model.getNamespaces()) {\n if (namespace.getUri().equals(uri)) {\n return modelRef;\n }\n }\n } catch (DictionaryException de) {\n logger.warn(\"String_Node_Str\" + modelRef + \"String_Node_Str\" + uri + \"String_Node_Str\", de);\n }\n }\n throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CUSTOM_MODEL_NOT_FOUND, uri));\n }\n}\n"
|
"public void streamLineage(HttpRequest request, HttpResponder responder, String namespaceId, String stream, long start, long end, int levels) throws Exception {\n checkArguments(start, end, levels);\n Id.Stream streamId = Id.Stream.from(namespaceId, stream);\n Lineage lineage = lineageGenerator.computeLineage(streamId, start, end, levels);\n responder.sendJson(HttpResponseStatus.OK, new LineageRecord(start, end, lineage.getRelations()), LineageRecord.class, GSON);\n}\n"
|
"private void initializeGrid() {\n createIndicatorLabelColumn();\n createRowSelectColumn();\n for (int index = 0; index < _modelElementIndicators.length; index++) {\n ModelElementIndicator _modelElementIndicator = _modelElementIndicators[index];\n final GridColumn newCol = new GridColumn(this, SWT.CHECK);\n AbstractColumnHerderRenderer headerRenderer = getColumnHeaderRenderer();\n headerRenderer.setRotation(COLUMN_HEADER_ROTATION);\n newCol.setHeaderRenderer(headerRenderer);\n newCol.setCellRenderer(getCellRenderer());\n newCol.setText(ModelElementIndicatorHelper.getModelElementDisplayName(_modelElementIndicator));\n newCol.setWidth(COLUMN_WIDTH);\n newCol.setData(_modelElementIndicator);\n newCol.setMoveable(true);\n newCol.setResizeable(true);\n newCol.setHeaderFont(font);\n IRepositoryNode repNode = _modelElementIndicator.getModelElementRepositoryNode();\n if (repNode instanceof DBColumnRepNode && ((DBColumnRepNode) repNode).isKey()) {\n newCol.setImage(pkImage);\n }\n newCol.addListener(SWT.Resize, new Listener() {\n public void handleEvent(Event event) {\n notifyObservers(event);\n }\n });\n newCol.addListener(SWT.Move, new Listener() {\n public void handleEvent(Event event) {\n notifyObservers(event);\n }\n });\n }\n recalculateHeader();\n createTableContent();\n setHeaderVisible(true);\n setTopLeftRenderer(new TdTopLeftRenderer());\n setEmptyColumnHeaderRenderer(new TdEmptyColumnHeaderRenderer());\n setEmptyRowHeaderRenderer(new TdEmptyCellRenderer());\n setEmptyCellRenderer(new TdEmptyCellRenderer());\n TdRowHeaderRenderer rowHeaderRenderer = new TdRowHeaderRenderer();\n setRowHeaderRenderer(rowHeaderRenderer);\n rowHeaderRenderer.setTree(true);\n rowHeaderRenderer.setWordWrap(false);\n setRowHeaderVisible(true);\n setLinesVisible(true);\n setColumnScrolling(true);\n setSelectionEnabled(false);\n setCellSelectionEnabled(false);\n setRowsResizeable(false);\n setItemHeight(21);\n setLineColor(IndicatorSelectGrid.lightBlue);\n setFocusRenderer(null);\n for (GridItem gridItem : getItems()) {\n gridItem.setBackground(0, gray);\n }\n}\n"
|
"protected void setupPageBreak(PolicyNode node) {\n ReportItemDesign item = node.design;\n IStyle style = item.getStyle();\n if (style != null) {\n CSSValue masterPage = style.getProperty(IStyle.STYLE_MASTER_PAGE);\n CSSValue pageBreakBefore = style.getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE);\n CSSValue pageBreakAfter = style.getProperty(IStyle.STYLE_PAGE_BREAK_AFTER);\n if (masterPage != null || (pageBreakBefore != null) && !pageBreakBefore.equals(IStyle.AUTO_VALUE)) {\n node.breakBefore = true;\n node.execute = true;\n }\n if (pageBreakAfter != null && !pageBreakAfter.equals(IStyle.AUTO_VALUE)) {\n node.breakAfter = true;\n node.execute = true;\n }\n }\n if (item.getJavaClass() != null || item.getOnCreate() != null || item.getOnPageBreak() != null) {\n node.breakBefore = true;\n node.breakAfter = true;\n node.execute = true;\n }\n if (node.breakBefore || node.breakAfter) {\n Iterator iter = rows.iterator();\n while (iter.hasNext()) {\n PolicyNode row = (PolicyNode) iter.next();\n row.executeAll = true;\n }\n return;\n }\n if (item.getHighlight() != null || item.getMap() != null) {\n node.execute = true;\n }\n if (item.getTOC() != null || item.getBookmark() != null || item.getAction() != null) {\n node.execute = true;\n }\n if (item.getQueries() != null) {\n node.execute = true;\n }\n if (item.getVisibility() != null) {\n node.execute = true;\n }\n}\n"
|
"public void sendRosterRemove(ID userID) throws ECFException {\n try {\n if (!(userID instanceof XMPPID))\n throw new ECFException(\"String_Node_Str\");\n final XMPPID xmppID = (XMPPID) userID;\n getConnectionOrThrowIfNull().sendRosterRemove(xmppID.getUsernameAtHost());\n } catch (Exception e) {\n traceAndThrowECFException(\"String_Node_Str\", e);\n }\n}\n"
|
"public void start() throws ExecuteException, IOException {\n TaskController controller = new TaskController();\n DataGeneratorController dataController = new DataGeneratorController();\n String suiteID = generateSuiteID();\n Integer expID = 0;\n String[] datasetsIDV = config.getStringArray(COMMON.CONFIG_DATASETS);\n String[] connectionsIDV = config.getStringArray(COMMON.CONFIG_CONNECTIONS);\n String[] tasksIDV = config.getStringArray(COMMON.CONFIG_TASKS);\n for (String datasetIDV : datasetsIDV) {\n String datasetID = config.getString(datasetIDV + CONSTANTS.NAME_SUFFIX);\n String dataGenClass = config.getString(datasetIDV + CONSTANTS.DATA_GENERATOR_CLASS_NAME);\n String[] dataGenConstructorArgs = config.getStringArray(datasetIDV + CONSTANTS.CONSTRUCTOR_ARGS);\n expID++;\n Properties dataProperties = new Properties();\n if (dataGenClass != null) {\n dataProperties.put(COMMON.DATAGEN_CLASS_NAME, dataGenClass);\n if (dataGenConstructorArgs != null)\n dataProperties.put(COMMON.DATAGEN_CONSTRUCTOR_ARGS, dataGenConstructorArgs);\n dataController.start(dataProperties);\n }\n Integer taskID = 0;\n for (String conIDV : connectionsIDV) {\n String conID = config.getString(conIDV + CONSTANTS.NAME_SUFFIX);\n String service = config.getString(conIDV + CONSTANTS.SERVICE_SUFFIX);\n String updateService = config.getString(conIDV + CONSTANTS.UPDATE_SERVICE_SUFFIX);\n String user = null;\n String pwd = null;\n if (config.containsKey(conIDV + CONSTANTS.SERVICE_USER) && config.containsKey(conIDV + CONSTANTS.SERVICE_PASSWORD)) {\n user = config.getString(conIDV + CONSTANTS.SERVICE_USER);\n pwd = config.getString(conIDV + CONSTANTS.SERVICE_PASSWORD);\n }\n for (String taskIDV : tasksIDV) {\n taskID++;\n Properties taskProperties = new Properties();\n String[] ids = new String[] { suiteID, suiteID + \"String_Node_Str\" + expID, suiteID + \"String_Node_Str\" + expID + \"String_Node_Str\" + taskID.toString(), datasetID, conID };\n List<Object> constructor = new LinkedList<Object>();\n List<Object> classes = new LinkedList<Object>();\n constructor.add(ids);\n classes.add(String[].class);\n constructor.add(new String[] { service, updateService, user, pwd });\n classes.add(String[].class);\n Configuration taskConfig = createTaskConfig(config, taskIDV);\n taskProperties.put(\"String_Node_Str\", taskConfig);\n taskProperties.put(COMMON.CLASS_NAME, config.getString(taskIDV + CONSTANTS.CLASS_SUFFIX));\n taskProperties.put(COMMON.CONSTRUCTOR_ARGS, constructor.toArray());\n taskProperties.put(COMMON.CONSTRUCTOR_ARGS_CLASSES, classes.toArray(new Class[] {}));\n String[] args = new String[] { datasetID, conID, taskID + \"String_Node_Str\" };\n if (config.containsKey(CONSTANTS.PRE_SCRIPT_HOOK))\n ScriptExecutor.exec(config.getString(CONSTANTS.PRE_SCRIPT_HOOK), args);\n controller.startTask(taskProperties);\n if (config.containsKey(COMMON.POST_SCRIPT_HOOK))\n ScriptExecutor.exec(config.getString(COMMON.POST_SCRIPT_HOOK), args);\n }\n }\n }\n}\n"
|
"public BlockLocation[] getBlockLocations(String src, long start, long length) throws IOException, UnresolvedLinkException {\n LocatedBlocks blocks = getLocatedBlocks(src, start, length);\n return DFSUtil.locatedBlocks2Locations(blocks);\n}\n"
|
"public void run() {\n Iterator groupsIter = getServerStoredContactListRoot().subgroups();\n while (groupsIter.hasNext()) {\n ContactGroupSipImpl group = (ContactGroupSipImpl) groupsIter.next();\n Iterator contactsIter = group.contacts();\n while (contactsIter.hasNext()) {\n ContactSipImpl contact = (ContactSipImpl) contactsIter.next();\n forcePollContact(contact);\n }\n }\n}\n"
|
"protected void doRun() {\n if (repositoryNode == null) {\n repositoryNode = getCurrentRepositoryNode();\n }\n if (isToolbar()) {\n if (repositoryNode != null && repositoryNode.getContentType() != getNodeType()) {\n repositoryNode = null;\n }\n if (repositoryNode == null) {\n repositoryNode = getRepositoryNodeForDefault(getNodeType());\n }\n }\n IWizard wizard = getWizard(PlatformUI.getWorkbench(), creation, repositoryNode, getExistingNames());\n if (isToolbar()) {\n init(repositoryNode);\n }\n WizardDialog wizardDialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);\n if (Platform.getOS().equals(Platform.OS_LINUX)) {\n wizardDialog.setPageSize(getWizardWidth(), getWizardHeight() + 80);\n }\n wizardDialog.create();\n wizardDialog.open();\n}\n"
|
"private JsExpression mapUnaryVariant(Node unOp) throws JsParserException {\n switch(unOp.getIntDatum()) {\n case TokenStream.SUB:\n return mapPrefixOperation(JsUnaryOperator.NEG, unOp);\n case TokenStream.NOT:\n return mapPrefixOperation(JsUnaryOperator.NOT, unOp);\n case TokenStream.BITNOT:\n return mapPrefixOperation(JsUnaryOperator.BIT_NOT, unOp);\n case TokenStream.TYPEOF:\n return mapPrefixOperation(JsUnaryOperator.TYPEOF, unOp);\n case TokenStream.ADD:\n if (unOp.getFirstChild().getType() != TokenStream.NUMBER) {\n return mapPrefixOperation(JsUnaryOperator.POS, unOp);\n } else {\n return mapExpression(unOp.getFirstChild());\n }\n case TokenStream.VOID:\n return mapPrefixOperation(JsUnaryOperator.VOID, unOp);\n default:\n throw new JsParserException(\"String_Node_Str\" + unOp.getIntDatum());\n }\n}\n"
|
"private void validateGeneratedValueAnnotation(final Class<?> clazz, Field field) {\n Table table = clazz.getAnnotation(Table.class);\n String schemaName = table.schema();\n if (schemaName != null && schemaName.indexOf(\"String_Node_Str\") > 0) {\n schemaName = schemaName.substring(0, schemaName.indexOf('@'));\n GeneratedValue generatedValue = field.getAnnotation(GeneratedValue.class);\n if (generatedValue != null && generatedValue.generator() != null && !generatedValue.generator().isEmpty()) {\n if (!(field.isAnnotationPresent(TableGenerator.class) || field.isAnnotationPresent(SequenceGenerator.class) || clazz.isAnnotationPresent(TableGenerator.class) || clazz.isAnnotationPresent(SequenceGenerator.class))) {\n throw new IllegalArgumentException(\"String_Node_Str\" + generatedValue.generator());\n } else {\n checkForGenerator(clazz, field, generatedValue, schemaName);\n }\n }\n }\n}\n"
|
"private Consumer<SpecificRecordBase> getTaxonomyRecordConverter() {\n return record -> {\n TaxonRecord taxon = (TaxonRecord) record;\n List<RankedName> classifications = taxon.getClassification();\n if (classifications != null && !classifications.isEmpty()) {\n Map<Rank, String> map = classifications.stream().collect(Collectors.toMap(RankedName::getRank, RankedName::getName));\n addJsonField(\"String_Node_Str\", map.get(Rank.KINGDOM));\n addJsonField(\"String_Node_Str\", map.get(Rank.PHYLUM));\n addJsonField(\"String_Node_Str\", map.get(Rank.CLASS));\n addJsonField(\"String_Node_Str\", map.get(Rank.ORDER));\n addJsonField(\"String_Node_Str\", map.get(Rank.FAMILY));\n addJsonField(\"String_Node_Str\", map.get(Rank.GENUS));\n addJsonField(\"String_Node_Str\", map.get(Rank.SUBGENUS));\n }\n RankedName usage = taxon.getUsage();\n if (Objects.nonNull(usage)) {\n addJsonField(\"String_Node_Str\", usage.getKey());\n addJsonField(\"String_Node_Str\", usage.getName());\n }\n addCommonFields(record);\n };\n}\n"
|
"void endOfTreatment(BuildResult buildResult, int exitCode, boolean success) {\n buildResult.setEndDate(new Date());\n buildResult.setSuccess(success);\n buildResult.setExitCode(exitCode);\n try {\n String message = \"String_Node_Str\";\n if (success) {\n message = String.format(\"String_Node_Str\");\n } else {\n message = String.format(\"String_Node_Str\", exitCode);\n }\n new DefaultExecutor().execute(CommandLine.parse(message));\n } catch (ExecuteException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
|
"protected String getFileExtension(String fileName, String mimeType) {\n if (fileName != null) {\n String[] dotSplit = fileName.split(\"String_Node_Str\");\n if (dotSplit.length > 1) {\n return dotSplit[dotSplit.length - 1];\n }\n }\n return MimeTypeMapping.lookupExtension(mimeType);\n}\n"
|
"private static Map<String, List<XmlBindings>> processBindingFile(Map<String, List<XmlBindings>> originalBindings, Object bindingHandle, ClassLoader classLoader) {\n Map<String, List<XmlBindings>> bindingMap = originalBindings;\n XmlBindings binding = getXmlBindings(bindingHandle, classLoader, properties);\n if (binding != null) {\n String key = binding.getPackageName();\n if (key.equals(XMLProcessor.DEFAULT)) {\n throw org.eclipse.persistence.exceptions.JAXBException.packageNotSetForBindingException();\n }\n JavaTypes jTypes = binding.getJavaTypes();\n if (jTypes != null) {\n for (JavaType javaType : jTypes.getJavaType()) {\n String javaTypeName = javaType.getName();\n if (!(javaTypeName.contains(key))) {\n javaType.setName(key + PKG_SEPARATOR + javaTypeName);\n }\n }\n }\n List<XmlBindings> existingBindings = bindingMap.get(key);\n if (existingBindings != null) {\n existingBindings.add(binding);\n } else {\n existingBindings = new ArrayList<XmlBindings>();\n existingBindings.add(binding);\n bindingMap.put(key, existingBindings);\n }\n }\n return bindingMap;\n}\n"
|
"public int addNode(HitEnum hitEnum, Map<String, Object> params) {\n int id = getHitEnumId(hitEnum);\n graph.append(\"String_Node_Str\").append(id).append(\"String_Node_Str\").append(hitEnum.getClass().getSimpleName()).append(\"String_Node_Str\").append(\"String_Node_Str\").append(hitEnum.position()).append(\"String_Node_Str\").append('[').append(hitEnum.startOffset()).append(\"String_Node_Str\").append(hitEnum.endOffset()).append(']').append(\"String_Node_Str\").append(\"String_Node_Str\").append(hitEnum.corpusWeight()).append(\"String_Node_Str\").append(hitEnum.queryWeight()).append(\"String_Node_Str\");\n appendKeyValue(\"String_Node_Str\", hitEnum.source());\n if (!params.isEmpty()) {\n for (Map.Entry<String, Object> en : params.entrySet()) {\n appendKeyValue(en.getKey(), en.getValue());\n }\n }\n graph.append(\"String_Node_Str\");\n return id;\n}\n"
|
"static List<TaggedAlgorithm<List<DoubleSolution>>> configureAlgorithmList(List<Problem<DoubleSolution>> problemList) {\n List<TaggedAlgorithm<List<DoubleSolution>>> algorithms = new ArrayList<>();\n for (int run = 0; run < 4; run++) {\n for (int i = 0; i < problemList.size(); i++) {\n Algorithm<List<DoubleSolution>> algorithm = new NSGAIIBuilder<>(problemList.get(i), new SBXCrossover(1.0, 20.0), new PolynomialMutation(1.0 / problemList.get(i).getNumberOfVariables(), 20.0)).setMaxEvaluations(25000).setPopulationSize(100).build();\n algorithms.add(new TaggedAlgorithm<List<DoubleSolution>>(algorithm, \"String_Node_Str\", problemList.get(i), run));\n }\n for (int i = 0; i < problemList.size(); i++) {\n Algorithm<List<DoubleSolution>> algorithm = new NSGAIIBuilder<>(problemList.get(i), new SBXCrossover(1.0, 10.0), new PolynomialMutation(1.0 / problemList.get(i).getNumberOfVariables(), 20.0)).setMaxEvaluations(25000).setPopulationSize(100).build();\n algorithms.add(new TaggedAlgorithm<List<DoubleSolution>>(algorithm, \"String_Node_Str\", problemList.get(i), run));\n }\n for (int i = 0; i < problemList.size(); i++) {\n Algorithm<List<DoubleSolution>> algorithm = new NSGAIIBuilder<>(problemList.get(i), new SBXCrossover(1.0, 50.0), new PolynomialMutation(1.0 / problemList.get(i).getNumberOfVariables(), 20.0)).setMaxEvaluations(25000).setPopulationSize(100).build();\n algorithms.add(new TaggedAlgorithm<List<DoubleSolution>>(algorithm, \"String_Node_Str\", problemList.get(i), run));\n }\n }\n return algorithms;\n}\n"
|
"public static void main(String[] args) throws WikapidiaException, DaoException, ConfigurationException {\n Language lang = Language.getByLangCode(\"String_Node_Str\");\n Env env = new EnvBuilder().build();\n Configurator configurator = env.getConfigurator();\n LocalPageDao pdao = configurator.get(LocalPageDao.class, \"String_Node_Str\");\n PageViewIterator it = new PageViewIterator(lang, 2013, 12, 8, 1, 2013, 12, 8, 5);\n int i = 0;\n while (i < 2) {\n double start = System.currentTimeMillis();\n PageViewDataStruct data = it.next();\n double elapsed = (System.currentTimeMillis() - start) / 1000;\n System.out.println(\"String_Node_Str\" + elapsed + \"String_Node_Str\" + i);\n TIntIntMap stats = data.getPageViewStats();\n for (int pageId : stats.keys()) {\n try {\n Title page = pdao.getById(lang, pageId).getTitle();\n System.out.println(\"String_Node_Str\" + page + \"String_Node_Str\" + stats.get(pageId));\n } catch (NullPointerException e) {\n System.out.println(\"String_Node_Str\" + e.getMessage());\n e.printStackTrace();\n continue;\n }\n }\n i++;\n }\n}\n"
|
"public void updateEntity() {\n ForgeDirection[] directions = new ForgeDirection[5];\n int i = 0;\n for (ForgeDirection direction : ForgeDirection.values()) {\n if (direction != myDir() && direction != ForgeDirection.UP) {\n directions[i] = direction;\n i++;\n }\n }\n UtilSteamTransport.generalDistributionEvent(worldObj, xCoord, yCoord, zCoord, directions);\n UtilSteamTransport.generalPressureEvent(worldObj, xCoord, yCoord, zCoord, this.getPressure(), this.getCapacity());\n int[] target = getTarget(1);\n int x = target[0], y = yCoord, z = target[1];\n if (this.spinup == 1) {\n this.worldObj.playSoundEffect(this.xCoord + 0.5F, this.yCoord + 0.5F, this.zCoord + 0.5F, \"String_Node_Str\", Block.soundTypeAnvil.getVolume(), 0.9F);\n }\n if (extendedTicks > 15) {\n this.worldObj.playSoundEffect(this.xCoord + 0.5F, this.yCoord + 0.5F, this.zCoord + 0.5F, \"String_Node_Str\", 2.0F, 0.9F);\n }\n if (extendedTicks == 5) {\n this.worldObj.playSoundEffect(this.xCoord + 0.5F, this.yCoord + 0.5F, this.zCoord + 0.5F, \"String_Node_Str\", 0.5F, (float) (0.75F + (Math.random() * 0.1F)));\n }\n if (extendedTicks > 0 && extendedTicks < 6) {\n if (smooshingBlock != null && smooshingBlock.stepSound != null) {\n this.worldObj.playSoundEffect(this.xCoord + 0.5F, this.yCoord + 0.5F, this.zCoord + 0.5F, smooshingBlock.stepSound.getBreakSound(), 0.5F, (float) (0.75F + (Math.random() * 0.1F)));\n }\n }\n decodeAndCreateParticles(1);\n if (this.hasBlockUpdate && this.hasPartner() && this.steam > 100) {\n if (this.shouldStop) {\n this.spinup = 0;\n this.extendedLength = 0;\n this.extendedTicks = 0;\n this.isActive = false;\n this.shouldStop = false;\n this.isBreaking = false;\n return;\n } else {\n }\n if (this.hasSomethingToSmash() && !this.isActive) {\n this.steam -= 100;\n this.isActive = true;\n this.isBreaking = true;\n }\n this.hasBlockUpdate = false;\n }\n if (this.isActive) {\n if (this.isBreaking) {\n if (this.spinup < 41) {\n if (this.spinup == 40) {\n if (!worldObj.isAirBlock(x, y, z) && worldObj.getTileEntity(x, y, z) == null && worldObj.getBlock(x, y, z).getBlockHardness(worldObj, x, y, z) < 50F) {\n this.spinup++;\n if (this.getBlockMetadata() % 2 == 0)\n try {\n this.smooshingBlock = worldObj.getBlock(x, y, z);\n this.smooshingMeta = worldObj.getBlockMetadata(x, y, z);\n this.smooshedStack = smooshingBlock.getDrops(worldObj, x, y, z, smooshingMeta, 0);\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + this.getBlockMetadata());\n e.printStackTrace();\n }\n worldObj.setBlock(x, y, z, SteamcraftBlocks.dummy);\n } else {\n if (this.hasPartner()) {\n int[] pc = getTarget(2);\n TileEntitySmasher partner = (TileEntitySmasher) worldObj.getTileEntity(pc[0], yCoord, pc[1]);\n if (partner.spinup < 41) {\n this.shouldStop = true;\n }\n if (partner.spinup >= 41) {\n if (partner.shouldStop) {\n this.shouldStop = true;\n }\n }\n if (shouldStop) {\n this.spinup++;\n return;\n }\n }\n }\n }\n this.spinup++;\n } else if (this.extendedLength < 0.5F && !this.shouldStop) {\n this.extendedLength += 0.1F;\n if (this.extendedTicks == 3) {\n if (this.getBlockMetadata() % 2 == 0 && !worldObj.isRemote)\n spawnItems(x, y, z);\n }\n this.extendedTicks++;\n } else {\n this.isBreaking = false;\n this.spinup = 0;\n }\n } else {\n if (this.extendedLength > 0.0F) {\n this.extendedLength -= 0.025F;\n this.extendedTicks++;\n if (this.extendedLength < 0F)\n this.extendedLength = 0F;\n } else {\n this.isActive = false;\n this.extendedTicks = 0;\n if (worldObj.getBlock(x, y, z) == SteamcraftBlocks.dummy) {\n worldObj.setBlockToAir(x, y, z);\n }\n }\n }\n } else if (worldObj.getBlock(x, y, z) == SteamcraftBlocks.dummy && getBlockMetadata() % 2 == 0) {\n worldObj.setBlockToAir(x, y, z);\n }\n this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);\n}\n"
|
"public void deleteComment(TurboComment comment) {\n try {\n stopContentUpdate();\n ServiceManager.getInstance().deleteComment(comment.getId());\n removeCachedItem(comment.getId());\n commentsUpdater.startCommentsListUpdate();\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
|
"public void render(DriverRequest httpRequest, String content, Writer out) throws IOException, HttpErrorPage {\n LOG.debug(\"String_Node_Str\" + name + \"String_Node_Str\" + page);\n this.out = pOut;\n if (content == null) {\n if (params != null) {\n for (String value : params.values()) {\n out.write(value);\n }\n }\n } else {\n parser.parse(content, this);\n }\n}\n"
|
"public PIX24 readPIX24() throws IOException {\n PIX24 ret = new PIX24();\n ret.reserved = readUI8();\n ret.red = readUI8();\n ret.green = readUI8();\n ret.blue = readUI8();\n return ret;\n}\n"
|
"public void watch(GameEvent event, Game game) {\n if (event.getType() == GameEvent.EventType.MANA_PAYED) {\n if (event.getSourceId().equals(this.getSourceId()) && event.getFlag()) {\n Spell spell = game.getStack().getSpell(event.getTargetId());\n if (spell != null) {\n Card card = spell.getCard();\n if (card != null) {\n for (UUID playerId : game.getPlayerList()) {\n Player player = game.getPlayer(playerId);\n if (player != null) {\n if (player.getCommanderId() != null && player.getCommanderId().equals(card.getId())) {\n commanderId.add(card.getId());\n break;\n }\n }\n }\n }\n }\n }\n }\n}\n"
|
"protected void populateItem(final ListItem<ConnConfProperty> item) {\n final ConnConfProperty property = item.getModelObject();\n final Label label = new Label(\"String_Node_Str\", property.getSchema().getDisplayName() == null || property.getSchema().getDisplayName().isEmpty() ? property.getSchema().getName() : property.getSchema().getDisplayName());\n item.add(label);\n final FieldPanel field;\n if (GUARDED_STRING.equals(property.getSchema().getType())) {\n field = new AjaxPasswordFieldPanel(\"String_Node_Str\", label.getDefaultModelObjectAsString(), new PropertyModel<String>(property, \"String_Node_Str\"), true).setRequired(property.getSchema().isRequired()).setTitle(property.getSchema().getHelpMessage());\n } else {\n field = new AjaxTextFieldPanel(\"String_Node_Str\", label.getDefaultModelObjectAsString(), new PropertyModel<String>(property, \"String_Node_Str\"), true).setRequired(property.getSchema().isRequired()).setTitle(property.getSchema().getHelpMessage());\n if (property.getSchema().isRequired()) {\n field.addRequiredLabel();\n }\n }\n item.add(field);\n final AjaxDropDownChoicePanel<Boolean> overridable = new AjaxDropDownChoicePanel<Boolean>(\"String_Node_Str\", \"String_Node_Str\", new PropertyModel(property, \"String_Node_Str\"), false);\n overridable.setChoiceRenderer(new OverridableRenderer());\n overridable.setChoices(Arrays.asList(new Boolean[] { ConnParameterType.NOT_OVERRIDABLE.getOverridable(), ConnParameterType.OVERRIDABLE.getOverridable() }));\n overridable.setStyleShet(\"String_Node_Str\");\n overridable.addRequiredLabel();\n item.add(overridable);\n connectorTO.getConfiguration().add(property);\n}\n"
|
"private void generateMRCAChildOfs() {\n System.out.print(\"String_Node_Str\");\n long z = new Date().getTime();\n System.out.print(\"String_Node_Str\" + nestedChildren.size() + \"String_Node_Str\");\n Transaction tx = gdb.beginTx();\n for (int parentId = 0; parentId < bipart.size(); parentId++) {\n for (Integer childId : nestedChildren.get(parentId)) {\n Node parent = nodeForBipart.get(bipart.get(parentId));\n Node child = nodeForBipart.get(bipart.get(childId));\n updateMRCAChildOf(child, parent);\n }\n }\n tx.success();\n tx.finish();\n if (USING_TAXONOMY) {\n System.out.print(\"String_Node_Str\");\n tx = gdb.beginTx();\n for (Node taxnd : taxonomyGraphNodesMap.keySet()) {\n TLongBipartition taxbp = taxonomyGraphNodesMap.get(taxnd);\n for (TLongBipartition ndbp : nodeForBipart.keySet()) {\n if (taxbp.ingroup().containsAll(ndbp.ingroup())) {\n if (taxbp.ingroup().containsAny(ndbp.outgroup()))\n updateMRCAChildOf(nodeForBipart.get(ndbp), taxnd);\n } else if (ndbp.ingroup().containsAny(taxbp.ingroup()) && taxbp.ingroup().containsAny(ndbp.outgroup()) == false && taxbp.ingroup().containsAll(ndbp.ingroup()) == false) {\n updateMRCAChildOf(taxnd, nodeForBipart.get(ndbp));\n }\n }\n }\n tx.success();\n tx.finish();\n }\n System.out.println(\"String_Node_Str\" + (new Date().getTime() - z) / (float) 1000 + \"String_Node_Str\");\n}\n"
|
"private CellArea createEmptyCell(CellArea upperCell, int columnId, RowArea row) {\n ICellContent cellContent = null;\n int rowSpan = 1;\n if (upperCell != null) {\n cellContent = (ICellContent) upperCell.getContent();\n rowSpan = upperCell.getRowSpan() - 1;\n }\n if (cellContent == null) {\n cellContent = tableContent.getReportContent().createCellContent();\n cellContent.setColumn(columnId);\n cellContent.setColSpan(1);\n cellContent.setRowSpan(1);\n cellContent.setParent(row.getContent());\n }\n int emptyCellColID = cellContent.getColumn();\n int emptyCellColSpan = cellContent.getColSpan();\n CellArea emptyCell = null;\n if (upperCell != null) {\n emptyCell = upperCell.cloneArea();\n } else {\n emptyCell = new CellArea();\n emptyCell.content = cellContent;\n }\n BoxStyle bs = emptyCell.getBoxStyle();\n if (bs != BoxStyle.DEFAULT) {\n bs.setRightBorder(null);\n bs.setBottomBorder(null);\n }\n emptyCell.setHeight(0);\n emptyCell.setRowSpan(rowSpan);\n CellArea originalCell = upperCell;\n if (upperCell instanceof DummyCell) {\n originalCell = ((DummyCell) upperCell).getCell();\n }\n CellArea leftSideCellArea = null;\n if (emptyCellColID > startCol) {\n leftSideCellArea = row.getCell(emptyCellColID - 1);\n if (leftSideCellArea == null) {\n int k = emptyCellColID - 1;\n while (leftSideCellArea == null && k > startCol) {\n k--;\n leftSideCellArea = row.getCell(k);\n }\n }\n } else {\n leftSideCellArea = null;\n }\n emptyCell.setParent(row);\n row.setCell(emptyCell);\n resolveBorderConflict(emptyCell, true);\n emptyCell.setWidth(getCellWidth(emptyCellColID, emptyCellColID + emptyCellColSpan));\n emptyCell.setPosition(layoutInfo.getXPosition(columnId), 0);\n if (leftSideCellArea != null) {\n int index = row.indexOf(leftSideCellArea);\n row.addChild(index + 1, emptyCell);\n } else {\n row.addChild(0, emptyCell);\n }\n emptyCell.isDummy = true;\n return emptyCell;\n}\n"
|
"public int[][] getAlignmentMatrix(int[] proteinIndices, List<Atom[]> structures) throws StructureException {\n if (proteinIndices.length != structures.size()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n int[][] alignMat = new int[proteinIndices.length][];\n for (int prot = 0; prot < proteinIndices.length; prot++) {\n int protIndex = proteinIndices[prot];\n alignMat[prot] = new int[residues[protIndex].length];\n Atom[] struct = structures.get(protIndex);\n int atomIndexGuess = 0;\n for (int res = 0; res < residues[protIndex].length; res++) {\n int groupNr = findGroup(struct, residues[protIndex][res], atomIndexGuess);\n if (groupNr < 0) {\n throw new StructureException(String.format(\"String_Node_Str\", residues[protIndex][res].toString(), struct[0].getParent().getParent().getParent().getPDBCode()));\n }\n alignMat[prot][res] = groupNr;\n }\n }\n return alignMat;\n}\n"
|
"public HashSet<Integer> getRegions(SAMRecord sam, int read1Ref) {\n int readLength = sam.getReadLength();\n int beginpos1 = sam.getAlignmentStart();\n HashSet<Integer> keys = new HashSet();\n if (read1Ref >= 0)\n Collections.addAll(keys, getKey(sam.getReferenceName(), beginpos1, endpos1));\n return keys;\n}\n"
|
"public void decode(FacesContext context, UIComponent component) {\n Panel panel = (Panel) component;\n decodeBehaviors(context, panel);\n String clientId = panel.getClientId(context);\n String collapseStateId = clientId.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n String submittedValue = (String) context.getExternalContext().getRequestParameterMap().get(collapseStateId);\n if (submittedValue != null) {\n if (Boolean.valueOf(submittedValue) != panel.isCollapsed())\n panel.setCollapsed(Boolean.valueOf(submittedValue));\n }\n}\n"
|
"public void clearCreateNewProjectError() {\n createNewProjectErrorMsg = null;\n if (!showErrorMessage()) {\n loginDialog.clearErrorMessage();\n }\n}\n"
|
"public void onFail(RetrofitError error) {\n stopRefresh();\n if (getListAdapter() == null || getListAdapter().getCount() == 0) {\n setEmpty();\n }\n ErrorHandler.onRetrofitError(getActivity(), \"String_Node_Str\", error);\n}\n"
|
"private void drawPoints(Renderer renderer, int gidx, RenderProps props, boolean selected) {\n Shading savedShading = renderer.setPointShading(props);\n renderer.setPointColoring(props, selected);\n PointStyle style = props.getPointStyle();\n switch(style) {\n case POINT:\n {\n int size = props.getPointSize();\n if (size > 0) {\n renderer.drawPoints(myRob, gidx, PointStyle.POINT, size);\n }\n break;\n }\n case SPHERE:\n {\n double rad = props.getPointRadius();\n if (rad > 0) {\n renderer.drawPoints(myRob, gidx, PointStyle.SPHERE, rad);\n }\n break;\n }\n }\n renderer.setShading(savedShading);\n}\n"
|
"private Position decodeAlternative(Channel channel, String sentence) {\n Matcher parser = pattern.matcher(sentence);\n if (!parser.matches()) {\n return null;\n }\n Position position = new Position();\n ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter(\"String_Node_Str\");\n Integer index = 1;\n String imei = parser.group(index++);\n try {\n position.setDeviceId(getDataManager().getDeviceByImei(imei).getId());\n } catch (Exception error) {\n Log.warning(\"String_Node_Str\" + imei);\n return null;\n }\n position.setValid(parser.group(index++).compareTo(\"String_Node_Str\") != 0);\n Calendar time = Calendar.getInstance(TimeZone.getTimeZone(\"String_Node_Str\"));\n time.clear();\n time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);\n time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));\n time.set(Calendar.HOUR, Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MINUTE, Integer.valueOf(parser.group(index++)));\n time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));\n position.setTime(time.getTime());\n String hemisphere = parser.group(index++);\n Double longitude = Double.valueOf(parser.group(index++));\n longitude += Double.valueOf(parser.group(index++)) / 60;\n if (hemisphere.compareTo(\"String_Node_Str\") == 0)\n longitude = -longitude;\n position.setLongitude(longitude);\n hemisphere = parser.group(index++);\n Double latitude = Double.valueOf(parser.group(index++));\n latitude += Double.valueOf(parser.group(index++)) / 60;\n if (hemisphere.compareTo(\"String_Node_Str\") == 0)\n latitude = -latitude;\n position.setLatitude(latitude);\n position.setAltitude(Double.valueOf(parser.group(index++)));\n position.setSpeed(Double.valueOf(parser.group(index++)));\n position.setCourse(Double.valueOf(parser.group(index++)));\n extendedInfo.set(\"String_Node_Str\", Integer.valueOf(parser.group(index++)));\n extendedInfo.set(\"String_Node_Str\", parser.group(index++));\n position.setExtendedInfo(extendedInfo.toString());\n return position;\n}\n"
|
"public void host(PlayNetGame png) throws Exception {\n ServerSocket serverSocket = null;\n try {\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n Socket clientSocket = null;\n while (clientSocket == null) {\n try {\n PlayGame.resetTimers();\n clientSocket = serverSocket.accept();\n } catch (Exception e) {\n if (NewGameMenu.cancelled)\n return;\n }\n }\n System.out.println(\"String_Node_Str\");\n ObjectOutputStream out = new ObjectOutputStream(clientSocket.getOutputStream());\n ObjectInputStream in = new ObjectInputStream(clientSocket.getInputStream());\n boolean playing = true;\n Object fromUser;\n Object fromServer;\n Game g = PlayNetGame.getGame();\n fromServer = g;\n if (fromServer != null)\n out.writeObject(fromServer);\n Driver.getInstance().setPanel(png);\n while (g.isBlackMove() == false) {\n while (png.netMove == null) Thread.sleep(0);\n fromServer = png.netMove;\n png.netMove = null;\n out.writeObject(fromServer);\n System.out.println(\"String_Node_Str\" + fromServer.toString());\n out.flush();\n }\n try {\n while (playing) {\n while (g.isBlackMove() == true) {\n fromUser = in.readObject();\n NetMove toMove = (NetMove) fromUser;\n g.playMove(g.fakeToRealMove((NetMove) fromUser));\n if (g.getLastMove().getResult() != null)\n break;\n }\n while (g.isBlackMove() == false) {\n while (png.netMove == null) Thread.sleep(0);\n fromServer = png.netMove;\n png.netMove = null;\n out.writeObject(fromServer);\n out.flush();\n if (g.getLastMove().getResult() != null)\n break;\n }\n }\n } catch (Exception e) {\n out.close();\n in.close();\n clientSocket.close();\n serverSocket.close();\n }\n out.close();\n in.close();\n clientSocket.close();\n serverSocket.close();\n}\n"
|
"private void fetch() {\n while (nextEntry == null && iterator.hasNext()) {\n Map.Entry<Object, RICachedValue> entry = iterator.next();\n RICachedValue cachedValue = entry.getValue();\n K key = (K) RICache.this.keyConverter.fromInternal(entry.getKey());\n lockManager.lock(key);\n try {\n if (!cachedValue.isExpiredAt(now)) {\n V value = (V) RICache.this.valueConverter.fromInternal(cachedValue.getInternalValue(now));\n nextEntry = new RIEntry<K, V>(key, value);\n Duration duration;\n try {\n Duration duration = expiryPolicy.getTTLForAccessedEntry(nextEntry, new Duration(now, cachedValue.getExpiryTime()));\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setExpiryTime(expiryTime);\n } catch (Throwable t) {\n duration = getDefaultDuration();\n }\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setExpiryTime(expiryTime);\n }\n } finally {\n lockManager.unLock(key);\n }\n }\n}\n"
|
"private static int indexOfEOS(byte[] data, int fromIndex, int encodingByte) {\n int terminationPos = indexOf(data, fromIndex, (byte) 0);\n if (encodingByte == ID3_TEXT_ENCODING_ISO_8859_1 || encodingByte == ID3_TEXT_ENCODING_UTF_8) {\n return terminationPos;\n }\n while (terminationPos < data.length - 1) {\n if (data[terminationPos + 1] == (byte) 0) {\n return terminationPos;\n }\n terminationPos = indexOf(data, terminationPos + 1, (byte) 0);\n }\n return data.length;\n}\n"
|
"protected byte[] exportShortIDs(List<Download> downloads) {\n byte[] res = new byte[SHORT_ID_SIZE * downloads.size()];\n for (int i = 0; i < downloads.size(); i++) {\n Download download = downloads.get(i);\n downloadData download_data = (downloadData) download.getUserData(BuddyPluginTracker.class);\n if (download_data == null) {\n download_data = new downloadData(download);\n }\n }\n return (res);\n}\n"
|
"public void onClick(View v) {\n if ((selectedPassphrasetype != Passphrase.INDEX_PASSPHRASE_TYPE_NONE && selectedPassphrasetype != Passphrase.INDEX_PASSPHRASE_TYPE_PATTERN && passphraseEditText.getText().toString().equals(\"String_Node_Str\")) || selectedPassphrasetype == Passphrase.INDEX_PASSPHRASE_TYPE_PATTERN && pattern == null) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.alert_no_passphrase_title).setMessage(R.string.alert_no_passphrase_message);\n builder.setPositiveButton(R.string.ok, null);\n builder.create().show();\n return;\n } else {\n if (selectedPassphrasetype != Passphrase.INDEX_PASSPHRASE_TYPE_NONE && selectedPassphrasetype != Passphrase.INDEX_PASSPHRASE_TYPE_PATTERN && !passphraseEditText.getText().toString().equals(passphraseConfirmationEditText.getText().toString())) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.alert_no_passphrase_match_title).setMessage(R.string.alert_no_passphrase_match_message);\n builder.setPositiveButton(R.string.ok, null);\n builder.create().show();\n return;\n }\n }\n Passphrase masterPassphrase = PassphraseFactory.getPassphraseInstance(selectedPassphrasetype, passphraseEditText.getText().toString(), passphraseEditText.getText().toString(), pattern);\n Passphrase.setMasterPassword(masterPassphrase, getActivity());\n getActivity().startService(BaseService.getServiceIntent(getActivity(), null, BaseService.ACTION_DETECT_ENVIRONMENT));\n mMasterPasswordSetListener.onMasterPasswordSet();\n}\n"
|
"public void open(Topic topic) throws TopicMapException, OpenTopicNotSupportedException {\n openedTopic = topic;\n if (currentDockable == null) {\n if (!dockedTopicPanels.isEmpty()) {\n currentDockable = dockedTopicPanels.keySet().iterator().next();\n }\n }\n if (currentDockable == null) {\n addDockable((TopicPanel) new TraditionalTopicPanel(), topic);\n } else {\n control.setFocusedDockable(currentDockable, true);\n TopicPanel currentTopicPanel = dockedTopicPanels.get(currentDockable);\n if (currentTopicPanel != null) {\n if (currentTopicPanel.supportsOpenTopic()) {\n currentTopicPanel.open(topic);\n updateDockableTitle(currentTopicPanel);\n } catch (OpenTopicNotSupportedException otnse) {\n ArrayList<TopicPanel> availableTopicPanels = new ArrayList();\n for (Dockable dockable : dockedTopicPanels.keySet()) {\n TopicPanel availableTopicPanel = dockedTopicPanels.get(dockable);\n if (availableTopicPanel != null && availableTopicPanel.supportsOpenTopic()) {\n availableTopicPanels.add(availableTopicPanel);\n }\n }\n if (availableTopicPanels.isEmpty()) {\n addDockable((TopicPanel) new TraditionalTopicPanel(), topic);\n } else if (availableTopicPanels.size() == 1) {\n TopicPanel alternativeTopicPanel = availableTopicPanels.get(0);\n alternativeTopicPanel.open(topic);\n updateDockableTitle(alternativeTopicPanel);\n } else {\n boolean askForATopicPanel = true;\n TopicPanel rememberedTargetTopicPanel = chainedTopicPanels.get(currentTopicPanel);\n if (rememberedTargetTopicPanel != null) {\n Dockable dockable = this.getDockableFor(rememberedTargetTopicPanel);\n if (dockable != null) {\n rememberedTargetTopicPanel.open(topic);\n updateDockableTitle(rememberedTargetTopicPanel);\n askForATopicPanel = false;\n } else {\n chainedTopicPanels.remove(currentTopicPanel);\n }\n }\n if (askForATopicPanel) {\n SelectTopicPanelPanel topicPanelSelector = new SelectTopicPanelPanel();\n topicPanelSelector.openInDialog(availableTopicPanels, wandora);\n if (topicPanelSelector.wasAccepted()) {\n TopicPanel userSelectedTopicPanel = topicPanelSelector.getSelectedTopicPanel();\n if (userSelectedTopicPanel != null) {\n userSelectedTopicPanel.open(topic);\n updateDockableTitle(userSelectedTopicPanel);\n if (topicPanelSelector.getRememberSelection()) {\n chainedTopicPanels.put(currentTopicPanel, userSelectedTopicPanel);\n }\n }\n }\n }\n }\n }\n }\n }\n revalidate();\n repaint();\n}\n"
|
"protected void init() {\n String currentDataSet = getDataServiceProvider().getBoundDataSet();\n if (currentDataSet != null) {\n cmbDataSet.setItems(getDataServiceProvider().getAllDataSets());\n cmbDataSet.setText((currentDataSet == null) ? BLANK_DATASET : currentDataSet);\n useReportDataSet(false);\n if (currentDataSet != null) {\n switchDataTable();\n }\n } else {\n useReportDataSet(true);\n String reportDataSet = getDataServiceProvider().getReportDataSet();\n if (reportDataSet != null) {\n switchDataTable();\n }\n }\n btnFilters.setEnabled(hasDataSet() && getDataServiceProvider().isInvokingSupported());\n btnParameters.setEnabled(getDataServiceProvider().getBoundDataSet() != null && getDataServiceProvider().isInvokingSupported());\n btnBinding.setEnabled(hasDataSet() && getDataServiceProvider().isInvokingSupported());\n btnFilters.setVisible(getDataServiceProvider().isEclipseModeSupported());\n btnParameters.setVisible(getDataServiceProvider().isEclipseModeSupported());\n btnBinding.setVisible(getDataServiceProvider().isEclipseModeSupported());\n}\n"
|
"public static org.hl7.fhir.dstu3.model.ParameterDefinition convertParameterDefinition(org.hl7.fhir.r4.model.ParameterDefinition src) throws FHIRException {\n if (src == null)\n return null;\n org.hl7.fhir.dstu3.model.ParameterDefinition tgt = new org.hl7.fhir.dstu3.model.ParameterDefinition();\n copyElement(src, tgt);\n if (src.hasName())\n tgt.setName(src.getName());\n if (src.hasUse())\n tgt.setUse(convertParameterUse(src.getUse()));\n if (src.hasMin())\n tgt.setMin(src.getMin());\n if (src.hasMax())\n tgt.setMax(src.getMax());\n if (src.hasDocumentation())\n tgt.setDocumentation(src.getDocumentation());\n if (src.hasType())\n tgt.setType(src.getType());\n if (src.hasProfile())\n tgt.setProfile(new org.hl7.fhir.dstu3.model.Reference(src.getProfile()));\n return tgt;\n}\n"
|
"public void test() {\n ReadAllQuery query = new ReadAllQuery();\n query.setReferenceClass(Employee.class);\n ExpressionBuilder builder = new ExpressionBuilder();\n Expression exp = builder.get(\"String_Node_Str\").like(\"String_Node_Str\");\n query.setSelectionCriteria(exp);\n if (TYPE_SCROLL_INSENSITIVE_isSupported && CONCUR_UPDATABLE_isSupported) {\n query.useScrollableCursor();\n } else {\n ScrollableCursorPolicy policy = new ScrollableCursorPolicy();\n if (!TYPE_SCROLL_INSENSITIVE_isSupported) {\n policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_SENSITIVE);\n }\n if (!CONCUR_UPDATABLE_isSupported) {\n policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);\n }\n policy.setPageSize(10);\n query.useScrollableCursor(policy);\n }\n employeeStream = (ScrollableCursor) getSession().executeQuery(query);\n}\n"
|
"public void setGhostMode() {\n head.setColor(Config.GHOSTMODE_COLOR);\n body.setColor(Config.GHOSTMODE_COLOR);\n}\n"
|
"public void ready(VirtualConnection inVC) {\n if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {\n Tr.entry(tc, \"String_Node_Str\" + this + \"String_Node_Str\" + inVC);\n }\n this.myTSC = (TCPConnectionContext) getDeviceLink().getChannelAccessor();\n HttpInboundServiceContextImpl sc = getHTTPContext();\n sc.init(this.myTSC, this, inVC, getChannel().getHttpConfig());\n if (getChannel().getHttpConfig().getDebugLog().isEnabled(DebugLog.Level.INFO)) {\n getChannel().getHttpConfig().getDebugLog().log(DebugLog.Level.INFO, HttpMessages.MSG_CONN_STARTING, sc);\n }\n if (this.myTSC.getSSLContext() != null && !sc.isH2Connection() && this.myTSC.getSSLContext().getAlpnProtocol() != null && this.myTSC.getSSLContext().getAlpnProtocol().equals(\"String_Node_Str\") && checkForH2MagicString(sc)) {\n alreadyH2Upgraded = true;\n handleHttp2();\n } else {\n processRequest();\n }\n if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {\n Tr.exit(tc, \"String_Node_Str\");\n }\n}\n"
|
"public boolean compositeObjectMarshal(XMLRecord record, Object object, XMLField field, AbstractSession session) {\n if (marshalNullRepresentation.equals(XMLNullRepresentationType.XSI_NIL)) {\n record.put(field, XMLRecord.NIL);\n return true;\n } else {\n if (getMarshalNullRepresentation().equals(XMLNullRepresentationType.EMPTY_NODE)) {\n Node element = XPathEngine.getInstance().createUnownedElement(record.getDOM(), field);\n DOMRecord nestedRow = new DOMRecord(element);\n record.put(field, nestedRow);\n return true;\n } else {\n return false;\n }\n }\n}\n"
|
"public void bindView(View view, final Context context, Cursor cursor) {\n attachMessageRelativeLayout = (RelativeLayout) view.findViewById(R.id.attach_message_relativelayout);\n timeAttachMessageTextView = (TextView) view.findViewById(R.id.time_attach_message_textview);\n progressRelativeLayout = (RelativeLayout) view.findViewById(R.id.progress_relativelayout);\n textMessageLinearLayout = (LinearLayout) view.findViewById(R.id.text_message_linearlayout);\n messageTextView = (ChatTextView) view.findViewById(R.id.message_textview);\n attachImageView = (ImageView) view.findViewById(R.id.attach_imageview);\n timeTextMessageTextView = (TextView) view.findViewById(R.id.time_text_message_textview);\n verticalProgressBar = (ProgressBar) view.findViewById(R.id.vertical_progressbar);\n verticalProgressBar.setProgressDrawable(context.getResources().getDrawable(R.drawable.vertical_progressbar));\n centeredProgressBar = (ProgressBar) view.findViewById(R.id.centered_progressbar);\n int senderId = cursor.getInt(cursor.getColumnIndex(DialogMessageTable.Cols.SENDER_ID));\n String body = cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.BODY));\n String attachUrl = cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ATTACH_FILE_ID));\n long time = cursor.getLong(cursor.getColumnIndex(DialogMessageTable.Cols.TIME));\n boolean isOwnMessage = isOwnMessage(senderId);\n viewHolder.attachMessageRelativeLayout.setVisibility(View.GONE);\n if (!TextUtils.isEmpty(attachUrl)) {\n viewHolder.timeAttachMessageTextView.setText(DateUtils.longToMessageDate(time));\n viewHolder.textMessageLinearLayout.setVisibility(View.GONE);\n viewHolder.progressRelativeLayout.setVisibility(View.VISIBLE);\n displayAttachImage(attachUrl, viewHolder.attachImageView, viewHolder.progressRelativeLayout, viewHolder.attachMessageRelativeLayout, viewHolder.verticalProgressBar, viewHolder.centeredProgressBar, isOwnMessage);\n } else {\n viewHolder.timeTextMessageTextView.setText(DateUtils.longToMessageDate(time));\n viewHolder.textMessageLinearLayout.setVisibility(View.VISIBLE);\n viewHolder.attachImageView.setVisibility(View.GONE);\n viewHolder.messageTextView.setText(body);\n }\n boolean isRead = cursor.getInt(cursor.getColumnIndex(DialogMessageTable.Cols.IS_READ)) > Consts.ZERO_INT_VALUE;\n if (!isRead) {\n String messageId = cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ID));\n QBUpdateStatusMessageCommand.start(context, messageId, true);\n }\n}\n"
|
"public void updateTags() {\n PathResolver pathResolver = projectOperations.getPathResolver();\n LogicalPath webappPath = WebProjectUtils.getWebappPath(projectOperations);\n OperationUtils.updateDirectoryContents(\"String_Node_Str\", pathResolver.getIdentifier(webappPath, \"String_Node_Str\"), fileManager, context, getClass());\n copyDirectoryContents(\"String_Node_Str\", pathResolver.getIdentifier(webappPath, \"String_Node_Str\"), true);\n copyDirectoryContents(\"String_Node_Str\", pathResolver.getIdentifier(webappPath, \"String_Node_Str\"), true);\n copyDirectoryContents(\"String_Node_Str\", pathResolver.getIdentifier(webappPath, \"String_Node_Str\"), true);\n copyDirectoryContents(\"String_Node_Str\", pathResolver.getIdentifier(webappPath, \"String_Node_Str\"), true);\n copyDirectoryContents(\"String_Node_Str\", pathResolver.getIdentifier(webappPath, \"String_Node_Str\"), true);\n}\n"
|
"public TopicMap process(TopicMap tm, Logger logger) throws TopicMapException {\n log(\"String_Node_Str\");\n Topic fiLang = tm.getTopic(\"String_Node_Str\");\n Topic swLang = tm.getTopic(\"String_Node_Str\");\n Topic enLang = tm.getTopic(\"String_Node_Str\");\n Topic work = tm.getTopic(\"String_Node_Str\");\n Topic isAboutType = tm.getTopic(\"String_Node_Str\");\n Topic isAboutRole = tm.getTopic(\"String_Node_Str\");\n Topic requiredRole = tm.getTopic(\"String_Node_Str\");\n Topic requiredPlayer = tm.getTopic(\"String_Node_Str\");\n if (work == null || isAboutType == null || isAboutRole == null || requiredRole == null || requiredPlayer == null) {\n log(\"String_Node_Str\");\n return tm;\n }\n Topic keywordClassTopic = tm.getTopic(\"String_Node_Str\");\n if (keywordClassTopic == null) {\n keywordClassTopic = tm.createTopic();\n keywordClassTopic.setBaseName(\"String_Node_Str\");\n keywordClassTopic.addSubjectIdentifier(new Locator(\"String_Node_Str\"));\n }\n int splitCounter = 0;\n int createTopicCounter = 0;\n int createAssociationCounter = 0;\n Iterator iter = tm.getTopicsOfType(work).iterator();\n while (iter.hasNext()) {\n Topic t = (Topic) iter.next();\n List<Topic> keywords = TopicTools.getPlayers(t, isAboutType, isAboutRole, requiredRole, requiredPlayer);\n int s = keywords.size();\n for (int i = 0; i < s; i++) {\n Topic keywordTopic = keywords.elementAt(i);\n if (keywordTopic != null) {\n hlog(\"String_Node_Str\" + getTopicName(keywordTopic) + \"String_Node_Str\");\n StringTokenizer st = new StringTokenizer(keywordTopic.getBaseName(), \"String_Node_Str\");\n while (st.hasMoreTokens()) {\n String token = st.nextToken();\n token = fixKeyword(token);\n if (token != null && token.length() > 0 && !token.startsWith(\"String_Node_Str\") && !token.startsWith(\"String_Node_Str\")) {\n String siString = \"String_Node_Str\" + token;\n if (siString.length() > 255)\n siString = siString.substring(0, 255);\n Locator l = cleanDirtyLocator(new Locator(siString));\n Topic newKeyword = tm.getTopic(l);\n if (newKeyword == null) {\n newKeyword = tm.createTopic();\n newKeyword.setBaseName(token + \"String_Node_Str\");\n newKeyword.setDisplayName(\"String_Node_Str\", token);\n newKeyword.addSubjectIdentifier(l);\n newKeyword.addType(keywordClassTopic);\n createTopicCounter++;\n log(\"String_Node_Str\" + getTopicName(newKeyword) + \"String_Node_Str\");\n }\n Association a = tm.createAssociation(keywordClassTopic);\n a.addPlayer(newKeyword, keywordClassTopic);\n a.addPlayer(t, work);\n createAssociationCounter++;\n }\n }\n }\n try {\n for (Iterator assos = keywordTopic.getAssociations().iterator(); assos.hasNext(); ) {\n Association a = (Association) assos.next();\n if (a != null)\n a.remove();\n }\n keywordTopic.remove();\n splitCounter++;\n } catch (Exception e) {\n log(e);\n }\n }\n }\n log(\"String_Node_Str\" + splitCounter + \"String_Node_Str\");\n log(\"String_Node_Str\" + createAssociationCounter + \"String_Node_Str\");\n log(\"String_Node_Str\" + createTopicCounter + \"String_Node_Str\");\n return tm;\n}\n"
|
"public static void main(String[] args) throws JMetalException {\n Problem problem;\n Algorithm algorithm;\n CrossoverOperator crossover;\n MutationOperator mutation;\n SelectionOperator selection;\n String problemName;\n if (args.length == 1) {\n problemName = args[0];\n } else {\n problemName = \"String_Node_Str\";\n }\n problem = ProblemUtils.loadProblem(problemName);\n double crossoverProbability = 0.9;\n double crossoverDistributionIndex = 20.0;\n crossover = new SBXCrossover(crossoverProbability, crossoverDistributionIndex);\n double mutationProbability = 1.0 / problem.getNumberOfVariables();\n double mutationDistributionIndex = 20.0;\n mutation = new PolynomialMutation(mutationProbability, mutationDistributionIndex);\n selection = new BinaryTournamentSelection();\n algorithm = new NSGAIIBuilder(problem).setCrossoverOperator(crossover).setMutationOperator(mutation).setSelectionOperator(selection).setMaxIterations(250).setPopulationSize(100).build();\n AlgorithmRunner algorithmRunner = new AlgorithmRunner.Executor(algorithm).execute();\n List<Solution> population = ((NSGAII) algorithm).getResult();\n long computingTime = algorithmRunner.getComputingTime();\n new SolutionSetOutput.Printer(population).setSeparator(\"String_Node_Str\").setVarFileOutputContext(new DefaultFileOutputContext(\"String_Node_Str\")).setFunFileOutputContext(new DefaultFileOutputContext(\"String_Node_Str\")).print();\n JMetalLogger.logger.info(\"String_Node_Str\" + computingTime + \"String_Node_Str\");\n JMetalLogger.logger.info(\"String_Node_Str\");\n JMetalLogger.logger.info(\"String_Node_Str\");\n}\n"
|
"private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) {\n Chart helperModel = currentChart.copyInstance();\n helperModel.eAdapters().addAll(currentChart.eAdapters());\n ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllOrthogonalSeriesDefinitions(helperModel));\n IChartType oldType = ChartUIUtil.getChartType(currentChart.getType());\n if ((currentChart instanceof ChartWithAxes)) {\n if (currentChart.getType().equals(TYPE_LITERAL)) {\n if (!currentChart.getSubType().equals(sNewSubType)) {\n currentChart.setSubType(sNewSubType);\n EList<Axis> axes = ((ChartWithAxes) currentChart).getAxes().get(0).getAssociatedAxes();\n for (int i = 0; i < axes.size(); i++) {\n axes.get(i).setPercent(false);\n EList<SeriesDefinition> seriesdefinitions = axes.get(i).getSeriesDefinitions();\n for (int j = 0; j < seriesdefinitions.size(); j++) {\n Series series = seriesdefinitions.get(j).getDesignTimeSeries();\n series.setStacked(false);\n }\n }\n }\n } else if (currentChart.getType().equals(BarChart.TYPE_LITERAL) || currentChart.getType().equals(TubeChart.TYPE_LITERAL) || currentChart.getType().equals(ConeChart.TYPE_LITERAL) || currentChart.getType().equals(PyramidChart.TYPE_LITERAL) || currentChart.getType().equals(LineChart.TYPE_LITERAL) || currentChart.getType().equals(StockChart.TYPE_LITERAL) || currentChart.getType().equals(ScatterChart.TYPE_LITERAL) || currentChart.getType().equals(AreaChart.TYPE_LITERAL) || currentChart.getType().equals(BubbleChart.TYPE_LITERAL) || currentChart.getType().equals(GanttChart.TYPE_LITERAL)) {\n currentChart.setType(TYPE_LITERAL);\n currentChart.setSubType(sNewSubType);\n Text title = currentChart.getTitle().getLabel().getCaption();\n if (title.getValue() == null || title.getValue().trim().length() == 0 || title.getValue().trim().equals(oldType.getDefaultTitle().trim())) {\n title.setValue(getDefaultTitle());\n }\n Axis xAxis = ((ChartWithAxes) currentChart).getAxes().get(0);\n xAxis.setCategoryAxis(true);\n EList<Axis> axes = xAxis.getAssociatedAxes();\n List<AxisType> axisTypes = new ArrayList<AxisType>();\n for (int i = 0, seriesIndex = 0; i < axes.size(); i++) {\n if (!ChartPreviewPainter.isLivePreviewActive()) {\n axes.get(i).setType(AxisType.LINEAR_LITERAL);\n }\n axes.get(i).setPercent(false);\n EList<SeriesDefinition> seriesdefinitions = axes.get(i).getSeriesDefinitions();\n for (int j = 0; j < seriesdefinitions.size(); j++) {\n Series series = seriesdefinitions.get(j).getDesignTimeSeries();\n series = getConvertedSeries(series, seriesIndex++);\n series.setStacked(false);\n seriesdefinitions.get(j).getSeries().clear();\n seriesdefinitions.get(j).getSeries().add(series);\n axisTypes.add(axes.get(i).getType());\n }\n }\n currentChart.setSampleData(getConvertedSampleData(currentChart.getSampleData(), xAxis.getType(), axisTypes));\n } else {\n return null;\n }\n } else {\n currentChart = ChartWithAxesImpl.create();\n currentChart.eAdapters().addAll(helperModel.eAdapters());\n currentChart.setType(TYPE_LITERAL);\n currentChart.setSubType(sNewSubType);\n ((ChartWithAxes) currentChart).setOrientation(newOrientation);\n currentChart.setDimension(getDimensionFor(sNewDimension));\n Axis xAxis = ((ChartWithAxes) currentChart).getAxes().get(0);\n xAxis.setOrientation(Orientation.HORIZONTAL_LITERAL);\n xAxis.setType(AxisType.TEXT_LITERAL);\n xAxis.setCategoryAxis(true);\n Axis yAxis = xAxis.getAssociatedAxes().get(0);\n yAxis.setOrientation(Orientation.VERTICAL_LITERAL);\n yAxis.setType(AxisType.LINEAR_LITERAL);\n currentChart.setBlock(helperModel.getBlock());\n currentChart.setDescription(helperModel.getDescription());\n currentChart.setGridColumnCount(helperModel.getGridColumnCount());\n currentChart.setSampleData(helperModel.getSampleData());\n currentChart.setScript(helperModel.getScript());\n currentChart.setSeriesThickness(helperModel.getSeriesThickness());\n currentChart.setUnits(helperModel.getUnits());\n if (helperModel.getInteractivity() != null) {\n currentChart.getInteractivity().setEnable(helperModel.getInteractivity().isEnable());\n currentChart.getInteractivity().setLegendBehavior(helperModel.getInteractivity().getLegendBehavior());\n }\n {\n xAxis.getSeriesDefinitions().clear();\n xAxis.getSeriesDefinitions().add(((ChartWithoutAxes) helperModel).getSeriesDefinitions().get(0));\n yAxis.getSeriesDefinitions().clear();\n yAxis.getSeriesDefinitions().addAll(xAxis.getSeriesDefinitions().get(0).getSeriesDefinitions());\n Series series = xAxis.getSeriesDefinitions().get(0).getDesignTimeSeries();\n xAxis.getSeriesDefinitions().get(0).getSeries().clear();\n xAxis.getSeriesDefinitions().get(0).getSeries().add(series);\n EList<SeriesDefinition> seriesdefinitions = yAxis.getSeriesDefinitions();\n for (int j = 0; j < seriesdefinitions.size(); j++) {\n series = seriesdefinitions.get(j).getDesignTimeSeries();\n series = getConvertedSeries(series, j);\n series.getLabel().setVisible(false);\n series.setStacked(false);\n seriesdefinitions.get(j).getSeries().clear();\n seriesdefinitions.get(j).getSeries().add(series);\n }\n } else {\n return null;\n }\n currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);\n Text title = currentChart.getTitle().getLabel().getCaption();\n if (title.getValue() == null || title.getValue().trim().length() == 0 || title.getValue().trim().equals(oldType.getDefaultTitle().trim())) {\n title.setValue(getDefaultTitle());\n }\n }\n if (!((ChartWithAxes) currentChart).getOrientation().equals(newOrientation)) {\n ((ChartWithAxes) currentChart).setOrientation(newOrientation);\n }\n if (!currentChart.getDimension().equals(ChartUIUtil.getDimensionType(sNewDimension))) {\n currentChart.setDimension(ChartUIUtil.getDimensionType(sNewDimension));\n }\n return currentChart;\n}\n"
|
"public void onHeaderClick(StickyListHeadersListView l, View header, int itemPosition, long headerId, boolean currentlySticky) {\n Toast.makeText(getActivity(), \"String_Node_Str\" + headerId, Toast.LENGTH_SHORT).show();\n mStickyList.smoothScrollToPositionFromTop(mAdapter.getSectionStart(itemPosition) + mStickyList.getHeaderViewsCount(), -mStickyList.getPaddingTop());\n}\n"
|
"public FPSCamera rotateY(float angle) {\n Quaternion tempQuat = Quaternion.REUSABLE_STACK.pop();\n Quaternion yRot = tempQuat.set(Vector3.AXIS_Y, angle);\n rotation.set(yRot.multiplySelf(rotation));\n Quaternion.REUSABLE_STACK.push(tempQuat);\n return this;\n}\n"
|
"private void writeBody(TypeRegistry registry, IndentedAppendable writer, List<RamlMediaType> mediaTypes, RamlEntity bodyType) throws IOException {\n Class type = (Class) bodyType.getType();\n writer.appendLine(\"String_Node_Str\" + type.getSimpleName());\n registry.registerType(type.getSimpleName(), bodyType, new SimpleJaxbTypeScanner());\n}\n"
|
"public Convention getCon() {\n if (this.con != null) {\n return con;\n }\n Cursor c = this.mDatabase.query(CondroidDatabase.CON_TABLE, null, null, null, null, null);\n Convention co = new Convention();\n while (c.moveToNext()) {\n co.setCid(c.getInt(c.getColumnIndex(\"String_Node_Str\")));\n co.setDataUrl(c.getString(c.getColumnIndex(\"String_Node_Str\")));\n co.setDate(c.getString(c.getColumnIndex(\"String_Node_Str\")));\n co.setIconUrl(c.getString(c.getColumnIndex(\"String_Node_Str\")));\n co.setName(c.getString(c.getColumnIndex(\"String_Node_Str\")));\n co.setMessage(c.getString(c.getColumnIndex(\"String_Node_Str\")));\n co.setLocationsFile(c.getString(c.getColumnIndex(\"String_Node_Str\")));\n DateTimeFormatter format = DateTimeFormat.forPattern(\"String_Node_Str\").withZoneUTC();\n try {\n co.setLastUpdate(format.parse(c.getString(c.getColumnIndex(\"String_Node_Str\"))));\n } catch (Exception e) {\n Log.e(\"String_Node_Str\", \"String_Node_Str\", e);\n co.setLastUpdate(new Date());\n }\n }\n c.close();\n this.con = co;\n return co;\n}\n"
|
"public void of(CairoConfiguration configuration, Path path, CharSequence name, AppendMemory mem1, AppendMemory mem2, long columnTop) {\n this.columnTop = columnTop;\n try {\n this.writer.of(configuration, path, name);\n this.mem.of(mem1);\n } catch (CairoException e) {\n this.close();\n throw e;\n }\n}\n"
|
"public void addMember(final Node n) {\n if (!isEditable()) {\n LOGGER.warn(\"String_Node_Str\" + n + \"String_Node_Str\" + this);\n return;\n }\n if (n == null || n.getTLModelObject() == null) {\n LOGGER.warn(\"String_Node_Str\" + n);\n return;\n }\n if (!(n.getTLModelObject() instanceof LibraryMember)) {\n LOGGER.warn(\"String_Node_Str\" + n);\n return;\n }\n if (n.getParent() != null && n.getParent().getChildren().contains(n)) {\n LOGGER.warn(n + \"String_Node_Str\");\n return;\n } else if ((n instanceof SimpleComponentInterface) && getSimpleRoot().getChildren().contains(n)) {\n LOGGER.warn(n + \"String_Node_Str\");\n return;\n } else if ((n instanceof ComplexComponentInterface) && getComplexRoot().getChildren().contains(n)) {\n LOGGER.warn(n + \"String_Node_Str\");\n return;\n }\n if (n.getLibrary() != null && n.getLibrary() != this)\n n.removeFromLibrary();\n AbstractLibrary owningLib = null;\n if (n.getTLModelObject() instanceof LibraryMember)\n owningLib = ((LibraryMember) n.getTLModelObject()).getOwningLibrary();\n if (owningLib != getTLLibrary()) {\n owningLib.removeNamedMember((LibraryMember) n.getTLModelObject());\n getTLLibrary().addNamedMember((LibraryMember) n.getTLModelObject());\n }\n if (owningLib == null)\n getTLLibrary().addNamedMember((LibraryMember) n.getTLModelObject());\n if (linkMember(n)) {\n if (isInChain()) {\n getChain().add((ComponentNode) n);\n }\n }\n if (n.getParent().getChildren().indexOf(n) != n.getParent().getChildren().lastIndexOf(n))\n LOGGER.error(n + \"String_Node_Str\");\n}\n"
|
"public void testCreateBusFueledVehicle() {\n int prePersistBusCountBefore = 0;\n int postPersistBusCountBefore = 0;\n int prePersistBusListenerCountBefore = BusListener.PRE_PERSIST_COUNT;\n int postPersistBusListenerCountBefore = BusListener.POST_PERSIST_COUNT;\n int prePersistBusListener2CountBefore = BusListener2.PRE_PERSIST_COUNT;\n int postPersistBusListener2CountBefore = BusListener2.POST_PERSIST_COUNT;\n int prePersistDefaultListenerCountBefore = DefaultListener.PRE_PERSIST_COUNT;\n int postPersistDefaultListenerCountBefore = DefaultListener.POST_PERSIST_COUNT;\n EntityManager em = createEntityManager();\n beginTransaction(em);\n Bus bus = new Bus();\n bus.setPassengerCapacity(new Integer(50));\n bus.setFuelCapacity(new Integer(175));\n bus.setDescription(\"String_Node_Str\");\n bus.setFuelType(\"String_Node_Str\");\n try {\n em.persist(bus);\n busId = bus.getId();\n commitTransaction(em);\n } catch (RuntimeException ex) {\n if (isTransactionActive(em)) {\n rollbackTransaction(em);\n }\n closeEntityManager(em);\n throw ex;\n }\n assertFalse(\"String_Node_Str\", prePersistBusCountBefore == Bus.PRE_PERSIST_COUNT);\n assertFalse(\"String_Node_Str\", postPersistBusCountBefore == Bus.POST_PERSIST_COUNT);\n assertFalse(\"String_Node_Str\", prePersistBusListenerCountBefore == BusListener.PRE_PERSIST_COUNT);\n assertFalse(\"String_Node_Str\", postPersistBusListenerCountBefore == BusListener.POST_PERSIST_COUNT);\n assertFalse(\"String_Node_Str\", prePersistBusListener2CountBefore == BusListener2.PRE_PERSIST_COUNT);\n assertFalse(\"String_Node_Str\", postPersistBusListener2CountBefore == BusListener2.POST_PERSIST_COUNT);\n assertFalse(\"String_Node_Str\", prePersistDefaultListenerCountBefore == DefaultListener.PRE_PERSIST_COUNT);\n assertFalse(\"String_Node_Str\", postPersistDefaultListenerCountBefore == DefaultListener.POST_PERSIST_COUNT);\n assertTrue(\"String_Node_Str\", bus.prePersistCalledListenerCount() == 6);\n assertTrue(\"String_Node_Str\", bus.postPersistCalledListenerCount() == 3);\n assertTrue(\"String_Node_Str\", bus.getPrePersistCalledListenerAt(0) == DefaultListener1.class);\n assertTrue(\"String_Node_Str\", bus.getPrePersistCalledListenerAt(1) == DefaultListener2.class);\n assertTrue(\"String_Node_Str\", bus.getPrePersistCalledListenerAt(2) == DefaultListener3.class);\n assertTrue(\"String_Node_Str\", bus.getPrePersistCalledListenerAt(3) == org.eclipse.persistence.testing.models.jpa.xml.inheritance.listeners.BusListener2.class);\n assertTrue(\"String_Node_Str\", bus.getPrePersistCalledListenerAt(4) == org.eclipse.persistence.testing.models.jpa.xml.inheritance.listeners.BusListener3.class);\n assertTrue(\"String_Node_Str\", bus.getPrePersistCalledListenerAt(5) == org.eclipse.persistence.testing.models.jpa.xml.inheritance.listeners.BusListener.class);\n assertTrue(\"String_Node_Str\", bus.getPostPersistCalledListenerAt(0) == org.eclipse.persistence.testing.models.jpa.xml.inheritance.listeners.BusListener2.class);\n assertTrue(\"String_Node_Str\", bus.getPostPersistCalledListenerAt(1) == org.eclipse.persistence.testing.models.jpa.xml.inheritance.listeners.BusListener3.class);\n assertTrue(\"String_Node_Str\", bus.getPostPersistCalledListenerAt(2) == org.eclipse.persistence.testing.models.jpa.xml.inheritance.listeners.BusListener.class);\n}\n"
|
"public LineElement next() {\n if (current == null) {\n throw LAST_ELEMENT_REACHED;\n }\n LineElement next = current;\n current = current.next;\n return next;\n}\n"
|
"private static List<Class<?>> populateClasses(File objectDir, String packageName) {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n File[] classFiles = objectDir.listFiles();\n for (File classFile : classFiles) {\n if (!classFile.isDirectory())\n classes.add(getClassFor(classFile, packageName));\n else if (recursiveScan)\n classes.addAll(populateClasses(classFile, packageName));\n }\n return classes;\n}\n"
|
"public boolean hasUncachedDescendants(final BuildContext context) throws IOException {\n if (hasUncachedDescendants.isSet()) {\n return hasUncachedDescendants.asBoolean();\n }\n if (!isCached(context)) {\n hasUncachedDescendants = TriState.TRUE;\n } else {\n hasUncachedDescendants = TriState.forBooleanValue(!getDepsWithUncachedDescendants(context).isEmpty());\n }\n return hasUncachedDescendants.asBoolean();\n}\n"
|
"private void updateNotificationIcons() {\n if (mNotificationsContainer.getVisibility() != View.VISIBLE) {\n mNotificationsContainer.setVisibility(View.VISIBLE);\n }\n NotificationHub notificationHub = NotificationHub.getInstance();\n int iconSize = getResources().getDimensionPixelSize(R.dimen.small_notification_icon_size);\n int padding = getResources().getDimensionPixelSize(R.dimen.small_notification_icon_padding);\n final StatusBarNotification n = notificationHub.getCurrentNotification();\n ImageView icon = new ImageView(this);\n icon.setAlpha(NotificationPeek.ICON_LOW_OPACITY);\n icon.setPadding(padding, 0, padding, 0);\n icon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(this, n));\n icon.setTag(n);\n int oldIndex = getOldIconViewIndex(notificationHub);\n if (oldIndex >= 0) {\n mNotificationsContainer.removeViewAt(oldIndex);\n }\n mNotificationsContainer.addView(icon);\n LinearLayout.LayoutParams linearLayoutParams = new LinearLayout.LayoutParams(iconSize, iconSize);\n GridLayout.LayoutParams gridLayoutParams = new GridLayout.LayoutParams(linearLayoutParams);\n icon.setLayoutParams(gridLayoutParams);\n}\n"
|
"private static String getMatchResultString(TournamentPlayer p1, TournamentPlayer p2, Match match) {\n MatchPlayer mp1 = match.getPlayer(p1.getPlayer().getId());\n MatchPlayer mp2 = match.getPlayer(p2.getPlayer().getId());\n StringBuilder matchResult = new StringBuilder();\n matchResult.append(p2.getPlayer().getName());\n matchResult.append(\"String_Node_Str\").append(mp1.getWins());\n if (mp1.hasQuit()) {\n matchResult.append(mp1.getPlayer().hasIdleTimeout() ? \"String_Node_Str\" : (mp1.getPlayer().hasTimerTimeout() ? \"String_Node_Str\" : \"String_Node_Str\"));\n }\n if (match.getDraws() > 0) {\n matchResult.append(\"String_Node_Str\").append(match.getDraws());\n }\n matchResult.append(\"String_Node_Str\").append(mp2.getWins());\n if (mp2.hasQuit()) {\n matchResult.append(mp2.getPlayer().hasIdleTimeout() ? \"String_Node_Str\" : (mp2.getPlayer().hasTimerTimeout() ? \"String_Node_Str\" : \"String_Node_Str\"));\n }\n matchResult.append(\"String_Node_Str\");\n return matchResult.toString();\n}\n"
|
"public void drawHighlighted(Canvas c, Highlight[] indices) {\n int setCount = mChart.getBarData().getDataSetCount();\n for (int i = 0; i < indices.length; i++) {\n Highlight h = indices[i];\n int index = h.getXIndex();\n int dataSetIndex = h.getDataSetIndex();\n BarDataSet set = mChart.getBarData().getDataSetByIndex(dataSetIndex);\n if (set == null)\n continue;\n Transformer trans = mChart.getTransformer(set.getAxisDependency());\n mHighlightPaint.setColor(set.getHighLightColor());\n mHighlightPaint.setAlpha(set.getHighLightAlpha());\n if (index < mChart.getBarData().getYValCount() && index >= 0 && index < (mChart.getXChartMax() * mAnimator.getPhaseX()) / setCount) {\n BarEntry e = mChart.getBarData().getDataSetByIndex(dataSetIndex).getEntryForXIndex(index);\n if (e == null)\n continue;\n float groupspace = mChart.getBarData().getGroupSpace();\n float x = index * setCount + dataSetIndex + groupspace / 2f + groupspace * index;\n float y = isStack ? e.getVals()[h.getStackIndex()] + e.getBelowSum(h.getStackIndex()) : e.getVal();\n float from = isStack ? e.getBelowSum(h.getStackIndex()) : 0f;\n prepareBarHighlight(x, y, set.getBarSpace(), from, trans);\n c.drawRect(mBarRect, mHighlightPaint);\n if (mChart.isDrawHighlightArrowEnabled()) {\n mHighlightPaint.setAlpha(255);\n float offsetY = mAnimator.getPhaseY() * 0.07f;\n Path arrow = new Path();\n arrow.moveTo(x + 0.5f, y + offsetY * 0.3f);\n arrow.lineTo(x + 0.2f, y + offsetY);\n arrow.lineTo(x + 0.8f, y + offsetY);\n trans.pathValueToPixel(arrow);\n c.drawPath(arrow, mHighlightPaint);\n }\n }\n }\n}\n"
|
"private PathFragment checkForWorkspace(PathFragment path) {\n sawWorkspaceName = sawWorkspaceName || path.getSegment(0).equals(workspaceName.getPathString());\n return path;\n}\n"
|
"public void flowStepFinished(String executionId, IComponent component, Throwable error, boolean cancelled) {\n super.flowStepFinished(executionId, component, error, cancelled);\n ExecutionStep step = steps.get(component.getFlowStep().getId());\n if (step != null) {\n step.setEndTime(new Date());\n ExecutionStatus status = ExecutionStatus.DONE;\n if (error != null) {\n status = ExecutionStatus.ERROR;\n }\n if (cancelled) {\n status = ExecutionStatus.CANCELLED;\n }\n step.setStatus(status.name());\n if (component.getComponentStatistics() != null) {\n step.setMessagesReceived(component.getComponentStatistics().getNumberInboundMessages());\n step.setMessagesProduced(component.getComponentStatistics().getNumberOutboundMessages());\n }\n this.recorder.record(step);\n }\n if (cancelled) {\n status = ExecutionStatus.CANCELLED;\n }\n step.setStatus(status.name());\n if (component.getComponentStatistics() != null) {\n step.setMessagesReceived(component.getComponentStatistics().getNumberInboundMessages());\n step.setMessagesProduced(component.getComponentStatistics().getNumberOutboundMessages());\n }\n this.recorder.record(step);\n}\n"
|
"public Object evaluate(ScriptContext scriptContext, ICompiledScript compiledScript) throws BirtException {\n assert (compiledScript instanceof CompiledJavascript);\n try {\n Script script = ((CompiledJavascript) compiledScript).getCompiledScript();\n Object value = script.exec(context, getJSScope(scriptContext));\n return jsToJava(value);\n } catch (JavaScriptException e) {\n throw new BirtException(e.getLocalizedMessage());\n }\n}\n"
|
"private JSONObject getOembedData(URL url) {\n BufferedReader bufferedReader;\n try {\n bufferedReader = new BufferedReader(new InputStreamReader(url.openStream()));\n StringBuffer stringBuffer = new StringBuffer();\n String eachLine = null;\n while ((eachLine = bufferedReader.readLine()) != null) {\n stringBuffer.append(eachLine);\n }\n bufferedReader.close();\n return new JSONObject(stringBuffer.toString());\n } catch (JSONException e) {\n LOG.warn(\"String_Node_Str\", e);\n return null;\n } catch (IOException e) {\n log.warn(\"String_Node_Str\", e);\n return null;\n }\n}\n"
|
"public static ICubeQueryDefinition load(String queryResultID, DataEngineContext context) throws DataException, IOException {\n DataInputStream dis = null;\n IDocArchiveReader reader = context.getDocReader();\n int version;\n if (context.hasInStream(null, null, DataEngineContext.VERSION_INFO_STREAM) == false) {\n version = 0;\n } else {\n StreamManager manager = new StreamManager(context, new QueryResultInfo(queryResultID, null, 0));\n version = manager.getVersion();\n }\n try {\n if (reader.exists(queryResultID + \"String_Node_Str\")) {\n RAInputStream inputStream = reader.getStream(queryResultID + \"String_Node_Str\");\n DataInputStream stream = new DataInputStream(inputStream);\n version = IOUtil.readInt(stream);\n }\n RAInputStream inputStream = reader.getStream(queryResultID + STREAM_FLAG);\n dis = new DataInputStream(inputStream);\n String name = IOUtil.readString(dis);\n ICubeQueryDefinition cqd = new CubeQueryDefinition(name);\n cqd.setCacheQueryResults(IOUtil.readBool(dis));\n cqd.setFilterOption(IOUtil.readInt(dis));\n loadBindings(dis, cqd, version);\n loadFilters(dis, cqd);\n loadSortDefns(dis, cqd);\n loadMeasures(dis, cqd);\n loadComputedMeasures(dis, cqd);\n loadCalculatedMeasures(dis, cqd, version);\n loadEdges(dis, cqd);\n loadCubeOperations(dis, cqd, version);\n return cqd;\n } finally {\n if (dis != null) {\n dis.close();\n }\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.