idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
309,337 | private Function<Node, Node> createOperationTransformForGrpcPortNodes(final Network<Node, Edge> network, final FnDataService beamFnDataService, final OperationContext context) {<NEW_LINE>return new TypeSafeNodeFunction<RemoteGrpcPortNode>(RemoteGrpcPortNode.class) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Node typ... | Coder) coder, outputReceivers, context); |
1,527,708 | void writeJavascriptHandlers() throws IOException {<NEW_LINE>if (cspState.getEventHandlers() == null || cspState.getEventHandlers().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (sb == null) {<NEW_LINE>sb = new StringBuilder(cspState.getEventHandlers().size() * 25);<NEW_LINE>} else {<NEW_LINE>sb.setLength(0);<NE... | .getEventHandlers().clear(); |
179,383 | protected boolean executeGroovyScript(ScriptResource file) {<NEW_LINE>try {<NEW_LINE>ClassLoader classLoader = getClass().getClassLoader();<NEW_LINE>CompilerConfiguration cc = new CompilerConfiguration();<NEW_LINE>cc.setRecompileGroovySource(true);<NEW_LINE>Binding bind = new Binding();<NEW_LINE>bind.setProperty("ds", ... | ("Added post update action will be ignored for data store [{}]", storeNameToString(storeName)); |
525,295 | public Map<String, Object> networkPlayersTableJSON() {<NEW_LINE>Integer xMostRecentPlayers = config.get(DisplaySettings.PLAYERS_PER_PLAYERS_PAGE);<NEW_LINE>Long playtimeThreshold = config.get(TimeSettings.ACTIVE_PLAY_THRESHOLD);<NEW_LINE>boolean openPlayerLinksInNewTab = <MASK><NEW_LINE>Database database = dbSystem.get... | config.isTrue(DisplaySettings.OPEN_PLAYER_LINKS_IN_NEW_TAB); |
1,159,407 | public void onRender(MatrixStack matrixStack, float partialTicks) {<NEW_LINE>if (currentBlock == null)<NEW_LINE>return;<NEW_LINE>// GL settings<NEW_LINE>GL11.glEnable(GL11.GL_BLEND);<NEW_LINE>GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>GL11.glEnable(GL11.GL_LINE_SMOOTH);<NEW_LINE>GL11.glE... | GL11.glDisable(GL11.GL_LINE_SMOOTH); |
1,297,906 | private void decompose(int c, int norm16, ReorderingBuffer buffer) {<NEW_LINE>// get the decomposition and the lead and trail cc's<NEW_LINE>if (norm16 >= limitNoNo) {<NEW_LINE>if (isMaybeOrNonZeroCC(norm16)) {<NEW_LINE>buffer.append(c, getCCFromYesOrMaybe(norm16));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Maps to an isC... | firstUnit = extraData.charAt(mapping); |
517,764 | public int compare(BugInstance lhs, BugInstance rhs) {<NEW_LINE>int cmp;<NEW_LINE>// Bug abbrevs must match<NEW_LINE>BugPattern lhsPattern = lhs.getBugPattern();<NEW_LINE>BugPattern rhsPattern = rhs.getBugPattern();<NEW_LINE>String lhsAbbrev, rhsAbbrev;<NEW_LINE>lhsAbbrev = lhsPattern.getAbbrev();<NEW_LINE>rhsAbbrev = ... | ), rhs.getPrimaryField()); |
473,445 | public void registerXMLSet(String filename) throws FileNotFoundException, XMLException {<NEW_LINE>if (!filename.startsWith(File.separator) && !filename.startsWith(":", 1)) {<NEW_LINE>StringBuffer buffer = new StringBuffer(baseDir);<NEW_LINE>// buffer.append(File.separator);<NEW_LINE>buffer.append(srcRoot);<NEW_LINE>// ... | println(buffer.toString()); |
1,339,352 | public Request<GetChannelMessageRequest> marshall(GetChannelMessageRequest getChannelMessageRequest) {<NEW_LINE>if (getChannelMessageRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetChannelMessageRequest)");<NEW_LINE>}<NEW_LINE>Request<GetChannelMessageRequest> request... | request.addHeader("Content-Type", "application/x-amz-json-1.0"); |
192,079 | protected List<Class<? extends C>> parseValue(Object obj) throws ParameterException {<NEW_LINE>if (obj == null) {<NEW_LINE>throw new UnspecifiedParameterException(this);<NEW_LINE>}<NEW_LINE>if (List.class.isInstance(obj)) {<NEW_LINE>List<?> l = (List<?>) obj;<NEW_LINE>ArrayList<C> inst = new ArrayList<>(l.size());<NEW_... | "Given class not a subclass / implementation of " + restrictionClass.getName()); |
1,691,254 | public static DescribeVsStreamsOnlineListResponse unmarshall(DescribeVsStreamsOnlineListResponse describeVsStreamsOnlineListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVsStreamsOnlineListResponse.setRequestId(_ctx.stringValue("DescribeVsStreamsOnlineListResponse.RequestId"));<NEW_LINE>describeVsStreamsOnline... | (_ctx.integerValue("DescribeVsStreamsOnlineListResponse.PageNum")); |
143,105 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "create table MyTable(sortcol sorted(intPrimitive) @type('SupportBean'));\n" + "into table MyTable select sorted(*) as sortcol from SupportBean;\n" + "@name('s0') select " + "MyTable.sortcol.navigableMapReference() as nmr" + " from SupportBean_S0";<NEW_... | treemap = new TreeMap<>(); |
566,881 | private static void parseRange(CharSequence seq, int lo, int p, int lim, int position, short operation, LongList out) throws SqlException {<NEW_LINE>char type = seq.charAt(lim - 1);<NEW_LINE>int period;<NEW_LINE>try {<NEW_LINE>period = Numbers.parseInt(seq, p + 1, lim - 1);<NEW_LINE>} catch (NumericException e) {<NEW_L... | tryParse(seq, lo, p); |
1,374,676 | private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, Nati... | TypeAlias.fsfilcnt_t, NativeType.ULONGLONG); |
1,611,525 | public boolean visit(J9ObjectPointer object, VoidPointer address) {<NEW_LINE>try {<NEW_LINE>GCHeapRegionDescriptor objectRegion = heapRegionManager.regionDescriptorForAddress(object);<NEW_LINE>MM_HeapRegionDescriptorVLHGCPointer vlhgcObjectRegion = MM_HeapRegionDescriptorVLHGCPointer.cast(objectRegion.getHeapRegionDesc... | J9ObjectPointer field = fieldIterator.next(); |
568,609 | protected void importForms(ConverterContext converterContext) {<NEW_LINE>Map<String, String> formMap = converterContext.getFormKeyToJsonStringMap();<NEW_LINE>Map<String, byte[]> thumbnailMap = converterContext.getModelKeyToThumbnailMap();<NEW_LINE>for (String formKey : formMap.keySet()) {<NEW_LINE>Model formModel = cre... | getFormModelByKey(formModel.getKey()); |
541,751 | protected List findByUserId(String userId) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("FROM PasswordTracker IN CLASS com.liferay.portal.ejb.PasswordTrackerHBM WHERE ");<NEW_LINE>query.... | ("userId DESC").append(", "); |
1,067,184 | private void generateEJB21Xml() throws IOException {<NEW_LINE>org.netbeans.modules.j2ee.api.ejbjar.EjbJar ejbModule = org.netbeans.modules.j2ee.api.ejbjar.EjbJar.getEjbJar(pkg);<NEW_LINE>FileObject ddFO = ejbModule.getDeploymentDescriptor();<NEW_LINE>if (ddFO == null && ejbModule.getMetaInf() != null) {<NEW_LINE>// NOI... | AssemblyDescriptor assemblyDescriptor = ejbJar.getSingleAssemblyDescriptor(); |
423,460 | public void doCapture(String captureId, CaptureContext context, CapturePhase capPhase) {<NEW_LINE>if (captureId == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// step 1: see if it is a valid captureId<NEW_LINE>MonitorElement[] elems = mr.getElementByCapId(captureId);<NEW_LINE>for (MonitorElement elem : elems) {<NEW_LI... | String capClassName = elem.getCapClass(); |
75,957 | public void stateChanged(ChangeEvent e) {<NEW_LINE>if (progressSlider.getValueIsAdjusting() && gstPlayBin != null) {<NEW_LINE>long duration = <MASK><NEW_LINE>double relativePosition = progressSlider.getValue() * 1.0 / PROGRESS_SLIDER_SIZE;<NEW_LINE>long newStartTime = (long) (relativePosition * duration);<NEW_LINE>doub... | gstPlayBin.queryDuration(TimeUnit.NANOSECONDS); |
473,983 | public static Bitmap generateDefaultCover(Context context, int width, int height) {<NEW_LINE>int size = Math.min(width, height);<NEW_LINE>int[] colors = ThemeHelper.getDefaultCoverColors(context);<NEW_LINE>int rgb_background = colors[0];<NEW_LINE>int rgb_note_inner = colors[1];<NEW_LINE>final int line_thickness = size ... | Canvas canvas = new Canvas(bitmap); |
1,543,882 | public ModelAndView dicitemsave(HttpServletRequest request, @Valid SysDic dic, @Valid String p) {<NEW_LINE>List<SysDic> sysDicList = sysDicRes.findByDicidAndName(dic.getDicid(), dic.getName());<NEW_LINE>String msg = null;<NEW_LINE>String <MASK><NEW_LINE>if (sysDicList.size() == 0) {<NEW_LINE>dic.setHaschild(true);<NEW_... | orgi = super.getOrgi(request); |
1,562,091 | public void onSuccess(TSGeofence geofence) {<NEW_LINE>try {<NEW_LINE>WritableMap data = new WritableNativeMap();<NEW_LINE>data.putString("identifier", geofence.getIdentifier());<NEW_LINE>data.putDouble("latitude", geofence.getLatitude());<NEW_LINE>data.putDouble("longitude", geofence.getLongitude());<NEW_LINE>data.putD... | "notifyOnEntry", geofence.getNotifyOnEntry()); |
1,539,867 | private void printHistogram(Histogram histogram) {<NEW_LINE>printIfEnabled(MetricAttribute.COUNT, String.format(locale, " count = %d", histogram.getCount()));<NEW_LINE><MASK><NEW_LINE>printIfEnabled(MetricAttribute.MIN, String.format(locale, " min = %d", snapshot.getMin()));<NEW_LINE>printIfEn... | Snapshot snapshot = histogram.getSnapshot(); |
1,216,936 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(untagResourceRequest)); |
1,208,143 | private void createMoveOnEventGrouping(String enable_section_label, String move_when_done_setting, String move_path_setting, String move_torrent_setting, String move_torrent_dir_setting, String move_when_in_save_dir_setting, String move_partial_downloads_setting) {<NEW_LINE>BooleanParameterImpl moveCompleted = new Bool... | pgMoveComplete.setIndent(1, false); |
122,142 | public void analyze(Analyzer analyzer) throws UserException {<NEW_LINE>super.analyze(analyzer);<NEW_LINE>// analyze where clause<NEW_LINE>boolean isValid;<NEW_LINE>if (whereClause instanceof CompoundPredicate) {<NEW_LINE>CompoundPredicate cp = (CompoundPredicate) whereClause;<NEW_LINE>if (cp.getOp() != org.apache.doris... | , !orderByElement.getIsAsc()); |
590,017 | public static SelectInContext createContext(AnActionEvent event) {<NEW_LINE>DataContext dataContext = event.getDataContext();<NEW_LINE>SelectInContext result = createEditorContext(dataContext);<NEW_LINE>if (result != null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>JComponent sourceComponent = getEventComponent(even... | OpenFileDescriptorContext.create(project, file); |
1,603,263 | public void execute() throws CheckedAnalysisException, IOException, InterruptedException {<NEW_LINE>File dir = new File(rootSourceDirectory);<NEW_LINE>if (!dir.isDirectory()) {<NEW_LINE>throw new IOException("Path " + rootSourceDirectory + " is not a directory");<NEW_LINE>}<NEW_LINE>// Find all directories underneath t... | builder = factory.createClassPathBuilder(errorLogger); |
1,148,691 | public NodeValue exec(NodeValue v1, NodeValue v2, NodeValue v3, NodeValue v4, NodeValue v5) {<NEW_LINE>try {<NEW_LINE>if (!v1.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a Number: " + FmtUtils.stringForNode(v1.asNode()));<NEW_LINE>}<NEW_LINE>if (!v2.isNumber()) {<NEW_LINE>throw new ExprEvalException("Not a ... | .asNode().getURI(); |
1,152,844 | public void run() {<NEW_LINE>try {<NEW_LINE>ZipInputStream zipIn = new ZipInputStream(new FileInputStream(this.archive));<NEW_LINE>ZipEntry entry;<NEW_LINE>while (null != (entry = zipIn.getNextEntry())) {<NEW_LINE>ZipEntry finalEntry = entry;<NEW_LINE>handler.post(() -> dialog.setMessage(getString(R.string.unzip_item, ... | , finalEntry.getName())); |
728,883 | public Object run() {<NEW_LINE>Class<?> injectedSecurityFrameClass;<NEW_LINE>VMLangAccess vma = Lookup.getVMLangAccess();<NEW_LINE>ClassLoader <MASK><NEW_LINE>injectedSecurityFrameClass = probeLoaderToSecurityFrameMap(rawLoader);<NEW_LINE>if (injectedSecurityFrameClass == null) {<NEW_LINE>synchronized (loaderLock) {<NE... | rawLoader = vma.getClassloader(context); |
459,928 | public void run(FlowTrigger trigger, Map data) {<NEW_LINE>final VmInstanceSpec spec = (VmInstanceSpec) data.get(VmInstanceConstant.Params.VmInstanceSpec.toString());<NEW_LINE>if (spec.getVmInventory().getRootVolumeUuid() == null) {<NEW_LINE>// the vm is in an intermediate state that has no root volume<NEW_LINE>trigger.... | getVmInventory().getRootVolumeUuid()); |
1,328,409 | protected void scanJVMTIObjectTagTables() throws CorruptDataException {<NEW_LINE>if (!J9BuildFlags.opt_jvmti)<NEW_LINE>return;<NEW_LINE>setReachability(Reachability.WEAK);<NEW_LINE>J9JVMTIDataPointer jvmtiData = J9JVMTIDataPointer.cast(_vm.jvmtiData());<NEW_LINE>if (jvmtiData.notNull()) {<NEW_LINE>GCJVMTIObjectTagTable... | addressIterator = GCJVMTIObjectTagTableIterator.fromJ9JVMTIEnv(list); |
452,588 | protected WebRtcServiceState handleLocalRinging(@NonNull WebRtcServiceState currentState, @NonNull RemotePeer remotePeer) {<NEW_LINE>Log.i(TAG, "handleLocalRinging(): call_id: " + remotePeer.getCallId());<NEW_LINE>RemotePeer activePeer = currentState.getCallInfoState().requireActivePeer();<NEW_LINE>Recipient recipient ... | webRtcInteractor.setCallInProgressNotification(TYPE_INCOMING_RINGING, activePeer); |
859,764 | public final void printGraph(final PrintStream graphWriter, final boolean writeHeader, final int pruneFactor) {<NEW_LINE>if (writeHeader) {<NEW_LINE>graphWriter.println("digraph assemblyGraphs {");<NEW_LINE>}<NEW_LINE>for (final E edge : edgeSet()) {<NEW_LINE>final String edgeString = String.format("\t%s -> %s ", getEd... | "[label=\"%s\"];", edge.getDotLabel()); |
472,591 | protected void buildHosts(String hosts, String portAsString, List<Host> hostsList) {<NEW_LINE>String[] hostVals = hosts.split(",");<NEW_LINE>List<OracleNoSQLHost> oracleNoSqlHosts = new CopyOnWriteArrayList<OracleNoSQLHost>();<NEW_LINE>for (int x = 0; x < hostVals.length; x++) {<NEW_LINE>String host = hostVals[x].trim(... | : new OracleNoSQLHost(host, port); |
1,039,091 | private static Object executeQuery(ObjectTemplate template, Object holder, Object[] arguments) {<NEW_LINE>Object key = arguments[3];<NEW_LINE>JSDynamicObject proxy = (JSDynamicObject) holder;<NEW_LINE>PropertyHandler indexedHandler = template.getIndexedPropertyHandler();<NEW_LINE>if (JSRuntime.isArrayIndex(key)) {<NEW_... | = (JSDynamicObject) arguments[2]; |
569,109 | private static String inferFindBugsHome() {<NEW_LINE>Pattern[] findbugsJarNames = { Pattern.compile("findbugs\\.jar$") };<NEW_LINE>for (Pattern jarNamePattern : findbugsJarNames) {<NEW_LINE>String findbugsJarCodeBase = ClassPathUtil.findCodeBaseInClassPath(jarNamePattern, SystemProperties.getProperty("java.class.path")... | String fbHome = libDir.getParent(); |
1,123,540 | private AuthnRequest createAuthnRequest(Saml2AuthenticationRequestContext context) {<NEW_LINE>String issuer = context.getIssuer();<NEW_LINE>String destination = context.getDestination();<NEW_LINE>String assertionConsumerServiceUrl = context.getAssertionConsumerServiceUrl();<NEW_LINE>Saml2MessageBinding protocolBinding ... | auth.setForceAuthn(Boolean.FALSE); |
1,421,144 | final DisableAlarmActionsResult executeDisableAlarmActions(DisableAlarmActionsRequest disableAlarmActionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disableAlarmActionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | DisableAlarmActionsResult>(new DisableAlarmActionsResultStaxUnmarshaller()); |
595,645 | public OpenIdIdpConfig requestOpenIdIdpConfig(Integer idpId, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'idpId' is set<NEW_LINE>if (idpId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'idpId' when calli... | localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
937,321 | // TODO: copied from org.netbeans.editor.ActionFactory:<NEW_LINE>static void reformat(Reformat formatter, Document doc, int startPos, int endPos, AtomicBoolean canceled) throws BadLocationException {<NEW_LINE>final GuardedDocument gdoc = (doc instanceof GuardedDocument) ? (GuardedDocument) doc : null;<NEW_LINE>int pos ... | getGuardedBlockChain().adjustToBlockEnd(pos); |
482,961 | private String parseTextMessage(StreamDefinition streamDefinition, String template) {<NEW_LINE>// note: currently we do not support arbitrary data to be mapped with dynamic options<NEW_LINE>List<String> attributes = Arrays.asList(streamDefinition.getAttributeNameArray());<NEW_LINE>StringBuffer result = new StringBuffer... | .replaceAll("\\p{Pe}", "")); |
1,047,267 | public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {<NEW_LINE>PsiElement element = descriptor.getPsiElement();<NEW_LINE>ErlangRecordExpression recordExpression = PsiTreeUtil.getParentOfType(element, ErlangRecordExpression.class);<NEW_LINE>if (recordExpression != null) {<NEW_LINE>PsiRe... | ErlangElementFactory.createRecordFieldsFromText(project, newFields); |
1,612,591 | private void init() {<NEW_LINE>initFile(PhpUnitPreferences.isBootstrapEnabled(phpModule), PhpUnitPreferences.getBootstrapPath(phpModule), bootstrapCheckBox, bootstrapTextField);<NEW_LINE>bootstrapForCreateTestsCheckBox.setSelected(PhpUnitPreferences.isBootstrapForCreateTests(phpModule));<NEW_LINE>initFile(PhpUnitPrefer... | (PhpUnitPreferences.getRunAllTestFiles(phpModule)); |
534,273 | public void drawU(UGraphic ug) {<NEW_LINE>final double thickness = ug.getParam().getStroke().getThickness();<NEW_LINE>final double radius = 4 + thickness - 1;<NEW_LINE>final double lineHeight = 4 + thickness - 1;<NEW_LINE>final int xWing = 4;<NEW_LINE>final AffineTransform rotate = AffineTransform.getRotateInstance(thi... | UStroke stroke = new UStroke(thickness); |
1,744,473 | public boolean calc(ComContext context) {<NEW_LINE>int numSamplesOnNode0 = ((List<Tuple3<Double, Double, Vector>>) context.getObj(OptimVariable.fmTrainData)).size();<NEW_LINE>int numBatches = (batchSize == -1 || batchSize > numSamplesOnNode0) ? maxIter : (numSamplesOnNode0 / batchSize + 1) * maxIter;<NEW_LINE>double[] ... | putObj(OptimVariable.convergenceInfo, lossCurve); |
766,901 | public void createUser(String principal, AuthenticationToken token) throws AccumuloSecurityException {<NEW_LINE>try {<NEW_LINE>if (!(token instanceof PasswordToken))<NEW_LINE>throw new AccumuloSecurityException(principal, SecurityErrorCode.INVALID_TOKEN);<NEW_LINE>PasswordToken pt = (PasswordToken) token;<NEW_LINE>cons... | principal, SecurityErrorCode.CONNECTION_ERROR, e); |
89,270 | private void demoPlsqlProcedureNoParams(Connection conn) throws SQLException {<NEW_LINE>// Create a PLSQL stored procedure that takes no arguments.<NEW_LINE>final String PROC_NAME = "ProcNoParams";<NEW_LINE>String sql = "CREATE OR REPLACE PROCEDURE " + PROC_NAME + " IS " + "BEGIN " + "INSERT INTO " + TABLE_NAME + " VAL... | Util.showError("demoPlsqlProcedureNoArgs", sqlEx); |
1,788,907 | private TreeNode convertMethodDeclaration(ExecutableElement element, AbstractTypeDeclaration node) {<NEW_LINE>MethodDeclaration methodDecl = new MethodDeclaration(element);<NEW_LINE>convertBodyDeclaration(methodDecl, element);<NEW_LINE>HashMap<String, VariableElement> localVariableTable = new HashMap<>();<NEW_LINE>List... | parameters.size() - 1); |
1,243,989 | /* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_hostClassOffset_", declaredType="J9Class*")<NEW_LINE>* public J9ClassPointer hostClass() throws CorruptDataException {<NEW_LINE>* return J9ClassPointer.cast(getPointerAtOffset(J9Class._hostClassOffset_));<NEW_LIN... | qualifiedReturnType, "cast", castDesc, false); |
1,019,742 | private void replaceCell(String readerId) {<NEW_LINE>synchronized (lock) {<NEW_LINE>Preconditions.checkState(this.isRunning(), this.state().name());<NEW_LINE>// add a replacement reader and then shutdown existing reader<NEW_LINE>log.info("Found overloaded reader: {}", readerId);<NEW_LINE>String newReaderId;<NEW_LINE>tr... | String> newReaders = createEventProcessors(1); |
1,260,626 | private static void fillTable() {<NEW_LINE>hotKeys.clear();<NEW_LINE>hotKeys.add(makeTitle("Graph"));<NEW_LINE>loadKeys(HotKeys.graphHotKeys);<NEW_LINE>hotKeys.add(makeTitle("Graph Misc"));<NEW_LINE>hotKeys.add(new Object[] { "Alt-Right Click", "Opens instruction comments dialog when clicking on an instruction" });<NEW... | [] { "Ctrl-Mouse wheel", "Scroll vertically" }); |
1,684,497 | // ////////////// Channel Block monitoring //////////////////////////////////<NEW_LINE>private ProposalResponse sendProposalSerially(TransactionRequest proposalRequest, Collection<Peer> peers) throws ProposalException {<NEW_LINE>ProposalException lastException = new ProposalException("ProposalRequest failed.");<NEW_LI... | , Collections.singletonList(peer)); |
1,811,305 | public CancelReplayResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CancelReplayResult cancelReplayResult = new CancelReplayResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | class).unmarshall(context)); |
192,318 | public void loadAdditinalData(long stime, long etime, final boolean reverse) {<NEW_LINE>viewPainter.setViewIsInAdditionalDataLoading(true);<NEW_LINE>collectObj();<NEW_LINE>Iterator<Integer> serverIds = serverObjMap.keySet().iterator();<NEW_LINE>final TreeSet<XLogData> tempSet = new TreeSet<<MASK><NEW_LINE>int limit = P... | XLogData>(new XLogDataComparator()); |
878,105 | private static void detectAuthorizationLoop(String conduitName, Message message, URI currentURL, String realm) throws IOException {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Set<String> authURLs = (Set<String>) message.get(KEY_AUTH_URLS);<NEW_LINE>if (authURLs == null) {<NEW_LINE>authURLs = new HashSet<>();<NEW_... | message.put(KEY_AUTH_URLS, authURLs); |
341,807 | final GetTrafficPolicyInstanceCountResult executeGetTrafficPolicyInstanceCount(GetTrafficPolicyInstanceCountRequest getTrafficPolicyInstanceCountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTrafficPolicyInstanceCountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Route 53"); |
1,331,645 | public PlanFragment visitPhysicalEsScan(OptExpression optExpression, ExecPlan context) {<NEW_LINE>PhysicalEsScanOperator node = (PhysicalEsScanOperator) optExpression.getOp();<NEW_LINE>context.getDescTbl().addReferencedTable(node.getTable());<NEW_LINE>TupleDescriptor tupleDescriptor = context.getDescTbl().createTupleDe... | getFragments().add(fragment); |
1,371,208 | private ReceiptSchedule ofRecord(@NonNull final I_M_ReceiptSchedule record) {<NEW_LINE>final OrgId orgId = OrgId.ofRepoId(record.getAD_Org_ID());<NEW_LINE>final ReceiptScheduleId receiptScheduleId = ReceiptScheduleId.<MASK><NEW_LINE>final ReceiptSchedule.ReceiptScheduleBuilder receiptScheduleBuilder = ReceiptSchedule.b... | ofRepoId(record.getM_ReceiptSchedule_ID()); |
1,686,935 | private static void tryAssertion(RegressionEnvironment env, int days) {<NEW_LINE>sendEvent(env, "S1", 0);<NEW_LINE>// now scheduled for output<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.assertRuntime(runtime -> assertEquals(0, env.runtime().getVariableService().getVariableValue(null, "myvar")));... | , subscriber.getAndResetLastNewData())); |
1,224,716 | public static LLVMExpressionNode createSignedCast(LLVMExpressionNode fromNode, Type targetType) {<NEW_LINE>// does a signed cast (either sign extend or truncate) from (int or FP) to (int or FP). for<NEW_LINE>// vectors, the number of elements in source and target must match.<NEW_LINE>//<NEW_LINE>// @formatter:off<NEW_L... | LLVMSignedCastToI16VectorNodeGen.create(fromNode, vectorLength); |
1,489,559 | private List<GridElement> gridElementCopyInOtherDiagram(List<GridElement> originals, int diffY) {<NEW_LINE>int verticalScrollbarDiff = otherDrawFocusPanel.scrollPanel.getVerticalScrollPosition() - scrollPanel.getVerticalScrollPosition();<NEW_LINE>int horizontalScrollbarDiff = otherDrawFocusPanel.scrollPanel.getHorizont... | copies = new ArrayList<>(); |
1,421,963 | static ZipFileData read(InputStream in, ZipFileData file) throws IOException {<NEW_LINE>if (file == null) {<NEW_LINE>throw new NullPointerException();<NEW_LINE>}<NEW_LINE>byte[] fixedSizeData = new byte[FIXED_DATA_SIZE];<NEW_LINE>if (ZipUtil.readFully(in, fixedSizeData) != FIXED_DATA_SIZE) {<NEW_LINE>throw new ZipExcep... | .getUnsignedShort(fixedSizeData, COMMENT_LENGTH_OFFSET)]; |
350,532 | public static SipMessageByteBuffer fromMessage(Message msg, HeaderForm headerForm) throws SipException {<NEW_LINE>if (!(msg instanceof MessageImpl)) {<NEW_LINE>throw new SipException("attempt to serialize message from a different JAIN implementation");<NEW_LINE>}<NEW_LINE>MessageImpl msgImpl = (MessageImpl) msg;<NEW_LI... | ] headerPart = headerPartBuffer.getBytes(); |
620,276 | public ExternalTaskExecutionInfo produce() {<NEW_LINE>TreePath[] selectionPaths = getSelectionPaths();<NEW_LINE>if (selectionPaths == null || selectionPaths.length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Map<String, ExternalTaskExecutionInfo> map = ContainerUtil.newHashMap();<NEW_LINE>for (TreePath selectionP... | taskExecutionSettings, taskExecutionInfo.getExecutorId()); |
1,246,568 | public CompletableFuture<Void> removeEntries(String tableName, Collection<String> keys, long requestId) {<NEW_LINE>log.trace(requestId, "remove entry called for : {} keys : {}", tableName, keys);<NEW_LINE>List<TableSegmentKey> listOfKeys = keys.stream().map(x -> TableSegmentKey.unversioned(x.getBytes(Charsets.UTF_8))).... | collect(Collectors.toList()); |
896,765 | void callableShouldBeObserved() throws Exception {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>ObservationHandler<Observation.Context> <MASK><NEW_LINE>when(handler.supportsContext(isA(Observation.Context.class))).thenReturn(true);<NEW_LINE>registry.observationConfig().observationHandler(handler);<NEW_LINE>Observat... | handler = mock(ObservationHandler.class); |
448,276 | public static RecoveryAuthnCodesCredentialModel createFromCredentialModel(CredentialModel credentialModel) {<NEW_LINE>RecoveryAuthnCodesCredentialData credentialData;<NEW_LINE>RecoveryAuthnCodesSecretData secretData = null;<NEW_LINE>RecoveryAuthnCodesCredentialModel newModel;<NEW_LINE>try {<NEW_LINE>credentialData = Js... | setId(credentialModel.getId()); |
502,826 | public void takePicture() {<NEW_LINE>logDebug("takePicture");<NEW_LINE>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);<NEW_LINE>if (intent.resolveActivity(getPackageManager()) != null) {<NEW_LINE>File photoFile = createImageFile();<NEW_LINE>Uri photoURI;<NEW_LINE>if (photoFile != null) {<NEW_LINE>if (Build... | intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); |
585,483 | public int scoreMethod(MethodScore score, Method funcType, List<Class> argTypes, Class returnType) {<NEW_LINE>Class[] paramTypes = funcType.getParameterTypes();<NEW_LINE>int iScore = 0;<NEW_LINE>for (int i = 0; i < argTypes.size(); i++) {<NEW_LINE>if (paramTypes.length <= i) {<NEW_LINE>// Extra argument +Max+1<NEW_LIN... | (paramTypes[i], argType); |
1,294,577 | final ListImageRecipesResult executeListImageRecipes(ListImageRecipesRequest listImageRecipesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listImageRecipesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,274,724 | private void logResults() {<NEW_LINE>LOG.info("Key Values Processed: " + kvs_processed.get());<NEW_LINE>LOG.info("Rows Processed: " + rows_processed.get());<NEW_LINE>LOG.info("Valid Datapoints: " + valid_datapoints.get());<NEW_LINE>LOG.info("Annotations: " + annotations.get());<NEW_LINE>LOG.info("Invalid Row Keys Found... | "Unparseable Compacted Columns Deleted: " + bad_compacted_columns_deleted.get()); |
712,026 | public static void main(String[] args) {<NEW_LINE>JFrame view = new JFrame("nonegative");<NEW_LINE>view.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<NEW_LINE>view.setLayout(new FlowLayout());<NEW_LINE>Transaction.runVoid(() -> {<NEW_LINE>CellLoop<Integer> value = new CellLoop<>();<NEW_LINE>SLabel lblValue = new SLab... | (sUpdate.hold(0)); |
990,843 | public MFMBatch reverseIt(boolean isAccrual) {<NEW_LINE>Timestamp currentDate = new Timestamp(System.currentTimeMillis());<NEW_LINE>Optional<Timestamp> loginDateOptional = Optional.of(Env.getContextAsDate(getCtx(), "#Date"));<NEW_LINE>Timestamp reversalDate = isAccrual ? loginDateOptional.orElse(currentDate) : getDateD... | reversal.setReversal_ID(getFM_Batch_ID()); |
1,788,711 | private void applyValidatorMethodExpressionTarget(FacesContext context, FaceletCompositionContext mctx, ELContext elContext, UIComponent topLevelComponent, UIComponent innerComponent, String attributeName, String targetAttributeName, String attributeExpressionString, ValueExpression attributeNameValueExpression, boolea... | ) innerComponent).addValidator(validator); |
1,548,590 | protected EnumDefinition buildEnumDefinitionWithJavaEnumsExtension(String nodeName, JsonNode enumNode, JsonNode enums, JsonNode javaEnums, JType type) {<NEW_LINE>ArrayList<EnumValueDefinition> enumValues = new ArrayList<>();<NEW_LINE>Collection<String> existingConstantNames = new ArrayList<>();<NEW_LINE>for (int i = 0;... | value = enums.path(i); |
1,174,069 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_streamer_info);<NEW_LINE>// Get the various handles of view and layouts that is part of this view<NEW_LINE>streamerImage = findViewById(R.id.profileImageView);<NEW_LINE>TextView st... | (R.string.channel_info_intent_object)); |
480,454 | public boolean interact(Direction side, Player player, InteractionHand hand, ItemStack heldItem, float hitX, float hitY, float hitZ) {<NEW_LINE>SawmillTileEntity master = master();<NEW_LINE>if (master != null) {<NEW_LINE>if (player.isShiftKeyDown() && !master.sawblade.isEmpty()) {<NEW_LINE>if (heldItem.isEmpty())<NEW_L... | player.setItemInHand(hand, heldItem); |
438,653 | private <T> T valueAs(SqlNode node, Class<T> clazz) {<NEW_LINE>final SqlLiteral literal;<NEW_LINE>switch(node.getKind()) {<NEW_LINE>case ARRAY_VALUE_CONSTRUCTOR:<NEW_LINE>final List<Object> list = new ArrayList<>();<NEW_LINE>for (SqlNode o : ((SqlCall) node).getOperandList()) {<NEW_LINE>list.add(valueAs(o, Object.class... | (ImmutableNullableList.copyOf(list)); |
1,533,822 | private Map<String, Object> prepareModelForBillingDocument(PurchaseContext purchaseContext, TicketReservation reservation, OrderSummary summary, BillingDocument.Type type) {<NEW_LINE>Organization organization = organizationRepository.getById(purchaseContext.getOrganizationId());<NEW_LINE>String creditNoteNumber = null;... | (groupingBy(Ticket::getCategoryId)); |
1,238,631 | protected void updateValuesFromCurrentColor() {<NEW_LINE>int[] hsv = ColorUtils.RGBtoHSV(color);<NEW_LINE>int ch = hsv[0];<NEW_LINE>int cs = hsv[1];<NEW_LINE>int cv = hsv[2];<NEW_LINE>int cr = MathUtils.<MASK><NEW_LINE>int cg = MathUtils.round(color.g * 255.0f);<NEW_LINE>int cb = MathUtils.round(color.b * 255.0f);<NEW_... | round(color.r * 255.0f); |
917,310 | public static Matrix St(double[][] x, double[] mean, int k, double tol) {<NEW_LINE>int n = x.length;<NEW_LINE>int p = x[0].length;<NEW_LINE>Matrix St = new Matrix(p, p);<NEW_LINE>St.uplo(UPLO.LOWER);<NEW_LINE>for (double[] xi : x) {<NEW_LINE>for (int j = 0; j < p; j++) {<NEW_LINE>for (int l = 0; l <= j; l++) {<NEW_LINE... | .get(j, l)); |
1,850,277 | public static JPDADebugger attach(String hostName, int portNumber, Object[] services) throws DebuggerStartException {<NEW_LINE>Object[] s = new Object[services.length + 1];<NEW_LINE>System.arraycopy(services, 0, s, 1, services.length);<NEW_LINE>s[0] = <MASK><NEW_LINE>DebuggerEngine[] es = DebuggerManager.getDebuggerMan... | AttachingDICookie.create(hostName, portNumber); |
1,433,612 | protected boolean showHint(final JComponent component) {<NEW_LINE>myInsideShow = true;<NEW_LINE>if (myCurrentHint != null) {<NEW_LINE>myCurrentHint.hide();<NEW_LINE>}<NEW_LINE>myCurrentHint = new LightweightHint(component) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean canAutoHideOn(TooltipEvent event) {<NEW... | myCurrentHint, HintManager.UNDER, true); |
860,450 | protected void _fillDirectByteBuffer(ByteBuffer bb) {<NEW_LINE>// Taken from MacPixels<NEW_LINE>if (this.bytes != null) {<NEW_LINE>this.bytes.rewind();<NEW_LINE>if (this.bytes.isDirect()) {<NEW_LINE>_copyPixels(bb, this.bytes, getWidth() * getHeight());<NEW_LINE>} else {<NEW_LINE>bb.put(this.bytes);<NEW_LINE>}<NEW_LINE... | >> 24) & 0xff)); |
682,516 | private JavaRDD<Rating> parsedToRatingRDD(JavaRDD<String[]> parsedRDD, Broadcast<? extends Map<String, Integer>> bUserIDToIndex, Broadcast<? extends Map<String, Integer>> bItemIDToIndex) {<NEW_LINE>JavaPairRDD<Long, Rating> timestampRatingRDD = parsedRDD.mapToPair(tokens -> {<NEW_LINE>try {<NEW_LINE>return new Tuple2<>... | long now = System.currentTimeMillis(); |
1,642,427 | public String sendCmd(final String cmd) {<NEW_LINE>try (final Socket clientSocket = new Socket(hostName, port);<NEW_LINE>final BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), ICmd.SICS_CMD_CHARSET));<NEW_LINE>final OutputStream out = clientSocket.getOutputStream()) {<NEW_LINE... | logger.debug("Result (first line) as read from the socket: {}", result); |
1,505,583 | public static QueryMediaWorkflowListResponse unmarshall(QueryMediaWorkflowListResponse queryMediaWorkflowListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryMediaWorkflowListResponse.setRequestId(_ctx.stringValue("QueryMediaWorkflowListResponse.RequestId"));<NEW_LINE>List<String> nonExistMediaWorkflowIds = new Arra... | ("QueryMediaWorkflowListResponse.NonExistMediaWorkflowIds[" + i + "]")); |
261,149 | public void establishCsAccessSourceSet() {<NEW_LINE>final SourceSetContainer sourceSets = (SourceSetContainer) project.getProperties().get("sourceSets");<NEW_LINE>final SourceSet mainSourceSet = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME);<NEW_LINE>// Create the 'csaccess' source set<NEW_LINE>final SourceSet c... | TaskContainer tasks = project.getTasks(); |
1,778,378 | public UpdateScriptResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateScriptResult updateScriptResult = new UpdateScriptResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | JsonToken token = context.getCurrentToken(); |
1,416,639 | public UOWToken suspend() throws SystemException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "suspend");<NEW_LINE>Transaction transaction = null;<NEW_LINE>LocalTransactionCoordinator localTranCoord = null;<NEW_LINE>// All of the currently active UOWs must be suspended<NEW_LINE>// and a UOWToken created wh... | = new EmbeddableUOWTokenImpl(transaction, localTranCoord); |
257,368 | final ListDomainNamesResult executeListDomainNames(ListDomainNamesRequest listDomainNamesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDomainNamesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListDo... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
350,981 | public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {<NEW_LINE>writer.<MASK><NEW_LINE>writer.sep("REPLACE");<NEW_LINE>for (SqlNode keyword : keywords) {<NEW_LINE>keyword.unparse(writer, 0, 0);<NEW_LINE>}<NEW_LINE>writer.sep("INTO");<NEW_LINE>final int opLeft = getOperator().getLeftPrec();<NEW_LINE>final ... | startList(SqlWriter.FrameTypeEnum.SELECT); |
1,545,457 | public Response removeMember(@FormParam("selection") @DefaultValue("MEMBER") String selectionType, @PathParam("queryname") String queryName, @PathParam("axis") String axisName, @PathParam("dimension") String dimensionName, @PathParam("member") String uniqueMemberName) {<NEW_LINE>try {<NEW_LINE>if (log.isDebugEnabled())... | .ok().build(); |
369,998 | public void runApplication() {<NEW_LINE>Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "ReactRootView.runApplication");<NEW_LINE>try {<NEW_LINE>if (mReactInstanceManager == null || !mIsAttachedToInstance) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (reactContext == null) {<NEW_LINE>return;<NEW_LINE>}<... | ReactContext reactContext = mReactInstanceManager.getCurrentReactContext(); |
1,206,611 | public Metric deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {<NEW_LINE>JsonObject jsonObject = jsonElement.getAsJsonObject();<NEW_LINE>String name = null;<NEW_LINE>if (jsonObject.get("name") != null)<NEW_LINE>name = jsonObject.get("name"... | getValue().getAsString()); |
779,258 | private void handleActiveAndJoined(JoinMessage joinMessage) {<NEW_LINE>if (!(joinMessage instanceof JoinRequest)) {<NEW_LINE>logDroppedMessage(joinMessage);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClusterServiceImpl clusterService = node.getClusterService();<NEW_LINE>Address masterAddress = clusterService.getMasterAddress... | suspectMember(master, message, false); |
1,402,282 | public ListThingsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListThingsResult listThingsResult = new ListThingsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | class).unmarshall(context)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.