content stringlengths 40 137k |
|---|
"public void run() {\n if (null != dbPools) {\n for (DBPoolInfo dbPool : this.dbPools) {\n try {\n LOG.debug(\"String_Node_Str\" + dbPool.getAlias() + \"String_Node_Str\" + pollInterval + \"String_Node_Str\" + dbPool.getThreshold());\n if (dbPool.getMaximumConnections(... |
"public void onResponse(Data response) {\n if (marked) {\n tryToPutNearCache(key, response);\n }\n}\n"
|
"public ContainerRequest filter(ContainerRequest request) {\n if (resourceConfig.getFeature(ResourceConfig.FEATURE_NORMALIZE_URI)) {\n final URI uri = request.getRequestUri();\n final URI normalizedUri = UriHelper.normalize(uri, !resourceConfig.getFeature(ResourceConfig.FEATURE_CANONICALIZE_URI_PATH));... |
"protected RecordsManagementAuditQueryParameters parseQueryParameters(WebScriptRequest req) {\n RecordsManagementAuditQueryParameters params = new RecordsManagementAuditQueryParameters();\n NodeRef nodeRef = null;\n Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();\n String storeTy... |
"public void sendControlMessage() {\n FlowStep flowStep = componentContext.getFlowStep();\n sendMessage(createMessage(new ControlMessage(flowStep.getId()), null, null, true));\n}\n"
|
"private AbstractCall resolveApply(MarkerList markers, IContext context) {\n IValue instance;\n IMethod method;\n IDataMember field = context.resolveField(this.name);\n if (field == null) {\n IClass iclass = IContext.resolveClass(context, this.name);\n if (iclass == null) {\n return... |
"public boolean apply(Future<?> arg0) {\n if (!arg0.isDone()) {\n try {\n arg0.get(100, TimeUnit.MILLISECONDS);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n } catch (ExecutionException ex) {\n LOG.error(ex);\n } catch (Time... |
"private void goForward(int count) {\n for (int i = 0; i < count; ++i) {\n if (!nextMove()) {\n break;\n }\n }\n}\n"
|
"public void run() {\n scheduledTaskMap.remove(second);\n final Map<Object, ScheduledEntry<K, V>> entries = scheduledEntries.remove(second);\n if (entries == null || entries.isEmpty()) {\n return;\n }\n List<ScheduledEntry<K, V>> values = new ArrayList<ScheduledEntry<K, V>>(entries.size());\n f... |
"private static SequenceAnnotation parseSequenceAnnotationV1(SBOLDocument SBOLDoc, NestedDocument<QName> sequenceAnnotation, List<SBOLPair> precedePairs, URI parentURI, int sa_num) {\n Integer start = null;\n Integer end = null;\n String strand = null;\n URI componentURI = null;\n URI identity = sequence... |
"public void init() {\n UUID id = getWidget().id;\n playlist = PlaylistManager.playlists.getOr(id, getUnusedPlaylist(id));\n PlaylistManager.playlists.add(playlist);\n d(() -> PlaylistManager.playlists.remove(playlist));\n outSelected = outputs.create(widget.id, \"String_Node_Str\", Item.class, null);\n ... |
"void wakeup(TaskRecord task, boolean flush) {\n synchronized (this) {\n if (task != null) {\n int queueNdx;\n for (queueNdx = mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {\n final WriteQueueItem item = mWriteQueue.get(queueNdx);\n if (item instanceof... |
"public void onModuleReady(ModuleSpace readySpace) throws UnableToCompleteException {\n this.space = readySpace;\n SourceOracle srcOracle = new HostedModeSourceOracle(typeOracle, module.getName());\n ByteCodeCompiler compiler = getOrCreateByteCodeCompiler(srcOracle);\n ModuleSpacePropertyOracle propOracle =... |
"public static org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent convertQuestionnaireItemComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Question... |
"private static int CommandLineError(String msg) {\n PcalDebug.reportError(\"String_Node_Str\" + msg + \"String_Node_Str\");\n return STATUS_EXIT_WITH_ERRORS;\n}\n"
|
"public static IRepositoryViewObject getRepositoryObjectById(final String id, boolean withDeleted) {\n if (id == null || \"String_Node_Str\".equals(id) || RepositoryNode.NO_ID.equals(id)) {\n return null;\n }\n IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory()... |
"public static void main(String[] args) {\n Interval[] intervals = new Interval[6];\n intervals[0] = new Interval(0, 2, 3);\n intervals[1] = new Interval(2, 6, 3);\n intervals[2] = new Interval(4, 8, 8);\n intervals[3] = new Interval(5, 9, 10);\n intervals[4] = new Interval(6, 10, 9);\n intervals[5... |
"public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {\n if (isMaster()) {\n int recieved = maxReceive;\n if (recieved > maxEnergy - energy)\n recieved = maxEnergy - energy;\n if (!simulate)\n energy += recieved;\n return recieved;\n } ... |
"public void testValidExampleMediaTypeValidator() {\n mediaType.setExample(\"String_Node_Str\");\n validator.validate(validationHelper, context, mediaType);\n Assert.assertEquals(0, validationHelper.getEventsSize());\n}\n"
|
"public void processOwnershipEvent(OwnershipEvent<?, ?> event) {\n Node affectedNode = getAffectedNode(event);\n LibraryNode ln = (LibraryNode) thisNode;\n switch(event.getType()) {\n case MEMBER_ADDED:\n if (affectedNode == null)\n return;\n if (affectedNode instanc... |
"protected int executeCommand() throws CommandException {\n try {\n nodeDir = nodeDir0;\n node = node0;\n File serverDir = new File(nodeDir, node);\n if (!serverDir.isDirectory()) {\n throw new CommandException(strings.get(\"String_Node_Str\", serverDir));\n }\n A... |
"protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n mInnerRectF.set(0, 0, mViewSize, mViewSize);\n mInnerRectF.offset((getWidth() - mViewSize) / 2, (getHeight() - mViewSize) / 2);\n if (mShowStroke) {\n final int halfBorder = (int) (mStrokePaint.getStrokeWidth() / 2f + 0.5f);\n m... |
"public <T extends ConfigBeanProxy> NotProcessed changed(TYPE type, Class<T> tc, T t) {\n NotProcessed result = null;\n if (tc == Profiler.class) {\n result = new NotProcessed(\"String_Node_Str\");\n } else if (tc == Property.class && t.getParent().getClass() == JavaConfig.class) {\n result = new... |
"public void createResourceRef(String jndiName, String enabled, String target) throws TransactionFailure {\n if (target.equals(DOMAIN)) {\n return;\n }\n if (domain.getConfigNamed(target) != null) {\n return;\n }\n Server server = configBeansUtilities.getServerNamed(target);\n if (server... |
"public AssetUri getPrefabURI() {\n if (exists()) {\n EntityInfoComponent info = getComponent(EntityInfoComponent.class);\n if (info != null && info.parentPrefab.exists()) {\n return new AssetUri(AssetType.PREFAB, info.parentPrefab.getName());\n }\n }\n return null;\n}\n"
|
"public String getPrefix(String worldName) {\n String localPrefix = this.getOwnPrefix(worldName);\n if (localPrefix == null || localPrefix.isEmpty()) {\n for (PermissionGroup group : this.getParentGroups(worldName)) {\n localPrefix = group.getPrefix();\n if (localPrefix != null && !lo... |
"public void setData(String author, long createdUtc, String domain, int downs, int likes, long nowTimeMs, int numComments, boolean over18, String parentSubreddit, int score, String subreddit, int thingBodyWidth, String thingId, String thumbnailUrl, String title, int ups) {\n this.likes = likes;\n this.thingBodyWi... |
"private void writeCollection(final MappedField mf, final DBObject dbObject, Map<Object, DBObject> involvedObjects, String name, Object fieldValue, Mapper mapr) {\n Iterable coll = null;\n if (fieldValue != null)\n if (mf.isArray)\n coll = Arrays.asList((Object[]) fieldValue);\n else\n ... |
"private BigInteger toWei(PendingFundCommand command) {\n final TokenInfoDto tokenInfo = tokenInfoService.getTokenInfo(command.getTokenAddress());\n return EthUtil.toWei(new BigDecimal(command.getAmount()), tokenInfo.getDecimals()).toBigInteger();\n}\n"
|
"public void createApplicationClusters(String appId, ApplicationClusterContextDTO[] appClustersContexts) throws ApplicationClusterRegistrationException {\n if (appClustersContexts == null || appClustersContexts.length == 0) {\n String errorMsg = \"String_Node_Str\";\n LOG.error(errorMsg);\n thro... |
"public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) {\n context = ObjectUtil.nvl(context, new EvaluationContext());\n if (context.getBaseCohort() == null) {\n context.setBaseCohort(Context.getPatientSetService().getAllPatients());\n }\n MapDataSet data = new MapDa... |
"protected Control createDialogArea(Composite parent) {\n Composite composite = (Composite) super.createDialogArea(parent);\n Composite comp = new Composite(composite, SWT.NONE);\n comp.setLayoutData(new GridData(GridData.FILL_BOTH));\n comp.setLayout(new FormLayout());\n Element element = new FakeElemen... |
"public boolean execute() {\n GraphModel graphModel = workspace.getLookup().lookup(GraphModel.class);\n HierarchicalGraph graph = null;\n if (exportVisible) {\n graph = graphModel.getGraphVisible();\n } else {\n graph = graphModel.getGraph();\n }\n try {\n exportData(graph);\n ... |
"public Response execute() {\n DatabaseAccessor db = null;\n try {\n db = initDB();\n db.addExperiment(name);\n for (Annotation annotation : annotations) {\n db.annotateExperiment(name, annotation.getName(), annotation.getValue());\n }\n return new MinimalResponse(Htt... |
"public boolean isValid() {\n boolean init = this.validateUUID(this.annotation.getUuid()) && this.printStatus(\"String_Node_Str\", this.annotation.isSetArgumentList()) && this.printStatus(\"String_Node_Str\", this.annotation.getArgumentListSize() > 0) && this.printStatus(\"String_Node_Str\", this.annotation.isSetSit... |
"public Iterator<T> getNormalSuccessors(final T ret) {\n Iterator<? extends Object> allPreds = delegate.getPredNodes(ret);\n Filter sameProc = new Filter<T>() {\n\n public boolean accepts(Object o) {\n return getProcOf(ret).equals(getProcOf((T) o));\n }\n };\n Iterator<Object> sameP... |
"public void activityCreated(Activity activity) {\n if (android.os.Build.VERSION.SDK_INT < 14) {\n activityCreatedCallback(activity);\n }\n}\n"
|
"public void onAfterAuthenticate(IOCContainer container) {\n super.onAfterAuthenticate(container);\n sliderFactory = container.getBean(\"String_Node_Str\");\n if (sliderFactory != null) {\n slider = sliderFactory.wrap(this, ZOrder.BEHIND, 0);\n }\n}\n"
|
"private static Driver getClassDriver(String driverClassName, String url, Properties props) throws InstantiationException, IllegalAccessException {\n Driver driver = ExtractMetaDataUtils.getInstance().getDriverCache().get(driverClassName);\n if (driver == null) {\n driver = MetadataConnectionUtils.getDrive... |
"public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {\n ImmutablePluginModel plugin = (ImmutablePluginModel) getItem(position);\n if (plugin == null) {\n return;\n }\n PluginViewHolder holder = (PluginViewHolder) viewHolder;\n holder.mName.setText(plugin.getDisplayName(... |
"public static CubeConfiguration fromMap(Map<String, String> map) {\n CubeConfiguration cubeConfiguration = new CubeConfiguration();\n if (map.containsKey(DOCKER_VERSION)) {\n cubeConfiguration.dockerServerVersion = map.get(DOCKER_VERSION);\n }\n if (map.containsKey(DOCKER_URI)) {\n cubeConfig... |
"private void removeAuthorityLocked(Account account, String authorityName) {\n AccountInfo accountInfo = mAccounts.get(account);\n if (accountInfo != null) {\n final AuthorityInfo authorityInfo = accountInfo.authorities.remove(authorityName);\n if (authorityInfo != null) {\n mAuthorities.... |
"public Response getDeploymentTest(final String csar, final String servicetemplate, final Integer id, final Integer deploymenttest) {\n final CSARContent csarContent = this.csarService.findById(csar);\n if (!this.csarService.hasServiceTemplate(csarContent.getCSARID(), servicetemplate)) {\n logger.info(\"St... |
"public void testCursorModel6() throws OLAPException, BirtException {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(CubeCreator.cubeName);\n cqd.createMeasure(\"String_Node_Str\");\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition timeDim = columnEdg... |
"public boolean calculateCooccurrences(List<String> selectedFiles, String seedFile, int windowSize, String outputPath, int threshold, boolean buildMatrix, IProgressMonitor monitor) {\n String currentLine = null;\n List<String> phrase = new ArrayList<String>();\n Date currTime = new Date();\n setOutputPath(o... |
"public void testServiceFunctionRoundRobinScheduler1() {\n ServiceFunctionPathBuilder serviceFunctionPathBuilder = new ServiceFunctionPathBuilder();\n List<String> result;\n boolean transactionSuccessful = writeTypes();\n assertTrue(\"String_Node_Str\", transactionSuccessful);\n result = scheduler.schedu... |
"public static void clickMenuItem(IRobot robot, JMenuItem item) {\n if (!item.isEnabled()) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.MENU_ITEM_NOT_ENABLED));\n }\n if (item.getParent() instanceof JPopupMenu && ((JPopupMenu) item.getParent()).... |
"public static <A extends Annotation> A create(A annotation, Locatable parentSourcePos) {\n if (annotation == null)\n return null;\n Class<? extends Annotation> type = annotation.annotationType();\n if (quicks.containsKey(type)) {\n return (A) quicks.get(type).newInstance(parentSourcePos, annotat... |
"public Optional<BsonTimestamp> getElectionTime() {\n return Optional.ofNullable(electionTime);\n}\n"
|
"public void renderGridLines(Canvas c) {\n calcXBounds(mTrans);\n if (!mXAxis.isDrawGridLinesEnabled() || !mXAxis.isEnabled())\n return;\n float[] position = new float[] { 0f, 0f };\n mGridPaint.setColor(mXAxis.getGridColor());\n mGridPaint.setStrokeWidth(mXAxis.getGridLineWidth());\n BarData b... |
"public static Slot getSlot(Element elem, Property prop) {\n if (prop == null || elem == null)\n return null;\n Element myOwner = prop.getOwner();\n if (myOwner instanceof Stereotype && StereotypesHelper.hasStereotypeOrDerived(elem, (Stereotype) myOwner)) {\n Slot slot = StereotypesHelper.getSlot... |
"private KeyStroke getKeyStroke(String keyStrokeSpec) throws RobotException {\n KeyStroke keyStroke;\n if (keyStrokeSpec.length() == 1) {\n char singeKeyStrokeSpecChar = keyStrokeSpec.charAt(0);\n singeKeyStrokeSpecChar = getOSSspecificSpecBaseCharacter(singeKeyStrokeSpecChar);\n keyStroke = ... |
"private void updateDependencies(IFolder analysesSubFolder) throws CoreException {\n for (IResource resource : analysesSubFolder.members()) {\n if (resource instanceof IFolder) {\n IFolder folder = (IFolder) resource;\n updateDependencies(folder);\n }\n if (resource instanc... |
"protected void onDraw(Canvas canvas) {\n int startX = getScrollX() + (iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding)) + getPaddingLeft();\n int endX = getScrollX() + (iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding) - getPaddingRight();\n int lineStartY = getScr... |
"protected void initRecognizer() {\n this.scorer = new ThreadedAcousticScorer(frontend, null, 10, true, 0);\n this.pruner = new SimplePruner();\n this.activeListFactory = new PartitionActiveListFactory(absoluteBeamWidth, relativeBeamWidth, logMath);\n this.searchManager = new SimpleBreadthFirstSearchManager... |
"private void strobe(int data) {\n if (DEBUG) {\n log(\"String_Node_Str\" + Utils.hex8(data) + \"String_Node_Str\" + Reg.values()[data]);\n }\n if ((stateMachine == RadioState.POWER_DOWN) && (data != REG_SXOSCON)) {\n if (DEBUG)\n log(\"String_Node_Str\" + data + \"String_Node_Str\");\... |
"public void onUpdateProperties(final NodeRef nodeRef, final Map<QName, Serializable> before, final Map<QName, Serializable> after) {\n if (AuthenticationUtil.getFullyAuthenticatedUser() != null && AuthenticationUtil.isRunAsUserTheSystemUser() == false && nodeService.exists(nodeRef) && isRecord(nodeRef)) {\n ... |
"public AbstractNodeType getNodeType(QName nodeTypeId) {\n for (AbstractNodeType nodeType : this.getNodeTypes()) {\n if (nodeType.getId().equals(nodeTypeId)) {\n return nodeType;\n }\n }\n return null;\n}\n"
|
"public void tick() {\n ThreadsHandler.worldExecutor().execute(() -> {\n redstoneTick = !redstoneTick;\n if (time >= 2400)\n time = 0;\n if (time % 40 == 0)\n TridentPlayer.sendAll(new PacketPlayOutTimeUpdate().set(\"String_Node_Str\", existed).set(\"String_Node_Str\", time... |
"public BigDecimal computeDiscount(int discountTypeSelect, BigDecimal discountAmount, BigDecimal unitPrice, Invoice invoice) {\n return priceListService.computeDiscount(unitPrice, discountTypeSelect, discountAmount);\n}\n"
|
"public synchronized void stop(final StopContext context) {\n final ManagedQueueExecutorService executor = getValue();\n context.asynchronous();\n executor.internalShutdown();\n executor.addShutdownListener(StopContextEventListener.getInstance(), context);\n}\n"
|
"private CheckState newState(Status status, String output, boolean hard, int attempt, boolean transitioning) {\n CheckState state = new CheckState();\n state.setCheckId(UUID.randomUUID());\n state.setStatus(status);\n state.setOk(status.isOk());\n state.setOutput(output);\n state.setHard(hard);\n s... |
"private int calculateVisibleType() {\n if (mUserExpanding) {\n int height = !mIsChildInGroup || isGroupExpanded() || mContainingNotification.isExpanded(true) ? mContainingNotification.getMaxContentHeight() : mContainingNotification.getShowingLayout().getMinHeight();\n if (height == 0) {\n h... |
"public DatabaseConnection getDatabaseConnection() {\n Property property = this.getObject().getProperty();\n if (property != null && property.getItem() != null && ((ConnectionItem) property.getItem()).getConnection() instanceof DatabaseConnection) {\n return (DatabaseConnection) ((ConnectionItem) property.... |
"protected IStatus run(IProgressMonitor monitor) {\n if (monitor.isCanceled()) {\n return Status.CANCEL_STATUS;\n }\n NaiveBayesClassifier nbc = new NaiveBayesClassifier();\n try {\n nbc.classify(trainingDataPaths, classificationInputDir, classificationOutputDir, false, false);\n } catch (F... |
"public void handle(HttpRequest request, final HttpResponder responder, String appId, String procedureName, String methodName) {\n if (\"String_Node_Str\".equals(appId) && \"String_Node_Str\".equals(procedureName) && \"String_Node_Str\".equals(methodName)) {\n byte[] content = request.getContent().array();\n ... |
"public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) {\n int l = par2Random.nextInt(3) + this.minTreeHeight;\n boolean flag = true;\n if (par4 >= 1 && par4 + l + 1 <= 256) {\n byte b0;\n int k1;\n Block block;\n for (int i1 = par4; i1 <= par4 + ... |
"private boolean isCarrierApp(String packageName) {\n synchronized (mLock) {\n if (!mHaveCarrierPrivilegedApps) {\n fetchCarrierPrivilegedAppsLocked();\n }\n }\n return mCarrierPrivilegedApps.contains(packageName);\n}\n"
|
"public ConstraintMoney with(CurrencyUnit unit, double amount) {\n return new ConstraintMoney(this.amount.with(unit, amount), predicate);\n}\n"
|
"public Entity get(final InternalDataDefinition dataDefinition, final Long entityId) {\n checkNotNull(dataDefinition, DATA_DEFINITION_MUST_BE_GIVEN);\n checkState(dataDefinition.isEnabled(), DATA_DEFINITION_BELONGS_TO_DISABLED_PLUGIN);\n checkNotNull(entityId, \"String_Node_Str\");\n Object databaseEntity =... |
"static Type gcd(Type... types) {\n if (types.length == 0) {\n return Object.class;\n }\n Type best = types[0];\n Primitive bestPrimitive = Primitive.of(best);\n if (bestPrimitive != null) {\n for (int i = 1; i < types.length; i++) {\n final Primitive primitive = Primitive.of(typ... |
"private void reallyRun() {\n try {\n s_logger.trace(\"String_Node_Str\");\n Date cutTime = new Date(DateUtil.currentGMTTime().getTime() - _jobExpireSeconds * 1000);\n List<AsyncJobVO> l = _jobDao.getExpiredJobs(cutTime, 100);\n if (l != null && l.size() > 0) {\n for (AsyncJobV... |
"public void addRemoteVideoSpecificComponents(CallPeer callPeer) {\n if (CallManager.isVideoQualityPresetSupported(callPeer)) {\n if (resizeVideoButton == null) {\n resizeVideoButton = new ResizeVideoButton(callPeer.getCall());\n resizeVideoButton.setIndex(9);\n }\n if (res... |
"protected synchronized void handlePeerDeath(Peer peer) {\n if (peer == downloadPeer) {\n downloadPeer = null;\n synchronized (peers) {\n if (downloadListener != null && !peers.isEmpty()) {\n startBlockChainDownloadFromPeer(peers.iterator().next());\n }\n }\n... |
"public int drainTo(Collection<? super T> c, int maxElements) {\n if (maxElements <= 0) {\n return 0;\n }\n int addedElements = 0;\n while (addedElements < maxElements && peek() != null) {\n c.add(poll());\n addedElements++;\n next = poll();\n }\n return addedElements;\n}\n... |
"public final void parse() {\n Vect constants = (Vect) this.configTbl.get(Constant);\n Vect constraints = (Vect) this.configTbl.get(Constraint);\n Vect actionConstraints = (Vect) this.configTbl.get(ActionConstraint);\n Vect invariants = (Vect) this.configTbl.get(Invariant);\n Vect props = (Vect) this.con... |
"public Uid update(ObjectClass objclass, Uid uid, Set<Attribute> replaceAttributes, OperationOptions options) {\n if (objclass == null || (!objclass.equals(ObjectClass.ACCOUNT))) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (uid == null) {\n throw new IllegalArgumentExcep... |
"public Row next() {\n final String source = parser.getCurrentLine();\n final String[] fields = parser.next();\n return new Row(fields, source);\n}\n"
|
"public void paintControl(PaintEvent pe) {\n Color cBackground = null;\n try {\n Color clrTransparencyBackground = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND);\n GC gc = pe.gc;\n if (!this.isEnabled()) {\n gc.setBackground(Display.getCurrent().getSystemColor(SWT.... |
"public void load(InputStream inputStream, ValidationHandler handler) {\n if (inputStream == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Map<String, Object> options = new HashMap<String, Object>();\n options.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_O... |
"protected Map<String, Double> updateTrustAfterHunt(double foodHunted, double foodReceived) {\n List<String> members = this.getDataModel().getHuntingTeam().getMembers();\n if ((lastHunted == null) || (members.size() < 2))\n return null;\n String opponentID;\n Map<String, Double> newTrustValue = new H... |
"public void testTransactionTrackChangesManualTransaction() throws Exception {\n test.clearScreen();\n DirectoryResource tempDir = factory.create(OperatingSystemUtils.createTempDir()).reify(DirectoryResource.class);\n tempDir.deleteOnExit();\n test.getShell().setCurrentResource(tempDir);\n Assert.assertF... |
"public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {\n FileUpload fileUpload = (FileUpload) command;\n if (fileUpload.getFile().length == 0) {\n Object[] args = new Object[] { getText(\"String_Node_Str\", request.ge... |
"private void saveNullRowsBetween(int lastRowIndex, int currIndex) throws IOException {\n int gapRows = currIndex - lastRowIndex - 1;\n for (int i = 0; i < gapRows; i++) {\n IOUtil.writeInt(this.rowExprsDos, 0);\n IOUtil.writeLong(this.rowLenDos, currentOffset);\n currentOffset += IOUtil.INT_... |
"private void addText(String[] args, CommandSender sender) {\n Player p = (Player) sender;\n HumanNPC n = NPCManager.getNPC(NPCManager.NPCSelected.get(p.getName()));\n String text = \"String_Node_Str\";\n int i = 0;\n for (String s : args) {\n if (i == 1 && !s.isEmpty() && !s.equals(\"String_Node_... |
"protected int getServerInstanceHttpPort(String server, int default_port, boolean secure) {\n String httpListener = (!secure) ? \"String_Node_Str\" : \"String_Node_Str\";\n String value = getClientUtil().getAttributes(HTTP_LISTENER_INS.replace(\"String_Node_Str\", server).replace(\"String_Node_Str\", httpListener... |
"public void afterRun() {\n mapService.interceptAfterRemove(name, dataValue);\n int eventType = EntryEvent.TYPE_REMOVED;\n mapService.publishEvent(getCallerAddress(), name, eventType, dataKey, dataOldValue, null);\n invalidateNearCaches();\n if (mapContainer.getMapConfig().isStatisticsEnabled()) {\n ... |
"public void calcMinMax(int start, int end) {\n if (mValues == null)\n return;\n if (mValues.size() == 0)\n return;\n int endValue;\n if (end == 0 || end >= mValues.size())\n endValue = mValues.size() - 1;\n else\n endValue = end;\n mYMin = yMin(mValues.get(start));\n mY... |
"public final void renderEachAxis() throws ChartException {\n final double dStaggeredLabelOffset = sc.computeStaggeredAxisLabelOffset(xs, la, iOrientation);\n if (!lia.isSetVisible()) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.RENDERING, \"String_Node_Str\", Messages.getResourceBundl... |
"public void updateVABasedOnSortingStrategy() {\n ContentGroupList groupList = contentVA.getGroupList();\n contentVA = new ContentVirtualArray(Set.CONTENT, contentTree.getRoot().getLeaveIds());\n contentVA.buildNewGroupList(contentTree.getRoot().getChildren());\n}\n"
|
"private Lang getLangFromType(String type) {\n if (type.contains(\"String_Node_Str\") || type.contains(\"String_Node_Str\"))\n return Lang.TTL;\n if (type.contains(\"String_Node_Str\") || type.contains(\"String_Node_Str\"))\n return Lang.RDFXML;\n if (type.contains(\"String_Node_Str\"))\n ... |
"public AbstractTreeElement generateRoot(ExternalDataInstance instance) {\n CommCareApplication app = CommCareApplication._();\n String ref = instance.getReference();\n if (ref.indexOf(LedgerInstanceTreeElement.MODEL_NAME) != -1) {\n if (stockbase == null) {\n SqlStorage<Ledger> storage = app... |
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = source.getSourceObject(game);\n if (controller != null && sourceObject != null && controller.getLibrary().hasCards()) {\n Library library = controller.getLibrary... |
"public void startContainer(String id, Map<String, Object> containerConfiguration) {\n StartContainerCmd startContainerCmd = this.dockerClient.startContainerCmd(id);\n if (containerConfiguration.containsKey(BINDS)) {\n List<String> binds = asListOfString(containerConfiguration, BINDS);\n startContai... |
"public static void iterateSpliceIsoforms(File assembly_gtf, GTFWriter isoform_gtf, PrintStream skipped, Integer max_paths) throws FileNotFoundException {\n TranscriptIterator ti = new TranscriptIterator(assembly_gtf);\n StrandedGenomicIntervalTree<Map<String, Object>> exon_5p = new StrandedGenomicIntervalTree<Ma... |
"public void findBusinessGroupsOfAreaAttendedBy() {\n Identity id1 = JunitTestHelper.createAndPersistIdentityAsUser(\"String_Node_Str\" + UUID.randomUUID().toString());\n Identity id2 = JunitTestHelper.createAndPersistIdentityAsUser(\"String_Node_Str\" + UUID.randomUUID().toString());\n Identity id3 = JunitTes... |
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (!this.getClass().equals(obj.getClass()))\n return false;\n NetworkRule other = (NetworkRule) obj;\n if (highPort == null) {\n if (other.highPort != null)\n ... |
"public Object clone() throws CloneNotSupportedException {\n ReportDesign design = (ReportDesign) super.clone();\n design.allErrors = new ArrayList();\n design.initSlots();\n for (int i = 0; i < slots.length; i++) {\n design.slots[i] = slots[i].copy(design, i);\n }\n design.translations = (Tran... |
"public void onPlyerUsesBlock(PlayerInteractEvent event) {\n if (event == null)\n return;\n Block block = event.world.getBlock(event.x, event.y, event.z);\n if (block instanceof IEurekaBlock) {\n IEurekaBlock eurekaBlock = (IEurekaBlock) block;\n World world = event.world;\n if (!wo... |
"public String resetCSRFToken() {\n csrfToken = ESAPI.randomizer().getRandomString(8, EncoderConstants.CHAR_ALPHANUMERICS);\n return csrfToken;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.