idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
366,584 | private String findFamilyName(@Nullable PsiElement expression, @Nullable DartType type) {<NEW_LINE>if (expression == null && type != null) {<NEW_LINE>LOG.info("Check superclass constructor for font family: " + type.getName());<NEW_LINE>// TODO Check superclass of <type> for a constructor that includes the family.<NEW_L... | assert expression.getText() != null; |
1,685,564 | protected void drawFigure(Graphics graphics) {<NEW_LINE>graphics.pushState();<NEW_LINE>Rectangle bounds = getBounds().getCopy();<NEW_LINE>bounds.width--;<NEW_LINE>bounds.height--;<NEW_LINE>// Set line width here so that the whole figure is constrained, otherwise SVG graphics will have overspill<NEW_LINE>int lineWidth =... | Path path = new Path(null); |
1,784,845 | private Changes analyse(@NonNull final Context ctx, @NonNull final RootProcessor p, Predicate<ClassFile> accept) throws IOException, IllegalArgumentException {<NEW_LINE>// NOI18N<NEW_LINE>Parameters.notNull("ctx", ctx);<NEW_LINE>if (p.execute(accept)) {<NEW_LINE>if (!p.hasChanges() && timeStampsEmpty()) {<NEW_LINE>asse... | > newState = p.result(); |
1,563,290 | private String calcActionQualifiedPath(String id) {<NEW_LINE>for (Object child : myChildren) {<NEW_LINE>if (child instanceof QuickList) {<NEW_LINE>child = ((QuickList) child).getActionId();<NEW_LINE>}<NEW_LINE>if (child instanceof String) {<NEW_LINE>if (id.equals(child)) {<NEW_LINE>AnAction action = ActionManager.getIn... | () + " | " + path : path; |
634,498 | public static boolean isSymbolicLink(File file) throws IOException {<NEW_LINE>// first try using Java 7<NEW_LINE>try {<NEW_LINE>// use reflection here<NEW_LINE>Class<?> filesClass = Class.forName("java.nio.file.Files");<NEW_LINE>Class<?> pathClass = Class.forName("java.nio.file.Path");<NEW_LINE>Object path = File.class... | Throwable cause = exception.getCause(); |
380,125 | private E readSchemeFromFile(@Nonnull final File file, boolean forceAdd, boolean duringLoad) {<NEW_LINE>if (!canRead(file)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Element element;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (JDOMException e) {<NEW_LINE>try {<NEW_LINE>FileUtil.copy(file, new File... | element = JDOMUtil.load(file); |
321,678 | public OAuth2Authentication consumeAuthorizationCode(String code) throws InvalidGrantException {<NEW_LINE>performExpirationClean();<NEW_LINE>JdbcTemplate template = new JdbcTemplate(dataSource);<NEW_LINE>try {<NEW_LINE>TokenCode tokenCode = (TokenCode) template.queryForObject(SQL_SELECT_STATEMENT, rowMapper, code);<NEW... | template.update(SQL_DELETE_STATEMENT, code); |
25,855 | public Tuple<List<AggregationBuilder>, List<PipelineAggregationBuilder>> aggs(EvaluationParameters parameters, EvaluationFields evaluationFields) {<NEW_LINE>if (result.get() != null) {<NEW_LINE>return Tuple.tuple(List.of(), List.of());<NEW_LINE>}<NEW_LINE>// Store given {@code fields} for the purpose of generating erro... | ()).percentiles(percentiles); |
95,522 | private void initWindow() {<NEW_LINE>logger.info("Initializing display (if last line in log then likely the game crashed from an issue with your " + "video card)");<NEW_LINE>// set opengl core profile to 3.3<NEW_LINE>GLFW.glfwWindowHint(GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3);<NEW_LINE>GLFW.glfwWindowHint(GLFW.GLFW_CONTEXT... | .getResourceAsStream(root + "gooey_sweet_16.png")); |
1,829,643 | public void doRender(HumanoidModel<?> bipedModel, ItemStack stack, LivingEntity living, PoseStack ms, MultiBufferSource buffers, int light, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) {<NEW_LINE>boolean armor = !living.getItemBySlot(EquipmentSlot.CHES... | getBuffer(Sheets.cutoutBlockSheet()); |
570,045 | public WsByteBuffer buildFrameForWrite() {<NEW_LINE>WsByteBuffer buffer = super.buildFrameForWrite();<NEW_LINE>byte[] frame;<NEW_LINE>if (buffer.hasArray()) {<NEW_LINE>frame = buffer.array();<NEW_LINE>} else {<NEW_LINE>frame = super.createFrameArray();<NEW_LINE>}<NEW_LINE>// add the first 9 bytes of the array<NEW_LINE>... | Move31BitstoByteArray(streamDependency, frame, frameIndex); |
725,539 | public void checkElementToPathToElementEquivalence() {<NEW_LINE>_rootPackage.getPackage("spoon").getElements(e -> true).parallelStream().forEach(element -> {<NEW_LINE>CtPath path = element.getPath();<NEW_LINE>String pathStr = path.toString();<NEW_LINE>try {<NEW_LINE>CtPath pathRead = new CtPathStringBuilder().fromStrin... | 1, returnedElements.size()); |
629,139 | void rfftf(final double[] a, final int offa) {<NEW_LINE>if (n == 1)<NEW_LINE>return;<NEW_LINE>int l1, l2, na, kh, nf, ip, iw, ido, idl1;<NEW_LINE>final int twon = 2 * n;<NEW_LINE>nf = (int) wtable_r[1 + twon];<NEW_LINE>na = 1;<NEW_LINE>l2 = n;<NEW_LINE>iw = twon - 1;<NEW_LINE>for (int k1 = 1; k1 <= nf; ++k1) {<NEW_LINE... | -= (ip - 1) * ido; |
792,888 | public void doXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject(NAME);<NEW_LINE>builder.field(QUERY_FIELD.getPreferredName(), value);<NEW_LINE>builder.<MASK><NEW_LINE>for (Map.Entry<String, Float> fieldEntry : this.fieldsAndBoosts.entrySet()) {<NEW_LINE>builder.value(fie... | startArray(FIELDS_FIELD.getPreferredName()); |
1,638,996 | public List<NetworkAddressAlias> loadLastUpdate(long lastUpdateTime) {<NEW_LINE>List<NetworkAddressAlias> networkAddressAliases = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>StringBuilder sql = new StringBuilder("select * from ");<NEW_LINE>sql.append(NetworkAddressAlias.INDEX_NAME);<NEW_LINE>sql.append(" where ").append... | , new NetworkAddressAlias.Builder()); |
1,745,751 | private Map<String, Float> sortAcceptableEncodings(Map<String, Float> encodings) {<NEW_LINE>// List of map elements<NEW_LINE>List<Map.Entry<String, Float>> list = new LinkedList<Map.Entry<String, Float>>(encodings.entrySet());<NEW_LINE>Collections.sort(list, new Comparator<Map.Entry<String, Float>>() {<NEW_LINE><NEW_LI... | LinkedHashMap<String, Float>(); |
1,221,039 | void kmeans(FArray x, FArray c, int n, int d) {<NEW_LINE>int[<MASK><NEW_LINE>IntVector perm = new IntVector(values);<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>perm.safeSet(i, i);<NEW_LINE>}<NEW_LINE>perm.shuffle(rng);<NEW_LINE>for (int i = 0; i < ksub_; i++) {<NEW_LINE>// x -> src<NEW_LINE>// x -> src<NEW_LINE>x.... | ] values = new int[n]; |
1,201,495 | public static AddSipAgentGroupResponse unmarshall(AddSipAgentGroupResponse addSipAgentGroupResponse, UnmarshallerContext context) {<NEW_LINE>addSipAgentGroupResponse.setRequestId(context.stringValue("AddSipAgentGroupResponse.RequestId"));<NEW_LINE>addSipAgentGroupResponse.setSuccess(context.booleanValue("AddSipAgentGro... | (context.stringValue("AddSipAgentGroupResponse.Message")); |
53,781 | public int compare(Object lhsObj, Object rhsObj) {<NEW_LINE>InstantConverter conv = ConverterManager.getInstance().getInstantConverter(lhsObj);<NEW_LINE>Chronology lhsChrono = conv.getChronology(lhsObj, (Chronology) null);<NEW_LINE>long lhsMillis = conv.getInstantMillis(lhsObj, lhsChrono);<NEW_LINE>// handle null==null... | conv.getInstantMillis(rhsObj, rhsChrono); |
219,211 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>// Setting IpAddress To Log and taking header for original IP if forwarded from proxy<NEW_LINE>ShepherdLogManager.setRequestIp(request.getRemoteAddr(), request.getHeader("X-Forwarded-For"));<NEW_... | ApplicationRoot, myMessage, userId, moduleId); |
1,216,364 | public void regenerated(final IZyNodeRealizer realizer) {<NEW_LINE>// When the realizer of a node was regenerated, all the information<NEW_LINE>// from the debugger disappeared from the node. That means we have<NEW_LINE>// to re-add them at this point.<NEW_LINE>final IDebugger activeDebugger = m_debugPerspective.getCur... | memoryToFile(currentThread.getCurrentAddress()); |
424,008 | public WorkerInfo generateWorkerInfo(Set<WorkerInfoField> fieldRange, boolean isLiveWorker) {<NEW_LINE>WorkerInfo info = new WorkerInfo();<NEW_LINE>Set<WorkerInfoField> checkedFieldRange = fieldRange != null ? fieldRange : new HashSet<>(Arrays.asList(WorkerInfoField.values()));<NEW_LINE>for (WorkerInfoField field : che... | info.setAddress(mMeta.mWorkerAddress); |
399,372 | Guard anonfun_0(Guard pc_3, EventBuffer effects, EventHandlerReturnReason outcome, NamedTupleVS var_payload) {<NEW_LINE>PrimitiveVS<Machine> var_$tmp0 = new PrimitiveVS<Machine>().restrict(pc_3);<NEW_LINE>PrimitiveVS<Machine> var_$tmp1 = new PrimitiveVS<Machine>().restrict(pc_3);<NEW_LINE>PrimitiveVS<Integer> var_$tmp2... | )).getField("coor")); |
1,541,066 | public static void clearTermuxTMPDIR(boolean onlyIfExists) {<NEW_LINE>// Existence check before clearing may be required since clearDirectory() will automatically<NEW_LINE>// re-create empty directory if doesn't exist, which should not be done for things like<NEW_LINE>// termux-reset (d6eb5e35). Moreover, TMPDIR must b... | Logger.logInfo(LOG_TAG, "Not clearing termux $TMPDIR"); |
1,624,413 | private NLGElement doMorphology(InflectedWordElement element) {<NEW_LINE>NLGElement realisedElement = null;<NEW_LINE>if (element.getFeatureAsBoolean(InternalFeature.NON_MORPH).booleanValue()) {<NEW_LINE>realisedElement = new StringElement(element.getBaseForm());<NEW_LINE>realisedElement.setFeature(InternalFeature.DISCO... | (element, (WordElement) baseWord); |
1,444,787 | public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {<NEW_LINE>MethodSymbol method = ASTHelpers.getSymbol(tree);<NEW_LINE>Type currentClass = getOutermostClass(state);<NEW_LINE>if (method.isStatic() || method.isConstructor() || currentClass == null) {<NEW_LINE>return Description.NO_M... | findDirectMethod(state.getPath()); |
573,749 | public MultiDataSet next(int num) {<NEW_LINE>Preconditions.checkState(hasNext(), "No next element available");<NEW_LINE>List<Pair<List<String>, String>> tokensAndLabelList;<NEW_LINE>int mbSize = 0;<NEW_LINE>int outLength;<NEW_LINE>long[] segIdOnesFrom = null;<NEW_LINE>if (sentenceProvider != null) {<NEW_LINE>List<Pair<... | convertMiniBatchLabels(tokensAndLabelList, featureArray, outLength); |
571,611 | public Description matchVariable(VariableTree tree, VisitorState state) {<NEW_LINE>VarSymbol symbol = getSymbol(tree);<NEW_LINE>if (!isConsideredFinal(symbol)) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_LINE>if (state.getPath().getParentPath().getLeaf() instanceof ClassTree) {<NEW_LINE>return NO_MATCH;<NEW_LINE>}<NEW_L... | ).getParentPath(), null); |
1,270,669 | final DisableProactiveEngagementResult executeDisableProactiveEngagement(DisableProactiveEngagementRequest disableProactiveEngagementRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disableProactiveEngagementRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
655,771 | public Mono<RxDocumentServiceResponse> performRequestInternal(RxDocumentServiceRequest request, HttpMethod method, URI requestUri) {<NEW_LINE>try {<NEW_LINE>HttpHeaders httpHeaders = this.getHttpRequestHeaders(request.getHeaders());<NEW_LINE>Flux<byte[]<MASK><NEW_LINE>HttpRequest httpRequest = new HttpRequest(method, r... | > contentAsByteArray = request.getContentAsByteArrayFlux(); |
633,637 | public static List<CachableRenderStatement> computeFluidOutlineToCache(@Nonnull CollidableComponent component, @Nonnull Fluid fluid, double scaleFactor, float outlineWidth) {<NEW_LINE>Map<Fluid, List<CachableRenderStatement>> cache0 = cache.get(component);<NEW_LINE>if (cache0 == null) {<NEW_LINE>cache0 = new HashMap<Fl... | )) == 1 ? width : scaleFactor; |
19,297 | public static void main(String[] args) {<NEW_LINE>JavaUmsField ele1 = new JavaUmsField(UmsSysField.ID().toString(), JavaUmsFieldType.LONG, false);<NEW_LINE>JavaUmsField ele2 = new JavaUmsField(UmsSysField.TS().toString(), JavaUmsFieldType.DATETIME, false);<NEW_LINE>JavaUmsField ele3 = new JavaUmsField(UmsSysField.OP().... | "key2", JavaUmsFieldType.STRING, false); |
1,572,705 | private void writeDependencies() {<NEW_LINE>final JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>panel.setOpaque(false);<NEW_LINE>final JPanel buttonsPanel = new JPanel(new BorderLayout());<NEW_LINE>buttonsPanel.setOpaque(false);<NEW_LINE>final MButton dependenciesButton = new MButton(getString("Dependencies")... | add(dependenciesButton, BorderLayout.WEST); |
1,764,975 | // Always accepts unprotected responses, which is needed for reception of error messages<NEW_LINE>@Override<NEW_LINE>public void receiveResponse(Exchange exchange, Response response) {<NEW_LINE>Request request = exchange.getCurrentRequest();<NEW_LINE>if (request == null) {<NEW_LINE>LOGGER.error("No request tied to this... | super.receiveResponse(exchange, response); |
250,553 | private void createDetailsTab(TabFolder tabs) {<NEW_LINE>Composite detailsGroup = new Composite(tabs, SWT.NONE);<NEW_LINE>detailsGroup.setLayout(new GridLayout(1, false));<NEW_LINE>UIUtils.createControlLabel(detailsGroup, UIConnectionMessages.dialog_edit_driver_label_description);<NEW_LINE>Text descriptionText = new Te... | SWT.READ_ONLY | SWT.BORDER); |
1,851,136 | private void initPlayServicesPrefsCallbacks() {<NEW_LINE>Preference pref = findPreference(getString(R.string.pref_play_services));<NEW_LINE>if (pref == null)<NEW_LINE>return;<NEW_LINE>if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(getActivity().getApplicationContext()) != ConnectionResult.SUCCESS... | setChecked(Config.useGoogleServices()); |
1,237,263 | private IRIx internalMakeIRI(String uriStr, long line, long col) {<NEW_LINE>if (uriStr.contains(" ")) {<NEW_LINE>// Specific check for spaces.<NEW_LINE>errorHandler.warning("Bad IRI: <" + <MASK><NEW_LINE>return IRIx.createAny(uriStr);<NEW_LINE>}<NEW_LINE>// Relative IRIs.<NEW_LINE>// jena-iri : these are errors on the<... | uriStr + "> Spaces are not legal in URIs/IRIs.", line, col); |
1,556,947 | private String debugStatsString() {<NEW_LINE>final Map<String, String> stats = new LinkedHashMap<>();<NEW_LINE>if (totalBytes > 0 && byteReaderCounter > 0) {<NEW_LINE>final ProgressInfo progressInfo = new ProgressInfo(startTime, totalBytes, byteReaderCounter);<NEW_LINE>stats.put("progress", progressInfo.debugOutput());... | , Integer.toString(lineReaderCounter)); |
1,795,763 | public String info() {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(format(ENGLISH, "Order : %d%n", order));<NEW_LINE>for (int i = 1; i < ngramData.length; i++) {<NEW_LINE>GramDataArray gramDataArray = ngramData[i];<NEW_LINE>if (i == 1) {<NEW_LINE>sb.append(format(ENGLISH, "1 Grams: Count= %d%n",... | (ENGLISH, "Stupid Back-off Alpha Value : %.2f%n", stupidBackoffAlpha)); |
1,351,606 | private CaseAnalysis analyzeCaseTwo() throws ExprValidationException {<NEW_LINE>// Case 2 expression example:<NEW_LINE>// case p when p1 then x [when p2 then y...] [else z]<NEW_LINE>//<NEW_LINE>ExprNode[] children = this.getChildNodes();<NEW_LINE>if (children.length < 3) {<NEW_LINE>throw new ExprValidationException("Ca... | i * 2 + 2])); |
731,240 | public void initialize(InputSplit split, TaskAttemptContext ctx) throws IOException, InterruptedException {<NEW_LINE>// set up columns that needs to read from the RCFile.<NEW_LINE>tDesc = TStructDescriptor.getInstance(typeRef.getRawClass());<NEW_LINE>thriftWritable = ThriftWritable.newInstance((Class<TBase<?, ?>>) type... | conf = HadoopCompat.getConfiguration(ctx); |
718,934 | private static long hashLen0to16(byte[] byteArray) {<NEW_LINE>int len = byteArray.length;<NEW_LINE>if (len >= 8) {<NEW_LINE>long mul = k2 + len * 2L;<NEW_LINE>long a = fetch64(byteArray, 0) + k2;<NEW_LINE>long b = fetch64(byteArray, len - 8);<NEW_LINE>long c = rotate64(b, 37) * mul + a;<NEW_LINE>long d = (rotate64(a, 2... | len >>> 1] & 0xff; |
397,923 | protected void notifyComplete(MqttToken token) throws MqttException {<NEW_LINE>final String methodName = "notifyComplete";<NEW_LINE>MqttWireMessage message = token.internalTok.getWireMessage();<NEW_LINE>if (message != null && message instanceof MqttAck) {<NEW_LINE>// @TRACE 629=received key={0} token={1} message={2}<NE... | .remove(getSendPersistenceKey(message)); |
1,277,567 | public static DefaultHandle createHandle(final Node node) {<NEW_LINE>try {<NEW_LINE>Children.PR.enterReadAccess();<NEW_LINE>String childPath = node.getName();<NEW_LINE>if (childPath == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Node parentNode = node.getParentNode();<NEW_LINE>if (parentNode == null) {<NEW_LINE>r... | Handle parentHandle = parentNode.getHandle(); |
2,473 | private void saveMonitoringSettings() {<NEW_LINE><MASK><NEW_LINE>config.setFileExts(XDMUtils.appendStr2Array(txtFileTyp.getText()));<NEW_LINE>config.setVidExts(XDMUtils.appendStr2Array(txtVidType.getText()));<NEW_LINE>config.setBlockedHosts(XDMUtils.appendStr2Array(txtBlockedHosts.getText()));<NEW_LINE>config.setShowVi... | Config config = Config.getInstance(); |
568,513 | public SourceIpConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SourceIpConfig sourceIpConfig = new SourceIpConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | )).unmarshall(context)); |
427,349 | public Set<IndexedData> resolveIndexesFor(TypeInformation<?> typeInformation, @Nullable Object value) {<NEW_LINE>if (value == null) {<NEW_LINE>return Collections.emptySet();<NEW_LINE>}<NEW_LINE>RedisPersistentEntity<?> entity = mappingContext.getPersistentEntity(typeInformation);<NEW_LINE>if (entity == null) {<NEW_LINE... | indexes = new HashSet<>(); |
136,021 | public void save(Writer writer, Properties options) throws IOException {<NEW_LINE>writer.write("columnNameCount=");<NEW_LINE>writer.write(Integer.toString(_columnNames.size()));<NEW_LINE>writer.write('\n');<NEW_LINE>for (String n : _columnNames) {<NEW_LINE>writer.write(n);<NEW_LINE>writer.write('\n');<NEW_LINE>}<NEW_LI... | (_oldColumns.size())); |
462,057 | private Document LoadProjectFileFromController() throws IhcExecption {<NEW_LINE>try {<NEW_LINE>WSProjectInfo projectInfo = getProjectInfo();<NEW_LINE>int numberOfSegments = controllerService.getProjectNumberOfSegments();<NEW_LINE>int segmentationSize = controllerService.getProjectSegmentationSize();<NEW_LINE>logger.deb... | DocumentBuilder db = dbf.newDocumentBuilder(); |
1,834,220 | public static List<Property> createProperties(CTTblPrBase tblPr) {<NEW_LINE>List<Property> properties = new ArrayList<Property>();<NEW_LINE>if (tblPr.getJc() != null && (tblPr.getJc().getVal().equals(JcEnumeration.CENTER) || tblPr.getJc().getVal().equals(JcEnumeration.RIGHT))) {<NEW_LINE>// ignore TblInd (since docx4j ... | , "fixed", "table-layout", "fixed")); |
687,085 | public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException {<NEW_LINE>try {<NEW_LINE>final AttributedList<Path> children = new AttributedList<Path>();<NEW_LINE>for (final DavResource resource : this.list(directory)) {<NEW_LINE>// Try to parse as RFC 2396<NEW_L... | listener.chunk(directory, children); |
857,863 | private void receivedFHTState(String device, String state) {<NEW_LINE>logger.debug("Received state " + state + " for FHT device " + device);<NEW_LINE>int stateValue = Integer.parseInt(state, 16);<NEW_LINE>FHTBindingConfig config = getConfig(device, Datapoint.BATTERY);<NEW_LINE>OnOffType batteryAlarm = null;<NEW_LINE>if... | ).getName() + " with window state"); |
1,850,585 | public void read(org.apache.thrift.protocol.TProtocol prot, TExternalCompaction struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(4);<NEW_LINE>if (incoming.get(0... | updates.put(_key7, _val8); |
414,983 | public boolean onKey(KeyEvent event) {<NEW_LINE>boolean consumed = false;<NEW_LINE>// logger.log(Level.INFO, "onKey event: {0}", event);<NEW_LINE>event.getDeviceId();<NEW_LINE>event.getSource();<NEW_LINE>AndroidJoystick joystick = joystickIndex.get(event.getDeviceId());<NEW_LINE>if (joystick != null) {<NEW_LINE>Joystic... | addButton(event.getKeyCode()); |
1,702,338 | private QueryResultMetaData createQueryResultMetaData() {<NEW_LINE>List<RawQueryResultColumnMetaData> columns = new ArrayList<>();<NEW_LINE>columns.add(new RawQueryResultColumnMetaData("", "Id", "Id", Types.VARCHAR, "VARCHAR", 20, 0));<NEW_LINE>columns.add(new RawQueryResultColumnMetaData("", "User", "User", Types.VARC... | , "VARCHAR", 20, 0)); |
1,359,499 | static void visitDirsRecursivelyWithoutExcluded(@Nonnull Project project, @Nonnull VirtualFile root, boolean visitIgnoredFoldersThemselves, @Nonnull Function<? super VirtualFile, Result> processor) {<NEW_LINE>ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex();<NEW_LINE>Option depthLimit... | (Registry.intValue("vcs.root.detector.folder.depth")); |
570,902 | public T visitDyadicExpr_A(DyadicExpr_AContext ctx) {<NEW_LINE>TerminalNode dyadicOper = null;<NEW_LINE>dyadicOper = operSwitch(<MASK><NEW_LINE>dyadicOper = operSwitch(dyadicOper, ctx.DIV());<NEW_LINE>dyadicOper = operSwitch(dyadicOper, ctx.DIV2());<NEW_LINE>dyadicOper = operSwitch(dyadicOper, ctx.MOD());<NEW_LINE>//<N... | dyadicOper, ctx.MUL()); |
228,642 | protected void masterOperation(Task task, GetSettingsRequest request, ClusterState state, ActionListener<GetSettingsResponse> listener) {<NEW_LINE>Index[] concreteIndices = indexNameExpressionResolver.concreteIndices(state, request);<NEW_LINE>ImmutableOpenMap.Builder<String, Settings> indexToSettingsBuilder = Immutable... | .names(), k)); |
1,033,196 | private MemoryMetrics createMemoryMetrics() {<NEW_LINE>MemoryMetrics.Builder memoryMetrics = MemoryMetrics.newBuilder();<NEW_LINE>long usedHeapSizePostBuild = 0;<NEW_LINE>if (MemoryProfiler.instance().getHeapUsedMemoryAtFinish() > 0) {<NEW_LINE>memoryMetrics.setUsedHeapSizePostBuild(MemoryProfiler.instance().getHeapUse... | ).ifPresent(memoryMetrics::setPeakPostGcHeapSize); |
914,209 | protected void closeSheet() {<NEW_LINE>if (sheetHelper != null) {<NEW_LINE>XlsReportConfiguration configuration = getCurrentItemConfiguration();<NEW_LINE>boolean isIgnorePageMargins = configuration.isIgnorePageMargins();<NEW_LINE>if (currentSheetFirstPageNumber != null && currentSheetFirstPageNumber > 0) {<NEW_LINE>she... | ) + "'!" + sheetAutoFilter + "</definedName>\n"); |
1,613,132 | final DescribeScalingPoliciesResult executeDescribeScalingPolicies(DescribeScalingPoliciesRequest describeScalingPoliciesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScalingPoliciesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
317,679 | public void marshall(CreateLaunchRequest createLaunchRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createLaunchRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createLaunchRequest.getDesc... | createLaunchRequest.getProject(), PROJECT_BINDING); |
281,379 | public void doPaint(Graphics2D g) {<NEW_LINE>// Draw legend content inside legend box<NEW_LINE>double startx = xOffset + chart.getStyler().getLegendPadding();<NEW_LINE>double starty = yOffset + chart.getStyler().getLegendPadding();<NEW_LINE>Object oldHint = g.getRenderingHint(RenderingHints.KEY_ANTIALIASING);<NEW_LINE>... | seriesTextBounds, BOX_SIZE, x, starty); |
257,521 | private void defineFold(String bundle, String key, Tree expr) {<NEW_LINE>final ClassPath cp = ClassPath.getClassPath(anchor, ClassPath.SOURCE);<NEW_LINE>FileObject bundleFile = cp != null ? cp.findResource(bundle + ".properties") : null;<NEW_LINE>SourcePositions spos = info.getTrees().getSourcePositions();<NEW_LINE>int... | message.substring(0, newline); |
1,477,296 | private void createCryptoTemplate(FSRL fsrl, FSBRootNode node) {<NEW_LINE>try {<NEW_LINE>String fsContainerName = fsrl.getFS().getContainer().getName();<NEW_LINE>CryptoKeyFileTemplateWriter writer = new CryptoKeyFileTemplateWriter(fsContainerName);<NEW_LINE>if (writer.exists()) {<NEW_LINE>int answer = OptionDialog.show... | writer, node.getChildren()); |
134,349 | private String doEncryption(String path, String password) throws IOException, DocumentException {<NEW_LINE>String masterpwd = mSharedPrefs.getString(MASTER_PWD_STRING, appName);<NEW_LINE>String finalOutputFile = mFileUtils.getUniqueFileName(path.replace(mContext.getString(R.string.pdf_ext), mContext.getString(R.string.... | PdfReader reader = new PdfReader(path); |
730,006 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>setQueryTimeParams_result result = new setQueryTimeParams_result();<NEW_LINE>if (e instanceof QueryException) {<NEW_LINE>result.err = (QueryException... | INTERNAL_ERROR, e.getMessage()); |
245,364 | private static int countDataFiles(TOTorrent torrent, String torrent_save_dir, String torrent_save_file) {<NEW_LINE>try {<NEW_LINE>int res = 0;<NEW_LINE>LocaleUtilDecoder locale_decoder = LocaleTorrentUtil.getTorrentEncoding(torrent);<NEW_LINE>TOTorrentFile[] files = torrent.getFiles();<NEW_LINE>for (int i = 0; i < file... | FileUtil.newFile(torrent_save_dir, torrent_save_file); |
444,304 | public static DescribeAffectedMaliciousFileImagesResponse unmarshall(DescribeAffectedMaliciousFileImagesResponse describeAffectedMaliciousFileImagesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAffectedMaliciousFileImagesResponse.setRequestId(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.Reques... | ("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].RepoName")); |
1,761,018 | public JsonResult execute() throws InvalidHttpRequestBodyException, InvalidOperationException {<NEW_LINE>CourseCreateRequest <MASK><NEW_LINE>String newCourseTimeZone = courseCreateRequest.getTimeZone();<NEW_LINE>String timeZoneErrorMessage = FieldValidator.getInvalidityInfoForTimeZone(newCourseTimeZone);<NEW_LINE>if (!... | courseCreateRequest = getAndValidateRequestBody(CourseCreateRequest.class); |
652,941 | public void fill(ToolBar parent, int index) {<NEW_LINE>if (widget != null || parent == null)<NEW_LINE>return;<NEW_LINE>ToolItem ti = new ToolItem(parent, style, index);<NEW_LINE>if (image != null) {<NEW_LINE>ti.setImage(image.image());<NEW_LINE>}<NEW_LINE>if (image == null || style == SWT.DROP_DOWN || style == SWT.PUSH... | item = (ToolItem) e.widget; |
92,568 | public void testCallerIdentityPropagationFailureForMultipleCPCScheduleWork(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>System.out.println("Begin testCallerIdentityPropagationFailureForMultipleCPCScheduleWork");<NEW_LINE>InitialContext ctx = new InitialContext();<NEW_LINE>String... | System.out.println("Test Passed: A WorkCompletedException was thrown because an error occurred during security context setup"); |
236,389 | public long[][] queryProcessorCpuLoadTicks() {<NEW_LINE>perfstat_cpu_t[] cpu = cpuProc.get();<NEW_LINE>long[][] ticks = new long[cpu.length][TickType.values().length];<NEW_LINE>for (int i = 0; i < cpu.length; i++) {<NEW_LINE>ticks[i] = new long[TickType.values().length];<NEW_LINE>ticks[i][TickType.USER.ordinal()] = cpu... | ].busy_stolen_purr) * 1000L / USER_HZ; |
676,957 | public Credentials unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Credentials credentials = new Credentials();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if ... | String currentParentElement = context.getCurrentParentElement(); |
976,982 | static Map<String, UserAgentParser> createUserAgentParsers(Path userAgentConfigDirectory, UserAgentCache cache) throws IOException {<NEW_LINE>Map<String, UserAgentParser> userAgentParsers = new HashMap<>();<NEW_LINE>UserAgentParser defaultParser = new UserAgentParser(DEFAULT_PARSER_NAME, IngestUserAgentPlugin.class.get... | getFileSystem().getPathMatcher("glob:**.yml"); |
387,561 | final ListAnomalyGroupRelatedMetricsResult executeListAnomalyGroupRelatedMetrics(ListAnomalyGroupRelatedMetricsRequest listAnomalyGroupRelatedMetricsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAnomalyGroupRelatedMetricsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | endClientExecution(awsRequestMetrics, request, response); |
850,823 | public final VarExprList rewrite(VarExprList lst) {<NEW_LINE>VarExprList retval = new VarExprList();<NEW_LINE>for (Var v : lst.getVars()) {<NEW_LINE>Node n = values.get(v);<NEW_LINE>if (n != null) {<NEW_LINE>if (n.isVariable()) {<NEW_LINE>retval.add(Var.alloc(n));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>retval.add(v);<NE... | retval.add(v, e); |
1,783,782 | private void categorizeNote() {<NEW_LINE>String currentCategory = noteTmp.getCategory() != null ? String.valueOf(noteTmp.getCategory(<MASK><NEW_LINE>final List<Category> categories = Observable.from(DbHelper.getInstance().getCategories()).map(category -> {<NEW_LINE>if (String.valueOf(category.getId()).equals(currentCat... | ).getId()) : null; |
9,787 | private void initServerPreFragment(Bundle savedInstanceState) {<NEW_LINE>// step 1 - load and process relevant inputs (resources, intent, savedInstanceState)<NEW_LINE>if (savedInstanceState == null) {<NEW_LINE>if (mAccount != null) {<NEW_LINE>String baseUrl = mAccountMgr.getUserData(mAccount, Constants.KEY_OC_BASE_URL)... | mServerInfo.mBaseUrl.startsWith(HTTPS_PROTOCOL); |
1,817,228 | protected void initNode(MNode result) {<NEW_LINE>MBool renderable = (MBool) result.getAttr("rnd");<NEW_LINE>renderable.set(true);<NEW_LINE>MInt filmFit = (MInt) result.getAttr("ff");<NEW_LINE>// horizontal fit<NEW_LINE>filmFit.set(1);<NEW_LINE>MFloat centerOfInterest = (MFloat) result.getAttr("coi");<NEW_LINE>centerOfI... | MFloat) result.getAttr("ow"); |
1,260,321 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1".split(",");<NEW_LINE>String epl = "@name('s0') select value in (select sum(intPrimitive) from SupportBean#keepall) as c0," + "value not in (select sum(intPrimitive) from SupportBean#keepall) as c1 " + "from SupportValueEvent";<NEW_LINE>env.... | [] { null, null }); |
827,237 | private Authorization toEntity(OAuth2Authorization authorization) {<NEW_LINE>Authorization entity = new Authorization();<NEW_LINE>entity.setId(authorization.getId());<NEW_LINE>entity.setRegisteredClientId(authorization.getRegisteredClientId());<NEW_LINE>entity.setPrincipalName(authorization.getPrincipalName());<NEW_LIN... | authorization.getToken(OAuth2RefreshToken.class); |
1,049,597 | public static int totalPaths(int m, int n) {<NEW_LINE>int[][] total = new int[100][100];<NEW_LINE>for (int i = 0; i < m; i++) {<NEW_LINE>for (int j = 0; j < n; j++) {<NEW_LINE>total<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>int mx = (m > n) ? (m) : (n);<NEW_LINE>for (int i = 0; i < mx; i++) {<NEW_LINE>if (i < m) {<NEW_LINE>... | [i][j] = 0; |
1,190,728 | public Product loadFromDom(final Element element) throws InitializationException {<NEW_LINE>super.loadFromDom(element);<NEW_LINE>Element child;<NEW_LINE>try {<NEW_LINE>version = Version.getVersion(element.getAttribute(VERSION_TAG_NAME));<NEW_LINE>supportedPlatforms = StringUtils.parsePlatforms(element.getAttribute(PLAT... | (XMLUtils.parseDependencies(child)); |
1,094,458 | public void createTableIfNotExist() {<NEW_LINE>if (!canWrite()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Connection conn = null;<NEW_LINE>PreparedStatement ps = null;<NEW_LINE>PreparedStatement psAlterTopN = null;<NEW_LINE>PreparedStatement psAlterCharSet = null;<NEW_LINE>try {<NEW_LINE>conn = MetaDbDataSource.getInstanc... | "create " + TABLE_NAME + " if not exist error", e); |
455,005 | public Exception mapException(RemoteException ex, int minorCode) {<NEW_LINE>String detail = ex.toString();<NEW_LINE>SystemException sysex;<NEW_LINE>// If minor code is specified, completion status must be also.<NEW_LINE>// the default completion status for the exception type is used.<NEW_LINE>if (ex instanceof NoSuchOb... | sysex.initCause(ex.detail); |
1,220,429 | public static HookInfoPatch toInnerForUpdate(ClientLogger logger, NotificationHook notificationHook) {<NEW_LINE>if (notificationHook instanceof EmailNotificationHook) {<NEW_LINE>EmailNotificationHook emailHook = (EmailNotificationHook) notificationHook;<NEW_LINE>EmailHookInfoPatch innerEmailHook = new EmailHookInfoPatc... | setDescription(webHook.getDescription()); |
613,433 | @PostMapping(value = "/users", produces = "application/json")<NEW_LINE>public UserResponse createUser(@RequestBody UserRequest userRequest, HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>if (userRequest.getId() == null) {<NEW_LINE>throw new FlowableIllegalArgumentException("Id cannot be null.");<N... | HttpStatus.CREATED.value()); |
1,444,895 | public void testBMTNonXAOptionB() throws Exception {<NEW_LINE>String deliveryID = "MD_test6d";<NEW_LINE>prepareTRA();<NEW_LINE>// construct a FVTMessage<NEW_LINE>FVTMessage message = new FVTMessage();<NEW_LINE>message.addTestResult("BMTJMS");<NEW_LINE>// Add a option B transacted delivery to another instance.<NEW_LINE>... | add("BMTJMS", "message2", m); |
822,088 | public void onClick(View v) {<NEW_LINE>if (mTestDataItemList.size() < 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int parentNumber = mTestDataItemList.size() - 1;<NEW_LINE>HorizontalParent horizontalParent = mTestDataItemList.get(parentNumber);<NEW_LINE>HorizontalParent newHorizontalParent = new HorizontalParent();<NEW_L... | .string.modified_parent_text, parentNumber)); |
1,465,482 | private void checkPalette() {<NEW_LINE>if (palette == null || palette.length < 2 || palette[0].length < 2 || palette[1].length < 2) {<NEW_LINE>LOG.info("Will use default palette");<NEW_LINE>palette = getDefaultPalette(colorizationType);<NEW_LINE>}<NEW_LINE>double min;<NEW_LINE>double max = min <MASK><NEW_LINE>int minIn... | = palette[0][VALUE_INDEX]; |
1,670,860 | public static void dismissDialog(@NonNull DialogFragment dialogFragment, int duration, AnimatorListenerAdapter listenerAdapter) {<NEW_LINE>Dialog dialog = dialogFragment.getDialog();<NEW_LINE>if (dialog != null) {<NEW_LINE>if (dialog.getWindow() != null) {<NEW_LINE>View view = dialog<MASK><NEW_LINE>if (view != null) {<... | .getWindow().getDecorView(); |
689,575 | private void checkInjectionPointMetadata(VariableElement var, ExecutableElement method, TypeElement parent, WebBeansModel model, AtomicBoolean cancel, Result result) {<NEW_LINE>TypeElement injectionPointType = model.getCompilationController().getElements().getTypeElement(AnnotationUtil.INJECTION_POINT);<NEW_LINE>if (in... | (InjectionPointParameterAnalyzer.class, "ERR_WrongQualifierInjectionPointMeta")); |
457,257 | public void sendProcessBlockingAlert(ProcessInstance processInstance, ProjectUser projectUser) {<NEW_LINE>Alert alert = new Alert();<NEW_LINE>String cmdName = getCommandCnName(processInstance.getCommandType());<NEW_LINE>List<ProcessAlertContent> blockingNodeList = new ArrayList<>(1);<NEW_LINE>ProcessAlertContent proces... | content = JSONUtils.toJsonString(blockingNodeList); |
231,737 | void collectDbStats(ArrayList<SQLiteDebug.DbStats> dbStatsList) {<NEW_LINE>// Get information about the main database.<NEW_LINE>int lookaside = nativeGetDbLookaside(mConnectionPtr);<NEW_LINE>long pageCount = 0;<NEW_LINE>long pageSize = 0;<NEW_LINE>try {<NEW_LINE>pageCount = executeForLong("PRAGMA page_count;", null, nu... | , 0, 0, 0)); |
298,651 | private MediaItem createMediaItem(Map<String, Object> content) {<NEW_LINE>SimpleYouTubeMediaItem mediaItem = new SimpleYouTubeMediaItem();<NEW_LINE>mediaItem.setBitrate(Helpers.toIntString(content.get(MediaItem.BITRATE)));<NEW_LINE>mediaItem.setUrl(String.valueOf(content.<MASK><NEW_LINE>mediaItem.setITag(Helpers.toIntS... | get(MediaItem.URL))); |
1,011,094 | // submit the map/reduce job.<NEW_LINE>public int run(final String[] args) throws Exception {<NEW_LINE>if (args.length != 1) {<NEW_LINE>return printUsage();<NEW_LINE>}<NEW_LINE>Path in_path = new Path(args[0]);<NEW_LINE>System.out.println("\n-----===[PEGASUS: A Peta-Scale Graph Mining System]===-----\n");<NEW_LINE>Syst... | l1norm_output.getName() + "\n"); |
770,389 | private static void uploadProduct(String tableName, String productIndex) {<NEW_LINE>try {<NEW_LINE>// Add a book.<NEW_LINE>Map<String, AttributeValue> item = new HashMap<String, AttributeValue>();<NEW_LINE>item.put("Id", new AttributeValue().withN(productIndex));<NEW_LINE>item.put("Title", new AttributeValue().withS("B... | ().withBOOL(true)); |
629,813 | protected void prepare() {<NEW_LINE>ProcessInfoParameter[] para = getParametersAsArray();<NEW_LINE>for (int i = 0; i < para.length; i++) {<NEW_LINE>String name = para[i].getParameterName();<NEW_LINE>if (para[i].getParameter() == null)<NEW_LINE>;<NEW_LINE>else if (name.equals("M_PriceList_Version_ID"))<NEW_LINE>p_M_Pric... | para[i].getParameterAsInt(); |
1,406,632 | private void alterDocument(Uri uri, String fileName) {<NEW_LINE>logDebug("alterUri");<NEW_LINE>try {<NEW_LINE>File tempFolder = <MASK><NEW_LINE>if (!isFileAvailable(tempFolder))<NEW_LINE>return;<NEW_LINE>String sourceLocation = tempFolder.getAbsolutePath() + File.separator + fileName;<NEW_LINE>ParcelFileDescriptor pfd ... | getCacheFolder(getApplicationContext(), TEMPORAL_FOLDER); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.