content
stringlengths 40
137k
|
---|
"public void update() {\n if (mAudioPlayerControl != null) {\n if (mAudioPlayerControl.hasMedia()) {\n this.setVisibility(LinearLayout.VISIBLE);\n } else {\n this.setVisibility(LinearLayout.GONE);\n return;\n }\n if (!mAudioPlayerControl.getTitle().equals(lastTitle)) {\n Bitmap cover = mAudioPlayerControl.getCover();\n if (cover != null) {\n mCover.setVisibility(ImageView.VISIBLE);\n mCover.setImageBitmap(cover);\n } else {\n mCover.setVisibility(ImageView.GONE);\n }\n }\n mTitle.setText(mAudioPlayerControl.getTitle());\n mArtist.setText(mAudioPlayerControl.getArtist());\n if (mAudioPlayerControl.isPlaying()) {\n mPlayPause.setImageResource(R.drawable.ic_pause);\n } else {\n mPlayPause.setImageResource(R.drawable.ic_play);\n }\n if (mAudioPlayerControl.hasNext())\n mForward.setVisibility(ImageButton.VISIBLE);\n else\n mForward.setVisibility(ImageButton.INVISIBLE);\n if (mAudioPlayerControl.hasPrevious())\n mBackward.setVisibility(ImageButton.VISIBLE);\n else\n mBackward.setVisibility(ImageButton.INVISIBLE);\n int time = (int) mAudioPlayerControl.getTime();\n int length = (int) mAudioPlayerControl.getLength();\n mSeekbar.setMax(length);\n mSeekbar.setProgress(time);\n }\n}\n"
|
"public void testGetPersistenceUnitUtilOnCloseEMF() {\n EntityManagerFactory emf = getEntityManagerFactory();\n emf.close();\n try {\n emf.getPersistenceUnitUtil();\n fail(\"String_Node_Str\");\n } catch (IllegalStateException e) {\n }\n}\n"
|
"public static void onTickInGame() {\n if (FMLCommonHandler.instance() == null || FMLCommonHandler.instance().getMinecraftServerInstance() == null) {\n return;\n }\n World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0);\n if (world != null && lastWorld != world) {\n lastWorld = world;\n }\n if (world != null) {\n if (world.getTotalWorldTime() % ConfigMisc.Misc_AutoDataSaveIntervalInTicks == 0) {\n Weather.writeOutData(false);\n }\n }\n World[] worlds = DimensionManager.getWorlds();\n for (int i = 0; i < worlds.length; i++) {\n if (!lookupDimToWeatherMan.containsKey(worlds[i].provider.getDimension())) {\n if (WeatherUtilConfig.listDimensionsWeather.contains(worlds[i].provider.getDimension())) {\n addWorldToWeather(worlds[i].provider.getDimension());\n }\n }\n WeatherManagerServer wms = lookupDimToWeatherMan.get(worlds[i].provider.getDimension());\n if (wms != null) {\n lookupDimToWeatherMan.get(worlds[i].provider.getDimension()).tick();\n }\n }\n boolean testRainRequest = false;\n if (testRainRequest) {\n List<IMCMessage> listMsgs = new ArrayList<IMCMessage>();\n listMsgs = FMLInterModComms.fetchRuntimeMessages(Weather.modID);\n for (int i = 0; i < listMsgs.size(); i++) {\n if (listMsgs.get(i).key.equals(\"String_Node_Str\")) {\n NBTTagCompound nbt = listMsgs.get(i).getNBTValue();\n String replyMod = nbt.getString(\"String_Node_Str\");\n nbt.setBoolean(\"String_Node_Str\", true);\n FMLInterModComms.sendRuntimeMessage(replyMod, replyMod, \"String_Node_Str\", nbt);\n }\n }\n }\n boolean debugIMC = false;\n if (debugIMC) {\n try {\n List<IMCMessage> listMsgs = new ArrayList<IMCMessage>();\n listMsgs = FMLInterModComms.fetchRuntimeMessages(Weather.modID);\n for (int i = 0; i < listMsgs.size(); i++) {\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n boolean testCustomLightning = false;\n if (testCustomLightning) {\n if (world.getTotalWorldTime() % 20 == 0) {\n EntityPlayer player = world.getClosestPlayer(0, 0, 0, -1, false);\n if (player != null) {\n EntityLightningBoltCustom lightning = new EntityLightningBoltCustom(world, player.posX, player.posY, player.posZ);\n world.addWeatherEffect(lightning);\n lookupDimToWeatherMan.get(0).syncLightningNew(lightning, true);\n }\n }\n }\n boolean derp = false;\n if (derp) {\n if (world.getTotalWorldTime() % 2 == 0) {\n EntityPlayer player = world.getClosestPlayer(0, 0, 0, -1, false);\n if (player != null) {\n ItemStack is = player.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND);\n if (is != null && is.getItem() instanceof ItemSpade) {\n int y = world.getHeight(new BlockPos(player.posX, 0, player.posZ)).getY();\n System.out.println(\"String_Node_Str\" + y);\n WeatherUtilBlock.fillAgainstWallSmoothly(player.worldObj, new Vec3(player.posX, y + 0.5D, player.posZ), player.rotationYawHead, 15, 2, CommonProxy.blockSandLayer);\n }\n }\n }\n }\n}\n"
|
"protected void changeObject() {\n Employee employee = (Employee) this.workingCopy;\n employee.setNormalHours(new java.sql.Time[2]);\n employee.setStartTime(Helper.timeFromHourMinuteSecond(1, 1, 1));\n employee.setEndTime(Helper.timeFromHourMinuteSecond(1, 1, 1));\n employee.setPeriod(new EmploymentPeriod(Helper.dateFromYearMonthDate(2001, 1, 1), Helper.dateFromYearMonthDate(2002, 2, 2)));\n employee.setPhoneNumbers(new Vector());\n employee.addPhoneNumber(new PhoneNumber(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n employee.addPhoneNumber(new PhoneNumber(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n employee.setProjects(new Vector());\n employee.addProject((Project) getUnitOfWork().readObject(SmallProject.class));\n employee.addProject((Project) getUnitOfWork().readObject(LargeProject.class));\n employee.setResponsibilitiesList(new Vector());\n employee.addResponsibility(\"String_Node_Str\");\n employee.addResponsibility(\"String_Node_Str\");\n employee.setAddress(new EmployeePopulator().addressExample12());\n Vector employees = getUnitOfWork().readAllObjects(Employee.class);\n Employee manager = null;\n for (int i = 0; i < employees.size(); i++) {\n manager = (Employee) employees.elementAt(i);\n if (!manager.getId().equals(employee.getId())) {\n break;\n }\n }\n employee.setManager(manager);\n}\n"
|
"public void index(String index, String type, String id, String json) throws IOException {\n logger.debug(\"String_Node_Str\", index, type, id);\n StringEntity entity = new StringEntity(json, StandardCharsets.UTF_8);\n Response restResponse = client.performRequest(\"String_Node_Str\", \"String_Node_Str\" + index + \"String_Node_Str\" + type + \"String_Node_Str\" + id, Collections.emptyMap(), entity);\n Map<String, Object> responseAsMap = JsonUtil.asMap(restResponse);\n logger.trace(\"String_Node_Str\", responseAsMap);\n}\n"
|
"public void resolve(MarkerList markers, IContext context) {\n this.arguments.resolve(markers, context);\n IClass theClass = this.type.getTheClass();\n if (theClass == null) {\n return;\n }\n int count = theClass.parameterCount();\n for (int i = 0; i < count; i++) {\n IParameter param = theClass.getParameter(i);\n IType type = param.getType();\n IValue value = this.arguments.getValue(i, param);\n if (value == null) {\n if (param.getValue() == null) {\n markers.add(this.position, \"String_Node_Str\", this.type, param.getName());\n }\n continue;\n }\n IValue value1 = value.withType(type, type, markers, context);\n if (value1 == null) {\n Util.createTypeError(markers, value, type, type, \"String_Node_Str\", param.getName());\n continue;\n }\n value1 = Util.constant(value1, markers);\n if (value1 != value) {\n this.arguments.setValue(i, param, value1);\n }\n }\n}\n"
|
"public org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent();\n copyElement(src, tgt);\n tgt.setCode(src.getCode());\n tgt.setDisplay(src.getDisplay());\n for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t));\n return tgt;\n}\n"
|
"private String stripPrefix(String key) {\n String stripped = key;\n if (S3FileChooserDialog.prefix.trim().length() > 0) {\n int prefixLength = S3FileChooserDialog.prefix.length() - 1;\n stripped = key.substring(prefixLength, key.length());\n int firstSlash = stripped.indexOf(\"String_Node_Str\");\n if (firstSlash == 0) {\n stripped = stripped.substring(1, stripped.length());\n }\n }\n return stripped;\n}\n"
|
"public double getZ() {\n return (double) pos.getZ() + 0.5D;\n}\n"
|
"public void load(InputStream is) throws IOException {\n DataInputStream dis = new DataInputStream(is);\n size = dis.readInt();\n size0 = dis.readInt();\n node1pos = dis.readInt();\n node2pos = dis.readInt();\n node3pos = dis.readInt();\n int vectorSize = dis.readInt();\n vector = new byte[vectorSize];\n dis.read(vector, 0, vectorSize);\n int blockSize = CACHE_WIDTH / 8;\n int size = vectorSize / blockSize + (((vectorSize % blockSize) != 0) ? 1 : 0);\n countCache0 = new int[size];\n for (int i = 0; i < size; i++) {\n countCache0[i] = dis.readInt();\n }\n indexCache0 = new int[size + 1];\n for (int i = 0; i < size + 1; i++) {\n indexCache0[i] = dis.readInt();\n }\n}\n"
|
"private void doInclude(ServletRequest request, ServletResponse response) throws ServletException, IOException {\n State state = new State(request, response, DispatcherType.INCLUDE);\n wrapResponse(state);\n if (name != null) {\n ApplicationHttpRequest wrequest = (ApplicationHttpRequest) wrapRequest(state);\n wrequest.setAttribute(Globals.NAMED_DISPATCHER_ATTR, name);\n if (servletPath != null)\n wrequest.setServletPath(servletPath);\n wrequest.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, getCombinedPath());\n try {\n invoke(state.outerRequest, state.outerResponse, state);\n } finally {\n wrequest.recycle();\n unwrapRequest(state);\n unwrapResponse(state);\n }\n } else {\n ApplicationHttpRequest wrequest = wrapRequest(state);\n wrequest.initSpecialAttributes(requestURI, context.getPath(), servletPath, pathInfo, queryString);\n wrequest.setQueryParams(queryString);\n wrequest.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, getCombinedPath());\n try {\n invoke(state.outerRequest, state.outerResponse, state);\n } finally {\n wrequest.recycle();\n unwrapRequest(state);\n unwrapResponse(state);\n }\n }\n}\n"
|
"public void updateServerSide() {\n if (inventory.getStackInSlot(SLOT_INPUT) != null) {\n FluidContainerData container = LiquidHelper.getLiquidContainer(inventory.getStackInSlot(SLOT_INPUT));\n if (container != null && RecipeManager.isLiquidResource(container.fluid)) {\n inventory.setInventorySlotContents(SLOT_INPUT, StackUtils.replenishByContainer(this, inventory.getStackInSlot(SLOT_INPUT), container, resourceTank));\n if (inventory.getStackInSlot(SLOT_INPUT).stackSize <= 0)\n inventory.setInventorySlotContents(SLOT_INPUT, null);\n }\n }\n if (inventory.getStackInSlot(SLOT_CAN_INPUT) != null) {\n FluidContainerData container = LiquidHelper.getEmptyContainer(inventory.getStackInSlot(SLOT_CAN_INPUT), productTank.getFluid());\n if (container != null) {\n inventory.setInventorySlotContents(SLOT_CAN_OUTPUT, bottleIntoContainer(inventory.getStackInSlot(SLOT_CAN_INPUT), inventory.getStackInSlot(SLOT_CAN_OUTPUT), container, productTank));\n if (inventory.getStackInSlot(SLOT_CAN_INPUT).stackSize <= 0)\n inventory.setInventorySlotContents(SLOT_CAN_INPUT, null);\n }\n }\n if (worldObj.getTotalWorldTime() % 20 * 10 != 0)\n return;\n if (RecipeManager.findMatchingRecipe(inventory.getStackInSlot(SLOT_RESOURCE), resourceTank.getFluid()) != null) {\n if (resourceTank.getFluidAmount() < fuelCurrentFerment)\n setErrorState(EnumErrorCode.NORESOURCE);\n else\n setErrorState(EnumErrorCode.OK);\n } else if (inventory.getStackInSlot(SLOT_FUEL) == null && fuelBurnTime <= 0)\n setErrorState(EnumErrorCode.NOFUEL);\n else if (energyManager.getTotalEnergyStored() == 0)\n setErrorState(EnumErrorCode.NOPOWER);\n else\n setErrorState(EnumErrorCode.NORECIPE);\n}\n"
|
"public void handleNoneRedoResponse(Packet packet) {\n if (request.operation == ClusterOperation.BLOCKING_QUEUE_POLL && packet.responseType == Constants.ResponseTypes.RESPONSE_SUCCESS) {\n if (!zeroBackup) {\n if (getPreviousMemberBefore(thisAddress, true, 1).getAddress().equals(packet.conn.getEndPoint())) {\n if (packet.getValueData() != null) {\n Q q = getQ(packet.name);\n q.doBackup(false, null, request.blockId, (int) packet.longValue);\n }\n }\n }\n }\n super.handleNoneRedoResponse(packet);\n}\n"
|
"public void execute() {\n boolean modified = false;\n if (modelManager.getContextManager() != null) {\n originalName = param.getName();\n for (IContext context : modelManager.getContextManager().getListContext()) {\n for (IContextParameter contextParameter : context.getContextParameterList()) {\n String tempSourceId = contextParameter.getSource();\n if (originalName.equals(contextParameter.getName()) && tempSourceId.equals(sourceId)) {\n contextParameter.setName(newName);\n if (contextParameter.getPrompt().equals(originalName + \"String_Node_Str\")) {\n contextParameter.setPrompt(newName + \"String_Node_Str\");\n }\n modified = true;\n }\n }\n }\n param.setName(newName);\n if (param.getPrompt().equals(originalName + \"String_Node_Str\")) {\n param.setPrompt(newName + \"String_Node_Str\");\n }\n }\n if (modified) {\n updateRelation(originalName, newName);\n }\n}\n"
|
"public static void main(String[] args) throws IOException {\n Logger.getRootLogger().setLevel(Level.WARN);\n if (!dbpediaFile.exists() || regenerateFile) {\n createDBpediaFile();\n }\n for (POIClass poiClass : POIClass.values()) {\n matchPerClass.put(poiClass, 0);\n noMatchPerClass.put(poiClass, 0);\n }\n Files.clearFile(matchingFile);\n Files.clearFile(missesFile);\n FileOutputStream fos = new FileOutputStream(matchingFile, true);\n FileOutputStream fosMiss = new FileOutputStream(missesFile, true);\n BufferedReader br = new BufferedReader(new FileReader(dbpediaFile));\n String line;\n int itemCount = 0;\n URI uri = null;\n String label = null;\n String[] classes = null;\n int decimalCount = 0;\n Double geoLat = null;\n Double geoLong = null;\n startDate = new Date();\n System.out.println(\"String_Node_Str\" + startDate);\n while ((line = br.readLine()) != null) {\n if (line.isEmpty()) {\n DBpediaPoint dp = new DBpediaPoint(uri, label, classes, geoLat, geoLong, decimalCount);\n POIClass poiClass = dp.getPoiClass();\n if (poiClass != null) {\n URI matchURI = findGeoDataMatch(dp);\n if (matchURI == null) {\n String missStr = dp.toString() + \"String_Node_Str\";\n fosMiss.write(missStr.getBytes());\n noMatchPerClass.put(poiClass, noMatchPerClass.get(poiClass) + 1);\n } else {\n String matchStr = \"String_Node_Str\" + dp.getUri() + \"String_Node_Str\" + matchURI + \"String_Node_Str\";\n fos.write(matchStr.getBytes());\n matches++;\n matchPerClass.put(poiClass, matchPerClass.get(poiClass) + 1);\n }\n counter++;\n if (counter % 1000 == 0) {\n printSummary();\n }\n } else {\n skipCount++;\n }\n itemCount = 0;\n } else {\n switch(itemCount) {\n case 0:\n uri = URI.create(line);\n break;\n case 1:\n label = line;\n break;\n case 2:\n line = line.substring(1, line.length() - 1);\n if (line.length() > 1) {\n classes = line.split(\"String_Node_Str\");\n } else {\n classes = new String[0];\n }\n break;\n case 3:\n geoLat = new Double(line);\n if (geoLat.toString().contains(\"String_Node_Str\")) {\n geoLat = 0.0;\n }\n decimalCount = 0;\n String[] tmp = line.split(\"String_Node_Str\");\n if (tmp.length == 2) {\n decimalCount = tmp[1].length();\n }\n break;\n case 4:\n geoLong = new Double(line);\n if (geoLong.toString().contains(\"String_Node_Str\")) {\n geoLong = 0.0;\n }\n }\n itemCount++;\n }\n }\n br.close();\n fos.close();\n printSummary();\n System.out.println(\"String_Node_Str\");\n}\n"
|
"public void setServerVmOptions(String aValue) {\n String oldValue = getRunServerVmOptions();\n if (aValue != null) {\n projectPrivateProperties.setProperty(RUN_SERVER_VM_OPTIONS_KEY, aValue);\n } else {\n projectPrivateProperties.remove(RUN_SERVER_VM_OPTIONS_KEY);\n }\n projectPrivatePropertiesIsDirty = true;\n changeSupport.firePropertyChange(RUN_SERVER_VM_OPTIONS_KEY, oldValue, aValue);\n}\n"
|
"public List handleFindByRange(EntityMetadata m, Client client, List result, Map<Boolean, List<IndexClause>> ixClause, boolean isRowKeyQuery) {\n List<IndexExpression> expressions = ixClause.get(isRowKeyQuery).get(0).getExpressions();\n if (expressions == null) {\n return null;\n }\n byte[] minValue = null;\n byte[] maxVal = null;\n if (expressions.size() == 1) {\n IndexOperator operator = expressions.get(0).op;\n if (operator.equals(IndexOperator.LTE)) {\n maxVal = expressions.get(0) != null ? expressions.get(0).getValue() : null;\n minValue = null;\n } else {\n minValue = expressions.get(0) != null ? expressions.get(0).getValue() : null;\n maxVal = null;\n }\n } else {\n minValue = expressions.get(0) != null ? expressions.get(0).getValue() : null;\n maxVal = expressions.size() > 1 && expressions.get(1) != null ? expressions.get(1).getValue() : null;\n }\n try {\n result = ((CassandraClientBase) client).findByRange(minValue, maxVal, m, m.getRelationNames() != null && !m.getRelationNames().isEmpty(), m.getRelationNames());\n } catch (Exception e) {\n log.error(\"String_Node_Str\" + e.getMessage());\n throw new QueryHandlerException(e);\n }\n return result;\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n String username = prefs.getString(\"String_Node_Str\", null);\n String password = prefs.getString(\"String_Node_Str\", null);\n djangoTalk.setAuth(username, password);\n List<GeoCamTalkMessage> talkMessages = djangoTalk.getTalkMessages();\n if (talkMessages != null) {\n adapter.setTalkMessages(talkMessages);\n talkListView.setAdapter(adapter);\n } else {\n Toast.makeText(this.getApplicationContext(), \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n }\n}\n"
|
"public void should_getStatus_correctly() {\n Timestamps timestamps = new Timestamps().invoke();\n GetStatusResponse1 status = webappService.getStatus();\n assertThat(status.getPricePlan(), is(\"String_Node_Str\"));\n assertThat(status.getCollectionResolutionSeconds(), is(PricePlan.DEMO.getPublishIntervalSeconds()));\n assertThat(status.getMaxNumberOfAgents(), is(PricePlan.DEMO.getMaxNumberOfAgents()));\n assertThat(status.getMaxCollectionPeriodDays(), is(-1));\n assertThat(status.getMaxNumberOfMethods(), is(PricePlan.DEMO.getMaxMethods()));\n assertThat(status.getNumAgents(), is(4));\n assertThat(status.getNumLiveAgents(), is(2));\n assertThat(status.getNumLiveEnabledAgents(), is(1));\n assertThat(status.getAgents().get(0), is(AgentDescriptor1.builder().agentAlive(true).agentLiveAndEnabled(true).agentVersion(\"String_Node_Str\").appName(\"String_Node_Str\").appVersion(\"String_Node_Str\").environment(\"String_Node_Str\").excludePackages(\"String_Node_Str\").id(1L).methodVisibility(\"String_Node_Str\").nextPollExpectedAtMillis(cutMillis(inOneMinute)).nextPublicationExpectedAtMillis(cutMillis(inOneMinutePlusPublishingInterval)).packages(\"String_Node_Str\").pollReceivedAtMillis(cutMillis(tenMinutesAgo)).publishedAtMillis(cutMillis(oneMinuteAgo)).startedAtMillis(cutMillis(moreThanThreeDaysAgo)).tags(\"String_Node_Str\").build()));\n assertThat(status.getNumMethods(), is(10));\n assertThat(status.getCollectedSinceMillis(), is(cutMillis(moreThanThreeDaysAgo)));\n assertThat(status.getCollectedDays(), is(3));\n assertThat(status.getUsers(), hasSize(2));\n}\n"
|
"public Expression visitEntity_type_literal(JPQLSelectExpressionParser.Entity_type_literalContext ctx) {\n return new LiteralExpression(\"String_Node_Str\", ctx.identifier().getText());\n}\n"
|
"public static boolean isSupportedImageFile(String lcasefn) {\n return lcasefn.endsWith(Constants.FILE_EXTENSION_JPG) || lcasefn.endsWith(Constants.FILE_EXTENSION_GIF) || lcasefn.endsWith(Constants.FILE_EXTENSION_EPS) || lcasefn.endsWith(Constants.FILE_EXTENSION_JPEG) || lcasefn.endsWith(Constants.FILE_EXTENSION_PNG) || lcasefn.endsWith(Constants.FILE_EXTENSION_SVG) || lcasefn.endsWith(Constants.FILE_EXTENSION_TIFF) || lcasefn.endsWith(Constants.FILE_EXTENSION_TIF);\n}\n"
|
"private void copyDatabase(SQLiteDatabase db) {\n String copyFrom = db.getPath();\n String copyTo = WordPress.getContext().getExternalFilesDir(null).getAbsolutePath() + \"String_Node_Str\" + DB_NAME;\n try {\n InputStream input = new FileInputStream(copyFrom);\n OutputStream output = new FileOutputStream(copyTo);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = input.read(buffer)) > 0) {\n output.write(buffer, 0, length);\n }\n output.flush();\n output.close();\n input.close();\n } catch (IOException e) {\n AppLog.e(T.DB, \"String_Node_Str\", e);\n }\n}\n"
|
"private StructRowKey entrySerializationRowKey() {\n final StructRowKey singleEntryRowKey = new StructBuilder().add(new VariableLengthByteArrayRowKey()).add(new FixedByteArrayRowKey(SCHEMA_ID_BYTE_LENGTH)).add(new VariableLengthByteArrayRowKey()).toRowKey();\n singleEntryRowKey.setTermination(Termination.MUST);\n return singleEntryRowKey;\n}\n"
|
"public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n if (bundle != null) {\n Object[] pdus = (Object[]) bundle.get(\"String_Node_Str\");\n final SmsMessage[] messages = new SmsMessage[pdus.length];\n for (int i = 0; i < pdus.length; i++) {\n messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);\n }\n if (messages.length > -1) {\n String address = messages[0].getOriginatingAddress();\n if (Prephase3Activity.dba.isTrustedContact((address))) {\n Toast.makeText(context, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n Toast.makeText(context, messages[0].getMessageBody(), Toast.LENGTH_LONG).show();\n try {\n Prephase3Activity.sendToSelf(context, messages[0].getOriginatingAddress(), messages[0].getMessageBody(), Prephase3Activity.INBOX);\n String secretMessage = Encryption.aes_decrypt(trustedContact.getPublicKey(), messages[0].getMessageBody());\n Prephase3Activity.sendToSelf(context, messages[0].getOriginatingAddress(), secretMessage, Prephase3Activity.INBOX);\n Prephase3Activity.updateList(context);\n Toast.makeText(context, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Toast.makeText(context, \"String_Node_Str\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n } else {\n Toast.makeText(context, \"String_Node_Str\", Toast.LENGTH_LONG).show();\n Toast.makeText(context, messages[0].getMessageBody(), Toast.LENGTH_LONG).show();\n Prephase3Activity.sendToSelf(context, messages[0].getOriginatingAddress(), messages[0].getMessageBody(), Prephase3Activity.INBOX);\n }\n }\n }\n this.abortBroadcast();\n}\n"
|
"public PFont createFont(String name, float size, boolean smooth, char[] charset) {\n String lowerName = name.toLowerCase();\n Typeface baseFont = null;\n if (lowerName.endsWith(\"String_Node_Str\") || lowerName.endsWith(\"String_Node_Str\")) {\n AssetManager assets = activity.getAssets();\n baseFont = Typeface.createFromAsset(assets, name);\n } else {\n baseFont = (Typeface) PFont.findNative(name);\n }\n return new PFont(baseFont, round(size), smooth, charset);\n}\n"
|
"public void filter(ContainerRequestContext incomingRequestContext, ContainerResponseContext outgoingResponseContext) throws IOException {\n String methodName = \"String_Node_Str\";\n Boolean skipped = (Boolean) incomingRequestContext.getProperty(OpentracingContainerFilter.SERVER_SPAN_SKIPPED_ID);\n if (skipped != null && skipped) {\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, methodName + \"String_Node_Str\");\n }\n incomingRequestContext.removeProperty(OpentracingContainerFilter.SERVER_SPAN_SKIPPED_ID);\n return;\n }\n ActiveSpan activeSpan = (ActiveSpan) incomingRequestContext.getProperty(OpentracingContainerFilter.SERVER_SPAN_PROP_ID);\n if (activeSpan == null) {\n Tr.error(tc, \"String_Node_Str\");\n return;\n } else {\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, methodName + \"String_Node_Str\", incomingSpan);\n }\n }\n try {\n Integer httpStatus = Integer.valueOf(outgoingResponseContext.getStatus());\n if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {\n Tr.debug(tc, methodName + \"String_Node_Str\", httpStatus);\n }\n incomingSpan.setTag(Tags.HTTP_STATUS.getKey(), httpStatus);\n if (outgoingResponseContext.getStatus() >= 400) {\n MultivaluedMap<String, Object> headers = outgoingResponseContext.getHeaders();\n Throwable exception = (Throwable) headers.getFirst(EXCEPTION_KEY);\n if (exception != null) {\n headers.remove(EXCEPTION_KEY);\n }\n OpentracingService.addSpanErrorInfo(incomingSpan, exception);\n }\n } finally {\n incomingSpan.finish();\n incomingRequestContext.removeProperty(OpentracingContainerFilter.SERVER_SPAN_PROP_ID);\n }\n}\n"
|
"public void execute() {\n if (!launcherPomFile.exists()) {\n return;\n }\n if (getGoals().contains(TalendMavenConstants.GOAL_PACKAGE)) {\n try {\n MavenModelManager mavenModelManager = MavenPlugin.getMavenModelManager();\n Model model;\n model = mavenModelManager.readMavenModel(launcherPomFile);\n model.getDependencies().clear();\n if (launcherPomFile.exists()) {\n launcherPomFile.delete(true, null);\n }\n MavenPlugin.getMavenModelManager().createMavenModel(launcherPomFile, model);\n } catch (CoreException e) {\n ExceptionHandler.process(e);\n }\n }\n if (!TalendMavenConstants.POM_FILE_NAME.equals(launcherPomFile.getName())) {\n return;\n }\n super.execute(monitor);\n}\n"
|
"public void testIsUserRegionBundleLong() {\n Assert.assertTrue(this.testRegionHook.isUserRegionBundle(getBundleId(SYSTEM_BUNDLE_INDEX)));\n Assert.assertFalse(this.testRegionHook.isUserRegionBundle(getBundleId(KERNEL_BUNDLE_INDEX)));\n Assert.assertTrue(this.testRegionHook.isUserRegionBundle(getBundleId(USER_REGION_BUNDLE_INDEX)));\n}\n"
|
"private void onParameterChanged(int row) {\n if (editingProcessor != null) {\n String key = parametersTableModel.getValueAt(row, 0).toString();\n Object value = parametersTableModel.getValueAt(row, 1);\n if (value instanceof Color) {\n selectedProcessor.getColors().put(key.substring(colorParamPrefix.length(), key.length()), (Color) value);\n setChartColors();\n } else {\n try {\n updatePresetParameters(selectedProcessor, Collections.<String, Object>singletonMap(key, value.toString()));\n updatePresetEdited(true);\n } catch (Exception e) {\n e.printStackTrace();\n setStatus(\"String_Node_Str\" + e);\n }\n parametersTableModel.removeTableModelListener(parameterChangedListener);\n showProcessorParameters();\n parametersTableModel.addTableModelListener(parameterChangedListener);\n parametersTable.addRowSelectionInterval(row, row);\n processFile();\n }\n }\n}\n"
|
"final private JsonPrimitive JsonNumber() throws ParseException {\n String intpart = null, fracpart = null, exppart = null;\n intpart = JsonInt();\n switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {\n case 27:\n fracpart = JsonFrac();\n break;\n default:\n jj_la1[7] = jj_gen;\n ;\n }\n switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {\n case E:\n exppart = JsonExp();\n break;\n default:\n jj_la1[8] = jj_gen;\n ;\n }\n Number n;\n if (exppart != null) {\n n = new BigDecimal(intpart + fracpart + exppart);\n } else if (fracpart != null) {\n n = new Double(intpart + fracpart);\n } else {\n if (intpart.length() < 10) {\n n = new Integer(intpart);\n } else if (intpart.length() < 19) {\n n = new Long(intpart);\n } else {\n n = new BigInteger(intpart);\n }\n }\n {\n if (true)\n return new JsonPrimitive(n);\n }\n throw new Error(\"String_Node_Str\");\n}\n"
|
"public void process(T object, ResultSet resultSet) throws SQLException {\n String value = resultSet.getString(name);\n if (value != null) {\n try {\n method.invoke(object, Context.getObjectMapper().readValue(value, parameterType));\n } catch (InvocationTargetException | IllegalAccessException | IOException error) {\n Log.warning(error);\n }\n }\n}\n"
|
"private Property getLeftmostProp(QualifiedName qname) {\n String pname = qname.getLeftmostName();\n Property p = props.get(pname);\n if (p != null) {\n return p;\n }\n if (this.ns != null) {\n p = this.ns.getNsProp(pname);\n if (p != null) {\n return p;\n }\n }\n return this.nominalType.getProp(pname);\n}\n"
|
"public boolean onInterceptTouchEvent(MotionEvent ev) {\n switch(ev.getActionMasked()) {\n case MotionEvent.ACTION_DOWN:\n if (DEBUG_EDGE_SWIPE)\n Log.d(TAG, \"String_Node_Str\" + ev.getY());\n mFirstX = ev.getX();\n mFirstY = ev.getY();\n mConsuming = false;\n break;\n case MotionEvent.ACTION_MOVE:\n if (DEBUG_EDGE_SWIPE)\n Log.d(TAG, \"String_Node_Str\" + ev.getY());\n final float dY = ev.getY() - mFirstY;\n final float daX = Math.abs(ev.getX() - mFirstX);\n final float daY = Math.abs(dY);\n if (!mConsuming && daX < daY && daY > mTouchSlop) {\n if (dY > 0) {\n if (DEBUG_EDGE_SWIPE)\n Log.d(TAG, \"String_Node_Str\");\n mBar.animateExpandNotificationsPanel();\n }\n if (dY < 0) {\n if (DEBUG_EDGE_SWIPE)\n Log.d(TAG, \"String_Node_Str\");\n mBar.onHeadsUpDismissed();\n }\n mConsuming = true;\n }\n break;\n case MotionEvent.ACTION_UP:\n case MotionEvent.ACTION_CANCEL:\n if (DEBUG_EDGE_SWIPE)\n Log.d(TAG, \"String_Node_Str\");\n mConsuming = false;\n break;\n }\n return mConsuming;\n}\n"
|
"private void paintFullCurve(Graphics g, MeasureCollection m, int mSelect, int pf, Color color) {\n if (m.getNumberOfValues(mSelect) == 0) {\n return;\n }\n g.setColor(color);\n int height = getHeight();\n int n = m.getNumberOfValues(mSelect);\n int[] x = new int[n];\n int[] y = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = (int) (i * x_resolution);\n y[i] = (int) (height - (m.getValue(mSelect, i) / this.upper_y_value) * height);\n if (this.isStandardDeviationPainted && mSelect <= 6) {\n double std = m.getValue(mSelect + 7, i);\n int len = (int) ((std / this.upper_y_value) * height);\n paintStandardDeviation(g, len, x[i], y[i]);\n }\n }\n g.drawPolyline(x, y, n);\n}\n"
|
"public void actionPerformed(final ActionEvent e) {\n if (e.getSource() == btPreview) {\n dialogImage.setDistance((Integer) thresholdSpinner.getValue());\n dialogImage.setColorDistanceMode(modeByte);\n dialogImage.setColor(colorChooser.getColor().getRGB());\n bgim.add(dialogImage);\n bgim.clearCaptchaAll();\n bgim.remove(dialogImage);\n final Image image2 = bgim.getScaledCaptchaImage();\n new GuiRunnable<Object>() {\n public Object runSave() {\n bgv.image = image2;\n bgv.repaint();\n return null;\n }\n }.waitForEDT();\n } else if (e.getSource() == btColorChoose) {\n new GuiRunnable<Object>() {\n public Object runSave() {\n JDialog dialog = JColorChooser.createDialog(colorChooser, JDL.L(\"String_Node_Str\", \"String_Node_Str\"), true, colorChooser, null, null);\n dialog.setVisible(true);\n dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n return null;\n }\n }.waitForEDT();\n } else if (e.getSource() == btFinished) {\n bgim.add(dialogImage);\n new GuiRunnable<Object>() {\n public Object runSave() {\n dialog.dispose();\n return null;\n }\n }.waitForEDT();\n ret = dialogImage;\n } else if (e.getSource() == btLoadBackgroundImage) {\n File fch = JDFileChooser.getFile(JDFileChooser.ImagesOnly);\n File fout = new File(bgim.methode.file, \"String_Node_Str\" + JDHash.getMD5(fch) + \"String_Node_Str\" + JDIO.getFileExtension(fch));\n JDIO.copyFile(fch, fout);\n dialogImage = new BackGroundImage();\n dialogImage.setBackgroundImage(fout.getName());\n dialogImage.setColor(colorChooser.getColor().getRGB());\n dialogImage.setDistance((Integer) thresholdSpinner.getValue());\n dialogImage.setColorDistanceMode(modeByte);\n bgim.add(dialogImage);\n bgim.clearCaptchaAll();\n bgim.remove(dialogImage);\n btPreview.setEnabled(true);\n final Image image2 = bgim.getScaledCaptchaImage();\n new GuiRunnable<Object>() {\n public Object runSave() {\n bgv.image = image2;\n bgv.repaint();\n return null;\n }\n }.waitForEDT();\n } else if (e.getSource() == btCreateBackgroundFilter) {\n File fout = BackgroundFilterCreater.create(bgim.methode);\n if (fout != null && fout.exists()) {\n dialogImage = new BackGroundImage();\n dialogImage.setBackgroundImage(fout.getName());\n dialogImage.setColor(colorChooser.getColor().getRGB());\n dialogImage.setDistance((Integer) thresholdSpinner.getValue());\n dialogImage.setColorDistanceMode(colorMode);\n bgim.add(dialogImage);\n bgim.clearCaptchaAll();\n bgim.remove(dialogImage);\n btPreview.setEnabled(true);\n final Image image2 = bgim.getScaledCaptchaImage();\n new GuiRunnable<Object>() {\n\n public Object runSave() {\n bgv.image = image2;\n bgv.repaint();\n return null;\n }\n }.waitForEDT();\n } else if (e.getSource() == mode) {\n modeByte = ((ColorMode) mode.getSelectedItem()).mode;\n }\n}\n"
|
"public HearthTreeNode use_core(PlayerSide side, Minion targetMinion, HearthTreeNode boardState, Deck deckPlayer0, Deck deckPlayer1, boolean singleRealizationOnly) throws HSException {\n HearthTreeNode toRet = super.use_core(side, targetMinion, boardState, deckPlayer0, deckPlayer1, singleRealizationOnly);\n if (toRet != null) {\n int thisMinionIndex = toRet.data_.getMinions(side).indexOf(this);\n int numMinions = side.getPlayer(boardState).getNumMinions();\n if (numMinions > 1) {\n int minionToTheLeft = thisMinionIndex > 0 ? thisMinionIndex - 1 : -1;\n int minionToTheRight = thisMinionIndex < numMinions - 1 ? thisMinionIndex + 1 : -1;\n if (minionToTheLeft >= 0) {\n Minion minionToBuff = toRet.data_.getMinion(side, minionToTheLeft);\n minionToBuff.setAttack((byte) (minionToBuff.getAttack() + 1));\n minionToBuff.setHealth((byte) (minionToBuff.getHealth() + 1));\n minionToBuff.setTaunt(true);\n }\n if (minionToTheRight >= 0) {\n Minion minionToBuff = toRet.data_.getMinion(side, minionToTheRight);\n minionToBuff.setAttack((byte) (minionToBuff.getAttack() + 1));\n minionToBuff.setHealth((byte) (minionToBuff.getHealth() + 1));\n minionToBuff.setTaunt(true);\n }\n }\n }\n return toRet;\n}\n"
|
"public static OpenFilePart openPart(String fileName, long startOffSet, int maxSize, MessageType keyType, MessageType dataType, KryoMemorySerializer deserializer) {\n List<KeyValue> keyValues = new ArrayList<>();\n String outFileName = Paths.get(fileName).toString();\n FileChannel rwChannel;\n try {\n rwChannel = new RandomAccessFile(outFileName, \"String_Node_Str\").getChannel();\n long size = maxSize <= rwChannel.size() - startOffSet ? maxSize : rwChannel.size() - startOffSet;\n ByteBuffer os = rwChannel.map(FileChannel.MapMode.READ_ONLY, startOffSet, size);\n int totalRead = 0;\n while (totalRead < size) {\n Object key;\n Object value;\n int keySize = os.getInt();\n key = deserialize(keyType, deserializer, os, keySize);\n if (totalRead + keySize > size) {\n break;\n }\n int dataSize = os.getInt();\n value = deserialize(dataType, deserializer, os, dataSize);\n if (totalRead + keySize + dataSize > size) {\n break;\n }\n keyValues.add(new KeyValue(key, value));\n totalRead += 8 + keySize + dataSize;\n }\n rwChannel.close();\n return new OpenFilePart(keyValues, totalRead + (int) startOffSet, (int) rwChannel.size(), fileName);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"protected boolean playManaAbility(ManaAbility ability, Game game) {\n if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATE_ABILITY, ability.getId(), ability.getSourceId(), playerId))) {\n int bookmark = game.bookmarkState();\n if (ability.activate(game, false)) {\n if (ability.resolve(game)) {\n if (ability.isUndoPossible()) {\n if (storedBookmark == -1 || storedBookmark > bookmark) {\n setStoredBookmark(bookmark);\n }\n } else {\n resetStoredBookmark(game);\n }\n return true;\n }\n }\n game.restoreState(bookmark, ability.getRule());\n }\n return false;\n}\n"
|
"private boolean removeAllSessionsWithAppId(long appId) {\n synchronized (SESSION_LOCK) {\n if (sessionMap != null) {\n SparseArray<String> iter = sessionMap.clone();\n int size = iter.size();\n for (int i = 0; i < size; i++) {\n if (((Long) iter.valueAt(i)).compareTo(appId) == 0) {\n sessionHashIdMap.remove(iter.keyAt(i));\n sessionMap.removeAt(i);\n }\n }\n }\n }\n return false;\n}\n"
|
"public static boolean canChildBeDismissed(View v) {\n if (!(v instanceof ExpandableNotificationRow)) {\n return false;\n }\n final View veto = v.findViewById(R.id.veto);\n return (veto != null && veto.getVisibility() != View.GONE);\n}\n"
|
"public List<Project> findProjects() {\n List<Project> list = persistenceManager.find(Project.class, new NameValue(\"String_Node_Str\", 0), null, null, tableName(Project.class));\n AbstractObjectNameBasedSorter.sort(list);\n for (Project project : list) {\n project.setProjectVersions(findProjectVersionsByProject(project));\n }\n return list;\n}\n"
|
"private void calculateOthers() {\n if (params.ignoreOut) {\n v3 = v2;\n t3 = 0;\n a3 = 0;\n d3 = 0;\n t1 = (v2 - v1) / a1;\n t2 = time - t1;\n d2 = v2 * t2;\n d1 = distance - d2;\n d3 = 0;\n } else if (params.ignoreIn) {\n v1 = v2;\n a1 = 0;\n t1 = 0;\n d1 = 0;\n t3 = (v3 - v2) / a3;\n t2 = time - t3;\n d2 = v2 * t2;\n d3 = distance - d2;\n d3Calc = v2 * t3 + 0.5 * a3 * t3 * t3;\n } else {\n t1 = (v2 - v1) / a1;\n t3 = (v3 - v1 - a1 * t1) / a3;\n t2 = time - t3 - t1;\n d1 = v1 * t1 + 0.5 * a1 * t1 * t1;\n d2 = v2 * t2;\n d3 = distance - d1 - d2;\n d3Calc = v2 * t3 + 0.5 * a3 * t3 * t3;\n }\n}\n"
|
"public void pullEdge(AbstractEdge edge, AbstractNode source, AbstractNode target, MetaEdgeImpl metaEdge) {\n float edgeWeight = edge.getWeight();\n float metaWeight = metaEdge.getWeight();\n float div = 1f;\n if (source == metaEdge.getSource() || source == metaEdge.getTarget() || target == metaEdge.getTarget() || target == metaEdge.getSource()) {\n div = nonDeepDivisor;\n }\n metaWeight -= edgeWeight / div;\n if (metaWeight < weightMinimum) {\n metaWeight = weightMinimum;\n }\n metaEdge.setWeight(metaWeight);\n}\n"
|
"public boolean luaStackCall(LuaState vm) {\n switch(id) {\n case INSTALL:\n install(vm._G);\n break;\n case CONCAT:\n {\n int n = vm.gettop();\n LTable table = vm.totable(2);\n LString sep = (n >= 3 ? vm.tolstring(3) : null);\n int i = vm.tointeger(4);\n int j = vm.tointeger(5);\n int len = table.luaLength();\n if (i == 0)\n i = 1;\n if (j == 0)\n j = len;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try {\n for (int k = i; k <= j; k++) {\n LValue v = table.get(k);\n v.luaAsString().write(baos);\n if (k < j && sep != null)\n sep.write(baos);\n }\n vm.resettop();\n vm.pushlstring(baos.toByteArray());\n } catch (IOException e) {\n vm.error(e.getMessage());\n }\n break;\n }\n case INSERT:\n {\n int n = vm.gettop();\n LTable table = vm.totable(2);\n int pos = (n >= 4 ? vm.tointeger(3) : 0);\n LValue value = vm.topointer(-1);\n table.luaInsertPos(pos, value);\n break;\n }\n case MAXN:\n {\n LTable table = vm.totable(2);\n vm.resettop();\n vm.pushinteger(table.luaMaxN());\n break;\n }\n case REMOVE:\n {\n int n = vm.gettop();\n LTable table = vm.totable(2);\n int pos = (n >= 3 ? vm.tointeger(3) : 0);\n vm.resettop();\n vm.pushlvalue(table.luaRemovePos(pos));\n break;\n }\n case SORT:\n {\n LTable table = vm.totable(2);\n LValue compare = vm.topointer(3);\n table.luaSort(vm, compare);\n vm.resettop();\n break;\n }\n default:\n LuaState.vmerror(\"String_Node_Str\");\n }\n return false;\n}\n"
|
"public static String dateToStr(Date date) {\n return dateToStr(date, STANDARD_FORMAT_STR);\n}\n"
|
"public void handleMessage(Message msg) {\n Bundle bundle = msg.getData();\n final int numOfCards = bundle.getInt(\"String_Node_Str\");\n final String[] listOfWords = bundle.getStringArray(\"String_Node_Str\");\n final String[] listOfForeign = bundle.getStringArray(\"String_Node_Str\");\n final String[] listOfImageUrls = bundle.getStringArray(\"String_Node_Str\");\n final GridView gridview = (GridView) findViewById(R.id.currentCards);\n if (numOfCards > 0) {\n ThumbnailAdapter gridAdapter = new ThumbnailAdapter(Startup.this.getApplicationContext(), listOfThumbnailUrls, listOfWords, listOfForeign, numOfCards);\n gridview.setAdapter(gridAdapter);\n gridview.setOnItemClickListener(new OnItemClickListener() {\n\n public void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n Toast.makeText(Startup.this, \"String_Node_Str\" + position, Toast.LENGTH_SHORT).show();\n Intent myIntent = new Intent(Startup.this, ViewCard.class);\n myIntent.putExtra(\"String_Node_Str\", position);\n myIntent.putExtra(\"String_Node_Str\", numOfCards);\n for (int i = 0; i < numOfCards; i++) {\n myIntent.putExtra(\"String_Node_Str\" + i, listOfWords[i]);\n myIntent.putExtra(\"String_Node_Str\" + i, listOfForeign[i]);\n myIntent.putExtra(\"String_Node_Str\" + i, listOfImageUrls[i]);\n }\n startActivityForResult(myIntent, 0);\n }\n });\n}\n"
|
"public void finalizeSaleOrder(SaleOrder saleOrder) throws Exception {\n updateCustomerCreditLines(saleOrder);\n _finalizeSaleOrder(saleOrder);\n}\n"
|
"public void testInverseAndNestedJoin() throws Exception {\n if (getDialect() == SQLITE || getDialect() == CUBRID) {\n log.info(\"String_Node_Str\", \"String_Node_Str\");\n return;\n }\n Result<Record> result1 = create().select(TAuthor_ID(), TBook_ID(), TBookStore_NAME()).from(TAuthor().join(TBook()).on(TAuthor_ID().equal(TBook_AUTHOR_ID()))).join(TBookToBookStore().join(TBookStore()).on(TBookToBookStore_BOOK_STORE_NAME().equal(TBookStore_NAME()))).on(TBook_ID().equal(TBookToBookStore_BOOK_ID())).orderBy(TBook_ID(), TBookStore_NAME()).fetch();\n assertEquals(6, result1.size());\n assertEquals(asList(1, 1, 1, 2, 2, 2), result1.getValues(0));\n assertEquals(asList(1, 1, 2, 3, 3, 3), result1.getValues(1));\n assertEquals(asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), result1.getValues(2));\n Result<Record> result2 = create().select(TAuthor_ID(), TBook_ID(), TBookStore_NAME()).from(TAuthor().join(TBook()).on(TAuthor_ID().equal(TBook_AUTHOR_ID())), TBookToBookStore().join(TBookStore()).on(TBookToBookStore_BOOK_STORE_NAME().equal(TBookStore_NAME()))).where(TBook_ID().equal(TBookToBookStore_BOOK_ID())).orderBy(TBook_ID(), TBookStore_NAME()).fetch();\n assertEquals(6, result2.size());\n assertEquals(asList(1, 1, 1, 2, 2, 2), result2.getValues(0));\n assertEquals(asList(1, 1, 2, 3, 3, 3), result2.getValues(1));\n assertEquals(asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), result2.getValues(2));\n assertEquals(result1, result2);\n}\n"
|
"public ItemStack getOutcome(boolean isFixedDrops) {\n if (random.nextDouble() * 100.0D < percentage && material != null) {\n int dropAmount = isFixedDrops ? range.getMaximumInteger() : range.getMinimumInteger() + random.nextInt(Math.abs(range.getMaximumInteger() - range.getMinimumInteger() + 1));\n if (dropAmount > 0) {\n ItemStack itemStack;\n if (data == null && durability == null) {\n itemStack = new ItemStack(material, dropAmount);\n } else {\n MaterialData materialData = new MaterialData(material, data);\n itemStack = materialData.toItemStack(dropAmount);\n if (durability != null) {\n itemStack.setDurability(durability);\n }\n }\n itemStack.addEnchantments(ItemEnchantment.getOutcome(enchantments));\n if (itemStack.getAmount() > 0) {\n return itemStack;\n }\n }\n }\n return null;\n}\n"
|
"protected int executeCommand() throws CommandException, CommandValidationException {\n File serverDir = getServerDirs().getServerDir();\n if (serverDir == null || !serverDir.isDirectory())\n return noSuchInstance();\n if (getServerDirs().getLocalPassword() == null)\n return instanceNotRunning();\n String serverName = getServerDirs().getServerName();\n HostAndPort addr = getAdminAddress(serverName);\n programOpts.setHostAndPort(addr);\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + addr.toString());\n if (!isRunning())\n return instanceNotRunning();\n logger.finer(\"String_Node_Str\");\n return doRemoteCommand();\n}\n"
|
"public void randomizePokemonTypes(boolean evolutionSanity) {\n if (evolutionSanity) {\n Set<Pokemon> dontCopyPokes = RomFunctions.getBasicOrNoCopyPokemon(this);\n for (Pokemon pk : dontCopyPokes) {\n pk.primaryType = randomType();\n pk.secondaryType = null;\n if (pk.evolutionsFrom.size() == 1 && pk.evolutionsFrom.get(0).carryStats) {\n if (this.random.nextDouble() < 0.35) {\n pk.secondaryType = randomType();\n while (pk.secondaryType == pk.primaryType) {\n pk.secondaryType = randomType();\n }\n }\n } else {\n if (this.random.nextDouble() < 0.5) {\n pk.secondaryType = randomType();\n while (pk.secondaryType == pk.primaryType) {\n pk.secondaryType = randomType();\n }\n }\n }\n }\n Set<Pokemon> firstEvos = RomFunctions.getMiddleEvolutions(this);\n for (Pokemon pk : firstEvos) {\n Pokemon evolvedFrom = pk.evolutionsTo.get(0).from;\n pk.primaryType = evolvedFrom.primaryType;\n pk.secondaryType = evolvedFrom.secondaryType;\n if (pk.secondaryType == null) {\n if (this.random.nextDouble() < 0.15) {\n pk.secondaryType = randomType();\n while (pk.secondaryType == pk.primaryType) {\n pk.secondaryType = randomType();\n }\n }\n }\n }\n Set<Pokemon> secondEvos = RomFunctions.getFinalEvolutions(this);\n for (Pokemon pk : secondEvos) {\n Pokemon evolvedFrom = pk.evolutionsTo.get(0).from;\n pk.primaryType = evolvedFrom.primaryType;\n pk.secondaryType = evolvedFrom.secondaryType;\n if (pk.secondaryType == null) {\n if (this.random.nextDouble() < 0.25) {\n pk.secondaryType = randomType();\n while (pk.secondaryType == pk.primaryType) {\n pk.secondaryType = randomType();\n }\n }\n }\n }\n } else {\n List<Pokemon> allPokes = this.getPokemon();\n for (Pokemon pkmn : allPokes) {\n if (pkmn != null) {\n pkmn.primaryType = randomType();\n pkmn.secondaryType = null;\n if (this.random.nextDouble() < 0.5) {\n pkmn.secondaryType = randomType();\n while (pkmn.secondaryType == pkmn.primaryType) {\n pkmn.secondaryType = randomType();\n }\n }\n }\n }\n }\n}\n"
|
"public static List<Span> breakpointsToSpans(int start, List<Integer> breakpoints, int end) {\n List<Span> spans = new ArrayList<>();\n int curstart = start;\n for (int p : breakpoints) {\n spans.add(new Span(curstart, p));\n curstart = p;\n }\n spans.add(new Span(curstart, end));\n return spans;\n}\n"
|
"private void addBranchName(String branchName) throws IllegalArgumentException, IllegalStateException, IOException {\n if (branchName != null && !branchName.equals(\"String_Node_Str\")) {\n serializer.startTag(\"String_Node_Str\", \"String_Node_Str\");\n serializer.text(branchName);\n serializer.endTag(\"String_Node_Str\", \"String_Node_Str\");\n }\n}\n"
|
"MemberReader createMemberReader(Role role) {\n final Access access = role.getAccess(this);\n switch(access) {\n case NONE:\n throw Util.newInternal(\"String_Node_Str\" + this);\n case ALL:\n return (isRagged()) ? new RestrictedMemberReader(getMemberReader(), role) : getMemberReader();\n case CUSTOM:\n final Role.HierarchyAccess hierarchyAccess = role.getAccessDetails(this);\n final Role.RollupPolicy rollupPolicy = hierarchyAccess.getRollupPolicy();\n final NumericType returnType = new NumericType();\n switch(rollupPolicy) {\n case FULL:\n return new RestrictedMemberReader(getMemberReader(), role);\n case PARTIAL:\n Type memberType1 = new mondrian.olap.type.MemberType(getDimension(), getHierarchy(), null, null);\n SetType setType = new SetType(memberType1);\n ListCalc listCalc = new AbstractMemberListCalc(new DummyExp(setType), new Calc[0]) {\n public List<Member> evaluateMemberList(Evaluator evaluator) {\n return FunUtil.getNonEmptyMemberChildren(evaluator, ((RolapEvaluator) evaluator).getExpanding());\n }\n public boolean dependsOn(Dimension dimension) {\n return true;\n }\n };\n final Calc partialCalc = new LimitedRollupAggregateCalc(returnType, listCalc);\n final Exp partialExp = new ResolvedFunCall(new FunDefBase(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\") {\n public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {\n return partialCalc;\n }\n public void unparse(Exp[] args, PrintWriter pw) {\n pw.print(\"String_Node_Str\");\n }\n }, new Exp[0], returnType);\n return new LimitedRollupSubstitutingMemberReader(getMemberReader(), role, hierarchyAccess, partialExp);\n case HIDDEN:\n Exp hiddenExp = new ResolvedFunCall(new FunDefBase(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\") {\n public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {\n return new ConstantCalc(returnType, null);\n }\n public void unparse(Exp[] args, PrintWriter pw) {\n pw.print(\"String_Node_Str\");\n }\n }, new Exp[0], returnType);\n return new LimitedRollupSubstitutingMemberReader(role, hierarchyAccess, hiddenExp);\n default:\n throw Util.unexpected(rollupPolicy);\n }\n default:\n throw Util.badValue(access);\n }\n}\n"
|
"private boolean deleteElements(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache, final RepositoryNode currentJobNode, Boolean confirm) throws PersistenceException, BusinessException {\n boolean needReturn = false;\n final boolean[] enableDeleting = new boolean[1];\n enableDeleting[0] = true;\n final IRepositoryViewObject objToDelete = currentJobNode.getObject();\n final List<ContextReferenceBean> checkContext = checkContextFromProcess(factory, deleteActionCache, currentJobNode);\n if (checkContext.size() > 0) {\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n ContextReferenceDialog dialog = new ContextReferenceDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), objToDelete, checkContext);\n int returnCode = dialog.open();\n switch(returnCode) {\n case Window.OK:\n enableDeleting[0] = true;\n break;\n case Window.CANCEL:\n enableDeleting[0] = false;\n break;\n }\n }\n });\n }\n if (!enableDeleting[0]) {\n return true;\n }\n AbstractResourceChangesService resChangeService = TDQServiceRegister.getInstance().getResourceChangeService(AbstractResourceChangesService.class);\n ERepositoryObjectType nodeType = (ERepositoryObjectType) currentJobNode.getProperties(EProperties.CONTENT_TYPE);\n if (nodeType != null && nodeType.isSubItem()) {\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n final DeleteTableAction deleteTableAction = new DeleteTableAction();\n deleteTableAction.setWorkbenchPart(getWorkbenchPart());\n deleteTableAction.run();\n }\n });\n needReturn = true;\n } else {\n if (factory.getStatus(objToDelete) == ERepositoryStatus.DELETED) {\n if (!confirmForDQ && resChangeService != null) {\n List<IRepositoryNode> dependentNodes = resChangeService.getDependentNodes(currentJobNode);\n if (dependentNodes != null && !dependentNodes.isEmpty()) {\n resChangeService.openDependcesDialog(dependentNodes);\n return true;\n }\n }\n if (confirm == null) {\n if (confirmFromDialog) {\n confirm = confirmFromDialog;\n } else {\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n String title = Messages.getString(\"String_Node_Str\");\n String message = currentJobNode.getProperties(EProperties.LABEL) + \"String_Node_Str\" + Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + Messages.getString(\"String_Node_Str\");\n confirmFromDialog = MessageDialog.openQuestion(new Shell(), title, message);\n }\n });\n confirm = confirmFromDialog;\n }\n }\n if (confirm) {\n deleteActionCache.closeOpenedEditor(objToDelete);\n if (currentJobNode.getType() == ENodeType.SIMPLE_FOLDER) {\n boolean success = true;\n for (IRepositoryNode curNode : currentJobNode.getChildren()) {\n try {\n deleteElements(factory, deleteActionCache, (RepositoryNode) curNode, confirm);\n } catch (Exception e) {\n ExceptionHandler.process(e);\n success = false;\n }\n }\n if (success) {\n if (currentJobNode.getObject() != null && currentJobNode.getObject().getProperty() != null && currentJobNode.getObject().getProperty().getItem() != null) {\n Item fitem = currentJobNode.getObject().getProperty().getItem();\n if ((fitem instanceof FolderItem) && (((FolderItem) fitem).getType().getValue() == FolderType.FOLDER)) {\n factory.deleteFolder(currentJobNode.getContentType(), RepositoryNodeUtilities.getFolderPath(currentJobNode.getObject().getProperty().getItem()));\n } else {\n factory.deleteFolder(currentJobNode.getContentType(), RepositoryNodeUtilities.getPath(currentJobNode));\n }\n } else {\n factory.deleteFolder(currentJobNode.getContentType(), RepositoryNodeUtilities.getPath(currentJobNode));\n }\n }\n } else {\n if (resChangeService != null && objToDelete != null && objToDelete.getProperty() != null) {\n Item item = objToDelete.getProperty().getItem();\n if (item != null) {\n resChangeService.removeAllDependecies(item);\n }\n }\n for (IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {\n handler.deleteNode(objToDelete);\n }\n if (nodeType == ERepositoryObjectType.ROUTINES || nodeType == ERepositoryObjectType.PIG_UDF) {\n forceBuild = true;\n }\n if (!forceBuild) {\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {\n ICamelDesignerCoreService camelService = (ICamelDesignerCoreService) GlobalServiceRegister.getDefault().getService(ICamelDesignerCoreService.class);\n if (nodeType == camelService.getBeansType()) {\n forceBuild = true;\n }\n }\n }\n factory.deleteObjectPhysical(objToDelete);\n ExpressionPersistance.getInstance().jobDeleted(objToDelete.getLabel());\n }\n }\n } else {\n factory.deleteObjectLogical(objToDelete);\n updateRelatedViews();\n removeConnFromSQLExplorer(currentJobNode);\n }\n }\n return needReturn;\n}\n"
|
"public boolean commit() throws LoginException {\n if (super.commit()) {\n subject.getPrincipals().add(unixPrincipal);\n return true;\n }\n return false;\n}\n"
|
"private void updateOnlineControllers(List<String> controllers) throws KeeperException, InterruptedException {\n for (String controller : controllers) {\n String blurVersion = \"String_Node_Str\";\n byte[] b = this.zookeeper.getData(\"String_Node_Str\" + controller, false, null);\n if (b != null && b.length > 0) {\n blurVersion = new String(b);\n }\n this.database.updateOnlineController(controller, zookeeperId, blurVersion);\n }\n}\n"
|
"public void setup() {\n AVOSCloud.setDebugLogEnabled(true);\n AVOSCloud.applicationContext = RuntimeEnvironment.application;\n}\n"
|
"private void setLayout() {\n setContentView(R.layout.list_pull);\n setActionBar();\n mEmptyView = (ViewGroup) findViewById(R.id.empty);\n mPullToRefreshListView = (PullToRefreshListView) findViewById(R.id.list);\n mList = mPullToRefreshListView.getRefreshableView();\n mList.setOnItemClickListener(this);\n mList.setOnItemLongClickListener(this);\n mStatusAdapter = new SearchResultsAdapter(this, mStatuses);\n mList.setAdapter(mStatusAdapter);\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n font.store();\n lineColor.store();\n backGroundColor.store();\n textColor.store();\n String[] fontList = SDViewPref.getFontList();\n font.setPreferenceName(fontList[classItemList.getSelectionIndex()] + TEMP_TAG);\n font.load();\n backGroundColor.setPreferenceName(SDViewPref.fontList[classItemList.getSelectionIndex()] + SDViewPref.BACK_COLOR_POSTFIX + TEMP_TAG);\n backGroundColor.load();\n lineColor.setPreferenceName(SDViewPref.fontList[classItemList.getSelectionIndex()] + SDViewPref.FORE_COLOR_POSTFIX + TEMP_TAG);\n lineColor.load();\n textColor.setPreferenceName(SDViewPref.fontList[classItemList.getSelectionIndex()] + SDViewPref.TEXT_COLOR_POSTFIX + TEMP_TAG);\n textColor.load();\n if ((SDViewPref.fontList[classItemList.getSelectionIndex()].equals(SDViewPref.PREF_SYNC_MESS)) || (SDViewPref.fontList[classItemList.getSelectionIndex()].equals(SDViewPref.PREF_SYNC_MESS_RET)) || (SDViewPref.fontList[classItemList.getSelectionIndex()].equals(SDViewPref.PREF_ASYNC_MESS)) || (SDViewPref.fontList[classItemList.getSelectionIndex()].equals(SDViewPref.PREF_ASYNC_MESS_RET)))\n backGroundColor.setEnabled(false, buttonArea);\n else\n backGroundColor.setEnabled(true, buttonArea);\n if ((SDViewPref.fontList[classItemList.getSelectionIndex()].equals(SDViewPref.PREF_EXEC)) || (SDViewPref.fontList[classItemList.getSelectionIndex()].equals(SDViewPref.PREF_FRAME)))\n textColor.setEnabled(false, buttonArea);\n else\n textColor.setEnabled(true, buttonArea);\n if (SDViewPref.fontList[classItemList.getSelectionIndex()].equals(SDViewPref.PREF_FRAME))\n font.setEnabled(false, buttonArea);\n else\n font.setEnabled(true, buttonArea);\n}\n"
|
"public Context createContext(String id, String ctxPath, File location, String defaultContextXmlLocation, String defaultWebXmlLocation, boolean useDOLforDeployment, WebModuleConfig wmInfo) {\n File configFile = null;\n if (ctxPath.equals(\"String_Node_Str\")) {\n configFile = new File(getCatalinaHome() + \"String_Node_Str\", \"String_Node_Str\");\n } else {\n configFile = new File(getCatalinaHome() + \"String_Node_Str\", ctxPath + \"String_Node_Str\");\n }\n if (!configFile.exists()) {\n configFile = new File(location, Constants.WEB_CONTEXT_XML);\n }\n WebModule context = new WebModule(services);\n context.setID(id);\n context.setWebContainer(webContainer);\n context.setDebug(debug);\n context.setPath(ctxPath);\n context.setDocBase(location.getAbsolutePath());\n context.setCrossContext(true);\n context.setUseNaming(isUseNaming());\n context.setHasWebXml(wmInfo.getDescriptor() != null);\n context.setWebBundleDescriptor(wmInfo.getDescriptor());\n context.setManagerChecksFrequency(1);\n context.setServerContext(serverContext);\n context.setWebModuleConfig(wmInfo);\n context.setDefaultWebXml(defaultWebXmlLocation);\n if (embeddedDirectoryListing) {\n context.setDirectoryListing(embeddedDirectoryListing);\n }\n if (configFile.exists()) {\n context.setConfigFile(configFile.getAbsolutePath());\n }\n ContextConfig config;\n if (useDOLforDeployment) {\n config = new WebModuleContextConfig();\n ((WebModuleContextConfig) config).setDescriptor(wmInfo.getDescriptor());\n ((WebModuleContextConfig) config).setServices(services);\n } else {\n config = new ContextConfig();\n }\n config.setDefaultContextXml(defaultContextXmlLocation);\n config.setDefaultWebXml(defaultWebXmlLocation);\n context.addLifecycleListener(config);\n context.addLifecycleListener(new WebModuleListener(webContainer, wmInfo.getDescriptor()));\n context.addContainerListener(new WebContainerListener(invocationManager, injectionManager));\n for (WebModuleDecorator d : services.<WebModuleDecorator>getAllServices(WebModuleDecorator.class)) {\n d.decorate(context);\n }\n return context;\n}\n"
|
"public static Map<Integer, CategoryModel> getAllCategories() {\n String sqlCommand = sqlSelectAllCategories() + \"String_Node_Str\";\n Cursor cursor = WordPress.wpDB.getDatabase().rawQuery(sqlCommand, null);\n if (cursor == null || !cursor.moveToFirst() || cursor.getCount() == 0) {\n return null;\n }\n SparseArrayCompat<CategoryModel> models = new SparseArrayCompat<>();\n for (int i = 0; i < cursor.getCount(); ++i) {\n CategoryModel model = new CategoryModel();\n model.deserializeFromDatabase(cursor);\n models.put(model.id, model);\n cursor.moveToNext();\n }\n return models;\n}\n"
|
"public void deleteForeverElemensByTXT() throws Exception {\n List<String[]> delLs = new ArrayList<String[]>();\n for (int i = 0; i < delLs.size(); i++) {\n String[] els = (String[]) delLs.get(i);\n IPath path = new Path(els[1]);\n if (els[0].equals(\"String_Node_Str\")) {\n IFile file = ResourceManager.getRoot().getFile(path);\n if (file.exists()) {\n file.delete(true, null);\n LogicalDeleteFileHandle.replaceInFile(LogicalDeleteFileHandle.fileType + file.getFullPath().toOSString(), PluginConstant.EMPTY_STRING);\n i--;\n }\n } else if (els[0].equals(\"String_Node_Str\")) {\n IFolder folder = ResourceManager.getRoot().getFolder(path);\n if (folder.exists()) {\n folder.delete(true, null);\n LogicalDeleteFileHandle.replaceInFile(LogicalDeleteFileHandle.folderType + folder.getFullPath().toOSString(), PluginConstant.EMPTY_STRING);\n i--;\n }\n }\n }\n}\n"
|
"private static boolean isOracleAmazonStringContained(String dbType, String emfName) {\n if (dbType != null && !dbType.equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName()) && emfName != null && Pattern.compile(\"String_Node_Str\", Pattern.CASE_INSENSITIVE).matcher(dbType).matches()) {\n for (String amazonString : ORACLE_AMAZON_STRING) {\n if (emfName.equals(amazonString)) {\n return true;\n }\n }\n }\n return false;\n}\n"
|
"public void init(GameEngine gameEngine) {\n context = gameEngine.createChildContext();\n CoreRegistry.setContext(context);\n EntitySystemSetupUtil.addEntityManagementRelatedClasses(context);\n entityManager = context.get(EngineEntityManager.class);\n eventSystem = context.get(EventSystem.class);\n context.put(Console.class, new ConsoleImpl(context));\n NUIManager nuiManager = new NUIManagerInternal(context.get(CanvasRenderer.class), context);\n context.put(NUIManager.class, nuiManager);\n componentSystemManager = new ComponentSystemManager(context);\n context.put(ComponentSystemManager.class, componentSystemManager);\n componentSystemManager.register(new ConsoleSystem(), \"String_Node_Str\");\n componentSystemManager.register(new CoreCommands(), \"String_Node_Str\");\n componentSystemManager.register(context.get(InputSystem.class), \"String_Node_Str\");\n EntityRef localPlayerEntity = entityManager.create(new ClientComponent());\n LocalPlayer localPlayer = new LocalPlayer();\n localPlayer.setRecordAndReplayClasses(context.get(EntityIdMap.class), context.get(DirectionAndOriginPosRecorderList.class));\n context.put(LocalPlayer.class, localPlayer);\n localPlayer.setClientEntity(localPlayerEntity);\n componentSystemManager.initialise();\n GameManifest gameManifest;\n List<GameInfo> savedGames = GameProvider.getSavedGames();\n if (savedGames.size() > 0) {\n gameManifest = savedGames.get(0).getManifest();\n } else {\n gameManifest = createGameManifest();\n }\n gameEngine.changeState(new StateLoading(gameManifest, NetworkMode.LISTEN_SERVER));\n}\n"
|
"public void copyFileInto(String fullPath, File localFile) throws IOException {\n final String relativePath = mounter.getMountRelativePath(fullPath, mountPoint);\n final FileMetadata metadata;\n final SquallArchiveCompressor compressor;\n final InputStream is;\n metadata = scanMetadataForFile(relativePath);\n if (metadata == null) {\n throw new FileNotFoundException(\"String_Node_Str\" + relativePath + \"String_Node_Str\");\n }\n final long startOffset = metadata.getStartOffset();\n final long originalSize = metadata.getSize();\n final String archiveFile = metadata.getArchiveFilename();\n final String sqarpath;\n final String archivePath;\n final DigestInputStream digestStream;\n final OutputStream os;\n sqarpath = mountPoint.substring(0, mountPoint.length() - DELIMITER.length()) + SUFFIX;\n archivePath = sqarpath + DELIMITER + archiveFile;\n is = parentFS.getInputStreamForFile(archivePath, startOffset, originalSize + 2048);\n try {\n compressor = metadata.getCompressor();\n digestStream = new DigestInputStream(compressor.newInputStream(is), ArchiveUtils.getMD5Digest());\n os = new BufferedOutputStream(new FileOutputStream(localFile));\n ArchiveUtils.streamCopy(digestStream, os, originalSize);\n os.close();\n } finally {\n is.close();\n }\n final String checksum = ArchiveUtils.toHex(digestStream.getMessageDigest().digest());\n if (!checksum.equals(metadata.getChecksum())) {\n throw new IOException(\"String_Node_Str\" + fullPath + \"String_Node_Str\" + archivePath + \"String_Node_Str\" + checksum + \"String_Node_Str\" + metadata.getChecksum());\n }\n}\n"
|
"public boolean onContextItemSelected(MenuItem item) {\n Post post = new Post(WordPress.currentBlog.getLocalTableBlogId(), mSelectedID, isPage);\n if (post.getId() < 0) {\n if (!getActivity().isFinishing()) {\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n WPAlertDialogFragment alert = WPAlertDialogFragment.newInstance(getString(R.string.post_not_found));\n ft.add(alert, \"String_Node_Str\");\n ft.commitAllowingStateLoss();\n }\n return false;\n }\n int itemGroupID = item.getGroupId();\n if (itemGroupID == MENU_GROUP_POSTS || itemGroupID == MENU_GROUP_PAGES || itemGroupID == MENU_GROUP_DRAFTS) {\n switch(item.getItemId()) {\n case MENU_ITEM_EDIT:\n WPMobileStatsUtil.flagProperty(statEventForViewClosing(), WPMobileStatsUtil.StatsPropertyPostMenuClickedEdit);\n Intent i2 = new Intent(getActivity().getApplicationContext(), EditPostActivity.class);\n i2.putExtra(EditPostActivity.EXTRA_POSTID, mSelectedID);\n if (itemGroupID == MENU_GROUP_PAGES) {\n i2.putExtra(EditPostActivity.EXTRA_IS_PAGE, true);\n } else if (itemGroupID == MENU_GROUP_DRAFTS) {\n if (isPage)\n i2.putExtra(EditPostActivity.EXTRA_IS_PAGE, true);\n }\n getActivity().startActivityForResult(i2, PostsActivity.ACTIVITY_EDIT_POST);\n return true;\n case MENU_ITEM_DELETE:\n WPMobileStatsUtil.flagProperty(statEventForViewClosing(), WPMobileStatsUtil.StatsPropertyPostMenuClickedDelete);\n mOnPostActionListener.onPostAction(PostsActivity.POST_DELETE, post);\n return true;\n case MENU_ITEM_PREVIEW:\n WPMobileStatsUtil.flagProperty(statEventForViewClosing(), WPMobileStatsUtil.StatsPropertyPostMenuClickedPreview);\n Intent i = new Intent(getActivity(), PreviewPostActivity.class);\n i.putExtra(\"String_Node_Str\", itemGroupID == MENU_GROUP_PAGES ? true : false);\n i.putExtra(\"String_Node_Str\", mSelectedID);\n i.putExtra(\"String_Node_Str\", WordPress.currentBlog.getLocalTableBlogId());\n startActivity(i);\n return true;\n case MENU_ITEM_SHARE:\n WPMobileStatsUtil.flagProperty(statEventForViewClosing(), WPMobileStatsUtil.StatsPropertyPostMenuClickedShare);\n mOnPostActionListener.onPostAction(PostsActivity.POST_SHARE, post);\n return true;\n default:\n return false;\n }\n }\n return false;\n}\n"
|
"public void testSelectAggregateEntitySelectPaginated() {\n PaginatedCriteriaBuilder<Tuple> cb = cbf.create(em, Tuple.class).from(Document.class, \"String_Node_Str\").selectCase().when(\"String_Node_Str\").gtExpression(\"String_Node_Str\").thenExpression(\"String_Node_Str\").otherwiseExpression(\"String_Node_Str\").select(\"String_Node_Str\").orderByDesc(\"String_Node_Str\").page(0, 10);\n String countQuery = \"String_Node_Str\" + countPaginated(\"String_Node_Str\", false) + \"String_Node_Str\";\n String idQuery = \"String_Node_Str\" + groupBy(\"String_Node_Str\", renderNullPrecedenceGroupBy(\"String_Node_Str\")) + \"String_Node_Str\" + renderNullPrecedence(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n String objectQuery = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + groupBy(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", renderNullPrecedenceGroupBy(\"String_Node_Str\")) + \"String_Node_Str\" + renderNullPrecedence(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n assertEquals(countQuery, cb.getPageCountQueryString());\n assertEquals(idQuery, cb.getPageIdQueryString());\n assertEquals(objectQuery, cb.getQueryString());\n cb.getResultList();\n}\n"
|
"protected void initializeComponent() throws JSONException {\n super.initializeComponent();\n for (ComponentOption option : getOptions()) {\n if (\"String_Node_Str\".equals(option.getType())) {\n textRepresentationOnDisabled = Boolean.parseBoolean(option.getValue());\n } else if (\"String_Node_Str\".equals(option.getType())) {\n alignment = option.getValue();\n } else if (!\"String_Node_Str\".equals(option.getType())) {\n throw new IllegalStateException(\"String_Node_Str\" + option.getType());\n }\n }\n}\n"
|
"public void shouldSkipNullItems() {\n Mapper<Source, Destination> mapper = Mapping.from(Source.class).to(Destination.class).replaceCollection(Source::getIds, Destination::getIds).withSkipWhenNull(idBuilder()).mapper();\n Source source = Source.builder().ids(Arrays.asList(1L, null, 2L, null, 3L)).build();\n Destination map = mapper.map(source);\n List<Id> expected = Arrays.asList(idBuilder().transform(1L), idBuilder().transform(2L), idBuilder().transform(3L));\n List<Id> actual = map.getIds();\n assertEquals(expected, actual);\n AssertMapping.of(mapper).expectReplaceCollection(Source::getIds, Destination::getIds).andSkipWhenNull().ensure();\n}\n"
|
"private void prune(Node node) {\n if (node.getLowerBound() == null) {\n return;\n }\n if (node.hasProperty(Node.PROPERTY_SUCCESSORS_PRUNED)) {\n return;\n }\n if (super.getGlobalOptimum() == null) {\n pruningCandidates.add(node);\n return;\n }\n Node optimalTransformation = getGlobalOptimum();\n InformationLoss<?> optimalInfoLoss = optimalTransformation.getInformationLoss();\n if (node != optimalTransformation) {\n if (optimalInfoLoss.compareTo(node.getLowerBound()) <= 0) {\n lattice.setPropertyUpwards(node, true, Node.PROPERTY_INSUFFICIENT_UTILITY | Node.PROPERTY_SUCCESSORS_PRUNED);\n } else {\n pruningCandidates.add(node);\n }\n } else {\n Iterator<Node> iterator = pruningCandidates.iterator();\n while (iterator.hasNext()) {\n Node current = iterator.next();\n if (current.hasProperty(Node.PROPERTY_SUCCESSORS_PRUNED)) {\n iterator.remove();\n } else if (optimalInfoLoss.compareTo(current.getLowerBound()) <= 0) {\n lattice.setPropertyUpwards(current, true, Node.PROPERTY_INSUFFICIENT_UTILITY | Node.PROPERTY_SUCCESSORS_PRUNED);\n iterator.remove();\n }\n }\n pruningCandidates.add(node);\n }\n}\n"
|
"BindingImpl<T> build(InjectorImpl injector) {\n if (this.factory != null) {\n Scope scope = this.scope == null ? Scopes.NO_SCOPE : this.scope;\n InternalFactory<? extends T> scopedFactory = Scopes.scope(this.key, injector, this.factory, scope);\n if (instance != null) {\n return new InstanceBindingImpl<T>(injector, key, source, scopedFactory, instance);\n }\n if (this.targetKey != null) {\n return new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scope, targetKey);\n }\n if (this.providerInstance != null) {\n return new ProviderInstanceBindingImpl<T>(injector, key, source, scopedFactory, scope, providerInstance);\n }\n if (this.providerKey != null) {\n return new LinkedProviderBindingImpl<T>(injector, key, source, scopedFactory, scope, providerKey);\n }\n throw new AssertionError();\n } else {\n Type type = key.getTypeLiteral().getType();\n if (key.hasAnnotationType() || !(type instanceof Class<?>)) {\n injector.errorHandler.handle(source, ErrorMessages.MISSING_IMPLEMENTATION);\n return invalidBinding(injector);\n }\n Class<T> clazz = (Class<T>) type;\n BindingImpl<T> binding = injector.createBindingForInjectableType(clazz, scope, source);\n if (binding == null) {\n injector.errorHandler.handle(source, ErrorMessages.CANNOT_INJECT_ABSTRACT_TYPE, clazz);\n return invalidBinding(injector);\n }\n return binding;\n }\n}\n"
|
"public final MapArray<String, ICell> getColumn(int colNum) {\n if (count() < 0 || table.columns().count() < colNum || colNum <= 0)\n throw exception(\"String_Node_Str\", colNum, count());\n try {\n List<WebElement> webColumn = table.columns().getColumnAction(colNum);\n return new MapArray<>(count(), key -> headers()[key], value -> table.cell(webColumn.get(value), new Column(colNum), new Row(value + 1)));\n } catch (Throwable ex) {\n throw throwRowsException(colNum + \"String_Node_Str\", ex.getMessage());\n }\n}\n"
|
"private void processXmlElement(Property property, TypeInfo info) {\n if (helper.isAnnotationPresent(property.getElement(), XmlElement.class)) {\n XmlElement element = (XmlElement) helper.getAnnotation(property.getElement(), XmlElement.class);\n property.setIsRequired(element.required());\n property.setNillable(element.nillable());\n if (element.type() != XmlElement.DEFAULT.class && !(property.isSwaAttachmentRef())) {\n property.setOriginalType(property.getType());\n if (isCollectionType(property.getType())) {\n property.setGenericType(helper.getJavaClass(element.type()));\n } else {\n property.setType(helper.getJavaClass(element.type()));\n }\n property.setHasXmlElementType(true);\n }\n if (!element.defaultValue().equals(ELEMENT_DECL_DEFAULT)) {\n property.setDefaultValue(element.defaultValue());\n }\n validateElementIsInPropOrder(info, property.getPropertyName());\n }\n}\n"
|
"public static String getDhcpRange(final String cidr) {\n final String[] splitResult = cidr.split(\"String_Node_Str\");\n final long size = Long.parseLong(splitResult[1]);\n return NetUtils.getIpRangeStartIpFromCidr(splitResult[0], size);\n}\n"
|
"public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {\n boolean result = super.configure(name, params);\n PublicSearch = createSearchBuilder();\n PublicSearch.and(\"String_Node_Str\", PublicSearch.entity().isPublicTemplate(), SearchCriteria.Op.EQ);\n routerTmpltName = (String) params.get(\"String_Node_Str\");\n s_logger.debug(\"String_Node_Str\" + routerTmpltName);\n if (routerTmpltName == null) {\n routerTmpltName = \"String_Node_Str\";\n }\n consoleProxyTmpltName = (String) params.get(\"String_Node_Str\");\n if (consoleProxyTmpltName == null)\n consoleProxyTmpltName = \"String_Node_Str\";\n if (s_logger.isDebugEnabled())\n s_logger.debug(\"String_Node_Str\" + consoleProxyTmpltName);\n UniqueNameSearch = createSearchBuilder();\n UniqueNameSearch.and(\"String_Node_Str\", UniqueNameSearch.entity().getUniqueName(), SearchCriteria.Op.EQ);\n NameSearch = createSearchBuilder();\n NameSearch.and(\"String_Node_Str\", NameSearch.entity().getName(), SearchCriteria.Op.EQ);\n NameAccountIdSearch = createSearchBuilder();\n NameAccountIdSearch.and(\"String_Node_Str\", NameAccountIdSearch.entity().getName(), SearchCriteria.Op.EQ);\n NameAccountIdSearch.and(\"String_Node_Str\", NameAccountIdSearch.entity().getAccountId(), SearchCriteria.Op.EQ);\n PublicIsoSearch = createSearchBuilder();\n PublicIsoSearch.and(\"String_Node_Str\", PublicIsoSearch.entity().isPublicTemplate(), SearchCriteria.Op.EQ);\n PublicIsoSearch.and(\"String_Node_Str\", PublicIsoSearch.entity().getFormat(), SearchCriteria.Op.EQ);\n tmpltTypeHyperSearch = createSearchBuilder();\n tmpltTypeHyperSearch.and(\"String_Node_Str\", tmpltTypeHyperSearch.entity().getTemplateType(), SearchCriteria.Op.EQ);\n tmpltTypeHyperSearch.and(\"String_Node_Str\", tmpltTypeHyperSearch.entity().getHypervisorType(), SearchCriteria.Op.EQ);\n tmpltTypeSearch = createSearchBuilder();\n tmpltTypeSearch.and(\"String_Node_Str\", tmpltTypeSearch.entity().getTemplateType(), SearchCriteria.Op.EQ);\n AccountIdSearch = createSearchBuilder();\n AccountIdSearch.and(\"String_Node_Str\", AccountIdSearch.entity().getAccountId(), SearchCriteria.Op.EQ);\n AccountIdSearch.and(\"String_Node_Str\", AccountIdSearch.entity().isPublicTemplate(), SearchCriteria.Op.EQ);\n AccountIdSearch.done();\n SearchBuilder<VMTemplateZoneVO> tmpltZoneSearch = _templateZoneDao.createSearchBuilder();\n tmpltZoneSearch.and(\"String_Node_Str\", tmpltZoneSearch.entity().getRemoved(), SearchCriteria.Op.NULL);\n tmpltZoneSearch.and(\"String_Node_Str\", tmpltZoneSearch.entity().getZoneId(), SearchCriteria.Op.EQ);\n TmpltsInZoneSearch = createSearchBuilder();\n TmpltsInZoneSearch.and(\"String_Node_Str\", TmpltsInZoneSearch.entity().getRemoved(), SearchCriteria.Op.NULL);\n TmpltsInZoneSearch.join(\"String_Node_Str\", tmpltZoneSearch, tmpltZoneSearch.entity().getTemplateId(), TmpltsInZoneSearch.entity().getId(), JoinBuilder.JoinType.INNER);\n tmpltZoneSearch.done();\n TmpltsInZoneSearch.done();\n _defaultHyperType = HypervisorType.getType(_configDao.getValue(\"String_Node_Str\"));\n return result;\n}\n"
|
"private void setup() {\n if (displayWhenEmpty) {\n getStyleClass().add(\"String_Node_Str\");\n }\n setSpacing(3);\n parentIssue.addListener(new WeakChangeListener<Number>(createParentsChangeListener()));\n if (this.milestoneTitle != null) {\n milestoneTitle.addListener(new WeakChangeListener<String>(createMilestoneChangeListener()));\n }\n updateIndicators(null);\n}\n"
|
"public void tearDown() throws Exception {\n super.tearDown();\n if (index != null && service.versionCompare(\"String_Node_Str\") >= 0) {\n index.remove();\n }\n if (tcpInput != null) {\n tcpInput.remove();\n }\n}\n"
|
"public Long createCluster(ClusterCreate createSpec) throws Exception {\n if (CommonUtil.isBlank(createSpec.getDistro())) {\n setDefaultDistro(createSpec);\n }\n DistroRead distroRead = getDistroManager().getDistroByName(createSpec.getDistro());\n createSpec.setDistroVendor(distroRead.getVendor());\n createSpec.setDistroVersion(distroRead.getVersion());\n createAutoRps(createSpec);\n ClusterCreate clusterSpec = ClusterSpecFactory.getCustomizedSpec(createSpec);\n createSpec.verifyClusterNameLength();\n clusterSpec.validateNodeGroupNames();\n if (clusterSpec != null && clusterSpec.getNodeGroups() != null) {\n for (NodeGroupCreate ng : clusterSpec.getNodeGroups()) {\n String templateVmId = clusteringService.getTemplateVmId();\n if (templateVmId != null) {\n VcResourceUtils.checkVmMaxConfiguration(templateVmId, ng.getCpuNum() == null ? 0 : ng.getCpuNum(), ng.getMemCapacityMB() == null ? 0 : ng.getMemCapacityMB());\n }\n }\n }\n String name = clusterSpec.getName();\n logger.info(\"String_Node_Str\" + name);\n List<String> dsNames = getUsedDS(clusterSpec.getDsNames());\n if (dsNames.isEmpty()) {\n throw ClusterConfigException.NO_DATASTORE_ADDED();\n }\n List<VcCluster> vcClusters = getUsedVcClusters(clusterSpec.getRpNames());\n if (vcClusters == null || vcClusters.isEmpty()) {\n throw ClusterConfigException.NO_RESOURCE_POOL_ADDED();\n }\n validateDatastore(dsNames, vcClusters);\n validateNetworkAccessibility(createSpec.getNetworkNames(), vcClusters);\n clusterConfigMgr.createClusterConfig(clusterSpec);\n clusterEntityMgr.updateClusterStatus(name, ClusterStatus.PROVISIONING);\n Map<String, JobParameter> param = new TreeMap<String, JobParameter>();\n param.put(JobConstants.TIMESTAMP_JOB_PARAM, new JobParameter(new Date()));\n param.put(JobConstants.CLUSTER_SUCCESS_STATUS_JOB_PARAM, new JobParameter(ClusterStatus.RUNNING.name()));\n param.put(JobConstants.CLUSTER_FAILURE_STATUS_JOB_PARAM, new JobParameter(ClusterStatus.PROVISION_ERROR.name()));\n param.put(JobConstants.CLUSTER_NAME_JOB_PARAM, new JobParameter(createSpec.getName()));\n param.put(JobConstants.VERIFY_NODE_STATUS_SCOPE_PARAM, new JobParameter(JobConstants.CLUSTER_NODE_SCOPE_VALUE));\n JobParameters jobParameters = new JobParameters(param);\n return jobManager.runJob(JobConstants.CREATE_CLUSTER_JOB_NAME, jobParameters);\n}\n"
|
"private LogicalDeviceData createLogicalData(ObjectType objectType) {\n List<DeviceNeighbour> neighbours = new ArrayList<>();\n List<ObjectType> objList2 = objectType.getObject();\n for (ObjectType type : objList2) {\n if (type.getObjectType().equals(\"String_Node_Str\")) {\n neighbours.add(createNeighbour(type));\n System.out.println(\"String_Node_Str\");\n } else {\n logger.info(\"String_Node_Str\" + type.getObjectType());\n }\n }\n return new LogicalDeviceData(neighbours);\n}\n"
|
"public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n try {\n Object resultObject = invokeObject(proxy, method, args);\n if (resultObject != null)\n return resultObject;\n try {\n if (isReturnAsync(proxy, method, args)) {\n if (isInterfaceAsync(method.getDeclaringClass()) && isMethodAsync(method.getName()))\n return invokeAsync(createRemoteCall(proxy, method, getAsyncInvokeMethodName(method), args, getDefaultTimeout()));\n if (isOSGIAsync())\n return invokeAsync(createRemoteCall(proxy, method, method.getName(), args, getDefaultTimeout()));\n }\n } catch (Throwable t) {\n handleProxyException(\"String_Node_Str\" + getRemoteServiceID(), t);\n }\n final String callMethod = getCallMethodNameForProxyInvoke(method, args);\n final Object[] callParameters = getCallParametersForProxyInvoke(callMethod, method, args);\n final long callTimeout = getCallTimeoutForProxyInvoke(callMethod, method, args);\n return invokeSync(createRemoteCall(proxy, method, callMethod, callParameters, callTimeout));\n } catch (Throwable t) {\n if (t instanceof ServiceException)\n throw t;\n throw new ServiceException(\"String_Node_Str\" + getRemoteServiceID(), ServiceException.REMOTE, t);\n }\n}\n"
|
"private boolean groupKeyValuesEqual(org.eclipse.birt.data.engine.odi.IResultIterator odiResult, Object[] groupKeyValues, String[] columnExprs, int i) throws BirtException {\n Object fieldValue = null;\n try {\n Context cx = Context.enter();\n fieldValue = ScriptEvalUtil.evalExpr(new ScriptExpression(columnExprs[i]), cx, ResultIterator.this.scope, org.eclipse.birt.core.script.ScriptExpression.defaultID, 0);\n } finally {\n Context.exit();\n }\n boolean retValue = false;\n if (fieldValue == groupKeyValues[i]) {\n retValue = true;\n } else if (fieldValue != null && groupKeyValues[i] != null) {\n if (fieldValue.getClass().equals(groupKeyValues[i].getClass())) {\n retValue = isTwoObjectEqual(fieldValue, groupKeyValues[i]);\n } else {\n Object convertedOb = DataTypeUtil.convert(groupKeyValues[i], fieldValue.getClass());\n retValue = isTwoObjectEqual(fieldValue, convertedOb);\n }\n }\n return retValue;\n}\n"
|
"public boolean isInterface() {\n return klass.isInterface();\n}\n"
|
"public Answer createVolumeFromSnapshot(final CopyCommand cmd) {\n final Connection conn = hypervisorResource.getConnection();\n final DataTO srcData = cmd.getSrcTO();\n final SnapshotObjectTO snapshot = (SnapshotObjectTO) srcData;\n final DataTO destData = cmd.getDestTO();\n final PrimaryDataStoreTO pool = (PrimaryDataStoreTO) destData.getDataStore();\n final VolumeObjectTO volume = (VolumeObjectTO) destData;\n final DataStoreTO imageStore = srcData.getDataStore();\n if (srcData.getDataStore() instanceof PrimaryDataStoreTO && destData.getDataStore() instanceof PrimaryDataStoreTO) {\n return createVolumeFromSnapshot2(cmd);\n }\n if (!(imageStore instanceof NfsTO)) {\n return new CopyCmdAnswer(\"String_Node_Str\");\n }\n final NfsTO nfsImageStore = (NfsTO) imageStore;\n final String primaryStorageNameLabel = pool.getUuid();\n final String secondaryStorageUrl = nfsImageStore.getUrl();\n final int wait = cmd.getWait();\n boolean result = false;\n String details = null;\n String volumeUUID = null;\n if (secondaryStorageUrl == null) {\n details += \"String_Node_Str\" + secondaryStorageUrl + \"String_Node_Str\";\n return new CopyCmdAnswer(details);\n }\n SR srcSr = null;\n VDI destVdi = null;\n try {\n final SR primaryStorageSR = hypervisorResource.getSRByNameLabelandHost(conn, primaryStorageNameLabel);\n if (primaryStorageSR == null) {\n throw new InternalErrorException(\"String_Node_Str\" + primaryStorageNameLabel);\n }\n final String nameLabel = \"String_Node_Str\" + UUID.randomUUID().toString();\n destVdi = createVdi(conn, nameLabel, primaryStorageSR, volume.getSize());\n volumeUUID = destVdi.getUuid(conn);\n final String snapshotInstallPath = snapshot.getPath();\n final int index = snapshotInstallPath.lastIndexOf(File.separator);\n final String snapshotDirectory = snapshotInstallPath.substring(0, index);\n final String snapshotUuid = getSnapshotUuid(snapshotInstallPath);\n final URI uri = new URI(secondaryStorageUrl);\n srcSr = createFileSr(conn, uri.getHost() + \"String_Node_Str\" + uri.getPath(), snapshotDirectory);\n final String[] parents = snapshot.getParents();\n final List<VDI> snapshotChains = new ArrayList<VDI>();\n if (parents != null) {\n for (int i = 0; i < parents.length; i++) {\n final String snChainPath = parents[i];\n final String uuid = getSnapshotUuid(snChainPath);\n final VDI chain = VDI.getByUuid(conn, uuid);\n snapshotChains.add(chain);\n }\n }\n final VDI snapshotVdi = VDI.getByUuid(conn, snapshotUuid);\n snapshotChains.add(snapshotVdi);\n for (final VDI snapChain : snapshotChains) {\n final Task task = snapChain.copyAsync(conn, null, null, destVdi);\n hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);\n hypervisorResource.checkForSuccess(conn, task);\n task.destroy(conn);\n }\n result = true;\n destVdi = VDI.getByUuid(conn, volumeUUID);\n final VDI.Record vdir = destVdi.getRecord(conn);\n final VolumeObjectTO newVol = new VolumeObjectTO();\n newVol.setPath(volumeUUID);\n newVol.setSize(vdir.virtualSize);\n return new CopyCmdAnswer(newVol);\n } catch (final Types.XenAPIException e) {\n details += \"String_Node_Str\" + e.toString();\n s_logger.warn(details, e);\n } catch (final Exception e) {\n details += \"String_Node_Str\" + e.getMessage();\n s_logger.warn(details, e);\n } finally {\n if (srcSr != null) {\n hypervisorResource.skipOrRemoveSR(conn, srcSr);\n }\n if (!result && destVdi != null) {\n try {\n destVdi.destroy(conn);\n } catch (final Exception e) {\n s_logger.debug(\"String_Node_Str\", e);\n }\n }\n }\n if (!result) {\n s_logger.error(details);\n }\n return new CopyCmdAnswer(details);\n}\n"
|
"public void populateMenu(List list, String menu, MultimediaListener listener) {\n suiteTable.clear();\n entryTable.clear();\n menuTable.clear();\n Enumeration en = session.platform.getInstalledSuites().elements();\n EvaluationContext ec = null;\n while (en.hasMoreElements()) {\n Suite suite = (Suite) en.nextElement();\n for (Menu m : suite.getMenus()) {\n try {\n XPathExpression relevance = m.getMenuRelevance();\n if (relevance != null) {\n if (ec == null) {\n ec = session.getEvaluationContext(getIif(), m.getId());\n }\n if (XPathFuncExpr.toBoolean(relevance.eval(ec)).booleanValue() == false) {\n continue;\n }\n }\n } catch (XPathSyntaxException e) {\n e.printStackTrace();\n }\n if (menu.equals(m.getId())) {\n for (int i = 0; i < m.getCommandIds().size(); ++i) {\n try {\n String id = m.getCommandIds().elementAt(i);\n XPathExpression relevant = m.getCommandRelevance(i);\n if (relevant != null) {\n if (ec == null) {\n ec = session.getEvaluationContext(getIif());\n }\n if (XPathFuncExpr.toBoolean(relevant.eval(ec)).booleanValue() == false) {\n continue;\n }\n }\n Entry e = suite.getEntries().get(id);\n if (e.getXFormNamespace() == null) {\n if (session.getNeededDatum(e) == null) {\n continue;\n }\n }\n int location = list.size();\n list.append(CommCareUtil.getMenuText(e.getText(), suite, location), ImageUtils.getImage(e.getImageURI()));\n if (listener != null && (e.getAudioURI() != null && !\"String_Node_Str\".equals(e.getAudioURI()))) {\n listener.registerAudioTrigger(location, e.getAudioURI());\n }\n suiteTable.put(new Integer(location), suite);\n entryTable.put(new Integer(location), e);\n } catch (XPathSyntaxException xpse) {\n throw new RuntimeException(xpse.getMessage());\n }\n }\n } else if (m.getRoot().equals(menu)) {\n int location = list.size();\n list.append(CommCareUtil.getMenuText(m.getName(), suite, location), ImageUtils.getImage(m.getImageURI()));\n if (listener != null && (m.getAudioURI() != null && !\"String_Node_Str\".equals(m.getAudioURI()))) {\n listener.registerAudioTrigger(location, m.getAudioURI());\n }\n suiteTable.put(new Integer(location), suite);\n menuTable.put(new Integer(location), m);\n }\n }\n }\n}\n"
|
"private void createConnectionLines(SelectionType SelectionType, int iConnectionID) {\n PathwayVertexGraphItemRep tmpPathwayVertexGraphItemRep;\n int iPathwayHeight = pathway.getHeight();\n int iViewID = iUniqueID;\n for (int iVertexRepID : selectionManager.getElements(SelectionType)) {\n tmpPathwayVertexGraphItemRep = pathwayItemManager.getPathwayVertexRep(iVertexRepID);\n SelectedElementRep elementRep = new SelectedElementRep(mappingDataDomain.getContentIDType(), iViewID, tmpPathwayVertexGraphItemRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X * vecScaling.x() + vecTranslation.x(), (iPathwayHeight - tmpPathwayVertexGraphItemRep.getYOrigin()) * PathwayRenderStyle.SCALING_FACTOR_Y * vecScaling.y() + vecTranslation.y(), 0);\n connectedElementRepresentationManager.addSelection(iConnectionID, elementRep);\n }\n}\n"
|
"public void rcWaitForWindowActivation(final String title, String operator, int pTimeout, int delay) {\n Stage s = null;\n try {\n long timeout = pTimeout;\n long done = System.currentTimeMillis() + timeout;\n long now;\n do {\n s = getStageByTitle(title, operator);\n now = System.currentTimeMillis();\n timeout = done - now;\n Thread.sleep(50);\n } while (timeout > 0 && s == null);\n } catch (InterruptedException e) {\n throw new RobotException(e);\n }\n if (s == null) {\n log.error(\"String_Node_Str\" + title + \"String_Node_Str\" + operator);\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.EXECUTION_ERROR));\n }\n final CountDownLatch signal = new CountDownLatch(1);\n final ChangeListener<Boolean> focusListener = new ChangeListener<Boolean>() {\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n if (newValue) {\n signal.countDown();\n }\n }\n };\n boolean isFocused = EventThreadQueuerJavaFXImpl.invokeAndWait(\"String_Node_Str\", new Callable<Boolean>() {\n public Boolean call() throws Exception {\n if (!s.isFocused()) {\n s.focusedProperty().addListener(focusListener);\n return false;\n }\n return true;\n }\n });\n if (isFocused) {\n try {\n signal.await(pTimeout, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.EXECUTION_ERROR));\n } finally {\n s.focusedProperty().removeListener(focusListener);\n }\n boolean result = EventThreadQueuerJavaFXImpl.invokeAndWait(\"String_Node_Str\", new Callable<Boolean>() {\n public Boolean call() throws Exception {\n return s.isFocused();\n }\n });\n if (!result) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.TIMEOUT_EXPIRED));\n }\n }\n TimeUtil.delay(delay);\n}\n"
|
"public String toQualifiedName(String catalog, String schema, String table) {\n if (is(MSSQL)) {\n catalog = \"String_Node_Str\";\n }\n if (is(SYBASE_ASE)) {\n schema = \"String_Node_Str\";\n }\n StringBuffer qualName = new StringBuffer();\n if (catalog != null && catalog.length() > 0) {\n qualName.append(catalog);\n qualName.append(DOT);\n }\n if (schema != null && schema.length() > 0) {\n qualName.append(schema);\n qualName.append(DOT);\n }\n qualName.append(table);\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\", catalog, schema, table, qualName));\n }\n return qualName.toString();\n}\n"
|
"private void renderWithIce(HashMap<Integer, BoundingBoxList> app2bbs, String pointerID) {\n ArrayList<SelectionGroup> selectionGroupList = new ArrayList<SelectionGroup>();\n for (Entry<Integer, BoundingBoxList> e : app2bbs.entrySet()) {\n SelectionGroup selectionGroup = new SelectionGroup();\n User user = this.userManager.getUser(pointerID);\n int srcAppID = -1;\n if (user.getPrevSrcApp() != null) {\n srcAppID = user.getPrevSrcApp().getId();\n }\n selectionGroup.selections = new Selection[e.getValue().getList().size()];\n ArrayList<Selection> selectionList = new ArrayList<Selection>();\n for (BoundingBox bb : e.getValue().getList()) {\n if (e.getKey() == srcAppID) {\n bb.setSource(true);\n }\n Selection selection = new Selection(bb.getX(), bb.getY(), bb.getWidth(), bb.getHeight(), new Color4f(-1.0f, 0, 0, 0), bb.isSource());\n selectionList.add(selection);\n }\n selectionGroup.selections = selectionList.toArray(selectionGroup.selections);\n selectionGroup.containerID = e.getKey();\n selectionGroupList.add(selectionGroup);\n }\n SelectionGroup[] groups = new SelectionGroup[selectionGroupList.size()];\n selectionGroupList.toArray(groups);\n SelectionReport report = new SelectionReport();\n report.pointerId = pointerID;\n report.renderType = user.getCurrentRenderType();\n report.selectionGroups = groups;\n rendererPrx.renderAllLinks(report);\n}\n"
|
"protected IReportItemExecutor prepareChildExecutor() throws Exception {\n if (prepareFirstChild) {\n if (fragment == null && nextOffset == -1) {\n DocumentExtension docExt = (DocumentExtension) content.getExtension(IContent.DOCUMENT_EXTENSION);\n if (docExt != null) {\n nextOffset = docExt.getFirstChild();\n }\n }\n }\n if (fragment != null) {\n if (sections == null) {\n sections = fragment.getSections();\n nextSection = -1;\n useNextSection = true;\n }\n if (useNextSection) {\n useNextSection = false;\n nextSection++;\n if (sections == null || nextSection >= sections.length) {\n return null;\n }\n Object leftEdge = sections[nextSection][0];\n if (leftEdge == Segment.LEFT_MOST_EDGE) {\n DocumentExtension docExt = (DocumentExtension) content.getExtension(IContent.DOCUMENT_EXTENSION);\n if (docExt != null) {\n nextOffset = docExt.getFirstChild();\n }\n } else {\n InstanceIndex leftIndex = (InstanceIndex) leftEdge;\n InstanceID leftId = leftIndex.getInstanceID();\n long leftOffset = leftIndex.getOffset();\n if (leftOffset == -1) {\n DocumentExtension docExt = (DocumentExtension) content.getExtension(IContent.DOCUMENT_EXTENSION);\n if (docExt != null) {\n leftOffset = docExt.getFirstChild();\n }\n }\n if (leftOffset != -1) {\n IContent leftContent = reader.loadContent(leftOffset);\n InstanceID contentId = leftContent.getInstanceID();\n if (isSameInstance(contentId, leftId)) {\n nextOffset = leftIndex.getOffset();\n } else {\n DocumentExtension docExt = (DocumentExtension) leftContent.getExtension(IContent.DOCUMENT_EXTENSION);\n if (docExt != null) {\n nextOffset = docExt.getNext();\n }\n }\n }\n doSkipToExecutor(leftId, nextOffset);\n uniqueId = leftId.getUniqueID();\n }\n }\n }\n ReportItemExecutor childExecutor = doCreateExecutor(nextOffset);\n if (childExecutor != null) {\n IContent childContent = childExecutor.execute();\n if (childContent != null) {\n if (fragment != null) {\n InstanceID childId = childContent.getInstanceID();\n Fragment childFragment = fragment.getFragment(childId);\n if (childFragment != null) {\n childExecutor.setFragment(childFragment);\n }\n Object rightEdge = sections[nextSection][1];\n if (rightEdge != Segment.RIGHT_MOST_EDGE) {\n InstanceIndex rightIndex = (InstanceIndex) rightEdge;\n InstanceID rightId = rightIndex.getInstanceID();\n if (isSameInstance(rightId, childId)) {\n useNextSection = true;\n }\n }\n }\n DocumentExtension docExt = (DocumentExtension) childContent.getExtension(IContent.DOCUMENT_EXTENSION);\n if (docExt != null) {\n if (docExt.getIndex() == nextOffset) {\n nextOffset = docExt.getNext();\n }\n }\n }\n }\n return childExecutor;\n}\n"
|
"private void addRelatedExtendedInterfaces(ObjectType instance, Set<ObjectType> set) {\n FunctionType constructor = instance.getConstructor();\n if (constructor != null) {\n if (!set.add(instance)) {\n return;\n }\n for (ObjectType interfaceType : constructor.getExtendedInterfaces()) {\n addRelatedExtendedInterfaces(interfaceType, set);\n }\n }\n}\n"
|
"public void clear() {\n takeWriteLock();\n try {\n recordsWithNullValue.clear();\n recordMap.clear();\n } finally {\n releaseWriteLock();\n }\n}\n"
|
"public BankOrder save(BankOrder entity) {\n try {\n BankOrderService bankOrderService = Beans.get(BankOrderService.class);\n bankOrderService.generateSequence(entity);\n if (entity.getStatusSelect() == BankOrderRepository.STATUS_DRAFT || entity.getStatusSelect() == BankOrderRepository.STATUS_AWAITING_SIGNATURE) {\n entity.setAmount(bankOrderService.computeTotalAmount(entity));\n }\n return super.save(entity);\n } catch (Exception e) {\n throw new PersistenceException(e.getLocalizedMessage());\n }\n}\n"
|
"public static void init() {\n if (ConfigurationHandler.resourcePlants) {\n Block farmland = null;\n OreDictHelper.getRegisteredOres();\n Items.initFruits();\n diamahlia = new BlockModPlant(farmland, net.minecraft.init.Blocks.diamond_ore, Items.nuggetDiamond, Items.nuggetDiamondMeta, 5, 6);\n ferranium = new BlockModPlant(farmland, net.minecraft.init.Blocks.iron_ore, Items.nuggetIron, Items.nuggetIronMeta, 4, 1);\n aurigold = new BlockModPlant(farmland, net.minecraft.init.Blocks.gold_ore, net.minecraft.init.Items.gold_nugget, 0, 4, 6);\n lapender = new BlockModPlant(farmland, net.minecraft.init.Blocks.lapis_ore, net.minecraft.init.Items.dye, 4, 3, 6);\n emeryllis = new BlockModPlant(farmland, net.minecraft.init.Blocks.emerald_ore, Items.nuggetEmerald, Items.nuggetEmeraldMeta, 5, 6);\n redstodendron = new BlockModPlant(farmland, net.minecraft.init.Blocks.redstone_ore, net.minecraft.init.Items.redstone, 0, 3, 6);\n RegisterHelper.registerCrop(diamahlia, Names.Plants.diamahlia);\n RegisterHelper.registerCrop(ferranium, Names.Plants.ferranium);\n RegisterHelper.registerCrop(aurigold, Names.Plants.aurigold);\n RegisterHelper.registerCrop(lapender, Names.Plants.lapender);\n RegisterHelper.registerCrop(emeryllis, Names.Plants.emeryllis);\n RegisterHelper.registerCrop(redstodendron, Names.Plants.redstodendron);\n if (OreDictHelper.oreCopper != null) {\n cuprosia = new BlockModPlant(farmland, OreDictHelper.oreCopper, OreDictHelper.oreCopperMeta, Items.nuggetCopper, Items.nuggetCopperMeta, 3, 6);\n RegisterHelper.registerBlock(cuprosia, Names.Crops.cropCuprosia);\n }\n if (OreDictHelper.oreTin != null) {\n petinia = new BlockModPlant(farmland, OreDictHelper.oreTin, OreDictHelper.oreTinMeta, Items.nuggetTin, Items.nuggetTinMeta, 3, 6);\n RegisterHelper.registerBlock(petinia, Names.Crops.cropPetinia);\n }\n if (OreDictHelper.oreLead != null) {\n plombean = new BlockModPlant(farmland, OreDictHelper.oreLead, OreDictHelper.oreLeadMeta, Items.nuggetLead, Items.nuggetLeadMeta, 4, 6);\n RegisterHelper.registerBlock(plombean, Names.Crops.cropPlombean);\n }\n if (OreDictHelper.oreSilver != null) {\n silverweed = new BlockModPlant(farmland, OreDictHelper.oreSilver, OreDictHelper.oreSilverMeta, Items.nuggetSilver, Items.nuggetSilverMeta, 4, 6);\n RegisterHelper.registerBlock(silverweed, Names.Crops.cropSilverweed);\n }\n if (OreDictHelper.oreAluminum != null) {\n jaslumine = new BlockModPlant(farmland, OreDictHelper.oreAluminum, OreDictHelper.oreAluminumMeta, Items.nuggetAluminum, Items.nuggetAluminumMeta, 4, 1);\n RegisterHelper.registerBlock(jaslumine, Names.Crops.cropJaslumine);\n }\n if (OreDictHelper.oreNickel != null) {\n niccissus = new BlockModPlant(farmland, OreDictHelper.oreNickel, OreDictHelper.oreNickelMeta, Items.nuggetNickel, Items.nuggetNickelMeta, 4, 6);\n RegisterHelper.registerBlock(niccissus, Names.Crops.cropNiccissus);\n }\n if (OreDictHelper.orePlatinum != null) {\n platiolus = new BlockModPlant(farmland, OreDictHelper.orePlatinum, OreDictHelper.orePlatinumMeta, Items.nuggetPlatinum, Items.nuggetPlatinumMeta, 4, 1);\n RegisterHelper.registerBlock(platiolus, Names.Crops.cropPlatiolus);\n }\n if (OreDictHelper.oreOsmium != null) {\n osmonium = new BlockModPlant(farmland, OreDictHelper.oreOsmium, OreDictHelper.oreOsmiumMeta, Items.nuggetOsmium, Items.nuggetOsmiumMeta, 4, 6);\n RegisterHelper.registerBlock(osmonium, Names.Crops.cropOsmonium);\n }\n LogHelper.debug(\"String_Node_Str\");\n }\n}\n"
|
"private void orderNetworkByGroups(SortedMap<Integer, FabricLink> existingOrd, List<String> groupOrder) {\n Map<String, List<FabricLink>> groups = new TreeMap<String, List<FabricLink>>();\n for (Map.Entry<Integer, FabricLink> entry : existingOrd.entrySet()) {\n FabricLink fl = entry.getValue();\n String rel = fl.getRelation();\n if (groups.get(rel) == null) {\n groups.put(rel, new ArrayList<FabricLink>());\n }\n groups.get(rel).add(fl);\n }\n int rowIdx = 0;\n for (String suffix : groupOrder) {\n for (String fullRel : groups.keySet()) {\n if (bestSuffixMatch(fullRel, suffix, groupOrder)) {\n List<FabricLink> group = groups.get(fullRel);\n for (FabricLink fl : group) {\n existingOrd.put(rowIdx, fl);\n rowIdx++;\n }\n }\n }\n }\n return;\n}\n"
|
"public static String getStringContent(IFile file) throws CoreException, IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(file.getContents(), StandardCharsets.UTF_8));\n String str = null;\n StringBuilder sb = new StringBuilder();\n while ((str = r.readLine()) != null) {\n sb.append(str + '\\n');\n }\n return sb.toString();\n}\n"
|
"public static <T, S> Sequence<T> unique(final Iterable<? extends T> iterable, final Callable1<? super T, ? extends S> callable) {\n return new Sequence<T>() {\n public Iterator<T> iterator() {\n return Iterators.filter(iterable.iterator(), new UniquePredicate<T, S>(callable));\n }\n };\n}\n"
|
"public static boolean preferReconnect() {\n if (hasWaittimeLinks && JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_ALLOW_RECONNECT, true) && SubConfiguration.getConfig(\"String_Node_Str\").getBooleanProperty(\"String_Node_Str\", true) && JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_LATEST_RECONNECT_RESULT, true))\n return true;\n return false;\n}\n"
|
"protected void onDraw(Canvas canvas) {\n int startX = getScrollX() + (iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding));\n int endX = getScrollX() + (iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding);\n int lineStartY = getScrollY() + getHeight() - getPaddingBottom();\n paint.setAlpha(255);\n if (iconLeftBitmaps != null) {\n Bitmap icon = iconLeftBitmaps[!isInternalValid() ? 3 : !isEnabled() ? 2 : hasFocus() ? 1 : 0];\n int iconLeft = startX - iconPadding - iconOuterWidth + (iconOuterWidth - icon.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - icon.getHeight()) / 2;\n canvas.drawBitmap(icon, iconLeft, iconTop, paint);\n }\n if (iconRightBitmaps != null) {\n Bitmap icon = iconRightBitmaps[!isInternalValid() ? 3 : !isEnabled() ? 2 : hasFocus() ? 1 : 0];\n int iconRight = endX + iconPadding + (iconOuterWidth - icon.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - icon.getHeight()) / 2;\n canvas.drawBitmap(icon, iconRight, iconTop, paint);\n }\n if (hasFocus() && showClearButton && !TextUtils.isEmpty(getText())) {\n paint.setAlpha(255);\n int buttonLeft;\n if (isRTL()) {\n buttonLeft = startX;\n } else {\n buttonLeft = endX - iconOuterWidth;\n }\n Bitmap clearButtonBitmap = clearButtonBitmaps[0];\n buttonLeft += (iconOuterWidth - clearButtonBitmap.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - clearButtonBitmap.getHeight()) / 2;\n canvas.drawBitmap(clearButtonBitmap, buttonLeft, iconTop, paint);\n }\n if (!hideUnderline) {\n lineStartY += bottomSpacing;\n if (!isInternalValid()) {\n paint.setColor(errorColor);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);\n } else if (!isEnabled()) {\n paint.setColor(underlineColor != -1 ? underlineColor : baseColor & 0x00ffffff | 0x44000000);\n float interval = getPixel(1);\n for (float xOffset = 0; xOffset < getWidth(); xOffset += interval * 3) {\n canvas.drawRect(startX + xOffset, lineStartY, startX + xOffset + interval, lineStartY + getPixel(1), paint);\n }\n } else if (hasFocus()) {\n paint.setColor(primaryColor);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);\n } else {\n paint.setColor(underlineColor != -1 ? underlineColor : baseColor & 0x00ffffff | 0x1E000000);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(1), paint);\n }\n }\n textPaint.setTextSize(bottomTextSize);\n Paint.FontMetrics textMetrics = textPaint.getFontMetrics();\n float relativeHeight = -textMetrics.ascent - textMetrics.descent;\n float bottomTextPadding = bottomTextSize + textMetrics.ascent + textMetrics.descent;\n if ((hasFocus() && hasCharactersCounter()) || !isCharactersCountValid()) {\n textPaint.setColor(isCharactersCountValid() ? (baseColor & 0x00ffffff | 0x44000000) : errorColor);\n String charactersCounterText = getCharactersCounterText();\n canvas.drawText(charactersCounterText, isRTL() ? startX : endX - textPaint.measureText(charactersCounterText), lineStartY + bottomSpacing + relativeHeight, textPaint);\n }\n if (textLayout != null) {\n if (tempErrorText != null || ((helperTextAlwaysShown || hasFocus()) && !TextUtils.isEmpty(helperText))) {\n textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : (baseColor & 0x00ffffff | 0x44000000));\n canvas.save();\n if (isRTL()) {\n canvas.translate(endX - textLayout.getWidth(), lineStartY + bottomSpacing - bottomTextPadding);\n } else {\n canvas.translate(startX + getBottomTextLeftOffset(), lineStartY + bottomSpacing - bottomTextPadding);\n }\n textLayout.draw(canvas);\n canvas.restore();\n }\n }\n if (floatingLabelEnabled && !TextUtils.isEmpty(floatingLabelText)) {\n textPaint.setTextSize(floatingLabelTextSize);\n textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, floatingLabelTextColor != -1 ? floatingLabelTextColor : (baseColor & 0x00ffffff | 0x44000000), primaryColor));\n float floatingLabelWidth = textPaint.measureText(floatingLabelText.toString());\n int floatingLabelStartX;\n if ((getGravity() & Gravity.RIGHT) == Gravity.RIGHT || isRTL()) {\n floatingLabelStartX = (int) (endX - floatingLabelWidth);\n } else if ((getGravity() & Gravity.LEFT) == Gravity.LEFT) {\n floatingLabelStartX = startX;\n } else {\n floatingLabelStartX = startX + (int) (getInnerPaddingLeft() + (getWidth() - getInnerPaddingLeft() - getInnerPaddingRight() - floatingLabelWidth) / 2);\n }\n int floatingLabelStartY = innerPaddingTop + floatingLabelTextSize + floatingLabelPadding;\n int distance = floatingLabelPadding;\n int floatingLabelStartY = (int) (innerPaddingTop + floatingLabelTextSize + floatingLabelPadding - distance * (floatingLabelAlwaysShown ? 1 : floatingLabelFraction) + getScrollY());\n int alpha = ((int) ((floatingLabelAlwaysShown ? 1 : floatingLabelFraction) * 0xff * (0.74f * focusFraction + 0.26f) * (floatingLabelTextColor != -1 ? 1 : Color.alpha(floatingLabelTextColor) / 256f)));\n textPaint.setAlpha(alpha);\n canvas.drawText(floatingLabelText.toString(), floatingLabelStartX, position, textPaint);\n }\n if (hasFocus() && singleLineEllipsis && getScrollX() != 0) {\n paint.setColor(isInternalValid() ? primaryColor : errorColor);\n float startY = lineStartY + bottomSpacing;\n int ellipsisStartX;\n if (isRTL()) {\n ellipsisStartX = endX;\n } else {\n ellipsisStartX = startX;\n }\n int signum = isRTL() ? -1 : 1;\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize * 5 / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize * 9 / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n }\n super.onDraw(canvas);\n}\n"
|
"public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException {\n String preName = Mvcs.getName();\n Context preContext = Mvcs.resetALL();\n HttpServletRequest request = (HttpServletRequest) req;\n HttpServletResponse response = (HttpServletResponse) resp;\n try {\n if (sp != null)\n req = sp.filter(request, response, Mvcs.getServletContext());\n if (needRealName && skipMode) {\n Enumeration<String> names = Mvcs.getServletContext().getAttributeNames();\n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n if (name.endsWith(\"String_Node_Str\")) {\n this.selfName = name.substring(0, name.length() - \"String_Node_Str\".length());\n break;\n }\n }\n needRealName = false;\n }\n Mvcs.set(this.selfName, request, response);\n RequestPath path = Mvcs.getRequestPathObject(request);\n if (null == ignorePtn || !ignorePtn.matcher(path.getUrl()).find()) {\n if (handler.handle(request, response))\n return;\n }\n Mvcs.updateRequestAttributes((HttpServletRequest) req);\n chain.doFilter(req, resp);\n } finally {\n Mvcs.resetALL();\n if (null != (request.getAttribute(\"String_Node_Str\"))) {\n if (preName != null)\n Mvcs.set(preName, request, response);\n if (preContext != null)\n Mvcs.ctx.reqThreadLocal.set(preContext);\n }\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.