idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
564,288 | public void writeToParcel(Parcel dest, int flags) {<NEW_LINE>dest.writeInt(this.id);<NEW_LINE>dest.writeString(this.name);<NEW_LINE>dest.writeString(this.fullName);<NEW_LINE>dest.writeByte(this.repPrivate ? (byte) 1 : (byte) 0);<NEW_LINE>dest.writeString(this.htmlUrl);<NEW_LINE>dest.writeString(this.description);<NEW_L... | dest.writeString(this.cloneUrl); |
1,720,431 | private void addCrusherBlackstoneRecipes(Consumer<FinishedRecipe> consumer, String basePath) {<NEW_LINE>// Polished Blackstone -> Blackstone<NEW_LINE>ItemStackToItemStackRecipeBuilder.crushing(IngredientCreatorAccess.item().from(Blocks.POLISHED_BLACKSTONE), new ItemStack(Blocks.BLACKSTONE)).build(consumer, Mekanism.rl(... | .rl(basePath + "polished_stairs_to_stairs")); |
956,268 | private void printJobPlacements(FlowNetwork flowNetwork, int maxFlowValue, SeparateChainingHashST<Integer, String> idToNameMap, int numberOfStudents) {<NEW_LINE>StdOut.println("*** Job placements ***");<NEW_LINE>int source = flowNetwork.vertices() - 2;<NEW_LINE>int target = source + 1;<NEW_LINE>for (int vertex = 0; ver... | println("\nNumber of jobs filled: " + maxFlowValue + " Expected: 6"); |
30,386 | private void enlargeArraysIfNeeded(int size, boolean preserveData) {<NEW_LINE>int allocSize = (size + (2 * ALLOCATE_UNIT - 1)<MASK><NEW_LINE>long[] curInfo = mCachedGroupPosInfo;<NEW_LINE>int[] curId = mCachedGroupId;<NEW_LINE>long[] newInfo = curInfo;<NEW_LINE>int[] newId = curId;<NEW_LINE>if (curInfo == null || curIn... | ) & ~(ALLOCATE_UNIT - 1); |
753,706 | private void printSummary() {<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("****** SUMMARY ******");<NEW_LINE><MASK><NEW_LINE>for (String server : _servers) {<NEW_LINE>System.out.printf("%s : %d\n", server, _testRingState.getTotalRequestsNum().get(server));<NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LI... | System.out.println("Request distribution on the testing hash ring: "); |
1,345,701 | // GEN-LAST:event_methodDetailsButtonActionPerformed<NEW_LINE>private void propertyDetailsButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_propertyDetailsButtonActionPerformed<NEW_LINE>PropertyPicker propertyPicker = new PropertyPicker(formModel, null, valueType);<NEW_LINE>propertyPic... | { valueType.getSimpleName() }); |
1,134,532 | private static double[] readValues(TokenBuffer buffer, int size, TensorAddress address, TensorType type) {<NEW_LINE>int index = 0;<NEW_LINE>double[] values = new double[size];<NEW_LINE>if (buffer.currentToken() == JsonToken.VALUE_STRING) {<NEW_LINE>values = decodeHexString(buffer.currentText(), type.valueType());<NEW_L... | index++] = readDouble(buffer); |
937,148 | protected RequestMeta createRequestMeta(String httpMethod, URI uri) {<NEW_LINE><MASK><NEW_LINE>MicroserviceReferenceConfig microserviceReferenceConfig = SCBEngine.getInstance().createMicroserviceReferenceConfig(microserviceName);<NEW_LINE>MicroserviceMeta microserviceMeta = microserviceReferenceConfig.getLatestMicroser... | String microserviceName = uri.getAuthority(); |
1,369,384 | public void executeViewEvent(String path, String key, ViewChangeType changeType) throws Exception {<NEW_LINE>String[] childNameInfo = <MASK><NEW_LINE>String schema = childNameInfo[0];<NEW_LINE>String viewName = childNameInfo[1];<NEW_LINE>String serverId = changeType.getInstanceName();<NEW_LINE>String instanceName = Sys... | key.split(Repository.SCHEMA_VIEW_SPLIT); |
1,613,665 | public void run() {<NEW_LINE>final AtomicLong busy = new AtomicLong(0);<NEW_LINE>Timer totalTimer = Time.startTimer();<NEW_LINE>final Timer executionTimer = Time.startTimer();<NEW_LINE>boolean releaseLeaseOnCompletion;<NEW_LINE>if (workerLease == null) {<NEW_LINE>workerLease = workerLeaseService.getWorkerLease();<NEW_L... | workItem.plan, workItem.executor); |
169,037 | private Map<String, List<String>> verticesOutputTo() {<NEW_LINE>// Key: vertex. Values: vertices that this node is an input for<NEW_LINE>Map<String, List<String>> verticesOutputTo = new HashMap<>();<NEW_LINE>for (Map.Entry<String, GraphVertex> entry : vertices.entrySet()) {<NEW_LINE><MASK><NEW_LINE>List<String> vertexI... | String vertexName = entry.getKey(); |
1,644,259 | public Pair<Gradient, INDArray> backpropGradient(INDArray epsilon, LayerWorkspaceMgr workspaceMgr) {<NEW_LINE>assertInputSet(true);<NEW_LINE>if (input.rank() != 3) {<NEW_LINE>throw new UnsupportedOperationException("Input is not rank 3. RnnOutputLayer expects rank 3 input with shape [minibatch, layerInSize, sequenceLen... | "Sequence lengths do not match for RnnOutputLayer input and labels:" + "Arrays should be rank 3 with shape [minibatch, size, sequenceLength] - mismatch on dimension 2 (sequence length) - input=%ndShape vs. label=%ndShape", input, labels); |
304,571 | public Result visitCall(RexCall call) {<NEW_LINE>if (rexResultMap.containsKey(call)) {<NEW_LINE>return rexResultMap.get(call);<NEW_LINE>}<NEW_LINE>SqlOperator operator = call.getOperator();<NEW_LINE>if (operator == PREV) {<NEW_LINE>return implementPrev(call);<NEW_LINE>}<NEW_LINE>if (operator == CASE) {<NEW_LINE>return ... | callOperandResultMap.put(call, operandResults); |
1,177,017 | protected void encodeMarkup(FacesContext context, Timeline timeline) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String clientId = timeline.getClientId(context);<NEW_LINE>writer.startElement("div", timeline);<NEW_LINE>writer.<MASK><NEW_LINE>if (timeline.getStyle() != null... | writeAttribute("id", clientId, "id"); |
1,655,078 | private synchronized void loadImage(AbstractFile file) throws IOException {<NEW_LINE>presenter.getWindowFrame().setCursor(<MASK><NEW_LINE>int read;<NEW_LINE>byte[] buffer = new byte[1024];<NEW_LINE>ByteArrayOutputStream bout = new ByteArrayOutputStream();<NEW_LINE>InputStream in = file.getInputStream();<NEW_LINE>while ... | new Cursor(Cursor.WAIT_CURSOR)); |
643,294 | public void deleteElement(@Nonnull DataContext dataContext) {<NEW_LINE>// noinspection unchecked<NEW_LINE>final List<<MASK><NEW_LINE>if (shelvedChangeLists.isEmpty())<NEW_LINE>return;<NEW_LINE>String message = (shelvedChangeLists.size() == 1) ? VcsBundle.message("shelve.changes.delete.confirm", shelvedChangeLists.get(0... | ShelvedChangeList> shelvedChangeLists = getLists(dataContext); |
203,901 | private <T> void trackRequestCharge(RxDocumentServiceRequest request, T response) {<NEW_LINE>try {<NEW_LINE>// Read lock is enough here.<NEW_LINE>this.throughputReadLock.lock();<NEW_LINE>double requestCharge = 0;<NEW_LINE>boolean failedRequest = false;<NEW_LINE>if (response instanceof StoreResponse) {<NEW_LINE>requestC... | RxDocumentServiceResponse) response).getRequestCharge(); |
1,484,879 | // default invoke<NEW_LINE>public void doFilter(RsfRequest request, RsfResponse response) throws Throwable {<NEW_LINE>if (response.isResponse())<NEW_LINE>return;<NEW_LINE>RsfBindInfo<?<MASK><NEW_LINE>Supplier<?> targetProvider = request.getContext().getServiceProvider(bindInfo);<NEW_LINE>Object target = targetProvider ... | > bindInfo = request.getBindInfo(); |
371,801 | public void run() {<NEW_LINE>Thread.currentThread().setContextClassLoader(TaskThread.class.getClassLoader());<NEW_LINE>executorDriver.sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(Protos.TaskState.TASK_RUNNING).build());<NEW_LINE>Map<String, Object> data = SerializationUtils.d... | getTaskId()).init(); |
1,521,598 | public void execute() throws CFGBuilderException {<NEW_LINE><MASK><NEW_LINE>Method[] methods = jclass.getMethods();<NEW_LINE>if (DEBUG) {<NEW_LINE>System.out.println("Class has " + methods.length + " methods");<NEW_LINE>}<NEW_LINE>// Add call graph nodes for all methods<NEW_LINE>for (Method method : methods) {<NEW_LINE... | JavaClass jclass = classContext.getJavaClass(); |
223,524 | private void initLayers(@NonNull Style loadedMapStyle) {<NEW_LINE>LineLayer routeLayer = new LineLayer(ROUTE_LAYER_ID, ROUTE_SOURCE_ID);<NEW_LINE>// Add the LineLayer to the map. This layer will display the directions route.<NEW_LINE>routeLayer.setProperties(lineCap(Property.LINE_CAP_ROUND), lineJoin(Property.LINE_JOIN... | R.drawable.red_marker))); |
479,368 | final DisassociateBudgetFromResourceResult executeDisassociateBudgetFromResource(DisassociateBudgetFromResourceRequest disassociateBudgetFromResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateBudgetFromResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
16,322 | public static String prettyXmlWithIndentType(String originalXml, int indentType) {<NEW_LINE>try {<NEW_LINE>Source xmlInput = new StreamSource(new StringReader(originalXml));<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>StreamResult xmlOutput = new StreamResult(stringWriter);<NEW_LINE>TransformerFac... | Transformer transformer = transformerFactory.newTransformer(); |
1,804,965 | public void train(TimeSeries.DataSequence data) {<NEW_LINE>this.data = data;<NEW_LINE><MASK><NEW_LINE>DataPoint dp = null;<NEW_LINE>DataSet observedData = new DataSet();<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>dp = new Observation(data.get(i).value);<NEW_LINE>dp.setIndependentValue("x", i);<NEW_LINE>observedDat... | int n = data.size(); |
1,691,806 | private void completeAndNotifyIfNeeded(@Nullable Exception failure) {<NEW_LINE>final State prevState = state.getAndSet(State.COMPLETED);<NEW_LINE>if (prevState == State.COMPLETED) {<NEW_LINE>logger.warn("attempt to complete task [{}] with id [{}] in the [{}] state", getAction(), getPersistentTaskId(), prevState);<NEW_L... | getAction(), getPersistentTaskId()); |
1,099,608 | public Map<String, SecuritySchemeDefinition> generateSecuritySchemeDefinitions() throws GenerateException {<NEW_LINE>Map<String, SecuritySchemeDefinition> map = new HashMap<String, SecuritySchemeDefinition>();<NEW_LINE>Map<String, JsonNode> securityDefinitions = new HashMap<String, JsonNode>();<NEW_LINE>if (json != nul... | JsonNode definition = securityDefinition.getValue(); |
1,479,785 | private void importUsersFromSO(List<Map<String, Object>> objs, List<ParaObject> toImport) throws ParseException {<NEW_LINE>logger.info("Importing {} users...", objs.size());<NEW_LINE>for (Map<String, Object> obj : objs) {<NEW_LINE>User u = new User();<NEW_LINE>u.setId("user_" + (Integer) obj.get("id"));<NEW_LINE>u.setT... | "accountId")).toString()); |
1,522,062 | @Override<NEW_LINE>public View onCreateView3(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.scene_label_list, container, false);<NEW_LINE>mRecyclerView = (EasyRecyclerView) ViewUtils.$$(view, R.id.recycler_view);<NEW_LINE>Tex... | setText(R.string.no_download_label); |
389,952 | public static String findGlobalExecutable(String fileName, String packageName) {<NEW_LINE>String path = globalExecutableCache.get(fileName);<NEW_LINE>if (path == null) {<NEW_LINE>String globalPackagesDir = NPM_DIR.getAbsolutePath();<NEW_LINE>Stream<Path> searchPaths = null;<NEW_LINE>try {<NEW_LINE>searchPaths = Files.w... | ("ProgramFiles") + "/nodejs/node_modules/" + packageName); |
502,316 | private void doPrintEntries(PrintStream out) throws Exception {<NEW_LINE>// Adjust displayed keystore type if needed.<NEW_LINE>String keystoreTypeToPrint = keyStore.getType();<NEW_LINE>if ("JKS".equalsIgnoreCase(keystoreTypeToPrint)) {<NEW_LINE>if (ksfile != null && ksfile.exists()) {<NEW_LINE>String realType = keyStor... | (rb.getString("STARNN")); |
1,409,948 | public static void main(String[] args) {<NEW_LINE>createEmptyDynamicsWorld();<NEW_LINE>btBoxShape groundShape = new btBoxShape(new btVector3(50, 50, 50));<NEW_LINE>btTransform groundTransform = new btTransform();<NEW_LINE>groundTransform.setIdentity();<NEW_LINE>groundTransform.setOrigin(new btVector3(0, -50, 0));<NEW_L... | "This sample simulates falling of a rigid box, followed by \n" + "an inelastic collision with a ground plane.\n" + "The numbers show height of the box at each simulation step. \n" + "It should start around 3.0 and end up around 1.0.\n"); |
1,225,804 | public Request<RemoveRoleFromInstanceProfileRequest> marshall(RemoveRoleFromInstanceProfileRequest removeRoleFromInstanceProfileRequest) {<NEW_LINE>if (removeRoleFromInstanceProfileRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<RemoveRol... | request.setHttpMethod(HttpMethodName.POST); |
474,695 | final GetIpamAddressHistoryResult executeGetIpamAddressHistory(GetIpamAddressHistoryRequest getIpamAddressHistoryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getIpamAddressHistoryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetIpamAddressHistory"); |
422,240 | public void process(Node externs, Node root) {<NEW_LINE>NodeTraversal.traverse(compiler, root, this);<NEW_LINE>for (Entry<JSChunk, List<Node>> entry : Multimaps.asMap(functions).entrySet()) {<NEW_LINE>Node addingRoot = compiler.getNodeForCodeInsertion(entry.getKey());<NEW_LINE>List<Node> fnNodes = Lists.reverse(entry.g... | replaceWith(IR.empty()); |
1,757,935 | public final void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException {<NEW_LINE>if (parent == null || !(parent instanceof ValueHolder)) {<NEW_LINE>throw new TagException(this.tag, "Parent not an instance of ValueHolder: " + parent);<NEW_LINE>}<NEW_LINE>// onl... | Converter) ve.getValue(ctx); |
1,078,847 | public int[][] merge(int[][] intervals) {<NEW_LINE>if (intervals.length <= 1) {<NEW_LINE>return intervals;<NEW_LINE>}<NEW_LINE>List<int[]> result = new ArrayList<>();<NEW_LINE>List<int[]> nextList = new ArrayList<>();<NEW_LINE>int<MASK><NEW_LINE>boolean doCombine = false;<NEW_LINE>for (int i = 1; i < intervals.length; ... | [] temp = intervals[0]; |
1,676,784 | public void decode16x16(MBlock mBlock, Picture mb, Frame[][] refs, PartPred p0) {<NEW_LINE>int mbX = mapper.getMbX(mBlock.mbIdx);<NEW_LINE>int mbY = mapper.getMbY(mBlock.mbIdx);<NEW_LINE>boolean leftAvailable = mapper.leftAvailable(mBlock.mbIdx);<NEW_LINE>boolean topAvailable = mapper.topAvailable(mBlock.mbIdx);<NEW_LI... | mapper.topRightAvailable(mBlock.mbIdx); |
368,017 | public Request<ListEventsDetectionJobsRequest> marshall(ListEventsDetectionJobsRequest listEventsDetectionJobsRequest) {<NEW_LINE>if (listEventsDetectionJobsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListEventsDetectionJobsRequest)");<NEW_LINE>}<NEW_LINE>Request<Lis... | request.addHeader("Content-Type", "application/x-amz-json-1.1"); |
1,672,286 | public Stream<WebuiRelatedProcessDescriptor> streamDocumentRelatedProcesses(@NonNull final WebuiPreconditionsContext preconditionsContext, @NonNull final IUserRolePermissions userRolePermissions) {<NEW_LINE>final String tableName = preconditionsContext.getTableName();<NEW_LINE>final AdTableId adTableId = !Check.isEmpty... | AdWindowId adWindowId = preconditionsContext.getAdWindowId(); |
460,234 | private static int[] algB(int m, int n, String a, String b) {<NEW_LINE>// Step 1<NEW_LINE>int[][] k = new int[2][n + 1];<NEW_LINE>for (int j = 0; j <= n; j++) {<NEW_LINE>k[1][j] = 0;<NEW_LINE>}<NEW_LINE>// Step 2<NEW_LINE>for (int i = 1; i <= m; i++) {<NEW_LINE>// Step 3<NEW_LINE>for (int j = 0; j <= n; j++) {<NEW_LINE... | ][j - 1] + 1; |
915,628 | protected ActivityInstanceImpl createActivityInstance(PvmExecutionImpl scopeExecution, ScopeImpl scope, String activityInstanceId, String parentActivityInstanceId, Map<String, List<Incident>> incidentsByExecution) {<NEW_LINE>ActivityInstanceImpl actInst = new ActivityInstanceImpl();<NEW_LINE>actInst.setId(activityInsta... | String) scope.getProperty("name"); |
739,055 | @Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Updates a managed user.", response = ManagedUser.class)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 400, message = "Missing required field"), @ApiResponse(code = 401, message = "Unauthorized"), ... | user = qm.updateManagedUser(user); |
938,434 | protected AutologinRequest readInternal(Class<? extends AutologinRequest> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException {<NEW_LINE>AutologinRequest result = new AutologinRequest();<NEW_LINE>UnaryOperator<String> getValue;<NEW_LINE>if (isJsonContent(inputMessage.getHeaders().g... | (getValue.apply(PASSWORD)); |
1,249,132 | protected void runTool(JavaSparkContext ctx) {<NEW_LINE>// TODO remove me when https://github.com/broadinstitute/gatk/issues/4303 are fixed<NEW_LINE>if (output.endsWith(FileExtensions.BCF) || output.endsWith(FileExtensions.BCF + ".gz")) {<NEW_LINE>throw new UserException.UnimplementedFeature("It is currently not possib... | (UserException) e.getCause(); |
818,936 | public static DescribeReservedResourceResponse unmarshall(DescribeReservedResourceResponse describeReservedResourceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeReservedResourceResponse.setRequestId(_ctx.stringValue("DescribeReservedResourceResponse.RequestId"));<NEW_LINE>describeReservedResourceResponse.setCo... | ("DescribeReservedResourceResponse.SupportResources[" + i + "].InstanceSpec")); |
1,357,345 | public void marshall(ListTrackersResponseEntry listTrackersResponseEntry, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listTrackersResponseEntry == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listTrack... | listTrackersResponseEntry.getDescription(), DESCRIPTION_BINDING); |
1,300,177 | private void updateMenuState() {<NEW_LINE>m_appendAnd.setEnabled(m_criteriumNode<MASK><NEW_LINE>m_appendOr.setEnabled(m_criteriumNode.allowAppend(COrCriterium.class));<NEW_LINE>m_appendNot.setEnabled(m_criteriumNode.allowAppend(CNotCriterium.class));<NEW_LINE>m_insertAnd.setEnabled(m_criteriumNode.allowInsert(CAndCrite... | .allowAppend(CAndCriterium.class)); |
1,854,805 | public void request(long n) {<NEW_LINE>if (!sub.isOpen) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (processAll) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (wip.compareAndSet(0, 1)) {<NEW_LINE>// if processAll the demand is self-sustaining, passed on in onComplete<NEW_LINE>if (n == Long.MAX_VALUE || sub.requested.get() ==... | , b) -> a + b); |
436,736 | public KeySelectorResult select(@Nullable KeyInfo keyInfo, KeySelector.Purpose purpose, AlgorithmMethod method, XMLCryptoContext context) throws KeySelectorException {<NEW_LINE>if (keyInfo == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>for (Object keyInfoChild : keyInfo.getContent()) {<NEW_LINE>if (keyInfoChild i... | SimpleKeySelectorResult(cert.getPublicKey()); |
591,258 | // borrowed from commons-lang StringUtils<NEW_LINE>private static CharSequence replaceImpl(final String str, String sub, final String repl, int max, final boolean ignoreCase) {<NEW_LINE>if (str.length() == 0 || sub.length() == 0)<NEW_LINE>return str;<NEW_LINE>String search = str;<NEW_LINE>if (ignoreCase) {<NEW_LINE>sea... | , end).append(repl); |
240,899 | private Mono<Checkpoint> convertToCheckpoint(BlobItem blobItem) {<NEW_LINE>String[] names = blobItem.getName().split(BLOB_PATH_SEPARATOR);<NEW_LINE>LOGGER.atVerbose().addKeyValue(BLOB_NAME_LOG_KEY, blobItem.getName()).log(Messages.FOUND_BLOB_FOR_PARTITION);<NEW_LINE>if (names.length == 5) {<NEW_LINE>// Blob names shoul... | ).log(Messages.CHECKPOINT_INFO); |
888,766 | private Text appendAntiSpam(Text text, int index) {<NEW_LINE>List<ChatHudLine<OrderedText>> visibleMessages = ((ChatHudAccessor) mc.inGameHud.<MASK><NEW_LINE>if (visibleMessages.isEmpty() || index < 0 || index > visibleMessages.size() - 1)<NEW_LINE>return null;<NEW_LINE>ChatHudLine<OrderedText> visibleMessage = visible... | getChatHud()).getVisibleMessages(); |
1,808,997 | public static PrunedTag[] parse(final String value) {<NEW_LINE>return split(value, ",").get(stream -> stream.filter(StringUtil::isNotBlank).map(v -> {<NEW_LINE>final Pattern pattern = Pattern.compile("(\\w+)(\\[[^\\]]+\\])?(\\.[\\w\\-]+)?(#[\\w\\-]+)?");<NEW_LINE>final Matcher matcher = pattern.matcher(v.trim());<NEW_L... | ("([\\w\\-]+)=(\\S+)").matcher(attrPair); |
1,213,282 | // Performs linear interpolation to increase or decrease the size of array x to newLength<NEW_LINE>public static double[] interpolate(double[] x, int newLength) {<NEW_LINE>double[] y = null;<NEW_LINE>if (newLength > 0) {<NEW_LINE>int N = x.length;<NEW_LINE>if (N == 1) {<NEW_LINE>y = new double[1];<NEW_LINE>y[0] = x[0];... | , x[leftInd + 1]); |
1,370,298 | final ListTemplateVersionsResult executeListTemplateVersions(ListTemplateVersionsRequest listTemplateVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTemplateVersionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
856,280 | /*<NEW_LINE>* External API<NEW_LINE>*/<NEW_LINE>protected ArrayList<FileSystem.Classpath> handleClasspath(ArrayList<String> classpaths, String customEncoding) {<NEW_LINE>ArrayList<FileSystem.Classpath> initial = new ArrayList<>(DEFAULT_SIZE_CLASSPATH);<NEW_LINE>if (classpaths != null && classpaths.size() > 0) {<NEW_LIN... | this.options, this.releaseVersion); |
1,391,261 | public boolean applyRule(String query, BibEntry bibEntry) {<NEW_LINE>Pattern pattern;<NEW_LINE>try {<NEW_LINE>pattern = Pattern.compile(query, searchFlags.contains(SearchRules.SearchFlags.CASE_SENSITIVE<MASK><NEW_LINE>} catch (PatternSyntaxException ex) {<NEW_LINE>LOGGER.debug("Could not compile regex {}", query, ex);<... | ) ? 0 : Pattern.CASE_INSENSITIVE); |
1,544,775 | public RemoteConfiguration createRemoteConfiguration(ConfigManager.Configuration configuration) {<NEW_LINE>configuration.putValue(TYPE, FTP_CONNECTION_TYPE);<NEW_LINE>// NOI18N<NEW_LINE>configuration.putValue(HOST, "");<NEW_LINE>configuration.putValue(PORT, String.valueOf(DEFAULT_PORT));<NEW_LINE>configuration.putValue... | configuration.putValue(ACTIVE_EXTERNAL_IP, ""); |
203,867 | public NonCompliantResource unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>NonCompliantResource nonCompliantResource = new NonCompliantResourc... | String name = reader.nextName(); |
466,212 | String configFiles(Request req, Response res) {<NEW_LINE>ConfigRepoPlugin repoPlugin = pluginFromRequest(req);<NEW_LINE>File folder = null;<NEW_LINE>try {<NEW_LINE>JsonReader jsonReader = GsonTransformer.getInstance().jsonReaderFrom(req.body());<NEW_LINE>ConfigHelperOptions options = new ConfigHelperOptions(goConfigSer... | getCause().getMessage()); |
1,268,071 | final CloneReceiptRuleSetResult executeCloneReceiptRuleSet(CloneReceiptRuleSetRequest cloneReceiptRuleSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cloneReceiptRuleSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
474,456 | public Object createFont(int face, int style, int size) {<NEW_LINE>Typeface typeface = null;<NEW_LINE>switch(face) {<NEW_LINE>case Font.FACE_MONOSPACE:<NEW_LINE>typeface = Typeface.MONOSPACE;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>typeface = Typeface.DEFAULT;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>int fontstyle = Type... | & Font.STYLE_UNDERLINED) != 0); |
948,251 | private void updatePosition(Drawing drawing) {<NEW_LINE>double size = ResizeControl.SIZE / drawing.getScale();<NEW_LINE>double halfSize = size / 2d;<NEW_LINE>double arcSize = ResizeControl.ARC_SIZE / drawing.getScale();<NEW_LINE>this.shape.setRoundRect(0, 0, size, size, arcSize, arcSize);<NEW_LINE>// Create transformat... | .getRelativeShape().getBounds2D(); |
36,228 | private void cleanupStaleBlobs(Collection<SnapshotId> deletedSnapshots, Map<String, BlobContainer> foundIndices, Map<String, BlobMetadata> rootBlobs, RepositoryData newRepoData, ActionListener<DeleteResult> listener) {<NEW_LINE>final GroupedActionListener<DeleteResult> groupedListener = new GroupedActionListener<>(Acti... | ()).sum()); |
991,523 | private DefinitionProtos.Body writeBody(ExpressionSerialization defSerializer, @NotNull Body body) {<NEW_LINE>DefinitionProtos.Body.Builder bodyBuilder = DefinitionProtos.Body.newBuilder();<NEW_LINE>if (body instanceof IntervalElim) {<NEW_LINE>IntervalElim intervalElim = (IntervalElim) body;<NEW_LINE>DefinitionProtos.B... | .writeExpr(pair.proj2)); |
1,603,042 | private String recalculate() {<NEW_LINE>MProduct product = MProduct.get(getCtx(), getM_Product_ID());<NEW_LINE>MAcctSchema as = MClient.get(getCtx()).getAcctSchema();<NEW_LINE>MCostType ct = MCostType.getByMethodCosting(as, as.getCostingMethod());<NEW_LINE>String costingLevel = product.getCostingLevel(as);<NEW_LINE>if ... | COSTINGLEVEL_Organization) ? getAD_Org_ID() : 0; |
24,642 | public ApiResponse handleApiView(String name, JSONObject params) throws ApiException {<NEW_LINE>log.debug("handleApiView " + name + " " + params.toString());<NEW_LINE>switch(name) {<NEW_LINE>case VIEW_GET_AUTHENTICATION:<NEW_LINE>return getContext(params).getAuthenticationMethod().getApiResponseRepresentation();<NEW_LI... | ApiException(ApiException.Type.BAD_VIEW); |
969,117 | public TimeBasedCanary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TimeBasedCanary timeBasedCanary = new TimeBasedCanary();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken... | String currentParentElement = context.getCurrentParentElement(); |
1,782,846 | final DeleteNetworkInsightsAccessScopeAnalysisResult executeDeleteNetworkInsightsAccessScopeAnalysis(DeleteNetworkInsightsAccessScopeAnalysisRequest deleteNetworkInsightsAccessScopeAnalysisRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteNetworkInsightsAccessScopeAnalysisRequest);<NE... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,320,826 | public MariaDbParameters unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MariaDbParameters mariaDbParameters = new MariaDbParameters();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | class).unmarshall(context)); |
344,135 | public WorkResult execute(T spec) {<NEW_LINE>if (!recompilationSpecProvider.isIncremental()) {<NEW_LINE>LOG.info("Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.");<NEW_LINE>return rebuildAllCompiler.execute(sp... | PreviousCompilation previousCompilation = new PreviousCompilation(previousCompilationData); |
719,362 | public VirtualFile createFile(String path) {<NEW_LINE>if (path.startsWith("/")) {<NEW_LINE>path = path.substring(1);<NEW_LINE>}<NEW_LINE>if (path.contains(File.separator)) {<NEW_LINE>String newName = path.substring(0, path.indexOf(File.separator));<NEW_LINE>if (files.containsKey(newName)) {<NEW_LINE>VirtualFile virtual... | = new VirtualFile(this, newName); |
846,205 | private static void squareGraphFromSlides() {<NEW_LINE>int n = 9;<NEW_LINE>List<List<Edge>> g = createEmptyGraph(n);<NEW_LINE>addUndirectedEdge(g, 0, 1, 6);<NEW_LINE>addUndirectedEdge(g, 0, 3, 3);<NEW_LINE>addUndirectedEdge(g, 1, 2, 4);<NEW_LINE>addUndirectedEdge(g, 1, 4, 2);<NEW_LINE>addUndirectedEdge(g, 2, 5, 12);<NE... | LazyPrimsAdjacencyList solver = new LazyPrimsAdjacencyList(g); |
805,620 | public Oql visit(Call call) {<NEW_LINE>final Operator op = call.operator();<NEW_LINE>final List<Expression> args = call.arguments();<NEW_LINE>if (op == Operators.NOT_IN || op == IterableOperators.NOT_EMPTY) {<NEW_LINE>// geode doesn't understand syntax foo not in [1, 2, 3]<NEW_LINE>// convert "foo not in [1, 2, 3]" int... | call.arguments()))); |
989,888 | public File runFilter(File file, Map<String, String[]> parameters) {<NEW_LINE>Double h = parameters.get(getPrefix() + "h") != null ? Double.parseDouble(parameters.get(getPrefix() + <MASK><NEW_LINE>Double s = parameters.get(getPrefix() + "s") != null ? Double.parseDouble(parameters.get(getPrefix() + "s")[0]) : 0.0;<NEW_... | "h")[0]) : 0.0; |
554,069 | public SessionLoader.WorkerResult apply(EmbeddedCacheManager embeddedCacheManager) {<NEW_LINE>Cache<Object, Object> workCache = embeddedCacheManager.getCache(cacheName);<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.tracef("Running computation for segment %s with worker %s", workerCtx.getSegment(), workerCtx.getWor... | = new SessionLoader.WorkerResult[1]; |
292,135 | public void mouseDown(MouseEvent e) {<NEW_LINE>double x = xyGraph.primaryXAxis.getPositionValue(e.x, false);<NEW_LINE>double y = xyGraph.primaryYAxis.getPositionValue(e.y, false);<NEW_LINE>if (x < 0 || y < 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>double minDistance = 30.0d;<NEW_LINE>long time = 0;<NEW_LINE>double max ... | .print(value, "#,###.##")); |
677,684 | private I_AD_UI_Element createUIElement(final I_AD_UI_ElementGroup uiElementGroup, final I_AD_Field adField, final AtomicInteger nextSeqNo, final AtomicInteger nextSeqNoGrid) {<NEW_LINE>// might not be saved<NEW_LINE>final UIElementGroupId uiElementGroupId = UIElementGroupId.ofRepoIdOrNull(uiElementGroup.getAD_UI_Eleme... | boolean displayed = adField.isDisplayed(); |
1,528,336 | public void readFrom(StreamInput in) throws IOException {<NEW_LINE>name = in.readString();<NEW_LINE>generation = Long.parseLong(name.substring(1), Character.MAX_RADIX);<NEW_LINE>committed = in.readBoolean();<NEW_LINE>search = in.readBoolean();<NEW_LINE>docCount = in.readInt();<NEW_LINE>delDocCount = in.readInt();<NEW_L... | in.readOptionalString(), null); |
1,823,120 | public ISetDeltaMonitor monitorDelta(ICause propagator) {<NEW_LINE>ISetDeltaMonitor[] deltaMonitors = new ISetDeltaMonitor[variables.length];<NEW_LINE>for (int i = 0; i < variables.length; i++) {<NEW_LINE>deltaMonitors[i] = variables[i].monitorDelta(propagator);<NEW_LINE>}<NEW_LINE>return new SetViewOnSetsDeltaMonitor(... | RANGESET, 0, getModel()); |
715,190 | private static void tryOpenFile(@NonNull Context context, @NonNull Uri uri, @NonNull String fileName, boolean isDirectory) {<NEW_LINE>try {<NEW_LINE>if (isDirectory) {<NEW_LINE>try {<NEW_LINE>openFileWithIntent(context, uri, DocumentsContract.Document.MIME_TYPE_DIR);<NEW_LINE>} catch (ActivityNotFoundException e1) {<NE... | getMimeTypeFromExtension(getExtension(fileName))); |
879,809 | private int bound(IntVar var, int val) {<NEW_LINE><MASK><NEW_LINE>int cost;<NEW_LINE>// // if decision is '<=' ('>='), UB (LB) should be ignored to avoid infinite loop<NEW_LINE>if (dop == DecisionOperatorFactory.makeIntSplit() && val == var.getUB() || dop == DecisionOperatorFactory.makeIntReverseSplit() && val == var.g... | Model model = var.getModel(); |
1,602,866 | public JsonElement serialize(EntityData.Entity src, Type typeOfSrc, JsonSerializationContext context) {<NEW_LINE>JsonObject result = new JsonObject();<NEW_LINE>if (src.hasId()) {<NEW_LINE>result.addProperty("id", src.getId());<NEW_LINE>}<NEW_LINE>if (src.hasParentPrefab() && !src.getParentPrefab().isEmpty()) {<NEW_LINE... | , context.serialize(component)); |
1,151,673 | public void initialize(Server server, Injector injector) {<NEW_LINE>final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);<NEW_LINE>root.addServlet(new ServletHolder(new DefaultServlet()), "/*");<NEW_LINE>// Add LimitRequestsFilter as first in the chain if enabled.<NEW_LINE>if (se... | final HandlerList handlerList = new HandlerList(); |
672,493 | public Object calculate(Context ctx) {<NEW_LINE>JobSpace js = ctx.getJobSpace();<NEW_LINE>if (js != null && js.getAppHome() != null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException(mm.getMessage("license.fpNotSupport") + "system");<NEW_LINE>}<NEW_LINE>if (param == null) {<NEW_LINE>Mes... | + mm.getMessage("function.paramTypeError")); |
1,071,491 | protected final void parse(byte[] data) {<NEW_LINE>RLPList list = (RLPList) RLP.decode2OneItem(data, 0);<NEW_LINE>if (list.size() < 2) {<NEW_LINE>throw new PeerDiscoveryException(MORE_DATA);<NEW_LINE>}<NEW_LINE>RLPList nodesRLP = (RLPList) list.get(0);<NEW_LINE>for (int i = 0; i < nodesRLP.size(); ++i) {<NEW_LINE>RLPLi... | RLPList) nodesRLP.get(i); |
1,642,165 | private File process(File file) throws IOException {<NEW_LINE>if (!properties.containsKey("mainName")) {<NEW_LINE>throw new IllegalStateException("Properties must contain mainName property");<NEW_LINE>}<NEW_LINE>if (!properties.containsKey("packageName")) {<NEW_LINE>throw new IllegalStateException("Properties must cont... | FileUtils.moveDirectory(file, newFile); |
1,837,491 | static State calculateIndexState(ClusterState state, SystemIndexDescriptor descriptor) {<NEW_LINE>final IndexMetadata indexMetadata = state.metadata().index(descriptor.getPrimaryIndex());<NEW_LINE>if (indexMetadata == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final boolean isIndexUpToDate = INDEX_FORMAT_SETTING... | )) == descriptor.getIndexFormat(); |
884,996 | public static FabOptions parse(Context context, JSONObject json) {<NEW_LINE>FabOptions options = new FabOptions();<NEW_LINE>if (json == null)<NEW_LINE>return options;<NEW_LINE>options.id = TextParser.parse(json, "id");<NEW_LINE>options.backgroundColor = ThemeColour.parse(context, json.optJSONObject("backgroundColor"));... | , json.optJSONObject("iconColor")); |
1,503,750 | public static Expr buildExpr(Item item) {<NEW_LINE>// Before testing for a list because of RDF terms that are lists: (qtriple).<NEW_LINE>if (item.isNode())<NEW_LINE>return ExprLib.nodeToExpr(item.getNode());<NEW_LINE>Expr expr = null;<NEW_LINE>if (item.isList()) {<NEW_LINE>ItemList list = item.getList();<NEW_LINE>if (l... | BuilderLib.broken(item, "Empty list for expression"); |
696,352 | public String bulkDrop(@Sender EntityRef sender, @CommandParam("blockName") String blockName, @CommandParam("value") int value) {<NEW_LINE>// This is a loop which gives the particular amount of block the player wants to spawn<NEW_LINE>ClientComponent clientComponent = sender.getComponent(ClientComponent.class);<NEW_LIN... | block = blockManager.getBlockFamily(blockName); |
1,332,885 | public ListCertificatesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListCertificatesResult listCertificatesResult = new ListCertificatesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | )).unmarshall(context)); |
1,123,588 | protected void testAnnotationInsertion() {<NEW_LINE>if (root == null || !checker.hasOption("ajavaChecks")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CompilationUnit originalAst;<NEW_LINE>try (InputStream originalInputStream = root.getSourceFile().openInputStream()) {<NEW_LINE>originalAst = JavaParserUtil.parseCompilationU... | ).toUri(), e); |
853,682 | ConverterConfiguration createConverterConfiguration() {<NEW_LINE>if (!useNativeDriverJavaTimeCodecs) {<NEW_LINE>return new ConverterConfiguration(STORE_CONVERSIONS, this.customConverters, <MASK><NEW_LINE>}<NEW_LINE>List<Object> converters = new ArrayList<>(STORE_CONVERTERS.size() + 3);<NEW_LINE>converters.add(DateToUtc... | convertiblePair -> true, this.propertyValueConversions); |
1,248,392 | void maybePrecompile(TreeLogger logger) throws UnableToCompleteException {<NEW_LINE>if (options.getNoPrecompile()) {<NEW_LINE>publish(recompiler.initWithoutPrecompile(logger), null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO: each box will have its own binding properties<NEW_LINE>Map<String, String> defaultProps = n... | HashMap<String, String>(); |
1,809,554 | public boolean balanceLayerMinMemory(LayerInterface layer, long frameMaxRss) {<NEW_LINE>long maxrss = getJdbcTemplate().queryForObject("SELECT int_max_rss FROM layer_mem WHERE pk_layer=?", Long.class, layer.getLayerId());<NEW_LINE>if (maxrss < frameMaxRss) {<NEW_LINE>maxrss = frameMaxRss;<NEW_LINE>}<NEW_LINE>if (maxrss... | getName() + " was balanced to " + maxrss); |
198,989 | public void execute(@Nonnull MinecraftServer server, @Nonnull ICommandSender sender, @Nonnull String[] args) throws CommandException {<NEW_LINE>if (match(args, "config", "set", null, null, null)) {<NEW_LINE>doSet(server, sender, args[2], args[3], args[4]);<NEW_LINE>} else if (match(args, "config", "get", null, null)) {... | new WrongUsageException(getUsage(sender)); |
753,346 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String expression = "@public create expression cc { (a,v1,b,v2,c) -> a.p00 || v1 || b.p00 || v2 || c.p00}";<NEW_LINE>env.compileDeploy(expression, path);<NEW_LINE>String epl = "@name('s0') select cc(e2, 'x', e3, '... | assertEqualsNew("s0", "c0", "BxCyA"); |
1,529,933 | public ProcessStatus preProcessCheck(final PwmRequest pwmRequest) throws PwmUnrecoverableException, IOException, ServletException {<NEW_LINE>// fetch the required beans / managers<NEW_LINE>final PwmDomain pwmDomain = pwmRequest.getPwmDomain();<NEW_LINE>final PwmSession pwmSession = pwmRequest.getPwmSession();<NEW_LINE>... | final SetupOtpProfile setupOtpProfile = getSetupOtpProfile(pwmRequest); |
905,564 | public AttentionVertex build() {<NEW_LINE>this.nHeads = nHeads == 0 ? 1 : nHeads;<NEW_LINE>this.weightInit = weightInit == null ? WeightInit.XAVIER : weightInit;<NEW_LINE>Preconditions.<MASK><NEW_LINE>Preconditions.checkArgument(nInKeys > 0, "You have to set nInKeys");<NEW_LINE>Preconditions.checkArgument(nInQueries > ... | checkArgument(nOut > 0, "You have to set nOut"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.