idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
206,466 | public V removeAt(int index) {<NEW_LINE>final Object old = mArray[(index << 1) + 1];<NEW_LINE>if (mSize <= 1) {<NEW_LINE>// Now empty.<NEW_LINE>if (DEBUG)<NEW_LINE>Log.d(TAG, "remove: shrink from " + mHashes.length + " to 0");<NEW_LINE>freeArrays(mHashes, mArray, mSize);<NEW_LINE>mHashes = ContainerHelpers.EMPTY_INTS;<... | mArray[mSize << 1] = null; |
1,655,165 | private boolean cmd_save() {<NEW_LINE>KeyNamePair pp = (KeyNamePair) roleField.getSelectedItem();<NEW_LINE>roleField.setBackground(pp == null);<NEW_LINE>if (pp == null)<NEW_LINE>return false;<NEW_LINE>int AD_Role_ID = pp.getKey();<NEW_LINE>//<NEW_LINE>boolean isActive = cbActive.isSelected();<NEW_LINE><MASK><NEW_LINE>b... | boolean isExclude = cbExclude.isSelected(); |
83,523 | public final boolean eval(ITool tool, TLCState s1, TLCState s2) {<NEW_LINE>if (this.subscript != null) {<NEW_LINE>IValue v1 = tool.eval(this.subscript, con, s1, TLCState.Empty, EvalControl.Clear);<NEW_LINE>IValue v2 = tool.eval(this.subscript, con, s2, null, EvalControl.Clear);<NEW_LINE>boolean <MASK><NEW_LINE>if (this... | isStut = v1.equals(v2); |
1,463,670 | String heapHistogram(@BindAgentId String agentId) throws Exception {<NEW_LINE>checkNotNull(liveJvmService);<NEW_LINE>HeapHistogram heapHistogram;<NEW_LINE>try {<NEW_LINE>heapHistogram = liveJvmService.heapHistogram(agentId);<NEW_LINE>} catch (AgentNotConnectedException e) {<NEW_LINE>logger.debug(e.getMessage(), e);<NEW... | e.getMessage(), e); |
1,421,045 | protected CompletableFuture<Void> onClose() {<NEW_LINE>if (!this.getIsClosed()) {<NEW_LINE>try {<NEW_LINE>this.underlyingFactory.unregisterForWatchdog(this);<NEW_LINE>this.activeClientTokenManager.cancel();<NEW_LINE>scheduleLinkCloseTimeout(TimeoutTracker.create(operationTimeout, this.receiveLink.getName()));<NEW_LINE>... | this.linkClose.completeExceptionally(schedulerException); |
732,267 | private void maybeUpdateExportDeclaration(NodeTraversal t, Node n) {<NEW_LINE>if (!currentScript.isModule || !n.getString().equals("exports") || !isAssignTarget(n)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>Node rhs = assignNode.getLastChild();<NEW_LINE>if (rhs != currentScript.defaultExport.rhs) {<NEW_LIN... | Node assignNode = n.getParent(); |
1,401,259 | public boolean onCallApi(int page, @Nullable Issue parameter) {<NEW_LINE>if (parameter == null) {<NEW_LINE>sendToView(BaseMvp.FAView::hideProgress);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (page == 1) {<NEW_LINE>lastPage = Integer.MAX_VALUE;<NEW_LINE>sendToView(view -> view.getLoadMore().reset());<NEW_LINE>}<NEW_... | commentId, login, repoId, timeline); |
1,688,360 | private int lookup(int row, char c) {<NEW_LINE>// If the char is small we can lookup in the index table<NEW_LINE>if (c < 0x80) {<NEW_LINE>int column = _lookup[c];<NEW_LINE>if (column != Integer.MIN_VALUE) {<NEW_LINE>// The char is indexed, so should be in normal row or bigRow<NEW_LINE>if (column >= 0) {<NEW_LINE>// loo... | null : _node[row]._bigRow; |
1,597,664 | public Object encrypt(Object data, String algorithmKey, String algorithm) {<NEW_LINE>if (!jwtDetails.getAlgorithm().equalsIgnoreCase("none")) {<NEW_LINE>try {<NEW_LINE>DefaultJwtEncryptionAndDecryptionService jwtEncryptionService = new DefaultJwtEncryptionAndDecryptionService(jwtDetails.getAlgorithmKey(), jwtDetails.ge... | ).build(), payload); |
1,852,967 | private AudioInputStream synthesizeUsingF0Modification(int backchannelNumber, double[] pScalesArray, double[] tScalesArray, AudioFileFormat aft) throws SynthesisException {<NEW_LINE>if (backchannelNumber > unitFileReader.getNumberOfUnits()) {<NEW_LINE>throw new IllegalArgumentException("requesting unit should not be mo... | arrayResize(pScalesArray, frames.length); |
113,126 | private NetbeansActionMapping findMapAction(Map<String, String> replaceMap, Project project, String actionName) throws XmlPullParserException, IOException {<NEW_LINE>// TODO need some caching really badly here..<NEW_LINE>Reader read = performDynamicSubstitutions(replaceMap, getRawMappingsAsString());<NEW_LINE>ActionToG... | String prjPack = mp.getPackagingType(); |
554,290 | final DisableVgwRoutePropagationResult executeDisableVgwRoutePropagation(DisableVgwRoutePropagationRequest disableVgwRoutePropagationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disableVgwRoutePropagationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
713,341 | boolean execute(CommandSender sender, String label, String[] args, CommandMessages commandMessages) {<NEW_LINE>if (args.length == 1) {<NEW_LINE>sendHelp(sender, label, commandMessages.getResourceBundle());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>for (int i = 1; i... | - 1 ? "" : " ")); |
1,003,850 | public static OemListMenuResponse unmarshall(OemListMenuResponse oemListMenuResponse, UnmarshallerContext _ctx) {<NEW_LINE>oemListMenuResponse.setRequestId(_ctx.stringValue("OemListMenuResponse.RequestId"));<NEW_LINE>oemListMenuResponse.setErrorDesc(_ctx.stringValue("OemListMenuResponse.ErrorDesc"));<NEW_LINE>oemListMe... | ("OemListMenuResponse.Data[" + i + "].PurchasePackage")); |
1,141,660 | private void verifyAndCachePurchase(Purchase purchase) {<NEW_LINE>String purchaseData = purchase.getOriginalJson();<NEW_LINE>String dataSignature = purchase.getSignature();<NEW_LINE>try {<NEW_LINE>JSONObject purchaseJsonObject = new JSONObject(purchaseData);<NEW_LINE>String productId = purchaseJsonObject.getString(Cons... | purchaseData, dataSignature, getPurchasePayload()); |
700,026 | void printOptions(Consumer<String> println, boolean extra) {<NEW_LINE>SortedMap<String, List<OptionInfo>> optionInfo = new TreeMap<>();<NEW_LINE>apiOptions.forEach((optionName, option) -> {<NEW_LINE>if (option.isDeprecated() || option.extra != extra) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String groupOrOptionName = opt... | printGroupOption(println, optionName, options); |
567,465 | public JsonAdapter<?> create(Type type, Set<? extends Annotation> annotations, Moshi moshi) {<NEW_LINE>if (Types.getRawType(type) != baseType || !annotations.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int size = labelToType.size();<NEW_LINE>Map<String, JsonAdapter<Object>> labelToAdapter = new LinkedHashMap... | , moshi.adapter(typeValue)); |
219,917 | public Call<Map<String, Long>> map(List<String> serviceNames) {<NEW_LINE>List<Call<Map<String, Long>>> bucketedTraceIdCalls = new ArrayList<>();<NEW_LINE>for (String service : serviceNames) {<NEW_LINE>// fan out every input for each service name<NEW_LINE>List<SelectTraceIdsFromServiceSpan.Input> <MASK><NEW_LINE>for (Se... | scopedInputs = new ArrayList<>(); |
1,002,208 | private boolean matchesExclusions(final String fieldVarName) {<NEW_LINE>final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();<NEW_LINE>final URL url = classLoader.getResource("es-content-mapping.json");<NEW_LINE>final String defaultSettings;<NEW_LINE>try {<NEW_LINE>defaultSettings = new String... | url.getPath()))); |
798,556 | private void doLogCatchUpInBatch() throws TException, InterruptedException {<NEW_LINE>List<ByteBuffer> logList = new ArrayList<>();<NEW_LINE>long totalLogSize = 0;<NEW_LINE>int firstLogPos = 0;<NEW_LINE>boolean batchFull;<NEW_LINE>for (int i = 0; i < logs.size() && !abort; i++) {<NEW_LINE>ByteBuffer logData = logs.get(... | = logData.array().length; |
776,953 | protected Set<Element> evaluateElementTypeExpression(String expr, DslContext context) {<NEW_LINE>Set<Element> elements = new LinkedHashSet<>();<NEW_LINE>String type = expr.substring(ELEMENT_TYPE_EQUALS_EXPRESSION.length());<NEW_LINE>switch(type.toLowerCase()) {<NEW_LINE>case "custom":<NEW_LINE>context.getWorkspace().ge... | RuntimeException("The element type of \"" + type + "\" is not valid for this view"); |
682,375 | public void fill(Menu menu, int index) {<NEW_LINE>MenuItem deployMenuItem = new MenuItem(menu, SWT.PUSH);<NEW_LINE>String menuName = null;<NEW_LINE>IContainer selectedContainer = getSelectedContainer();<NEW_LINE>if (selectedContainer != null) {<NEW_LINE>IDeployProvider provider = DeployProviderUtil.getDeployProvider(se... | DeployUIPlugin.getDefault(), "Failed to execute the command to deploy the application."); |
1,154,289 | private static void measureSampledMethodEntryExitCalls() {<NEW_LINE>// NOI18N<NEW_LINE>printResults("\n" + SAMPLED_TIME_MSG);<NEW_LINE>// ProfilerRuntime.resetProfilerCollectors(INSTR_RECURSIVE_SAMPLED); THIS IS NOT NEEDED - will delete our current ThreadInfo<NEW_LINE>// Large number to make the server compiler inline... | .methodExit((char) 2); |
1,576,934 | public void resourceResourceIdDelete(String resourceId, String cookie, String ifMatch) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'resourceId' is set<NEW_LINE>if (resourceId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'res... | (resourceId.toString())); |
1,783,431 | public VAdminProto.RebalanceStateChangeResponse handleRebalanceStateChange(VAdminProto.RebalanceStateChangeRequest request) {<NEW_LINE>VAdminProto.RebalanceStateChangeResponse.Builder response = VAdminProto.RebalanceStateChangeResponse.newBuilder();<NEW_LINE>synchronized (rebalancer) {<NEW_LINE>try {<NEW_LINE>// Retrie... | (request.getStoresString())); |
1,293,098 | private List<Funcotation> determineFuncotations(final VariantContext variant, final ReferenceContext referenceContext, final List<Feature> featureList, final List<GencodeFuncotation> gencodeFuncotations) {<NEW_LINE>// Create our funcotations:<NEW_LINE>final List<Funcotation> outputFuncotations;<NEW_LINE>if (FuncotatorU... | createFuncotationsOnVariant(variant, referenceContext, featureList); |
790,111 | public static LibDivideS32 libdivide_s32_gen(@NativeType("int32_t") int denom, @NativeType("struct libdivide_s32_t") LibDivideS32 __result) {<NEW_LINE>if (denom == 0) {<NEW_LINE>throw new IllegalArgumentException("divider must be != 0");<NEW_LINE>}<NEW_LINE>int magic, more;<NEW_LINE>int absD = denom < 0 ? -denom : deno... | (int) (l / absD); |
1,754,825 | private void populateContextDependencies(JSONArray contextsArray) throws JSONException {<NEW_LINE>// populate LiveBeanContext dependencies<NEW_LINE>for (int i = 0; i < contextsArray.length(); i++) {<NEW_LINE>JSONObject contextJson = contextsArray.optJSONObject(i);<NEW_LINE>if (contextJson != null) {<NEW_LINE>LiveBeansC... | .get(getContextId(contextJson)); |
809,936 | public void serialize(final RntbdClientChannelPool value, final JsonGenerator generator, final SerializerProvider provider) throws IOException {<NEW_LINE>final RntbdClientChannelHealthChecker healthChecker = (RntbdClientChannelHealthChecker) value.healthChecker;<NEW_LINE>generator.writeStartObject();<NEW_LINE>generator... | "writeDelayLimit", healthChecker.writeDelayLimitInNanos()); |
1,470,712 | public static void main(String[] args) throws Exception {<NEW_LINE>String inputfilepath = <MASK><NEW_LINE>WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new java.io.File(inputfilepath));<NEW_LINE>StyleDefinitionsPart stylesPart = wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart();<NEW_L... | System.getProperty("user.dir") + "/one.docx"; |
255,368 | public DataOutputX writeDecimal(long v) throws IOException {<NEW_LINE>if (v == 0) {<NEW_LINE>writeByte(0);<NEW_LINE>} else if (Byte.MIN_VALUE <= v && v <= Byte.MAX_VALUE) {<NEW_LINE>byte[] b = new byte[2];<NEW_LINE>b[0] = 1;<NEW_LINE>b[1] = (byte) v;<NEW_LINE>write(b);<NEW_LINE>} else if (Short.MIN_VALUE <= v && v <= S... | ] b = new byte[5]; |
941,502 | private static String buildMsg(final int warehouseId, final boolean maxVolumeExceeded, final boolean maxWeightExceeded) {<NEW_LINE>final StringBuffer sb = new StringBuffer();<NEW_LINE>sb.append(Msg.translate(Env.getCtx(), MSG_NO_SUFFICIENT_CONTAINERS));<NEW_LINE>if (warehouseId > 0) {<NEW_LINE>sb.append("\n@M_Warehouse... | appendExceed(sb, I_M_PackagingContainer.COLUMNNAME_MaxVolume); |
1,787,132 | public Void execute(CommandContext commandContext) {<NEW_LINE>JobEntity jobToDelete = null;<NEW_LINE>for (String jobId : jobIds) {<NEW_LINE>jobToDelete = jobServiceConfiguration.<MASK><NEW_LINE>FlowableEventDispatcher eventDispatcher = jobServiceConfiguration.getEventDispatcher();<NEW_LINE>if (jobToDelete != null) {<NE... | getJobEntityManager().findById(jobId); |
1,454,181 | public static String hashpw(byte[] passwordb, String salt) {<NEW_LINE>BCrypt B;<NEW_LINE>String real_salt;<NEW_LINE>byte[] saltb, hashed;<NEW_LINE>char minor = (char) 0;<NEW_LINE>int rounds, off;<NEW_LINE>StringBuilder rs = new StringBuilder();<NEW_LINE>if (salt == null) {<NEW_LINE>throw new IllegalArgumentException("s... | minor == 'a' ? 0x10000 : 0); |
260,101 | private void applyState(InetAddress endpoint, ApplicationState state, VersionedValue value, EndpointState epState) {<NEW_LINE>final ExecutorService executor = StageManager.getStage(Stage.MUTATION);<NEW_LINE>switch(state) {<NEW_LINE>case RELEASE_VERSION:<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "release_... | (value.value), executor); |
1,006,442 | public Bundle toBundle() {<NEW_LINE>Bundle bundle = new Bundle();<NEW_LINE>bundle.putString(keyForField(FIELD_ID), id);<NEW_LINE>bundle.putString(keyForField(FIELD_LABEL), label);<NEW_LINE>bundle.putString(keyForField(FIELD_LANGUAGE), language);<NEW_LINE>bundle.putInt(keyForField(FIELD_SELECTION_FLAGS), selectionFlags)... | (keyForField(FIELD_CODECS), codecs); |
371,371 | public static void main(String[] args) {<NEW_LINE>Scanner scanner = new Scanner(System.in);<NEW_LINE>int wins = 0;<NEW_LINE>int losses = 0;<NEW_LINE>System.out.println("Welcome to Rock-Paper-Scissors! Please enter \"rock\", \"paper\", \"scissors\", or \"quit\" to exit.");<NEW_LINE>while (true) {<NEW_LINE>System.out.pri... | System.out.println("You won!"); |
1,145,981 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards top7 = new CardsImpl(player.getLibrary().getTopCards(game, 7));<NEW_LINE>Cards toGrave = top7.copy();<NEW_LINE>player.revea... | Zone.GRAVEYARD, source, game); |
1,425,077 | public static void beforeClass() throws Exception {<NEW_LINE>server.installSystemFeature(FEATURE_NAME);<NEW_LINE><MASK><NEW_LINE>Assert.assertTrue(server.fileExistsInLibertyInstallRoot("lib/com.ibm.ws.persistence.consumer.jar"));<NEW_LINE>Path someArchive = Paths.get(server.getInstallRoot() + File.separatorChar + "lib"... | server.copyFileToLibertyInstallRoot("lib/", "bundles/com.ibm.ws.persistence.consumer.jar"); |
1,711,689 | public void visitNode(AstNode node) {<NEW_LINE>errors++;<NEW_LINE>if (!LOG.isDebugEnabled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<AstNode> children = node.getChildren();<NEW_LINE>var sb = new StringBuilder(512);<NEW_LINE>int identifierLine = -1;<NEW_LINE>for (var child : children) {<NEW_LINE>sb.append(child.getT... | identifierLine, sb.toString()); |
88,610 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View v = inflater.inflate(R.layout.fragment_rv_media, container, false);<NEW_LINE>ButterKnife.bind(this, v);<NEW_LINE>int spanCount = columnsCount();<NEW_LINE>spacingDecoration = new... | new OvershootInterpolator(1f)))); |
636,480 | static boolean isOverlapPreventedInOtherDimension(LayoutInterval addingInterval, LayoutInterval existingInterval, int dimension) {<NEW_LINE>int otherDim = dimension ^ 1;<NEW_LINE>Iterator<LayoutInterval> addIt = getComponentIterator(addingInterval);<NEW_LINE>do {<NEW_LINE>LayoutInterval otherDimAdd = addIt.next().getCo... | while (addIt.hasNext()); |
263,835 | // / Extract unsatisfiable core example<NEW_LINE>public void unsatCoreAndProofExample(Context ctx) {<NEW_LINE>System.out.println("UnsatCoreAndProofExample");<NEW_LINE>Log.append("UnsatCoreAndProofExample");<NEW_LINE>Solver solver = ctx.mkSolver();<NEW_LINE>BoolExpr pa = ctx.mkBoolConst("PredA");<NEW_LINE>BoolExpr pb = ... | .mkOr(f1, p1)); |
1,656,041 | final DescribeBudgetActionsForBudgetResult executeDescribeBudgetActionsForBudget(DescribeBudgetActionsForBudgetRequest describeBudgetActionsForBudgetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeBudgetActionsForBudgetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
390,119 | public static AlertProxy createAlert(EventProxy event, int minutes) {<NEW_LINE>if (!CalendarProxy.hasCalendarPermissions()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ContentResolver contentResolver = TiApplication.getInstance().getContentResolver();<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>Calend... | (getAlertsUri()), values); |
975,575 | public static RecommendEvalTask fromJSON(JsonNode json, URI base) throws IOException {<NEW_LINE>RecommendEvalTask task = new RecommendEvalTask();<NEW_LINE>String outFile = json.path("output_file").asText(null);<NEW_LINE>if (outFile != null) {<NEW_LINE>task.setOutputFile(Paths.get(base.resolve(outFile)));<NEW_LINE>}<NEW... | createMetric(TopNMetric.class, mn); |
1,672,944 | public ApiResponse<String> eventsGet_1WithHttpInfo(String downloadid) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'downloadid' is set<NEW_LINE>if (downloadid == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'downloadid' when cal... | HashMap<String, Object>(); |
844,932 | private void runExperiment() throws Exception {<NEW_LINE>// load building<NEW_LINE>CleanBuilding building = new <MASK><NEW_LINE>// load fps from file<NEW_LINE>building.parseFpFile();<NEW_LINE>DatasetCreator dataset = new DatasetCreator(this.dataset, this.buid, 1456737260395L);<NEW_LINE>CreateLookAhead lookahead = new C... | CleanBuilding(this.buid, false); |
61,826 | private Mono<Response<Flux<ByteBuffer>>> importDataWithResponseAsync(String resourceGroupName, String name, ImportRdbParameters parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and ca... | ), parameters, accept, context); |
856,521 | /*<NEW_LINE>* Walk starting from an AST boolean expression<NEW_LINE>*/<NEW_LINE>public void visit(Configuration conf, BooleanExpr e, Consumer<Statement> fs, Consumer<BooleanExpr> fe) {<NEW_LINE>fe.accept(e);<NEW_LINE>if (e instanceof Conjunction) {<NEW_LINE>Conjunction c = (Conjunction) e;<NEW_LINE>for (BooleanExpr be ... | conf, be, fs, fe); |
673,236 | // Must init at first<NEW_LINE>public static void allClasses() throws HackAssertionException {<NEW_LINE>if (android.os.Build.VERSION.SDK_INT <= 8) {<NEW_LINE>LoadedApk = Hack.into("android.app.ActivityThread$PackageInfo");<NEW_LINE>} else {<NEW_LINE>LoadedApk = Hack.into("android.app.LoadedApk");<NEW_LINE>}<NEW_LINE>Ac... | PackageParser$Activity = Hack.into("android.content.pm.PackageParser$Activity"); |
107,131 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("attach" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>String tableName = param.getLeafExpression().getIdentifierName();<NEW_L... | + mm.getMessage("function.invalidParam")); |
1,606,069 | protected void drawLeftPen(Graphics2D grx, JRPen topPen, JRPen leftPen, JRPen bottomPen, JRPrintElement element, int offsetX, int offsetY) {<NEW_LINE>Stroke leftStroke = JRPenUtil.getStroke(leftPen, BasicStroke.CAP_BUTT);<NEW_LINE>int height = element.getHeight();<NEW_LINE>float topOffset = topPen.getLineWidth() / 2;<N... | 0, 0, 0, height); |
838,359 | public Single<String> lookupUrl(String url) {<NEW_LINE>Pattern pattern = Pattern.compile(PATTERN_BY_ID);<NEW_LINE>Matcher matcher = pattern.matcher(url);<NEW_LINE>final String lookupUrl = matcher.find() ? ("https://itunes.apple.com/lookup?id=" + matcher.group(1)) : url;<NEW_LINE>return Single.create(emitter -> {<NEW_LI... | artistName = results.getString("artistName"); |
82,204 | public void addFile(String subLabel, String table, List<Pair<String, Long>> files, TNetworkAddress fileAddr, Map<String, String> properties, long timestamp) throws DdlException {<NEW_LINE>if (isSubLabelUsed(subLabel, timestamp)) {<NEW_LINE>// sub label is used and this is a retry request.<NEW_LINE>// no need to do furt... | desc = loadDescByTable.get(table); |
1,679,499 | public Dimension render(Graphics2D graphics) {<NEW_LINE>if (!plugin.isInMlm()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Widget sack = client.getWidget(WidgetInfo.MOTHERLODE_MINE);<NEW_LINE>panelComponent.setBackgroundColor(ComponentConstants.STANDARD_BACKGROUND_COLOR);<NEW_LINE>if (sack != null) {<NEW_LINE>sack.setH... | ))).build()); |
351,137 | public void copyTo(CommandQueue queue, Image dest, long[] srcOrigin, long[] destOrigin, long[] region) {<NEW_LINE>if (srcOrigin.length != 3 || destOrigin.length != 3 || region.length != 3) {<NEW_LINE>throw new IllegalArgumentException("origin and region must both be arrays of length 3");<NEW_LINE>}<NEW_LINE>Utils.point... | pointerBuffers[3].rewind(); |
693,512 | private void onAddClick() {<NEW_LINE>getPanel();<NEW_LINE>LabelsPanel labelsPanel = new LabelsPanel();<NEW_LINE>LabelVariable[] variables = Git.getInstance().getVCSAnnotator().getProjectVariables();<NEW_LINE>labelsPanel.labelsList.setListData(variables);<NEW_LINE>String title = Bundle.GitOptionsPanel_labelVariables_tit... | pos + variable.length()); |
1,525,882 | private void retry(MethodCall call, MethodChannel.Result result) {<NEW_LINE>String taskId = call.argument("task_id");<NEW_LINE>DownloadTask task = taskDao.loadTask(taskId);<NEW_LINE>boolean requiresStorageNotLow = call.argument("requires_storage_not_low");<NEW_LINE>if (task != null) {<NEW_LINE>if (task.status == Downlo... | error("invalid_status", "only failed and canceled task can be retried", null); |
436,086 | private NumberFormat createCurrencyNumberFormat(final I_C_Invoice_Candidate ic) {<NEW_LINE>final IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class);<NEW_LINE>final ICurrencyDAO currencyDAO = Services.get(ICurrencyDAO.class);<NEW_LINE>final I_C_BPartner_Location billBPLocation = bpartnerDAO.getBPartnerLocationB... | numberFormat = NumberFormat.getCurrencyInstance(locale); |
1,070,305 | private static void log(Logger logger, Marker marker, HttpLogEntry entry) {<NEW_LINE>Preconditions.checkNotNull(entry.method, "method");<NEW_LINE>Id dimensions = REGISTRY.createId("tags").withTag("mode", marker.getName()).withTag("status", entry.getStatusTag()).withTag("statusCode", entry.getStatusCodeTag()).withTag("m... | (entry.path, "other")); |
1,680,516 | final CreateBuildResult executeCreateBuild(CreateBuildRequest createBuildRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBuildRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,024,977 | private CompletableFuture<List<Wo>> listFuture(String flag, Integer page, Integer size) {<NEW_LINE>return CompletableFuture.supplyAsync(() -> {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Busi... | job().findWithWork(flag); |
1,103,756 | public Image modifyAlphaWithTranslucency(byte alpha) {<NEW_LINE>int w = getWidth();<NEW_LINE>int h = getHeight();<NEW_LINE>int size = w * h;<NEW_LINE>int[] arr = getRGB();<NEW_LINE>int alphaInt = (((int) alpha) << 24) & 0xff000000;<NEW_LINE>float alphaRatio = (alpha & 0xff);<NEW_LINE>alphaRatio = (alpha & 0xff) / 255.0... | Image(arr, w, h); |
900,681 | @PutMapping(value = "/cmmn-runtime/case-instances/{caseInstanceId}", produces = "application/json")<NEW_LINE>public CaseInstanceResponse updateCaseInstance(@ApiParam(name = "caseInstanceId") @PathVariable String caseInstanceId, @RequestBody CaseInstanceUpdateRequest updateRequest, HttpServletRequest request, HttpServle... | updateRequest.getAction() + "'."); |
1,782,372 | protected EnumMap<KeyIndex, String> initContentProviderKeys() {<NEW_LINE>EnumMap<KeyIndex, String> keys = new EnumMap<KeyIndex, String>(KeyIndex.class);<NEW_LINE>keys.put(KeyIndex.CALENDARS_ID, Calendars._ID);<NEW_LINE>keys.put(KeyIndex.IS_PRIMARY, Calendars.IS_PRIMARY);<NEW_LINE>keys.put(KeyIndex.CALENDARS_NAME, Calen... | KeyIndex.EVENTS_LOCATION, Events.EVENT_LOCATION); |
314,663 | public ResultInterface executeQuery(long maxRows, boolean scrollable) {<NEW_LINE>checkParameters();<NEW_LINE>synchronized (session) {<NEW_LINE>int objectId = session.getNextId();<NEW_LINE>ResultRemote result = null;<NEW_LINE>for (int i = 0, count = 0; i < transferList.size(); i++) {<NEW_LINE>prepareIfRequired();<NEW_LI... | e, i--, ++count); |
1,256,463 | void exportAuthFile(ServicePrincipalImpl servicePrincipal) {<NEW_LINE>if (authFile == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AzureEnvironment environment = AzureEnvironment.AZURE;<NEW_LINE>StringBuilder builder = new StringBuilder("{\n");<NEW_LINE>builder.append(" ").append(String.format("\"clientId\": \"%s\",",... | logExceptionAsError(new RuntimeException(e)); |
1,130,311 | public ByteBuf encode(ByteBuf buf, UnlockRecipesMessage message) throws IOException {<NEW_LINE>ByteBufUtils.writeVarInt(buf, message.getAction());<NEW_LINE>buf.writeBoolean(message.isBookOpen());<NEW_LINE>buf.writeBoolean(message.isFilterOpen());<NEW_LINE>buf.writeBoolean(message.isSmeltingBookOpen());<NEW_LINE>buf.wri... | ByteBufUtils.writeVarInt(buf, recipe); |
104,816 | private void createAllocations(MOrder targetOrder) {<NEW_LINE>List<MPayment> payments = MPayment.getOfOrder(targetOrder);<NEW_LINE>MInvoice[] invoices = targetOrder.getInvoices();<NEW_LINE>BigDecimal totalPay = BigDecimal.ZERO;<NEW_LINE>BigDecimal totalInvoiced = BigDecimal.ZERO;<NEW_LINE>for (MPayment payment : paymen... | setAmount(invoice.getGrandTotal()); |
135,654 | protected void removeByC_EA(String companyId, String emailAddress) throws NoSuchUserException, SystemException {<NEW_LINE>Session session = null;<NEW_LINE>User systemUser = null;<NEW_LINE>try {<NEW_LINE>systemUser = APILocator.getUserAPI().getSystemUser();<NEW_LINE>} catch (DotDataException e) {<NEW_LINE>// TODO Auto-g... | ("middleName ASC").append(", "); |
382,606 | private static void applyAnnotationToMethodDecl(JavacNode typeNode, JCMethodDecl mth, String annType, boolean typeUse) {<NEW_LINE>if (annType == null)<NEW_LINE>return;<NEW_LINE>JavacTreeMaker maker = typeNode.getTreeMaker();<NEW_LINE>JCAnnotation m = maker.Annotation(genTypeRef(typeNode, annType), List.<JCExpression>ni... | annotations = JCAnnotatedTypeReflect.getAnnotations(resType); |
1,009,241 | public void doAction(ActionContext context) throws Exception {<NEW_LINE>setUpgradePhase(UpgradePhase.PROCESS_START);<NEW_LINE>List<MASK><NEW_LINE>int size = processList.size();<NEW_LINE>float processIndex = 1;<NEW_LINE>for (TargetProcess process : processList) {<NEW_LINE>if (UpgradeUtil.isUAVProcessAlive(process)) {<NE... | <TargetProcess> processList = getProcessList(); |
995,878 | private static org.jreleaser.model.Mail convertMail(Mail mail) {<NEW_LINE>org.jreleaser.model.Mail a = new org.jreleaser.model.Mail();<NEW_LINE>convertAnnouncer(mail, a);<NEW_LINE>if (mail.isAuthSet())<NEW_LINE>a.setAuth(mail.isAuth());<NEW_LINE>if (null != mail.getTransport())<NEW_LINE>a.setTransport(mail.getTransport... | (mail.getPassword())); |
1,364,069 | public String format(double value) {<NEW_LINE>if ((offset < SECONDS && value < CUT_OVER_BELOW_S) || (offset >= SECONDS && value < CUT_OVER_ABOVE_S)) {<NEW_LINE>return String.format("%g%s", value, NAMES[offset]);<NEW_LINE>} else if (offset == NAMES.length - 1) {<NEW_LINE>return String.format("%,gh", value);<NEW_LINE>}<N... | "%dh %02dm %02gs", h, m, s); |
81,318 | public boolean apply(Game game, Ability source) {<NEW_LINE>Card card = game.getCard(source.getFirstTarget());<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null || card == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>controller.moveCards(card, Zone.EXILED, sourc... | new FixedTarget(addedToken, game)); |
1,530,101 | public static void drawAcceptIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {<NEW_LINE>// General Declarations<NEW_LINE>Paint paint = CacheForAcceptIcon.paint;<NEW_LINE>// Local Colors<NEW_LINE>int fillColor103 = Color.argb(255, 32, 183, 128);<NEW_LINE>// Resize to Target Frame<NEW_LINE>canvas.save()... | bezierPath.lineTo(1.5f, 6.5f); |
27,075 | public static <T extends ImageGray<T>> void orderBandsIntoRGB(Planar<T> image, BufferedImage input) {<NEW_LINE>boolean swap = swapBandOrder(input);<NEW_LINE>// Output formats are: RGB and RGBA<NEW_LINE>if (swap) {<NEW_LINE>if (image.getNumBands() == 3) {<NEW_LINE>int bufferedImageType = input.getType();<NEW_LINE>if (bu... | ] = image.getBand(2); |
671,572 | public void daemonize() {<NEW_LINE>if (isDaemonized()) {<NEW_LINE>throw new IllegalStateException("Already running as a daemon");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>LOGGER.info("Forking...");<NEW_LINE>var args = JavaVMArguments.current();<NEW_LINE>args.setSystemProperty(RESTHeartDaemon.class.getName(), "daemonized");<N... | _args[0] = getCurrentExecutable(); |
175,219 | // Find or create the appropriate entry for a particular key. We assume this method is<NEW_LINE>// called on the zero keylen entry (first in the chain).<NEW_LINE>PartialMatch findOrCreate(char[] key) {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>tc.entry(this, cclass, "findOrCreate", "key: " + new String(key));<NEW_LIN... | "findOrCreate", "pm.next: " + pm.next); |
1,055,439 | public static void renderTrack(KernelContext context, ImageByte3 output, ImageFloat3 input) {<NEW_LINE>int x = context.globalIdx;<NEW_LINE>int y = context.globalIdy;<NEW_LINE>Byte3 pixel = null;<NEW_LINE>final int result = (int) input.get(x, y).getS2();<NEW_LINE>switch(result) {<NEW_LINE>case // ok GREY<NEW_LINE>1:<NEW... | ) 0, (byte) 255); |
1,453,733 | private static AnnotationBinding buildTargetAnnotation(long bits, LookupEnvironment env) {<NEW_LINE>ReferenceBinding target = env.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_ANNOTATION_TARGET, null);<NEW_LINE>if ((bits & TagBits.AnnotationTarget) != 0)<NEW_LINE>return new <MASK><NEW_LINE>int arraysize = 0;<NEW_LINE... | AnnotationBinding(target, Binding.NO_ELEMENT_VALUE_PAIRS); |
326,055 | /*<NEW_LINE>* @see com.sitewhere.grpc.service.AssetManagementGrpc.AssetManagementImplBase#<NEW_LINE>* updateAsset(com.sitewhere.grpc.service.GUpdateAssetRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void updateAsset(GUpdateAssetRequest request, StreamObserver<GUpdateAss... | handleServerMethodExit(AssetManagementGrpc.getUpdateAssetMethod()); |
1,102,888 | public static void main(String[] args) throws InterruptedException, IllegalArgumentException {<NEW_LINE>// Instantiate a key client that will be used to call the service. Notice that the client is using default Azure<NEW_LINE>// credentials. To make default credentials work, ensure that environment variables 'AZURE_CLI... | getAlgorithm().toString()); |
977,883 | private void sendOffsetCommitRequest(ConsumerNetworkClient consumerNetworkClient, AdminClient adminClient, String consumerGroup) throws ExecutionException, InterruptedException, RuntimeException {<NEW_LINE>LOGGER.trace("Consumer groups available: {}", adminClient.listConsumerGroups().all().get());<NEW_LINE>Node groupCo... | ClientResponse clientResponse = future.value(); |
793,515 | public void programmaticLoginWithDefaultPrincipalMapping() throws Exception {<NEW_LINE>HashMap map = new HashMap();<NEW_LINE>map.put(com.ibm.wsspi.security.auth.callback.Constants.MAPPING_ALIAS, "myAuthData");<NEW_LINE>CallbackHandler callbackHandler = new WSMappingCallbackHandler(map, null);<NEW_LINE>LoginContext logi... | Subject subject = loginContext.getSubject(); |
651,885 | void init() {<NEW_LINE>JythonSupport helper = JythonSupport.get();<NEW_LINE>helper.log(lvl, "SikulixForJython: init: starting");<NEW_LINE>String sikuliStuff = "sikuli/Sikuli";<NEW_LINE>File fSikuliStuff = helper.existsSysPathModule(sikuliStuff);<NEW_LINE>String libSikuli = "/Lib/" + sikuliStuff + ".py";<NEW_LINE>String... | helper.log(lvl, "SikulixForJython: init: success"); |
650,465 | public boolean onHoverEvent(MotionEvent event) {<NEW_LINE>if (DEBUG) {<NEW_LINE>int action = event.getAction();<NEW_LINE>switch(action) {<NEW_LINE>case MotionEvent.ACTION_HOVER_ENTER:<NEW_LINE>Log.e(TAG, "ACTION_HOVER_ENTER");<NEW_LINE>break;<NEW_LINE>case MotionEvent.ACTION_HOVER_MOVE:<NEW_LINE>Log.e(TAG, "ACTION_HOVE... | event.getY(), true); |
906,496 | void processAttributes() {<NEW_LINE>String id = pop("id");<NEW_LINE>if (StringUtils.isNotBlank(id)) {<NEW_LINE>id = "#" + id;<NEW_LINE>}<NEW_LINE>String roles = String.join(".", pop("role").split(" "));<NEW_LINE>if (StringUtils.isNotBlank(roles)) {<NEW_LINE>roles = "." + roles;<NEW_LINE>}<NEW_LINE>StringBuilder options... | logger.warn("Don't know how to handle key: " + k); |
1,322,835 | private DalGroupDB parseDotNetDBConnString(String connStr) {<NEW_LINE>DalGroupDB db = new DalGroupDB();<NEW_LINE>try {<NEW_LINE>String dbhost = null;<NEW_LINE>Matcher matcher = dbnamePattern.matcher(connStr);<NEW_LINE>if (matcher.find()) {<NEW_LINE>db.setDb_catalog(matcher.group(2));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE... | matcher = dburlPattern.matcher(connStr); |
426,412 | public void testInvokeAsynchronousMethodExposedOnNoInterfaceView() throws Exception {<NEW_LINE>long currentThreadId = 0;<NEW_LINE>// Get a no-interface style BeanReference to NoInterfaceBean3<NEW_LINE>NoInterfaceBean3 bean3 = lookupNoInterfaceBean3FromEJBLocalNamespace();<NEW_LINE>// Invoke an asynchronous method<NEW_L... | assertTrue("Async NoInterface Bean method completed", NoInterfaceBean3.asyncWorkDone); |
1,406,211 | final ListEndpointConfigsResult executeListEndpointConfigs(ListEndpointConfigsRequest listEndpointConfigsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEndpointConfigsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
51,868 | public Pipeline createPipeline(final BuildCause buildCause, final PipelineConfig pipelineConfig, final SchedulingContext context, final String md5, final Clock clock) {<NEW_LINE>return (Pipeline) transactionTemplate.execute((TransactionCallback) status -> {<NEW_LINE>Pipeline pipeline = null;<NEW_LINE>if (shouldCancel(b... | buildCause, pipelineConfig.getOrigin()); |
1,358,686 | public void addSendMetric(DispatchProfile currentRecord, String bid) {<NEW_LINE>Map<String, String> dimensions = new HashMap<>();<NEW_LINE>dimensions.put(SortMetricItem.KEY_CLUSTER_ID, this.getClusterId());<NEW_LINE>dimensions.put(SortMetricItem.KEY_TASK_NAME, this.getTaskName());<NEW_LINE>// metric<NEW_LINE>fillInlong... | KEY_SINK_ID, this.getSinkName()); |
999,398 | private void visitBinOperator(final Token<?> token, final OperatorType opType, final String methodName) {<NEW_LINE>visitLineNumber(token);<NEW_LINE>if (!OperationRuntime.hasRuntimeContext(this.compileEnv, opType)) {<NEW_LINE>// swap arguments for regular-expression match operator.<NEW_LINE>if (opType == OperatorType.MA... | this.mv.visitInsn(SWAP); |
111,351 | public void start() {<NEW_LINE>if (current != null) {<NEW_LINE>current.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Form hi = new Form("Hi World", BoxLayout.y());<NEW_LINE>hi.add(new Label("Hi World"));<NEW_LINE>Button btn = new Button("Show Dialog");<NEW_LINE>btn.addActionListener(e -> {<NEW_LINE>Dialog dlg = new Dial... | .getHeight() - top - h; |
1,155,717 | final ListBotLocalesResult executeListBotLocales(ListBotLocalesRequest listBotLocalesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listBotLocalesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListBotLoca... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
736,373 | // Handle show encryptkeys<NEW_LINE>private void handleShowEncryptKeys() throws AnalysisException {<NEW_LINE>ShowEncryptKeysStmt showStmt = (ShowEncryptKeysStmt) stmt;<NEW_LINE>Util.prohibitExternalCatalog(ctx.getDefaultCatalog(), stmt.getClass().getSimpleName());<NEW_LINE>DatabaseIf db = ctx.getCurrentCatalog().<MASK>... | getDbOrAnalysisException(showStmt.getDbName()); |
1,111,996 | public void onClick(View v) {<NEW_LINE>String accName = ((TextView) t.findViewById(R.id.name)).getText().toString();<NEW_LINE>LogUtil.v("Found name is " + accName);<NEW_LINE>if (!accName.equalsIgnoreCase(Authentication.name)) {<NEW_LINE><MASK><NEW_LINE>if (!accounts.get(accName).isEmpty()) {<NEW_LINE>LogUtil.v("Using t... | LogUtil.v("Switching to " + accName); |
541,952 | final GetEbsDefaultKmsKeyIdResult executeGetEbsDefaultKmsKeyId(GetEbsDefaultKmsKeyIdRequest getEbsDefaultKmsKeyIdRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getEbsDefaultKmsKeyIdRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.