idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
277,050 | private Offset checkSignatures(Program program) {<NEW_LINE>int magicLen = ISO9660Constants.MAGIC_BYTES.length;<NEW_LINE>byte[] signatureArray = new byte[magicLen];<NEW_LINE>try {<NEW_LINE>Options options = program.getOptions("Program Information");<NEW_LINE>String format = options.getString("Executable Format", null);<... | blocks[0].getSize(); |
1,282,703 | private void computeFoldingRanges(List<FoldingRange> foldingRanges, ITypeRoot unit, IProgressMonitor monitor) {<NEW_LINE>try {<NEW_LINE>ISourceRange range = unit.getSourceRange();<NEW_LINE>if (!SourceRange.isAvailable(range)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String contents = unit.getSource();<NEW_LINE>if (String... | regionFolding.setKind(FoldingRangeKind.Region); |
1,106,654 | private Object decodePer(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN_PER, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.... | = new Position(getProtocolName()); |
1,633,786 | public void valueChanged(ListSelectionEvent evt) {<NEW_LINE>if (!evt.getValueIsAdjusting()) {<NEW_LINE>HgTag tag = null;<NEW_LINE>if (panel.tagList.getSelectedValue() instanceof HgTag) {<NEW_LINE>tag = (HgTag<MASK><NEW_LINE>}<NEW_LINE>if (tag == null) {<NEW_LINE>panel.btnRemove.setEnabled(false);<NEW_LINE>panel.btnUpda... | ) panel.tagList.getSelectedValue(); |
722,218 | private void showCycle(final List<NodeScript> cycle) {<NEW_LINE>final HighlightedElements highlightedElements = HighlightedElements.of(configurable);<NEW_LINE>highlightedElements.clear();<NEW_LINE>Stream<Object> relatedElements = cycle.stream().map(NodeScript::containingElements).map(RelatedElements::getElements).flatM... | .of(HighlightedTransformedObject.FAILURE_COLOR)); |
627,618 | private // does not exist in the directory, delete it<NEW_LINE>void verifyExistingFile(File source, Long hashOfFileToBeAdded) throws IOException {<NEW_LINE>FileReference fileReference = fileReferenceFromHash(hashOfFileToBeAdded);<NEW_LINE>File destinationDir = destinationDir(fileReference);<NEW_LINE>if (!destinationDir... | toPath(), "basic:lastAccessTime", fileTime); |
842,013 | static TypeSpecDataHolder generateGetEventHandlerMethod(SpecModel specModel, EventDeclarationModel eventDeclaration) {<NEW_LINE>final String scopeMethodName = specModel.getScopeMethodName();<NEW_LINE>final ClassName eventClassName = ClassName.bestGuess(eventDeclaration.getRawName().toString());<NEW_LINE>final List<Type... | build()).build(); |
1,057,755 | private ClassName bindingClassName(ClassName adapterName, ExecutableElement providerMethod, Map<ExecutableElement, ClassName> methodToClassName, Map<String, AtomicInteger> methodNameToNextId) {<NEW_LINE>ClassName className = methodToClassName.get(providerMethod);<NEW_LINE>if (className != null)<NEW_LINE>return classNam... | methodToClassName.put(providerMethod, className); |
92,853 | public static void main(String[] args) throws Exception {<NEW_LINE>ClientConfig daxConfig = new ClientConfig().withCredentialsProvider(new ProfileCredentialsProvider()).withEndpoints("mydaxcluster.2cmrwl.clustercfg.dax.use1.cache.amazonaws.com:8111");<NEW_LINE>AmazonDynamoDBAsync client = new ClusterDaxAsyncClient(daxC... | HashMap<String, AttributeValue>(); |
770,117 | private void emitNullCheck(MethodVisitor mv, Type returnType) {<NEW_LINE>Label label = addLabel();<NEW_LINE>mv.visitInsn(DUP);<NEW_LINE>mv.visitJumpInsn(IFNONNULL, label);<NEW_LINE>mv.visitTypeInsn(NEW, "java/lang/NullPointerException");<NEW_LINE>mv.visitInsn(DUP);<NEW_LINE>ParameterizedType parameterizedType = Paramet... | new Object[] { "java/lang/Object" }); |
1,086,969 | public void run() {<NEW_LINE>serverHealthCheck.isHealthStatus();<NEW_LINE>List<CacheData> cacheDataList = new ArrayList();<NEW_LINE>List<<MASK><NEW_LINE>cacheMap.forEach((key, val) -> cacheDataList.add(val));<NEW_LINE>List<String> changedTpIds = checkUpdateDataIds(cacheDataList, inInitializingCacheList);<NEW_LINE>for (... | String> inInitializingCacheList = new ArrayList(); |
1,275,823 | private JComponent createRightActionsToolbar() {<NEW_LINE>myIncludeAction = new AnAction(InspectionsBundle.message("inspections.result.view.include.action.text")) {<NEW_LINE><NEW_LINE>{<NEW_LINE>registerCustomShortcutSet(CommonShortcuts.INSERT, myTree);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actio... | registerCustomShortcutSet(CommonShortcuts.DELETE, myTree); |
1,476,592 | public int compareTo(@Nonnull GuildChannel o) {<NEW_LINE>Checks.notNull(o, "Channel");<NEW_LINE>// if bucket matters<NEW_LINE>if (getType().getSortBucket() != o.getType().getSortBucket())<NEW_LINE>return Integer.compare(getType().getSortBucket(), o.getType().getSortBucket());<NEW_LINE>// if position matters<NEW_LINE>if... | ), oPositionableChannel.getPositionRaw()); |
1,320,582 | public void perform(FileObject file, JTextComponent pane) {<NEW_LINE>JButton ok = new JButton(NbBundle.getMessage(AddPropertyCodeGenerator.class, "LBL_ButtonOK"));<NEW_LINE>CodeStyle cs = CodeStyle.<MASK><NEW_LINE>if (cs == null) {<NEW_LINE>cs = CodeStyle.getDefault(file);<NEW_LINE>}<NEW_LINE>final AddPropertyPanel add... | getDefault(pane.getDocument()); |
1,531,199 | public void marshall(SetSourceRequest setSourceRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (setSourceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(setSourceRequest.getDecryption(), DE... | setSourceRequest.getDescription(), DESCRIPTION_BINDING); |
746,816 | protected void initLaunchDir() {<NEW_LINE>initLaunchId();<NEW_LINE>try {<NEW_LINE>currentLaunchDir = new File(getConfigurationFile().<MASK><NEW_LINE>if (!currentLaunchDir.mkdir()) {<NEW_LINE>throw new IOException("failed to create directory " + currentLaunchDir);<NEW_LINE>}<NEW_LINE>// copy cxml to launch dir<NEW_LINE>... | getParentFile(), getCurrentLaunchId()); |
823,495 | public byte[] box(double minLon, double maxLon, double minLat, double maxLat) throws IOException {<NEW_LINE>final int minX = Math.max(0, lon(minLon));<NEW_LINE>if (minX > extent) {<NEW_LINE>return EMPTY;<NEW_LINE>}<NEW_LINE>final int minY = Math.min(extent, lat(minLat));<NEW_LINE>if (minY > extent) {<NEW_LINE>return EM... | minX, maxX, minY, maxY); |
98,105 | protected String generateClickableCellStyles(Object itemId, Column column, MetaPropertyPath propertyPath) {<NEW_LINE>EntityTableItems<E> entityTableSource = (EntityTableItems<E>) getItems();<NEW_LINE>if (entityTableSource == null) {<NEW_LINE>throw new IllegalStateException("TableItems is not set");<NEW_LINE>}<NEW_LINE>... | StringUtils.contains(stringValue, "\n"); |
1,809,603 | public void iterationStart(LoopIterationEvent event) {<NEW_LINE>// Cannot use getThreadContext() as not cloned per thread<NEW_LINE>JMeterVariables variables = JMeterContextService.getContext().getVariables();<NEW_LINE>long start = getStart();<NEW_LINE>long end = getEnd();<NEW_LINE>long increment = getIncrement();<NEW_L... | .set((long) iteration); |
591,558 | private List<Script> parseScripts(Vector<XMLElement> xmlElements) {<NEW_LINE>final ArrayList<Script> scripts = new ArrayList<Script>();<NEW_LINE>if (xmlElements == null || xmlElements.isEmpty())<NEW_LINE>return scripts;<NEW_LINE>for (XMLElement scriptXmlNode : xmlElements.get(0).getChildren()) {<NEW_LINE>final Script s... | ScriptingPermissions(scriptXmlNode.getAttributes()); |
66,672 | protected void selectElementFromEditor(@Nonnull FileEditor fileEditor) {<NEW_LINE>if (myProject.isDisposed() || !myViewContentPanel.isShowing())<NEW_LINE>return;<NEW_LINE>if (isAutoscrollFromSource(getCurrentViewId())) {<NEW_LINE>if (fileEditor instanceof TextEditor) {<NEW_LINE>Editor editor = ((<MASK><NEW_LINE>selectE... | TextEditor) fileEditor).getEditor(); |
1,216,574 | final CreateFargateProfileResult executeCreateFargateProfile(CreateFargateProfileRequest createFargateProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createFargateProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,756,558 | public void init(String endpointId, Object componentId, CHFWBundle cfBundle) {<NEW_LINE>final String root = endpointId + (isHttps ? "-ssl" : "");<NEW_LINE>cfw = cfBundle.getFramework();<NEW_LINE>endpointMgr = cfBundle.getEndpointManager();<NEW_LINE>endpointName = root;<NEW_LINE>tcpName = root;<NEW_LINE>sslName = "SSL-"... | "Error stopping chain " + chainName, this, e); |
316,029 | public void onPostChanged(OnPostChanged event) {<NEW_LINE>if (event.causeOfChange instanceof CauseOfOnPostChanged.UpdatePost) {<NEW_LINE>if (!event.isError()) {<NEW_LINE>// here update the menu if it's not a draft anymore<NEW_LINE>invalidateOptionsMenu();<NEW_LINE>} else {<NEW_LINE>updatePostLoadingAndDialogState(PostL... | " - " + event.error.message); |
457,431 | public final Condition equal(Field<T1> t1, Field<T2> t2, Field<T3> t3, Field<T4> t4, Field<T5> t5, Field<T6> t6, Field<T7> t7, Field<T8> t8, Field<T9> t9, Field<T10> t10, Field<T11> t11, Field<T12> t12, Field<T13> t13, Field<T14> t14, Field<T15> t15, Field<T16> t16, Field<T17> t17, Field<T18> t18, Field<T19> t19, Field... | t19, t20, t21, t22); |
544,585 | private static MysqlDateTime handleYearInterval(MysqlDateTime src, MySQLInterval interval) {<NEW_LINE>MysqlDateTime ret = new MysqlDateTime();<NEW_LINE>ret.setSqlType(src.getSqlType());<NEW_LINE>int sign = interval.isNeg() ? -1 : 1;<NEW_LINE>long year = src.getYear() + sign * interval.getYear();<NEW_LINE>long month = s... | setMinute(src.getMinute()); |
641,548 | public boolean triggerAbility(TriggeredAbility source, Game game) {<NEW_LINE>Ability ability = source.copy();<NEW_LINE>List<Ability> options = getPlayableOptions(ability, game);<NEW_LINE>if (options.isEmpty()) {<NEW_LINE>logger.debug("simulating -- triggered ability:" + ability);<NEW_LINE>game.getStack().push(<MASK><NE... | new StackAbility(ability, playerId)); |
1,351,568 | @Path("/create/{params:.*}")<NEW_LINE>@Produces("text/plain")<NEW_LINE>public Response createIndex(@Context HttpServletRequest httpServletRequest, @Context final HttpServletResponse httpServletResponse, @PathParam("params") String params) {<NEW_LINE>try {<NEW_LINE>InitDataObject init = auth(httpServletRequest, httpServ... | ().get("shards")); |
614,046 | private void tryCommitJob(LoadJob job, List<Table> tables) {<NEW_LINE>// check transaction state<NEW_LINE>Load load = Catalog<MASK><NEW_LINE>GlobalTransactionMgr globalTransactionMgr = Catalog.getCurrentGlobalTransactionMgr();<NEW_LINE>TransactionState transactionState = globalTransactionMgr.getTransactionState(job.get... | .getCurrentCatalog().getLoadInstance(); |
809,722 | protected void putMetadataAndHashIndexTask(Transaction t, Map<Long, StreamMetadata> streamIdsToMetadata) {<NEW_LINE>DataStreamMetadataTable mdTable = tables.getDataStreamMetadataTable(t);<NEW_LINE>Map<Long, StreamMetadata> prevMetadatas = getMetadata(t, streamIdsToMetadata.keySet());<NEW_LINE>Map<DataStreamMetadataTabl... | long streamId = e.getKey(); |
347,880 | /*<NEW_LINE>protected String convertUserObjectForTextField(Object userObject)<NEW_LINE>{<NEW_LINE>if (! (userObject instanceof GeodbObject))<NEW_LINE>return super.convertUserObjectForTextField(userObject);<NEW_LINE>//<NEW_LINE>GeodbObject geodb = (GeodbObject)userObject;<NEW_LINE><MASK><NEW_LINE>if ("city".equals(match... | String matchedField = geodb.getMatchedField(); |
1,675,439 | protected SDField addField(Schema schema, SDField field, String suffix, String indexing, String queryCommand) {<NEW_LINE>SDField implementationField = schema.getConcreteField(field.getName() + "_" + suffix);<NEW_LINE>if (implementationField != null) {<NEW_LINE>deployLogger.logApplicationPackage(Level.WARNING, "Implemen... | String indexName = field.getName(); |
1,474,077 | boolean addBlobStore(ReplicaId replica) {<NEW_LINE>rwLock.writeLock().lock();<NEW_LINE>boolean succeed = false;<NEW_LINE>try {<NEW_LINE>if (!running) {<NEW_LINE>logger.error("Failed to add {} because disk manager is not running", replica.getPartitionId());<NEW_LINE>} else {<NEW_LINE>// Clean up existing dir associated ... | .getOverallRequirements(storeRequirements), false); |
1,603,810 | private void createUpperMenu(Composite composite) {<NEW_LINE>Group parentGroup = new Group(composite, SWT.NONE);<NEW_LINE>parentGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));<NEW_LINE>GridLayout layout = new GridLayout(10, false);<NEW_LINE>parentGroup.setLayout(layout);<NEW_LINE>Label label = new L... | SWT.LEFT | SWT.BORDER); |
425,994 | public void tableChanged(TableModelEvent e) {<NEW_LINE>if (e.getColumn() != 0)<NEW_LINE>return;<NEW_LINE>log.config("Row=" + e.getFirstRow() + "-" + e.getLastRow() + ", Col=" + e.getColumn() + ", Type=" + e.getType());<NEW_LINE>boolean isUpdate = (e.getType() == TableModelEvent.UPDATE);<NEW_LINE>int row = e.getFirstRow... | importedPaymentTable.getValueAt(matchedRow, 0); |
131,795 | protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight) {<NEW_LINE>ToggleSwitch toggleSwitch = getSkinnable();<NEW_LINE>double thumbWidth = snapSizeX(thumb.prefWidth(-1));<NEW_LINE>double thumbHeight = snapSizeY(thumb.prefHeight(-1));<NEW_LINE><MASK><NEW_LINE>double th... | thumb.resize(thumbWidth, thumbHeight); |
642,896 | private static File prepare() throws IOException {<NEW_LINE>File distributionDirectory = ContainerPathManager<MASK><NEW_LINE>String name = ApplicationNamesInfo.getInstance().getFullProductName();<NEW_LINE>final String iconPath = AppUIUtil.findIcon(distributionDirectory.getPath());<NEW_LINE>if (iconPath == null) {<NEW_L... | .get().getAppHomeDirectory(); |
335,525 | static Text decode(String s) {<NEW_LINE>Text t = new Text();<NEW_LINE>byte[] <MASK><NEW_LINE>// very inefficient code<NEW_LINE>for (int i = 0; i < sb.length; i++) {<NEW_LINE>if (sb[i] == '%') {<NEW_LINE>int x = ++i;<NEW_LINE>int y = ++i;<NEW_LINE>if (y < sb.length) {<NEW_LINE>byte[] hex = { sb[x], sb[y] };<NEW_LINE>Str... | sb = s.getBytes(UTF_8); |
308,393 | public MulticastWirelessMetadata unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MulticastWirelessMetadata multicastWirelessMetadata = new MulticastWirelessMetadata();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | ().unmarshall(context)); |
458,164 | public void run(RegressionEnvironment env) {<NEW_LINE>String text = "@name('s0') select irstream * from SupportMarketDataBean#length(3)#weighted_avg(price, volume)";<NEW_LINE>env.compileDeployAddListenerMileZero(text, "s0");<NEW_LINE>env.sendEventBean(makeBean(10, 1000));<NEW_LINE>env.assertPropsNV("s0", new Object[][]... | (makeBean(9.5, 600)); |
1,357,960 | protected void createParameterGroups(Composite parent) {<NEW_LINE>Composite composite = new Composite(parent, SWT.NO_FOCUS);<NEW_LINE>composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));<NEW_LINE>GridLayout layout = new GridLayout(2, true);<NEW_LINE>layout.marginWidth = 0;<NEW_LINE>layout.marginHeight... | layout.horizontalSpacing = convertHorizontalDLUsToPixels(HORIZONTAL_SPACING); |
295,752 | public TimingInformation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TimingInformation timingInformation = new TimingInformation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | JsonToken token = context.getCurrentToken(); |
297,376 | public int start() {<NEW_LINE><MASK><NEW_LINE>IntentFilter filter = new IntentFilter();<NEW_LINE>if (requirements.isNetworkRequired()) {<NEW_LINE>if (Util.SDK_INT >= 24) {<NEW_LINE>registerNetworkCallbackV24();<NEW_LINE>} else {<NEW_LINE>filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);<NEW_LINE>}<NEW_LINE>}<N... | notMetRequirements = requirements.getNotMetRequirements(context); |
1,793,666 | // getProduct<NEW_LINE>@Override<NEW_LINE>protected boolean afterSave(boolean newRecord, boolean success) {<NEW_LINE>int M_ProductionBatch_ID = getParent().getM_ProductionBatch_ID();<NEW_LINE>if (newRecord) {<NEW_LINE>if (M_ProductionBatch_ID == 0)<NEW_LINE>return true;<NEW_LINE>MProductionBatchLine pbLine = MProductio... | super.afterSave(newRecord, success); |
934,008 | private JPanel expertSettings() {<NEW_LINE>JPanel panel = new JPanel(new GridLayout(6, 1));<NEW_LINE>panel.setOpaque(false);<NEW_LINE>JPanel header = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>header.setOpaque(false);<NEW_LINE>header.add(new JLabel(MessageUtils.getLocalizedMessage("openindex.label.expert"... | (FontUtils.elegantIconHtml("")); |
878,477 | private void parallelScan(Iterable<? extends Tree> expecteds, Iterable<? extends Tree> actuals) {<NEW_LINE>if (expecteds != null && actuals != null) {<NEW_LINE>Iterator<? extends Tree> expectedsIterator = expecteds.iterator();<NEW_LINE>Iterator<? extends Tree<MASK><NEW_LINE>while (expectedsIterator.hasNext() && actuals... | > actualsIterator = actuals.iterator(); |
139,733 | Object adaptOutput(Object output, AnnotatedElement element, AnnotatedType type) {<NEW_LINE>if (output == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Transparently handle unexpected wrapped results. This enables elegant exception handling, partial results etc.<NEW_LINE>if (DataFetcherResult.class.equals(output.... | errors(errors).build(); |
978,839 | public void receivedNotify(NetworkInterface network_interface, InetAddress local_address, InetAddress originator, String usn, URL location, String nt, String nts) {<NEW_LINE>try {<NEW_LINE>this_mon.enter();<NEW_LINE>if (nt.contains("upnp:rootdevice")) {<NEW_LINE>if (nts.contains("alive")) {<NEW_LINE>// alive can be rep... | best_ni, best_addr, usn, location); |
546,285 | protected byte[] encodeDeviceLocation(IDecodedDeviceRequest<IDeviceLocationCreateRequest> event) throws SiteWhereException {<NEW_LINE>try {<NEW_LINE>IDeviceLocationCreateRequest location = (IDeviceLocationCreateRequest) event.getRequest();<NEW_LINE>// Header<NEW_LINE>DeviceEvent.Header.Builder headerBuilder = builHeade... | ().doubleValue())); |
1,058,911 | public static ListSQLReviewOriginSQLResponse unmarshall(ListSQLReviewOriginSQLResponse listSQLReviewOriginSQLResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSQLReviewOriginSQLResponse.setRequestId(_ctx.stringValue("ListSQLReviewOriginSQLResponse.RequestId"));<NEW_LINE>listSQLReviewOriginSQLResponse.setErrorCode(_ctx... | ("ListSQLReviewOriginSQLResponse.OriginSQLList[" + i + "].CheckedTime")); |
886,399 | private void sendCursorPrepExec() {<NEW_LINE>ByteBuf content = tdsMessageCodec.alloc().ioBuffer();<NEW_LINE>tdsMessageCodec.encoder().encodeHeaders(content);<NEW_LINE>// RPCReqBatch<NEW_LINE>content.writeShortLE(0xFFFF);<NEW_LINE>content.writeShortLE(ProcId.Sp_CursorPrepExec);<NEW_LINE>// Option flags<NEW_LINE>content.... | content, null, true, 0); |
906,364 | private void refreshJavaPlatforms() {<NEW_LINE>SortedSet<JavaPlatform> platforms = new TreeSet<JavaPlatform>(new Comparator<JavaPlatform>() {<NEW_LINE><NEW_LINE>Collator COLL = Collator.getInstance();<NEW_LINE><NEW_LINE>public int compare(JavaPlatform p1, JavaPlatform p2) {<NEW_LINE>int res = COLL.compare(p1.getDisplay... | JavaPlatform pf = jdkConf.getSelectedPlatform(); |
947,340 | public Packet decodePacket(ByteBuffer src) {<NEW_LINE>int pos = src.position();<NEW_LINE>int end = pos + packetLength;<NEW_LINE>int limit = src.limit();<NEW_LINE>try {<NEW_LINE>src.limit(end);<NEW_LINE>src.position(src.<MASK><NEW_LINE>if (reverseByteOrder()) {<NEW_LINE>src.order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>}<NEW... | position() + Packet.headerLength); |
1,329,646 | public boolean addEdge(Edge e) {<NEW_LINE>if (!edges.add(e)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>stream.add(e);<NEW_LINE>Edge position = srcUnitToEdge.<MASK><NEW_LINE>if (position == null) {<NEW_LINE>srcUnitToEdge.put(e.srcUnit(), e);<NEW_LINE>position = dummy;<NEW_LINE>}<NEW_LINE>e.insertAfterByUnit(position)... | get(e.srcUnit()); |
1,005,272 | private void createLeaseTable(Connection conn) throws SQLException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "createLeaseTable", new java.lang.Object[] { conn, this });<NEW_LINE>Statement createTableStmt = null;<NEW_LINE>try {<NEW_LINE>createTableStmt = conn.createStatement();<NEW_LINE>if (_isOracle) {<... | debug(tc, "Create Oracle Table using: " + oracleTableString); |
592,711 | static StructureViewTreeElement createTree(SpecModel model) {<NEW_LINE>List<TreeElement> children = new ArrayList<>(1);<NEW_LINE>add(children, "Props", model.getProps().stream().map(SpecTreeElementFactory::create).collect(Collectors.toList()));<NEW_LINE>add(children, "States", model.getStateValues().stream().map(SpecTr... | addAll(model.getUpdateStateWithTransitionMethods()); |
1,435,030 | // If we get a 401 or 403, try revalidating the auth token before bailing<NEW_LINE>private synchronized void handleException(IOException e) throws IOException {<NEW_LINE>if (e instanceof HttpResponseException) {<NEW_LINE>HttpResponseException h = (HttpResponseException) e;<NEW_LINE>int statusCode = h.getResponse().getS... | ContextManager.getContext(), token); |
1,189,288 | static // [START securitycenter_update_source]<NEW_LINE>Source updateSource(SourceName sourceName) {<NEW_LINE>try (SecurityCenterClient client = SecurityCenterClient.create()) {<NEW_LINE>// Start setting up a request to update a source.<NEW_LINE>// SourceName sourceName = SourceName.of(/*organization=*/"123234324",/*so... | addPaths("display_name").build(); |
1,115,379 | public void aggregate(ByteBuffer buf, int numRows, int[] positions, @Nullable int[] rows, int positionOffset) {<NEW_LINE>// Save position, limit and restore later instead of allocating a new ByteBuffer object<NEW_LINE>final int oldPosition = buf.position();<NEW_LINE>final int oldLimit = buf.limit();<NEW_LINE>try {<NEW_... | position = positions[i] + positionOffset; |
293,725 | private ModeImpl findClosestNeighbor(ModeImpl mode) {<NEW_LINE>ArrayList<ModeImpl> modes = new ArrayList<ModeImpl>(model.getModes().size());<NEW_LINE>ModeImpl inSplitLeftNeighbor = null;<NEW_LINE>ModeImpl inSplitRightNeighbor = null;<NEW_LINE>SplitConstraint[] sc = mode.getConstraints();<NEW_LINE>int index = sc[sc.leng... | ] sc1 = o1.getConstraints(); |
1,045,268 | public StopFlowResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StopFlowResult stopFlowResult = new StopFlowResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<... | String currentParentElement = context.getCurrentParentElement(); |
1,692,550 | final DescribeNetworkInterfacePermissionsResult executeDescribeNetworkInterfacePermissions(DescribeNetworkInterfacePermissionsRequest describeNetworkInterfacePermissionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeNetworkInterfacePermissionsRequest);<NEW_LINE>AWSRequestMetrics ... | (super.beforeMarshalling(describeNetworkInterfacePermissionsRequest)); |
1,750,364 | public int write(byte[] data) throws IOException, JSONException {<NEW_LINE>int result = 1;<NEW_LINE>URL baseURL = new URL("http://" + baseIP + "/" + sendDataEndPoint);<NEW_LINE>int written = 0;<NEW_LINE>JSONArray responseArray = new JSONArray();<NEW_LINE>while (written < data.length) {<NEW_LINE>JSONObject jsonObject = ... | post(body).build(); |
108,422 | public static boolean anymatch(final HandleSet set1, final HandleSet set2) {<NEW_LINE>// comparators must be equal<NEW_LINE>if ((set1 == null) || (set2 == null))<NEW_LINE>return false;<NEW_LINE>if (set1.comparator() != set2.comparator())<NEW_LINE>return false;<NEW_LINE>if (set1.isEmpty() || set2.isEmpty())<NEW_LINE>ret... | ) : set1.size()); |
472,487 | public Dispatcher.Resolved.ForMethodExit asMethodExit(List<? extends OffsetMapping.Factory<?>> userFactories, @MaybeNull ClassReader classReader, Unresolved methodEnter, PostProcessor.Factory postProcessorFactory) {<NEW_LINE>Map<String, TypeDefinition> namedTypes = methodEnter.getNamedTypes();<NEW_LINE>for (ParameterDe... | IllegalStateException(adviceMethod + " attempts use of undeclared local variable " + name); |
1,394,203 | ConfidenceInterval computeConfidenceInterval(double alpha, double alphaNum) {<NEW_LINE>// Setting alphaDen such that (1 - alpha) = (1 - alphaNum) * (1 - alphaDen).<NEW_LINE>double alphaDen = (alpha - alphaNum) / (1 - alphaNum);<NEW_LINE>ConfidenceInterval confIntNum = normalizedSum.computeConfidenceInterval(alphaNum);<... | () / confIntDen.lowerBound(); |
515,251 | private void actOnLogin(PostLoginEvent event) {<NEW_LINE>ProxiedPlayer player = event.getPlayer();<NEW_LINE>UUID playerUUID = player.getUniqueId();<NEW_LINE>String playerName = player.getName();<NEW_LINE>InetAddress address = player.getAddress().getAddress();<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>Ac... | () -> time, playerName)); |
12,729 | public Node withChildReplaced(String childName, Node newChild) {<NEW_LINE>checkArgument(isNetwork(), "Node %s is not a network node.", this);<NEW_LINE>Node childToReplace = getChild(childName);<NEW_LINE>checkNotNull(newChild);<NEW_LINE>checkArgument(newChild.getName().equals(childName), "New child %s does not have the ... | > b = ImmutableList.builder(); |
321,264 | public void onCreate(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>if (getAppTheme().equals(AppTheme.DARK)) {<NEW_LINE>setTheme(R.style.aboutDark);<NEW_LINE>} else if (getAppTheme().equals(AppTheme.BLACK)) {<NEW_LINE>setTheme(R.style.aboutBlack);<NEW_LINE>} else {<NEW_LINE... | getWindow().setStatusBarColor(darkMutedColor); |
332,446 | public String uploadCertificate(final UploadCustomCertificateCmd cmd) {<NEW_LINE>if (cmd.getPrivateKey() != null && cmd.getAlias() != null) {<NEW_LINE>throw new InvalidParameterValueException("Can't change the alias for private key certification");<NEW_LINE>}<NEW_LINE>if (cmd.getPrivateKey() == null) {<NEW_LINE>if (cmd... | String certificate = cmd.getCertificate(); |
143,115 | private List<PathElement> parse(String path) {<NEW_LINE>if (path == null) {<NEW_LINE>throw new NullPointerException("path");<NEW_LINE>}<NEW_LINE>final String[] split = path.split(Pattern.quote("."));<NEW_LINE>final List<PathElement> elements = new ArrayList<PathElement>();<NEW_LINE>for (String element : split) {<NEW_LI... | throw new IllegalArgumentException("Bogus path: " + path); |
282,253 | public void visitRuntimeResource(String httpMethod, String fullPath, RuntimeResource runtimeResource) {<NEW_LINE><MASK><NEW_LINE>List<MediaType> produces = Collections.emptyList();<NEW_LINE>if (serverMediaType != null) {<NEW_LINE>if ((serverMediaType.getSortedOriginalMediaTypes() != null) && serverMediaType.getSortedOr... | ServerMediaType serverMediaType = runtimeResource.getProduces(); |
916,495 | private void citationExists(EntityManagerContainerBasic emc, Field field, List<String> values, JpaObject jpa, CheckRemove checkRemove, CheckRemoveType checkRemoveType) throws Exception {<NEW_LINE>next: for (String value : ListTools.nullToEmpty(values)) {<NEW_LINE>if (ArrayUtils.contains(checkRemove.excludes(), value)) ... | cb.createQuery(Long.class); |
876,283 | public List<Attachment> render(TextTemplateEngine engine, Map<String, Object> model, SlackMessageDefaults.AttachmentDefaults defaults) {<NEW_LINE>Object value = ObjectPath.eval(listPath, model);<NEW_LINE>if ((value instanceof Iterable) == false) {<NEW_LINE>throw new IllegalArgumentException("dynamic attachment could no... | "] list to contain" + " key/value pairs, but found [" + obj + "] instead"); |
502,175 | public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());<NEW_LINE>builder.setTitle(R.string.join_public_channel);<NEW_LINE>DialogJoinConferenceBinding binding = DataBindingUtil.inflate(getActivity().getLayoutInflater(), R.layout.dialo... | R.string.cancel, null); |
254,649 | private void action_loadBOM() {<NEW_LINE>// m_frame.setBusy(true);<NEW_LINE>m_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));<NEW_LINE>reload = false;<NEW_LINE>int M_Product_ID = getM_Product_ID();<NEW_LINE>if (M_Product_ID == 0)<NEW_LINE>return;<NEW_LINE>MProduct M_Product = MProduct.get(getCtx(), M_P... | (M_Product.getName())); |
490,542 | // only called from assert<NEW_LINE>private static boolean valuesInOrderAndBounds(BKDConfig config, int count, int sortedDim, byte[] minPackedValue, byte[] maxPackedValue, IntFunction<BytesRef> values, int[] docs, int docsOffset) {<NEW_LINE>byte[] lastPackedValue = new byte[config.packedBytesLength];<NEW_LINE>int lastD... | lastDoc = docs[docsOffset + i]; |
510,298 | public static void main(String[] args) throws Exception {<NEW_LINE>if (args.length < 2) {<NEW_LINE>logger.severe("Usage: please pass 2 arguments:\n" + "arg0 = location of the JSON file for the service account you created in the GCP console\n" + "arg1 = project name in the form \"projects/xyz\" where \"xyz\" is the proj... | (Arrays.asList("https://www.googleapis.com/auth/cloud-platform")); |
1,535,522 | public Response handleToken(VerifyEmailActionToken token, ActionTokenContext<VerifyEmailActionToken> tokenContext) {<NEW_LINE>UserModel user = tokenContext.getAuthenticationSession().getAuthenticatedUser();<NEW_LINE>EventBuilder event = tokenContext.getEvent();<NEW_LINE>event.event(EventType.VERIFY_EMAIL).detail(Detail... | AuthenticationSessionManager(tokenContext.getSession()); |
37,235 | private String buildClasspath(String xfireDir, String antDir, String additional) {<NEW_LINE>String libDir = xfireDir + File.separatorChar + "lib";<NEW_LINE>String[] xfireLibs = new File(libDir).list(new FilenameFilter() {<NEW_LINE><NEW_LINE>public boolean accept(File dir, String name) {<NEW_LINE>if (!name.endsWith(".ja... | = xfireDir + File.separatorChar + "modules"; |
1,130,492 | private boolean defaultFileExists(String ksFile, String type, SerializableProtectedString ksPass) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, "defaultFileExists", new Object[] { ksFile, type });<NEW_LINE>}<NEW_LINE>boolean exists = false;<NEW_LINE>// check if the ... | String(ksPass.getChars()); |
1,712,579 | private void handleDuplicates(DuplicateSearchResult result) {<NEW_LINE>if (result == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LibraryTab libraryTab = frame.getCurrentLibraryTab();<NEW_LINE>final NamedCompound compoundEdit = new NamedCompound(Localization.lang("duplicate removal"));<NEW_LINE>// Now, do the actual re... | , result.getToAdd())); |
914,107 | private void insertHostVer2(String host, String bindApplicationName, short bindServiceType, long statisticsRowSlot, String parentApplicationName, short parentServiceType) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Insert host-application map. host={}, bindApplicationName={}, bindServiceType={}, pa... | ex.getCause(), ex); |
1,192,555 | final StopChannelResult executeStopChannel(StopChannelRequest stopChannelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopChannelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.SERVICE_ID, "MediaTailor"); |
1,594,526 | private static void putBuildElement(AntProjectHelper helper, List<String> buildFolders, String elemName) {<NEW_LINE>Element data = Util.getPrimaryConfigurationData(helper);<NEW_LINE>Document doc = data.getOwnerDocument();<NEW_LINE>// NOI18N<NEW_LINE>Element foldersEl = XMLUtil.findElement(data, "folders", Util.NAMESPAC... | folders = XMLUtil.findSubElements(foldersEl); |
243,201 | private Query createQuery(XMoreLikeThis mlt) throws IOException {<NEW_LINE>BooleanQuery.Builder bqBuilder = new BooleanQuery.Builder();<NEW_LINE>if (this.likeFields != null) {<NEW_LINE>Query mltQuery = mlt.like(this.likeFields);<NEW_LINE>mltQuery = Queries.applyMinimumShouldMatch<MASK><NEW_LINE>bqBuilder.add(mltQuery, ... | ((BooleanQuery) mltQuery, minimumShouldMatch); |
91,083 | private Varnode expandVarnode(Varnode varnode, int sizeIncrease, VariableStorage curStorage, int newSize, DataType type) throws InvalidInputException {<NEW_LINE>Address addr = varnode.getAddress();<NEW_LINE>if (addr.isStackAddress()) {<NEW_LINE>return resizeStackVarnode(varnode, varnode.getSize() + sizeIncrease, curSto... | newReg.getMinimumByteSize() - size); |
922,166 | public void updateMappingInfo(ClusterState clusterState) {<NEW_LINE>mappingInfoLock<MASK><NEW_LINE>try {<NEW_LINE>ImmutableMappingInfo newMappingInfo = mappingInfoRef.updateAndGet(new UnaryOperator() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object apply(Object t) {<NEW_LINE>return new ImmutableMappingInfo(cluster... | .writeLock().lock(); |
63,764 | public AwsEcsServiceLoadBalancersDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsEcsServiceLoadBalancersDetails awsEcsServiceLoadBalancersDetails = new AwsEcsServiceLoadBalancersDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = c... | JsonToken token = context.getCurrentToken(); |
404,982 | public static Group create(Type type, String name, boolean autoSync, boolean useOpen, String masterProject, String directory) {<NEW_LINE>if (Type.ADHOC.equals(type)) {<NEW_LINE>AdHocGroup g = AdHocGroup.create(name, autoSync);<NEW_LINE>if (useOpen) {<NEW_LINE>g.setProjects(new HashSet<Project>(Arrays.asList(OpenProject... | ).getOpenProjects()))); |
1,131,317 | public void read(JmeImporter im) throws IOException {<NEW_LINE>super.read(im);<NEW_LINE>InputCapsule ic = im.getCapsule(this);<NEW_LINE>mesh = (Mesh) ic.readSavable("mesh", null);<NEW_LINE>material = null;<NEW_LINE>String matName = <MASK><NEW_LINE>if (matName != null) {<NEW_LINE>// Material name is set,<NEW_LINE>// Att... | ic.readString("materialName", null); |
465,785 | public void drawCoordinatesOverlay(Graphics2D g, ZoneRenderer renderer) {<NEW_LINE>Object oldAA = SwingUtil.useAntiAliasing(g);<NEW_LINE>Font oldFont = g.getFont();<NEW_LINE>g.setFont(g.getFont().deriveFont(20f).deriveFont(Font.BOLD));<NEW_LINE>FontMetrics fm = g.getFontMetrics();<NEW_LINE>double cellSize = renderer.ge... | g.setColor(Color.orange); |
1,276,918 | private void fillSegmentStats(SegmentReader segmentReader, boolean includeSegmentFileSizes, SegmentsStats stats) {<NEW_LINE>stats.add(1, segmentReader.ramBytesUsed());<NEW_LINE>stats.addTermsMemoryInBytes(guardedRamBytesUsed(segmentReader.getPostingsReader()));<NEW_LINE>stats.addStoredFieldsMemoryInBytes(guardedRamByte... | (segmentReader.getTermVectorsReader())); |
1,170,965 | public void sessionOpen(SessionProto.Session.Open.Req request, StreamObserver<SessionProto.Session.Open.Res> responder) {<NEW_LINE>try {<NEW_LINE>Instant start = Instant.now();<NEW_LINE>Arguments.Session.Type sessionType = Arguments.Session.Type.of(request.getType().getNumber());<NEW_LINE>Options.Session options = appl... | SessionService(this, session, options); |
754,476 | public PointSensitivityBuilder forecastValueSensitivity(RatePaymentPeriod period, RatesProvider provider) {<NEW_LINE>// historic payments have zero sensi<NEW_LINE>if (period.getPaymentDate().isBefore(provider.getValuationDate())) {<NEW_LINE>return PointSensitivityBuilder.none();<NEW_LINE>}<NEW_LINE>PointSensitivityBuil... | sensiAccrual = unitNotionalSensitivityNoCompounding(period, provider); |
1,611,607 | // -------//<NEW_LINE>// visit //<NEW_LINE>// -------//<NEW_LINE>@Override<NEW_LINE>public void visit(AbstractFlagInter flag) {<NEW_LINE>setColor(flag);<NEW_LINE><MASK><NEW_LINE>Set<Relation> rels = (sig != null) ? sig.getRelations(flag, FlagStemRelation.class) : Collections.emptySet();<NEW_LINE>if (rels.isEmpty()) {<N... | SIGraph sig = flag.getSig(); |
822,569 | public static boolean openInBrowser(Context context, Intent intent, boolean showToastIfNoBrowser, boolean braveBrowser) {<NEW_LINE>boolean activityStarted = false;<NEW_LINE>ComponentName defaultBrowserComponentName = Settings.get().getDefaultBrowserComponentName(context);<NEW_LINE>if (defaultBrowserComponentName != nul... | = new Intent(Intent.ACTION_VIEW); |
733,551 | final StartTaskContactResult executeStartTaskContact(StartTaskContactRequest startTaskContactRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startTaskContactRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
39,687 | protected Node createControl() {<NEW_LINE>sourceView = new SourceView();<NEW_LINE>Calendar meetings = new Calendar("Meetings");<NEW_LINE>Calendar training = new Calendar("Training");<NEW_LINE>Calendar customers = new Calendar("Customers");<NEW_LINE>Calendar holidays = new Calendar("Holidays");<NEW_LINE>meetings.setStyl... | training.setStyle(Style.STYLE3); |
391,747 | private void initializeDefaultVirtualNetworkModels() {<NEW_LINE>List<TrafficType> types = new ArrayList<TrafficType>();<NEW_LINE>types.add(TrafficType.Management);<NEW_LINE>types.add(TrafficType.Storage);<NEW_LINE>types.add(TrafficType.Control);<NEW_LINE>List<NetworkVO> dbNets = findManagedNetworks(types);<NEW_LINE>for... | ), net.getTrafficType()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.