idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
527,831 | private void initDeviceView() {<NEW_LINE>main = new Composite(parent, SWT.NONE);<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = 1;<NEW_LINE>layout.marginTop = 4;<NEW_LINE>layout.marginBottom = 4;<NEW_LINE>layout.marginHeight = 4;<NEW_LINE>layout.marginWidth = 4;<NEW_LINE>main.setLayout(layo... | getWorkingDirectory().getAbsolutePath()); |
1,626,797 | public static void convolve5(Kernel2D_S32 kernel, GrayS16 input, GrayI16 output, int skip) {<NEW_LINE>final short[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final <MASK><NEW_LINE>final int widthEnd = UtilDownConvolve.computeMaxSide(input.width, skip, radius);<NEW_LINE>final int heigh... | int radius = kernel.getRadius(); |
1,374,318 | public void onNavigationDrawerItemSelected(int position) {<NEW_LINE>switch(position) {<NEW_LINE>case SORT_RECENT:<NEW_LINE>sortMethod = SORT_RECENT;<NEW_LINE>navSubtitle = getString(R.string.file_list_recent);<NEW_LINE>break;<NEW_LINE>case SORT_HOMEBREW:<NEW_LINE>sortMethod = SORT_HOMEBREW;<NEW_LINE>navSubtitle = getSt... | getString(R.string.file_list_default); |
1,842,759 | private void init() {<NEW_LINE>selectionField = new DropDownSelectionTextField<>(new DataTypeDropDownSelectionDataModel(dataTypeManagerService));<NEW_LINE>selectionField.addCellEditorListener(new CellEditorListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void editingCanceled(ChangeEvent e) {<NEW_LINE>fireEditi... | (Box.createHorizontalStrut(5)); |
326,043 | public void loadFromFile(byte[] buf, int offset) throws IOException {<NEW_LINE>signature1 = LEDataInputStream.readInt(buf, offset + 0);<NEW_LINE>signature2 = LEDataInputStream.<MASK><NEW_LINE>flags = LEDataInputStream.readInt(buf, offset + 8);<NEW_LINE>version = LEDataInputStream.readInt(buf, offset + 12);<NEW_LINE>Sys... | readInt(buf, offset + 4); |
1,628,391 | private CompletableFuture<WriterFlushResult> flushNormally(boolean force, TimeoutTimer timer) {<NEW_LINE>assert this.state.get() == AggregatorState.Writing : "flushNormally cannot be called if state == " + this.state;<NEW_LINE>long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "flushNormally", ... | partialResult.getMergedBytes() > 0); |
652,854 | public void handleGET(CoapExchange exchange) {<NEW_LINE>Response response = new Response(CONTENT);<NEW_LINE>Integer maxConnections = null;<NEW_LINE>Integer nodeId = null;<NEW_LINE>List<CounterStatisticManager> healths = endpointHealth;<NEW_LINE>Endpoint endpoint = exchange.advanced().getEndpoint();<NEW_LINE>if (endpoin... | config.get(DtlsConfig.DTLS_MAX_CONNECTIONS); |
1,345,453 | public static boolean validate(String ldapURL, String domain, String userName, String password) {<NEW_LINE>Hashtable<String, String> env = new Hashtable<String, String>();<NEW_LINE>env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");<NEW_LINE>// ldap://dc.compiere.org<NEW_LINE>env.put(Context.P... | SECURITY_PRINCIPAL, principal.toString()); |
480,066 | private void fillPicks() {<NEW_LINE>// Price List<NEW_LINE>String sql = "SELECT M_PriceList_Version.M_PriceList_Version_ID," + " M_PriceList_Version.Name || ' (' || c.Iso_Code || ')' AS ValueName " + "FROM M_PriceList_Version, M_PriceList pl, C_Currency c " + "WHERE M_PriceList_Version.M_PriceList_ID=pl.M_PriceList_ID"... | new KeyNamePair(0, "")); |
1,075,384 | private String compileToExplodedBundle(PrintWriter writer) throws IOException, OSGiException {<NEW_LINE>Files.createDirectories(binaryDir);<NEW_LINE>Summary summary = new Summary();<NEW_LINE>List<String> options = new ArrayList<>();<NEW_LINE>options.add("-g");<NEW_LINE>options.add("-d");<NEW_LINE>options.add(binaryDir.... | createDirectories(binaryManifest.getParent()); |
1,334,259 | public boolean isKey(RelOptTable table, List<Integer> columns) {<NEW_LINE>final JdbcTable jdbcTable = table.unwrap(JdbcTable.class);<NEW_LINE>return withBuilder(jdbcTable.jdbcSchema, (cluster, relOptSchema, jdbcSchema, relBuilder) -> {<NEW_LINE>// The collection of columns ['DEPTNO'] is a key for 'EMP' if the<NEW_LINE>... | DataSource dataSource = jdbcSchema.getDataSource(); |
1,643,460 | private static <T> T instantiateComponent(Class<? extends T> argumentExtractor, final Annotation annotation, final Class<?> paramType, Injector injector) {<NEW_LINE>// Noarg constructor<NEW_LINE>Constructor noarg = getNoArgConstructor(argumentExtractor);<NEW_LINE>if (noarg != null) {<NEW_LINE>try {<NEW_LINE>return (T) ... | T) simpleClass.newInstance(paramType); |
1,410,347 | public ResponseEntity<Boolean> sendTicketByEmail(@PathVariable("eventName") String eventName, @PathVariable("ticketIdentifier") String ticketIdentifier) {<NEW_LINE>return ticketReservationManager.fetchCompleteAndAssigned(eventName, ticketIdentifier).map(data -> {<NEW_LINE><MASK><NEW_LINE>TicketReservation reservation =... | Event event = data.getLeft(); |
60,406 | public boolean validate(Project project, BlazeContext context, BlazeProjectData blazeProjectData) {<NEW_LINE>if (!blazeProjectData.getWorkspaceLanguageSettings().isLanguageActive(LanguageClass.GO) || PluginUtils.isPluginEnabled(GO_PLUGIN_ID)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (PluginUtils.isPluginEnabled(O... | "Click here to install the new JetBrains Go plugin and restart.", Blaze.defaultBuildSystemName()); |
1,433,623 | void computeProjectionTable(int width, int height) {<NEW_LINE>output.reshape(width, height);<NEW_LINE>depthMap.reshape(width, height);<NEW_LINE>ImageMiscOps.fill(depthMap, -1);<NEW_LINE>int samplesPerPixel = renderSampling * renderSampling;<NEW_LINE>int pointingPixelStride = samplesPerPixel * 3;<NEW_LINE>int pointingSt... | subY = sampleY / (double) renderSampling; |
548,937 | public void onInflate(Context context, AttributeSet attrs, Bundle savedInstanceState) {<NEW_LINE>super.onInflate(context, attrs, savedInstanceState);<NEW_LINE>TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.BlocklyFlyout, 0, 0);<NEW_LINE>try {<NEW_LINE>mCloseable = a.getBoolean(R.styleable.B... | (args = new Bundle()); |
592,967 | protected void executeLowLevelRequest() {<NEW_LINE>UpdateItemResult updateItemResult = doUpdateItem();<NEW_LINE>// The UpdateItem request is specified to return ALL_NEW<NEW_LINE>// attributes of the affected item. So if the returned<NEW_LINE>// UpdateItemResult does not include any ReturnedAttributes,<NEW_LINE>// it in... | )).withAction("PUT")); |
1,151,022 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jPanel1 = new javax.swing.JPanel();<NEW_LINE>jLabel1 = <MASK><NEW_LINE>userAgentInput = new javax.swing.JTextField();<NEW_LINE>jLabel2 = new javax.swing.JLabel();<NEW_LINE>cookieJa... | new javax.swing.JLabel(); |
552,061 | public void init(String title) {<NEW_LINE>assert !htmldoc.getDocumentElement().hasChildNodes();<NEW_LINE>// head<NEW_LINE>Element head = htmldoc.createElement(HTMLUtil.HTML_HEAD_TAG);<NEW_LINE>head.appendChild(htmldoc.createComment(MODIFICATION_WARNING));<NEW_LINE>htmldoc.getDocumentElement().appendChild(head);<NEW_LIN... | HTMLUtil.HTML_CONTENT_ATTRIBUTE, HTMLUtil.CONTENT_TYPE_HTML_UTF8); |
1,542,648 | public static FindProjectStatisticalDataResponse unmarshall(FindProjectStatisticalDataResponse findProjectStatisticalDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>findProjectStatisticalDataResponse.setRequestId(_ctx.stringValue("FindProjectStatisticalDataResponse.RequestId"));<NEW_LINE>findProjectStatisticalDataRe... | ("FindProjectStatisticalDataResponse.Data.MonitorStatisticData[" + i + "].Total.Total")); |
1,737,524 | private FinalText concatenateResult(String containingElementName) {<NEW_LINE>// null element means that this is a formatting artifact, not content.<NEW_LINE>if (containingElementName == null) {<NEW_LINE>// at some point, we may want to extract alternate text for some<NEW_LINE>// artifacts.<NEW_LINE>return null;<NEW_LIN... | containingElementName.substring(0, spacePos); |
384,872 | private int doSignal(ExecutionEnvironment env, String scope, Signal signal, String... args) {<NEW_LINE>try {<NEW_LINE>String path = getPath(env);<NEW_LINE>if (path == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>StringBuilder cmd = new StringBuilder();<NEW_LINE>try {<NEW_LINE>HostInfo hostInfo = HostInfoUtils.getHos... | env, cmd.toString()); |
981,983 | public void populateItem(final Item<FederationModel> item) {<NEW_LINE>final FederationModel entry = item.getModelObject();<NEW_LINE>item.add(new LinkPanel("url", "list", entry.url, FederationRegistrationPage.class, WicketUtils.newRegistrationParameter(entry.url, entry.name)));<NEW_LINE>item.add(WicketUtils.getPullStatu... | ("frequency", entry.frequency)); |
78,605 | private static void parseCompoundSortField(XContentParser parser, List<SortBuilder<?>> sortFields) throws IOException {<NEW_LINE>XContentParser.Token token;<NEW_LINE>while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {<NEW_LINE>if (token == XContentParser.Token.FIELD_NAME) {<NEW_LINE>String fieldNa... | fieldName).order(order)); |
796,838 | private void modifySourceElement() throws DataObjectNotFoundException, IOException {<NEW_LINE>final BaseDocument doc = (BaseDocument) getDocument(activeElement.getFile());<NEW_LINE>final AtomicBoolean success = new AtomicBoolean();<NEW_LINE>DataObject dataObject = DataObject.find(activeElement.getFile());<NEW_LINE>bool... | lookup(SaveCookie.class) != null; |
342,862 | protected void initAppProperties() {<NEW_LINE>AppContext.setProperty(AppConfig.CLIENT_TYPE_PROP, ClientType.DESKTOP.toString());<NEW_LINE>String appPropertiesConfig = System.getProperty(APP_PROPERTIES_CONFIG_SYS_PROP);<NEW_LINE>if (StringUtils.isBlank(appPropertiesConfig))<NEW_LINE>appPropertiesConfig = defaultAppPrope... | arg.substring(pos + 1); |
647,971 | private String skipOrFail(@NonNull final I_C_Order salesOrder, @NonNull final I_C_OrderLine salesOrderLine) {<NEW_LINE>final String onMissingBPartnerProduct = <MASK><NEW_LINE>final boolean log = ON_MISSING_C_B_PARTNER_PRODUCT_LOG.equalsIgnoreCase(onMissingBPartnerProduct);<NEW_LINE>final boolean ignore = ON_MISSING_C_B... | sysConfigBL.getValue(SYSCONFIG_ON_MISSING_C_B_PARTNER_PRODUCT, ON_MISSING_C_B_PARTNER_PRODUCT_LOG); |
1,152,044 | public void encodeValue(Block block, int position, SliceOutput output) {<NEW_LINE>Block row = block.getBlock(position);<NEW_LINE>// write values<NEW_LINE>for (int batchStart = 0; batchStart < row.getPositionCount(); batchStart += 8) {<NEW_LINE>int batchEnd = Math.min(batchStart + 8, structFields.size());<NEW_LINE>int n... | 1 << (fieldId % 8)); |
1,298,466 | void assembleMessageParameters() {<NEW_LINE>mAid = SecureUtils.calculateK4(mAppKey.getKey());<NEW_LINE>final ByteBuffer paramsBuffer;<NEW_LINE>LOG.info("State: " + (mState ? "ON" : "OFF"));<NEW_LINE>if (mTransitionSteps == null || mTransitionResolution == null || mDelay == null) {<NEW_LINE>paramsBuffer = ByteBuffer.all... | .put((byte) tId); |
1,191,393 | public void onHttpResponseReceive(HttpMessage msg, int initiator, HttpSender sender) {<NEW_LINE>if (initiator != HttpSender.PROXY_INITIATOR && initiator != HttpSender.MANUAL_REQUEST_INITIATOR) {<NEW_LINE>// Not a session we care about<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Check if we know the site and add it otherwis... | site, cookie.getName()); |
1,294,869 | public List<Record> signZone(final List<Record> records, final List<DnsSecKeyPair> kskPairs, final List<DnsSecKeyPair> zskPairs, final Date inception, final Date expiration, final ConcurrentMap<RRSIGCacheKey, ConcurrentMap<RRsetKey, RRSIGRecord>> RRSIGCache) throws IOException, GeneralSecurityException {<NEW_LINE>final... | .collect(toList())); |
1,774,926 | public Attachment addAttachment(final String assetId, final AttachmentSummary attSummary) throws IOException, BadVersionException, RequestFailureException {<NEW_LINE>final Attachment attach = attSummary.getAttachment();<NEW_LINE>final String name = attSummary.getName();<NEW_LINE>// Info about the attachment goes into t... | .getType().toString(); |
1,113,449 | private void handleEndTagElement(JspSyntaxElement.EndTag endTag, Stack<JspSyntaxElement.OpenTag> openTagsStack, List<OffsetRange> tags) {<NEW_LINE>if (openTagsStack.isEmpty()) {<NEW_LINE>// stray end tag<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JspSyntaxElement.OpenTag top = openTagsStack.peek();<NEW_LINE>if (endTag.name()... | (savedElements.get(i)); |
1,616,457 | public void changePfpValidator(ActionRequest request, ActionResponse response) {<NEW_LINE>Integer pfpValidatorUserId = (Integer) request.getContext().get("_userId");<NEW_LINE>LinkedHashMap<String, Object> newPfpValidatorUserMap = (LinkedHashMap<String, Object>) request.<MASK><NEW_LINE>if (newPfpValidatorUserMap == null... | getContext().get("newPfpValidatorUser"); |
861,355 | private static void assertReceived(RegressionEnvironment env, boolean namedWindow, SupportBean[] beans, int[] indexesAll, int[] indexesWhere, String[] mapKeys, Object[] mapValues) {<NEW_LINE>env.assertListener("select", listener -> {<NEW_LINE>EventBean received = listener.assertOneGetNewAndReset();<NEW_LINE>Object[] ex... | SupportBean.getOAStringAndIntPerIndex(beans, indexesWhere); |
868,013 | public void onDescriptorRead(final BluetoothGatt gatt, final BluetoothGattDescriptor descriptor, final int status) {<NEW_LINE>final byte[] data = descriptor.getValue();<NEW_LINE>if (status == BluetoothGatt.GATT_SUCCESS) {<NEW_LINE>log(Log.INFO, () -> "Read Response received from descr. " + descriptor.getUuid() + ", val... | Log.w(TAG, ERROR_AUTH_ERROR_WHILE_BONDED); |
488,220 | protected FullHttpRequest newHandshakeRequest() {<NEW_LINE>URI wsURL = uri();<NEW_LINE>// Get 16 bit nonce and base 64 encode it<NEW_LINE>byte[] nonce = WebSocketUtil.randomBytes(16);<NEW_LINE>String key = WebSocketUtil.base64(nonce);<NEW_LINE>String acceptSeed = key + MAGIC_GUID;<NEW_LINE>byte[] sha1 = WebSocketUtil.s... | .getBytes(CharsetUtil.US_ASCII)); |
785,723 | public void createProjectFromTemplate(ActionRequest request, ActionResponse response) {<NEW_LINE>ProjectTemplate projectTemplate = request.getContext().asType(ProjectTemplate.class);<NEW_LINE>AppProject appProject = Beans.get(AppProjectService.class).getAppProject();<NEW_LINE>if (appProject.getGenerateProjectSequence()... | ()).map()); |
1,248,411 | public Quaternion lookAt(@NonNull Vector3 lookAt, @NonNull Vector3 upDirection) {<NEW_LINE>mTmpVec1.setAll(lookAt);<NEW_LINE>mTmpVec2.setAll(upDirection);<NEW_LINE>// Vectors are parallel/anti-parallel if their dot product magnitude and length product are equal<NEW_LINE>final double dotProduct = Vector3.dot(lookAt, upD... | Vector3.orthoNormalize(mTmpVec1, mTmpVec2); |
1,022,066 | private List<HandlerParameter> parseHandleMethodParameter() {<NEW_LINE>List<HandlerParameter> params = new LinkedList<>();<NEW_LINE>Parameter[] parameters = handleMethod.getParameters();<NEW_LINE>for (int i = 0; i < parameters.length; i++) {<NEW_LINE>Parameter parameter = parameters[i];<NEW_LINE>Param annotation = <MAS... | parameter.getAnnotation(Param.class); |
1,644,274 | private void migrateOldKeys() {<NEW_LINE>// We only migrate old keys if we don't have any accounts yet - otherwise, migration has already taken place<NEW_LINE>if (!_walletManager.getAccountIds().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Get the local trader address, may be null<NEW_LINE>BitcoinAddress localT... | ))).get(0); |
1,498,367 | private void initMaps() {<NEW_LINE>for (BugPattern pattern : allowedPatterns) {<NEW_LINE>BugCode bugCode = DetectorFactoryCollection.instance().getBugCode(pattern.getAbbrev());<NEW_LINE>getPatterns(bugCode).add(pattern);<NEW_LINE>}<NEW_LINE>// Filter out patterns if their types in the list<NEW_LINE>// If at least one c... | getBugCode(pattern.getAbbrev()); |
1,811,310 | private static Timer makeTimer(AbstractInstant instant, String closure, JobDataMap dataMap) {<NEW_LINE>Logger logger = <MASK><NEW_LINE>JobKey jobKey = new JobKey(instant.toString() + ": " + closure.toString());<NEW_LINE>Trigger trigger = newTrigger().startAt(instant.toDate()).build();<NEW_LINE>Timer timer = new TimerIm... | LoggerFactory.getLogger(ScriptExecution.class); |
1,116,667 | private void refreshSettings() {<NEW_LINE>int size = cache.getJadxSettings().getSrhResourceSkipSize() * 1048576;<NEW_LINE>if (size != sizeLimit || !cache.getJadxSettings().getSrhResourceFileExt().equals(fileExts)) {<NEW_LINE>clear();<NEW_LINE>sizeLimit = size;<NEW_LINE>fileExts = cache<MASK><NEW_LINE>String[] exts = fi... | .getJadxSettings().getSrhResourceFileExt(); |
64,879 | public ProjectInvitationResponse newProjectInvitationResponse(ProjectInvitationJoinVO invite) {<NEW_LINE>ProjectInvitationResponse response = new ProjectInvitationResponse();<NEW_LINE>response.setId(invite.getUuid());<NEW_LINE>response.setProjectId(invite.getProjectUuid());<NEW_LINE>response.setProjectName(invite.getPr... | setAccountName(invite.getAccountName()); |
172,954 | public void refresh(NodeStatus status) {<NEW_LINE>Require.nonNull("Node status", status);<NEW_LINE>Lock writeLock = lock.writeLock();<NEW_LINE>writeLock.lock();<NEW_LINE>try {<NEW_LINE>Iterator<NodeStatus> iterator = nodes.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>NodeStatus node = iterator.next();<NEW... | ), Instant.now()); |
89,810 | private IFolder addResourceModifications(IPackageFragment rootPackage, RenameArguments args, IPackageFragment pack, boolean renameSubPackages) throws CoreException {<NEW_LINE>IContainer container = (IContainer) pack.getResource();<NEW_LINE>if (container == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>IFolder targe... | target, args.getUpdateReferences()); |
1,592,577 | private void renderRing(GL2 gl, RingComponent r) {<NEW_LINE>gl.glRotated(90, 0, 1.0, 0);<NEW_LINE>glu.gluCylinder(q, r.getOuterRadius(), r.getOuterRadius(), r.getLength(), LOD, 1);<NEW_LINE>gl.glRotated(180, 0, 1.0, 0);<NEW_LINE>glu.gluDisk(q, r.getInnerRadius(), r.getOuterRadius(), LOD, 2);<NEW_LINE>gl.glRotated(180, ... | 0, r.getLength()); |
808,642 | public CodeValidationResult codeSystemValidateCode(IIdType theCodeSystemId, String theCodeSystemUrl, String theVersion, String theCode, String theDisplay, IBaseDatatype theCoding, IBaseDatatype theCodeableConcept) {<NEW_LINE>CodeableConcept codeableConcept = toCanonicalCodeableConcept(theCodeableConcept);<NEW_LINE>bool... | .code(908) + "Either CodeSystem ID or CodeSystem identifier must be provided. Unable to validate."); |
419,245 | private // isInterrupted() returns false after interruption in p.waitFor<NEW_LINE>void internalRotateNow() {<NEW_LINE>// figure out new file name, then<NEW_LINE>String oldFileName = fileName;<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>fileName = LogFormatter.insertDate(filePattern, now);<NEW_LINE>internal... | "Couldn't open log file '" + fileName + "'", e); |
617,889 | protected void adjacentBorder(GrayS32 pixelToRegion) {<NEW_LINE>for (int y = 0; y < pixelToRegion.height - 1; y++) {<NEW_LINE>int x = pixelToRegion.width - 1;<NEW_LINE>int indexImg = pixelToRegion.startIndex + pixelToRegion.stride * y + x;<NEW_LINE>checkAdjacentAround(x, y, indexImg, pixelToRegion);<NEW_LINE>if (connec... | + pixelToRegion.stride * y + x; |
496,488 | public static String jndiNameToCamelCase(String jndiName, boolean lowerCaseFirstChar, String prefixToStrip) {<NEW_LINE>String strippedJndiName = jndiName;<NEW_LINE>if (prefixToStrip != null && jndiName.startsWith(prefixToStrip)) {<NEW_LINE>strippedJndiName = jndiName.substring(jndiName.indexOf(prefixToStrip<MASK><NEW_L... | ) + prefixToStrip.length()); |
1,295,003 | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {<NEW_LINE>LOG.debug("Processing class '{}'", name);<NEW_LINE>JavaClassDescriptor descriptor = JavaClassDescriptorImporter.createFromAsmObjectTypeName(name);<NEW_LINE>if (alreadyImported(descriptor)) {<NEW_L... | access & Opcodes.ACC_ANNOTATION) != 0; |
1,162,199 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>Preconditions.checkNotNull(environment, "Error: Argument environment can't be null");<NEW_LINE>Preconditions.checkNotNull(instruction,... | getOperands().get(0); |
181,082 | protected Representation post(Representation entity, Variant variant) throws ResourceException {<NEW_LINE>if (appCtx == null) {<NEW_LINE>throw new ResourceException(404);<NEW_LINE>}<NEW_LINE>// copy op?<NEW_LINE>Form form = new Form(entity);<NEW_LINE>beanPath = form.getFirstValue("beanPath");<NEW_LINE>String newVal = f... | (propPath).getClass()); |
1,032,639 | final DescribeGameSessionsResult executeDescribeGameSessions(DescribeGameSessionsRequest describeGameSessionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeGameSessionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,022,671 | protected final void compileInternal() {<NEW_LINE>if (isSqlReadyForUse()) {<NEW_LINE>this.callString = resolveSql();<NEW_LINE>} else {<NEW_LINE>StringBuilder callString = new StringBuilder(32);<NEW_LINE>List<MASK><NEW_LINE>int parameterCount = 0;<NEW_LINE>if (isFunction()) {<NEW_LINE>callString.append("{? = call ").app... | <SqlParameter> parameters = getDeclaredParameters(); |
576,577 | private Object convertType(Object value) {<NEW_LINE>if (nullValues.contains(value) || value == null)<NEW_LINE>return null;<NEW_LINE>switch(// Destination Type<NEW_LINE>type) {<NEW_LINE>case STRING:<NEW_LINE>if (value instanceof TemporalAccessor && !dateFormat.isEmpty()) {<NEW_LINE>return dateFormat((TemporalAccessor) v... | ), LocalTime.class, dateParse); |
1,591,299 | private Type dotNavigate(int offset, Type type) {<NEW_LINE>if (typeUtil.isMap(type)) {<NEW_LINE>int keyStart = offset + 1;<NEW_LINE>Type domainType = TypeUtil.getDomainType(type);<NEW_LINE>int keyEnd = -1;<NEW_LINE>if (typeUtil.isDotable(domainType)) {<NEW_LINE>// '.' should be interpreted as navigation.<NEW_LINE>keyEn... | , keyStart, keyEnd - keyStart)); |
122,631 | final DescribeIpRestrictionResult executeDescribeIpRestriction(DescribeIpRestrictionRequest describeIpRestrictionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeIpRestrictionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,698,295 | /*<NEW_LINE>* Generate the set of Android permissions needed by this project.<NEW_LINE>*/<NEW_LINE>@VisibleForTesting<NEW_LINE>void generatePermissions() {<NEW_LINE>try {<NEW_LINE>loadJsonInfo(permissionsNeeded, ComponentDescriptorConstants.PERMISSIONS_TARGET);<NEW_LINE>if (project != null) {<NEW_LINE>// Only do this i... | get(type).size(); |
195,510 | private static Object bindMap(Type type, ParamNode paramNode, BindingAnnotations bindingAnnotations) {<NEW_LINE>Class keyClass = String.class;<NEW_LINE>Class valueClass = String.class;<NEW_LINE>if (type instanceof ParameterizedType) {<NEW_LINE>keyClass = (Class) ((ParameterizedType) type).getActualTypeArguments()[0];<N... | child, valueClass, valueClass, bindingAnnotations); |
432,148 | <T> T instantiate(Class<T> cls) throws ParameterNotInstantiableException, IllegalAccessException, InvocationTargetException, FactoryMethodReturnsNullException {<NEW_LINE>if (cls.isEnum()) {<NEW_LINE>T[<MASK><NEW_LINE>if (constants.length > 0) {<NEW_LINE>return constants[0];<NEW_LINE>} else {<NEW_LINE>return null;<NEW_L... | ] constants = cls.getEnumConstants(); |
537,842 | private void createLayout() {<NEW_LINE>RelativeLayout layout = new RelativeLayout(this);<NEW_LINE>ToggleButton traceButton = new ToggleButton(this);<NEW_LINE>ProgressBar progressBar = new ProgressBar(this);<NEW_LINE>layout.setId(RELATIVE_LAYOUT_ID);<NEW_LINE>traceButton.setTextOff("Start tracing");<NEW_LINE>traceButton... | 20, 20, 20, 20); |
1,019,896 | private List<ResourceUsage> resourceUsageFromSnapshots(Plan plan, List<ResourceSnapshot> snapshots) {<NEW_LINE>snapshots.sort(Comparator.comparing(ResourceSnapshot::getTimestamp));<NEW_LINE>return IntStream.range(0, snapshots.size()).mapToObj(idx -> {<NEW_LINE>var a = snapshots.get(idx);<NEW_LINE>var b = (idx + 1) < sn... | get(idx + 1) : null; |
223,907 | public static int staticAdvance(int position, byte[] toneSequence, MidiSequence midiSequence) throws MidiSequenceException {<NEW_LINE>int <MASK><NEW_LINE>if (retVal == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>// it is already checked that there is at least two bytes left<NEW_LINE>byte type = toneSequence[position];<... | retVal = doStaticValidate(position, toneSequence); |
486,312 | private ByteBuf deserialize(ImmutableList<Cookie> sessionCookies) throws Exception {<NEW_LINE>if (sessionCookies.isEmpty()) {<NEW_LINE>return Unpooled.EMPTY_BUFFER;<NEW_LINE>}<NEW_LINE>StringBuilder sessionCookie = new StringBuilder();<NEW_LINE>for (Cookie cookie : sessionCookies) {<NEW_LINE>sessionCookie.append(cookie... | payload.resetReaderIndex(), bufferAllocator); |
320,975 | public static double pdf(double x, double mu, double sigma, double k) {<NEW_LINE>if (x == Double.POSITIVE_INFINITY || x == Double.NEGATIVE_INFINITY) {<NEW_LINE>return 0.;<NEW_LINE>}<NEW_LINE>x = (x - mu) / sigma;<NEW_LINE>if (k > 0 || k < 0) {<NEW_LINE>if (k * x > 1) {<NEW_LINE>return 0.;<NEW_LINE>}<NEW_LINE>double t =... | (t / k)) / sigma; |
724,747 | public void marshall(Profile profile, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (profile == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(profile.getProfileId(), PROFILEID_BINDING);<NEW_LINE>protocolMa... | profile.getHomePhoneNumber(), HOMEPHONENUMBER_BINDING); |
491,299 | private void onReceivedSuccess(@NotNull final ChannelHandlerContext ctx, @NotNull final AUTH msg, @NotNull final ClientConnection clientConnection) {<NEW_LINE>final String reasonString = String.format(ReasonStrings.DISCONNECT_PROTOCOL_ERROR_REASON_CODE, msg.getType().name());<NEW_LINE>if (clientConnection.getClientStat... | reasonString, Mqtt5UserProperties.NO_USER_PROPERTIES, true); |
1,131,939 | protected PdfPTable exportTable(FacesContext context, DataTable table, ExportConfiguration config) {<NEW_LINE>int columnsCount = getColumnsCount(table);<NEW_LINE><MASK><NEW_LINE>ExporterOptions options = config.getOptions();<NEW_LINE>if (options != null) {<NEW_LINE>applyFont(options.getFontName(), config.getEncodingTyp... | PdfPTable pdfTable = new PdfPTable(columnsCount); |
1,484,813 | public void onRender(Env env, Scope scope, Writer writer) {<NEW_LINE>String flag = getPara("flag", scope);<NEW_LINE>String style = getPara("style", scope);<NEW_LINE>Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);<NEW_LINE>String orderBy = getPara("orderBy", scope, "id desc");<NEW_LINE>int count = getParaTo... | Columns.create("flag", flag); |
343,594 | private void initializeRecyclerView(final Context ctx) {<NEW_LINE>recyclerView.hasFixedSize();<NEW_LINE>recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));<NEW_LINE>recyclerViewAdapter = new LogDetailRecyclerViewAdapter(getApplicationContext(), logData -> {<NEW_LINE>current_selected_logData... | 1, R.string.show_destination_address); |
1,260,220 | public void decorate(Element element, ParserContext parserContext, BeanDefinitionBuilder builder, RedissonNamespaceParserSupport helper) {<NEW_LINE>NodeList list = element.getElementsByTagNameNS(RedissonNamespaceParserSupport.REDISSON_NAMESPACE, RedissonNamespaceParserSupport.LOCAL_CACHED_MAP_OPTIONS_ELEMENT);<NEW_LINE... | RedissonNamespaceParserSupport.TIME_TO_LIVE_ATTRIBUTE, RedissonNamespaceParserSupport.TIME_TO_LIVE_UNIT_ATTRIBUTE); |
1,421,347 | public Object propertyMissing(String name) {<NEW_LINE>if (Character.isUpperCase(name.charAt(0))) {<NEW_LINE>logger.error("unresolved class or property {}, missing import?", name);<NEW_LINE>Set<String> packages = delegate.getConfigLoader().getDirectory().getPackages(name);<NEW_LINE>logger.debug("found {} packages with c... | RecommenderConfigurationException ex = new RecommenderConfigurationException(message); |
1,027,076 | private void doApplyFix(@Nonnull final Project project, @Nonnull final CommonProblemDescriptor[] descriptors, @Nonnull final GlobalInspectionContextImpl context) {<NEW_LINE>final Set<VirtualFile> readOnlyFiles = new HashSet<VirtualFile>();<NEW_LINE>for (CommonProblemDescriptor descriptor : descriptors) {<NEW_LINE>final... | = new HashSet<PsiElement>(); |
295,642 | final PutImageRecipePolicyResult executePutImageRecipePolicy(PutImageRecipePolicyRequest putImageRecipePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putImageRecipePolicyRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutIm... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,735,772 | final ListServiceActionsForProvisioningArtifactResult executeListServiceActionsForProvisioningArtifact(ListServiceActionsForProvisioningArtifactRequest listServiceActionsForProvisioningArtifactRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listServiceActionsForProvisioningArtifactRequest... | endClientExecution(awsRequestMetrics, request, response); |
471,171 | // GEN-LAST:event_formattersMoveDownButtonActionPerformed<NEW_LINE>private void editButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_editButtonActionPerformed<NEW_LINE>int index = formattersList.getSelectedIndex();<NEW_LINE>if (index < 0)<NEW_LINE>return;<NEW_LINE>DefaultListModel mod... | OK_CANCEL_OPTION, NotifyDescriptor.OK_OPTION, null); |
364,749 | protected byte[] key(@Nullable final Project project) throws PasswordSafeException {<NEW_LINE>if (!isTestMode() && ApplicationManager.getApplication().isHeadlessEnvironment()) {<NEW_LINE>throw new MasterPasswordUnavailableException("The provider is not available in headless environment");<NEW_LINE>}<NEW_LINE>if (key.ge... | }, ModalityState.defaultModalityState()); |
1,835,554 | protected void parseDense(Osmformat.DenseNodes nodes) {<NEW_LINE>long lastId = 0, lastLat = 0, lastLon = 0;<NEW_LINE>// Index into the keysvals array.<NEW_LINE>int j = 0;<NEW_LINE>if (parsePhase != OsmParserPhase.Nodes) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < nodes.getIdCount(); i++) {<NEW_LINE>OSMNo... | nodes.getId(i) + lastId; |
1,587,306 | public void open(Map<String, Object> config, SourceContext sourceContext) throws Exception {<NEW_LINE>rabbitMQSourceConfig = RabbitMQSourceConfig.load(config);<NEW_LINE>rabbitMQSourceConfig.validate();<NEW_LINE>ConnectionFactory connectionFactory = rabbitMQSourceConfig.createConnectionFactory();<NEW_LINE>rabbitMQConnec... | = new RabbitMQConsumer(this, rabbitMQChannel); |
808,233 | private static JFileChooser createFileChooser() {<NEW_LINE>JFileChooser chooser = new JFileChooser() {<NEW_LINE><NEW_LINE>public void approveSelection() {<NEW_LINE>File file = getSelectedFile();<NEW_LINE>Filter filter = (Filter) getFileFilter();<NEW_LINE>if (!file.getName().endsWith(filter.getExt())) {<NEW_LINE>file = ... | ) + filter.getExt()); |
1,143,182 | // CHECKSTYLE:OFF<NEW_LINE>private void reportOnTomcatInformations() {<NEW_LINE>// NOPMD<NEW_LINE>// CHECKSTYLE:ON<NEW_LINE>final Map<String, TomcatInformations> tcInfos = new LinkedHashMap<>();<NEW_LINE>for (final TomcatInformations tcInfo : javaInformations.getTomcatInformationsList()) {<NEW_LINE>if (tcInfo.getReques... | MetricType.COUNTER, "tomcat_error_count", "tomcat total error count"); |
280,710 | public DBParameterGroupStatus unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DBParameterGroupStatus dBParameterGroupStatus = new DBParameterGroupStatus();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument... | XMLEvent xmlEvent = context.nextEvent(); |
940,412 | public void run(FlowTrigger trigger, Map data) {<NEW_LINE>VmInstanceSpec spec = (VmInstanceSpec) data.get(VmInstanceConstant.Params.VmInstanceSpec.toString());<NEW_LINE>ApplianceVmPostLifeCycleInfo info;<NEW_LINE>if (spec.getCurrentVmOperation() == VmOperation.NewCreate) {<NEW_LINE>final ApplianceVmSpec aspec = spec.ge... | setDefaultRouteL3Network(aspec.getDefaultRouteL3Network()); |
1,802,757 | public int alterNameAndTypeAndFlag(String tableSchema, String originName, String newName, int tableType, long flag) {<NEW_LINE>try {<NEW_LINE>final Map<Integer, ParameterContext> params = new HashMap<>(12);<NEW_LINE>MetaDbUtil.setParameter(1, params, ParameterMethod.setString, newName);<NEW_LINE>MetaDbUtil.setParameter... | TABLES_EXT_TABLE, e.getMessage()); |
443,253 | private void runExecutableNode(final ExecutableNode node) throws IOException {<NEW_LINE>// Collect output props from the job's dependencies.<NEW_LINE>prepareJobProperties(node);<NEW_LINE>node.setStatus(Status.QUEUED);<NEW_LINE>// Attach Ramp Props if there is any desired properties<NEW_LINE>final String jobId = node.ge... | , rampProps.toString())); |
1,476,562 | public TimerTask scheduleTask(final Runnable task, final Date firstTime, final long period) {<NEW_LINE>engineLock.readLock().lock();<NEW_LINE>try {<NEW_LINE>final TimerTask timerTask = new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>task.run();<NEW_LINE>} catch (Excep... | timer.schedule(timerTask, firstTime); |
1,702,378 | static LineAction toAction(@Nullable NamedManagementObject obj, Uid uid, Warnings w) {<NEW_LINE>if (obj == null) {<NEW_LINE>w.redFlag(String.format("Cannot convert non-existent object (Uid '%s') into an access-rule action, defaulting" + " to deny action"<MASK><NEW_LINE>return LineAction.DENY;<NEW_LINE>} else if (!(obj ... | , uid.getValue())); |
342,581 | /*<NEW_LINE>* header panel represents the selected Date<NEW_LINE>* we keep javaFX original style classes<NEW_LINE>*/<NEW_LINE>protected VBox createHeaderPane() {<NEW_LINE>// Year label<NEW_LINE>selectedYearLabel = new Label();<NEW_LINE>selectedYearLabel.getStyleClass().add(SPINNER_LABEL);<NEW_LINE>selectedYearLabel.set... | selectedDateLabel.setTextFill(Color.WHITE); |
417,850 | public Control createControl(Composite parent) {<NEW_LINE>Composite container = new Composite(parent, SWT.NONE);<NEW_LINE>TableColumnLayout layout = new TableColumnLayout();<NEW_LINE>container.setLayout(layout);<NEW_LINE>tableViewer = new TableViewer(container, SWT.FULL_SELECTION | SWT.MULTI);<NEW_LINE>ColumnViewerTool... | (model.getTransactions())); |
601,863 | static TransformableRowIterator toMergedIndexRowIterator(TransformableRowIterator sourceRowIterator, int indexNumber, final List<DimensionMergerV9> mergers) {<NEW_LINE>RowPointer sourceRowPointer = sourceRowIterator.getPointer();<NEW_LINE>TimeAndDimsPointer markedSourceRowPointer = sourceRowIterator.getMarkedPointer();... | ColumnValueSelector[mergers.size()]; |
965,719 | final DescribeReservedElasticsearchInstancesResult executeDescribeReservedElasticsearchInstances(DescribeReservedElasticsearchInstancesRequest describeReservedElasticsearchInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReservedElasticsearchInstancesRequest);<NEW_LINE>AWS... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
888,384 | private ResolvedArtifactSet locateOrCreate(Factory factory, ComponentIdentifier componentIdentifier, ResolvedVariant sourceVariant, VariantDefinition variantDefinition, ExtraExecutionGraphDependenciesResolverFactory dependenciesResolverFactory) {<NEW_LINE>ImmutableAttributes target = variantDefinition.getTargetAttribut... | Identifier identifier = sourceVariant.getIdentifier(); |
696,102 | public void marshall(BatchResultErrorEntry _batchResultErrorEntry, Request<?> request, String _prefix) {<NEW_LINE>String prefix;<NEW_LINE>if (_batchResultErrorEntry.getId() != null) {<NEW_LINE>prefix = _prefix + "Id";<NEW_LINE>String id = _batchResultErrorEntry.getId();<NEW_LINE>request.addParameter(prefix, StringUtils... | Boolean senderFault = _batchResultErrorEntry.getSenderFault(); |
1,551,939 | private void handlePreload(Context context, Intent i) {<NEW_LINE>String url = UrlUtils.smartUrlFilter(i.getData());<NEW_LINE>String id = i.getStringExtra(EXTRA_PRELOAD_ID);<NEW_LINE>Map<String, String> headers = null;<NEW_LINE>if (id == null) {<NEW_LINE>if (LOGD_ENABLED)<NEW_LINE>Log.d(LOGTAG, "Preload request has no "... | sbQuery = i.getStringExtra(EXTRA_SEARCHBOX_SETQUERY); |
678,527 | private void annotateEntries(String prefix, PrintWriter printTo, AnnotatedOutput annotateTo) {<NEW_LINE>finishProcessingIfNecessary();<NEW_LINE>boolean consume = (annotateTo != null);<NEW_LINE>int amt1 = consume ? 6 : 0;<NEW_LINE>int amt2 = consume ? 2 : 0;<NEW_LINE>int size = table.size();<NEW_LINE>String subPrefix = ... | annotate(0, prefix + "handlers:"); |
1,315,403 | public static JFreeChart buildBoxPlot(final Number[] numbers, final String dataName) {<NEW_LINE>if (numbers == null || numbers.length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DefaultBoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset();<NEW_LINE>final ArrayList<Number> list = new Arr... | .setBaseToolTipGenerator(new BoxAndWhiskerToolTipGenerator()); |
286,352 | public void run() {<NEW_LINE>stateLock.acquireReadLock();<NEW_LINE>try {<NEW_LINE>interruptionManager.enterCriticalPath();<NEW_LINE>if (status == STATUS.CLOSED) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final long[] nonActiveSegments = writeAheadLog.nonActiveSegments();<NEW_LINE>if (nonActiveSegments.length == 0) {<NEW_LI... | Long minLSNSegment = writeCache.getMinimalNotFlushedSegment(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.