idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
260,369 | protected PdfObject readSingleObject(int k) throws IOException {<NEW_LINE>strings.clear();<NEW_LINE>int k2 = k * 2;<NEW_LINE>int pos = xref[k2];<NEW_LINE>if (pos < 0)<NEW_LINE>return null;<NEW_LINE>if (xref[k2 + 1] > 0)<NEW_LINE>pos = objStmToOffset.get(xref[k2 + 1]);<NEW_LINE>if (pos == 0)<NEW_LINE>return null;<NEW_LI... | (MessageLocalization.getComposedMessage("token.obj.expected")); |
998,644 | public void run(RegressionEnvironment env) {<NEW_LINE>// Dimension-provided<NEW_LINE>//<NEW_LINE>env.tryInvalidCompile("select new double[] from SupportBean", "Incorrect syntax near 'from' (a reserved keyword) expecting a left curly bracket '{' but found 'from' at line 1 column 20");<NEW_LINE>env.tryInvalidCompile("sel... | env.tryInvalidCompile("select new String[] {{'x'}} from SupportBean", "Failed to validate select-clause expression 'new String[] {{\"x\"}}': Array element type mismatch: Expecting type String but received type String[]"); |
1,342,658 | final GetFindingsPublicationConfigurationResult executeGetFindingsPublicationConfiguration(GetFindingsPublicationConfigurationRequest getFindingsPublicationConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFindingsPublicationConfigurationRequest);<NEW_LINE>AWSRequestMetrics ... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
15,803 | private void recurse(final Element element, final Map<String, Object> values, final int depth) {<NEW_LINE>final Tag tag = element.tag();<NEW_LINE>final Set<String> classes = element.classNames();<NEW_LINE>final String link = element.attr("href");<NEW_LINE>final Object content = extractChildContent(element);<NEW_LINE>if... | values.put("type", classes); |
1,201,896 | public OperationResult execute(final MessageFrame frame, final EVM evm) {<NEW_LINE>final Address recipientAddress = Words.toAddress(frame.popStackItem());<NEW_LINE>// because of weird EIP150/158 reasons we care about a null account so we can't merge this.<NEW_LINE>final Account recipientNullable = frame.getWorldUpdater... | incrementBalance(account.getBalance()); |
387,247 | public void render(AbstractJsonTypeManifold tm, StringBuilder sb, int indent, boolean mutable) {<NEW_LINE>setTm(tm);<NEW_LINE>String name = getName();<NEW_LINE>String identifier = addActualNameAnnotation(sb, indent, name, false);<NEW_LINE>if (!(getParent() instanceof JsonStructureType) || !((JsonStructureType) getParen... | (identifier).append(" extends IJsonList<$componentType> {\n"); |
1,814,461 | private List<ActionOrganization.WoUnit> unit(Business business, Date start, Date current) throws Exception {<NEW_LINE>List<ActionOrganization.WoUnit> list = new ArrayList<>();<NEW_LINE>for (UnitStub stub : ThisApplication.state.getUnitStubs()) {<NEW_LINE>List<String> us = new ArrayList<>();<NEW_LINE>us.add(stub.getValu... | business, start, current, us); |
227,025 | public void changedVisibility(final IViewEdge<?> edge, final boolean visible) {<NEW_LINE>if (visible) {<NEW_LINE>final Node source = m_sourceNode.getNode();<NEW_LINE>final Node target = m_targetNode.getNode();<NEW_LINE>// Make sure "all endpoints lie in a graph"<NEW_LINE>if ((source.getGraph() == null) || (target.getGr... | HierarchyManager hm = m_graph.getHierarchyManager(); |
550,606 | final DeleteManagedPrefixListResult executeDeleteManagedPrefixList(DeleteManagedPrefixListRequest deleteManagedPrefixListRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteManagedPrefixListRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | endClientExecution(awsRequestMetrics, request, response); |
839,549 | public void enterRouter_bgp_stanza(Router_bgp_stanzaContext ctx) {<NEW_LINE>_currentAristaBgpProcess = _configuration.getAristaBgp();<NEW_LINE>long asn = <MASK><NEW_LINE>if (_currentAristaBgpProcess == null) {<NEW_LINE>_currentAristaBgpProcess = new AristaBgpProcess(asn);<NEW_LINE>_configuration.setAristaBgp(_currentAr... | toAsNum(ctx.bgp_asn()); |
55,733 | public void onActivityResult(final int requestCode, final int resultCode, final Intent intent) {<NEW_LINE>if (requestCode != SCAN_RESULT_CODE) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, intent);<NEW_LINE>}<NEW_LINE>if (resultCode != Activity.RESULT_OK) {<NEW_LINE>if (intent == null) {<NEW_LINE>// user p... | intent.getSerializableExtra(StringHandlerActivity.RESULT_TYPE_KEY); |
298,452 | public static void main(String[] args) {<NEW_LINE>Exercise20<Integer> <MASK><NEW_LINE>linkedList.add(0);<NEW_LINE>linkedList.add(1);<NEW_LINE>linkedList.add(2);<NEW_LINE>linkedList.add(3);<NEW_LINE>StdOut.println("Before removing second node");<NEW_LINE>StringJoiner listBeforeRemove = new StringJoiner(" ");<NEW_LINE>fo... | linkedList = new Exercise20<>(); |
32,433 | protected Tuple2<Vector[], String> predictMultiVar(Timestamp[] historyTimes, Vector[] historyVals, int predictNum) {<NEW_LINE>int vectorSize = historyVals[0].size();<NEW_LINE>int trainNum = historyVals.length;<NEW_LINE>double[] historySingleVals = new double[trainNum];<NEW_LINE>Vector[] results = new Vector[predictNum]... | i] = new DenseVector(vectorSize); |
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... | DefaultPrettyPrinter().print(astWithoutAnnotations); |
421,192 | private void buildHeader(MimeMessage message) throws MessagingException {<NEW_LINE><MASK><NEW_LINE>Address from = new Address(identity.getEmail(), identity.getName());<NEW_LINE>message.setFrom(from);<NEW_LINE>setRecipients(message, "To", to);<NEW_LINE>setRecipients(message, "CC", cc);<NEW_LINE>setRecipients(message, "B... | message.addSentDate(sentDate, hideTimeZone); |
1,547,478 | final CreateSiteToSiteVpnAttachmentResult executeCreateSiteToSiteVpnAttachment(CreateSiteToSiteVpnAttachmentRequest createSiteToSiteVpnAttachmentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createSiteToSiteVpnAttachmentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
961,236 | public static void main(String[] args) {<NEW_LINE>String a = "923456789";<NEW_LINE>String b = "12345";<NEW_LINE>EditDistanceRecursive solver = new EditDistanceRecursive(a, b, 100, 4, 2);<NEW_LINE>System.out.println(solver.editDistance());<NEW_LINE>a = "12345";<NEW_LINE>b = "923456789";<NEW_LINE>solver = new EditDistanc... | println(solver2.editDistance()); |
222,606 | private void handler(final Object bean) {<NEW_LINE>if (group == null) {<NEW_LINE>group = ((BasicServiceConfigBean) applicationContext.getBean(BASE_SERVICE_CONFIG)).getGroup();<NEW_LINE>}<NEW_LINE>Integer timeout = Optional.ofNullable(((BasicServiceConfigBean) applicationContext.getBean(BASE_SERVICE_CONFIG)).getRequestT... | findMergedAnnotation(method, ShenyuMotanClient.class); |
208,516 | private void updateApplicationWithJobStatusCV(Application app, JobStatusCV jobStatus) {<NEW_LINE>// infer the final flink job state<NEW_LINE>Enumeration.Value state = jobStatus.jobState();<NEW_LINE>Enumeration.Value preState = toK8sFlinkJobState(FlinkAppState.of(app.getState()));<NEW_LINE>state = FlinkJobStatusWatcher.... | ().getTime() : 0; |
166,661 | private static org.jreleaser.model.Announce convertAnnounce(Announce announce) {<NEW_LINE>org.jreleaser.model.Announce a = new org.jreleaser.model.Announce();<NEW_LINE>if (announce.isEnabledSet())<NEW_LINE>a.setEnabled(announce.isEnabled());<NEW_LINE>if (announce.getArticle().isSet())<NEW_LINE>a.setArticle(convertArtic... | (announce.getArticle())); |
14,232 | public String visit(ASTNode.RestrictExpr node) {<NEW_LINE>ZQLExtensionContext context = ZQLContext.createZQLExtensionContext();<NEW_LINE>try {<NEW_LINE>for (RestrictByExprExtensionPoint extp : pluginRgty.getExtensionList(RestrictByExprExtensionPoint.class)) {<NEW_LINE>String ret = extp.restrictByExpr(context, node);<NE... | , node.getValue())); |
1,181,769 | public boolean configure(final String name, final Map<String, Object> xmlParams) throws ConfigurationException {<NEW_LINE>_serverId = _msServer.getId();<NEW_LINE>final Map<String, String> params = _configDao.getConfiguration(Long.toHexString(_serverId), xmlParams);<NEW_LINE>final <MASK><NEW_LINE>_workers = new WorkerTh... | int count = HAWorkers.value(); |
549,472 | public static String parameterMapToString(Map parameterMap, boolean addQuestion) {<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>if (parameterMap.size() > 0) {<NEW_LINE>if (addQuestion) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Iterator itr = parameterMap.entrySet().iterator();<NEW_LINE>while (itr.hasNext()) {<NE... | sb.append(StringPool.QUESTION); |
1,530,871 | public void read(org.apache.thrift.protocol.TProtocol prot, cancel_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(3);<NEW_LINE>if (incoming.get(0)) {<NEW... | .externalCompactionId = iprot.readString(); |
504,677 | public static long byteStringAs(String str, ByteUnit unit) {<NEW_LINE>String lower = str.toLowerCase().trim();<NEW_LINE>try {<NEW_LINE>Matcher m = Pattern.compile("([0-9]+)([a-z]+)?").matcher(lower);<NEW_LINE>Matcher fractionMatcher = Pattern.compile("([0-9]+\\.[0-9]+)([a-z]+)?").matcher(lower);<NEW_LINE>if (m.matches(... | String byteError = "Size must be specified as bytes (b), " + "kibibytes (k), mebibytes (m), gibibytes (g), tebibytes (t), or pebibytes(p). " + "E.g. 50b, 100k, or 250m."; |
550,773 | public O invoke(FunctionDefinition definition, I input, Argument<O> outputType) {<NEW_LINE>Optional<URI> opt = definition.getURI();<NEW_LINE>if (!opt.isPresent()) {<NEW_LINE>throw new FunctionNotFoundException(definition.getName());<NEW_LINE>} else {<NEW_LINE>URI uri = opt.get();<NEW_LINE>HttpRequest request;<NEW_LINE>... | uri.toString(), input); |
1,107,994 | public void process(LArrayAccessor<TupleDesc_U8> points, DogArray_I32 assignments, FastAccess<TupleDesc_U8> clusters) {<NEW_LINE>// see if it should run the single thread version instead<NEW_LINE>if (points.size() < minimumForConcurrent) {<NEW_LINE>super.process(points, assignments, clusters);<NEW_LINE>return;<NEW_LINE... | clusterIdx = assignments.get(pointIdx); |
1,248,244 | private void updateButtons(final boolean playing) {<NEW_LINE>Timber.d("Updating buttons");<NEW_LINE>runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>mPoster.setKeepScreenOn(playing);<NEW_LINE>if (!playing) {<NEW_LINE>mPlayPauseButton.setImageResource(R.drawable.ic_play);... | setImageResource(R.drawable.ic_pause); |
406,871 | public void onMessage(Message message, byte[] pattern) {<NEW_LINE>byte[] messageChannel = message.getChannel();<NEW_LINE>if (ByteUtils.startsWith(messageChannel, this.sessionCreatedChannelPrefixBytes)) {<NEW_LINE>// TODO: is this thread safe?<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<Object, Object> loaded =... | logger.warn("Unable to publish SessionDestroyedEvent for session " + sessionId); |
192,100 | protected void layout(Composite composite, boolean flushCache) {<NEW_LINE>Rectangle bounds = composite.getBounds();<NEW_LINE>if (composite instanceof Shell) {<NEW_LINE>bounds = ((Shell) composite).getClientArea();<NEW_LINE>} else {<NEW_LINE>bounds.x = 0;<NEW_LINE>bounds.y = 0;<NEW_LINE>}<NEW_LINE>List<Control> children... | ? bounds.x : bounds.y; |
993,260 | private CodeExpression[] loadParameters(org.w3c.dom.Node node) {<NEW_LINE>List<CodeExpression> paramList = new ArrayList<CodeExpression>();<NEW_LINE>org.w3c.dom.<MASK><NEW_LINE>if (childNodes != null) {<NEW_LINE>for (int i = 0, n = childNodes.getLength(); i < n; i++) {<NEW_LINE>org.w3c.dom.Node childNode = childNodes.i... | NodeList childNodes = node.getChildNodes(); |
1,505,867 | private AscendingLongIterator predicateIterator(Predicate predicate, TypeConverter converter) {<NEW_LINE>if (predicate instanceof AndPredicate) {<NEW_LINE>Predicate[] predicates = ((AndPredicate) predicate).getPredicates();<NEW_LINE>assert predicates.length > 0;<NEW_LINE>if (predicates.length == 1) {<NEW_LINE>return pr... | NotEqualPredicate) predicate).getValue(); |
293,197 | public void completed(ClientExchange result) {<NEW_LINE>new StringWriteChannelListener(requestBody).<MASK><NEW_LINE>result.setResponseListener(new ClientCallback<ClientExchange>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void completed(ClientExchange result) {<NEW_LINE>new StringReadChannelListener(com.networknt.... | setup(result.getRequestChannel()); |
1,179,752 | private void sendServiceResponse(ChannelHandlerContext ctx, long requestId, UaRequestMessage request, UaResponseMessage response) {<NEW_LINE>serializationQueue.encode((binaryEncoder, chunkEncoder) -> {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>binaryEncoder.setBuffer(messageBuffer);<NEW_LINE>binaryEncoder.writeMessage(nu... | ByteBuf messageBuffer = BufferUtil.pooledBuffer(); |
423,918 | private synchronized int _put(int key, MODE m) {<NEW_LINE>IntLinkedSetry[] buk = table;<NEW_LINE>int index = <MASK><NEW_LINE>for (IntLinkedSetry e = buk[index]; e != null; e = e.next) {<NEW_LINE>if (CompareUtil.equals(e.key, key)) {<NEW_LINE>switch(m) {<NEW_LINE>case FORCE_FIRST:<NEW_LINE>if (header.link_next != e) {<N... | hash(key) % buk.length; |
767,000 | private void drawProgessBar(Graphics g, int intValue, int totalValue) {<NEW_LINE>if (totalValue == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>g.setFont(font);<NEW_LINE>final String label = "" + intValue + "/" + totalValue;<NEW_LINE>final Rectangle2D rect = getUsed(g, label);<NEW_LINE>final int x = 10;<NEW_LINE>final int... | int value = barWidth * intValue / totalValue; |
1,492,829 | private void renderDynamicPut() {<NEW_LINE>line("@Override");<NEW_LINE>line("public void put(", <MASK><NEW_LINE>{<NEW_LINE>line("put(ImmutableMultimap.<", Row, ", ", ColumnValue, ">builder().putAll(rowName, values).build());");<NEW_LINE>}<NEW_LINE>line("}");<NEW_LINE>line();<NEW_LINE>line("@Override");<NEW_LINE>line("p... | Row, " rowName, Iterable<", ColumnValue, "> values) {"); |
570,458 | final DescribeDatasetImportJobResult executeDescribeDatasetImportJob(DescribeDatasetImportJobRequest describeDatasetImportJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDatasetImportJobRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NE... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,833,210 | public void run(RegressionEnvironment env) {<NEW_LINE>String eplTemplate = "@public create inlined_class \"\"\"\n" + " public class MyClass {\n" + " public static int doIt(int parameter) {\n" + " return %REPLACE%;\n" + " }\n" + " }\n" + "\"\"\"\n";<NEW_LINE>EPCompiled compiledReturnZero =... | .replace("%REPLACE%", "0")); |
1,484,956 | protected double outsideDistance(final DistanceStyle distanceStyle, final double x, final double y, final double z) {<NEW_LINE>final double topDistance = distanceStyle.computeDistance(planetModel, topPlane, x, y, z, bottomPlane, leftPlane, rightPlane);<NEW_LINE>final double bottomDistance = distanceStyle.computeDistanc... | LRHC, x, y, z); |
928,117 | public void indexAll(IProject project) {<NEW_LINE>// New index is disabled, see bug 544898<NEW_LINE>// this.indexer.makeDirty(project);<NEW_LINE>if (JavaCore.getPlugin() == null)<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>// Disable index manager to avoid synchronization lock contention when adding new index requests to ... | ) entry).getLibraryIndexLocation()); |
88,875 | public PrinterHWList createPrinterHW() {<NEW_LINE>final List<PrinterHW> printerHWs = new ArrayList<>();<NEW_LINE>for (final PrintService printService : getPrintServices()) {<NEW_LINE><MASK><NEW_LINE>printerHW.setName(printService.getName());<NEW_LINE>final List<PrinterHWMediaSize> printerHWMediaSizes = new ArrayList<>(... | final PrinterHW printerHW = new PrinterHW(); |
1,321,022 | public static DescribeDcdnHttpsDomainListResponse unmarshall(DescribeDcdnHttpsDomainListResponse describeDcdnHttpsDomainListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnHttpsDomainListResponse.setRequestId(_ctx.stringValue("DescribeDcdnHttpsDomainListResponse.RequestId"));<NEW_LINE>describeDcdnHttpsDomain... | ("DescribeDcdnHttpsDomainListResponse.CertInfos[" + i + "].DomainName")); |
575,970 | final RebuildWorkspacesResult executeRebuildWorkspaces(RebuildWorkspacesRequest rebuildWorkspacesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rebuildWorkspacesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RebuildWorkspacesReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
342,744 | private <V> V doInWorkingDirectory(Message<?> message, Session<FTPFile> session, Callable<V> task) throws IOException {<NEW_LINE>Expression workDirExpression = this.workingDirExpression;<NEW_LINE>FTPClient ftpClient = (FTPClient) session.getClientInstance();<NEW_LINE>String currentWorkingDirectory = null;<NEW_LINE>bool... | evaluationContext, message, String.class); |
995,610 | public static DescribeFlowResponse unmarshall(DescribeFlowResponse describeFlowResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeFlowResponse.setRequestId(_ctx.stringValue("DescribeFlowResponse.RequestId"));<NEW_LINE>describeFlowResponse.setId(_ctx.stringValue("DescribeFlowResponse.Id"));<NEW_LINE>describeFlowResp... | (_ctx.stringValue("DescribeFlowResponse.Description")); |
974,282 | public ExitCode runWithoutHelp(CommandRunnerParams params) throws Exception {<NEW_LINE>RemoteExecutionEventListener eventListener = new RemoteExecutionEventListener();<NEW_LINE>params.getBuckEventBus().register(eventListener);<NEW_LINE>RemoteExecutionConfig remoteExecutionConfig = params.getBuckConfig().getView(RemoteE... | isAbsolute(), "Expected digest output to be absolute, got %s.", digest); |
38,817 | public void enterS_interface_nve(S_interface_nveContext ctx) {<NEW_LINE>int line = ctx.getStart().getLine();<NEW_LINE>int first = toInteger(ctx.nverange.iname.first);<NEW_LINE>int last = ctx.nverange.last != null ? toInteger(ctx.nverange.last) : first;<NEW_LINE>// flip first and last if range is backwards<NEW_LINE>if (... | defineStructure(NVE, nveName, ctx); |
108,392 | final DeleteCustomActionTypeResult executeDeleteCustomActionType(DeleteCustomActionTypeRequest deleteCustomActionTypeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteCustomActionTypeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
24,000 | public JSONObject toJsonObject(ClassDescriptor cd) throws Exception {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>jsonObject.put(<MASK><NEW_LINE>if (cd.getCondition() != null && cd.getCondition().getTypeReachable() != null) {<NEW_LINE>JSONObject conditionJsonObject = new JSONObject();<NEW_LINE>condition... | "name", cd.getName()); |
1,833,775 | public void update(long value, long timestamp, String label) {<NEW_LINE>rescaleIfNeeded();<NEW_LINE>lockForRegularUsage();<NEW_LINE>try {<NEW_LINE>final double itemWeight = weight(timestamp - startTime);<NEW_LINE>final WeightedSnapshot.WeightedSample sample = new WeightedSnapshot.WeightedSample(value, itemWeight, label... | long newCount = count.incrementAndGet(); |
1,092,675 | public boolean shouldAutoCreate(String index, ClusterState state) {<NEW_LINE>if (resolver.hasIndexAbstraction(index, state)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Always auto-create system indexes<NEW_LINE>if (systemIndices.isSystemIndex(index)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// One volatile read... | "] contains [-" + indexExpression + "] which forbids automatic creation of the index", index); |
530,219 | public boolean createContainerInLocation(Location location, String container, CreateContainerOptions createContainerOptions) {<NEW_LINE>ShardedBucket bucket = this.buckets.get(container);<NEW_LINE>if (bucket == null) {<NEW_LINE>return this.delegate().createContainerInLocation(location, container, createContainerOptions... | superblockMeta = this.createSuperblockMeta(bucket); |
1,416,692 | private void ikUpdate(float tpf) {<NEW_LINE>TempVars vars = TempVars.get();<NEW_LINE>Quaternion tmpRot1 = vars.quat1;<NEW_LINE>Quaternion[] tmpRot2 = new Quaternion[] { vars.quat2, new Quaternion() };<NEW_LINE>Iterator<String> it = ikTargets.keySet().iterator();<NEW_LINE>float distance;<NEW_LINE>Bone bone;<NEW_LINE>Str... | get(bone.getName()); |
568,371 | final GenerateCredentialReportResult executeGenerateCredentialReport(GenerateCredentialReportRequest generateCredentialReportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(generateCredentialReportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | endClientExecution(awsRequestMetrics, request, response); |
1,295,356 | public okhttp3.Call connectPostNodeProxyWithPathCall(String name, String path, String path2, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/nodes/{name}/proxy/{path}".replaceAll("\\{" + "name" ... | = new ArrayList<Pair>(); |
1,374,286 | public void marshall(StartCopyJobRequest startCopyJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startCopyJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(startCopyJobRequest.getReco... | startCopyJobRequest.getDestinationBackupVaultArn(), DESTINATIONBACKUPVAULTARN_BINDING); |
948,125 | public static IpV4Packet defragment(List<IpV4Packet> list) {<NEW_LINE>Collections.sort(list, comparator);<NEW_LINE>IpV4Header lastPacketHeader = list.get(list.size() - 1).getHeader();<NEW_LINE>int payloadLength = lastPacketHeader.getFragmentOffset() * 8 + lastPacketHeader.getTotalLengthAsInt() - lastPacketHeader.getIhl... | throw new IllegalArgumentException("Can't defragment: " + list); |
272,046 | public void execute(BaseRequest request, BaseResponse response) {<NEW_LINE>String connStr = request.getSingleParameter("connection_id");<NEW_LINE>if (connStr == null) {<NEW_LINE>response.getContent().append("not valid parameter");<NEW_LINE>sendResult(request, response, HttpResponseStatus.BAD_REQUEST);<NEW_LINE>return;<... | append("connection id " + connectionId + " not found."); |
1,078,640 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String proximityPlacementGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
462,338 | private static void addWindows(Multimap<WindowKey, RexOver> windowMap, RexOver over, final int inputFieldCount) {<NEW_LINE>final RexWindow aggWindow = over.getWindow();<NEW_LINE>// Look up or create a window.<NEW_LINE>RelCollation orderKeys = getCollation(Lists.newArrayList(Iterables.filter(aggWindow.orderKeys, new Pre... | windowMap.put(windowKey, over); |
375,934 | public void onDeleteNodes(ServiceRequest service) {<NEW_LINE>OpcUaServer server = service.attr(ServiceAttributes.SERVER_KEY).get();<NEW_LINE>Session session = service.attr(ServiceAttributes.SESSION_KEY).get();<NEW_LINE>DeleteNodesRequest request = (DeleteNodesRequest) service.getRequest();<NEW_LINE>List<DeleteNodesItem... | ), new DiagnosticInfo[0]); |
1,618,907 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>response.<MASK><NEW_LINE>String webName = null;<NEW_LINE>if (request.getUserPrincipal() != null) {<NEW_LINE>webName = request.getUserPrincipal().getName();<NEW_LINE>}<NEW_LINE>response.getWriter()... | getWriter().write("This is a public servlet \n"); |
670,087 | Object reconfigure(VirtualFrame frame, PTextIO self, Object encodingObj, Object errorsObj, Object newlineObj, Object lineBufferingObj, Object writeThroughObj, @Cached IONodes.ToStringNode toStringNode, @Cached PyObjectCallMethodObjArgs callMethod, @Cached PyObjectIsTrueNode isTrueNode, @Cached TextIOWrapperNodes.Change... | isTrueNode.execute(frame, lineBufferingObj); |
1,834,265 | public static void showShareLinkDialog(FileActivity activity, OCFile file, String link) {<NEW_LINE>// Create dialog to allow the user choose an app to send the link<NEW_LINE>Intent intentToShareLink = new Intent(Intent.ACTION_SEND);<NEW_LINE>intentToShareLink.putExtra(Intent.EXTRA_TEXT, link);<NEW_LINE>intentToShareLin... | getUsernameForAccount(activity.getAccount()); |
1,765,454 | public WebAnnotations adapt(Container rootContainer, OverlayContainer rootOverlayContainer, ArtifactContainer rootArtifactContainer, Container rootAdaptableContainer) throws UnableToAdaptException {<NEW_LINE><MASK><NEW_LINE>WebModuleInfo webModuleInfo = overlayGet(rootOverlayContainer, adaptPath, WebModuleInfo.class);<... | String adaptPath = rootArtifactContainer.getPath(); |
685,697 | private static Object evalNumeric(Number left, Number right, QueryDataTypeFamily family) {<NEW_LINE>try {<NEW_LINE>switch(family) {<NEW_LINE>case TINYINT:<NEW_LINE>return (byte) (left.byteValue() / right.longValue());<NEW_LINE>case SMALLINT:<NEW_LINE>return (short) (left.shortValue() / right.longValue());<NEW_LINE>case... | ((BigDecimal) right, DECIMAL_MATH_CONTEXT); |
450,629 | protected static KeyPair generateDHKeyPair(TransportHelper transport, boolean outbound) throws IOException {<NEW_LINE>if (dh_key_generator == null) {<NEW_LINE>throw (new IOException("Crypto not setup"));<NEW_LINE>}<NEW_LINE>synchronized (dh_key_generator) {<NEW_LINE>if (!outbound) {<NEW_LINE>InetSocketAddress is_addres... | + generate_bloom.getSize())); |
649,321 | private void allocateBufferMemory() {<NEW_LINE>_snappyIntegerDecompressed = ByteBuffer.allocateDirect(_uncompressedInt.capacity() * 2);<NEW_LINE>_zstdIntegerDecompressed = ByteBuffer.allocateDirect(<MASK><NEW_LINE>_snappyCompressedIntegerInput = ByteBuffer.allocateDirect(_uncompressedInt.capacity() * 2);<NEW_LINE>_zsta... | _uncompressedInt.capacity() * 2); |
883,243 | private TBParVec particleClosureBeta(final TBPar terms, final Vect<TBTriple> alphas, final Vect<TBTriple> betas) {<NEW_LINE>// try a beta expansion. See MP page 403<NEW_LINE>// figure 5.1. for beta expansion rules.<NEW_LINE>for (int i = 0; i < terms.size(); i++) {<NEW_LINE>LiveExprNode ln = terms.exprAt(i);<NEW_LINE>Li... | ) ln).getBody(0); |
1,431,017 | // @formatter:on<NEW_LINE>@Redirect(method = "neighborChanged", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;hasNeighborSignal(Lnet/minecraft/core/BlockPos;)Z"))<NEW_LINE>private boolean arclight$blockRedstone(Level world, BlockPos pos, BlockState state) {<NEW_LINE>boolean powered = world.hasNe... | CraftBlock.at(world, pos); |
1,679,017 | protected boolean importGraphTransferable(mxGraphComponent graphComponent, mxGraphTransferable gt) {<NEW_LINE>boolean result = false;<NEW_LINE>try {<NEW_LINE>mxGraph graph = graphComponent.getGraph();<NEW_LINE>double scale = graph.getView().getScale();<NEW_LINE><MASK><NEW_LINE>double dx = 0, dy = 0;<NEW_LINE>// Compute... | mxRectangle bounds = gt.getBounds(); |
398,450 | public void run(CommandResultsBuilder resultsBuilder) throws Exception {<NEW_LINE>CommandScope commandScope = resultsBuilder.getCommandScope();<NEW_LINE>Database database = commandScope.getArgumentValue(DATABASE_ARG);<NEW_LINE>SnapshotListener snapshotListener = commandScope.getArgumentValue(SNAPSHOT_LISTENER_ARG);<NEW... | resultsBuilder.addResult("snapshot", snapshot); |
351,990 | // collect root modules into TargetModule with timestamp<NEW_LINE>private TargetModuleID[] saveRootTargetModules(TargetModuleID[] modules) {<NEW_LINE>long timestamp = System.currentTimeMillis();<NEW_LINE>Set originals = new HashSet();<NEW_LINE>for (int i = 0; i < modules.length; i++) {<NEW_LINE>if (modules[i].getParent... | [originals.size()]); |
572,540 | public <T extends Entity> T selectById(Class<T> entityClass, String id, boolean useCache) {<NEW_LINE>T entity = null;<NEW_LINE>if (useCache) {<NEW_LINE>entity = entityCache.findInCache(entityClass, id);<NEW_LINE>if (entity != null) {<NEW_LINE>return entity;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String selectStatement = dbSqlS... | sqlSession.selectOne(selectStatement, id); |
1,443,185 | public NameEnvironmentAnswer findType(char[][] compoundTypeName) {<NEW_LINE>NameEnvironmentAnswer result = this.env.findType(compoundTypeName);<NEW_LINE>if (result != null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>if (CharOperation.equals(compoundTypeName, ROOT_COMPOUND_NAME)) {<NEW_LINE>IBinaryType binary = this.... | VariablesInfo installedVars = this.context.installedVars; |
757,292 | public int gainLife(int amount, Game game, Ability source) {<NEW_LINE>if (!canGainLife || amount <= 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>GameEvent event = new GameEvent(GameEvent.EventType.GAIN_LIFE, playerId, source, playerId, amount, false);<NEW_LINE>if (!game.replaceEvent(event)) {<NEW_LINE>// TODO: lock life... | , event.getAmount())); |
11,015 | public List<CardData> filter(List<CardData> videosList) {<NEW_LINE>// if the video blocker is disabled, then do not filter any videos<NEW_LINE>if (!isVideoBlockerEnabled()) {<NEW_LINE>return videosList;<NEW_LINE>}<NEW_LINE>List<CardData> filteredVideosList = new ArrayList<>();<NEW_LINE>final boolean isChannelBlacklistE... | .string.pref_key_preferred_languages), defaultPrefLanguages); |
1,645,352 | final UpdateRegistryResult executeUpdateRegistry(UpdateRegistryRequest updateRegistryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateRegistryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateRegistry"); |
1,303,518 | public void contextInitialized(final ServletContextEvent event) {<NEW_LINE>LOGGER.info("Initializing upgrade framework");<NEW_LINE>try {<NEW_LINE>final UpgradeMetaProcessor ump = new UpgradeMetaProcessor();<NEW_LINE>final VersionComparator currentVersion = ump.getSchemaVersion();<NEW_LINE>ump.close();<NEW_LINE>if (curr... | "An error occurred performing upgrade processing. " + e.getMessage()); |
140,358 | public void initializeExtendsBound(AnnotatedWildcardType wildcard) {<NEW_LINE>AnnotatedTypeFactory typeFactory = wildcard.atypeFactory;<NEW_LINE>WildcardType javaWildcardType = wildcard.getUnderlyingType();<NEW_LINE>TypeMirror javaExtendsBound;<NEW_LINE>if (javaWildcardType.getExtendsBound() != null) {<NEW_LINE>javaExt... | wildcard.getUnderlyingType(), wildcard); |
557,240 | public PartitionSpec apply() {<NEW_LINE>PartitionSpec.Builder builder = PartitionSpec.builderFor(schema);<NEW_LINE>for (PartitionField field : spec.fields()) {<NEW_LINE>if (!deletes.contains(field.fieldId())) {<NEW_LINE>String newName = renames.get(field.name());<NEW_LINE>if (newName != null) {<NEW_LINE>builder.add(fie... | ), Transforms.alwaysNull()); |
135,864 | public void retryLastRequest() {<NEW_LINE>checkStateNotNull(lastRequest);<NEW_LINE>Multimap<String, String> headersMultiMap = lastRequest.headers.asMultiMap();<NEW_LINE>Map<String, String> <MASK><NEW_LINE>for (String headerName : headersMultiMap.keySet()) {<NEW_LINE>if (headerName.equals(RtspHeaders.CSEQ) || headerName... | lastRequestHeaders = new HashMap<>(); |
47,255 | protected Object doInBackground() throws Exception {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.INFO, "Starting background processing for file search by MD5 hash.");<NEW_LINE>// Setup progress bar<NEW_LINE>final String displayName = NbBundle.getMessage(this.getClass(), "HashDbSearchThread.name.searching");<NEW_LINE>... | findFilesBymd5(hashes, progress, this); |
1,526,565 | public int encode(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) throws IOException {<NEW_LINE>int inPos = inOff;<NEW_LINE><MASK><NEW_LINE>int outPos = outOff;<NEW_LINE>while (inPos < inEnd) {<NEW_LINE>encodeBlock(inBuf, inPos, outBuf, outPos);<NEW_LINE>inPos += 5;<NEW_LINE>outPos += 8;<NEW_LINE>}<NEW_L... | int inEnd = inOff + inLen - 4; |
23,308 | public static void main(String[] args) {<NEW_LINE>System.out.println("---------------------------------- \n" + "Welcome to Basic Calculator \n" + "----------------------------------");<NEW_LINE>System.out.println("Following operations are supported : \n" + "1. Addition (+) \n" + "2. Subtraction (-) \n" + "3. Multiplica... | = new Scanner(System.in); |
741,150 | protected void renderIcon(@NonNull QMUIBottomSheetGridItemModel model, @NonNull QMUISkinValueBuilder builder) {<NEW_LINE>if (model.imageSkinSrcAttr != 0) {<NEW_LINE>builder.src(model.imageSkinSrcAttr);<NEW_LINE>QMUISkinHelper.setSkinValue(mIconIv, builder);<NEW_LINE>Drawable drawable = QMUISkinHelper.getSkinDrawable(mI... | QMUISkinHelper.setSkinValue(mIconIv, builder); |
975,040 | public Item[] split(final LocalDate splitDate) {<NEW_LINE>// Relax this pre-condition to allow splitting from 'merge' phase as well.<NEW_LINE>// Preconditions.checkState(action == ItemAction.ADD);<NEW_LINE>Preconditions.checkState(currentRepairedAmount.compareTo(BigDecimal.ZERO) == 0);<NEW_LINE>Preconditions.checkState... | splitDate, this.endDate, amount1); |
697,656 | @Override<NEW_LINE>protected Component createLayout(PropertyBuilder propertyBuilder, @Nonnull Disposable uiDisposable) {<NEW_LINE><MASK><NEW_LINE>CodeFoldingSettings settings = CodeFoldingSettings.getInstance();<NEW_LINE>CheckBox fileHeaderBox = CheckBox.create(ApplicationLocalize.checkboxCollapseFileHeader());<NEW_LIN... | VerticalLayout verticalLayout = VerticalLayout.create(); |
1,677,903 | private OAuth2AuthenticatedPrincipal convertClaimsSet(TokenIntrospectionSuccessResponse response) {<NEW_LINE>Map<String, Object> claims = response.toJSONObject();<NEW_LINE>Collection<GrantedAuthority> authorities = new ArrayList<>();<NEW_LINE>if (response.getAudience() != null) {<NEW_LINE>List<String> audiences = new A... | return new OAuth2IntrospectionAuthenticatedPrincipal(claims, authorities); |
1,579,214 | public void unsubscribe(URL url, NotifyListener listener) {<NEW_LINE>super.unsubscribe(url, listener);<NEW_LINE>removeFailedSubscribed(url, listener);<NEW_LINE>try {<NEW_LINE>// Sending a canceling subscription request to the server side<NEW_LINE>doUnsubscribe(url, listener);<NEW_LINE>} catch (Exception e) {<NEW_LINE>T... | t.getMessage(), t); |
1,608,952 | private static double apply(CompLongFloatVector v1, LongFloatVector v2) {<NEW_LINE>double dotValue = 0.0;<NEW_LINE>if (v2.isSparse() && v1.size() > v2.size()) {<NEW_LINE>ObjectIterator<Long2FloatMap.Entry> iter = v2.getStorage().entryIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Long2FloatMap.Entry entry = ite... | ] * v2.get(idx); |
1,013,778 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>// use default library if unset<NEW_LINE>if (StringUtils.isEmpty(library)) {<NEW_LINE>setLibrary(DEFAULT_MSF4J_LIBRARY);<NEW_LINE>}<NEW_LINE>if (additionalProperties.containsKey(CodegenConstants.IMPL_FOLDER)) {<NEW_LINE>implFolder = (String) additionalP... | ".", "/"), "ApiException.java")); |
1,604,684 | final ListCACertificatesResult executeListCACertificates(ListCACertificatesRequest listCACertificatesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCACertificatesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | invoke(request, responseHandler, executionContext); |
724,424 | public String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay) {<NEW_LINE>String name = getJobName();<NEW_LINE>// Store reference to applications job and service<NEW_LINE>JobDataMap jobData = new JobDataMap();<NEW_LINE>jobData.<MASK><NEW_LINE>jobData.put(QuartzSchedulingServiceJob.SCHEDULED_JOB, jo... | put(QuartzSchedulingServiceJob.SCHEDULING_SERVICE, this); |
1,515,429 | public Pair<UUID, Long> readUUIDAndVersion() throws NoPersistedMetaDataException {<NEW_LINE>KeyspaceMetadata ksm = Schema.instance.getKSMetaData(this.elasticAdminKeyspaceName);<NEW_LINE>if (ksm == null)<NEW_LINE>return null;<NEW_LINE>CFMetaData <MASK><NEW_LINE>if (cfm != null && cfm.params.extensions != null && cfm.par... | cfm = ksm.getTableOrViewNullable(ELASTIC_ADMIN_METADATA_TABLE); |
834,579 | public SaleOrderLine updateProductQty(SaleOrderLine saleOrderLine, SaleOrder saleOrder, BigDecimal oldQty, BigDecimal newQty) throws AxelorException {<NEW_LINE>BigDecimal qty = saleOrderLine.getQty();<NEW_LINE>qty = qty.divide(oldQty, appBaseService.getNbDecimalDigitForQty(), RoundingMode.HALF_EVEN).multiply(newQty).se... | .ZERO.max(qty)); |
1,664,547 | protected void formBackingObject(@RequestParam(value = "scanNow", required = false) String scanNow, @RequestParam(value = "expunge", required = false) String expunge, Model model) {<NEW_LINE>MusicFolderSettingsCommand command = new MusicFolderSettingsCommand();<NEW_LINE>if (scanNow != null) {<NEW_LINE>mediaFolderServic... | ) : settingsService.getClearFullScanSettingAfterScan()); |
729,683 | public static Rule compose(JvmTarget target, RuleType ruleType) {<NEW_LINE>List<String> deps = ImmutableList.<String>builder().add(":" + src(target)).addAll(external(target.getExternalDeps(SourceSetType.TEST))).addAll(targets(target.getTargetDeps(SourceSetType.TEST))).build();<NEW_LINE>Set<String> aptDeps = ImmutableSe... | TEST))).build(); |
1,625,081 | private Query analyzeMultiBoolean(String field, TokenStream stream, BooleanClause.Occur operator, boolean isPrefix) throws IOException {<NEW_LINE>BooleanQuery.Builder q = newBooleanQuery();<NEW_LINE>List<Term> currentQuery = new ArrayList<>();<NEW_LINE>TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRe... | stream.getAttribute(PositionIncrementAttribute.class); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.