content
stringlengths
40
137k
"public void processCommand(ICommandSender sender, String[] arguments) {\n if (arguments.length <= 0)\n throw new WrongUsageException(StringUtil.localizeAndFormat(\"String_Node_Str\", this.getCommandUsage(sender)));\n if (arguments[0].matches(\"String_Node_Str\")) {\n commandTrades(sender, arguments...
"public SnapshotVO createSnapshotImpl(Long volumeId, Long policyId, Long snapshotId) throws ResourceAllocationException {\n VolumeVO v = _volsDao.findById(volumeId);\n if (v != null && _volsDao.getHypervisorType(v.getId()).equals(HypervisorType.KVM)) {\n UserVmVO uservm = _vmDao.findById(v.getInstanceId())...
"public Enumeration getAttributeNames(int scope) {\n if (scope == PortletSession.APPLICATION_SCOPE) {\n return httpSession.getAttributeNames();\n } else {\n Vector portletScopedNames = new Vector();\n for (Enumeration en = httpSession.getAttributeNames(); en.hasMoreElements(); ) {\n ...
"private List<Object[]> initDataSet(Indicator indicator, EMap<Indicator, AnalyzedDataSet> indicToRowMap, Object object) {\n AnalyzedDataSet analyzedDataSet = indicToRowMap.get(indicator);\n List<Object[]> valueObjectList = null;\n if (analyzedDataSet == null) {\n analyzedDataSet = AnalysisFactory.eINSTA...
"private void createCube(TabularCubeHandle cubeHandle, CubeMaterializer cubeMaterializer) throws IOException, BirtException, DataException {\n List measureNames = new ArrayList();\n List measureGroups = cubeHandle.getContents(CubeHandle.MEASURE_GROUPS_PROP);\n for (int i = 0; i < measureGroups.size(); i++) {\n...
"private void initFilter() {\n EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(entityClass);\n String indexName = metadata.getIndexName();\n if (null == filter) {\n return;\n }\n List<String> clauses = tokenize(filter, INTER_CLAUSE_PATTERN);\n clauses = parseFilterForBetweenC...
"public boolean canBeTargetedBy(MageObject source, Game game) {\n if (this.hasLost() || this.hasLeft()) {\n return false;\n }\n if (source != null) {\n if (abilities.containsKey(ShroudAbility.getInstance().getId())) {\n return false;\n }\n if (abilities.containsKey(Hexpro...
"public List<IComponent> filterNeededComponents(Item item, RepositoryNode seletetedNode, ERepositoryObjectType type) {\n List<IComponent> neededComponents = new ArrayList<IComponent>();\n if (!(item instanceof ExampleDemoConnectionItem)) {\n return neededComponents;\n }\n IComponentsService service =...
"public void run() {\n if (operation == Installer.InstallerCallback.OPERATION_INSTALL) {\n PackageManagerCompat.setInstaller(mPm, app.id);\n }\n setSupportProgressBarIndeterminateVisibility(false);\n myAppObserver.onChange();\n}\n"
"protected ElementParameterType getParameterType(NodeType node, String paramName) {\n if (node != null && !hasAPI) {\n ElementParameterType apiParamType = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n if (apiParamType == null) {\n ParameterUtilTool.addParameterType(node, ...
"public void processTouchEvent(MotionEvent ev) {\n final int action = MotionEventCompat.getActionMasked(ev);\n final int actionIndex = MotionEventCompat.getActionIndex(ev);\n if (action == MotionEvent.ACTION_DOWN) {\n cancel();\n }\n if (mVelocityTracker == null) {\n mVelocityTracker = Velo...
"public static int doInvitationLogin(String invitationToken, UserRequest ureq, Locale locale) {\n InvitationDAO invitationDao = CoreSpringFactory.getImpl(InvitationDAO.class);\n boolean hasPolicies = invitationDao.hasInvitations(invitationToken, new Date());\n if (!hasPolicies) {\n return LOGIN_DENIED;\...
"private List<LogEntry> extractTransactionFromLog(long txId, long expectedVersion, ReadableByteChannel log) throws IOException {\n List<LogEntry> logEntryList = null;\n Map<Integer, List<LogEntry>> transactions = new HashMap<Integer, List<LogEntry>>();\n LogEntry entry;\n while ((entry = LogIoUtils.readEntr...
"protected void initialize(Axis1D parent) {\n this.children = new CopyOnWriteArraySet<Axis1D>();\n this.listeners = new CopyOnWriteArraySet<AxisListener1D>();\n this.setDefaults();\n this.setParent(parent);\n}\n"
"private IDocumentManager getDocumentManager(CubeQueryExecutor executor) throws DataException, IOException {\n if (executor.getContext().getMode() == DataEngineContext.DIRECT_PRESENTATION || executor.getContext().getMode() == DataEngineContext.MODE_GENERATION) {\n return DocumentManagerFactory.loadFileDocumen...
"public void onPlayerTeleport(PlayerTeleportEvent event) {\n String worldTo = event.getTo().getWorld().getName();\n Player player = event.getPlayer();\n String worldFrom = event.getFrom().getWorld().getName();\n plugin.debugger.debugEvent(MultiInvEvent.WORLD_CHANGE, new String[] { player.getName(), worldFro...
"public boolean onSingleTapUp(MotionEvent e) {\n select(mCurrentSelection, false);\n int index = computeSelectedIndex(e.getX(), e.getY());\n if (index >= 0 && index < mAllImages.getCount()) {\n if (mListener != null)\n mListener.onImageClicked(index);\n return true;\n }\n return ...
"public static VCard _createVCardFromXml(String xmlText) {\n VCard vCard = new VCard();\n try {\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n byte[] bytes;\n try...
"public void appendLine(Date date, String str) throws Exception {\n this.append(date, str + \"String_Node_Str\");\n}\n"
"public void getFilterType() {\n NullFilter target = new NullFilter(ColumnType.NULL);\n assertEquals(target.getFilterType(), FilterType.NULL);\n}\n"
"private void doUpdateEndDate(Spinner spinner, CommodityViewModel orderCommodityViewModel, TextView textViewStartDate, TextView textViewEndDate) {\n Integer orderReasonPosition = orderCommodityViewModel.getOrderReasonPosition();\n String item = ((OrderReason) spinner.getItemAtPosition(orderReasonPosition)).getRea...
"public void bindView(View view, Context context, Cursor cursor) {\n final String screenshotURL = cursor.getString(cursor.getColumnIndex(\"String_Node_Str\"));\n final ImageView imageView = (ImageView) view.findViewById(R.id.theme_grid_item_image);\n imageView.setImageBitmap(null);\n WordPress.imageLoader.g...
"public void moveTaskToBottom(int taskId) {\n final long origId = Binder.clearCallingIdentity();\n try {\n synchronized (mWindowMap) {\n Task task = mTaskIdToTask.get(taskId);\n if (task == null) {\n Slog.e(TAG, \"String_Node_Str\" + taskId + \"String_Node_Str\");\n ...
"public void refresh() {\n Plugin.getDisplay().syncExec(new Runnable() {\n public void run() {\n getTreeViewer().refresh(true);\n }\n });\n}\n"
"public Integer evaluate() {\n switch(values.setDocument(docId)) {\n case 0:\n return null;\n case 1:\n return ((Long) values.nextValue()).intValue();\n default:\n throw new GroupByOnArrayUnsupportedException(columnName());\n }\n return ((Long) values.nextV...
"public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n if (action.equalsIgnoreCase(Intent.ACTION_PACKAGE_ADDED) || action.equalsIgnoreCase(Intent.ACTION_PACKAGE_REPLACED)) {\n RouterServiceValidator.invalidateList(context);\n return;\n }\n if (!(action...
"public RecordSource compileSource(JournalReaderFactory factory, CharSequence query) throws ParserException, JournalException {\n RecordSource rs = cache.peek(query);\n if (rs == null) {\n cache.put(query.toString(), rs = resetAndCompile(factory, query));\n } else {\n rs.reset();\n }\n retu...
"private <T> boolean handleProcessEntry(FlowletProcessEntry<T> entry, BlockingQueue<FlowletProcessEntry<?>> processQueue) {\n if (!entry.shouldProcess()) {\n return false;\n }\n ProcessMethod<T> processMethod = entry.getProcessSpec().getProcessMethod();\n if (processMethod.needsInput()) {\n fl...
"private void initChat() {\n QBChatService qbChatService;\n QBPrivateChatManager qbPrivateChatManager;\n qbChatService = QBChatService.getInstance();\n if (!qbChatService.isLoggedIn()) {\n loginToChat();\n }\n qbPrivateChatManager = qbChatService.getPrivateChatManager();\n qbPrivateChatManag...
"public void run() {\n try {\n topicSubscriber = new TopicSubscriber(Constants.TENANT_TOPIC);\n topicSubscriber.setMessageListener(new TenantEventMessageListener());\n Thread subscriberThread = new Thread(topicSubscriber);\n subscriberThread.start();\n if (log.isDebugEnabled()) {\n...
"protected void onPostExecute(APIResponse.CODE c) {\n super.onPostExecute(c);\n if (event != null && activity != null) {\n activity.setActionBarTitle(event.getEventName());\n eventName.setText(event.getEventName());\n if (event.getDateString().isEmpty()) {\n activity.findViewById(R...
"public static <E> List<E> newArrayList(final Collection<? extends E> elements) {\n return new ArrayList<E>(elements);\n}\n"
"private String getFormatStr(IAtsTeamDefinition teamDef) throws OseeCoreException {\n if (teamDef != null) {\n Artifact artifact = new TeamDefinitionArtifactStore(teamDef).getArtifact();\n if (artifact != null) {\n String formatStr = artifact.getSoleAttributeValue(AtsAttributeTypes.ActionDet...
"public void transform(NodeType node) {\n String openBrStr = \"String_Node_Str\";\n String closeBrStr = \"String_Node_Str\";\n String openBrPattern = Pattern.quote(openBrStr);\n String closeBrPattern = Pattern.quote(closeBrStr);\n ProcessType item = (ProcessType) node.eContainer();\n for (Object o : i...
"public void begin(GlimpseContext context) {\n GL3 gl = context.getGL().getGL3();\n this.useProgram(context.getGL(), true);\n if (this.handles == null) {\n this.handles = new ProgramHandles(gl, getShaderProgram().program());\n }\n gl.glEnableVertexAttribArray(this.handles.inXy);\n gl.glEnableVe...
"public void setTransactionIsolation(int level) throws SQLException {\n getDelegate().setTransactionIsolation(level);\n}\n"
"public AddressResponse address(AddressRequest addressRequest, String authorizationHeader) throws BaseException {\n String emailConfirmationToken = getEmailConfirmationToken(authorizationHeader);\n Optional<Investor> oInvestor = findInvestorOrThrowException(emailConfirmationToken);\n checkIfWalletAddressIsAlre...
"public void refresh() {\n List<Entry> entries = dataComp.retrieveAllEntries();\n if (!entries.isEmpty() && emptyLabel != null) {\n emptyLabel.dispose();\n emptyLabel = null;\n }\n for (int i = 0; i < entries.size(); i++) {\n Entry entry = dataComp.retrieveAllEntries().get(i);\n ...
"public void testAccuracy() {\n int seed = 7364181;\n Random r = new Random(seed);\n int numItems = 1000000;\n int[] xs = new int[numItems];\n int maxScale = 20;\n for (int i = 0; i < numItems; i++) {\n int scale = r.nextInt(maxScale);\n xs[i] = r.nextInt(1 << scale);\n }\n double ...
"private String getMappedFieldName() {\n if (hasAnnotation(Property.class)) {\n Property mv = (Property) mappingAnnotations.get(Property.class);\n if (!mv.value().equals(Mapper.IGNORED_FIELDNAME))\n return mv.value();\n } else if (hasAnnotation(Reference.class)) {\n Reference mr = ...
"public void basicParameterValidation(String name, String description, String namespace) throws AnnotationValidationException {\n if (name.isEmpty()) {\n throw new AnnotationValidationException(MessageFormat.format(\"String_Node_Str\" + \"String_Node_Str\", extensionClassFullName));\n }\n if (descriptio...
"protected void onMeasure(int widthSpec, int heightSpec) {\n int maxWidth = 0;\n int maxHeight = 0;\n for (int i = 0, n = mZoomRatios.length; i < n; ++i) {\n float value = mZoomRatios[i];\n Texture tex = StringTexture.newInstance(sZoomFormat.format(value), mFontSize, FONT_COLOR);\n if (max...
"public void resolveBottomBorder() {\n if (rows.size() == 0) {\n return;\n }\n Row row = (Row) rows.getCurrent();\n HashSet cells = new HashSet();\n for (int i = 0; i < columnNumber; i++) {\n CellArea cell = row.getCell(start + i);\n if (cell != null) {\n if (cell instance...
"void backward(double[] a, int n) {\n if (n < 2) {\n return;\n }\n if (n > workspace.length) {\n workspace = new double[n];\n }\n int nh = n >> 1;\n int nh1 = nh - 1;\n workspace[0] = C * (a[nh1] - a[n - 1]);\n workspace[n - 1] = C * (a[nh1] + a[n - 1]);\n for (int i = 0, j = 1;...
"protected void updateProject(final List<ValueEventWrapper> values, final Integer projectId, UserExecutionContext context, String comment) throws CommandException {\n final Date historyDate = new Date();\n final User user = context.getUser();\n final Project project = em().find(Project.class, projectId);\n ...
"public void update() throws IOException {\n HttpServletRequest request = ServletActionContext.getRequest();\n HttpServletResponse resp = ServletActionContext.getResponse();\n Module module = new Module();\n module.setModuleCode(request.getParameter(\"String_Node_Str\"));\n module.setModuleName(request.g...
"private Group getCorrectAltLocGroup(Character altLoc, String recordName, Character aminoCode1, String groupCode3, long seq_id) {\n List<Atom> atoms = current_group.getAtoms();\n if (atoms.size() > 0) {\n Atom a1 = atoms.get(0);\n if (a1.getAltLoc().equals(altLoc)) {\n return current_grou...
"public CSoarAgentWrapper CreateAgent(String name) {\n System.out.println(\"String_Node_Str\");\n throw new RuntimeException(\"String_Node_Str\");\n}\n"
"public boolean isSmall() {\n boolean small;\n if (buttonMode && StringUtils.isBlank(editPassword.getValue())) {\n small = false;\n } else {\n small = editPassword.getValue().length() < 6;\n }\n updateAfterValidation(!small);\n return small;\n}\n"
"public static void copy(final ParameterValueGroup values, final ParameterValueGroup destination) throws InvalidParameterNameException, InvalidParameterValueException {\n final Integer ZERO = 0;\n final Map<String, Integer> occurrences = new HashMap<>();\n for (final GeneralParameterValue value : values.values...
"public static void main(String[] args) {\n int nThreads = (args.length == 0) ? 10 : Integer.parseInt(args[0]);\n final AllTest allTest = new AllTest(nThreads);\n allTest.start();\n Executors.newSingleThreadExecutor().execute(new Runnable() {\n public void run() {\n while (true) {\n ...
"public boolean equals(Object that) {\n if (that == null || this.getClass() != that.getClass()) {\n return false;\n }\n JsObjectLiteral thatLiteral = (JsObjectLiteral) that;\n return internable == thatLiteral.internable && properties.equals(thatLiteral.properties);\n}\n"
"private String newTransactionEndpointUrl() {\n logger.debug(\"String_Node_Str\", url);\n HttpPost request = new HttpPost(url);\n request.setHeader(new BasicHeader(HTTP.CONTENT_TYPE, \"String_Node_Str\"));\n CloseableHttpResponse response = executeRequest(request);\n Header location = response.getHeaders...
"public void onListItemClick(ListView l, View v, int position, long id) {\n FileHolder item = (FileHolder) mAdapter.getItem(position);\n openInformingPathBar(item);\n}\n"
"private void addFilesTo(IResource resource, Collection<IResource> allKids) {\n if (resource instanceof IFile) {\n allKids.add(resource);\n return;\n }\n if (resource instanceof IFolder) {\n IFolder folder = (IFolder) resource;\n IResource[] kids = null;\n try {\n ...
"public void staticLinkage() {\n BuildRuleResolver ruleResolver = new BuildRuleResolver();\n SourcePathResolver pathResolver = new SourcePathResolver(ruleResolver);\n BuildTarget target = BuildTargetFactory.newInstance(\"String_Node_Str\");\n BuildRuleParams params = BuildRuleParamsFactory.createTrivialBuil...
"public void performAction() {\n FileTable fileTable = mainFrame.getActiveTable();\n FileTableModel tableModel = fileTable.getFileTableModel();\n int nbRows = tableModel.getRowCount();\n for (int i = fileTable.getCurrentFolder().getParent() == null ? 0 : 1; i < nbRows; i++) tableModel.setRowMarked(i, true);...
"public void fillContextMenu(IMenuManager menu) {\n TreeSelection treeSelection = ((TreeSelection) this.getContext().getSelection());\n List<IFile> selectedFiles = new ArrayList<IFile>();\n if (treeSelection.size() == 1) {\n Object obj = treeSelection.getFirstElement();\n if (obj instanceof IFold...
"public void setDeadline(Date deadline) {\n timer24hour.cancel();\n timer1hour.cancel();\n timer0hour.cancel();\n if (deadline != null) {\n final Date aDayBeforeTheDeadline = new Date(deadline.getTime());\n aDayBeforeTheDeadline.setHours(aDayBeforeTheDeadline.getHours() - 24);\n final D...
"public void testMipmapGenerator() throws Exception {\n BoxMipmapGenerator boxMipmapGenerator = new BoxMipmapGenerator(z, false, Utils.PNG_FORMAT, boxWidth, boxHeight, boxDirectory, 0, 0, lastRow, 0, lastColumn, false);\n for (int row = 1; row < 3; row++) {\n for (int column = 2; column < 4; column++) {\n ...
"public Configuration build() throws IOException {\n List<Library> libs = new ArrayList<>();\n for (Library.Reference ref : libraries) {\n Library file = ref.getLibrary(uri, path, signer);\n for (Library l : libs) {\n if (Files.isSameFile(l.getPath(), file.getPath())) {\n t...
"public static World getIslandWorld() {\n if (islandWorld == null) {\n if (Settings.useOwnGenerator) {\n islandWorld = Bukkit.getServer().getWorld(Settings.worldName);\n } else {\n islandWorld = WorldCreator.name(Settings.worldName).type(WorldType.FLAT).environment(World.Environme...
"protected Dialog onCreateDialog(int id) {\n switch(id) {\n case DIALOG_SELECTTIME:\n Calendar oldTime = null;\n boolean travelAt = true;\n if (routeSearch.arrival > 0) {\n travelAt = false;\n oldTime = Calendar.getInstance();\n old...
"private Map<Integer, Double> getRankedTagListSocialBLLHybrid(int userID, Long timesString, double beta, double exponentSocial) {\n Map<Integer, Double> rankedList = new HashMap<Integer, Double>();\n String user = this.users.get(userID);\n List<String> friendList = network.get(user);\n HashMap<Integer, Doub...
"public static void gracefulRackTopologyOutput(Map<String, String> racksTopology, String filename, String delimeter) throws Exception {\n List<Object> list = new ArrayList<Object>();\n if (racksTopology != null && racksTopology.size() > 0) {\n Iterator<Entry<String, String>> it = racksTopology.entrySet().i...
"public void microaggregate(final int[][] data, final Data bufferOT, final int startMA, final int numMA, final MicroaggregateFunction[] functions) {\n Map<Distribution, Integer> cache = new HashMap<Distribution, Integer>();\n for (int row = 0; row < data.length; row++) {\n if (subset == null || subset.cont...
"protected boolean playManaHandling(Ability ability, ManaCost unpaid, Game game) {\n boolean spendAnyMana = game.getContinuousEffects().asThough(ability.getSourceId(), AsThoughEffectType.SPEND_OTHER_MANA, ability, ability.getControllerId(), game);\n ManaCost cost;\n List<MageObject> producers;\n if (unpaid ...
"public void run() {\n while ((!isInterrupted()) && (!stopped)) {\n long now = System.currentTimeMillis();\n if (now > (lastChecked + pruneFlushInterval)) {\n try {\n UserGroupInformation.getLoginUser().doAs(new PrivilegedExceptionAction<Void>() {\n\n public...
"public static void main(String[] args) throws InterruptedException {\n Configuration CFG = Configuration.getInstance();\n CFG.setProperty(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n CFG.setProperty(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n Symbol symbol = Symbo...
"public void run(AccountManagerFuture<Account[]> future) {\n int samlAccounts = 0;\n try {\n hasSAMLAccount = future.getResult().length > 0;\n } catch (OperationCanceledException e) {\n } catch (IOException e) {\n } catch (AuthenticatorException e) {\n }\n mEnableFallback = !hasSAMLAccount;\...
"protected void reduce(final WritableComparable<?> key, final Iterable<Writable> values, final Context context) throws IOException, InterruptedException {\n try (CloseableIterator<GeoWaveData> data = ingestWithReducer.toGeoWaveData(key, primaryIndexId, globalVisibility, values)) {\n while (data.hasNext()) {\n...
"public boolean equals(Object object) {\n if (!(object instanceof PtidesEvent)) {\n return false;\n }\n PtidesEvent event = (PtidesEvent) object;\n return (super.equals(object) && event.token().equals(_token) && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() =...
"public void test_termId() throws Exception {\n String[] words = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n TermIdTrie t = buildSecondTrie(trieWithWords(words));\n Set<Integer> ids = new HashSet<Integer>();\n for (int i = 0; i < words.lengt...
"public void testGetSummoner() throws InterruptedException {\n try {\n Thread.sleep(1500);\n handler.getSummoner(SUMMONER_NAME_2);\n } catch (RequestException ex) {\n System.out.println(\"String_Node_Str\");\n ex.printStackTrace();\n }\n}\n"
"protected void onListItemClick(ListView l, View v, int position, long id) {\n final StationData station = (StationData) stationListAdapter.getItem(position);\n stationSelected(station);\n}\n"
"public void update(GameContainer container, StateBasedGame game, int delta) {\n if (Main.KEYDOWN[Input.KEY_Q] && !blockSelected) {\n inventory.prev();\n blockSelected = true;\n }\n if (Main.KEYDOWN[Input.KEY_E] && !blockSelected) {\n inventory.next();\n blockSelected = true;\n }...
"private List<Object> handlePropertyCell(Property dProp, Element cell) {\n Element myOwner = dProp.getOwner();\n List<Object> rSlots = new ArrayList<Object>();\n if (myOwner instanceof Stereotype && StereotypesHelper.hasStereotype(cell, (Stereotype) myOwner)) {\n ValueSpecification pDefault = null;\n ...
"public boolean addResource(Resource resource) {\n if (this.resources == null) {\n this.resources = new HashSet<Resource>();\n return this.resources.add(resource);\n}\n"
"public void triggerTriggerables(TreeReference ref) {\n TreeReference genericRef = ref.genericize();\n Vector triggered = (Vector) triggerIndex.get(genericRef);\n if (triggered == null) {\n return;\n Vector triggeredCopy = new Vector();\n for (int i = 0; i < triggered.size(); i++) triggeredCopy.ad...
"public static List<Coord2D> simplify(List<Coord2D> list, double tolerance) {\n int index = 0;\n double dmax = 0;\n double squareTolerance = tolerance * tolerance;\n int lastIndex = list.size() - 1;\n for (int i = 1; i < lastIndex; i++) {\n double d = PointTools.pointToLineDistance(list.get(0), li...
"public Settings parseSamplerSettings(OsuApiUser apiUser, String message, Language lang) throws UserException, SQLException, IOException {\n String[] remaining = message.split(\"String_Node_Str\");\n Settings settings = new Settings();\n settings.model = Model.GAMMA;\n for (int i = 0; i < remaining.length; ...
"public void handleData(LttngEvent event) {\n super.handleData(event);\n if (event != null) {\n fCheckPointNbEventsHandled++;\n ITmfTrace<?> trace = event.getTrace();\n StateTraceHelper helper = ftraceToManagerMap.get(trace);\n if (helper != null) {\n helper.incrementNumberR...
"public void assertAbility(Player player, String cardName, Ability ability, boolean flag) throws AssertionError {\n int count = 0;\n Permanent found = null;\n for (Permanent permanent : currentGame.getBattlefield().getAllActivePermanents(player.getId())) {\n if (permanent.getName().equals(cardName)) {\n...
"public List<Day> getSelectedDays() {\n List<Day> selectedDays = new ArrayList<>();\n for (Iterator<Month> monthIterator = monthAdapter.getData().iterator(); monthIterator.hasNext(); ) {\n Month month = monthIterator.next();\n for (Iterator<Day> dayIterator = month.getDaysWithoutTitlesAndOnlyCurrent...
"protected void createStudyEvent(FormProcessor fp, StudySubjectBean s) {\n int studyEventDefinitionId = fp.getInt(\"String_Node_Str\");\n String location = fp.getString(\"String_Node_Str\");\n Date startDate = s.getEventStartDate();\n if (studyEventDefinitionId > 0) {\n String locationTerm = resword....
"private AggregatesScanResult findNextResult() {\n while (currentTag != null && currentTag.hasNext()) {\n Map.Entry<byte[], byte[]> tagValue = currentTag.next();\n String tag = Bytes.toString(tagValue.getKey());\n if (tagPrefix != null && !tag.startsWith(tagPrefix)) {\n continue;\n ...
"public Parcelable onSaveInstanceState() {\n if (DEBUG)\n Log.d(TAG, \"String_Node_Str\" + mTransportState);\n Parcelable superState = super.onSaveInstanceState();\n SavedState ss = new SavedState(superState);\n ss.transportState = mTransportState;\n ss.appWidgetToShow = mAppWidgetToShow;\n ret...
"public static boolean updateFileConnection(ConnectionItem connectionItem, boolean show, boolean onlySimpleShow) {\n List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(connectionItem.getProperty().getId(), RelationshipItemBuilder.LATEST_VERSION, RelationshipItemBuilder.PROPERTY_RELATI...
"public void setShow(final Show value) {\n setTextToChild(\"String_Node_Str\", value != null && value != Show.notSpecified && value != Show.unknown ? value.toString() : null);\n}\n"
"public String getScriptOptions(UIComponent component) {\n Map<String, Object> attributes = component.getAttributes();\n Map<String, Object> options = new HashMap<String, Object>();\n RendererUtils utils = getUtils();\n utils.addToScriptHash(options, \"String_Node_Str\", component.getClientId() + \"String_N...
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_friend_details);\n avatarImageView = _findViewById(R.id.avatarImageView);\n nameTextView = _findViewById(R.id.nameTextView);\n onlineImageView = _findViewById(R.id.onlineImageView);...
"public String parseKeywords(Analyzer analyzer, String keywords) {\n System.out.println(keywords);\n StringBuilder sb = new StringBuilder(\"String_Node_Str\");\n try {\n TokenStream tokenStream = analyzer.tokenStream(null, new StringReader(keywords));\n CharTermAttribute cattr = tokenStream.addAt...
"public void setParents(List<String> parents, String worldName) {\n this.node.set(formatPath(worldName, parentPath), parents == null ? null : new ArrayList<>(parents));\n save();\n}\n"
"public static FileAccessService getFileAccessService() {\n if (fileAccessService == null) {\n fileAccessService = ServiceUtils.getService(bundleContext, FileAccessService.class);\n }\n return fileAccessService;\n}\n"
"public void visitMethodCallNode(ASTPtMethodCallNode node) throws IllegalActionException {\n _debug(node);\n int argCount = node.jjtGetNumChildren();\n _generateAllChildren(node);\n ptolemy.data.type.Type baseTokenType = ((ASTPtRootNode) node.jjtGetChild(0)).getType();\n if (argCount == 1 && baseTokenTyp...
"public static String replaceVars(String msg, String[] vars) {\n for (String str : vars) {\n String[] s = str.split(\"String_Node_Str\");\n varcache.put(s[0], s[1]);\n }\n for (String str : varcache.keySet()) {\n try {\n msg = msg.replace(\"String_Node_Str\" + str + \"String_Nod...
"public Iterable<NextWordsContainer> loadStoredNextWords() {\n FileInputStream inputStream = null;\n try {\n inputStream = mContext.openFileInput(mNextWordsStorageFilename);\n final int version = inputStream.read();\n if (version < 1) {\n Log.w(TAG, \"String_Node_Str\" + mNextWords...
"protected void prepareContentRect() {\n super.prepareContentRect();\n if (mDataNotSet)\n return;\n float width = mContentRect.width() + mOffsetLeft + mOffsetRight;\n float height = mContentRect.height() + mOffsetTop + mOffsetBottom;\n float diameter = getDiameter();\n float boxSize = diameter ...
"public void setCost(String c) {\n if (c.substring(0, 1).equals(\"String_Node_Str\")) {\n c = c.substring(1, c.length());\n }\n try {\n NumberFormat format = NumberFormat.getInstance(Locale.getDefault());\n Number number = format.parse(c.trim());\n costPerU = number.doubleValue();\n...
"public static void addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation) {\n IBase issue = createIssue(theCtx, theOperationOutcome);\n populateDetails(theCtx, issue, theSeverity, theDetails, theLocation, theCode);\n}\n"