idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,429,438 | private Map<String, Object> countStateByProject(User loginUser, long projectCode, String startDate, String endDate, TriFunction<Date, Date, Long[], List<ExecuteStatusCount>> instanceStateCounter) {<NEW_LINE>Map<String, Object> result = new HashMap<>();<NEW_LINE>if (projectCode != 0) {<NEW_LINE>Project project = project... | start = DateUtils.getScheduleDate(startDate); |
705,554 | public void createBindings() {<NEW_LINE>DoubleConverter doubleConverter = new DoubleConverter(Configuration.get().getLengthDisplayFormat());<NEW_LINE>IntegerConverter integerConverter = new IntegerConverter();<NEW_LINE>addWrappedBinding(nozzleTip, "methodPartOn", methodPartOn, "selectedItem");<NEW_LINE>addWrappedBindin... | "vacuumLevelPartOnReading", vacuumLevelPartOnReading, "text", doubleConverter); |
45,734 | private void manageToolbarSizes(int width) {<NEW_LINE>// At startup, we get a resize event with 0 width; ignore this.<NEW_LINE>if (width == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// The View button has text by default<NEW_LINE>viewButton_.setText(true, viewButton_.getText());<NEW_LINE>if (width > 400) {<NEW_LINE>// ... | setText(constants_.importCapitalized()); |
969,869 | public org.python.Object __imul__(org.python.Object other) {<NEW_LINE>if (other instanceof org.python.types.Int) {<NEW_LINE>long count = ((org.python.<MASK><NEW_LINE>org.python.types.Tuple result = new org.python.types.Tuple();<NEW_LINE>for (long i = 0; i < count; i++) {<NEW_LINE>result.value.addAll(this.value);<NEW_LI... | types.Int) other).value; |
1,573,362 | public MultiPhraseQuery build(QueryNode queryNode) throws QueryNodeException {<NEW_LINE>MultiPhraseQueryNode phraseNode = (MultiPhraseQueryNode) queryNode;<NEW_LINE>MultiPhraseQuery.Builder phraseQueryBuilder = new MultiPhraseQuery.Builder();<NEW_LINE>List<QueryNode> children = phraseNode.getChildren();<NEW_LINE>if (ch... | positionTermMap = new TreeMap<>(); |
1,705,844 | public void marshall(LaunchProfileInitialization launchProfileInitialization, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (launchProfileInitialization == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MA... | launchProfileInitialization.getActiveDirectory(), ACTIVEDIRECTORY_BINDING); |
1,309,975 | final AcceptInvitationResult executeAcceptInvitation(AcceptInvitationRequest acceptInvitationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(acceptInvitationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
616,096 | /*<NEW_LINE>* Function to tranfrom the given input matrix into sparse matrix and to display<NEW_LINE>* the resulting sparse matrix<NEW_LINE>*/<NEW_LINE>public static void displaySparseMatrix() {<NEW_LINE>// First row's first column denotes the number of rows of a matrix in sparse<NEW_LINE>// matrix<NEW_LINE>sparseMatri... | = inputMatrix[i][j]; |
973,639 | public static void vertical9(Kernel1D_S32 kernel, GrayU16 src, GrayI16 dst, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final in... | [indexSrc] & 0xFFFF) * k3; |
1,061,383 | public static void gemm(double alpha, DenseMatrix matA, boolean transA, DenseMatrix matB, boolean transB, double beta, DenseMatrix matC) {<NEW_LINE>int ma = transA ? matA.n : matA.m;<NEW_LINE>int na = transA ? matA.m : matA.n;<NEW_LINE>int mb = transB ? matB.n : matB.m;<NEW_LINE>int nb = transB ? matB.m : matB.n;<NEW_L... | int n = matC.numCols(); |
1,000,609 | public void onHit(HitResult mop) {<NEW_LINE>if (!this.level.isClientSide && !getAmmo().isEmpty()) {<NEW_LINE>IRailgunProjectile projectileProperties = getProjectileProperties();<NEW_LINE>if (projectileProperties != null) {<NEW_LINE>Entity shooter = this.getOwner();<NEW_LINE>UUID shooterUuid = this.getShooterUUID();<NEW... | level, mop, shooterUuid, this); |
1,020,204 | public void createPartControl(Composite parent) {<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>this.setPartName("ResponseTime[" + server.getName() + "]");<NEW_LINE>GridLayout layout = new GridLayout(1, true);<NEW_LINE>layout.marginHeight = 5;<NEW_LINE>layout.marginWidth = 5;<NEW_LI... | xyGraph.primaryXAxis.setTitle(""); |
658,418 | public void grant(Cube cube, Access access) {<NEW_LINE>Util.assertPrecondition(cube != null, "cube != null");<NEW_LINE>assert access == Access.ALL || access == Access.NONE || access == Access.CUSTOM;<NEW_LINE>Util.assertPrecondition(isMutable(), "isMutable()");<NEW_LINE>LOGGER.trace("Grant " + access + " on cube " + cu... | getAccess(cube.getSchema()); |
1,263,266 | public void addRecipe(String recipePath, IIngredient seed, IIngredient soil, int time, IItemStack[] outputs, Block renderBlock, @ZenCodeType.Optional("\"generic\"") String renderType) {<NEW_LINE>final ResourceLocation resourceLocation <MASK><NEW_LINE>final List<ItemStack> outputList = CrTIngredientUtil.getNonNullList(o... | = new ResourceLocation("crafttweaker", recipePath); |
1,306,220 | /* Creates an album with albumName provided. */<NEW_LINE>SmugMugAlbumResponse createAlbum(String albumName) throws IOException {<NEW_LINE>// Set up album<NEW_LINE>Map<String, String> json = new HashMap<>();<NEW_LINE>json.put("NiceName", cleanName(albumName));<NEW_LINE>// Allow conflicting names to be changed<NEW_LINE><... | json.put("AutoRename", "true"); |
1,301,542 | protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>Log.d(TAG, "onActivityResult(" + requestCode + "," + resultCode + "," + data + ")");<NEW_LINE>switch(requestCode) {<NEW_LINE>case REQUEST_CHANGE_DEFAULT_SMS_... | handleFallbackAuth(new FallbackAuthEvent(true)); |
1,704,757 | private void initBorders(Settings settingsObj) {<NEW_LINE>jScrollPane1.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, ColorUtil.getBorderGray(settingsObj)));<NEW_LINE>jScrollPane4.setBorder(null);<NEW_LINE>if (settingsObj.getUseMacBackgroundColor() || settingsObj.isMacAqua()) {<NEW_LINE>jListKeywords.setBackgrou... | getString("jListKeywords.border.title"), settingsObj)); |
1,242,065 | public void patchServer() {<NEW_LINE>String message = _serverDescriptor.applicationDistrib ? "You are about to install or refresh your" + " server distribution and your application distribution onto this node.\n" + "Do you want shut down all servers affected by this update?" : "You are about to install or refresh the d... | getStatusBar().setText(prefix); |
1,625,982 | private void deleteTiTempFiles() {<NEW_LINE>// Create the "trash" directory if it doesn't already exist.<NEW_LINE>File trashDir = tryCreateDir(getTiInternalCacheDir(), "trash");<NEW_LINE>// Set up an array of all temp directories to be trashed.<NEW_LINE>File[] dirArray = { // The "Ti.Filesystem.tempDirectory" folder.<N... | (getCacheDir(), "_tmp") }; |
1,249,001 | public void draw(Graphics2D graphics) {<NEW_LINE>graphics.setColor(color);<NEW_LINE>int ovalWidth = Math.round(LayerUtilities.pixelsToUnits(graphics, 4, true));<NEW_LINE>int ovalHeight = Math.round(LayerUtilities.pixelsToUnits<MASK><NEW_LINE>// every second<NEW_LINE>if (features != null) {<NEW_LINE>Map<Double, float[]>... | (graphics, 4, false)); |
15,857 | public void saxStartElement(SAXReader reader, String namespaceURI, String localName, Attributes atts) throws XMLException {<NEW_LINE>if (localName.equals(RegistryConstants.TAG_TYPE)) {<NEW_LINE>String typeId = atts.getValue(RegistryConstants.ATTR_ID);<NEW_LINE>DBPConnectionType origType = null;<NEW_LINE>for (DBPConnect... | permList = new ArrayList<>(); |
1,008,287 | public boolean cancel(boolean mayInterruptIfRunning) {<NEW_LINE>Future<Future<R>> resultFuture = getResultFuture();<NEW_LINE>// Sets the result to be a CancellationException<NEW_LINE>boolean cancellationResult = resultFuture.cancel(false);<NEW_LINE>// If cancellationResult is true, then either we've just cancelled the ... | > innerFuture = resultFuture.get(); |
1,487,669 | public void processDelta(IJavaElementDelta delta, int eventType) {<NEW_LINE>switch(delta.getKind()) {<NEW_LINE>case IJavaElementDelta.CHANGED:<NEW_LINE>IJavaElementDelta[] children = delta.getAffectedChildren();<NEW_LINE>for (int i = 0, length = children.length; i < length; i++) {<NEW_LINE>IJavaElementDelta child = chi... | .getFullPath().toString(); |
1,635,765 | public void createPartControl(Composite parent) {<NEW_LINE>parent.setLayout(UIUtil.formLayout(0, 0));<NEW_LINE>parent.setBackground(ColorUtil.getInstance().getColor(SWT.COLOR_WHITE));<NEW_LINE>canvas = new FigureCanvas(parent);<NEW_LINE>canvas.setScrollBarVisibility(FigureCanvas.NEVER);<NEW_LINE>canvas.setBackground(Co... | , 0, 100, 0)); |
1,548,835 | public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) {<NEW_LINE>if (!Ini.isSwingClient())<NEW_LINE>return null;<NEW_LINE>//<NEW_LINE>// UI<NEW_LINE>boolean changed = false;<NEW_LINE>final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class);<NEW_LINE>ValueNamePair laf = getLookByName(sysConfigBL.ge... | .getClass().getName(); |
296,027 | public static ListDevicePersonStatisticsResponse unmarshall(ListDevicePersonStatisticsResponse listDevicePersonStatisticsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDevicePersonStatisticsResponse.setRequestId(_ctx.stringValue("ListDevicePersonStatisticsResponse.RequestId"));<NEW_LINE>listDevicePersonStatisticsRe... | (_ctx.stringValue("ListDevicePersonStatisticsResponse.Code")); |
1,152,298 | private void responseLoop() {<NEW_LINE>try {<NEW_LINE>connection.runEventLoop(new ClientConnection.Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void header(Map<String, String> properties) {<NEW_LINE>for (Map.Entry pe : properties.entrySet()) {<NEW_LINE>LOG.fine(" " + pe.getKey() + " = " + pe.getValue());<... | ", name = " + event.getKind()); |
1,664,145 | public static void transpose(double[] out, double[] a) {<NEW_LINE>// If we are transposing ourselves we can skip a few steps but have to cache some values<NEW_LINE>if (out == a) {<NEW_LINE>double a01 = a[1], a02 = a[2], a12 = a[5];<NEW_LINE>out[1] = a[3];<NEW_LINE>out[2] = a[6];<NEW_LINE>out[3] = a01;<NEW_LINE>out[5] =... | [0] = a[0]; |
351,822 | public ResponseEntity<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the requi... | final HttpHeaders localVarHeaderParams = new HttpHeaders(); |
1,037,133 | private TimeRational timeSigOf(int count, Rational common) {<NEW_LINE>// Determine the time rational value of measure total duration<NEW_LINE>TimeRational timeRational = new TimeRational(count * common.num, common.den);<NEW_LINE>int gcd = GCD.gcd(count, timeRational.num);<NEW_LINE>// Make sure num is a multiple of coun... | / gcd) * timeRational.den); |
1,730,999 | /*<NEW_LINE>* Used for preinitialized contexts and fallback engine.<NEW_LINE>*/<NEW_LINE>PolyglotEngineImpl createDefaultEngine(TruffleLanguage<Object> hostLanguage) {<NEW_LINE>Map<String, String> options = PolyglotEngineImpl.readOptionsFromSystemProperties(new HashMap<>());<NEW_LINE>LogConfig logConfig = new LogConfig... | INSTRUMENT.createDispatchOutput(System.out); |
690,666 | protected Element createPropRef(Document refDoc, PropertyDoc property) {<NEW_LINE>CompiledPropertyMetadata propertyMetadata = property.getPropertyMetadata();<NEW_LINE><MASK><NEW_LINE>Element refProp = refDoc.createElement(ELEMENT_CONFIG_PROP);<NEW_LINE>refProp.setAttribute(ATTR_CONFIG_PROP_NAME, propName);<NEW_LINE>Ele... | String propName = propertyMetadata.getName(); |
1,638,185 | public Map<String, Map<String, PropertyMapping>> mappingsForFunction() {<NEW_LINE>Map<String, Map<String, PropertyMapping>> ret = new HashMap<>();<NEW_LINE>Map<String, PropertyMapping> map = new HashMap<>();<NEW_LINE>val sameMode = PropertyMapping.builder().tfAttrName("padding").propertyNames(new String[] { "isSameMode... | map.put("isSameMode", sameMode); |
50,041 | public ListAssessmentFrameworksResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListAssessmentFrameworksResult listAssessmentFrameworksResult = new ListAssessmentFrameworksResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu... | JsonToken token = context.getCurrentToken(); |
1,413,273 | public void restored() {<NEW_LINE>// Setup the default KeywordSearch configuration files<NEW_LINE>KeywordSearchSettings.setDefaults();<NEW_LINE>final Server server = KeywordSearch.getServer();<NEW_LINE>ExecutorService jobProcessingExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat(KWS... | Level.SEVERE, "Failed to start Keyword Search server: ", ex); |
348,420 | public boolean visit(SwitchStatement node) {<NEW_LINE>handleBracedCode(node, node.getExpression(), this.options.brace_position_for_switch, this.options.indent_switchstatements_compare_to_switch);<NEW_LINE>List<Statement<MASK><NEW_LINE>if (this.options.indent_switchstatements_compare_to_cases) {<NEW_LINE>int nonBreakSta... | > statements = node.statements(); |
594,222 | public static DescribeDomainISPDataResponse unmarshall(DescribeDomainISPDataResponse describeDomainISPDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDomainISPDataResponse.setRequestId(_ctx.stringValue("DescribeDomainISPDataResponse.RequestId"));<NEW_LINE>describeDomainISPDataResponse.setDomainName(_ctx.stri... | (_ctx.stringValue("DescribeDomainISPDataResponse.StartTime")); |
605,022 | protected PaletteStack createMarqueeSelectionStack() {<NEW_LINE>PaletteStack stack = new PaletteStack(Messages.AbstractPaletteRoot_0, Messages.AbstractPaletteRoot_1, null);<NEW_LINE>MarqueeToolEntry marquee = new MarqueeToolEntry(Messages.AbstractPaletteRoot_2);<NEW_LINE>marquee.setToolProperty(MarqueeSelectionTool.PRO... | .valueOf(MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS)); |
1,227,669 | public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {<NEW_LINE>// Get the connected device<NEW_LINE>BluetoothDevice device = gatt.getDevice();<NEW_LINE>String address = device.getAddress();<NEW_LINE>HashMap<Object, Object> connection = connections.get(address);<... | keyValue, characteristic.getValue()); |
868,887 | public RowBasedMatrix calulate(int rowId, Vector other, Binary op) {<NEW_LINE>assert other != null;<NEW_LINE>RBCompIntFloatMatrix res;<NEW_LINE>if (op.isInplace()) {<NEW_LINE>res = this;<NEW_LINE>} else {<NEW_LINE>res = new RBCompIntFloatMatrix(matrixId, clock, rows.length<MASK><NEW_LINE>}<NEW_LINE>if (null == rows[row... | , (int) cols, subDim); |
778,630 | void cacheBeanUpdate(String key, Map<String, Object> changes, boolean updateNaturalKey, long version) {<NEW_LINE>ServerCache cache = getBeanCache();<NEW_LINE>CachedBeanData existingData = (CachedBeanData) cache.get(key);<NEW_LINE>if (existingData != null) {<NEW_LINE>long currentVersion = existingData.getVersion();<NEW_... | existingData.update(changes, version); |
14,874 | private void checkNav() {<NEW_LINE>if (context.profile == EPUBProfile.EDUPUB || context.pubTypes.contains(OPFData.DC_TYPE_EDUPUB)) {<NEW_LINE>Set<Feature> sections = context.featureReport.getFeature(FeatureEnum.SECTIONS);<NEW_LINE>Set<Feature> tocLinks = context.featureReport.getFeature(FeatureEnum.TOC_LINKS);<NEW_LINE... | getLocation().get()); |
1,621,346 | public Root unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Root root = new Root();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == ... | int originalDepth = context.getCurrentDepth(); |
154,535 | public void rollback() throws ResourceException {<NEW_LINE>svLogger.entering(CLASSNAME, "rollback", new Object[] { this, ivMC });<NEW_LINE>ResourceException re;<NEW_LINE>try {<NEW_LINE>synchronized (ivMC) {<NEW_LINE>re = ivStateManager.isValid(StateManager.LT_ROLLBACK);<NEW_LINE>if (re == null) {<NEW_LINE>ivConnection.... | svLogger.exiting(CLASSNAME, "rollback"); |
1,435,896 | public boolean initializeCamera(boolean isPortrait) {<NEW_LINE>this.isPortrait = isPortrait;<NEW_LINE>// Open camera<NEW_LINE>if (mCamera == null) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Log.i(TAG, "Open camera...");<NEW_LINE>mCamera = Camera.open();<NEW_LINE>if (mCamera == null) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Log.w(TAG... | .height * pixelinfo.bitsPerPixel / 8; |
668,614 | private List<LSCompletionItem> populateSelfClassSymbolCompletionItems(Symbol symbol, BallerinaCompletionContext ctx, TypeSymbol rawType) {<NEW_LINE>Optional<ModuleMemberDeclarationNode> moduleMember = ctx.enclosedModuleMember();<NEW_LINE>if (moduleMember.isEmpty() || (!CommonUtil.isSelfClassSymbol(symbol, ctx, moduleMe... | ObjectFieldCompletionItem(ctx, classFieldSymbol, completionItem); |
407,932 | private void replaceNull(LocalValue<?> key, Object value, int index) {<NEW_LINE>Entry[] tab = table;<NEW_LINE>int len = tab.length;<NEW_LINE>Entry e;<NEW_LINE>int slotToExpunge = index;<NEW_LINE>for (int i = prevIndex(index, len); (e = tab[i]) != null; i = prevIndex(i, len)) if (e.k == null) {<NEW_LINE>slotToExpunge = ... | <?> k = e.k; |
20,668 | public static Collection<? extends CodeTransformer> extractRules(ClassTree tree, Context context) {<NEW_LINE>ClassSymbol sym = ASTHelpers.getSymbol(tree);<NEW_LINE>RefasterRuleBuilderScanner scanner = new RefasterRuleBuilderScanner(context);<NEW_LINE>// visit abstract methods first<NEW_LINE>ImmutableList<MethodTree> me... | sym.type.getTypeArguments()); |
1,412,630 | public boolean init() {<NEW_LINE>Intent orbot = OrbotHelper.getOrbotStartIntent(context);<NEW_LINE>if (validateOrbot) {<NEW_LINE>ArrayList<String> hashes = new ArrayList<String>();<NEW_LINE>// Tor Project signing key<NEW_LINE>hashes.add("A4:54:B8:7A:18:47:A8:9E:D7:F5:E7:0F:BA:6B:BA:96:F3:EF:29:C2:6E:09:81:20:4F:E3:47:B... | context, orbot, hashes, false); |
333,450 | public MultiTreeSPEntry[] calcPaths(int[] from, int[] to) {<NEW_LINE>for (int i = 0; i < from.length; i++) {<NEW_LINE>if (from[i] == -1)<NEW_LINE>continue;<NEW_LINE>// If two queried points are on the same node, this case can occur<NEW_LINE>MultiTreeSPEntry existing = bestWeightMapFrom.get(from[i]);<NEW_LINE>if (existi... | mspTree = bestWeightMapFrom.get(sourceNode); |
886,402 | public static Renderable createCompletionDocumentation(String id, Renderable description, Object defaultValue, Deprecation deprecation) {<NEW_LINE>Builder<Renderable> renderableBuilder = ImmutableList.builder();<NEW_LINE>boolean idInserted = false;<NEW_LINE>if (deprecation != null && deprecation.getReplacement() != nul... | > pieces = renderableBuilder.build(); |
14,954 | public Request<DescribeManagedJobTemplateRequest> marshall(DescribeManagedJobTemplateRequest describeManagedJobTemplateRequest) {<NEW_LINE>if (describeManagedJobTemplateRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DescribeManagedJobTemplateRequest)");<NEW_LINE>}<NEW_L... | (describeManagedJobTemplateRequest.getTemplateName())); |
572,118 | private Position decodeInfo(Channel channel, SocketAddress remoteAddress, String sentence) {<NEW_LINE>Position position <MASK><NEW_LINE>getLastLocation(position, null);<NEW_LINE>DeviceSession deviceSession;<NEW_LINE>if (sentence.startsWith("$INFO")) {<NEW_LINE>Parser parser = new Parser(PATTERN_INFO, sentence);<NEW_LIN... | = new Position(getProtocolName()); |
64,075 | private void writeColumn(String fileName, Column<?> column) {<NEW_LINE>try {<NEW_LINE>final String typeName = column.type().name();<NEW_LINE>switch(typeName) {<NEW_LINE>case FLOAT:<NEW_LINE>writeColumn(fileName, (FloatColumn) column);<NEW_LINE>break;<NEW_LINE>case DOUBLE:<NEW_LINE>writeColumn(fileName, (DoubleColumn) c... | (fileName, (LongColumn) column); |
1,044,929 | protected Map<TargetClass, List<TypeCompound>> sift(Iterable<Attribute.TypeCompound> typeCompounds) {<NEW_LINE>// this will sift out the annotations that do not have the right position index<NEW_LINE>final Map<TargetClass, List<Attribute.TypeCompound>> targetClassToAnnos = super.sift(typeCompounds);<NEW_LINE>final List... | targetClassToAnnos.get(TargetClass.TARGETED); |
1,561,546 | public void initScene() {<NEW_LINE>DirectionalLight light = new DirectionalLight(.1f, .1f, -1);<NEW_LINE>light.setPower(2);<NEW_LINE>getCurrentScene().addLight(light);<NEW_LINE>Material timeSphereMaterial = new Material();<NEW_LINE>timeSphereMaterial.enableLighting(true);<NEW_LINE>timeSphereMaterial.setDiffuseMethod(ne... | getCurrentScene().addChild(timeSphere); |
555,360 | static void updateAppWidget(Context context, AppWidgetManager awm, int[] appWidgetIds) {<NEW_LINE>final var repo = NotesRepository.getInstance(context);<NEW_LINE>RemoteViews views;<NEW_LINE>for (int appWidgetId : appWidgetIds) {<NEW_LINE>try {<NEW_LINE>final var data = repo.getNoteListWidgetData(appWidgetId);<NEW_LINE>... | R.id.note_list_widget_lv, serviceIntent); |
1,066,018 | public void acceptComment(final RequestContext context) {<NEW_LINE>context.renderJSON(StatusCodes.ERR);<NEW_LINE>final JSONObject requestJSONObject = context.requestJSON();<NEW_LINE>final JSONObject currentUser = Sessions.getUser();<NEW_LINE>final String userId = currentUser.optString(Keys.OBJECT_ID);<NEW_LINE>final St... | comment.optString(Comment.COMMENT_ON_ARTICLE_ID); |
995,263 | public DimensionValues unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DimensionValues dimensionValues = new DimensionValues();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
276,307 | private void runActionIfLeaderAndMesosIsRunning() {<NEW_LINE>final boolean leadership = leaderLatch.hasLeadership();<NEW_LINE>final boolean schedulerRunning = mesosScheduler.isRunning();<NEW_LINE>if (!leadership || !schedulerRunning || !isEnabled()) {<NEW_LINE>LOG.trace("Skipping {} (period: {}) (leadership: {}, mesos ... | .getSimpleName()), t); |
1,092,687 | public void doInAfterTrace(SpanEventRecorder recorder, Object target, Object[] args, Object result, Throwable throwable) {<NEW_LINE>if (collectJson) {<NEW_LINE>final boolean success = InterceptorUtils.isSuccess(throwable);<NEW_LINE>if (success) {<NEW_LINE>if (args != null) {<NEW_LINE>NormalizedBson parsedBson = MongoUt... | MongoUtil.recordParsedBson(recorder, parsedBson); |
1,419,261 | public static Collection<DoctrineModelInterface> findMetadataModelForRepositoryClass(@NotNull final Project project, @NotNull String repositoryClass) {<NEW_LINE>repositoryClass = <MASK><NEW_LINE>Collection<DoctrineModelInterface> models = new ArrayList<>();<NEW_LINE>for (String key : FileIndexCaches.getIndexKeysCache(p... | StringUtils.stripStart(repositoryClass, "\\"); |
162,300 | public void testCMTOnMessage() throws Exception {<NEW_LINE>String deliveryID = "test07";<NEW_LINE>prepareTRA();<NEW_LINE>// construct a FVTMessage<NEW_LINE>FVTMessage message = new FVTMessage();<NEW_LINE><MASK><NEW_LINE>// Add a FVTXAResourceImpl for this delivery.<NEW_LINE>message.addXAResource("MDBTimedCMTBean", 47, ... | message.addTestResult("MDBTimedCMTBean", 47); |
1,138,415 | private void drawPoints(float[] verArray, byte[] colorArray) {<NEW_LINE>if (colorArray != null) {<NEW_LINE>ByteBuffer tex = ByteBuffer.allocateDirect(colorArray.length);<NEW_LINE>tex.order(ByteOrder.nativeOrder());<NEW_LINE>tex.put(colorArray);<NEW_LINE>tex.position(0);<NEW_LINE>GLES10.glEnableClientState(GLES10.GL_COL... | allocateDirect(verArray.length * 4); |
384,457 | public String summaryDescription() {<NEW_LINE>// 5Y USD 2mm Rec USD-LIBOR-6M / Pay 1% : 21Jan17-21Jan22<NEW_LINE>StringBuilder buf = new StringBuilder(64);<NEW_LINE>buf.append(SummarizerUtils.datePeriod(getStartDate().getUnadjusted(), getEndDate().getUnadjusted()));<NEW_LINE>buf.append(' ');<NEW_LINE>if (getLegs().size... | .append(legSummary(payLeg)); |
587,915 | private void pollAndNotifyNetworkInterfaceAddress() {<NEW_LINE>Collection<CidrAddress> newInterfaceAddresses = getAllInterfaceAddresses();<NEW_LINE>if (networkAddressChangeListeners.isEmpty()) {<NEW_LINE>// no listeners listening, just update<NEW_LINE>lastKnownInterfaceAddresses = newInterfaceAddresses;<NEW_LINE>return... | (removed.toArray())); |
1,853,772 | private void addToFreeList(OAtomicOperation atomicOperation, int pageIndex) throws IOException {<NEW_LINE>final OCacheEntry cacheEntry = loadPageForWrite(atomicOperation, fileId, pageIndex, false, true);<NEW_LINE>try {<NEW_LINE>final CellBTreeSingleValueBucketV3<K> bucket = new CellBTreeSingleValueBucketV3<>(cacheEntry... | = new CellBTreeSingleValueEntryPointV3<>(entryPointEntry); |
930,915 | public static void copyFile(File srcFile, File destFile, boolean createCopy) throws IOException {<NEW_LINE>if (createCopy) {<NEW_LINE>if (srcFile.equals(destFile) || destFile.exists()) {<NEW_LINE>int i = 1;<NEW_LINE>String name = getFileNameWithoutExtension(srcFile);<NEW_LINE>String ext = getFileExtension(srcFile);<NEW... | write(buf, 0, size); |
62,765 | private void importLocations() {<NEW_LINE>String envVar = (String) JOptionPane.showInputDialog(this, "<html>Enter value:<br><br>Example: SVR*c:\\symbols*https://msdl.microsoft.com/download/symbols/<br><br>", "Enter Symbol Server Search Path Value", JOptionPane.QUESTION_MESSAGE, null, null, Objects.requireNonNullElse(Sy... | ).getRootDir(), true); |
1,451,277 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "ble");<NEW_LINE>Long baseOffset = instruction.ge... | getChildren().get(0); |
1,438,087 | private int appyReplacements(final Document result, final TextContent modelContent, final int rangeStart, final int rangeEnd, final int cursor) {<NEW_LINE>final NodeList replacements = result.getFirstChild().getChildNodes();<NEW_LINE>int newCursor = cursor;<NEW_LINE>//<NEW_LINE>// Applying replacements in reverse order... | replacements.item(i - 1); |
1,056,883 | public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {<NEW_LINE>MethodVisitor mv = super.visitMethod(access, name, descriptor, signature, exceptions);<NEW_LINE>if (name.equals(Java_Version == 8 ? "getRootDocImpl" : "getEnvironment")) {<NEW_LINE>return new M... | GETFIELD, JavadocTool_class, "context", "Lcom/sun/tools/javac/util/Context;"); |
1,172,671 | public void success(Object response) {<NEW_LINE>if (response != null) {<NEW_LINE>Map<String, Object> responseMap = (Map<String, Object>) response;<NEW_LINE>Integer action = (Integer) responseMap.get("action");<NEW_LINE>if (action != null) {<NEW_LINE>switch(action) {<NEW_LINE>case 1:<NEW_LINE>String username = (String) ... | view, handler, host, realm); |
994,466 | public com.amazonaws.services.kms.model.CloudHsmClusterInvalidConfigurationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.kms.model.CloudHsmClusterInvalidConfigurationException cloudHsmClusterInvalidConfigurationException = new com.amazonaws.services.... | String currentParentElement = context.getCurrentParentElement(); |
183,541 | public static void applyJoinResultCodegen(ResultSetProcessorAggregateGroupedForge forge, CodegenClassScope classScope, CodegenMethod method, CodegenInstanceAux instance) {<NEW_LINE>method.getBlock().ifCondition(not(exprDotMethod(REF_NEWDATA, "isEmpty"))).forEach(MultiKeyArrayOfKeys.EPTYPE, "aNewEvent", REF_NEWDATA).dec... | .blockEnd().blockEnd(); |
63,352 | public static byte[] toPdf(String fileName, byte[] bytes, String stamp) throws Exception {<NEW_LINE>Config.collect().validate();<NEW_LINE>URL serverUrl = new URL(Config.collect().url() + "/o2_collect_assemble/jaxrs/document/to/pdf");<NEW_LINE>HttpURLConnection connection = (HttpURLConnection) serverUrl.openConnection()... | write("Content-Type: " + HttpMediaType.APPLICATION_OCTET_STREAM); |
993,351 | public static ClassNode parameterizeType(final ClassNode hint, final ClassNode target) {<NEW_LINE>if (hint.isArray()) {<NEW_LINE>if (target.isArray()) {<NEW_LINE>return parameterizeType(hint.getComponentType(), target.getComponentType()).makeArray();<NEW_LINE>}<NEW_LINE>return target;<NEW_LINE>}<NEW_LINE>if (hint.isGen... | ClassHelper.getNextSuperClass(target, hint); |
1,769,825 | private ArrayList<TorrentFile> parseJsonFileListing(JSONArray results, Torrent torrent) throws JSONException {<NEW_LINE>// Parse response<NEW_LINE>ArrayList<TorrentFile> files = new ArrayList<>();<NEW_LINE>boolean createPaths = torrent != null && torrent.getLocationDir() != null && !torrent.getLocationDir().equals("");... | .getInt(RPC_FILEPRIORITY_IDX)))); |
95,016 | public void process(ComplexEventChunk complexEventChunk) {<NEW_LINE>ComplexEventChunk<ComplexEvent> outputEventChunk = new ComplexEventChunk<>();<NEW_LINE>complexEventChunk.reset();<NEW_LINE>RateLimiterState state = stateHolder.getState();<NEW_LINE>try {<NEW_LINE>synchronized (state) {<NEW_LINE>complexEventChunk.reset(... | scheduler.notifyAt(state.scheduledTime); |
1,111,209 | final DeleteVaultResult executeDeleteVault(DeleteVaultRequest deleteVaultRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVaultRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
845,233 | private void initTypeAnnotation(NdTypeAnnotation annotation, IBinaryTypeAnnotation next) {<NEW_LINE>int[<MASK><NEW_LINE>if (typePath != null && typePath.length > 0) {<NEW_LINE>byte[] bytePath = new byte[typePath.length];<NEW_LINE>for (int idx = 0; idx < bytePath.length; idx++) {<NEW_LINE>bytePath[idx] = (byte) typePath... | ] typePath = next.getTypePath(); |
1,658,392 | public void submitCompaction(CompactionKind kind, Compactable compactable, Consumer<Compactable> completionCallback) {<NEW_LINE>Objects.requireNonNull(compactable);<NEW_LINE>// add tablet to planning queue and use planningExecutor to get the plan<NEW_LINE>if (queuedForPlanning.get(kind).putIfAbsent(compactable.getExten... | remove(compactable.getExtent()); |
613,115 | public static void serializeRowish(JsonGenerator jgen, NameMetadataDescription rowDescription, byte[] row) throws IOException {<NEW_LINE>int offset = 0;<NEW_LINE>byte[] flippedRow = null;<NEW_LINE>jgen.writeStartObject();<NEW_LINE>for (NameComponentDescription part : rowDescription.getRowParts()) {<NEW_LINE>if (part.is... | ).convertToJson(row, offset); |
859,795 | public static double[][] fft2barkmx(int nfft, int sr, int nfilts, int width, double minfreq, double maxfreq) {<NEW_LINE>int i, j, k;<NEW_LINE>double min_bark = hz2bark(minfreq);<NEW_LINE>double nyqbark = hz2bark(maxfreq) - min_bark;<NEW_LINE>double[][] wts = new double[nfilts][nfft];<NEW_LINE>for (i = 0; i < nfilts; i+... | double[(halfNfft + 1)]; |
991,176 | private IImConnection findConnectionForGroupChat(String user, String host) {<NEW_LINE>Collection<IImConnection> connActive = mApp.getActiveConnections();<NEW_LINE>ContentResolver cr = this.getContentResolver();<NEW_LINE>IImConnection result = null;<NEW_LINE>for (IImConnection conn : connActive) {<NEW_LINE>try {<NEW_LIN... | getProviderId()) }, null); |
1,609,849 | final ListAlgorithmsResult executeListAlgorithms(ListAlgorithmsRequest listAlgorithmsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAlgorithmsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAlgorithms"); |
669,347 | public JSDynamicObject toZonedDateTime(Object thisObj, Object itemParam, @Cached("create(getContext())") ToTemporalDateNode toTemporalDate, @Cached("create(getContext())") ToTemporalTimeZoneNode toTemporalTimeZone) {<NEW_LINE>TemporalTime time = requireTemporalTime(thisObj);<NEW_LINE>if (!JSRuntime.isObject(itemParam))... | timeZone = toTemporalTimeZone.executeDynamicObject(temporalTimeZoneLike); |
1,574,663 | final ListServiceActionsResult executeListServiceActions(ListServiceActionsRequest listServiceActionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listServiceActionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
559,971 | public void runCommand(CommandSender sender, List<String> args) {<NEW_LINE>sender.<MASK><NEW_LINE>this.plugin.loadConfigs();<NEW_LINE>this.plugin.getAnchorManager().loadAnchors();<NEW_LINE>this.plugin.getMVWorldManager().loadWorlds(true);<NEW_LINE>List<String> configsLoaded = new ArrayList<String>();<NEW_LINE>configsLo... | sendMessage(ChatColor.GOLD + "Reloading all Multiverse Plugin configs..."); |
1,397,837 | protected final List<String> tabCompleteCommand(final CommandSource sender, final Server server, final String label, final String[] args, final int index) {<NEW_LINE>// TODO: Pass this to the real commandmap<NEW_LINE>final Command command = server.getPluginCommand(label);<NEW_LINE>if (command == null) {<NEW_LINE>return... | getSender(), label, effectiveArgs); |
275,573 | public BeamSqlTable buildBeamSqlTable(Table tableDefinition) {<NEW_LINE>JSONObject tableProperties = tableDefinition.getProperties();<NEW_LINE>try {<NEW_LINE>RowJson.RowJsonDeserializer deserializer = RowJson.RowJsonDeserializer.forSchema(getSchemaIOProvider().configurationSchema()).withNullBehavior(RowJson.RowJsonDese... | toString(), Row.class); |
1,488,590 | final ImportCertificateAuthorityCertificateResult executeImportCertificateAuthorityCertificate(ImportCertificateAuthorityCertificateRequest importCertificateAuthorityCertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importCertificateAuthorityCertificateRequest);<NEW_LINE>AWSReque... | addHandlerContext(HandlerContextKey.SERVICE_ID, "ACM PCA"); |
506,257 | public void doApkBuild() throws Exception {<NEW_LINE>// TODO Merge 2 zip packages<NEW_LINE>apkFile = getApkFile();<NEW_LINE>diffAPkFile = getDiffAPkFile();<NEW_LINE>Profiler.start("build tpatch apk");<NEW_LINE>Profiler.enter("prepare dir");<NEW_LINE>File tmpWorkDir = new File(diffAPkFile.getParentFile(), "tmp-apk");<NE... | FileUtils.moveDirectory(tmpWorkDir, diffAPkFile); |
444,208 | private void runMapreduce(ImmutableList<DeletionRequest> deletionRequests, Optional<Lock> lock) {<NEW_LINE>try {<NEW_LINE>int numReducers = Math.min(MAX_REDUCE_SHARDS, divide(deletionRequests.size(), DELETES_PER_SHARD, CEILING));<NEW_LINE>mrRunner.setJobName("Check for EPP resource references and then delete").setModul... | ))).sendLinkToMapreduceConsole(response); |
1,019,915 | public void cleanAutoDeclareContext(ConsumerDestination destination, ExtendedConsumerProperties<RabbitConsumerProperties> consumerProperties) {<NEW_LINE>synchronized (this.autoDeclareContext) {<NEW_LINE>Stream.of(StringUtils.tokenizeToStringArray(destination.getName(), ",", true, true)).forEach(name -> {<NEW_LINE>Strin... | RabbitConsumerDestination) destination).getBindingName(); |
72,924 | protected final void generateDeclarations(StringBuilder sb) {<NEW_LINE>if (parametersMap != null && parametersMap.size() > 0) {<NEW_LINE>Collection<String> parameterNames = parametersMap.keySet();<NEW_LINE>for (Iterator<String> it = parameterNames.iterator(); it.hasNext(); ) {<NEW_LINE>sb.append(" private JRFillPara... | (it.next())); |
75,527 | protected static boolean isCglibGetCallbacks(AnnotatedMethod am) {<NEW_LINE>Class<?> rt = am.getRawType();<NEW_LINE>// Ok, first: must return an array type<NEW_LINE>if (rt.isArray()) {<NEW_LINE>// And that type needs to be "net.sf.cglib.proxy.Callback".<NEW_LINE>// Theoretically could just be a type that implements it,... | > compType = rt.getComponentType(); |
408,275 | public static synchronized void updatePeerInfo(InetAddressAndPort ep, String columnName, Object value) {<NEW_LINE>if (ep.equals(FBUtilities.getBroadcastAddressAndPort()))<NEW_LINE>return;<NEW_LINE>String req = "INSERT INTO %s.%s (peer, %s) VALUES (?, ?)";<NEW_LINE>executeInternal(String.format(req, SYSTEM_KEYSPACE_NAME... | address, ep.port, value); |
1,381,736 | public int compareTo(ErrorInfo other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = Boolean.valueOf(is_set_error()).compareTo(other.is_set_error());<NEW_LINE>if (las... | this.error, other.error); |
1,488,074 | public Secret generateBrokersSecret(ClusterCa clusterCa, ClientsCa clientsCa) {<NEW_LINE>Map<String, String> data = new HashMap<>(replicas * 4);<NEW_LINE>for (int i = 0; i < replicas; i++) {<NEW_LINE>CertAndKey cert = brokerCerts.get(KafkaCluster.kafkaPodName(cluster, i));<NEW_LINE>data.put(KafkaCluster.kafkaPodName(cl... | ".password", cert.storePasswordAsBase64String()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.