idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
389,881 | protected Solver.SolutionInfo solve(DataSet x) {<NEW_LINE>final int l = x.size(), l2 = l << 1;<NEW_LINE>double[] alpha2 = new double[l2], linear_term = new double[l2];<NEW_LINE>for (int i = 0; i < l; i++) {<NEW_LINE>final double v = x.value(i);<NEW_LINE>linear_term[i] = p - v;<NEW_LINE>linear_term[i + l] = p + v;<NEW_L... | y, 0, l, ONE); |
347,053 | private void createNetModeTransaction() throws InvalidArgumentException {<NEW_LINE>if (chaincodeType == null) {<NEW_LINE>throw new InvalidArgumentException("Chaincode type is required");<NEW_LINE>}<NEW_LINE>List<String> modlist = new LinkedList<>();<NEW_LINE>modlist.add("init");<NEW_LINE>modlist.addAll(argList);<NEW_LI... | Chaincode.ChaincodeSpec.Type.JAVA); |
921,738 | public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required pa... | = new String[] { "petstore_auth" }; |
750,797 | public static void main(String[] args) throws Exception {<NEW_LINE>try {<NEW_LINE>if (args.length < 1) {<NEW_LINE><MASK><NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>String zkHost = DEFAULT_ZK_HOST;<NEW_LINE>int zkPort = DEFAULT_ZK_PORT;<NEW_LINE>if (args.length == 1) {<NEW_LINE>zkPort = Integer.parseInt(args[0]);<NEW... | System.out.println("Usage: LocalDLEmulator [<zk_host>] <zk_port>"); |
169,384 | final DeleteDocumentResult executeDeleteDocument(DeleteDocumentRequest deleteDocumentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDocumentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,057,252 | public final void destroy() {<NEW_LINE>if (cancelledFlag.getAndSet(true)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int timeToWait = destroyImpl();<NEW_LINE>if (waitTask == null) {<NEW_LINE>// this could be in a case if exception occured during the process<NEW_LINE>// creation ...<NEW_LINE>return;<NEW_LINE>}<NEW_LIN... | .currentThread().interrupt(); |
622,837 | public OptionalLong allocatedSizeInBytes(Path path) {<NEW_LINE>assert Files.isRegularFile(path) : path;<NEW_LINE>final WString fileName = new WString("\\\\?\\" + path);<NEW_LINE><MASK><NEW_LINE>final int lpFileSizeLow = GetCompressedFileSizeW(fileName, lpFileSizeHigh);<NEW_LINE>if (lpFileSizeLow == INVALID_FILE_SIZE) {... | final IntByReference lpFileSizeHigh = new IntByReference(); |
134,228 | protected void sort(final int modelColumnIndex) {<NEW_LINE>int rows = getRowCount();<NEW_LINE>if (rows == 0)<NEW_LINE>return;<NEW_LINE>sorting = true;<NEW_LINE>// other column<NEW_LINE>if (modelColumnIndex != p_lastSortIndex)<NEW_LINE>p_asc = true;<NEW_LINE>else<NEW_LINE>p_asc = !p_asc;<NEW_LINE>p_lastSortIndex = model... | model = (DefaultTableModel) getModel(); |
661,330 | public void testCanReadEntityAndConsumeInvocationCallbackWithoutBuffering_String(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>ClientBuilder cb = ClientBuilder.newBuilder();<NEW_LINE>Client c = cb.build();... | async().get(callback); |
1,120,845 | public Request<RebootInstancesRequest> marshall(RebootInstancesRequest rebootInstancesRequest) {<NEW_LINE>if (rebootInstancesRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<RebootInstancesRequest> request = new DefaultRequest<RebootInstan... | , StringUtils.fromString(rebootInstancesRequestInstanceIdsListValue)); |
568,880 | public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {<NEW_LINE>// Translate overlay and image<NEW_LINE>float flexibleRange = mFlexibleSpaceImageHeight - mActionBarSize;<NEW_LINE>int minOverlayTransitionY = mActionBarSize - mOverlayView.getHeight();<NEW_LINE>ViewHelper.setTranslationY(mOverla... | lp.topMargin = (int) fabTranslationY; |
877,432 | public void test1XSLEJBObjectGetHandleSerialize() throws Exception {<NEW_LINE>Handle handle1 = fejb1.getHandle();<NEW_LINE>assertNotNull("getHandle test was null", handle1);<NEW_LINE>ByteArrayOutputStream baos = new ByteArrayOutputStream();<NEW_LINE>ObjectOutputStream oos = new ObjectOutputStream(baos);<NEW_LINE>oos.wr... | ObjectInputStream ois = new ObjectInputStream(bais); |
1,543,882 | public ModelAndView dicitemsave(HttpServletRequest request, @Valid SysDic dic, @Valid String p) {<NEW_LINE>List<SysDic> sysDicList = sysDicRes.findByDicidAndName(dic.getDicid(<MASK><NEW_LINE>String msg = null;<NEW_LINE>String orgi = super.getOrgi(request);<NEW_LINE>if (sysDicList.size() == 0) {<NEW_LINE>dic.setHaschild... | ), dic.getName()); |
916,093 | protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) {<NEW_LINE>GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);<NEW_LINE>bindGuiTexture();<NEW_LINE>int sx = (width - xSize) / 2;<NEW_LINE>int sy = (height - ySize) / 2;<NEW_LINE>drawTexturedModalRect(sx, sy, 0, 0, this.xSize, this.ySize... | String name = e.getName(); |
890,966 | public Request<ListThingRegistrationTasksRequest> marshall(ListThingRegistrationTasksRequest listThingRegistrationTasksRequest) {<NEW_LINE>if (listThingRegistrationTasksRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListThingRegistrationTasksRequest)");<NEW_LINE>}<NEW_L... | (listThingRegistrationTasksRequest.getStatus())); |
1,778,473 | public void enqueue(Lifespan lifespan, int partitionNumber, List<SerializedPage> pages) {<NEW_LINE>requireNonNull(lifespan, "lifespan is null");<NEW_LINE>requireNonNull(pages, "pages is null");<NEW_LINE>checkState(<MASK><NEW_LINE>// ignore pages after "no more pages" is set<NEW_LINE>// this can happen with a limit quer... | pageTracker.isLifespanCompletionCallbackRegistered(), "lifespanCompletionCallback must be set before enqueueing data"); |
337,419 | private TypeDefPatch updateSupportedDiscoveryRelationship() {<NEW_LINE>final String typeName = "SupportedDiscoveryService";<NEW_LINE>TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName);<NEW_LINE>typeDefPatch.setUpdatedBy(originatorName);<NEW_LINE>typeDefPatch.setUpdateTime(creationDate);<NEW_LINE>List<... | getMapStringStringTypeDefAttribute(attribute3Name, attribute3Description, attribute3DescriptionGUID); |
1,791,619 | protected void doModification(ResultIterator resultIterator) throws Exception {<NEW_LINE>WorkingCopy copy = WorkingCopy.get(resultIterator.getParserResult());<NEW_LINE>copy.toPhase(Phase.RESOLVED);<NEW_LINE>TreeMaker tm = copy.getTreeMaker();<NEW_LINE>GeneratorUtilities gu = GeneratorUtilities.get(copy);<NEW_LINE>Compi... | gu.insertClassMembers(ct, members); |
578,896 | void becomeFollower(String method, DiscoveryNode leaderNode) {<NEW_LINE>assert Thread.holdsLock(mutex) : "Coordinator mutex not held";<NEW_LINE>assert leaderNode.isMasterNode() : leaderNode + " became a leader but is not master-eligible";<NEW_LINE>assert mode != Mode.LEADER : "do not switch to follower from leader (sho... | .equals(lastKnownLeader)) == false; |
1,030,165 | private void rotateLeft(GBSNode bfather, GBSNode bpoint) {<NEW_LINE>GBSNode bson = bpoint.leftChild();<NEW_LINE>if (bson.balance() == -1) /* Single LL rotation */<NEW_LINE>{<NEW_LINE>bpoint.setLeftChild(bson.rightChild());<NEW_LINE>bson.setRightChild(bpoint);<NEW_LINE>if (bfather.rightChild() == bpoi... | .balance() + 1]); |
1,676,840 | private Tuple<Manifest, Metadata> loadFullStateBWC() throws IOException {<NEW_LINE>Map<Index, Long> indices = new HashMap<>();<NEW_LINE>Metadata.Builder metadataBuilder;<NEW_LINE>Tuple<Metadata, Long> metadataAndGeneration = Metadata.FORMAT.loadLatestStateWithGeneration(logger, namedXContentRegistry, nodeEnv.nodeDataPa... | metadataBuilder.put(indexMetadata, false); |
784,285 | public static UriPattern parse(String uri) {<NEW_LINE>if (uri.endsWith("?")) {<NEW_LINE>throw new InvalidUriPatternException("URI patterns must not end with '?'. Found " + uri);<NEW_LINE>} else if (!uri.startsWith("/")) {<NEW_LINE>throw new InvalidUriPatternException("URI pattern must start with '/'. Found " + uri);<NE... | kvp.split("=", 2); |
857,907 | private void replaceNLSWithSpace(MultiTextEdit container, int startPos, int endPos) throws BadLocationException {<NEW_LINE>// remember first NLS token in a string of NLS tokens<NEW_LINE>Token fromToken = null;<NEW_LINE>int p = startPos + 1;<NEW_LINE>while (p < endPos) {<NEW_LINE>Token token = formatter.getTokens().get(... | int ttype = token.getType(); |
1,653,725 | private void processIndexSegmentEntriesBackward(IndexSegment indexSegment, Predicate<IndexEntry> predicate, Map<StoreKey, IndexFinalState> keyFinalStates) throws StoreException {<NEW_LINE>diskIOScheduler.getSlice(BlobStoreStats.IO_SCHEDULER_JOB_TYPE, BlobStoreStats.IO_SCHEDULER_JOB_ID, indexSegment.size());<NEW_LINE>lo... | newScanResults, entry, isValid, keyFinalStates); |
1,316,074 | protected SpringPersistenceUnitInfo parsePersistenceUnitInfo(Element persistenceUnit, String version, @Nullable URL rootUrl) throws IOException {<NEW_LINE>SpringPersistenceUnitInfo unitInfo = new SpringPersistenceUnitInfo();<NEW_LINE>// set JPA version (1.0 or 2.0)<NEW_LINE>unitInfo.setPersistenceXMLSchemaVersion(versi... | (jtaDataSource.trim())); |
703,675 | private static boolean isMigratable(Entity entity) {<NEW_LINE>// Checks specific to production data. See b/185954992 for details.<NEW_LINE>// The names of these bad entities in production do not conflict with other environments. For<NEW_LINE>// simplicities sake we apply them regardless of the source of the data.<NEW_L... | return !IGNORED_DOMAINS.contains(domainRoid); |
553,838 | V putIfAbsentAsync(K key, V value, long duration, TimeUnit unit) {<NEW_LINE>// Keep in sync with LocalAsyncCache.AsMapView#putIfAbsent(key, value)<NEW_LINE>var expiry = (Expiry<K, V>) new AsyncExpiry<>(new FixedExpiry<>(duration, unit));<NEW_LINE>V asyncValue = (<MASK><NEW_LINE>for (; ; ) {<NEW_LINE>var priorFuture = (... | V) CompletableFuture.completedFuture(value); |
1,507,998 | public List<I_M_InOutLine> retrieveInOutLines(final I_C_InvoiceLine il) {<NEW_LINE>//<NEW_LINE>// Try C_InvoiceLine->C_Invoice_Line_Alloc->C_Invoice_Candidate->C_InvoiceCandidate_InOutLine->M_InOutLine<NEW_LINE>final List<I_M_InOutLine> inoutLines = //<NEW_LINE>queryBL.createQueryBuilder(I_C_Invoice_Line_Alloc.class, i... | inoutLines.add(0, inoutLine); |
699,742 | private void createPopup() {<NEW_LINE>pop = new JPopupMenu();<NEW_LINE>pop.setBackground(ColorResource.getDarkerBgColor());<NEW_LINE>JMenu dl = new JMenu(StringResource.get("ND_DOWNLOAD_LATER"));<NEW_LINE>dl.setForeground(Color.WHITE);<NEW_LINE>dl.setBorder(new EmptyBorder(getScaledInt(5), getScaledInt(5), getScaledInt... | setBackground(ColorResource.getDarkerBgColor()); |
977,409 | public UnderDatabase create(UdbContext udbContext, String type, UdbConfiguration configuration) {<NEW_LINE>Map<String, UnderDatabaseFactory> map = mFactories;<NEW_LINE>UnderDatabaseFactory factory = map.get(type);<NEW_LINE>if (factory == null) {<NEW_LINE>throw new IllegalArgumentException(String.format("UdbFactory for ... | factory.create(udbContext, configuration); |
211,819 | public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, serverObjects post, final serverSwitch env) {<NEW_LINE>final Switchboard sb = (Switchboard) env;<NEW_LINE>final serverObjects prop = new serverObjects();<NEW_LINE>prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 :... | long t = System.currentTimeMillis(); |
698,866 | private double scoreHelper(DataSet data, boolean training) {<NEW_LINE>boolean hasMaskArray = data.hasMaskArrays();<NEW_LINE>if (hasMaskArray)<NEW_LINE>setLayerMaskArrays(data.getFeaturesMaskArray(), data.getLabelsMaskArray());<NEW_LINE>if (!(getOutputLayer() instanceof IOutputLayer)) {<NEW_LINE>throw new IllegalStateEx... | ArrayType.INPUT).build(); |
511,305 | public String decrypt(String encryptedText) {<NEW_LINE>try {<NEW_LINE>byte[] decode = Base64.decode(encryptedText.getBytes(UTF_8), Base64.URL_SAFE);<NEW_LINE>// get back the iv and salt from the cipher text<NEW_LINE>ByteBuffer <MASK><NEW_LINE>byte[] iv = new byte[ivLengthByte];<NEW_LINE>bb.get(iv);<NEW_LINE>byte[] salt... | bb = ByteBuffer.wrap(decode); |
1,659,995 | private void handleConfigUpdateRequest(HttpServletRequest req, HttpServletResponse resp) throws IOException {<NEW_LINE>SerializedConfig sconfig;<NEW_LINE>try {<NEW_LINE>String reqbody = req.getReader().lines().collect(Collectors.joining<MASK><NEW_LINE>sconfig = mapper.readValue(reqbody, SerializedConfig.class);<NEW_LIN... | (System.lineSeparator())); |
412,461 | /*@Override<NEW_LINE>public String getMenuName() {//KS TODO not implemented<NEW_LINE>return getString(R.string.snooze_alert);<NEW_LINE>}*/<NEW_LINE>public void addListenerOnButton() {<NEW_LINE>buttonSnooze = (Button) findViewById(R.id.button_snooze);<NEW_LINE>// low alerts<NEW_LINE>disableLowAlerts = (Button) findViewB... | findViewById(R.id.enable_alerts); |
1,147,930 | private void renameOutgoingPhis(int successor, boolean allVersions) {<NEW_LINE>int[] phiIndexes = phiIndexMap[successor];<NEW_LINE>List<Phi> phis = synthesizedPhisByBlock.get(successor);<NEW_LINE>for (int j = 0; j < phis.size(); ++j) {<NEW_LINE>Phi phi = phis.get(j);<NEW_LINE>Variable originalVar = program.variableAt(p... | getIncomings().add(incoming); |
93,004 | public static DescribeSecurityGroupAttributeResponse unmarshall(DescribeSecurityGroupAttributeResponse describeSecurityGroupAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSecurityGroupAttributeResponse.setRequestId(_ctx.stringValue("DescribeSecurityGroupAttributeResponse.RequestId"));<NEW_LINE>describe... | ("DescribeSecurityGroupAttributeResponse.Permissions[" + i + "].CreateTime")); |
1,732,576 | public Set<LDAPCapabilityRepresentation> queryServerCapabilities() {<NEW_LINE>Set<LDAPCapabilityRepresentation> result = new LinkedHashSet<>();<NEW_LINE>try {<NEW_LINE>List<String> attrs = new ArrayList<>();<NEW_LINE>attrs.add("supportedControl");<NEW_LINE>attrs.add("supportedExtension");<NEW_LINE>attrs.add("supportedF... | Object o = values.nextElement(); |
741,808 | private void loadCollectionDescriptors() {<NEW_LINE>// Load collection classes marked with @Collection annotation<NEW_LINE>List<CollectionDetails> collections = getCollections();<NEW_LINE>for (CollectionDetails collection : collections) {<NEW_LINE>CollectionInfo collectionInfo = collection.cd.getCollection();<NEW_LINE>... | parentCollection = collectionMap.get(parent); |
1,129,336 | public com.amazonaws.services.ivs.model.StreamUnavailableException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.ivs.model.StreamUnavailableException streamUnavailableException = new com.amazonaws.services.ivs.model.StreamUnavailableException(null);<NEW_LINE><... | int originalDepth = context.getCurrentDepth(); |
1,619,091 | public void inASTStatementSequenceNode(ASTStatementSequenceNode node) {<NEW_LINE>for (AugmentedStmt as : node.getStatements()) {<NEW_LINE>Stmt s = as.get_Stmt();<NEW_LINE>if (!(s instanceof DefinitionStmt)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>DefinitionStmt ds = (DefinitionStmt) s;<NEW_LINE>ValueBox rightBox = ds.... | Value Op = OpBox.getValue(); |
1,708,505 | private static <T> T deserializeObject(final Class<T> expectedType, final String json, final ClassFieldCache classFieldCache) throws IllegalArgumentException {<NEW_LINE>// Parse the JSON<NEW_LINE>Object parsedJSON;<NEW_LINE>try {<NEW_LINE>parsedJSON = JSONParser.parseJSON(json);<NEW_LINE>} catch (final ParseException e... | constructor = classFieldCache.getDefaultConstructorForConcreteTypeOf(expectedType); |
168,525 | private String discoverTagName(RSyntaxDocument doc, int dot) {<NEW_LINE>Stack<String> stack = new Stack<>();<NEW_LINE>Element root = doc.getDefaultRootElement();<NEW_LINE>int curLine = root.getElementIndex(dot);<NEW_LINE>for (int i = 0; i <= curLine; i++) {<NEW_LINE>Token t = doc.getTokenListForLine(i);<NEW_LINE>while ... | push(t.getLexeme()); |
1,439,472 | public Action<Chain> uploadFile() {<NEW_LINE>return chain -> chain.post("upload", ctx -> {<NEW_LINE>TransformablePublisher<? extends ByteBuf> pub = ctx.getRequest().getBodyStream();<NEW_LINE>pub.subscribe(new Subscriber<ByteBuf>() {<NEW_LINE><NEW_LINE>private Subscription sub;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>publ... | log.info("Got {} bytes", len); |
936,859 | protected // }<NEW_LINE>CrawlURI makeCrawlUri(JSONObject jo) throws URIException, JSONException {<NEW_LINE>JSONObject joHeaders = jo.getJSONObject("headers");<NEW_LINE>UURI uuri = UURIFactory.getInstance(jo.getString("url"));<NEW_LINE>UURI via = UURIFactory.getInstance(jo.getString("parentUrl"));<NEW_LINE>JSONObject pa... | curi.setSchedulingDirective(SchedulingConstants.HIGH); |
349,973 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create variable boolean queryvar_bool", path);<NEW_LINE>env.compileDeploy("@public create variable int lower", path);<NEW_LINE><MASK><NEW_LINE>env.compileDeploy("on SupportBean set query... | env.compileDeploy("@public create variable int upper", path); |
776,203 | public Object execute(JSDynamicObject promise, Object reason) {<NEW_LINE>assert JSPromise.isPending(promise);<NEW_LINE>if (!JSConfig.EagerStackTrace && context.isOptionAsyncStackTraces() && JSError.isJSError(reason)) {<NEW_LINE>// Materialize lazy stack trace before clearing promise reactions.<NEW_LINE>materializeLazyS... | setPromiseResult.setValue(promise, reason); |
99,114 | private void createSharedFieldSetter(Field field) {<NEW_LINE>String setterName = "set" + MetaClassHelper.capitalize(field.getName());<NEW_LINE>Parameter[] params = new Parameter[] { new Parameter(field.getAst()<MASK><NEW_LINE>MethodNode setter = spec.getAst().getMethod(setterName, params);<NEW_LINE>if (setter != null) ... | .getType(), "$spock_value") }; |
511,374 | public EnableEnhancedMonitoringResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EnableEnhancedMonitoringResult enableEnhancedMonitoringResult = new EnableEnhancedMonitoringResult();<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.h... | String name = reader.nextName(); |
1,419,364 | public void endTessellation() {<NEW_LINE>if (root.tessUpdate) {<NEW_LINE>if (root.tessKind == TRIANGLES && hasPolys) {<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyVertex.glId);<NEW_LINE>tessGeo.finalPolyVerticesBuffer(firstModifiedPolyVertex, lastModifiedPolyVertex);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPo... | tessGeo.finalPointOffsetsBuffer(firstModifiedPointAttribute, lastModifiedPointAttribute); |
1,812,196 | public static ListHotlineTransferNumberResponse unmarshall(ListHotlineTransferNumberResponse listHotlineTransferNumberResponse, UnmarshallerContext _ctx) {<NEW_LINE>listHotlineTransferNumberResponse.setRequestId(_ctx.stringValue("ListHotlineTransferNumberResponse.RequestId"));<NEW_LINE>listHotlineTransferNumberResponse... | ("ListHotlineTransferNumberResponse.Data.Values[" + i + "].ResUniqueCode")); |
443,179 | public Contentlet translateContent(Contentlet src, Language translateTo, List<Field> fieldsToTranslate, User user) throws TranslationException {<NEW_LINE>Preconditions.checkNotNull(src, "Unable to translate null content.");<NEW_LINE>Preconditions.checkNotNull(fieldsToTranslate, "List of fields to translate can't be nul... | fieldsToTranslate.isEmpty(), "List of fields to translate can't be empty"); |
1,245,334 | protected PDFormXObject importPageAsXForm(RenderingContext ctx, Element e, PdfBoxOutputDevice pdfBoxOutputDevice, LayerUtility layerUtility) throws IOException {<NEW_LINE>Map<String, PDFormXObject> map = getFormCacheMap(pdfBoxOutputDevice);<NEW_LINE>int pdfpage = getPageNumber(e);<NEW_LINE>String pdfsrc = e.getAttribut... | .getPDDocument().close(); |
758,846 | public CreateLicenseResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateLicenseResult createLicenseResult = new CreateLicenseResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context... | String currentParentElement = context.getCurrentParentElement(); |
1,034,513 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "sumvalue" };<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@name('create') @public create window MyWindowFCLS#keepall as select theString as key, intPrimitive as value from SupportBean;\n" + "insert int... | env.compileDeploy(epl, path); |
1,054,355 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
680,197 | public ProcessStatus handleRestValidateCode(final PwmRequest pwmRequest) throws PwmUnrecoverableException, IOException, ServletException, ChaiUnavailableException {<NEW_LINE>final PwmDomain pwmDomain = pwmRequest.getPwmDomain();<NEW_LINE>final PwmSession pwmSession = pwmRequest.getPwmSession();<NEW_LINE>final OTPUserRe... | ERROR_INTERNAL, errorMsg), pwmRequest)); |
1,849,830 | public static void main(String[] args) throws InterruptedException {<NEW_LINE>String curProtocol = System.getProperty("dubbo.current.protocol", CommonConstants.DUBBO);<NEW_LINE>String zookeeperAddress = System.getProperty("zookeeper.address", "127.0.0.1");<NEW_LINE>new EmbeddedZooKeeper(2181, false).start();<NEW_LINE>S... | .setRef(new GreeterServiceImpl()); |
1,002,437 | // Dump the content of this bean returning it as a String<NEW_LINE>public void dump(StringBuffer str, String indent) {<NEW_LINE>String s;<NEW_LINE>Object o;<NEW_LINE>org.netbeans.modules.schema2beans.BaseBean n;<NEW_LINE>str.append(indent);<NEW_LINE>// NOI18N<NEW_LINE>str.append("Name");<NEW_LINE>// NOI18N<NEW_LINE>str... | NAME, 0, str, indent); |
1,376,334 | private OnHeapHnswGraph writeGraph(RandomAccessVectorValuesProducer vectorValues, VectorSimilarityFunction similarityFunction) throws IOException {<NEW_LINE>// build graph<NEW_LINE>HnswGraphBuilder hnswGraphBuilder = new HnswGraphBuilder(vectorValues, similarityFunction, maxConn, beamWidth, HnswGraphBuilder.randSeed);<... | int countOnLevel0 = graph.size(); |
307,600 | protected void paintComponent(Graphics g) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>Stroke currentStroke = g2.getStroke();<NEW_LINE>g2.setStroke(new BasicStroke(BORDER_THICKNESS));<NEW_LINE>g2.setColor(BORDER_COLOR);<NEW_LINE>int borderWidth = getWidth() - 2 * BORDER_MARGIN;<... | = getHeight() - 2 * BORDER_MARGIN; |
1,071,447 | /* (non-Javadoc)<NEW_LINE>* @see com.kkalice.adempiere.migrate.DBObjectInterface#loadHeaders(java.util.HashMap, com.kkalice.adempiere.migrate.MigrateLogger, com.kkalice.adempiere.migrate.MigrateDBEngine, com.kkalice.adempiere.migrate.DBConnection, java.lang.String, java.util.HashMap)<NEW_LINE>*/<NEW_LINE>public void lo... | parent.getResultSetString(rs, "TABLE_NAME"); |
167,566 | public void process(boolean validate, boolean documentsOnly) {<NEW_LINE>for (SDField field : schema.allConcreteFields()) {<NEW_LINE>if (field.getMatching().getType() != MatchType.TEXT)<NEW_LINE>continue;<NEW_LINE>ScriptExpression script = field.getIndexingScript();<NEW_LINE>if (script == null)<NEW_LINE>continue;<NEW_LI... | dynamicSummary = new TreeSet<>(); |
924,450 | final CancelSpotInstanceRequestsResult executeCancelSpotInstanceRequests(CancelSpotInstanceRequestsRequest cancelSpotInstanceRequestsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cancelSpotInstanceRequestsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2"); |
1,669,162 | private void sendReport(HttpServletRequest req, HttpServletResponse resp, Hashtable<String, Integer> errorList) throws ServletException, IOException {<NEW_LINE><MASK><NEW_LINE>String absoluteUri = req.getRequestURI();<NEW_LINE>String relativePath = getRelativePath(req);<NEW_LINE>XMLWriter generatedXML = new XMLWriter()... | resp.setStatus(WebdavStatus.SC_MULTI_STATUS); |
1,825,033 | public void migrateSyncIfNeeded(final Set<UUID> connectionIds) {<NEW_LINE>final StopWatch globalMigrationWatch = new StopWatch();<NEW_LINE>globalMigrationWatch.start();<NEW_LINE>refreshRunningWorkflow();<NEW_LINE>connectionIds.forEach((connectionId) -> {<NEW_LINE>final StopWatch singleSyncMigrationWatch = new StopWatch... | "The migration to the new scheduler took: " + globalMigrationWatch.formatTime()); |
1,844,743 | public synchronized TlsSecret deriveUsingPRF(int prfAlgorithm, String label, byte[] seed, int length) {<NEW_LINE>checkAlive();<NEW_LINE>try {<NEW_LINE>switch(prfAlgorithm) {<NEW_LINE>case PRFAlgorithm.tls13_hkdf_sha256:<NEW_LINE>return TlsCryptoUtils.hkdfExpandLabel(this, CryptoHashAlgorithm.sha256, label, seed, length... | , label, seed, length)); |
554,676 | public static Wallet adaptWallet(GateioFunds bterAccountInfo) {<NEW_LINE>List<Balance> balances = new ArrayList<>();<NEW_LINE>for (Entry<String, BigDecimal> funds : bterAccountInfo.getAvailableFunds().entrySet()) {<NEW_LINE>Currency currency = Currency.getInstance(funds.getKey().toUpperCase());<NEW_LINE>BigDecimal amou... | , BigDecimal.ZERO, amount)); |
833,183 | public void mouseDragged(MouseEvent me) {<NEW_LINE>super.mouseDragged(me);<NEW_LINE>if (disableElementMovement()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (IS_DRAGGING) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (IS_DRAGGING_DIAGRAM) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Relation r = (Relation) me.getComponent();<NEW_... | x + p.x) % gridSize; |
850,901 | protected List<Tuple2<Long, float[]>> train(List<Tuple2<Long, float[]>> relatedFeatures, Map<Long, Integer> mapFeatureId2Local, List<int[]> trainData) throws Exception {<NEW_LINE>if (null != this.contextParams) {<NEW_LINE>long startTimeConsumption = System.nanoTime();<NEW_LINE>LOG.info("taskId: {}, localId: {}", getPat... | seed = seeds[getPatitionId()]; |
1,380,794 | private void createDependencyDeclarationTab(@NotNull TabFolder folder) {<NEW_LINE>Composite container = new Composite(folder, SWT.NONE);<NEW_LINE>container.setLayout(new GridLayout(1, true));<NEW_LINE>container.setLayoutData(new GridData(GridData.FILL_BOTH));<NEW_LINE>GridData gd = new GridData(GridData.FILL_BOTH);<NEW... | (false, UIConnectionMessages.dialog_edit_driven_edit_maven_field_text_message)); |
167,938 | public synchronized static void init(Context c) {<NEW_LINE>if (c == null) {<NEW_LINE>LOG.d("AppProfile init null");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AppSP.get().init(c);<NEW_LINE>if (!Android6.canWrite(c)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (profile.equals(getCurrent(c))) {<NEW_LINE>LOG.d("AppProfile skip", ... | = new File(SYNC_FOLDER_DEVICE_PROFILE, APP_STATE_JSON); |
1,602,958 | public MethodDefinition.ImplementationDefinition<S> define(MethodDescription methodDescription) {<NEW_LINE>MethodDefinition.ParameterDefinition.Initial<S> initialParameterDefinition = methodDescription.isConstructor() ? defineConstructor(methodDescription.getModifiers()) : defineMethod(methodDescription.getInternalName... | ), typeVariable.getUpperBounds()); |
309,445 | public void performFix(@Nonnull DataContext dataContext) {<NEW_LINE>ProjectStructureSettingsUtil util = (ProjectStructureSettingsUtil) ShowSettingsUtil.getInstance();<NEW_LINE>LibrariesConfigurator librariesConfigurator = util.getLibrariesModel(myProject);<NEW_LINE>final LibraryTable.ModifiableModel libraryTable = libr... | ) libraryTable).getLibraryEditor(myLibrary); |
1,330,263 | public boolean updateState(State currentState, Event event, State nextState, DataCenterResourceEntity podEntity, Object data) {<NEW_LINE>EngineHostPodVO vo = findById(podEntity.getId());<NEW_LINE><MASK><NEW_LINE>SearchCriteria<EngineHostPodVO> sc = StateChangeSearch.create();<NEW_LINE>sc.setParameters("id", vo.getId())... | Date oldUpdatedTime = vo.getLastUpdated(); |
708,899 | public void render(ChestBlockEntity chest, float partialTicks, PoseStack poseStack, MultiBufferSource buffers, int combinedLight, int combinedOverlay) {<NEW_LINE>Level level = chest.getLevel();<NEW_LINE>if (level == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>var <MASK><NEW_LINE>if (cellItem == null) {<NEW_LINE>// No ... | cellItem = chest.getCellItem(0); |
1,615,249 | static double[][] of(double[] data, double[] breaks) {<NEW_LINE>int k = breaks.length - 1;<NEW_LINE>if (k <= 1) {<NEW_LINE>throw new IllegalArgumentException("Invalid number of bins: " + k);<NEW_LINE>}<NEW_LINE>double[][] freq = new double[3][k];<NEW_LINE>for (int i = 0; i < k; i++) {<NEW_LINE>freq[0][i] = breaks[i];<N... | Arrays.binarySearch(breaks, d); |
440,259 | public Deferred<ArrayList<ArrayList<KeyValue>>> nextRows() {<NEW_LINE>if (region == DONE) {<NEW_LINE>// We're already done scanning.<NEW_LINE>return Deferred.fromResult(null);<NEW_LINE>} else if (region == null) {<NEW_LINE>// We need to open the scanner first.<NEW_LINE>if (this.isReversed() && !this.isFirstReverseRegio... | (this).addCallbackDeferring(opened_scanner); |
783,564 | private void updateAcceptedTypeOrigins() {<NEW_LINE>Map<PoiCategory, LinkedHashSet<String>> <MASK><NEW_LINE>for (Entry<PoiCategory, LinkedHashSet<String>> e : acceptedTypes.entrySet()) {<NEW_LINE>if (e.getValue() != null) {<NEW_LINE>for (String s : e.getValue()) {<NEW_LINE>PoiType subtype = poiTypes.getPoiTypeByKey(s);... | acceptedTypesOrigin = new LinkedHashMap<>(); |
267,528 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) {<NEW_LINE>setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME));<NEW_LINE>} else {<NEW_LINE>additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageN... | ("rebar.config.mustache", "", "rebar.config")); |
60,054 | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {<NEW_LINE>log.debug("login success");<NEW_LINE>Map<String, Object> rsp = new HashMap<>();<NEW_LINE>User principal = (User) authentication.getPrincipal();<NEW... | , JsonHelper.object2Json(baseResponse)); |
1,145,585 | public void handleCommand(Command command) {<NEW_LINE>Thing thing = thingProvider.apply(link.getLinkedUID().getThingUID());<NEW_LINE>if (thing != null) {<NEW_LINE>final ThingHandler handler = thing.getHandler();<NEW_LINE>if (handler != null) {<NEW_LINE>if (ThingHandlerHelper.isHandlerInitialized(thing)) {<NEW_LINE>logg... | ), link.getLinkedUID()); |
407,224 | public Stream<CompilerInput> finalize(Path path, PackageID pkgId) {<NEW_LINE>// Set package version if its empty<NEW_LINE>if (pkgId.version.value.isEmpty() && !pkgId.orgName.equals(Names.BUILTIN_ORG) && !pkgId.orgName.equals(Names.ANON_ORG)) {<NEW_LINE>Manifest <MASK><NEW_LINE>pkgId.version = new Name(manifest.getProje... | manifest = TomlParserUtils.getManifest(root); |
1,339,669 | public static float computeQueryDocumentScoreWithSimilarityAndAnalyzer(IndexReader reader, String docid, String q, Similarity similarity, Analyzer analyzer) throws IOException {<NEW_LINE>// We compute the query-document score by issuing the query with an additional filter clause that restricts<NEW_LINE>// consideration... | filterQuery, BooleanClause.Occur.MUST); |
1,488,704 | public static ListGatewaysGisInfoResponse unmarshall(ListGatewaysGisInfoResponse listGatewaysGisInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>listGatewaysGisInfoResponse.setRequestId(_ctx.stringValue("ListGatewaysGisInfoResponse.RequestId"));<NEW_LINE>listGatewaysGisInfoResponse.setSuccess(_ctx.booleanValue("ListG... | ("ListGatewaysGisInfoResponse.Data[" + i + "].GwEui")); |
350,160 | public void verify(final String host, final X509Certificate cert) throws SSLException {<NEW_LINE>final HostNameType hostType = determineHostFormat(host);<NEW_LINE>final List<SubjectName> subjectAlts = getSubjectAltNames(cert);<NEW_LINE>if (subjectAlts != null && !subjectAlts.isEmpty()) {<NEW_LINE>switch(hostType) {<NEW... | host, subjectAlts, this.publicSuffixMatcher); |
17,795 | public static ListRootStacksResponse unmarshall(ListRootStacksResponse listRootStacksResponse, UnmarshallerContext _ctx) {<NEW_LINE>listRootStacksResponse.setRequestId(_ctx.stringValue("ListRootStacksResponse.RequestId"));<NEW_LINE>listRootStacksResponse.setMessage(_ctx.stringValue("ListRootStacksResponse.Message"));<N... | + "].Children[" + j + "].Comment")); |
227,350 | private Map<String, String> parseEnvironment(final String[] entries) {<NEW_LINE>final Map<String, String> map = new HashMap<>();<NEW_LINE>if (entries.length > 1) {<NEW_LINE>// Skip the last entry it contains the cron expression no variables.<NEW_LINE>for (int i = 0; i < entries.length - 1; i++) {<NEW_LINE>final String ... | Boolean.TRUE.toString()); |
1,385,563 | public static void addListenerToSipXml(Document sipXmlDocument, String listenerClassName, String desc) {<NEW_LINE>if (listenerClassName == null)<NEW_LINE>return;<NEW_LINE>Element listenerE = sipXmlDocument.createElement("listener");<NEW_LINE>Element listenerClassNameE = sipXmlDocument.createElement("javaee:listener-cla... | (sipXmlDocument.createTextNode(desc)); |
1,158,490 | public static DescribeManagedInstancesResponse unmarshall(DescribeManagedInstancesResponse describeManagedInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeManagedInstancesResponse.setRequestId(_ctx.stringValue("DescribeManagedInstancesResponse.RequestId"));<NEW_LINE>describeManagedInstancesResponse.setPa... | ("DescribeManagedInstancesResponse.Instances[" + i + "].AgentVersion")); |
264,078 | public static Object callScript(String scriptName) throws ScriptExecutionException {<NEW_LINE>ModelRepository repo = ScriptServiceUtil.getModelRepository();<NEW_LINE>if (repo != null) {<NEW_LINE>String scriptNameWithExt = scriptName;<NEW_LINE>if (!scriptName.endsWith(Script.SCRIPT_FILEEXT)) {<NEW_LINE>scriptNameWithExt... | = scriptName + "." + Script.SCRIPT_FILEEXT; |
485,592 | public static DescribeAppResponse unmarshall(DescribeAppResponse describeAppResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAppResponse.setRequestId(_ctx.stringValue("DescribeAppResponse.requestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>result.setId(_ctx.stringValue("DescribeAppResponse.result.id"));... | (_ctx.integerValue("DescribeAppResponse.result.progressPercent")); |
88,856 | public OResultSet syncPull(OCommandContext ctx, int nRecords) throws OTimeoutException {<NEW_LINE>getPrev().ifPresent(x -> x.syncPull(ctx, nRecords));<NEW_LINE>long begin = profilingEnabled ? System.nanoTime() : 0;<NEW_LINE>try {<NEW_LINE>if (found) {<NEW_LINE>return new OInternalResultSet();<NEW_LINE>}<NEW_LINE>if (th... | schema.getClass(this.parentClass); |
1,372,374 | public void buildPlacementUI(Table table) {<NEW_LINE>table.image().color(Pal.gray).height(4f).<MASK><NEW_LINE>table.row();<NEW_LINE>table.left().margin(0f).defaults().size(48f).left();<NEW_LINE>table.button(Icon.paste, Styles.clearPartiali, () -> {<NEW_LINE>ui.schematics.show();<NEW_LINE>}).tooltip("@schematics");<NEW_... | colspan(4).growX(); |
1,048,519 | public synchronized void drop(DropTargetDropEvent e) {<NEW_LINE>tabbedPane.setBorder(plainBorder);<NEW_LINE>tabbedPane.setBackground(plainBackground);<NEW_LINE>try {<NEW_LINE>e.acceptDrop(DnDConstants.ACTION_COPY);<NEW_LINE>addCertificates(e.getTransferable().getTransferData(DataFlavor.javaFileListFlavor), getSelectedL... | .getDropTargetContext().getComponent(); |
1,465,141 | public static void markFieldsAsImmutable(BLangClassDefinition classDef, SymbolEnv pkgEnv, BObjectType objectType, Types types, BLangAnonymousModelHelper anonymousModelHelper, SymbolTable symbolTable, Names names, Location pos) {<NEW_LINE>SymbolEnv typeDefEnv = SymbolEnv.createClassEnv(classDef, objectType.tsymbol.scope... | BField typeField = objectTypeFieldIterator.next(); |
1,691,530 | final DescribeStackSetResult executeDescribeStackSet(DescribeStackSetRequest describeStackSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeStackSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<D... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
511,818 | private static void tryAssertionSix(RegressionEnvironment env, String expression) {<NEW_LINE>env.compileDeploy(expression).addListener("s0");<NEW_LINE>String[] fields = "valh0,valh1,valh2".split(",");<NEW_LINE>sendBeanInt(env, "S00", 1, 1, 1);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, new Object[][] ... | { "H02", "H12", "H02-H21" } }; |
1,177,181 | public DownloadTokenGenerateResponse generateDownloadUrlForZipArchive(ZipDownloadRequest body, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the requi... | localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
820,765 | private boolean findUsageInFile(@Nonnull FileEditor editor, @Nonnull FileSearchScope direction) {<NEW_LINE>ApplicationManager<MASK><NEW_LINE>if (myLastSearchInFileData == null)<NEW_LINE>return false;<NEW_LINE>PsiElement[] primaryElements = myLastSearchInFileData.getPrimaryElements();<NEW_LINE>PsiElement[] secondaryElem... | .getApplication().assertIsDispatchThread(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.