content
stringlengths
40
137k
"public void statusChanged(RecognizerState status) {\n if (status == RecognizerState.ALLOCATED) {\n if (showTimers) {\n TimerPool.dumpAll();\n }\n }\n if (status == RecognizerState.DEALLOCATING) {\n if (showTimers) {\n Timer.dumpAll();\n }\n }\n if (statu...
"public void run() {\n JFrame frame = (JFrame) WindowManager.getDefault().getMainWindow();\n String title = frame.getTitle();\n title = title.substring(0, title.indexOf('-') - 1);\n frame.setTitle(title);\n}\n"
"private void createQuery(RepositoryNode queriesConnectionNode, IRepositoryViewObject repObj, QueriesConnection queriesConnection) {\n displayQueries.clear();\n for (Object element : queriesConnection.getQuery()) {\n Query query = (Query) element;\n boolean isDelete = SubItemHelper.isDeleted(query);...
"public Number bytesToValueRealOffset(byte[] data, int offset) {\n offset *= 2;\n if (dataType == DataType.TWO_BYTE_INT_UNSIGNED)\n return new Integer(((data[offset] & 0xff) << 8) | (data[offset + 1] & 0xff));\n if (dataType == DataType.TWO_BYTE_INT_SIGNED)\n return new Short((short) (((data[offs...
"private SolrServer createSolrServer() throws Exception {\n String solrHomePath = oakSolrConfiguration.getSolrHomePath();\n String coreName = oakSolrConfiguration.getCoreName();\n String solrConfigPath = oakSolrConfiguration.getSolrConfigPath();\n checkSolrConfiguration(solrHomePath, solrConfigPath, coreNam...
"public void addUpperBound(IType bound) {\n int index = this.upperBoundCount++;\n if (index >= this.upperBounds.length) {\n IType[] temp = new IType[this.upperBoundCount];\n System.arraycopy(this.upperBounds, 0, temp, 0, index);\n this.upperBounds = temp;\n }\n this.upperBounds[index] =...
"public void composeDocument(FileOutputStream f, XhtmlNode xhtml) throws IOException {\n byte[] bom = new byte[] { (byte) 0xEF, (byte) 0xBB, (byte) 0xBF };\n f.write(bom);\n dst = new OutputStreamWriter(f, \"String_Node_Str\");\n writeNode(\"String_Node_Str\", xhtml, null);\n dst.flush();\n dst.close(...
"public Class resolveClass(GenerationContext context) {\n String alias = abstractSchemaName;\n ClassDescriptor descriptor = context.getSession().getDescriptorForAlias(alias);\n if (descriptor == null) {\n throw JPQLException.entityTypeNotFound2(context.getParseTreeContext().getQueryInfo(), getLine(), ge...
"public void setFieldBoolean(boolean fieldBoolean) {\n realmSetter$fieldBoolean(fieldBoolean);\n}\n"
"private int ipV4StartNode() throws InvalidDatabaseException {\n if (this.metadata.ipVersion == 4) {\n return 0;\n }\n if (this.ipV4Start != 0) {\n return this.ipV4Start;\n }\n int node = 0;\n int nextNode = 0;\n for (int i = 0; i < 96 && nextNode < this.metadata.nodeCount; i++) {\n ...
"private boolean sendGreeting() {\n if (retries > 20) {\n close();\n }\n log(\"String_Node_Str\");\n connection.write();\n if (!buffer.hasRemaining()) {\n releaseWriteBuffer();\n setNoRequeue();\n setChainJob(new HandleSlaveConnection(connection, master, xaDsName));\n r...
"public void testInnerClass2() throws Exception {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_St...
"private boolean isValidContentType(String type) {\n type = stripCharacterEncoding(type);\n String wildcard = null;\n int index = type.indexOf(\"String_Node_Str\");\n if (index > -1) {\n wildcard = type.substring(0, index);\n }\n PortletEntity entity = portletWindow.getPortletEntity();\n Por...
"public List<DialogNotification> getDialogNotificationsByDialogIdAndDate(String dialogId, long createdDate, boolean moreDate) {\n List<DialogNotification> dialogNotificationsList = new ArrayList<>();\n try {\n QueryBuilder<DialogNotification, Long> messageQueryBuilder = dao.queryBuilder();\n if (mor...
"static int greatestUp(float[] array, int start) {\n int best = -1;\n float bestScore = 0;\n for (int i = start; i < array.length; i++) {\n float diff = array[i] - array[i - 1];\n if (diff > bestScore) {\n bestScore = diff;\n best = i - 1;\n }\n }\n return best;...
"public Mapping<S, D> with(Transform<RS, RD> transformation) {\n denyNull(\"String_Node_Str\", transformation);\n ReplaceCollectionTransformation<RS, RD> replace = new ReplaceCollectionTransformation<>(mapping, sourceProperty.property, destProperty.property, transformation, false);\n mapping.addMapping(sourceP...
"protected void bringToSignaturesUnchecked(SootClass sc) {\n for (SootField f : sc.getFields()) {\n addToResolveWorklist(f.getType(), SootClass.HIERARCHY);\n }\n for (SootMethod m : sc.getMethods()) {\n addToResolveWorklist(m.getReturnType(), SootClass.HIERARCHY);\n for (Type ptype : m.get...
"private static IPreparedQuery newIVInstance(DataEngineImpl dataEngine, IQueryDefinition queryDefn) throws DataException {\n switch(runQueryOnRS(dataEngine, queryDefn)) {\n case BASED_ON_RESULTSET:\n return new PreparedIVQuery(dataEngine, queryDefn);\n case BASED_ON_DATASET:\n ret...
"public void openNotification() throws Exception {\n driver.closeApp();\n driver.openNotifications();\n WebDriverWait wait = new WebDriverWait(driver, 20);\n assertNotEquals(0, wait.until(new Function<WebDriver, List<AndroidElement>>() {\n public List<AndroidElement> apply(WebDriver input) {\n ...
"private void setupInheritance(JavaClass jClass) {\n TypeInfo tInfo = typeInfo.get(jClass.getName());\n XMLDescriptor descriptor = tInfo.getDescriptor();\n if (descriptor == null) {\n return;\n }\n JavaClass superClass = CompilerHelper.getNextMappedSuperClass(jClass, typeInfo, helper);\n if (su...
"public void addEventListener(final IMXEventListener eventListener) {\n IMXEventListener globalListener = new MXEventListener() {\n public void onPresenceUpdate(Event event, User user) {\n if (user.user_id.equals(user_id)) {\n eventListener.onPresenceUpdate(event, user);\n ...
"protected Set<? extends Location> getAllLocations(ComputeService computeService) {\n Set<Location> all = new HashSet<Location>();\n for (Location loc : computeService.listAssignableLocations()) {\n for (Location p = loc; p != null; p = p.getParent()) {\n all.add(p);\n cacheProvider.g...
"public double getCoordinate(int index) {\n if (index == 0) {\n return dStart;\n } else if (index == size - 1) {\n return dEnd;\n }\n return dStart + index * dStep;\n}\n"
"public boolean pay(ManaType manaType, Ability ability, Filter filter, Game game) {\n if (getConditional(manaType, ability, filter, game) > 0) {\n removeConditional(manaType, ability, game);\n return true;\n }\n for (ManaPoolItem mana : manaItems) {\n if (filter == null || filter.match(gam...
"public void updateTargetForce() {\n if (myTargetFor == null || myTargetFor.size() != myTargetForSize)\n myTargetFor = new VectorNd(myTargetForSize);\n double[] buf = myTargetFor.getBuffer();\n int idx = 0;\n for (int i = 0; i < myForceTargets.size(); i++) {\n ForceTarget target = myForceTarge...
"private Object evaluteFilterExpression(Context cx, IFilterDefinition filter) throws DataException {\n IBaseExpression expr = filter.getExpression();\n FilterUtil.prepareFilterExpression(tempDir, expr, filterPass, this.populator.getEventHandler().getExecutorHelper());\n Object result = ScriptEvalUtil.evalExpr(...
"private Socket createSocket(InetSocketAddress socketAddress) throws IOException {\n Socket socket = null;\n boolean success = false;\n try {\n socket.setSoTimeout(3000);\n socket.connect(socketAddress);\n success = true;\n } finally {\n if (!success) {\n IOUtils.close...
"public void run() {\n Log.i(LOGTAG, \"String_Node_Str\" + this.getName() + \"String_Node_Str\");\n SamplePacket fftBuffer = null;\n SamplePacket demodBuffer = null;\n SamplePacket tmpFlushBuffer = null;\n while (!stopRequested) {\n byte[] packet = source.getPacket(1000);\n if (packet == nu...
"private Endpoint getEndpoint(String endpointId) {\n synchronized (endpoints) {\n Endpoint endpoint = endpoints.get(endpointId);\n if (endpoint == null) {\n endpoint = new Endpoint();\n endpoints.put(endpointId, endpoint);\n }\n }\n return endpoint;\n}\n"
"public void loadDictionaryAsync() {\n final String[] localeElements = TextUtils.isEmpty(mLocale) ? new String[] {} : mLocale.split(\"String_Node_Str\", 3);\n final StringBuilder request = new StringBuilder(\"String_Node_Str\");\n String localeSoFar = \"String_Node_Str\";\n for (int i = 0; i < localeElement...
"public void testGrandTotalWithComputedMeasure() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefiniti...
"private void handleStringConstants(Rvarc_var_objc_obj.Tuple ptpair, Rvar_srcm_stmt_dtp_signature_kind.Tuple site) {\n if (!(ptpair.obj() instanceof StringConstantNode)) {\n for (Iterator clsIt = Scene.v().dynamicClasses().iterator(); clsIt.hasNext(); ) {\n final SootClass cls = (SootClass) clsIt.n...
"private void checkPackageAccess(Class<?> cls, ProtectionDomain pd) {\n final SecurityManager sm = System.getSecurityManager();\n if (sm != null) {\n if (ReflectUtil.isNonPublicProxyClass(cls)) {\n for (Class<?> intf : cls.getInterfaces()) {\n checkPackageAccess(intf, pd);\n ...
"private String getPrivateSetterMethodName() {\n if (setterName == null || setterName.length() == 0) {\n String newName = referencedColumnFieldName.substring(0, 1).toUpperCase() + (referencedColumnFieldName.length() > 1 ? referencedColumnFieldName.substring(1) : \"String_Node_Str\");\n return \"String_...
"public boolean next() throws BirtException {\n boolean hasNext = false;\n if (it.getQueryResults().getPreparedQuery().getReportQueryDefn().getGroups().size() == 0) {\n hasNext = it.next();\n } else if (!started) {\n started = true;\n return it.next();\n } else {\n it.skipToEnd(i...
"private final static int[] computeNgramMinHashesWeighted(String seq, final int nGramSize, final int numHashes, FrequencyCounts kmerFilter, double repeatWeight) {\n final int numberNGrams = seq.length() - nGramSize + 1;\n if (numberNGrams < 1)\n throw new SketchRuntimeException(\"String_Node_Str\");\n f...
"public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n DrawerAdapter.DrawerItem item = (DrawerAdapter.DrawerItem) mDrawerAdapter.getItem(i);\n switch(item.getId()) {\n case Const.DRAWER_ACHIEVEMENTS:\n if (mPreferences.getBoolean(Const.SETTINGS_SIGNED_IN, false) && ge...
"private boolean isExistTable(TableNode tableNode) {\n if (tableNode != null && tableNode.getType() == TableNode.TABLE) {\n TableNode parent = tableNode.getParent();\n if (parent == null) {\n for (Object obj : ConnectionHelper.getTables(getConnection())) {\n if (obj == null) {...
"public void createCache_DifferentSameName() {\n CacheManager cacheManager = getCacheManager();\n String name1 = \"String_Node_Str\";\n Cache cache1 = cacheManager.createCacheBuilder(name1).build();\n assertEquals(cache1, cacheManager.getCache(name1));\n checkStarted(cache1);\n try {\n Cache ca...
"public void testTopPercent(FoodMartTestCase test) {\n test.assertAxisReturns(\"String_Node_Str\", \"String_Node_Str\");\n}\n"
"public void run() {\n try {\n LOGGER.info(\"String_Node_Str\" + user.getName() + \"String_Node_Str\" + reason.toString() + \"String_Node_Str\" + userId);\n user.remove(reason);\n logger.debug(\"String_Node_Str\" + user.getName());\n } catch (Exception ex) {\n handleException(ex);\n ...
"public static ASTNode parseExpr(String expr) throws LensException {\n ParseDriver driver = new ParseDriver();\n ASTNode tree;\n try {\n tree = driver.parseExpression(expr);\n } catch (ParseException e) {\n throw new LensException(COULD_NOT_PARSE_EXPRESSION.getLensErrorInfo(), e, expr);\n }...
"public String getQueryParameter(String key) {\n if (isOpaque()) {\n throw new UnsupportedOperationException(NOT_HIERARCHICAL);\n }\n String query = getEncodedQuery();\n if (query == null) {\n return null;\n }\n String encodedKey;\n try {\n encodedKey = URLEncoder.encode(key, D...
"public void shouldRethrowExceptions() {\n FailingCacheLoader<String, String> failingCacheLoader = new FailingCacheLoader<>();\n CacheLoaderServer<String, String> serverCacheLoader = new CacheLoaderServer<String, String>(10000, failingCacheLoader);\n try {\n serverCacheLoader.open();\n CacheLoade...
"public void unsetIfLE(int index) {\n if ((index / 8 + 1) >= bytes.length) {\n extend(index);\n }\n size = index + 1;\n}\n"
"protected void onNewIntent(Intent intent) {\n pendingMessageId = intent.getStringExtra(RichPushApplication.MESSAGE_ID_RECEIVED_KEY);\n}\n"
"private static void createComponentsDrawer(final IComponentsFactory compFac, boolean needHiddenComponent, boolean isFavorite, int a) {\n clearGroup();\n LinkedList<CreationToolEntry> nodeList = new LinkedList<CreationToolEntry>();\n PaletteDrawer componentsDrawer;\n String name, longName;\n String famil...
"private void inject() throws AndrolibException {\n String definition = nextAndAppend();\n if (definition.contains(\"String_Node_Str\") || definition.contains(\"String_Node_Str\")) {\n nextAndAppend();\n return;\n }\n parseParamsNumber(definition);\n boolean end = false;\n while (!end) {...
"public void onUuidChanged() {\n updateProfiles();\n if (DEBUG) {\n Log.e(TAG, \"String_Node_Str\" + (SystemClock.elapsedRealtime() - mConnectAttempted));\n }\n if (mProfiles.size() > 0 && (mConnectAttempted + MAX_UUID_DELAY_FOR_AUTO_CONNECT) > SystemClock.elapsedRealtime()) {\n connectWithout...
"static IQuery.GroupSpec groupDefnToSpec(Context cx, IGroupDefinition src, String expr, String columnName, int index) throws DataException {\n ColumnInfo groupKeyInfo = new ColumnInfo(index, columnName);\n int groupIndex = groupKeyInfo.getColumnIndex();\n String groupKey = groupKeyInfo.getColumnName();\n bo...
"public void process(GeneratingRegion region) {\n SurfaceHeightFacet surface = region.getRegionFacet(SurfaceHeightFacet.class);\n BiomeFacet biome = region.getRegionFacet(BiomeFacet.class);\n SeaLevelFacet seaLevel = region.getRegionFacet(SeaLevelFacet.class);\n List<Predicate<Vector3i>> filters = Lists.new...
"private int getMethodId(MethodInfo methodInfo) {\n return MethodTable.getMethodId(methodInfo);\n}\n"
"public static void experiment(boolean fullGraph) {\n long[] seeds = { 11, 21, 31, 41, 51, 61, 71, 81, 91, 101 };\n double[] cs = { 1, 10, 100, 1000, 10000, 100000, 1000000 };\n List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();\n evalFuncs.add(new Error());\n evalFuncs.add(new F1(...
"public JSType caseTemplateType(TemplateType type) {\n if (replacements.hasTemplateKey(type)) {\n if (hasVisitedType(type) || !replacements.hasTemplateType(type)) {\n return type;\n } else {\n JSType replacement = replacements.getUnresolvedOriginalTemplateType(type);\n ...
"public StorageFacade getStorageFacade() {\n return storageFacade;\n}\n"
"public void exportMoveLineTypeSelect6FILE1(MoveLineReport moveLineReport, boolean replay) throws AxelorException, IOException {\n LOG.info(\"String_Node_Str\");\n Company company = moveLineReport.getCompany();\n String dateQueryStr = String.format(\"String_Node_Str\", company.getId());\n JournalType journa...
"public void waitForDeleted(final String datasetName, long timeout, TimeUnit timeoutUnit) throws IOException, UnAuthorizedAccessTokenException, TimeoutException, InterruptedException {\n try {\n ProgramFlowUtil.waitFor(false, new Callable<Boolean>() {\n public Boolean call() throws Exception {\n ...
"NearestValue getNearestBackwardValue(int reference, int shiftsToApply) {\n List<Integer> values = new ArrayList<Integer>(this.values);\n Collections.reverse(values);\n int index = 0;\n boolean foundSmaller = false;\n if (!values.contains(reference)) {\n for (Integer value : values) {\n ...
"public CountStatistic getNumConnFailedValidation() {\n return numConnFailedValidation;\n}\n"
"protected int _generateCode(StringBuffer code) throws KernelException {\n long startTime = new Date().getTime();\n long overallStartTime = startTime;\n _reset();\n _sanitizedModelName = CodeGeneratorAdapter.generateName(_model);\n NamedObj container = getContainer();\n Director director = null;\n ...
"public void updateBackgroundImageView() {\n boolean used = WallpaperFactory.isWallpaperThemeSelected(mContext) && !WallpaperFactory.isLiveWallpaperUsed(mContext);\n if (mPeekBackgroundImageView == null) {\n mPeekBackgroundImageView = new ImageView(mContext);\n ViewGroup.LayoutParams params = new Vi...
"public void testFetchGroupOnPadsFromInheritanceParent() {\n if (isWeavingEnabled()) {\n EntityManager em = createEntityManager();\n Map properties = new HashMap();\n properties.put(QueryHints.FETCH_GROUP_NAME, \"String_Node_Str\");\n Class PadsClass = Pads.class;\n Pads pads = (Pa...
"protected void pageChange(int newPageIndex) {\n super.pageChange(newPageIndex);\n if (masterPage.isDirty() && (newPageIndex == RESULT_PAGE_INDEX)) {\n masterPage.doSave(null);\n }\n if (isRefreshResultPage && resultPage != null && newPageIndex == resultPage.getIndex() && resultPage instanceof Column...
"protected List<URL> getLib(List<String> libs, Boolean needLib) {\n List<URL> list = new ArrayList<URL>();\n if (!needLib) {\n return list;\n }\n try {\n org.talend.core.model.general.Project projecdddt = ProjectManager.getInstance().getCurrentProject();\n IProject fsProject = null;\n ...
"public void propertyChange(PropertyChangeEvent e) {\n EditorLogger.debug(\"String_Node_Str\" + e.getPropertyName());\n if (e.getPropertyName().equals(Project.NOTIFY_SCENE_SELECTED)) {\n if (!projectLoadedFlag)\n setSelectedScene(Ctx.project.getSelectedScene());\n } else if (e.getPropertyName...
"public int getPredNodeCount(ExplodedBasicBlock b) throws IllegalArgumentException {\n if (b == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (b.isEntryBlock()) {\n return 0;\n }\n if (b.isExitBlock()) {\n return ir.getControlFlowGraph().getPredNodeCount...
"public void run() {\n list.removeAll(removed);\n newList.stream().forEachOrdered(item -> updateCachedListItem((Listable) item, list));\n}\n"
"void startEditing(AbstractFile file, DocumentListener documentListener) throws IOException {\n this.file = file;\n this.documentListener = documentListener;\n InputStream in = null;\n try {\n if (file.hasRandomAccessInputStream()) {\n try {\n in = file.getRandomAccessInputS...
"public void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt) {\n int diff = oldt - t;\n switch(mQuickReturnType) {\n case HEADER:\n if (diff <= 0) {\n mHeaderDiffTotal = Math.max(mHeaderDiffTotal + diff, mMinHeaderTranslation);\n } else {\n ...
"private void setSelection(SelectionSet selection) {\n currentSelection.setSelected(false);\n selection.setSelected(true);\n this.connector.setSelection(selection);\n this.currentSelection = selection;\n}\n"
"protected DbMaintainTask createDbMaintainTask() {\n return new UpdateSequencesTask(getDbMaintainDatabases(), lowestAcceptableSequenceValue);\n}\n"
"private void setOtherProperties() {\n boolean metadataInput = false;\n IElementParameter currentParam = elem.getElementParameter(propertyName);\n Item item = null;\n IElementParameter repositoryParam = elem.getElementParameter(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());\n if (repositoryParam != ...
"public static org.hl7.fhir.dstu2016may.model.CodeSystem convertCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.CodeSystem tgt = new org.hl7.fhir.dstu2016may.model.CodeSystem();\n copyDomainRes...
"protected void doRun() {\n ISelection selection = getSelection();\n Object obj = ((IStructuredSelection) selection).getFirstElement();\n final RepositoryNode node = (RepositoryNode) obj;\n final String title = DefaultMessagesImpl.getString(\"String_Node_Str\");\n String message = null;\n if (node.get...
"public void execute(InterpretContext ctx) throws InterpretException {\n JetWriter os = ctx.getWriter();\n if (encoder == null) {\n if (os.isStreaming()) {\n encoder = new ByteArrayEncoder(text, os.getCharset());\n } else {\n if (JdkUtils.IS_AT_LEAST_JAVA_7) {\n ...
"private void _removeObject(NamedObj object) throws TransformationException {\n if (object instanceof CompositeEntity) {\n CompositeEntity entity = (CompositeEntity) object;\n CompositeEntity container = (CompositeEntity) entity.getContainer();\n Map<NamedObj, NamedObj> entityMap = new HashMap<N...
"void register() {\n if (isVirtual()) {\n return;\n }\n ArrayList list = new ArrayList();\n Member[] measures = getMeasures();\n for (int i = 0; i < measures.length; i++) {\n if (measures[i] instanceof RolapStoredMeasure) {\n list.add(measures[i]);\n }\n }\n RolapSto...
"public void maxDisplayCheatSheetView(CheatSheetView view) {\n IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();\n activePage.setEditorAreaVisible(true);\n IViewPart cheatSheetView = null;\n IViewReference cheatSheetref = null;\n for (IViewReference ref : a...
"private void reloadSessionData(Cursor cursor) {\n mSessionList.setAdapter(null);\n mSessionsAdapter = null;\n final ExploreSessionsModel model = new ExploreSessionsModel(cursor, getActivity());\n if (model.getSessionData() == null || model.getSessionData().isEmpty()) {\n mEmptyView.setVisibility(Vie...
"public void testThatDispensingIsInvalidIfNoQuantitiesAreSet() throws Exception {\n DispenseActivity dispenseActivity = getDispenseActivity();\n ListView mockListView = mock(ListView.class);\n View mockListItemView = mock(View.class);\n EditText mockEditText = new EditText(application);\n when(mockListIt...
"private Location getInterimLocation(LivingEntity ride, Location destination) {\n Location interimTarget = null;\n if (ride != null && ride.getLocation().getWorld().equals(destination.getWorld()) && ride.getLocation().distanceSquared(destination) > 64.0D) {\n interimTarget = ride.getLocation().clone().add(...
"public static DynamicSectorAccuracyScope getDynamicSectorAccuracyScope(ExplorationStrategy strategyConfig) {\n String value = strategyConfig.getConfiguration().get(DYNAMIC_SECTOR_ACCURACY_SCOPE);\n if (value != null && !value.isEmpty()) {\n if (value.equalsIgnoreCase(DynamicSectorAccuracyScope.Local.name(...
"private void doCheckedExportPDF(UserRequest ureq) {\n try {\n String name = courseNode.getShortTitle();\n CheckedPDFExport pdfExport = new CheckedPDFExport(name, getTranslator(), withScore, userPropertyHandlers);\n pdfExport.setAuthor(userManager.getUserDisplayName(getIdentity()));\n pdf...
"public Orientations resolveDestination(EntityData data) {\n LinkedList<Orientations> listOfPossibleMovements = getPossibleMovements(new Position(xCoord, yCoord, zCoord, data.orientation), data.item);\n if (listOfPossibleMovements.size() == 0)\n return Orientations.Unknown;\n else {\n int i;\n ...
"public void run() {\n Set<String> clusterList = new HashSet<String>();\n requestQueue.drainTo(clusterList);\n if (clusterList.isEmpty()) {\n logger.debug(\"String_Node_Str\");\n return;\n }\n Iterator<String> ite = clusterList.iterator();\n for (String clusterName = ite.next(); ite.hasN...
"protected javax.jms.QueueConnectionFactory getQueueConnectionFactory() throws JMSException {\n QueueConnectionFactory cFactory = new QueueConnectionFactory();\n ((ConnectionFactory) cFactory).setProperty(ConnectionConfiguration.imqBrokerHostName, getHost());\n ((ConnectionFactory) cFactory).setProperty(Connec...
"private void doGetArtifact(MavenGavInfo gavInfo, InputData inputData) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {\n ClassLoader oldCtxCL = Thread.currentThread().getContextClassLoader();\n Thread.currentThread().setContextClassLoader(SrampWagon.class.getClassLoader());...
"public static IQueryDefinition getOptimizedIVQuery(IBaseQueryDefinition oldq, IQueryDefinition newq, String queryResultID) throws DataException {\n if (oldq == null || newq == null)\n return null;\n if (!QueryCompUtil.isEqualBindings(oldq.getBindings(), newq.getBindings()))\n return null;\n if (...
"public ReplSetHeartbeatReplyBuilder setDurableOpTime(OpTime durableOpTime) {\n this.durableOpTime = durableOpTime;\n return this;\n}\n"
"public static void showSimpleMessageDialog(final Context context, String message, final Runnable okayRunner, int okayButtonText, final Runnable postRunner) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n final View layout = inflater.inflate(R.layout.sim...
"private boolean await(long waitTimeMillis, long waitUnitTimeMillis) {\n synchronized (lock) {\n long waitTime = waitTimeMillis;\n long waitUnitTime = waitUnitTimeMillis;\n if (waitTimeMillis < 1000) {\n waitTime = 1000;\n }\n if (waitUnitTimeMillis < 100) {\n ...
"private void onRegistrationResult(final ProviderRegistrationResult result) {\n final PushProvider provider = getProviderByName(result.getProviderName());\n Assert.assertNotNull(provider);\n if (result.isSuccess()) {\n mInitStatus = INIT_SUCCESS;\n mAppContext.getSharedPreferences(PREFERENCES, Co...
"private void clearOldReaders() throws IOException {\n HashSet<String> valid = new HashSet<String>();\n for (String id : indexEntries.keySet()) {\n IndexEntry entry = indexEntries.get(id);\n if (entry.getStatus().isCommitted()) {\n valid.add(id);\n }\n }\n HashSet<String> inV...
"protected void handleSelectionKey(SelectionKey sk) {\n if (sk.isValid() && sk.isWritable()) {\n writeEvents++;\n sk.interestOps(sk.interestOps() & ~SelectionKey.OP_WRITE);\n SelectionHandler handler = (SelectionHandler) sk.attachment();\n handler.handle();\n }\n}\n"
"public Float getLongitudeDegrees() {\n Object value = parameters.get(KEY_LON_DEGREES);\n if (value instanceof Integer) {\n return ((Integer) value).floatValue();\n } else if (value instanceof Double) {\n return ((Double) value).floatValue();\n } else {\n return (Float) value;\n }\n}...
"public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {\n for (aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {\n if (!scriptEntry.hasObject(\"String_Node_Str\") && arg.matchesArgumentType(dLocation.class)) {\n scriptEntry.addObject(\"String_Node_Str\", arg.a...
"protected JSONObject getRequestJSON(HttpServletRequest request) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(request.getInputStream(), \"String_Node_Str\"));\n StringBuilder sb = new StringBuilder();\n String str;\n while ((str = in.readLine()) != null) {\n sb....
"public void run() {\n List<SiteModel> sites = mSiteStore.getWPComSites();\n for (SiteModel site : sites) {\n if (site.getUrl() != null && site.getSiteId() != 0) {\n String normURL = normalizeAndRemoveScheme(site.getUrl());\n long blogID = site.getSiteId();\n userBlogs.put(...
"protected Html renderPage(final ProductOverviewPageContent pageContent) {\n final SunrisePageData pageData = pageData(pageContent);\n return templateEngine().renderToHtml(\"String_Node_Str\", pageData, userContext.locales());\n}\n"
"private void updateGoogleSheet(String environment) {\n checkGoogleUserNameAndPassword();\n ReadGoogle readGoogle = ReadGoogle.getInstance();\n readGoogle.connect(System.getProperty(GoogleSheetConstant.GOOGLEUSERNAME), System.getProperty(GoogleSheetConstant.GOOGLEPASSWD), System.getProperty(GoogleSheetConstant...