content
stringlengths
40
137k
"public boolean isConnectedToBoundary() {\n if (_connectedBoundaryCacheIsOn) {\n return _isConnectedBoundaryValue;\n } else {\n IOPort contPort = (IOPort) _rcvr.getContainer();\n if (contPort == null) {\n _connectedBoundaryCacheIsOn = false;\n _isConnectedBoundaryValue =...
"public Relationship getRelationshipById(long id) {\n if (id < 0 || id > MAX_RELATIONSHIP_ID) {\n throw new NotFoundException(\"String_Node_Str\" + id + \"String_Node_Str\");\n }\n return nodeManager.getRelationshipById(id);\n}\n"
"private void updateCurrentOids() {\n DiscoveryMethodType discoveryMethod = getCurrentDiscoveryMethod();\n if (discoveryMethod != null) {\n StringBuilder sbs = new StringBuilder();\n Vector oidsTableModelData = oidsTableModel.getDataVector();\n for (int i = 0; i < oidsTableModelData.size(); i...
"private void writeHeader() throws IOException {\n String str;\n str = \"String_Node_Str\";\n _ostream.write(str.getBytes());\n str = \"String_Node_Str\" + CommonUtils.getVendor() + \"String_Node_Str\";\n _ostream.write(str.getBytes());\n String type = getMimeType();\n str = \"String_Node_Str\" + t...
"public void run() {\n for (IRFunction irFunction : ir.getFuncs().values()) {\n FuncInfo funcInfo = new FuncInfo();\n for (PhysicalRegister preg : irFunction.getUsedPhysicalGeneralRegs()) {\n if (preg.isCalleeSave())\n funcInfo.usedCalleeSaveRegs.add(preg);\n if (pr...
"private byte[] marshallXml(KeePassFile keePassFile, KeePassHeader header) {\n ProtectedStringCrypto protectedStringCrypto = Salsa20.createInstance(header.getProtectedStreamKey());\n new ProtectedValueProcessor().processProtectedValues(new EncryptionStrategy(protectedStringCrypto), clonedKeePassFile);\n return...
"private String getLogMessage(LogRecord record) throws IOException {\n String logMessage = record.getMessage();\n if (logMessage == null || logMessage.trim().equals(\"String_Node_Str\")) {\n if (record.getThrown() != null) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = n...
"public void setDeflateLevel(int deflateLevel) {\n if (deflateLevel < 1 && deflateLevel > 9 && deflateLevel != Deflater.DEFAULT_COMPRESSION) {\n throw new IllegalArgumentException(JaiI18N.getString(\"String_Node_Str\"));\n }\n this.deflateLevel = deflateLevel;\n}\n"
"AbstractData getData() {\n Data data = this;\n do {\n data = ((UnmodifiableData) data).data;\n } while (data instanceof UnmodifiableData);\n return (AbstractData) data;\n}\n"
"private static Action getAction(String uri) {\n Class<? extends Action> controllerClass = actionMappings.get(uri);\n if (controllerClass == null) {\n return new NonExistentAction();\n }\n try {\n return controllerClass.newInstance();\n } catch (Exception e) {\n throw new RuntimeExce...
"public int read(int address, boolean word, long cycles) {\n if (address == TAIV || address == TBIV) {\n int val = lastTIV;\n resetTIV(cycles);\n return val;\n }\n int val = 0;\n int index = address - offset;\n switch(index) {\n case TR:\n val = updateCounter(cycles...
"public void close(SWFList swfList) {\n boolean modified = false;\n for (SWF swf : swfList) {\n if (swf.isModified()) {\n modified = true;\n }\n }\n if (modified) {\n if (View.showConfirmDialog(this, translate(\"String_Node_Str\").replace(\"String_Node_Str\", swfList.toString...
"public boolean savePackageTo(File fOut) {\n saveQTIDocument(qtiDocument.getDocument());\n Set<String> files = new HashSet<String>(3);\n files.add(ImsRepositoryResolver.QTI_FILE);\n files.add(\"String_Node_Str\");\n files.add(\"String_Node_Str\");\n return ZipUtil.zip(files, packageDir, fOut, false);\...
"private void init(final String messagePattern, final int argCount, final Object[] paramArray) {\n this.varargs = null;\n this.messagePattern = messagePattern;\n this.argCount = argCount;\n int usedCount = count(messagePattern, indices);\n initThrowable(paramArray, argCount, usedCount);\n this.argCoun...
"void createDefaultDimensionPerspective() {\n defaultDimensionPerspective = new DimensionPerspective(dataDomain);\n defaultDimensionPerspective.setDefault(true);\n PerspectiveInitializationData data = new PerspectiveInitializationData();\n if (isColumnDimension)\n data.setData(getColumnIDList());\n ...
"private void getLoudestFreqs(Sound sound, int threshold) {\n final PeakFindWithHPSSoundTransformation peak = new PeakFindWithHPSSoundTransformation(threshold, -1);\n peak.setObservers(this.observers);\n peak.transform(sound);\n return peak.getLoudestFreqs();\n}\n"
"public void onCreate(Bundle savedInstanceState) {\n Log.d(\"String_Node_Str\", \"String_Node_Str\");\n PreferenceManager.setDefaultValues(this, R.xml.preferences, false);\n try {\n PreferenceManager.getDefaultSharedPreferences(this).edit().putString(\"String_Node_Str\", getPackageManager().getPackageIn...
"public void loadTimeline() {\n final TwAjax t = new TwAjax(getActivity(), true, true);\n int ipp = ITEMS_PER_PAGE;\n int cp = curLoadPage;\n if (getPostListAdapter() == null) {\n ipp = ITEMS_PER_PAGE * curLoadPage;\n cp = 1;\n }\n t.getUrlContent(Max.getServer(getActivity()) + \"String_...
"public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (xmlCompositeObjectMapping.isReadOnly()) {\n return false;\n }\n int size = marshalRecord.getCycleDetec...
"public Comment create(final String content, final Integer commenter_id, final Integer commented_on_id) throws IOException {\n int __id = curId.getAndIncrement();\n Comment newInst = new Comment(__id, null, null, null, created_at, databases);\n records.put(__id, newInst);\n clearForeignKeyCache();\n retu...
"public TYPE getType() {\n TYPE type;\n if (java.util.Objects.equals(oldValue, newValue)) {\n type = TYPE.NO_CHANGE;\n } else if (!newValue.isPresent()) {\n type = TYPE.REMOVED;\n } else if (!oldValue.isPresent()) {\n type = TYPE.ADDED;\n } else if (oldValue.equals(newValue)) {\n ...
"public Validator getValidator() {\n return new JerseyValidator(isUseSubcontext() || !isDisableWildcardServletError());\n}\n"
"protected FKFilterDialog getNewFKFilterDialog(Shell shell, String filter, DataModelMainPage page, String conceptName) {\n return new FKFilterDialog(shell, Messages.getString(\"String_Node_Str\"), filter, page, conceptName);\n}\n"
"private void genBasic() throws BirtException {\n QueryDefinition qd = newReportQuery();\n IBaseExpression[] rowBeArray = getRowExpr();\n IBaseExpression[] totalBeArray = getAggrExpr();\n rowExprName = getRowExprName();\n totalExprName = getAggrExprName();\n prepareExprNameAndQuery(qd);\n IQueryRes...
"protected HandlerManager getHandlerManager() {\n return m_events;\n}\n"
"private String _getPathToObject() {\n String fileName = null;\n String username = System.getenv(\"String_Node_Str\");\n String temp = System.getProperty(\"String_Node_Str\");\n switch(OMCProxy.getOs()) {\n case UNIX:\n if (username == null) {\n username = \"String_Node_Str\...
"public Record convert(String shortName, Object bean) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {\n Record publication = new SubmissionLookupPublication(shortName);\n Field[] fields = bean.getClass().getDeclaredFields();\n for (...
"protected Dimension getDragWidth(int start, int end) {\n TableEditPart part = (TableEditPart) getSourceEditPart();\n if (isCtrlDown()) {\n Dimension retValue = new Dimension(part.getMinWidth(start) - getColumnWidth(start), Integer.MAX_VALUE);\n return retValue;\n } else {\n if (getStart()...
"public void testUnionEmptyBoth(FoodMartTestCase test) {\n test.assertAxisReturns(\"String_Node_Str\", \"String_Node_Str\");\n}\n"
"public void removeChildPlot(PlotInfo childPlot) {\n this.children.remove(childPlot);\n if (this.plot.isAutoValidate())\n this.plot.validateLayout();\n}\n"
"public void onErrorResponse(VolleyError error) {\n mFirstLoadComplete = true;\n final NotificationsListFragment.NotesAdapter adapter = mNotesList.getNotesAdapter();\n adapter.clear();\n adapter.addAll(new ArrayList<Note>());\n adapter.notifyDataSetChanged();\n ToastUtils.showToast(getContext(), R.str...
"public SyncopeUser create(final UserTO userTO, final Set<Long> mandatoryRoles, final Set<String> mandatoryResources) throws WorkflowException, PropagationException {\n final Map<String, Object> variables = new HashMap<String, Object>();\n variables.put(USER_TO, userTO);\n final ProcessInstance processInstance...
"public Page createPage() {\n return new UserModalPage(Login.this.getPageReference(), editProfileModalWin, new UserTO(), UserModalPage.Mode.SELF);\n}\n"
"protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {\n if (enteredCleanZone == true) {\n counter++;\n } else if (node instanceof AqpNonAnalyzedQueryNode || node.getTag(ANALYZED) != null) {\n enteredCleanZone = true;\n counter++;\n } else if (node instanceof AqpFu...
"public void clearXAResourceHolderStates() {\n Iterator it = resources.iterator();\n while (it.hasNext()) {\n XAResourceHolderState xaResourceHolderState = (XAResourceHolderState) it.next();\n boolean mightHaveMore = true;\n while (mightHaveMore) {\n if (log.isDebugEnabled())\n ...
"protected void onMainDestroy() {\n if (google_initialized) {\n googleAchievements.onStop();\n googlePlayer.onStop();\n googleAuthentication.onStop();\n googleLeaderboard.onStop();\n googleSnapshot.onStop();\n }\n if (firebase_initialized) {\n firebaseCurrentUser.onSto...
"public boolean isEnabled(final Feature feature) {\n final FeaturesContext featuresContext = FeaturesContextHolder.get();\n return featuresContext != null && enabledFeatures(featuresContext.featureSetId()).contains(feature);\n}\n"
"public boolean createVcVms(List<NetworkAdd> networkAdds, List<BaseNode> vNodes, Map<String, Set<String>> occupiedIpSets, StatusUpdater statusUpdator) {\n if (vNodes.isEmpty()) {\n logger.info(\"String_Node_Str\");\n return true;\n }\n updateNicLabels(vNodes);\n allocateStaticIp(vNodes, networ...
"private static void loadFilters(DataInputStream dis, IEdgeDrillFilter edf) throws DataException, IOException {\n int size = IOUtil.readInt(dis);\n for (int i = 0; i < size; i++) {\n IFilterDefinition fd = loadFilterDefn(dis, version);\n edf.addLevelFilter(fd);\n }\n}\n"
"private void createLocales(RepositoryFile repositoryFile, String filePath, boolean isFolder, OutputStream outputStrean) throws IOException {\n ZipEntry entry;\n String zipEntryName;\n String name;\n String localeName;\n Properties properties;\n ZipOutputStream zos = (ZipOutputStream) outputStrean;\n ...
"public void invoke(PHContentEditingInput contentEditingInput, NSDictionary<NSString, NSObject> info) {\n NSURL url = contentEditingInput.getFullSizeImageURL();\n CGImagePropertyOrientation orientation = contentEditingInput.getFullSizeImageOrientation();\n CIImage inputImage = new CIImage(url, null);\n inpu...
"private final CheckedListenableFuture<P> afterLeave(final T transitionName, final ActiveTransition tid) throws IllegalStateException {\n try {\n CheckedListenableFuture<P> result = tid.leave();\n try {\n this.fireOutListeners(tid.getTransitionRule().getFromState());\n } catch (Except...
"private IDimension populateDimension(CubeMaterializer cubeMaterializer, DimensionHandle dim, TabularCubeHandle cubeHandle) throws IOException, BirtException, DataException {\n List hiers = dim.getContents(DimensionHandle.HIERARCHIES_PROP);\n List iHiers = new ArrayList();\n for (int j = 0; j < hiers.size(); j...
"private void processTableInserts(TableData inserts, ISqlTransaction transaction) {\n try {\n Table table = databasePlatform.getTableFromCache(null, null, inserts.getTableName(), false);\n excludeColumns(table);\n DmlStatement stmt = databasePlatform.createDmlStatement(DmlType.INSERT, table.getC...
"public void updateEntity() {\n storingPower = this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) || this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord + 1, zCoord);\n if (getGrid() != null) {\n IMEPowerStorage controller = (IMEPowerStorage) getGrid().getController();\n ...
"public final String processLogs(final String dirPath, boolean isPartitionerEnabled, Loader loader, HadoopJobCounters hadoopJobCounters) throws JumbuneException, InterruptedException, ExecutionException, IOException {\n InputStream in = ConfigurationUtil.readFile(dirPath.substring(0, dirPath.indexOf(\"String_Node_St...
"public Item getInstance(IProject projectSpace) {\n Item batML = new BatMLModel(projectSpace);\n batML.setItemBuilderName(getItemName());\n return batML;\n}\n"
"public void onEnterClick() {\n if (CurrencyValue.isNullOrZero(_amount)) {\n GetAmountActivity.callMeToReceive(this, ExactCurrencyValue.from(null, _mbwManager.getSelectedAccount().getAccountDefaultCurrency()), GET_AMOUNT_RESULT_CODE);\n } else {\n GetAmountActivity.callMe(ReceiveCoinsActivity.this, ...
"int addRowTry(SearchRow row) throws SQLException {\n int rowLength = index.getRowSize(data, row, onlyPosition);\n int pageSize = index.getPageStore().getPageSize();\n int last = entryCount == 0 ? pageSize : offsets[entryCount - 1];\n if (last - rowLength < start + OFFSET_LENGTH) {\n if (entryCount >...
"protected boolean canStructureSpawn(int x, int z, Random rand) {\n return !WorldDataHandler.<WorldGenSavefile>get(WorldGenSavefile.class).isAreaBlocked(x >> 4, z >> 4, WorldGenElement.DUNGEON_TOWER);\n}\n"
"final void recreateStringBlocks() {\n synchronized (this) {\n makeStringBlocks(true);\n }\n}\n"
"protected soot.Value createExpr(polyglot.ast.Expr expr) {\n if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {\n soot.javaToJimple.jj.ast.JjAccessField_c accessField = (soot.javaToJimple.jj.ast.JjAccessField_c) expr;\n return handleCall(accessField.field(), accessField.getMeth(), null, nu...
"public void build(DroolsMonitoringAgent monitoringAgent) {\n this.clear();\n this.connected = true;\n List<KnowledgeBaseInfo> kbases = monitoringAgent.getDiscoveredKnowledgeBases();\n for (KnowledgeBaseInfo kbaseInfo : kbases) {\n if (!knowledgeBases.containsKey(kbaseInfo.getKnowledgeBaseId())) {\n ...
"public void processConnectionLost(LostConnectionEvent evt) {\n String clientID = evt.clientID;\n if (evt.sessionStolen && m_clientIDs.remove(clientID) != null) {\n subscriptions.deactivate(clientID);\n LOG.info(\"String_Node_Str\", clientID);\n }\n if (m_willStore.containsKey(clientID)) {\n ...
"public void assertValid(String context, String input) throws ValidationException {\n getValid(context, input);\n}\n"
"private void onArtifactUpdateEvent(ArtifactUpdatedEvent event) {\n ArtifactUpdatedEvent artifactUpdatedEvent = event;\n if (log.isInfoEnabled()) {\n log.info(String.format(\"String_Node_Str\", artifactUpdatedEvent.toString()));\n }\n String clusterIdInPayload = CartridgeAgentConfiguration.getInstanc...
"public float getCursorY() {\n return canvasHeight == 0 ? 0 : cursorY;\n}\n"
"protected void onPostExecute(AsyncTaskResult<PublicKey> result) {\n progressDialog.dismiss();\n if (result.exception != null) {\n if (SocketException.class.isAssignableFrom(result.exception.getClass()) || SocketTimeoutException.class.isAssignableFrom(result.exception.getClass())) {\n Toast.make...
"public final void switchInventory(StockItem item) {\n inventory.clear();\n if (TraderStatus.hasManageMode(traderStatus))\n InventoryTrait.setManagerInventoryWith(inventory, item);\n else\n InventoryTrait.setInventoryWith(inventory, item);\n selectedItem = item;\n}\n"
"public Insets getMargin(AttributeSet a) {\n if (hasMargin(a)) {\n float top = getLength(a.getAttribute(CSS.Attribute.MARGIN_TOP));\n float bottom = getLength(a.getAttribute(CSS.Attribute.MARGIN_BOTTOM));\n float left = getLength(a.getAttribute(CSS.Attribute.MARGIN_LEFT));\n float right =...
"protected void chore() {\n if (getEnabled()) {\n if (runCleaner()) {\n LOG.debug(\"String_Node_Str\", oldFileDir);\n } else {\n LOG.warn(\"String_Node_Str\", oldFileDir);\n }\n if (reconfig.compareAndSet(true, false)) {\n updateChorePoolSize(CHOREPOOLSIZE...
"public boolean handles(ReadableArchive archive) {\n return ResourceUtil.hasResourcesXML(archive, locator);\n}\n"
"private void expandTree(int depth) {\n for (int i = 0; i < structureTree.getRowCount(); i++) {\n TreePath path = structureTree.getPathForRow(i);\n SwingTreeViewNode node = (SwingTreeViewNode) path.getLastPathComponent();\n if (path.getPath().length - 1 > depth || node.getKind() == IStructureVie...
"public RuleList getBlocksToTest(boolean runBarelyExpensiveTests, boolean runExpensiveTests, File blockStorageFile) throws ScriptException, ProtocolException, IOException {\n final FileOutputStream outStream = blockStorageFile != null ? new FileOutputStream(blockStorageFile) : null;\n final Script OP_TRUE_SCRIPT ...
"public static void main(String[] args) throws Exception {\n if (args.length == 0)\n _printUsage();\n else {\n String[] paths = PathFinder.getPtClassPaths();\n int start = 0;\n while (start < args.length) {\n int newPosition = parseArguments(args, start);\n if (ne...
"private void killSelectedMovables(List<Integer> selectedMovables) {\n for (Integer currID : selectedMovables) {\n Movable curr = Movable.getMovableByID(currID);\n if (curr != null) {\n curr.kill();\n }\n}\n"
"public void charge() {\n charge = Math.min(charge + 4, chargeCap);\n exp++;\n if (exp >= 5 && level < levelCap) {\n upgrade();\n GLog.p(\"String_Node_Str\");\n exp -= 4;\n }\n}\n"
"public String getFullname(String modelFilePath, String bareFileName, boolean debug) {\n String candidate = modelFilePath + File.separator + bareFileName;\n if (debug)\n OpenSimLogger.logMessage(\"String_Node_Str\" + candidate + \"String_Node_Str\", OpenSimLogger.INFO);\n if (isValidFile(candidate))\n ...
"private List<UtilizationValue> getOpeningBalances(Commodity commodity, Date startDate, Date endDate) throws Exception {\n List<StockItemSnapshot> stockItemSnapshots = stockItemSnapshotService.get(commodity, DateUtil.addDayOfMonth(startDate, -1), endDate);\n List<UtilizationValue> utilizationValues = new ArrayLis...
"public synchronized void removeSession(DragonetSession session) {\n this.sessions.remove(session.getAddress().toString());\n}\n"
"public void addEntryListener(EntryListener<K, V> listener, K key, boolean includeValue) {\n check(listener);\n Boolean noEntryListenerRegistered = proxyHelper.getHazelcastClient().getListenerManager().getEntryListenerManager().noEntryListenerRegistered(key, name, includeValue);\n if (noEntryListenerRegistered...
"private boolean updatePostObject() {\n try {\n updatePostObject(false);\n } catch (EditorFragmentNotAddedException e) {\n AppLog.e(T.EDITOR, \"String_Node_Str\");\n return false;\n }\n return true;\n}\n"
"public void setDefendingAt(ShortPoint2D pos) {\n super.setPosition(pos);\n changeStateTo(ESoldierState.SEARCH_FOR_ENEMIES);\n defending = true;\n}\n"
"public void setViewCell(ViewCell viewCell) {\n super.setViewCell(viewCell);\n ClientContextJME.getViewManager().register(viewCell, getSession());\n ClientContextJME.getViewManager().setPrimaryViewCell(viewCell);\n}\n"
"public String getModelNameWithoutExtension(String fullModelName) {\n IPath filePath = new Path(fullModelName);\n String modelName = filePath.removeFileExtension().lastSegment();\n return modelName;\n}\n"
"private static void loadMmsSettings(Context context) {\n XmlResourceParser parser = context.getResources().getXml(R.xml.mms_config);\n try {\n XmlUtils.beginDocument(parser, \"String_Node_Str\");\n while (true) {\n XmlUtils.nextElement(parser);\n String tag = parser.getName();...
"public FileInputSplit[] createInputSplits(int minNumSplits) throws IOException {\n if (minNumSplits < 1) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n int curminNumSplits = Math.max(minNumSplits, this.numSplits);\n final Path path = this.filePath;\n final List<FileInputSplit>...
"protected void restoreWidgetValues() {\n IDialogSettings settings = getDialogSettings();\n if (settings != null) {\n String[] directoryNames = settings.getArray(PETALS_EXPORT_DESTINATIONS);\n if (directoryNames == null || directoryNames.length == 0) {\n return;\n if (directoryName...
"private static void registerLookup(String direction, String lookup, FixedWidthFields lengths, Map<String, FixedWidthFields> map) {\n if (lookup == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + direction + \"String_Node_Str\");\n }\n if (lengths == null) {\n throw new Illegal...
"public void testHoliday() {\n DateEncoder e = DateEncoder.builder().holiday(5).forced(true).build();\n int[] holiday = new int[] { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 };\n int[] notholiday = new int[] { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };\n int[] holiday2 = new int[] { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0 };\n Date d = ne...
"protected void load() {\n if (delegate.get() == null) {\n values = defaultValues;\n } else {\n values = transform(split(delegate.get()));\n }\n final List<String> strings = Arrays.asList(delegate.get().split(delimiter));\n List<T> list = new ArrayList<T>(strings.size());\n for (String s...
"public int compareTo(FieldMirror o) {\n return key.compareTo(o.key);\n}\n"
"private void scanThreadInternal(Address gprs, int verbosity) {\n if (false) {\n VM.sysWriteln(\"String_Node_Str\", thread.getThreadSlot(), \"String_Node_Str\", RVMThread.getCurrentThreadSlot());\n }\n if (verbosity >= 2) {\n Log.writeln(\"String_Node_Str\");\n Log.write(\"String_Node_Str\...
"protected VBD createVbd(Connection conn, VolumeTO volume, String vmName, VM vm) throws XmlRpcException, XenAPIException {\n VolumeType type = volume.getType();\n VDI vdi = mount(conn, vmName, volume);\n VBD.Record vbdr = new VBD.Record();\n vbdr.VM = vm;\n if (vdi != null)\n vbdr.VDI = vdi;\n ...
"public RWSet readSet(SootMethod method, Stmt stmt) {\n RWSet ret = null;\n Iterator targets = tt.iterator(stmt);\n while (targets.hasNext()) {\n SootMethod target = (SootMethod) targets.next();\n if (target.isNative()) {\n if (ret == null)\n ret = new SiteRWSet();\n ...
"public void progress() {\n getGround();\n bPlayer.addCooldown(this);\n if (groundBlock == null) {\n remove();\n return;\n }\n dir = dir.clone().normalize().multiply(1.5);\n dir.setY(0);\n double distance = loc.getY() - (double) groundBlock.getY();\n double dx = Math.abs(distance -...
"private void setup() {\n mPM = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);\n mWM = WindowManagerGlobal.getWindowManagerService();\n mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);\n mShowKeyguardWakeLock = mPM.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"...
"private boolean prune(Transformation transformation) {\n if (transformation.hasProperty(propertyExpanded) || transformation.hasProperty(propertyInsufficientUtility)) {\n return true;\n }\n Transformation optimum = getGlobalOptimum();\n if (optimum != null) {\n InformationLoss<?> bound = trans...
"public void createParamtersTree() {\n Assert.isNotNull(tree);\n parametersItem = createTopTreeItem(tree, TREE_ITEM_PARAMETERS);\n buildParameterTree();\n}\n"
"private String getDateForDisplayInLabels(String date, StatsTimeframe timeframe) {\n String prefix = getString(R.string.stats_for);\n switch(timeframe) {\n case DAY:\n return String.format(prefix, StatsUtils.parseDate(date, StatsConstants.STATS_INPUT_DATE_FORMAT, StatsConstants.STATS_OUTPUT_DATE...
"private void remove(Entity e) {\n actives.remove(e);\n e.removeSystemBit(systemBit);\n removed(e);\n}\n"
"public void createMusicFolder(MusicFolder musicFolder) {\n String sql = \"String_Node_Str\" + INSERT_COLUMNS + \"String_Node_Str\";\n update(sql, musicFolder.getPath().getPath(), musicFolder.getName(), musicFolder.isEnabled(), musicFolder.getChanged());\n Integer id = queryForInt(\"String_Node_Str\", 0);\n ...
"public Boolean hasPlayerHistory(Location blockLocation) throws HistoryException {\n int blockID = blockLocation.getBlock().getTypeId();\n synchronized (lock) {\n while (searching) {\n try {\n lock.wait();\n } catch (InterruptedException e) {\n throw new ...
"public List<EnhanceEntity> populateRelation(EntityMetadata m, List<String> relationNames, boolean isParent, Client client) {\n List<EnhanceEntity> ls = null;\n if (!isParent) {\n if (MetadataUtils.useSecondryIndex(m.getPersistenceUnit())) {\n ls = ((PelopsClient) client).find(m, relationNames, ...
"public final boolean startScan(PA_StateTracker.E_Intent intent, double scanTime, boolean m_isPoll) {\n switch(m_manager.m_config.scanApi) {\n case CLASSIC:\n mCurrentApi.set(BleScanApi.CLASSIC);\n return tryClassicDiscovery(intent, true);\n case POST_LOLLIPOP:\n if (is...
"protected void okPressed() {\n boolean isExist = false;\n if (descCombo.getCombo().getText().trim().length() == 0) {\n MessageDialog.openWarning(null, \"String_Node_Str\", \"String_Node_Str\");\n descCombo.getCombo().setFocus();\n isOK = false;\n return;\n }\n if (userText.getTe...
"private JMethod generateAddValueTags(final ArrayList<ElementData> fixElements, final ArrayList<ArrayData> fixArrays, final ArrayList<SimpleListData> fixSimpleLists, final ArrayList<NonSimpleListData> fixNonSimpleLists) throws Exception {\n JMethodSignature jms = JMethodSignature.factory.create(JParameter.factory.cr...
"public ServicePoolBuilder<S> withHostDiscovery(final HostDiscovery hostDiscovery) {\n checkNotNull(hostDiscovery);\n return withHostDiscoverySource(new HostDiscoverySource() {\n public HostDiscovery forService(String serviceName) {\n return hostDiscovery;\n }\n };\n return withHost...
"public byte[] uncompress(ByteBuffer org, byte[] ref_data, Inflater inflater) throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int ref_data_offset = 0;\n while (org.hasRemaining()) {\n int meth = org.get();\n int meth_major = meth >> 3;\n switch(meth_major...
"protected Result find(String content, int position) throws AggregationSyntaxException {\n if (position >= content.length()) {\n return null;\n }\n final Template esiComment = findTemplate(\"String_Node_Str\", \"String_Node_Str\", content, position);\n final Template esiInclude = findTemplate(\"Strin...