content
stringlengths
40
137k
"public void setHome(msg_mission_item msg) {\n this.coordinate = new Coord2D(msg.y, msg.x);\n this.altitude = new Altitude(msg.z);\n myDrone.events.notifyDroneEvent(DroneEventsType.HOME);\n}\n"
"public Object execute(Object p1, Object p2, Object p3) {\n parameters.get(0).setValue(p1);\n parameters.get(1).setValue(p2);\n parameters.get(2).setValue(p3);\n return execute();\n}\n"
"protected void setUpSecureDexClassLoader() {\n if (!effectiveSecureDexClassLoader)\n return;\n Log.d(TAG_MAIN, \"String_Node_Str\");\n SecureLoaderFactory mSecureLoaderFactory = new SecureLoaderFactory(this);\n SecureDexClassLoader mSecureDexClassLoader;\n String listAPKPaths = Environment.getExt...
"private static void waitUntilZnodeAvailable(int replicaId) throws Exception {\n String znode = util.getZooKeeperWatcher().getZNodePaths().getZNodeForReplica(replicaId);\n int i = 0;\n while (i < 1000) {\n if (ZKUtil.checkExists(util.getZooKeeperWatcher(), znode) == -1) {\n Thread.sleep(100);...
"public void testInterfaceExtendsLoop2() {\n testClosureTypes(suppressMissingProperty(\"String_Node_Str\") + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\");\n}\n"
"public void run() {\n parentGLCanvas.requestFocus();\n}\n"
"public List<List<DocumentElement>> getBody(Diagram d, List<Element> rowElements, List<String> columnIds, DiagramTableTool dtt, boolean forViewEditor) {\n List<List<DocumentElement>> res = new ArrayList<List<DocumentElement>>();\n for (Element e : rowElements) {\n if (skipIfNoDoc && ModelHelper.getComment(...
"protected Response findAttribute(String persistenceUnit, String type, String key, String attribute, HttpHeaders hh, UriInfo ui, URI baseURI) {\n PersistenceContext app = getPersistenceFactory().get(persistenceUnit, baseURI, null);\n if (app == null || app.getClass(type) == null) {\n if (app == null) {\n ...
"public void run() {\n logger.debug(\"String_Node_Str\");\n Calendar expired = Calendar.getInstance();\n expired.add(Calendar.MINUTE, -3);\n List<User> usersToCheck = new ArrayList<>();\n usersToCheck.addAll(users.values());\n for (User user : usersToCheck) {\n if (user.isExpired(expired.getTim...
"public void onNext(GenericOverall genericOverall) {\n inCall = true;\n if (!hasChatSupport) {\n ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomId(roomId);\n ApplicationWideCurrentRoomHolder.getInstance().setInCall(true);\n ApplicationWideCurrentRoomHolder.getInstance().setUserI...
"private void addParameterDefns() throws DataException {\n if (this.parameterHints == null)\n return;\n Iterator it = this.parameterHints.iterator();\n while (it.hasNext()) {\n ParameterHint parameterHint = (ParameterHint) it.next();\n odaStatement.addParameterHint(parameterHint);\n ...
"public void run() {\n while (!shutdown) {\n Serializable s;\n try {\n s = queue.take();\n if (s != null && s instanceof String && SHUTDOWN.equals(s.toString())) {\n shutdown = true;\n continue;\n }\n } catch (final InterruptedExcept...
"private ItemStack getRandomWeapon() {\n EnemyInfo enemyInfo = (EnemyInfo) this.getCapability(CapabilityEnemyInfo.ENEMY_INFO, null);\n if (enemyInfo != null) {\n LootContext context = new LootContext.Builder(this.getServer().getWorld(this.dimension)).withLootedEntity(this).build();\n ItemStack stack...
"private void loadDriverExtensions() {\n if (driverExtensions != null)\n return;\n driverExtensions = new HashMap();\n IExtensionRegistry extReg = Platform.getExtensionRegistry();\n IExtensionPoint extPoint = extReg.getExtensionPoint(OdaJdbcDriver.Constants.DRIVER_INFO_EXTENSION);\n IExtension[] e...
"public final Item detach(Bag container) {\n if (quantity <= 0) {\n return null;\n } else if (quantity == 1) {\n if (stackable || this instanceof Boomerang) {\n Dungeon.quickslot.convertToPlaceholder(this);\n }\n return detachAll(container);\n } else {\n quantity--...
"public void removeControlCausedMessageByObject() {\n IMessageManager messageManager = getMessageManager();\n if (messageManager != null && isFormReady()) {\n if (Widgets.isAccessible(getErrorMessageControl())) {\n messageManager.removeMessage(this, getErrorMessageControl());\n }\n }\n...
"private static String _readInput() throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in, java.nio.charset.Charset.defaultCharset()));\n String userInput = null;\n try {\n userInput = br.readLine();\n } finally {\n br.close();\n }\n return userInp...
"public HearthTreeNode useHeroAbility_core(int targetPlayerIndex, Minion targetMinion, HearthTreeNode boardState, Deck deckPlayer0, Deck deckPlayer1, boolean singleRealizationOnly) throws HSException {\n if (targetPlayerIndex != 0 || !(targetMinion instanceof Hero))\n return null;\n if (singleRealizationOn...
"protected void drawCenterText(Canvas c) {\n String centerText = mChart.getCenterText();\n if (mChart.isDrawCenterTextEnabled() && centerText != null) {\n PointF center = mChart.getCenterCircleBox();\n if (mChart.isCenterTextWordWrapEnabled()) {\n float innerRadius = mChart.isDrawHoleEnab...
"public P6Signature3 call() throws XfsException {\n P6Signature3 result;\n XfsInfoCommand<CimInfoCommand> command = new XfsInfoCommand<CimInfoCommand>(cimService, CimInfoCommand.GET_P6_SIGNATURE, getP6Signature);\n WFSResult wfsResult = null;\n try {\n wfsResult = command.call();\n result = Ci...
"public void onClick(DialogInterface dialog, int which) {\n ((VpnSettings) getActivity()).doAuthDialogCallback(saveUsername.isChecked(), usernameView.getText().toString(), passwordView.getText().toString());\n}\n"
"public void performIterationUpdates() {\n previousPoint = currentPoint.copy();\n if (subProblemSelectionMethod == SubProblemSelectionMethod.ALL) {\n primalToleranceAdder = new DoubleAdder();\n dualToleranceAdder = new DoubleAdder();\n }\n int[] selectedSubProblemIndexes = subProblemSelectionM...
"public IQueryResults execute(DataSetHandle dataSet, IQueryDefinition queryDefn, boolean useColumnHints, boolean useFilters, boolean clearCache, ExecutionContext context, DataRequestSession session) throws BirtException {\n IBaseDataSetDesign dataSetDesign = session.getModelAdaptor().adaptDataSet(dataSet);\n if (...
"private void checkStringOption(List<ValidationMessage> errors, WrapperElement answer, NodeStack stack, Questionnaire qSrc, QuestionnaireItemComponent qItem, boolean openChoice) {\n WrapperElement v = answer.getNamedChild(\"String_Node_Str\");\n NodeStack ns = stack.push(v, -1, null, null);\n if (qItem.getOpti...
"protected final void emit_resolved_newarray(RVMArray array) {\n int width = array.getLogElementSize();\n Offset tibOffset = array.getTibOffset();\n int headerSize = ObjectModel.computeHeaderSize(array);\n int whichAllocator = MM_Interface.pickAllocator(array, method);\n int site = MM_Interface.getAlloca...
"private Long shiftDownRight(Long position) {\n Long drShift = position >>> 9;\n return new Long(drShift & ~LEFT_MASK);\n}\n"
"private void processLine() {\n currentNodeSet = new MutableNodeSet(graph);\n if (line == null) {\n if (generateUnusedNodesAsSeeds) {\n Integer id = unusedNodes.pollFirst();\n if (id == null)\n currentNodeSet = null;\n else\n currentNodeSet.add...
"private void writeRelationships(List<Relationship> relationships, XMLStreamWriter writer) throws XMLStreamException {\n for (Relationship edge : relationships) {\n writer.writeStartElement(GraphMLTokens.EDGE);\n writer.writeAttribute(GraphMLTokens.ID, Long.toString(edge.getId()));\n writer.writ...
"public static void main(String[] args) {\n String nameIntrinsic = null;\n int cameraId = 0;\n if (args.length >= 1) {\n cameraId = Integer.parseInt(args[0]);\n }\n if (args.length >= 2) {\n nameIntrinsic = args[1];\n } else {\n System.out.println();\n System.out.println(\"...
"boolean runOnce() throws ZygoteInit.MethodAndArgsCaller {\n String[] args;\n Arguments parsedArgs = null;\n FileDescriptor[] descriptors;\n try {\n args = readArgumentList();\n descriptors = mSocket.getAncillaryFileDescriptors();\n } catch (IOException ex) {\n Log.w(TAG, \"String_No...
"public ManufOrder generateManufOrder(Product product, BigDecimal qtyRequested, int priority, boolean isToInvoice, BillOfMaterial billOfMaterial, LocalDateTime plannedStartDateT) throws AxelorException {\n if (billOfMaterial == null) {\n billOfMaterial = this.getBillOfMaterial(product);\n }\n Company co...
"protected Composite getComponent(Composite parent) {\n ChartUIUtil.bindHelp(parent, ChartHelpContextIds.POPUP_AXIS_GRIDLINES);\n GridLayout glContent = new GridLayout();\n glContent.numColumns = 2;\n glContent.horizontalSpacing = 5;\n glContent.verticalSpacing = 5;\n glContent.marginHeight = 7;\n ...
"public void doImport(TreeObject[] objs, IProgressMonitor monitor) {\n monitor.beginTask(\"String_Node_Str\", IProgressMonitor.UNKNOWN);\n Reader reader = null;\n Arrays.sort(objs, new Comparator<Object>() {\n public int compare(Object o1, Object o2) {\n return ((TreeObject) o1).getType() - (...
"public void stop(BundleContext bc) {\n bc.removeServiceListener(this);\n Collection<ServiceReference<ProtocolProviderService>> ppsRefs = ServiceUtils.getServiceReferences(bc, ProtocolProviderService.class);\n if (!ppsRefs.isEmpty()) {\n for (ServiceReference<ProtocolProviderService> ppsRef : ppsRefs) {...
"private static IndirectCollectionsProvider getProvider() {\n try {\n if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {\n final Class support = (Class) AccessController.doPrivileged(new PrivilegedClassForName(JDK8_SUPPORT_PROVIDER, true, IndirectCollectionsFactory.class.getClassLoader()));\...
"public ClassFile getClassFile2() {\n return getClassFile3(true);\n}\n"
"protected final void constructionFinishedEvent() {\n requestWorker();\n}\n"
"private JSpinner createUploadSpinner() {\n SpinnerNumberModel maxUploadSpinnerModel = new SpinnerNumberModel(UploadSettings.MAX_UPLOAD_SPEED.getValue() / 1024, UploadSettings.MAX_UPLOAD_SPEED.getMinValue().intValue() / 1024, UploadSettings.LIMIT_MAX_UPLOAD_SPEED.get() ? (UploadSettings.MAX_UPLOAD_SPEED.getValue() /...
"public void indexPage(RawPage page) throws DaoException {\n if (closed) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (!language.equals(page.getLanguage())) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n try {\n Document document = new Document(...
"public void checkAndReleaseAllocatedResource(ExecutionGraph executionGraph, AllocatedResource allocatedResource) {\n if (allocatedResource == null) {\n LOG.error(\"String_Node_Str\");\n return;\n }\n if (allocatedResource.getInstance() instanceof DummyInstance) {\n LOG.debug(\"String_Node...
"public void testSetRemoveWorkPackageItems() {\n Collection<IAtsWorkItem> workItems = workPackageEp.getWorkItems(DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getUuid());\n assertEquals(2, workItems.size());\n IAtsWorkItem workItem = workItems.iterator().next();\n JaxWorkPackageData data = new JaxWorkPacka...
"static private void serializeJObject(StringBuilder sb, JsonObject jobject) {\n sb.append(\"String_Node_Str\");\n String[] keys = jobject.keySet().toArray(new String[0]);\n if (keys.length != 0) {\n String key = keys[0];\n serializeJString(sb, key);\n sb.append(\"String_Node_Str\");\n ...
"public RunStats call() {\n logger.info(\"String_Node_Str\", test.getAbsoluteFile().toURI().normalize().getPath());\n try {\n final RunStats runStats = runTest(test);\n if (outputStrategy.contains(OutputStrategy.PER_TEST)) {\n writeRunStats(runStats);\n }\n return runStats;\...
"public void undo() {\n final long d0 = ref.getDataIndex();\n swap(d0);\n dataStack.setWriteDataIndex(d0);\n}\n"
"public Record read(Request req) {\n return nextOwnedRecord(req.name, req.recordId, req.blockId);\n}\n"
"protected Object _visitUserTypeDeclNode(UserTypeDeclNode node, LinkedList args) {\n NameContext ctx = new NameContext();\n ctx.environ = (Environ) node.getDefinedProperty(ENVIRON_KEY);\n ClassDecl decl = (ClassDecl) JavaDecl.getDecl((NamedNode) node);\n ctx.currentClass = decl.getDefType();\n LinkedList...
"public static void beforeClass() throws IOException {\n zkServer = InMemoryZKServer.builder().setDataDir(TEMP_FOLDER.newFolder()).build();\n zkServer.startAndWait();\n conf = CConfiguration.create();\n conf.set(Constants.Zookeeper.QUORUM, zkServer.getConnectionStr());\n conf.setInt(Constants.Stream.CONT...
"public boolean contains(Node node) {\n if (node == null) {\n throw new NullPointerException();\n }\n AbstractNode absNode = (AbstractNode) node;\n readLock();\n if (!absNode.isValid()) {\n return false;\n }\n boolean res = false;\n if (absNode.isValid()) {\n if (nodeProposi...
"private String generateRestrictionChecks(AttributeContainer.Element member) throws Exception {\n String result = \"String_Node_Str\";\n AttributeContainer.Restriction r = member.restrictions;\n String message = \"String_Node_Str\";\n String comment = \"String_Node_Str\";\n if (member.isLengthRestricted(...
"public static boolean isFromLibrary(Object model) {\n if (model instanceof DesignElementHandle) {\n return DEUtil.isLinkedElement((DesignElementHandle) model);\n }\n return false;\n}\n"
"public void replaceVarWithURI(String var, String uri) {\n SPARQL_Term subject;\n SPARQL_Property property;\n SPARQL_Value object;\n uri = \"String_Node_Str\" + uri + \"String_Node_Str\";\n for (SPARQL_Triple triple : conditions) {\n subject = triple.getVariable();\n property = triple.getPr...
"public void onSubmit(AjaxRequestTarget target, Form form) {\n target.addComponent(done.setDefaultModel(new Model<String>() {\n public String getObject() {\n return \"String_Node_Str\";\n }\n }));\n try {\n final UpdateDetails update = ((DefaultManager) Manager.getInstance()).ge...
"public void modifyText(ModifyEvent arg0) {\n Granularity g = null;\n if (table.getSelection() != null && table.getSelection().length != 0) {\n g = (Granularity) table.getSelection()[0].getData();\n }\n if (g.isFormatSupported()) {\n String formatString = text.getText();\n if (g != null...
"private boolean testAndMark(ObjectReference object) {\n byte oldValue, markBits, newValue;\n oldValue = VM.objectModel.readAvailableByte(object);\n markBits = (byte) (oldValue & MARK_COUNT_MASK);\n if (markBits == markState)\n return false;\n VM.objectModel.writeAvailableByte(object, (byte) ((old...
"public void execute() {\n transStart(NAME);\n CrosstabReportItemHandle reportHandle = childViewHandle.getCrosstab();\n try {\n reportHandle.pivotDimension(childViewHandle.getAxisType(), childViewHandle.getIndex(), getType(), findPosition());\n if (bool) {\n CrosstabAdaptUtil.removeInv...
"public void generate(URL input, File outFile) throws IOException {\n InputStreamReader fr = getStream(input);\n FileWriter out = new FileWriter(outFile);\n FileWriter out1 = new FileWriter(temp1);\n FileWriter out2 = new FileWriter(temp2);\n FileWriter out3 = new FileWriter(temp3);\n ParserDelegator ...
"private synchronized void connectToHub() {\n disconnectFromHub();\n final String host = getThing().getProperties().get(HarmonyHubBindingConstants.HUB_PROPERTY_HOST);\n final String accountId = getThing().getProperties().get(HarmonyHubBindingConstants.HUB_PROPERTY_ACCOUNTID);\n final String sessionId = getT...
"public synchronized Object processAdd(Object data) {\n Long value = (Long) data;\n for (Iterator<Long> iterator = minDeque.descendingIterator(); iterator.hasNext(); ) {\n if (iterator.next() > value) {\n iterator.remove();\n }\n }\n minDeque.addLast(value);\n if (minValue == nul...
"private static String getUrl(String site) {\n MCBouncer.log.debug(\"String_Node_Str\" + site);\n try {\n URL url = new URL(site.toString());\n BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));\n String inputLine, result = \"String_Node_Str\";\n while ((i...
"private void notifyRevenueAdapter(final int revenue, final boolean finalResult) {\n String modifier;\n if (finalResult)\n modifier = \"String_Node_Str\";\n else\n modifier = \"String_Node_Str\";\n log.info(\"String_Node_Str\" + modifier + \"String_Node_Str\" + revenue + \"String_Node_Str\" + ...
"public void replacePrevPos(long newValue) {\n checkValueForPut(newValue);\n long prevPos = stepBack(searchState.searchPos);\n long oldEntry = bytes.readLong(prevPos);\n long oldValue = value(oldEntry);\n positions.clear(oldValue);\n positions.set(newValue);\n bytes.writeLong(prevPos, entry(searchH...
"public Object get(String arg0, Scriptable scope) {\n try {\n return it.getValue(arg0);\n } catch (BirtException e) {\n return null;\n }\n}\n"
"public void fire() throws IllegalActionException {\n _delay = -1.0;\n if (input.hasToken(0)) {\n _currentInput = input.get(0);\n double delayValue = ((DoubleToken) _currentInput).doubleValue();\n if (delayValue < 0) {\n throw new IllegalActionException(\"String_Node_Str\");\n ...
"private boolean _setLocation(double[] location) throws IllegalActionException {\n if (_location != null) {\n if (_location.length == location.length) {\n boolean match = true;\n for (int i = 0; i < location.length; i++) {\n if (_location[i] != location[i]) {\n ...
"public void onClick(View v) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n final SeekBar seekBar2 = new SeekBar(context);\n seekBar2.setMax(30);\n seekBar2.setProgress(width);\n seekBar2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n public void onProg...
"private <ID extends Serializable> ResourceSupport findRelInternal(HttpServletRequest request, String apiCategory, String model, ID uuid, String rel, Pageable page, PagedResourcesAssembler assembler, String projection) {\n checkModelPluralForm(apiCategory, model);\n DSpaceRestRepository<RestAddressableModel, ID> ...
"public void I_send_the_HTTP_request(String method, String url) throws Throwable {\n int pathLength = 0;\n if (this.contextPath.length() > 0) {\n pathLength += this.contextPath.length();\n }\n if (this.servletPath.length() > 0) {\n pathLength += this.servletPath.length() + 1;\n }\n reque...
"protected static String ingestJson(ObjectNode jsonInput) {\n if (jsonInput == null) {\n return null;\n }\n ArrayNode conns = null;\n JsonNode valueNode;\n if ((valueNode = jsonInput.get(\"String_Node_Str\")) != null && valueNode.isArray()) {\n conns = (ArrayNode) valueNode;\n }\n Obj...
"public boolean requestNewReceivingAddress(int hdAccountId) {\n int issuedIndex = this.issuedIndex(hdAccountId, AbstractHD.PathType.EXTERNAL_ROOT_PATH);\n final boolean[] result = { false };\n if (issuedIndex >= HDAccount.MaxUnusedNewAddressCount - 2) {\n String sql = \"String_Node_Str\" + \"String_Node...
"public void onLocationChanged(Location location) {\n mLocation = location;\n if (mLocation != null) {\n String[] args = { mLocation.getProvider(), truncateDouble(mLocation.getAccuracy()) };\n mLocationDialog.setMessage(StringUtils.getStringRobust(this, R.string.location_provider_accuracy, args));\n...
"public IQueryResults executeQuery(IQueryDefinition queryDefn, Iterator paramBindingIt, Iterator filterIt, Iterator bindingIt) throws BirtException {\n return new QueryExecutionHelper(this.dataEngine, this.modelAdaptor, this.sessionContext).executeQuery(queryDefn, paramBindingIt, filterIt, bindingIt, this.sessionCon...
"public boolean reset() {\n boolean ok = super.reset();\n for (int i = 1; i <= 9; i++) {\n this.valueToFreq.put(String.valueOf(i), 0L);\n }\n return ok;\n}\n"
"public String getClassName(String jsonKey) {\n String result = toCamelCase(jsonKey);\n return StringUtils.capitalize(result);\n}\n"
"private void _removeEditorIcons() {\n for (Object editorIconObject : attributeList(EditorIcon.class)) {\n EditorIcon editorIcon = (EditorIcon) editorIconObject;\n String moml = \"String_Node_Str\" + editorIcon.getName() + \"String_Node_Str\";\n MoMLChangeRequest request = new MoMLChangeRequest(...
"public boolean onCreateOptionsMenu(final Menu menu) {\n final RedditSubredditSubscriptionManager.SubredditSubscriptionState subredditSubscriptionState;\n final RedditSubredditSubscriptionManager subredditSubscriptionManager = RedditSubredditSubscriptionManager.getSingleton(this, user);\n if (!user.isAnonymous...
"public void startEditing(final GridCell cell) {\n if (editable && getEditableGrid() != null && getEditableGrid().isAttached() && cell != null) {\n ColumnConfig<M, ?> c = columnModel.getColumn(cell.getCol());\n M value = getEditableGrid().getStore().get(cell.getRow());\n if (value != null && get...
"static void defineClass(ClassLoader loader, String name, byte[] bytes) {\n try {\n Method defineClass = ClassLoader.class.getDeclaredMethod(\"String_Node_Str\", new Class[] { String.class, bytes.getClass(), int.class, int.class });\n defineClass.setAccessible(true);\n defineClass.invoke(loader,...
"public boolean reservationExists(CacheKey key) {\n boolean found = false;\n for (SeatBlock block : reserved) {\n if (block.getKey().getShowId() == key.getShowId()) {\n if (showDao.getSectionIdByRowId(block.getKey().getRowId()) == showDao.getSectionIdByRowId(key.getRowId())) {\n r...
"private void doLogging(Level level, String message, Throwable th) {\n String className = null;\n String methodName = null;\n int lineNumber = -1;\n StackTraceElement[] stack = (new Throwable()).getStackTrace();\n int ix = 0;\n while (ix < stack.length) {\n StackTraceElement frame = stack[ix];\...
"protected void destroyViewSpecificContent(GL2 gl) {\n if (layoutManager != null)\n layoutManager.destroy(gl);\n}\n"
"public int getLength() {\n return getEndOffset() - getStartOffset();\n}\n"
"private void restoreState(Bundle savedInstanceState) {\n if (savedInstanceState == null)\n return;\n boolean isInMultiSelectMode = savedInstanceState.getBoolean(BUNDLE_IN_MULTI_SELECT_MODE);\n if (savedInstanceState.containsKey(BUNDLE_CHECKED_STATES)) {\n mCheckedItems.addAll(savedInstanceState....
"public static final List<PatientIdentifierType> GLOBAL_PROPERTY_PREFERRED_IDENTIFIER_TYPES() {\n String propertyValue = Context.getAdministrationService().getGlobalProperty(\"String_Node_Str\");\n List<PatientIdentifierType> pits = new ArrayList<PatientIdentifierType>();\n if (StringUtils.hasText(propertyValu...
"public Set<A> getTakeable() {\n Set<A> as = new HashSet<>(this.actions);\n if (as.size() != this.actions.size()) {\n throw new RuntimeException(\"String_Node_Str\" + this.actions + \"String_Node_Str\");\n }\n return as;\n}\n"
"public boolean filter(Executable elem) throws Exception {\n Executable equivalentMethod = null;\n sd = (SymbolType) expression.getScope().getSymbolData();\n if (sd == null) {\n expression.getScope().accept(typeResolver, ctx);\n sd = (SymbolType) expression.getScope().getSymbolData();\n if...
"public List<RestrictionEffect> getApplicableRestrictionEffects(Permanent permanent, Game game) {\n List<RestrictionEffect> effects = new ArrayList<RestrictionEffect>();\n for (RestrictionEffect effect : restrictionEffects) {\n Ability ability = restrictionEffects.getAbility(effect.getId());\n if (!...
"public void drawTextureBordered(TextureRegion texture, Rect2i region, Border border, boolean tile, float ux, float uy, float uw, float uh, float alpha) {\n if (!texture.getTexture().isLoaded()) {\n return;\n }\n if (!currentTextureCropRegion.equals(requestedCropRegion) && !(currentTextureCropRegion.con...
"public void reloadAudioSettings() {\n readPersistedSettings();\n int numStreamTypes = AudioSystem.getNumStreamTypes();\n for (int streamType = 0; streamType < numStreamTypes; streamType++) {\n VolumeStreamState streamState = mStreamStates[streamType];\n String settingName = System.VOLUME_SETTING...
"private void findScrollView(ViewGroup viewGroup) {\n scrollChild = viewGroup;\n if (viewGroup.getChildCount() > 0) {\n int count = viewGroup.getChildCount();\n View child;\n for (int i = 0; i < count; i++) {\n child = viewGroup.getChildAt(i);\n if (child instanceof AbsL...
"public static IPath getWebContentPath(IProject project) {\n IPath path = null;\n if (project != null && JavaEEProjectUtilities.isDynamicWebProject(project)) {\n IVirtualComponent component = ComponentCore.createComponent(project);\n path = component.getRootFolder().getWorkspaceRelativePath();\n ...
"public List<ExecutableNodeBase> getSources() {\n List<ExecutableNodeBase> ss = new ArrayList<>();\n for (Pair<ExecutableNodeBase, Integer> s : temp) {\n ss.add(s.getKey());\n }\n return ss;\n}\n"
"public void remove(String s) throws Exception {\n MaterialData matdat = itemDb.get(s);\n if (isMySQL) {\n MySQLPriceList.RemoveItem(s);\n } else {\n if (NameMap.containsKey(matdat.getItemTypeId() + (double) matdat.getData() / 100)) {\n BuyMap.remove(matdat.getItemTypeId() + (double) m...
"public void createOnDatabase(AbstractSession session) throws EclipseLinkException {\n if (checkIfExist(session)) {\n if (this.isAlterSupported(session)) {\n alterOnDatabase(session);\n }\n } else {\n super.createOnDatabase(session);\n }\n}\n"
"public Rectangle getNodeMarkRectangle() {\n Point nodeLocation;\n nodeLocation = node.getLocation();\n Dimension nodeSize;\n Dimension labelSize;\n Dimension errorNodeSize;\n Dimension progressNodeSize;\n nodeSize = node.getSize();\n Rectangle nodeRectangle = new Rectangle(nodeLocation, nodeSiz...
"public void loadEntityCatcher(IBlockAccess world, int x, int y, int z, Block block, RenderBlocks blocks) {\n Tessellator tes = Tessellator.instance;\n Minecraft mc = FMLClientHandler.instance().getClient();\n tes.draw();\n mc.renderEngine.bindTexture(TextureMap.locationItemsTexture);\n tes.startDrawingQ...
"public void init(TreeViewer viewer, IStructuredSelection selection) {\n boolean canWork = true;\n if (selection.isEmpty() || (selection.size() > 1)) {\n setEnabled(false);\n return;\n }\n List<RepositoryNode> nodes = selection.toList();\n for (RepositoryNode node : nodes) {\n if ((n...
"public void testPuts() throws InterruptedException {\n final String MAP_NAME = \"String_Node_Str\";\n Config config = new Config();\n final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(1);\n final HazelcastInstance h = factory.newHazelcastInstance(config);\n final IMap<Integer, ...
"private Pair<Unit, Integer> compareUnits(TermField[] terms) {\n Unit unit = terms[0].getParser().getUnit();\n int compatibleNumber = 0;\n for (TermField t : terms) {\n final Unit tp = t.getParser().getUnit();\n if (unit != null && tp != null && unit.isCompatible(tp)) {\n compatibleNum...
"private void maintenance() {\n long time = new Date().getTime();\n if (logoutStartedAt != -1 && time > (logoutStartedAt + LOGOUT_TIMEOUT)) {\n finishLogout();\n }\n if (isLoggedIn() && logoutStartedAt == -1 && (time > sessionExpireDate.getTime() || (sessionExpireDate.getTime() - time > SESSION_LENGT...
"public byte[] getRawSoundData() {\n List<SoundStreamBlockTag> blocks = getBlocks();\n for (SoundStreamBlockTag block : blocks) {\n if (streamSoundCompression == SoundFormat.FORMAT_MP3) {\n ret.add(Arrays.copyOfRange(block.streamSoundData, 4, block.streamSoundData.length));\n } else {\n ...