idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
712,508 | public ViewHolderShareContacts onCreateViewHolder(ViewGroup parent, int viewType) {<NEW_LINE>LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);<NEW_LINE>Display display = ((Activity) mContext).getWindowManager().getDefaultDisplay();<NEW_LINE>DisplayMetrics outMetrics ... | findViewById(R.id.verified_icon); |
1,267,161 | private void handleFcmp(int opcode) {<NEW_LINE>Item it = pop();<NEW_LINE>Item it2 = pop();<NEW_LINE>if ((it.getConstant() != null) && it2.getConstant() != null) {<NEW_LINE>float f = constantToFloat(it);<NEW_LINE>float f2 = constantToFloat(it2);<NEW_LINE>if (Float.isNaN(f) || Float.isNaN(f2)) {<NEW_LINE>if (opcode == FC... | Integer.valueOf(0))); |
1,381,709 | private String buildTestRunProperties(ScriptLocation script, AbstractLanguageHandler handler, Properties systemProperty, GrinderProperties properties) {<NEW_LINE>PropertyBuilder builder = new PropertyBuilder(properties, script.getDirectory(), isSecurityEnabled(properties), properties.getProperty(GRINDER_PROP_SECURITY_L... | String jvmArguments = builder.buildJVMArgument(); |
340,421 | private Position decodeObd(Channel channel, SocketAddress remoteAddress, String sentence) {<NEW_LINE>Parser parser = new Parser(PATTERN_OBD, sentence);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());<NEW_L... | KEY_THROTTLE, parser.next()); |
922,250 | public static Object create(Node node, Frame frame) {<NEW_LINE>RootNode root = node.getRootNode();<NEW_LINE>PythonLocalScope localScope = <MASK><NEW_LINE>Object[] scopes;<NEW_LINE>if (frame != null) {<NEW_LINE>PythonObject globals = PArguments.getGlobalsSafe(frame);<NEW_LINE>Frame generatorFrame = PArguments.getGenerat... | PythonLocalScope.createLocalScope(root, frame); |
829,652 | private boolean makeFileUploadRequest(Log log, String action, String target) throws DaemonException {<NEW_LINE>try {<NEW_LINE>// Initialise the HTTP client<NEW_LINE>initialise();<NEW_LINE>// Make request<NEW_LINE>HttpPost httppost = new HttpPost(buildWebUIUrl(RPC_URL_DISPATCH + action + RPC_URL_DISPATCH2 + RPC_URL_AID)... | ConnectionError, e.toString()); |
1,618,174 | BLangStatementExpression desugar(BLangQueryAction queryAction, SymbolEnv env) {<NEW_LINE>containsCheckExpr = false;<NEW_LINE>HashSet<BType> prevCheckedErrorList = this.checkedErrorList;<NEW_LINE>this.checkedErrorList = new HashSet<>();<NEW_LINE>List<BLangNode<MASK><NEW_LINE>Location pos = clauses.get(0).pos;<NEW_LINE>B... | > clauses = queryAction.getQueryClauses(); |
1,228,815 | public void takePicture(final Rect previewRect) {<NEW_LINE>if (!camera.isPresent() || camera.get().getParameters() == null) {<NEW_LINE>Log.w(TAG, "camera not in capture-ready state");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>camera.get().setOneShotPreviewCallback(new Camera.PreviewCallback() {<NEW_LINE><NEW_LINE>@Override<... | width + "x" + previewSize.height); |
1,136,159 | private void onConfigExport() {<NEW_LINE>FileDialog dialog = new FileDialog(getControl().getShell(), SWT.SAVE);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String proposal = TextUtil.sanitizeFilename(<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>dialog.setFileName(proposal + ".json");<NEW_LINE>dialog.setOverwrite(true);<NEW_LINE>String... | currentConfigLabel != null ? currentConfigLabel : "csv-config"); |
1,761,579 | public void postConstruct() {<NEW_LINE>ejbContainer = serverConfig.getExtensionByType(EjbContainer.class);<NEW_LINE>ClassLoader ejbImplClassLoader = EjbContainerUtilImpl.class.getClassLoader();<NEW_LINE>if (callFlowAgent == null) {<NEW_LINE>callFlowAgent = (Agent) Proxy.newProxyInstance(ejbImplClassLoader, new Class[] ... | new Timer("EJB Container Timer", true)); |
69,076 | public PlanFragment visitPhysicalHudiScan(OptExpression optExpression, ExecPlan context) {<NEW_LINE>PhysicalHudiScanOperator node = (PhysicalHudiScanOperator) optExpression.getOp();<NEW_LINE>ScanOperatorPredicates predicates = node.getScanOperatorPredicates();<NEW_LINE>Table referenceTable = node.getTable();<NEW_LINE>c... | getScanNodes().add(hudiScanNode); |
1,092,903 | // updateStep<NEW_LINE>@POST<NEW_LINE>@Path("/steps")<NEW_LINE>@JSONP<NEW_LINE>@NoCache<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>public final Response addStep(@Context final HttpServletRequest request, @Context final HttpServletResponse response, final WorkflowStepAddForm ne... | (step)).build(); |
1,074,660 | private String generateFieldSupplierErrorMessage(Callable<T> supplier) {<NEW_LINE>final FieldSupplierBuilder fieldSupplier = WhiteboxImpl.getInternalState(supplier, "this$0");<NEW_LINE>final Class<? extends Annotation> expectedAnnotation = fieldSupplier.getExpectedAnnotation();<NEW_LINE>final String expectedFieldName =... | > expectedFieldType = fieldSupplier.getExpectedFieldType(); |
148,619 | private static void simulateLookUpBufferAddress(LevelZeroContext context, LevelZeroDevice device) {<NEW_LINE>LevelZeroCommandQueue commandQueue = LevelZeroUtils.createCommandQueue(device, context);<NEW_LINE>LevelZeroCommandList commandList = LevelZeroUtils.createCommandList(device, context, commandQueue.getCommandQueue... | device, context, "copyTest", "/tmp/example.spv"); |
116,962 | protected void initListeners() {<NEW_LINE>super.initListeners();<NEW_LINE><MASK><NEW_LINE>binding.detailTitleRootLayout.setOnLongClickListener(this);<NEW_LINE>binding.detailUploaderRootLayout.setOnClickListener(this);<NEW_LINE>binding.detailUploaderRootLayout.setOnLongClickListener(this);<NEW_LINE>binding.detailThumbna... | binding.detailTitleRootLayout.setOnClickListener(this); |
506,131 | public void randomDisplayTick(@Nonnull IBlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull Random rand) {<NEW_LINE>if (rand.nextFloat() < .5f) {<NEW_LINE>final EnumFacing face = NNList.FACING.get(rand.nextInt(NNList.FACING.size()));<NEW_LINE>final BlockPos neighborPos = pos.offset(face);<NEW_LINE... | ) < 0 ? -0.05 : 1.05; |
421,936 | protected void fillCoolBar(ICoolBarManager coolBarManager) {<NEW_LINE>IToolBarManager toolBarFile = new ToolBarManager(SWT.FLAT);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>coolBarManager.add(new ToolBarContributionItem(toolBarFile, "toolbar_file"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>toolBarFile.add(new GroupMarker("start"));<NEW... | add(new GroupMarker("append")); |
872,620 | public static final CompactJobInfo toCompactJobInfo(final MantisJobMetadataView view) {<NEW_LINE>MantisJobMetadata jm = view.getJobMetadata();<NEW_LINE>int workers = 0;<NEW_LINE>double totCPUs = 0.0;<NEW_LINE>double totMem = 0.0;<NEW_LINE>Map<String, Integer> stSmry = new HashMap<>();<NEW_LINE>for (MantisStageMetadata ... | w.getState() + ""); |
1,352,914 | // **********************************************************************<NEW_LINE>// Annotation values: other methods (e.g., testing and transforming)<NEW_LINE>// **********************************************************************<NEW_LINE>@EqualsMethod<NEW_LINE>public static boolean sameElementValues(AnnotationMir... | > vals1 = am1.getElementValues(); |
1,774,310 | public void handleOutboundSuback(@NotNull final ChannelHandlerContext ctx, @NotNull final SUBACK suback, @NotNull final ChannelPromise promise) {<NEW_LINE>final Channel channel = ctx.channel();<NEW_LINE>final ClientConnection clientConnection = channel.attr(ChannelAttributes.CLIENT_CONNECTION).get();<NEW_LINE>final Str... | ctx.write(suback, promise); |
834,124 | private void addDependent(Entry entry, DataType subType) {<NEW_LINE>// subtype might be null, but don't expect entry to be null, but error?<NEW_LINE>if ((entry == null) || (subType == null)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (subType instanceof BitFieldDataType) {<NEW_LINE>subType = ((BitFieldDataType) subType)... | support = new HashSet<>(); |
1,691,487 | public long nextId(String prefixName, FrontendService frontendService) throws SQLNonTransientException {<NEW_LINE>// System.out.println(instanceId);<NEW_LINE>while (!ready) {<NEW_LINE>try {<NEW_LINE>Thread.sleep(50);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>LOGGER.info("Unexpected thread interruption!");<NE... | long time = System.currentTimeMillis(); |
297,552 | public static void main(String[] args) {<NEW_LINE>Exercise35_RandomQueue exercise35_randomQueue = new Exercise35_RandomQueue();<NEW_LINE>RandomQueue<Card> randomQueue = <MASK><NEW_LINE>fillQueueWithBridgeHandsCards(randomQueue);<NEW_LINE>for (int i = 0; i < 2; i++) {<NEW_LINE>int count = 0;<NEW_LINE>StdOut.println("Han... | exercise35_randomQueue.new RandomQueue<>(); |
1,542,930 | protected void replaceText(final JTextComponent component, final String text, final int offset, final int len) {<NEW_LINE>final BaseDocument doc = (BaseDocument) component.getDocument();<NEW_LINE>doc.runAtomic(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>// we canno... | () - text.length(); |
816,678 | private File chooseFile() {<NEW_LINE>FileDialog dialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);<NEW_LINE>dialog.setText(Messages.ExportAsImagePage_7);<NEW_LINE>File file = new File(fFileTextField.getText());<NEW_LINE>dialog.setFileName(file.getName());<NEW_LINE>// Set filter extensions accordi... | += ";*." + iter.next(); |
860,240 | private void pretifyJson(String pathToJson) throws ReportException {<NEW_LINE>LOGGER.debug("pretify json: {}", pathToJson);<NEW_LINE>final String outputPath = pathToJson + ".pretty";<NEW_LINE>final <MASK><NEW_LINE>final File out = new File(outputPath);<NEW_LINE>final JsonFactory factory = new JsonFactory();<NEW_LINE>tr... | File in = new File(pathToJson); |
1,021,398 | protected void removeDownload(final Download download, final boolean remove_data) {<NEW_LINE>monitored_downloads.remove(download);<NEW_LINE>if (download.getState() == Download.ST_STOPPED) {<NEW_LINE>try {<NEW_LINE>download.remove(false, remove_data);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>log.logAlert("Automatic rem... | LT_INFORMATION, "download state changed to '" + new_state + "'"); |
460,207 | public AnnotationExtractRule create(Env env, Map<String, Object> attributes) {<NEW_LINE>AnnotationExtractRule r = super.create(env, attributes);<NEW_LINE>if (r.annotationField == null) {<NEW_LINE>r.annotationField = r.tokensAnnotationField;<NEW_LINE>}<NEW_LINE>if (r.ruleType == null) {<NEW_LINE>r.ruleType = TOKEN_PATTE... | env, expr, action, result); |
1,692,333 | private static SequenceQuery<AbstractInsnNode> countingLoopWithoutWriteConditionAtEnd() {<NEW_LINE>final Slot<Integer> counterVariable = Slot.create(Integer.class);<NEW_LINE>final Slot<LabelNode> loopStart = Slot.create(LabelNode.class);<NEW_LINE>final Slot<LabelNode> loopEnd = <MASK><NEW_LINE>return // is it really im... | Slot.create(LabelNode.class); |
501,050 | private int parsePackageTable(ResTable_Package packageTable, byte[] data, int offset) throws IOException {<NEW_LINE>packageTable.id = readUInt32(data, offset);<NEW_LINE>offset += 4;<NEW_LINE>// Read the package name, zero-terminated string<NEW_LINE>StringBuilder bld = new StringBuilder();<NEW_LINE>for (int i = 0; i < 1... | lastPublicKey = readUInt32(data, offset); |
345,722 | static Tuple<SortedMap<String, Object>, SortedMap<String, FieldStats>> guessMappingsAndCalculateFieldStats(List<String> explanation, List<Map<String, ?>> sampleRecords, TimeoutChecker timeoutChecker) {<NEW_LINE>SortedMap<String, Object> mappings = new TreeMap<>();<NEW_LINE>SortedMap<String, FieldStats> fieldStats = new... | explanation, fieldName, fieldValues, timeoutChecker); |
412,617 | protected Object encodeParameterValue(ICommandParameter parameter, IDeviceCommandInvocation invocation) throws SiteWhereException {<NEW_LINE>String value = invocation.getParameterValues().get(parameter.getName());<NEW_LINE>try {<NEW_LINE>switch(parameter.getType()) {<NEW_LINE>case String:<NEW_LINE>{<NEW_LINE>return val... | throw new SiteWhereException("Error converting command parameter.", e); |
1,097,589 | protected void convertElementToJson(ObjectNode elementNode, ObjectNode propertiesNode, ActivityProcessor processor, BaseElement baseElement, CmmnModel cmmnModel, CmmnJsonConverterContext converterContext) {<NEW_LINE>DecisionTask decisionTask = (DecisionTask) ((PlanItem) baseElement).getPlanItemDefinition();<NEW_LINE>if... | propertiesNode.set(PROPERTY_DECISIONTABLE_REFERENCE, decisionReferenceNode); |
402,792 | private static Map<String, double[]> loadEmbeddingsFromFile(String filename) throws IOException {<NEW_LINE>Map<String, double[]> embeddings = new HashMap<>();<NEW_LINE>BufferedReader br = new BufferedReader(new FileReader(filename));<NEW_LINE>int readLines = 0;<NEW_LINE>String line = br.readLine();<NEW_LINE>while ((lin... | info("Read " + readLines + " lines"); |
285,310 | public void computeModuleUpdates(IClasspathEntry entry) throws JavaModelException {<NEW_LINE>for (IClasspathAttribute attribute : entry.getExtraAttributes()) {<NEW_LINE>String attributeName = attribute.getName();<NEW_LINE>// the attributes considered here may have multiple values separated by ':'<NEW_LINE>String values... | slash = value.indexOf('/'); |
607,161 | public Map<Sha256Hash, Long> lookupStreamIdsByHash(Transaction t, final Set<Sha256Hash> hashes) {<NEW_LINE>if (hashes.isEmpty()) {<NEW_LINE>return ImmutableMap.of();<NEW_LINE>}<NEW_LINE>SnapshotsStreamHashAidxTable idx = tables.getSnapshotsStreamHashAidxTable(t);<NEW_LINE>Set<SnapshotsStreamHashAidxTable.SnapshotsStrea... | ret = new HashMap<>(); |
831,473 | private static Bitmap blur(Bitmap bitmap, Context context, float blurRadius) {<NEW_LINE>Point previewSize = scaleKeepingAspectRatio(new Point(bitmap.getWidth(), bitmap.getHeight()), PREVIEW_DIMENSION_LIMIT);<NEW_LINE>Point blurSize = scaleKeepingAspectRatio(new Point(previewSize.x / 2, previewSize.y / 2), MAX_BLUR_DIME... | ), small.getConfig()); |
331,873 | public static void main(String[] args) {<NEW_LINE>final String USAGE = "\n" + "Usage: " + " <bucket> <video> <topicArn> <roleArn>\n\n" + "Where:\n" + " bucket - the name of the bucket in which the video is located (for example, (for example, myBucket). \n\n" + " video - the name of video (for example, people.mp4)... | region(region).build(); |
354,431 | final GetAppResult executeGetApp(GetAppRequest getAppRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAppRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<Get... | false), new GetAppResultJsonUnmarshaller()); |
162,952 | public static DescribeDcdnDomainLogResponse unmarshall(DescribeDcdnDomainLogResponse describeDcdnDomainLogResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnDomainLogResponse.setRequestId(_ctx.stringValue("DescribeDcdnDomainLogResponse.RequestId"));<NEW_LINE>describeDcdnDomainLogResponse.setDomainName<MASK><NEW... | (_ctx.stringValue("DescribeDcdnDomainLogResponse.DomainName")); |
1,682,133 | public PlatformToolProvider select(NativeLanguage sourceLanguage, NativePlatformInternal targetMachine) {<NEW_LINE>PlatformToolProvider toolProvider = getProviderForPlatform(targetMachine);<NEW_LINE>switch(sourceLanguage) {<NEW_LINE>case CPP:<NEW_LINE>if (toolProvider instanceof UnsupportedPlatformToolProvider) {<NEW_L... | toolProvider.locateTool(ToolType.CPP_COMPILER); |
1,317,417 | public void drawScreen(int par1, int par2, float par3) {<NEW_LINE>drawDefaultBackground();<NEW_LINE>int scale = fontRenderer.getUnicodeFlag() ? 1 : 2;<NEW_LINE>for (EnumFacing dir : EnumFacing.VALUES) {<NEW_LINE>if (stacks.containsKey(dir)) {<NEW_LINE>ItemStack stack = stacks.get(dir);<NEW_LINE><MASK><NEW_LINE>int text... | String blockName = stack.getDisplayName(); |
1,817,425 | public void handleToken(String token) throws UserIdentityException {<NEW_LINE>System.out.println("token is : " + token.toString());<NEW_LINE>JSONObject jobj = null;<NEW_LINE>try {<NEW_LINE>jobj = JSONObject.parse(token);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new UserIdentityException("cannot parse the token s... | = new ArrayList<String>(); |
1,827,249 | private void showInfoAfterWebAuthnApiCreate(RegistrationData response) {<NEW_LINE>AttestedCredentialData attestedCredentialData = response.getAttestationObject().getAuthenticatorData().getAttestedCredentialData();<NEW_LINE>AttestationStatement attestationStatement = response.getAttestationObject().getAttestationStateme... | "attestation format = {0}", attestationStatement.getFormat()); |
1,046,032 | public void marshall(ConnectorMetadata connectorMetadata, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (connectorMetadata == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(connectorMetadata.getAmplitude(),... | connectorMetadata.getServiceNow(), SERVICENOW_BINDING); |
699,559 | /*<NEW_LINE>* Called by webcontainer to do session cleanup, once per webapp per request.<NEW_LINE>* If multiple apps are involved due to forwards/includes, multiple<NEW_LINE>* sessionPostInvoke<NEW_LINE>* calls are all made at then end of the request. We do NOT call<NEW_LINE>* sessionPostInvoke<NEW_LINE>* immediately w... | (methodClassName, methodNames[SESSION_POST_INVOKE]); |
622,680 | public List<User> listUser(Org org) throws Exception {<NEW_LINE>String address = Config.zhengwuDingding().getOapiAddress() + "/org/member/get?access_token=" + this.accessToken + "&orgNumber=" + org.getOrgNumber();<NEW_LINE>UserListResp resp = HttpConnection.getAsObject(address, null, UserListResp.class);<NEW_LINE>if (r... | os = new ArrayList<>(); |
516,991 | private Result clusterOperate(List<RedisNode> redisNodeList, ClusterHandler clusterHandler) {<NEW_LINE>if (!verifyRedisNodeList(redisNodeList)) {<NEW_LINE>return Result.failResult();<NEW_LINE>}<NEW_LINE>Integer clusterId = redisNodeList.get(0).getClusterId();<NEW_LINE>Cluster cluster = getCluster(clusterId);<NEW_LINE>S... | logger.error("Operation failed.", e); |
983,055 | private void stochasticEnsure(double[] x, double[] v, int batchSize) {<NEW_LINE>if (lastXBatch == null) {<NEW_LINE>lastXBatch = new double[domainDimension()];<NEW_LINE>log.info("Setting previous position (x).");<NEW_LINE>}<NEW_LINE>if (lastVBatch == null) {<NEW_LINE>lastVBatch = new double[domainDimension()];<NEW_LINE>... | lastBatch, 0, thisBatch.length); |
684,105 | public Type merge(Type other, Scene cm) {<NEW_LINE>if (UnknownType.v().equals(other) || this.equals(other)) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (!(other instanceof RefType)) {<NEW_LINE>throw new RuntimeException("illegal type merge: " + this + " and " + other);<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// Return least ... | ? sc.getSuperclass() : javalangObject; |
640,512 | public List<MethodBinding> checkAndAddSyntheticRecordOverrideMethods(MethodBinding[] methodBindings, List<MethodBinding> implicitMethods) {<NEW_LINE>if (!hasMethodWithNumArgs(TypeConstants.TOSTRING, 0)) {<NEW_LINE>MethodBinding m = addSyntheticRecordOverrideMethod(TypeConstants.TOSTRING, implicitMethods.size());<NEW_LI... | HASHCODE, implicitMethods.size()); |
1,554,320 | private void handleFailingChecks(DomainRouterVO router, List<String> failingChecks) {<NEW_LINE>if (failingChecks == null || failingChecks.size() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String alertMessage = String.format("Health checks failed: %d failing checks on router %s / %s", failingChecks.size(), router.getN... | getPodIdToDeployIn(), alertMessage, alertMessage); |
1,804,606 | protected StructureElement parseStructureElement(JsonObject object, boolean parsingMethods) throws CommonException {<NEW_LINE>String name = helper.getString(object, "name");<NEW_LINE>String posString = helper.getString(object, "pos");<NEW_LINE>SourceFileLocation elementSourceFileLoc = SourceFileLocation.parseSourceRang... | ElementAttributes elementAttributes = new ElementAttributes(protection); |
500,469 | final QueryResult executeQuery(QueryRequest queryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(queryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<QueryReq... | addHandlerContext(HandlerContextKey.SERVICE_ID, "kendra"); |
1,377,869 | private static double scaleAndRegularize(Map<String, SimpleMatrix> derivatives, Map<String, SimpleMatrix> currentMatrices, double scale, double regCost, boolean activeMatricesOnly, boolean dropBiasColumn) {<NEW_LINE>// the regularization cost<NEW_LINE>double cost = 0.0;<NEW_LINE>for (Map.Entry<String, SimpleMatrix> ent... | entry.getKey(), D); |
1,229,172 | public void marshall(Ec2InstanceAttributes ec2InstanceAttributes, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (ec2InstanceAttributes == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(ec2InstanceAttributes... | e.getMessage(), e); |
1,249,733 | private void checkForPrice(final I_C_OLCand olCand, final ProductId packingMaterialProductId) {<NEW_LINE>final PricingSystemId pricingSystemId = PricingSystemId.ofRepoIdOrNull(olCand.getM_PricingSystem_ID());<NEW_LINE>final IOLCandEffectiveValuesBL olCandEffectiveValuesBL = Services.get(IOLCandEffectiveValuesBL.class);... | Services.get(IPricingBL.class); |
1,521,849 | public ClassReader readClass(InputStream stream, String name) throws IOException {<NEW_LINE>VarDataInput input = new VarDataInput(stream);<NEW_LINE>CachedClassReader cls = new CachedClassReader();<NEW_LINE>cls.name = name;<NEW_LINE>cls.level = accessLevels[input.readUnsigned()];<NEW_LINE>cls.modifiers = unpackModifiers... | (ownerIndex - 1)) : null; |
1,380,774 | public byte[] marshall(CreateUdfApplicationRequest request) {<NEW_LINE>StringBuffer xmlBody = new StringBuffer();<NEW_LINE>UdfApplicationConfiguration config = request.getUdfApplicationConfiguration();<NEW_LINE>xmlBody.append("<CreateUDFApplicationConfiguration>");<NEW_LINE>xmlBody.append("<ImageVersion>" + config.getI... | e.getMessage(), e); |
1,675,753 | private static ServerGroup parseStatus(String json) {<NEW_LINE>Slime slime = SlimeUtils.jsonToSlime(json);<NEW_LINE>Cursor root = slime.get();<NEW_LINE>List<ServerGroup.Server> servers = new ArrayList<>();<NEW_LINE>Cursor serversObject = root.field("servers");<NEW_LINE>Cursor <MASK><NEW_LINE>// TODO(mpolden): Remove af... | streamArray = serversObject.field("stream"); |
1,366,430 | public static void appendStackTraceStats(final File rootPath, final StringBuilder buffer, final List<Map<Thread, StackTraceElement[]>> stackTraces, final boolean plain) {<NEW_LINE>// collect single dumps<NEW_LINE>final Map<String, Integer> dumps = new HashMap<String, Integer>();<NEW_LINE>ThreadDump x;<NEW_LINE>for (fin... | bufferappend(buffer, plain, " "); |
991,024 | private void firePostInvocation(HttpServletResponse httpResponse, Packet pipeResponse, Packet pipeRequest, JAXWSEndpointImpl endpointTracer, SOAPMessageContextImpl soapMessageContext) {<NEW_LINE>if (seiModel instanceof SOAPSEIModel) {<NEW_LINE>SOAPSEIModel soapSEIModel = (SOAPSEIModel) seiModel;<NEW_LINE>Globals.get(Mo... | messageTraceId, new HttpResponseInfoImpl(httpResponse)); |
1,789,506 | public RestartRequirement onApply(UserPrefs rPrefs) {<NEW_LINE>RestartRequirement restartRequirement = super.onApply(rPrefs);<NEW_LINE>if (dirty_) {<NEW_LINE>JsArrayString panes = JsArrayString<MASK><NEW_LINE>panes.push(leftTop_.getValue(leftTop_.getSelectedIndex()));<NEW_LINE>panes.push(leftBottom_.getValue(leftBottom... | .createArray().cast(); |
476,055 | public static ListRecycleBinJobsResponse unmarshall(ListRecycleBinJobsResponse listRecycleBinJobsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listRecycleBinJobsResponse.setRequestId(_ctx.stringValue("ListRecycleBinJobsResponse.RequestId"));<NEW_LINE>listRecycleBinJobsResponse.setTotalCount(_ctx.longValue("ListRecycle... | ("ListRecycleBinJobsResponse.Jobs[" + i + "].Status")); |
1,796,792 | public static DescribeDcdnDomainHttpCodeDataResponse unmarshall(DescribeDcdnDomainHttpCodeDataResponse describeDcdnDomainHttpCodeDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnDomainHttpCodeDataResponse.setRequestId(_ctx.stringValue("DescribeDcdnDomainHttpCodeDataResponse.RequestId"));<NEW_LINE>describe... | + "].HttpCodeDataPerInterval[" + j + "].Code")); |
1,003,483 | private static String readLineOptimized(ByteBuf undecodedChunk, Charset charset) {<NEW_LINE>int readerIndex = undecodedChunk.readerIndex();<NEW_LINE>ByteBuf line = null;<NEW_LINE>try {<NEW_LINE>if (undecodedChunk.isReadable()) {<NEW_LINE>int posLfOrCrLf = HttpPostBodyUtil.findLineBreak(<MASK><NEW_LINE>if (posLfOrCrLf <... | undecodedChunk, undecodedChunk.readerIndex()); |
1,233,152 | public void writeIndicesOptions(StreamOutput out) throws IOException {<NEW_LINE>EnumSet<Option> options = this.options;<NEW_LINE>// never write this out to a pre7.0 version<NEW_LINE>if (out.getVersion().before(Version.V_6_6_0) && options.contains(Option.IGNORE_THROTTLED)) {<NEW_LINE><MASK><NEW_LINE>options.remove(Optio... | options = EnumSet.copyOf(options); |
37,386 | public static List<LineParametric2D_F32> pruneSimilarLines(List<LineParametric2D_F32> lines, float[] intensity, float toleranceAngle, float toleranceDist, int imgWidth, int imgHeight) {<NEW_LINE>int[] indexSort = new int[intensity.length];<NEW_LINE>QuickSort_F32 sort = new QuickSort_F32();<NEW_LINE>sort.sort(intensity,... | intersection(a, b, null); |
1,763,319 | private OperatorNode<ExpressionOperator> readConjOrOp(ExpressionOperator op, Logical_OR_expressionContext node, Scope scope) {<NEW_LINE>List<Logical_AND_expressionContext> andExpressionList = node.logical_AND_expression();<NEW_LINE>List<OperatorNode<ExpressionOperator>> arguments = Lists.newArrayListWithExpectedSize(an... | > equalities = child.equality_expression(); |
1,154,856 | public static SubscriptionInfo fromSubscription(Subscription subscription) {<NEW_LINE>SubscriptionInfo subscriptionInfo = new SubscriptionInfo();<NEW_LINE>subscriptionInfo.setInterfaceType(subscription.getInterfaceType());<NEW_LINE>subscriptionInfo.setNotifiedEventCount(subscription.getNotifiedEventCount().toString());... | .getTopics()[0]); |
1,558,259 | public String toXML(DataDictionary dataDictionary, boolean indent) {<NEW_LINE>try {<NEW_LINE>final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();<NEW_LINE>final Document document = factory.newDocumentBuilder().newDocument();<NEW_LINE>final Element message = document.createElement("message");<NEW... | setOutputProperty(OutputKeys.INDENT, "no"); |
1,413,221 | private AstNode createNumericLiteral(int tt, boolean isProperty) {<NEW_LINE>String s = ts.getString();<NEW_LINE>if (this.inUseStrictDirective && ts.isNumericOldOctal()) {<NEW_LINE>if (compilerEnv.getLanguageVersion() >= Context.VERSION_ES6 || !isProperty) {<NEW_LINE>if (tt == Token.BIGINT) {<NEW_LINE>reportError("msg.n... | "n", ts.getBigInt()); |
219,250 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// authentication with an API key or named user is required to access basemaps and other<NEW_LINE>// location services<NEW_LINE>ArcGISRuntimeEnvironment.setApiKey(B... | (coneSymbol, 100, 500)); |
604,633 | public Request<ListTemplatesRequest> marshall(ListTemplatesRequest listTemplatesRequest) {<NEW_LINE>if (listTemplatesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListTemplatesRequest)");<NEW_LINE>}<NEW_LINE>Request<ListTemplatesRequest> request = new DefaultRequest<Li... | , StringUtils.fromInteger(maxItems)); |
873,561 | public Mono<Void> filter(@NonNull final ServerWebExchange exchange, @NonNull final WebFilterChain chain) {<NEW_LINE>MediaType mediaType = exchange.getRequest().getHeaders().getContentType();<NEW_LINE>if (MediaType.MULTIPART_FORM_DATA.isCompatibleWith(mediaType)) {<NEW_LINE>ServerRequest serverRequest = ServerRequest.cr... | ServerHttpResponse response = exchange.getResponse(); |
207,795 | ManagedChannelBuilder<?> newChannelBuilder(String target, ChannelCredentials creds) {<NEW_LINE>List<ManagedChannelProvider> providers = providers();<NEW_LINE>if (providers.isEmpty()) {<NEW_LINE>throw new ProviderNotFoundException("No functional channel service provider found. " + "Try adding a dependency on the grpc-ok... | append(result.getError()); |
9,506 | private Optional<List<Object[]>> onJdbc(String statement) {<NEW_LINE>String datasourceDs = null;<NEW_LINE>if (MetaClusterCurrent.exist(ReplicaSelectorManager.class)) {<NEW_LINE>ReplicaSelectorManager replicaSelectorManager = MetaClusterCurrent.wrapper(ReplicaSelectorManager.class);<NEW_LINE>datasourceDs = replicaSelect... | .getMetaData().getColumnCount(); |
1,346,404 | public void jacobian(double X, double Y, double Z, double[] inputX, double[] inputY, boolean computeIntrinsic, @Nullable double[] calibX, @Nullable double[] calibY) {<NEW_LINE>Z = -Z;<NEW_LINE>double normX = X / Z;<NEW_LINE>double normY = Y / Z;<NEW_LINE>double n2 = normX * normX + normY * normY;<NEW_LINE>double n2_X =... | = f * normX * n2 * n2; |
1,814,614 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
526,496 | public static void down(GrayU8 input, GrayI8 output) {<NEW_LINE>int maxY = input.height - input.height % 2;<NEW_LINE>int maxX = input.width - input.width % 2;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxY, 2, y -> {<NEW_LINE>for (int y = 0; y < maxY; y += 2) {<NEW_LINE>int indexOut = output.startIndex + ... | input.data[indexIn1] & 0xFF; |
1,075,450 | public void actionPerformed(ActionEvent e) {<NEW_LINE>if (e.getSource() instanceof JComponent) {<NEW_LINE>JPopupMenu p = new JPopupMenu();<NEW_LINE>OQLQueries.instance().populateSaveQuery(p, currentQuery, editor.getScript(), new OQLQueries.Handler() {<NEW_LINE><NEW_LINE>protected void querySelected(OQLSupport.Query que... | notifier = saveAction.getValue("NOTIFIER"); |
1,675,171 | // Delete all old shard gen blobs that aren't referenced any longer as a result from moving to updated repository data<NEW_LINE>private void cleanupOldShardGens(RepositoryData existingRepositoryData, RepositoryData updatedRepositoryData, FinalizeSnapshotContext finalizeSnapshotContext) {<NEW_LINE>final Set<String> toDe... | ).substring(prefixPathLen) + INDEX_FILE_PREFIX; |
532,765 | public static void createPngCanvasDataUrl(Diagram diagram, double scaling, DownloadPopupPanel receiver, DownloadType type) {<NEW_LINE>ThemeFactory.THEMES currentTheme = ThemeFactory.getActiveThemeEnum();<NEW_LINE>ThemeFactory.changeTheme(ThemeFactory.THEMES.LIGHT, null, false);<NEW_LINE>DrawCanvas pngCanvas = new DrawC... | ), new SelectorNew(diagram)); |
371,269 | public boolean visit(SQLOrderBy x) {<NEW_LINE><MASK><NEW_LINE>SQLSelectQueryBlock query = null;<NEW_LINE>if (x.getParent() instanceof SQLSelectQueryBlock) {<NEW_LINE>query = (SQLSelectQueryBlock) x.getParent();<NEW_LINE>}<NEW_LINE>if (query != null) {<NEW_LINE>for (SQLSelectOrderByItem item : x.getItems()) {<NEW_LINE>S... | final SQLASTVisitor orderByVisitor = createOrderByVisitor(x); |
1,672,161 | public void onMatch(RelOptRuleCall call) {<NEW_LINE>assert matches(call);<NEW_LINE>final Join join = call.rel(0);<NEW_LINE>RelNode right = join.getRight();<NEW_LINE>final RelNode left = join.getLeft();<NEW_LINE>final int leftFieldCount = left.getRowType().getFieldCount();<NEW_LINE>final RelOptCluster cluster = join.get... | RexBuilder rexBuilder = cluster.getRexBuilder(); |
1,161,488 | final CreatePullRequestApprovalRuleResult executeCreatePullRequestApprovalRule(CreatePullRequestApprovalRuleRequest createPullRequestApprovalRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPullRequestApprovalRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePullRequestApprovalRule"); |
1,168,702 | public BufferedImageFilterResult filter(BufferedImage source, BufferedImage destination, boolean modifySource) {<NEW_LINE>BufferedImage flag = getLanguageFlag(languageCode);<NEW_LINE>if (flag == null) {<NEW_LINE>return new BufferedImageFilterResult(source, false, true);<NEW_LINE>}<NEW_LINE>boolean sameInstance = true;<... | source, 0, 0, null); |
272,665 | private void createStreamWithMessageHeaderV1(StoreKey key, BlobProperties blobProperties, ByteBuffer userMetadata, InputStream blobStream, long streamSize, BlobType blobType) throws MessageFormatException {<NEW_LINE>int headerSize = MessageFormatRecord.MessageHeader_Format_V1.getHeaderSize();<NEW_LINE>int blobPropertie... | UserMetadata_Format_V1.serializeUserMetadataRecord(buffer, userMetadata); |
729,353 | private void processBindingsSheet(Element theBindingsSheet) {<NEW_LINE>NodeList tableList = theBindingsSheet.getElementsByTagName("Table");<NEW_LINE>Element table = (Element) tableList.item(0);<NEW_LINE>NodeList rows = table.getElementsByTagName("Row");<NEW_LINE>Element defRow = (Element) rows.item(0);<NEW_LINE>int col... | ref = cellValue(nextRow, colRef); |
375,783 | void applyToBorder(GrayU8 input, GrayU8 output, int y0, int y1, int x0, int x1, ApplyHelper h) {<NEW_LINE>// top-left corner<NEW_LINE>h.computeHistogram(0, 0, input);<NEW_LINE>h.applyToBlock(0, 0, x0 + 1, y0 + 1, input, output);<NEW_LINE>// top-middle<NEW_LINE>for (int x = x0 + 1; x < x1; x++) {<NEW_LINE>h.updateHistog... | computeHistogram(0, 0, input); |
1,030,030 | public static void main(String[] args) {<NEW_LINE>String modelPath = "edu/stanford/nlp/models/srparser/englishSR.ser.gz";<NEW_LINE>String taggerPath = "edu/stanford/nlp/models/pos-tagger/english-left3words-distsim.tagger";<NEW_LINE>for (int argIndex = 0; argIndex < args.length; ) {<NEW_LINE>switch(args[argIndex]) {<NEW... | taggerPath = args[argIndex + 1]; |
1,504,012 | public Object unmarshal(final HierarchicalStreamReader reader, final UnmarshallingContext context) {<NEW_LINE>try {<NEW_LINE>final boolean isMethodNotConstructor = context.getRequiredType().equals(Method.class);<NEW_LINE>reader.moveDown();<NEW_LINE>final String declaringClassName = reader.getValue();<NEW_LINE>final Cla... | String parameterTypeName = reader.getValue(); |
1,639,815 | public HttpResponse execute(HttpRequest req) throws UncheckedIOException {<NEW_LINE>try (Span span = newSpanAsChildOf(tracer, req, "protocol_converter")) {<NEW_LINE>Map<String, EventAttributeValue> attributeMap = new HashMap<>();<NEW_LINE>attributeMap.put(AttributeKey.HTTP_HANDLER_CLASS.getKey(), EventAttribute.setValu... | span, Span.Kind.SERVER); |
1,481,443 | public void marshall(VideoDescription videoDescription, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (videoDescription == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(videoDescription.getCodecSettings(),... | videoDescription.getWidth(), WIDTH_BINDING); |
757,220 | final UpdateDomainResult executeUpdateDomain(UpdateDomainRequest updateDomainRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDomainRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
75,146 | public void run(RegressionEnvironment env) {<NEW_LINE>String statementText = "@name('s0') select price, min(price) as minPrice " + "from SupportMarketDataBean#time(30)" + "having price >= min(price) * (1.02)";<NEW_LINE>env.compileDeploy(statementText).addListener("s0");<NEW_LINE>Random random = new Random();<NEW_LINE>/... | long endTime = System.currentTimeMillis(); |
1,401,735 | public void configureMiniTable(IMiniTable miniTable) {<NEW_LINE>// 0<NEW_LINE>miniTable.addColumn("HR_Movement_ID");<NEW_LINE>// 1<NEW_LINE>miniTable.addColumn("AD_Org_ID");<NEW_LINE>// 2<NEW_LINE>miniTable.addColumn("HR_Concept_ID");<NEW_LINE>// 3<NEW_LINE>miniTable.addColumn("ValidFrom");<NEW_LINE>// 4<NEW_LINE>miniT... | .getCtx(), "Amount")); |
317,671 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, <MASK><NEW_LINE>if (deviceS... | remoteAddress, parser.next()); |
666,169 | public static Path downloadAndInstallJdk(int version) {<NEW_LINE>Util.infoMsg("Downloading JDK " + version + ". Be patient, this can take several minutes...");<NEW_LINE>String url = getJDKUrl(version, Util.getOS().name(), Util.getArch().name(), Util.getVendor(), Util.getRelease());<NEW_LINE>Util.verboseMsg("Downloading... | ).toString() + ".old"); |
89,255 | private static INamespaceDefinitionResolver addResolverToCache(IProject project) {<NEW_LINE>synchronized (RESOLVER_CACHE) {<NEW_LINE>int nEntries = RESOLVER_CACHE.size();<NEW_LINE>if (nEntries >= CACHE_SIZE) {<NEW_LINE>// find obsolete entries or remove entry that was least recently accessed<NEW_LINE>ResolvlerCacheEntr... | (obsoleteClassLoaders.get(i)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.