idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
840,171 | private <T> List<T> loadFileList(String basekey, Class<T> type) throws BackingStoreException {<NEW_LINE>Preferences pref = NbPreferences.forModule(JavaScopeBuilder.class).node(PREF_SCOPE).node(basekey);<NEW_LINE>List<T> toRet <MASK><NEW_LINE>for (String key : pref.keys()) {<NEW_LINE>final String url = pref.get(key, nul... | = new LinkedList<T>(); |
1,654,785 | public void dump(FormattedWriter writer) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "dump", <MASK><NEW_LINE>try {<NEW_LINE>writer.newLine();<NEW_LINE>writer.startTag(this.getClass().getSimpleName());<NEW_LINE>writer.indent();<NEW_LINE>super.dump(writer);<N... | new Object[] { writer }); |
162,425 | protected void encodeStepStatus(FacesContext context, Wizard wizard) throws IOException {<NEW_LINE><MASK><NEW_LINE>String currentStep = wizard.getStep();<NEW_LINE>boolean currentFound = false;<NEW_LINE>writer.startElement("ul", null);<NEW_LINE>writer.writeAttribute("class", Wizard.STEP_STATUS_CLASS, null);<NEW_LINE>for... | ResponseWriter writer = context.getResponseWriter(); |
311,458 | private synchronized void cleanUselessSourceWrapper(Set<String> uselessStorageIds) {<NEW_LINE>Iterator<Map.Entry<String, DataSourceWrapper>> iterator = dataSourceWrapperMap.entrySet().iterator();<NEW_LINE>LoggerInit.TDDL_DYNAMIC_CONFIG.info(String<MASK><NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>DataSourceWrapper d... | .format("unregister %s storageIds", uselessStorageIds)); |
1,248,667 | public IntermediateLayer constructIntermediateLayer(long queryId, UDTFPlan udtfPlan, RawQueryInputLayer rawTimeSeriesInputLayer, Map<Expression, IntermediateLayer> expressionIntermediateLayerMap, Map<Expression, TSDataType> expressionDataTypeMap, LayerMemoryAssigner memoryAssigner) throws QueryProcessException, IOExcep... | float memoryBudgetInMB = memoryAssigner.assign(); |
312,349 | public void scrobble(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>request = wrapRequest(request);<NEW_LINE>Player player = playerService.getPlayer(request, response);<NEW_LINE>boolean submission = getBooleanParameter(request, "submission", true);<NEW_LINE>int[] ids = getRequired... | times = getLongParameters(request, "time"); |
1,414,818 | public void load(SerializedField metadata, DrillBuf buffer) {<NEW_LINE>List<SerializedField> children = metadata.getChildList();<NEW_LINE>SerializedField offsetField = children.get(0);<NEW_LINE>offsets.load(offsetField, buffer);<NEW_LINE><MASK><NEW_LINE>for (int i = 1; i < children.size(); i++) {<NEW_LINE>SerializedFie... | int bufOffset = offsetField.getBufferLength(); |
324,095 | public static void copyStartUpSo() {<NEW_LINE>try {<NEW_LINE>// copy libjsb.so to cache/weex/jsb/cputype<NEW_LINE>String pkgName = WXEnvironment.getApplication().getPackageName();<NEW_LINE>String cacheFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath();<NEW_LINE>// cp weexjsb any way<N... | .CORE_JSB_SO_PATH = newfile.getAbsolutePath(); |
1,617,546 | private static SpeedStat calculateStat(List<IOTaskResult.Point> points) {<NEW_LINE>SpeedStat result = new SpeedStat();<NEW_LINE>if (points.size() == 0) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>double totalDuration = 0.0;<NEW_LINE>long totalSize = 0L;<NEW_LINE>double[] speeds = new double[points.size()];<NEW_LINE>d... | MAX_VALUE) == 0 ? 0.0 : minSpeed; |
1,087,637 | public void testTimerAccessFromTimeoutAfterCancel() throws Exception {<NEW_LINE>NpTimedObjectTimerLocal timerBean;<NEW_LINE>// --------------------------------------------------------------------<NEW_LINE>// Create a BMT Stateless Bean to test it<NEW_LINE>// -------------------------------------------------------------... | timerBean.prepAccessAfterCancelTest(NpTimedObjectTimerBean.infoAccessAfterCancel); |
453,882 | public Void call() throws Exception {<NEW_LINE>Calendar currentTime = Calendar.getInstance();<NEW_LINE>Date callDate = currentTime.getTime();<NEW_LINE>List<Result> resultsSoFar = getResultList();<NEW_LINE>int numberOfResults = resultsSoFar.size();<NEW_LINE>System.out.println("Task " + id + " call(" + numberOfResults + ... | ") " + currentTime.getTime()); |
1,176,645 | public static void copyFile(final File srcFile, final File destFile, final boolean preserveFileDate) throws IOException {<NEW_LINE>if (srcFile == null) {<NEW_LINE>throw new NullPointerException("Source must not be null");<NEW_LINE>}<NEW_LINE>if (destFile == null) {<NEW_LINE>throw new NullPointerException("Destination m... | IOException("Source '" + srcFile + "' exists but is a directory"); |
664,513 | public void log(Logger useLogger) {<NEW_LINE>String methodName = "log";<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodName, "BiDi Map (Empty): BEGIN: [ {0} ]", getHashText());<NEW_LINE>useLogger.logp(Level.<MASK><NEW_LINE>holderInternMap.log(useLogger);<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodNa... | FINER, CLASS_NAME, methodName, "Holder Intern Map:"); |
168,376 | private String storageOverhead(Map<Integer, Integer> finalNodeToOverhead) {<NEW_LINE>double maxOverhead = Double.MIN_VALUE;<NEW_LINE>PartitionBalance pb = new PartitionBalance(currentCluster, currentStoreDefs);<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("Per-node store-overhead:").append(Utils.... | toLoad = finalNodeToOverhead.get(nodeId); |
727,848 | private void initListeners() {<NEW_LINE>ddListener = new PropertyChangeListener() {<NEW_LINE><NEW_LINE>public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>String propertyName = evt.getPropertyName();<NEW_LINE>Object newValue = evt.getNewValue();<NEW_LINE>Object oldValue = evt.getOldValue();<NEW_LINE>if (Clie... | firePropertyChange(PROPERTY_DOCUMENT_TYPE, oldValue, newValue); |
513,621 | public final WeekPartContext weekPart() throws RecognitionException {<NEW_LINE>WeekPartContext _localctx = new WeekPartContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 488, RULE_weekPart);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(3262);<NEW_LINE>_errHan... | _errHandler.reportError(this, re); |
1,654,470 | public AsyncIterator<String> listScopes() {<NEW_LINE>Exceptions.checkNotClosed(closed.get(), this);<NEW_LINE>long traceId = LoggerHelpers.traceEnter(log, "listScopes");<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>final Function<ContinuationToken, CompletableFuture<Map.Entry<ContinuationToken, Collection<String>>>> function... | long requestId = requestIdGenerator.get(); |
146,921 | public static void RomListAddItem(String FullFileName, String FileName, String GoodName, int TextColor) {<NEW_LINE>GalleryItem item = new GalleryItem(mActiveGalleryActivity, GoodName, FileName, FullFileName, TextColor);<NEW_LINE>mGalleryItems.add(item);<NEW_LINE>if (mActiveGalleryActivity != null && mActiveGalleryActiv... | String ProgressText = new String(FileName); |
1,293,144 | public boolean checkTrigger(GameEvent event, Game game) {<NEW_LINE>Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(this.getSourceId());<NEW_LINE>if (sourcePermanent != null) {<NEW_LINE>Permanent attachedTo = game.getPermanentOrLKIBattlefield(sourcePermanent.getAttachedTo());<NEW_LINE>if (event.getSourceId... | .getTargetId(), game)); |
1,095,222 | public Clustering improveClustering(Clustering clustering) {<NEW_LINE>if (instanceBeingClustered == -1)<NEW_LINE>sampleNextInstanceToCluster(clustering);<NEW_LINE>int clusterIndex = clustering.getLabel(instanceBeingClustered);<NEW_LINE>double bestScore = Double.NEGATIVE_INFINITY;<NEW_LINE>int clusterToMerge = -1;<NEW_L... | "] numClusters=" + clustering.getNumClusters()); |
1,684,431 | protected void mutate(BackendAction item) {<NEW_LINE>BackendEntry e = item.entry();<NEW_LINE>assert e instanceof TextBackendEntry;<NEW_LINE>TextBackendEntry entry = (TextBackendEntry) e;<NEW_LINE>InMemoryDBTable table = this.table(entry.type());<NEW_LINE>switch(item.action()) {<NEW_LINE>case INSERT:<NEW_LINE>LOG.debug(... | table.append(null, entry); |
395,167 | public static void partialReduceIntMult(int[] inputArray, int[] outputArray, int gidx) {<NEW_LINE>int localIdx = OpenCLIntrinsics.get_local_id(0);<NEW_LINE>int <MASK><NEW_LINE>int groupID = OpenCLIntrinsics.get_group_id(0);<NEW_LINE>int[] localArray = (int[]) NewArrayNode.newUninitializedArray(int.class, LOCAL_WORK_GRO... | localGroupSize = OpenCLIntrinsics.get_local_size(0); |
982,986 | public soot.Value eval(Body b) {<NEW_LINE>if (type().isString() && isConstant())<NEW_LINE>return soot.jimple.StringConstant.v(constant().stringValue());<NEW_LINE>if (isStringAdd()) {<NEW_LINE>Local v;<NEW_LINE>if (firstStringAddPart()) {<NEW_LINE>// new StringBuffer<NEW_LINE>v = b.newTemp(b.newNewExpr(lookupType("java.... | getLeftOperand().eval(b); |
1,293,810 | public void updateAndConnect(ConnectionModel model) {<NEW_LINE>Map<String, Connection> connections = Connections.getInstance(this).getConnections();<NEW_LINE>Log.i(TAG, "Updating connection: " + connections.keySet().toString());<NEW_LINE>try {<NEW_LINE>Connection connection = connections.get(model.getClientHandle());<N... | String title = connection.getId(); |
992,850 | private static EncodingType encodingFromElement(Element element) throws Exception {<NEW_LINE>EncodingType result = new EncodingType();<NEW_LINE>if (!ENCODING_ELEMENT.equals(element.getLocalName()) || !NAMESPACE.equals(getNamespaceUri(element))) {<NEW_LINE>throw new Exception("encoding element is invalid");<NEW_LINE>}<N... | qName, attribute.getValue()); |
282,603 | private static // to be assigned<NEW_LINE>boolean assertNoDanglingSnapshots(ClusterState state) {<NEW_LINE>final SnapshotsInProgress snapshotsInProgress = state.custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY);<NEW_LINE>final SnapshotDeletionsInProgress snapshotDeletionsInProgress = state.custom(SnapshotDele... | collect(Collectors.toSet()); |
789,587 | private CloseableIterable<ManifestEntry<DataFile>> deletedDataFiles(TableMetadata base, Long startingSnapshotId, Expression dataFilter, PartitionSet partitionSet) {<NEW_LINE>// if there is no current table state, no files have been deleted<NEW_LINE>if (base.currentSnapshot() == null) {<NEW_LINE>return CloseableIterable... | ().partition())); |
647,111 | public List<Community> findAuthorizedByGroup(Context context, EPerson ePerson, List<Integer> actions) throws SQLException {<NEW_LINE>StringBuilder query = new StringBuilder();<NEW_LINE>query.append("select c from Community c join c.resourcePolicies rp join rp.epersonGroup rpGroup WHERE ");<NEW_LINE>for (int i = 0; i < ... | ("rp.actionId=").append(action); |
1,666,099 | public void writeExternal(Element element) throws WriteExternalException {<NEW_LINE>ConfigurationState state = new ConfigurationState();<NEW_LINE>state.myServerName = myServerName;<NEW_LINE>if (myDeploymentSource != null) {<NEW_LINE>DeploymentSourceType type = myDeploymentSource.getType();<NEW_LINE>Element deploymentTa... | DEPLOYMENT_SOURCE_TYPE_ATTRIBUTE, type.getId()); |
682,119 | private final void decrypt() throws InvalidTokenException {<NEW_LINE>byte[] tokenData;<NEW_LINE>try {<NEW_LINE>tokenData = LTPAKeyUtil.decrypt(encryptedBytes.clone(), sharedKey, cipher);<NEW_LINE>checkTokenBytes(tokenData);<NEW_LINE>String UTF8TokenString = toUTF8String(tokenData);<NEW_LINE>String[] userFields = LTPATo... | getBytes(fields[2])); |
1,383,428 | public void createAndSplitEntrySetMethod(ClassWriter cw, Map<String, BField> fields, String className, JvmCastGen jvmCastGen) {<NEW_LINE>MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "entrySet", RECORD_SET, RECORD_SET_MAP_ENTRY, null);<NEW_LINE>mv.visitCode();<NEW_LINE>int selfIndex = 0;<NEW_LINE>int entrySetVarIndex =... | mv.visitVarInsn(ALOAD, entrySetVarIndex); |
119,786 | private <T> StructuredQuery exampleToQuery(Example<T> example, DatastoreQueryOptions queryOptions, boolean keyQuery) {<NEW_LINE>validateExample(example);<NEW_LINE>T probe = example.getProbe();<NEW_LINE>FullEntity.Builder<IncompleteKey> probeEntityBuilder = Entity.newBuilder();<NEW_LINE>this.datastoreEntityConverter.wri... | getPropertyAccessor(example.getProbe()); |
265,579 | public void write(org.apache.thrift.protocol.TProtocol prot, multi_get_response struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isS... | struct.kvs.size()); |
1,598,658 | public void startOneIndividualStreamRecording(Session session, Participant participant) {<NEW_LINE>Recording recording = this.sessionsRecordings.get(session.getSessionId());<NEW_LINE>if (recording == null) {<NEW_LINE>recording = this.sessionsRecordingsStarting.get(session.getSessionId());<NEW_LINE>if (recording == null... | ), e.getMessage()); |
960,888 | private InternalImageProcessorResult process(Renderable renderer) throws JRException {<NEW_LINE>if (renderer instanceof ResourceRenderer) {<NEW_LINE>renderer = imageRenderersCache.getLoadedRenderer((ResourceRenderer) renderer);<NEW_LINE>}<NEW_LINE>// check dimension first, to avoid caching renderers that might not be u... | getImageTypeValue(imageData).getFileExtension(); |
1,326,448 | private void addMutate(SourceBuilder code) {<NEW_LINE>code.addLine("").addLine("/**").addLine(" * Invokes {@code mutator} with the bimap to be returned from").addLine(" * %s.", datatype.getType().javadocNoArgMethodLink(property.getGetterName())).addLine(" *").addLine(" * <p>This method mutates the bimap in-place. {@cod... | ()).addLine("}"); |
1,441,243 | final ListNodesResult executeListNodes(ListNodesRequest listNodesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listNodesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNodes"); |
1,844,392 | public void marshall(CallAnalyticsJobSummary callAnalyticsJobSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (callAnalyticsJobSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(callAnalyticsJo... | callAnalyticsJobSummary.getCreationTime(), CREATIONTIME_BINDING); |
377,650 | public void marshall(CreateControlMappingSource createControlMappingSource, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createControlMappingSource == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(create... | createControlMappingSource.getSourceSetUpOption(), SOURCESETUPOPTION_BINDING); |
454,747 | public DeleteRegistryResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteRegistryResult deleteRegistryResult = new DeleteRegistryResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | class).unmarshall(context)); |
346,123 | public WormAnimation with(int coordinateStart, int coordinateEnd, int radius, boolean isRightSide) {<NEW_LINE>if (hasChanges(coordinateStart, coordinateEnd, radius, isRightSide)) {<NEW_LINE>animator = createAnimator();<NEW_LINE>this.coordinateStart = coordinateStart;<NEW_LINE>this.coordinateEnd = coordinateEnd;<NEW_LIN... | animator.playSequentially(straightAnimator, reverseAnimator); |
156,665 | public void visit(BLangWaitExpr waitExpr, AnalyzerData data) {<NEW_LINE>data.expType = new BFutureType(TypeTags.FUTURE, data.expType, null);<NEW_LINE>checkExpr(waitExpr.getExpression(), data.expType, data);<NEW_LINE>// Handle union types in lhs<NEW_LINE>if (data.resultType.tag == TypeTags.UNION) {<NEW_LINE>LinkedHashSe... | BLangExpression waitFutureExpression = waitExpr.getExpression(); |
1,043,257 | private static byte[] postPutMultiPartBinary(int connectTimeout, int readTimeout, String address, String method, List<NameValuePair> heads, Collection<FormField> formFields, Collection<FilePart> fileParts) throws Exception {<NEW_LINE>HttpURLConnection connection = null;<NEW_LINE>String boundary = StringTools.TWO_HYPHEN... | IOUtils.write(bytes, output); |
1,851,314 | final ModifyInstancePlacementResult executeModifyInstancePlacement(ModifyInstancePlacementRequest modifyInstancePlacementRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyInstancePlacementRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LIN... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
614,251 | public void renameCodeSnippets() {<NEW_LINE>// BEGIN: com.azure.storage.file.share.ShareDirectoryAsyncClient.rename#String<NEW_LINE>ShareDirectoryAsyncClient renamedClient = client.rename(destinationPath).block();<NEW_LINE>System.out.println("Directory Client has been renamed");<NEW_LINE>// END: com.azure.storage.file.... | System.out.println("Directory Client has been renamed"); |
660,576 | protected String makeLink(Screen frameOwner) {<NEW_LINE>Window window = frameOwner.getWindow();<NEW_LINE>Entity entity = null;<NEW_LINE>if (window.getFrameOwner() instanceof EditorScreen) {<NEW_LINE>entity = ((EditorScreen) frameOwner).getEditedEntity();<NEW_LINE>}<NEW_LINE>GlobalConfig globalConfig = configuration.get... | Object> params = getWindowParams(window); |
404,324 | private Collection<Component> defineProblemComponents() {<NEW_LINE>final List<Component> all = new ArrayList<Component>();<NEW_LINE>final String ID = ProblemAnalyzer.ID;<NEW_LINE>//<NEW_LINE>all.//<NEW_LINE>add(//<NEW_LINE>C(ProblemHandler.class, DefaultProblemHandler.ID, DefaultProblemHandler.class).//<NEW_LINE>config... | .req(ServerConfigManager.class)); |
1,337,356 | public void onActivityCreated(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onActivityCreated(savedInstanceState);<NEW_LINE>if (savedInstanceState == null) {<NEW_LINE>numItems = 0;<NEW_LINE>readGranted = hasPermissions(this.getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE);<NEW_LINE>writeGranted = hasPe... | savedInstanceState.getInt("numItems", 0); |
1,588,543 | public void updateResourceFolderSizeByFileType(Connection conn, int type) {<NEW_LINE>Map<String, Long> resourceSizeMap = listAllResourcesByFileType(conn, type);<NEW_LINE>String sql = "UPDATE t_ds_resources SET size=? where type=? and full_name=? and is_directory = true";<NEW_LINE>PreparedStatement pstmt = null;<NEW_LIN... | 3, entry.getKey()); |
1,765,450 | public void run() {<NEW_LINE>StyledDocument doc = pane.getStyledDocument();<NEW_LINE>// NOI18N<NEW_LINE>Style hlStyle = doc.addStyle("regularBlue-findtype", defStyle);<NEW_LINE>hlStyle.addAttribute(HyperlinkSupport.TYPE_ATTRIBUTE, new TypeLink());<NEW_LINE>StyleConstants.setForeground(hlStyle, UIUtils.getLinkColor());<... | pane.addMouseListener(FindTypesSupport.this); |
857,111 | public static AsciiSet fromPattern(String pattern) {<NEW_LINE>final boolean[] members = new boolean[128];<NEW_LINE>final <MASK><NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>final char c = pattern.charAt(i);<NEW_LINE>if (c >= members.length) {<NEW_LINE>throw new IllegalArgumentException("invalid pattern, '" + c + "' ... | int n = pattern.length(); |
1,466,118 | private void onExecute(BaseActionElement actionElement, RenderedAdaptiveCard renderedAdaptiveCard) {<NEW_LINE>ExecuteAction executeAction = Util.tryCastTo(actionElement, ExecuteAction.class);<NEW_LINE>String verb = executeAction.GetVerb();<NEW_LINE>String data = executeAction.GetDataJson();<NEW_LINE>Map<String, String>... | toString(), Toast.LENGTH_LONG); |
1,831,401 | private void replaceString(String newValue, int start, int end, int segmentNumber) {<NEW_LINE>TextRange range = TextRange.create(start, end);<NEW_LINE>if (!TextRange.from(0, myDocument.getCharsSequence().length()).contains(range)) {<NEW_LINE>LOG.error("Diagnostic for EA-54980. Can't extract " + range + " range. " + pre... | mySegments.setNeighboursGreedy(segmentNumber, false); |
1,636,304 | protected void paintIcon(Graphics2D g2) {<NEW_LINE>g2.setColor(Color.BLUE.darker().darker());<NEW_LINE>final int[] xpos = { 0, scale(6), scale(4), scale(2) };<NEW_LINE>final int[] ypos = { scale(13), scale(13), scale(15), scale(15) };<NEW_LINE>g2.fillPolygon(xpos, ypos, 4);<NEW_LINE>for (var i = 0; i < 4; i++) {<NEW_LI... | g2.setColor(Color.BLUE); |
1,626,511 | public void run() {<NEW_LINE>try {<NEW_LINE>BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>for (int y = 0; y < height; y++) {<NEW_LINE>int i = (x + (width * y)) * bpp;<NEW_LINE>int r = buffer.get(i) & 0xFF;<NEW_LINE>int g = buffer.... | get(i + 2) & 0xFF; |
278,750 | public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) {<NEW_LINE>Xml.Document doc = <MASK><NEW_LINE>Validated versionValidation = Semver.validate(version, versionPattern);<NEW_LINE>if (versionValidation.isValid()) {<NEW_LINE>versionComparator = versionValidation.getValue();<NEW_LINE>}<NEW_LINE>... | super.visitDocument(document, ctx); |
609,499 | private static int nextID(Connection conn, int AD_Sequence_ID, boolean adempiereSys) {<NEW_LINE>if (conn == null || AD_Sequence_ID == 0) {<NEW_LINE>return -3;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>int retValue = -1;<NEW_LINE>String sqlUpdate = "{call nextID(?,?,?)}";<NEW_LINE>CallableStatement cstmt = null;<NEW_LINE>try {<NE... | ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); |
1,301,856 | public void onClick(View view) {<NEW_LINE>String msg = commitMsg.getText().toString();<NEW_LINE>String author = commitAuthor.getText().toString().trim();<NEW_LINE>String authorName = null, authorEmail = null;<NEW_LINE>int ltidx;<NEW_LINE>if (msg.trim().equals("")) {<NEW_LINE>commitMsg.setError(mActivity.getString(R.str... | author.length() - 1); |
949,693 | protected List<DocParameter> buildDocParameters(final String ref, final JsonObject docRoot, final boolean doSubRef) {<NEW_LINE>JsonObject responseObject = docRoot.getAsJsonObject("definitions").getAsJsonObject(ref);<NEW_LINE>String className = responseObject.get("title").getAsString();<NEW_LINE>JsonObject extProperties... | prop = extProperties.getAsJsonObject(fieldName); |
1,221,582 | private void parseInsertNameWithReference(ByteBuffer buffer) throws QpackException, EncodingException {<NEW_LINE>while (true) {<NEW_LINE>switch(_operation) {<NEW_LINE>case NONE:<NEW_LINE>byte firstByte = buffer.get(buffer.position());<NEW_LINE>_referenceDynamicTable <MASK><NEW_LINE>_operation = Operation.INDEX;<NEW_LIN... | = (firstByte & 0x40) == 0; |
1,286,364 | public Builder mergeFrom(io.kubernetes.client.proto.V1.PersistentVolumeSpec other) {<NEW_LINE>if (other == io.kubernetes.client.proto.V1.PersistentVolumeSpec.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>internalGetMutableCapacity().<MASK><NEW_LINE>if (other.hasPersistentVolumeSource()) {<NEW_LINE>mergePersisten... | mergeFrom(other.internalGetCapacity()); |
1,839,404 | public void marshall(CreateTapeWithBarcodeRequest createTapeWithBarcodeRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createTapeWithBarcodeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(... | createTapeWithBarcodeRequest.getKMSEncrypted(), KMSENCRYPTED_BINDING); |
394,959 | private static void addConfiguration(OCWorkspaceImpl.ModifiableModel workspaceModifiable, String id, String displayName, File directory, Map<OCLanguageKind, PerLanguageCompilerOpts> configLanguages, Map<VirtualFile, PerFileCompilerOpts> configSourceFiles) {<NEW_LINE>OCResolveConfigurationImpl.ModifiableModel config = w... | getKey(), compilerOpts.kind); |
1,590,787 | public List<SuppressionRule> parseSuppressionRules(InputStream inputStream, SuppressionRuleFilter filter) throws SuppressionParseException, SAXException {<NEW_LINE>try (InputStream schemaStream13 = FileUtils.getResourceAsStream(SUPPRESSION_SCHEMA_1_3);<NEW_LINE>InputStream schemaStream12 = FileUtils.getResourceAsStream... | schemaStream11 = FileUtils.getResourceAsStream(SUPPRESSION_SCHEMA_1_1); |
723,964 | public static LogFileKey fromKey(Key key) {<NEW_LINE>var logFileKey = new LogFileKey();<NEW_LINE>byte[] rowParts = key.getRow().getBytes();<NEW_LINE><MASK><NEW_LINE>logFileKey.seq = getSequence(rowParts);<NEW_LINE>logFileKey.event = LogEvents.valueOf(key.getColumnFamilyData().toString());<NEW_LINE>// verify event numbe... | logFileKey.tabletId = getTabletId(rowParts); |
115,020 | protected void paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY) {<NEW_LINE>boolean hasEmbeddedMenuBar = hasVisibleEmbeddedMenuBar(rootPane.getJMenuBar());<NEW_LINE>int labelWidth = l.getWidth();<NEW_LINE>int textWidth <MASK><NEW_LINE>int gap = UIScale.scale(menuBarTitleGap);<NEW_LINE>// The passed... | = labelWidth - (textX * 2); |
69,671 | private void fillHorizontalEdge(Picture pic, int comp, int mbAddr, int[][] bs) {<NEW_LINE>SliceHeader sh = di.shs[mbAddr];<NEW_LINE>int mbWidth = sh.sps.picWidthInMbsMinus1 + 1;<NEW_LINE><MASK><NEW_LINE>int beta = sh.sliceBetaOffsetDiv2 << 1;<NEW_LINE>int mbX = mbAddr % mbWidth;<NEW_LINE>int mbY = mbAddr / mbWidth;<NEW... | int alpha = sh.sliceAlphaC0OffsetDiv2 << 1; |
132,093 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); |
1,472,954 | public static List<Object> recursivelyDeconstructReadableArray(ReadableArray readableArray) {<NEW_LINE>List<Object> deconstructedList = new ArrayList<>(readableArray.size());<NEW_LINE>for (int i = 0; i < readableArray.size(); i++) {<NEW_LINE>ReadableType indexType = readableArray.getType(i);<NEW_LINE>switch(indexType) ... | deconstructedList.add(i, null); |
1,294,337 | public static byte[] serialize(Descriptors.Descriptor descriptor) {<NEW_LINE>byte[] schemaDataBytes;<NEW_LINE>try {<NEW_LINE>Map<String, FileDescriptorProto> fileDescriptorProtoCache = new HashMap<>();<NEW_LINE>// recursively cache all FileDescriptorProto<NEW_LINE>serializeFileDescriptor(descriptor.getFile(), fileDescr... | ObjectMapper().writeValueAsBytes(schemaData); |
759,867 | private void changeOnOffline(String subject, String consumerGroup, boolean isOnline, StatusSource src) {<NEW_LINE>synchronized (getConsumerLockKey(subject, consumerGroup, "onOffline")) {<NEW_LINE>final String realSubject = RetrySubjectUtils.getRealSubject(subject);<NEW_LINE>final String retrySubject = RetrySubjectUtils... | pullEntry = pullEntryMap.get(key); |
1,377,922 | public OperationSummary unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>OperationSummary operationSummary = new OperationSummary();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = c... | int originalDepth = context.getCurrentDepth(); |
354,701 | public void takePicture(final Map<String, Object> options, final int viewTag, final Promise promise) {<NEW_LINE>final File cacheDirectory = getContext().getCacheDir();<NEW_LINE>addUIBlock(viewTag, new UIManager.UIBlock<ExpoCameraView>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void resolve(ExpoCameraView view) {<... | promise.reject(ERROR_TAG, throwable); |
837,699 | static void clearCaches(@Nonnull PsiFile injected, @Nonnull DocumentWindowImpl documentWindow) {<NEW_LINE>VirtualFileWindowImpl virtualFile = (VirtualFileWindowImpl) injected.getVirtualFile();<NEW_LINE>PsiManagerEx psiManagerEx = <MASK><NEW_LINE>if (psiManagerEx.getProject().isDisposed())<NEW_LINE>return;<NEW_LINE>Debu... | (PsiManagerEx) injected.getManager(); |
1,555,665 | private void performDocking() {<NEW_LINE>if (isAlive()) {<NEW_LINE>switch(anchorControlPosition.getPosition()) {<NEW_LINE>case DockPosition.TOP_LEFT:<NEW_LINE>dockedShell.setLocation(mainShell.toDisplay(anchorControl.getLocation()));<NEW_LINE>break;<NEW_LINE>case DockPosition.TOP_RIGHT:<NEW_LINE>break;<NEW_LINE>case Do... | toDisplay(anchorControl.getLocation()); |
1,790,659 | public void deleteFiles(Iterable<String> paths) throws BulkDeletionFailureException {<NEW_LINE>if (awsProperties.s3DeleteTags() != null && !awsProperties.s3DeleteTags().isEmpty()) {<NEW_LINE>Tasks.foreach(paths).noRetry().executeWith(executorService()).suppressFailureWhenFinished().onFailure((path, exc) -> LOG.warn("Fa... | failedDeletionsForBatch = deleteObjectsInBucket(bucket, objectsInBucket); |
1,149,216 | public com.amazonaws.services.gluedatabrew.model.InternalServerException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.gluedatabrew.model.InternalServerException internalServerException = new com.amazonaws.services.gluedatabrew.model.InternalServerException(nu... | JsonToken token = context.getCurrentToken(); |
861,772 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see javax.swing.event.ChangeListener#stateChanged(javax.swing.event. ChangeEvent)<NEW_LINE>*/<NEW_LINE>public void stateChanged(ChangeEvent e) {<NEW_LINE>if (e.getSource() == ftp) {<NEW_LINE>// This event is sent when the FTPClient has no more data in the 'todo' queue<... | bar.setMaximum(fto.maximumPosition); |
1,235,222 | public WeightedPaths singleSourceShortestPaths(Id sourceV, Directions dir, String label, String weight, long degree, long skipDegree, long capacity, long limit) {<NEW_LINE>E.checkNotNull(sourceV, "source vertex id");<NEW_LINE>this.checkVertexExist(sourceV, "source vertex");<NEW_LINE>E.checkNotNull(dir, "direction");<NE... | degree, skipDegree, capacity, limit); |
1,162,571 | public static DescribeVulMachineListResponse unmarshall(DescribeVulMachineListResponse describeVulMachineListResponse, UnmarshallerContext context) {<NEW_LINE>describeVulMachineListResponse.setRequestId(context.stringValue("DescribeVulMachineListResponse.RequestId"));<NEW_LINE>describeVulMachineListResponse.setTotalCou... | ("DescribeVulMachineListResponse.MachineStatistics[" + i + "].CveNum")); |
85,441 | ArmeriaServerConfigurator serverConfigurator(Optional<ZipkinQueryApiV2> httpQuery, Optional<ZipkinHttpCollector> httpCollector, Optional<ZipkinHealthController> healthController, Optional<ZipkinMetricsController> metricsController, Optional<MeterRegistry> meterRegistry, Optional<CollectorRegistry> collectorRegistry, @V... | metricsController.ifPresent(sb::annotatedService); |
1,488,331 | public Request<DescribeLifecycleHooksRequest> marshall(DescribeLifecycleHooksRequest describeLifecycleHooksRequest) {<NEW_LINE>if (describeLifecycleHooksRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeLifecycleHooksRequest> reques... | (describeLifecycleHooksRequest.getAutoScalingGroupName())); |
1,228,845 | final UpdatePullRequestApprovalStateResult executeUpdatePullRequestApprovalState(UpdatePullRequestApprovalStateRequest updatePullRequestApprovalStateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePullRequestApprovalStateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
487,671 | private ResponseData<Boolean> processSetPubKey(String type, String weAddress, String owner, String pubKey, String privateKey, boolean isDelegate) {<NEW_LINE>try {<NEW_LINE>String attributeKey = new StringBuffer().append(WeIdConstant.WEID_DOC_PUBLICKEY_PREFIX).append("/").append(type).append("/").append("base64").toStri... | logger.error("[addPublicKey] set PublicKey failed with exception. ", e); |
360,354 | public static LeafSlice[] slices(List<LeafReaderContext> leaves, int maxDocsPerSlice, int maxSegmentsPerSlice) {<NEW_LINE>// Make a copy so we can sort:<NEW_LINE>List<LeafReaderContext> sortedLeaves <MASK><NEW_LINE>// Sort by maxDoc, descending:<NEW_LINE>Collections.sort(sortedLeaves, Collections.reverseOrder(Comparato... | = new ArrayList<>(leaves); |
701,762 | private JPanel createLegendPane() {<NEW_LINE>JPanel legendPanel = new JPanel();<NEW_LINE>legendPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));<NEW_LINE>legendPanel.setBorder(// $NON-NLS-1$<NEW_LINE>BorderFactory.// $NON-NLS-1$<NEW_LINE>createTitledBorder(JMeterUtils.getResString("aggregate_graph_legend")));<NEW... | getResString("aggregate_graph_style"), fontStyleList)); |
591,146 | public static RepositoryConnection parse(String str) {<NEW_LINE>String[] fields = str.split(RC_DELIMITER);<NEW_LINE>int l = fields.length;<NEW_LINE>String url = fields[0];<NEW_LINE>String username = l > 1 && !fields[1].equals(""<MASK><NEW_LINE>String password = l > 2 && !fields[2].equals("") ? Scrambler.getInstance().d... | ) ? fields[1] : null; |
730,424 | public void run() {<NEW_LINE>ILogger logger = raftNode.getLogger(getClass());<NEW_LINE>RaftState state = raftNode.state();<NEW_LINE>LeaderState leaderState = state.leaderState();<NEW_LINE>if (leaderState == null) {<NEW_LINE>logger.fine("Not retrying leadership transfer since not leader...");<NEW_LINE>return;<NEW_LINE>}... | checkTrue(leadershipTransferState != null, "No leadership transfer state!"); |
993,072 | private ContentValues generateContentValuesForSinglePartTransfer(TransferType type, String bucket, String key, File file, ObjectMetadata metadata, CannedAccessControlList cannedAcl, TransferUtilityOptions tuOptions) {<NEW_LINE>final ContentValues values = new ContentValues();<NEW_LINE>values.put(TransferTable.<MASK><NE... | COLUMN_TYPE, type.toString()); |
1,466,254 | void checkThreadPoolLeak(ExecutorService e, Exception stackTraceEx) {<NEW_LINE>if (this.detectionLevel == ThreadLeakDetectionLevel.None) {<NEW_LINE>// Not doing anything in this case.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!e.isShutdown()) {<NEW_LINE>log.warn("THREAD POOL LEAK: {} (ShutDown={}, Terminated={}) finaliz... | stackTraceEx.printStackTrace(System.err); |
1,586,722 | protected <T extends JpaObject> String idleApplicationAlias(Business business, String name, String excludeId) throws Exception {<NEW_LINE>if (StringUtils.isEmpty(name)) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>List<String> list = new ArrayList<>();<NEW_LINE>list.add(name);<NEW_LINE>for (int i = 1; i < 99; i++) {<NEW_L... | CriteriaBuilder cb = em.getCriteriaBuilder(); |
1,679,241 | public boolean parseResource(HttpMessage message, Source source, int depth) {<NEW_LINE>String baseURL = message.getRequestHeader().getURI().toString();<NEW_LINE>// Content-location header<NEW_LINE>String location = message.getResponseHeader().getHeader(HttpHeader.CONTENT_LOCATION);<NEW_LINE>if (location != null && !loc... | ).getHeader(HttpHeader.LINK); |
1,355,082 | boolean compare(Object op1, Object op2) {<NEW_LINE>if (op1 == null || op2 == null) {<NEW_LINE>throw new TemplateException("Unable to compare null operands [op1=" + op1 + ", op2=" + op2 + "]");<NEW_LINE>}<NEW_LINE>Comparable c1;<NEW_LINE>Comparable c2;<NEW_LINE>if (op1 instanceof Comparable && op1.getClass().equals(op2.... | c1 = Operator.getDecimal(op1); |
1,814,225 | public void processMessage(final WebSocketMessage webSocketData) {<NEW_LINE>setDoTransactionNotifications(true);<NEW_LINE>final Class<Relation> relType = StructrApp.getConfiguration().getRelationshipEntityClass("DOMNodeSYNCDOMNode");<NEW_LINE>final SecurityContext securityContext <MASK><NEW_LINE>final String sourceId =... | = getWebSocket().getSecurityContext(); |
671,780 | private static Queue<?> traceQueue(ConfigurableApplicationContext springContext, Queue<?> queue) {<NEW_LINE>if (!springContext.isActive()) {<NEW_LINE>return queue;<NEW_LINE>}<NEW_LINE>CurrentTraceContext currentTraceContext = springContext.getBean(CurrentTraceContext.class);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_... | Object object = envelopeQueue.poll(); |
1,074,733 | private void populateAttributes(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {<NEW_LINE>primaryColor = MiscUtils.getColor(getContext(), R.attr.colorPrimary);<NEW_LINE>screenWidth = MiscUtils.getScreenWidth(getContext());<NEW_LINE>tenDp = MiscUtils.dpToPixel(getContext(), 10);<NEW_LINE>maxFixe... | R.styleable.BottomBar_bb_showShadow, true); |
1,574,422 | public boolean init(String uri, final SnapshotThrottle snapshotThrottle, final SnapshotCopierOptions opts) {<NEW_LINE>this.rpcService = opts.getRaftClientService();<NEW_LINE>this.timerManager = opts.getTimerManager();<NEW_LINE>this.raftOptions = opts.getRaftOptions();<NEW_LINE>this.snapshotThrottle = snapshotThrottle;<... | uri = uri.substring(prefixSize); |
376,039 | private void writePage(Page page) {<NEW_LINE>int[] writerIndexes = getWriterIndexes(page);<NEW_LINE>// position count for each writer<NEW_LINE>int[] sizes = new int[writers.size()];<NEW_LINE>for (int index : writerIndexes) {<NEW_LINE>sizes[index]++;<NEW_LINE>}<NEW_LINE>// record which positions are used by which writer... | long currentMemory = writer.getSystemMemoryUsage(); |
1,221,138 | private ExecutionTimeResult potentialNextClosestMatch(final ZonedDateTime date) throws NoSuchValueException {<NEW_LINE>final List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear()).stream().filter(d -> d >= date.getYear()).collect(Collectors.toList());<NEW_LINE>final int lowestMonth ... | optionalDays = generateDays(cronDefinition, date); |
1,443,478 | private void addRouteWalk(TransportRouteResultSegment s1, TransportRouteResultSegment s2, LatLon start, LatLon end, List<Way> res, List<GeometryWayStyle<?>> styles) {<NEW_LINE>final RouteCalculationResult walkingRouteSegment = transportHelper.getWalkingRouteSegment(s1, s2);<NEW_LINE>if (walkingRouteSegment != null && w... | .US, "Walk %.1f m", dist)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.