idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,106,293 | public static Collection<ErrorDescription> run(final HintContext hintContext) {<NEW_LINE>final List<ErrorDescription> problems = new ArrayList<>();<NEW_LINE>final EJBProblemContext ctx = HintsUtils.getOrCacheContext(hintContext);<NEW_LINE>if (ctx != null && ctx.getEjb() instanceof Session) {<NEW_LINE>TypeMirror parentT... | .getClazz().getSuperclass(); |
26,428 | private Section buildRealmProperties(OsAccountRealm realm) {<NEW_LINE>Section section = new Section(Bundle.OsAccountDataPanel_realm_title());<NEW_LINE>SectionData data = new SectionData();<NEW_LINE>String realmName = realm.getRealmNames().isEmpty() ? Bundle.OsAccountDataPanel_realm_unknown() : realm.getRealmNames().get... | > optional = realm.getRealmAddr(); |
1,586,681 | public okhttp3.Call readNamespaceCall(String name, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/namespaces/{name}".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeSt... | = new ArrayList<Pair>(); |
35,941 | private Mono<Response<Flux<ByteBuffer>>> stopWithResponseAsync(String resourceGroupName, String workspaceName, String integrationRuntimeName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and ... | workspaceName, integrationRuntimeName, accept, context); |
375,811 | public void start(Stage primaryStage) throws Exception {<NEW_LINE>try {<NEW_LINE>// FXMLLoader loader = new FXMLLoader(getClass().getResource("/MainWindow.fxml"));<NEW_LINE>// loader.setControllerFactory(this::getController);<NEW_LINE>StackPane root = new MainWindowFxml(this);<NEW_LINE>FxmlUtil.setPrimaryStage(primaryS... | , bounds.getHeight())); |
678,734 | public int countForTargetType(String assetGroup, String parentType, Map<String, String> termsFilter, String applicationFilter, String environmentFilter, int from, int size) throws Exception {<NEW_LINE>int count = 0;<NEW_LINE>String targetType = "vulninfo";<NEW_LINE>Map<String, Object> mustFilterMap = new LinkedHashMap<... | parentEntryMap.put("parent_type", parentType); |
775,575 | public void run(RegressionEnvironment env) {<NEW_LINE>tryString(env, "theString in ('a', 'b', 'c')", new String[] { "0", "a", "b", "c", "d", null }, new Boolean[] { false, true, true, true, false, null });<NEW_LINE>tryString(env, "theString in ('a')", new String[] { "0", "a", "b", "c", "d", null }, new Boolean[] { fals... | { null, null, null }); |
817,608 | private List<String> createPointer(String pointer) {<NEW_LINE>if (pointer.charAt(0) == '#') {<NEW_LINE>try {<NEW_LINE>pointer = URLDecoder.decode(pointer, "UTF_8");<NEW_LINE>} catch (UnsupportedEncodingException e) {<NEW_LINE>throw new JSONException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pointer.isEmpty() || pointer.ch... | throw new JSONException("Invalid JSON pointer: " + pointer); |
86,832 | public void init(Analyzer analyzer) throws UserException {<NEW_LINE>super.init(analyzer);<NEW_LINE>this.analyzer = analyzer;<NEW_LINE>if (desc.getTable() != null) {<NEW_LINE>BrokerTable brokerTable = <MASK><NEW_LINE>try {<NEW_LINE>fileGroups = Lists.newArrayList(new BrokerFileGroup(brokerTable));<NEW_LINE>} catch (Anal... | (BrokerTable) desc.getTable(); |
1,793,081 | public com.amazonaws.services.polly.model.InvalidSampleRateException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.polly.model.InvalidSampleRateException invalidSampleRateException = new com.amazonaws.services.polly.model.InvalidSampleRateException(null);<NEW_... | JsonToken token = context.getCurrentToken(); |
1,580,115 | private void loadNode108() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.ServerConfiguration_CertificateGroups_DefaultUserTokenGroup_TrustList_GetPosition, new QualifiedName(0, "GetPosition"), new LocalizedText("en", "GetPosition"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.val... | (0), true, true); |
1,344,170 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_main);<NEW_LINE>// get a reference to the scene view<NEW_LINE>mSceneView = findViewById(R.id.sceneView);<NEW_LINE>// create a scene with an imagery basemap<NEW_LINE>ArcGISScene sce... | getGraphicsOverlays().add(graphicsOverlay); |
1,040,820 | public AsyncResult<Void> executeTaskAsync(UIAccess uiAccess, DataContext context, RunConfiguration configuration, ExecutionEnvironment env, RunConfigurableBeforeRunTask task) {<NEW_LINE>RunnerAndConfigurationSettings settings = task.getSettings();<NEW_LINE>if (settings == null) {<NEW_LINE>return AsyncResult.rejected();... | Executor executor = DefaultRunExecutor.getRunExecutorInstance(); |
240,288 | private void loadNode742() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ProgramStateMachineType_Running_StateNumber, new QualifiedName(0, "StateNumber"), new LocalizedText("en", "StateNumber"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.... | setInput(new StringReader(xml)); |
1,498,233 | public NodeOutputPort unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>NodeOutputPort nodeOutputPort = new NodeOutputPort();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.g... | int originalDepth = context.getCurrentDepth(); |
294,677 | public void doReportStat(SofaTracerSpan sofaTracerSpan) {<NEW_LINE>Map<String, String> tagsWithStr = sofaTracerSpan.getTagsWithStr();<NEW_LINE>StatMapKey statKey = new StatMapKey();<NEW_LINE>statKey.addKey(CommonSpanTags.LOCAL_APP, tagsWithStr.get(CommonSpanTags.LOCAL_APP));<NEW_LINE>statKey.addKey("operationName", sof... | SofaTracerConstant.STAT_FLAG_SUCCESS : SofaTracerConstant.STAT_FLAG_FAILS); |
842,043 | private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoResponse nodesInfo) {<NEW_LINE>DiscoveryNodes nodes = state.getState().nodes();<NEW_LINE>Table table = getTableWithHeader(req);<NEW_LINE>for (DiscoveryNode node : nodes) {<NEW_LINE>NodeInfo info = nodesInfo.getNodesMap().get(node.getId());<N... | addCell(node.getId()); |
1,076,935 | private static boolean daemonizeIfPossible() {<NEW_LINE>String osName = System.getProperty("os.name");<NEW_LINE>Libc.OpenPtyLibrary openPtyLibrary;<NEW_LINE>Platform platform = Platform.detect();<NEW_LINE>if (platform == Platform.LINUX) {<NEW_LINE>Libc.Constants.rTIOCSCTTY = Libc.Constants.LINUX_TIOCSCTTY;<NEW_LINE>Lib... | .rFDCLOEXEC = Libc.Constants.DARWIN_FD_CLOEXEC; |
757,934 | private void loadNode112() {<NEW_LINE>UaObjectTypeNode node = new UaObjectTypeNode(this.context, Identifiers.OperationLimitsType, new QualifiedName(0, "OperationLimitsType"), new LocalizedText("en", "OperationLimitsType"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), false);<NEW_LINE>node.addRefe... | .expanded(), true)); |
1,407,693 | public J visitLambda(Lambda lambda, PrintOutputCapture<P> p) {<NEW_LINE>visitSpace(lambda.getPrefix(), Space.Location.LAMBDA_PREFIX, p);<NEW_LINE>visitMarkers(lambda.getMarkers(), p);<NEW_LINE>visitSpace(lambda.getParameters().getPrefix(), <MASK><NEW_LINE>visitMarkers(lambda.getParameters().getMarkers(), p);<NEW_LINE>i... | Space.Location.LAMBDA_PARAMETERS_PREFIX, p); |
988,978 | private void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {<NEW_LINE>// ensure that filter is only applied once per request<NEW_LINE>if (request.getAttribute(FILTER_APPLIED) != null) {<NEW_LINE>chain.doFilter(request, response);<NEW_LINE>retu... | SecurityContext contextAfterChainExecution = SecurityContextHolder.getContext(); |
898,661 | private void init() throws IOException {<NEW_LINE>if (running) {<NEW_LINE>counter = new AtomicLong(getCommitFrequency());<NEW_LINE>Directory directory = getDirectory(application);<NEW_LINE>IndexWriterConfig config = new IndexWriterConfig(analyzer);<NEW_LINE>config.<MASK><NEW_LINE>writer = new IndexWriter(directory, con... | setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND); |
794,531 | protected Void doInBackground() throws Exception {<NEW_LINE>addPropertyChangeListener(new PropertyChangeListener() {<NEW_LINE><NEW_LINE>public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>if ("progress".equals(evt.getPropertyName())) {<NEW_LINE>progressBar.setValue((<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<... | Integer) evt.getNewValue()); |
1,007,393 | public BufferedImage intelligentResize(File incomingImage, int width, int height, int resampleOption) {<NEW_LINE>final String hash = DigestUtils.sha256Hex(incomingImage.getAbsolutePath());<NEW_LINE>Dimension originalSize = getWidthHeight(incomingImage);<NEW_LINE>width = Math.min(maxSize, width);<NEW_LINE>height = <MASK... | Math.min(maxSize, height); |
1,314,770 | public void focusGained(FocusEvent e) {<NEW_LINE>if (m_combo == null || m_combo.getEditor() == null)<NEW_LINE>return;<NEW_LINE>if ((e.getSource() != m_combo && e.getSource() != m_combo.getEditor().getEditorComponent()) || e.isTemporary() || m_haveFocus || m_lookup == null)<NEW_LINE>return;<NEW_LINE>// avoid repeated qu... | Object obj = m_lookup.getSelectedItem(); |
1,016,269 | public EvaluationMetrics unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EvaluationMetrics evaluationMetrics = new EvaluationMetrics();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token... | int originalDepth = context.getCurrentDepth(); |
572,040 | public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>if (sources != null && sources.length == 1) {<NEW_LINE>if (sources[0] == null) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>boolean useBuffer = false;<NEW_LINE>RenderContext innerCtx = null;<NEW_L... | sources, ctx.isJavaScriptContext()); |
630,114 | private static void validateFieldValue(SameCountryValidator vatValidator, Errors errors, String prefixForLambda, TicketFieldConfiguration fieldConf, List<String> values, int i) {<NEW_LINE>String formValue = values.get(i);<NEW_LINE>if (fieldConf.isMaxLengthDefined()) {<NEW_LINE>validateMaxLength(formValue, prefixForLamb... | "]", "error.disabledValue", null, null); |
1,768,604 | // Private methods ---------------------------------------------------------<NEW_LINE>private void updatePackages() {<NEW_LINE>final Object item = createdLocationComboBox.getSelectedItem();<NEW_LINE>if (!(item instanceof SourceGroupSupport.SourceGroupProxy)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>WAIT_MODEL.setSelected... | SourceGroupProxy) item).getPackagesComboBoxModel(); |
1,034,399 | public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException {<NEW_LINE>for (final Callback callback : callbacks) {<NEW_LINE>if (callback instanceof NameCallback) {<NEW_LINE><MASK><NEW_LINE>nc.setName(getUserName());<NEW_LINE>} else if (callback instanceof ObjectCallback) {<NEW_LINE>f... | final NameCallback nc = (NameCallback) callback; |
331,373 | public void onClick(View v) {<NEW_LINE>try {<NEW_LINE>switch(v.getId()) {<NEW_LINE>case R.id.web:<NEW_LINE>Statistics.INSTANCE.trackEvent(Statistics.EventName.Settings.WEB_SITE);<NEW_LINE>AlohaHelper.logClick(AlohaHelper.Settings.WEB_SITE);<NEW_LINE>startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(Constants.Url.W... | ), R.string.tell_friends); |
34,292 | public // hbase_rest("http://example. com:8000/table/scanner/","POST/GET/PUT/DELETE","UTF-8","xml or json","Accept: text/xml","Content-Type: text/xml")<NEW_LINE>Object calculate(Context ctx) {<NEW_LINE>m_ctx = ctx;<NEW_LINE>IParam param = this.param;<NEW_LINE>try {<NEW_LINE>if (param.getType() == ';') {<NEW_LINE>ArrayL... | (0).getAllLeafExpression(list1); |
287,298 | private static void pruneOperationsAndErrors(ServiceModel serviceModel) {<NEW_LINE>Map<String, Shape> shapes = serviceModel.getShapes();<NEW_LINE>Map<String, Operation> operations = copy(serviceModel.getOperations());<NEW_LINE>serviceModel.getOperations().forEach((operationName, operation) -> {<NEW_LINE>// Remove opera... | .getOutput().getShape(); |
943,702 | public void write(org.apache.thrift.protocol.TProtocol prot, TTransaction 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.isSetSamp... | oprot.writeI64(struct.sampledContinuationCount); |
1,780,763 | public void generateStoreSaveValueIfNecessary(CodeStream codeStream) {<NEW_LINE>// push receiver<NEW_LINE>codeStream.aload_0();<NEW_LINE>// push the 2 parameters of "setResult(Object, Class)"<NEW_LINE>if (this.expression == null || this.expression.resolvedType == TypeBinding.VOID) {<NEW_LINE>// expressionType == VoidBi... | this.expression.resolvedType, null); |
582,691 | private synchronized void initAllocators(OStorage storage) {<NEW_LINE>// Syncrhonized will be replaced when the schema operations will go through the coordinator<NEW_LINE>int clusters = storage.getClusters();<NEW_LINE>Collection<? extends OCluster<MASK><NEW_LINE>ArrayList<AtomicLong> newAllocators = new ArrayList<>(clu... | > clusterInstances = storage.getClusterInstances(); |
88,785 | protected double doFirstDerivative(double xValue) {<NEW_LINE>ArgChecker.isTrue(xValue > 0, "Value should be stricly positive");<NEW_LINE>int lowerIndex = lowerBoundIndex(xValue, xValues);<NEW_LINE>int index;<NEW_LINE>// check if x-value is at the last node<NEW_LINE>if (lowerIndex == dataSize - 1) {<NEW_LINE>index = dat... | double xy21 = x1 * y1 * y1; |
1,019,896 | private List<ResourceUsage> resourceUsageFromSnapshots(Plan plan, List<ResourceSnapshot> snapshots) {<NEW_LINE>snapshots.sort(Comparator.comparing(ResourceSnapshot::getTimestamp));<NEW_LINE>return IntStream.range(0, snapshots.size()).mapToObj(idx -> {<NEW_LINE>var a = snapshots.get(idx);<NEW_LINE>var b = (idx + 1) < sn... | collect(Collectors.toList()); |
306,072 | public FrequentItemsetsResult run(final Relation<BitVector> relation) {<NEW_LINE>// TODO: implement with resizable arrays, to not need dim.<NEW_LINE>final int dim = RelationUtil.dimensionality(relation);<NEW_LINE>final VectorFieldTypeInformation<BitVector> meta = RelationUtil.assumeVectorField(relation);<NEW_LINE>// Co... | getMinimumSupport(relation.size()); |
1,109,148 | public static ListItemsResponse unmarshall(ListItemsResponse listItemsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listItemsResponse.setRequestId(_ctx.stringValue("ListItemsResponse.requestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>Total total = new Total();<NEW_LINE>total.setInstanceRecommendItem(_ctx.lo... | ("ListItemsResponse.result.detail[" + i + "].shopId")); |
629,607 | private static List<WindowHandler> createWindowHandlers() {<NEW_LINE>List<WindowHandler> windowHandlers = new ArrayList<WindowHandler>();<NEW_LINE>windowHandlers.add(new AcceptIncomingConnectionDialogHandler());<NEW_LINE>windowHandlers.add(new BlindTradingWarningDialogHandler());<NEW_LINE>windowHandlers.add(new ExitSes... | .add(new ShutdownProgressDialogHandler()); |
588,249 | public BufferedImage filter(BufferedImage bi) {<NEW_LINE>if (bi.getSampleModel().getDataType() != DataBuffer.TYPE_INT) {<NEW_LINE>bi = convertType(bi, BufferedImage.TYPE_INT_ARGB);<NEW_LINE>}<NEW_LINE>BufferedImage dstImg = new BufferedImage(bi.getWidth(), bi.getHeight(<MASK><NEW_LINE>// Grayscale, Contrast<NEW_LINE>bi... | ), bi.getType()); |
964,305 | public final Object decode(CachedData d) {<NEW_LINE>byte[] compositeData = d.getData();<NEW_LINE>if (compositeData.length <= 4)<NEW_LINE>throw new MemcachedDecodeException("There are no four bytes before value for TokyoTyrantTranscoder");<NEW_LINE>byte[] flagBytes = new byte[4];<NEW_LINE>byte[] realData = new <MASK><NE... | byte[compositeData.length - 4]; |
1,052,536 | private HiveConf configure() throws Exception {<NEW_LINE>String scratchDir = NTFSLocalFileSystem.SCRATCH_DIR;<NEW_LINE>File scratchDirFile = new File(scratchDir);<NEW_LINE>TestUtils.delete(scratchDirFile);<NEW_LINE>Configuration cfg = new Configuration();<NEW_LINE>HiveConf conf = new HiveConf(cfg, HiveConf.class);<NEW_... | DummyHiveAuthenticationProvider.class.getName()); |
439,871 | public Object visit(ASTAnyTypeDeclaration node, Object data) {<NEW_LINE>if (!MetricsUtil.supportsAll(node, NOAM, NOPA, WMC, WOC)) {<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>boolean isDataClass = interfaceRevealsData(node) && classRevealsDataAndLacksComplexity(node);<NEW_LINE>if (isDataClass) {<NEW_LINE>double woc = M... | super.visit(node, data); |
436,770 | private static ConstructingObjectParser<Hyperparameters, Void> createParser(boolean ignoreUnknownFields) {<NEW_LINE>ConstructingObjectParser<Hyperparameters, Void> parser = new ConstructingObjectParser<>("classification_hyperparameters", ignoreUnknownFields, a -> new Hyperparameters((String) a[0], (double) a[1], (doubl... | declareInt(constructorArg(), NUM_FOLDS); |
1,359,379 | public ImportCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ImportCertificateResult importCertificateResult = new ImportCertificateResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | JsonToken token = context.getCurrentToken(); |
841,210 | private void createAnonymousTypeLabel(CompletionProposal proposal, CompletionItem item) {<NEW_LINE>char[] declaringTypeSignature = proposal.getDeclarationSignature();<NEW_LINE>declaringTypeSignature = Signature.getTypeErasure(declaringTypeSignature);<NEW_LINE>String name = new String<MASK><NEW_LINE>item.setInsertText(n... | (Signature.getSignatureSimpleName(declaringTypeSignature)); |
1,020,551 | public static DescribeAntChainMembersV2Response unmarshall(DescribeAntChainMembersV2Response describeAntChainMembersV2Response, UnmarshallerContext _ctx) {<NEW_LINE>describeAntChainMembersV2Response.setRequestId(_ctx.stringValue("DescribeAntChainMembersV2Response.RequestId"));<NEW_LINE>describeAntChainMembersV2Response... | (_ctx.stringValue("DescribeAntChainMembersV2Response.ResultCode")); |
423,153 | public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>final OsmandApplication app = getMyApplication();<NEW_LINE>Context context = getContext();<NEW_LINE>if (context == null || app == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>Bu... | pluginId = savedInstanceState.getString(PLUGIN_ID_KEY); |
1,115,815 | public <K, V> void replace(Cache<K, V> cache, K key, V value, long lifespan, TimeUnit lifespanUnit) {<NEW_LINE>log.tracev(<MASK><NEW_LINE>Object taskKey = getTaskKey(cache, key);<NEW_LINE>CacheTask current = tasks.get(taskKey);<NEW_LINE>if (current != null) {<NEW_LINE>if (current instanceof CacheTaskWithValue) {<NEW_LI... | "Adding cache operation: {0} on {1}", CacheOperation.REPLACE, key); |
1,826,097 | public void run() {<NEW_LINE>response.setContentType(MediaType.PLAIN_TEXT_UTF_8);<NEW_LINE>try {<NEW_LINE>int totalNumOfWipedEntities = 0;<NEW_LINE>DateTime wipeOutTime = clock.nowUtc().minusMonths(minMonthsBeforeWipeOut);<NEW_LINE>logger.atInfo().log("About to wipe out all PII of contact history entities prior to %s."... | String.format("Done. Wiped out PII of %d ContactHistory entities in total.", totalNumOfWipedEntities); |
1,788,523 | private void initializeViews() {<NEW_LINE>int width = isTabletMode <MASK><NEW_LINE>int height = isTabletMode ? LayoutParams.MATCH_PARENT : LayoutParams.WRAP_CONTENT;<NEW_LINE>LayoutParams params = new LayoutParams(width, height);<NEW_LINE>setLayoutParams(params);<NEW_LINE>setOrientation(isTabletMode ? HORIZONTAL : VERT... | ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT; |
655,724 | public Void visitBlock(BlockTree bt, Void p) {<NEW_LINE>List<CatchTree> catches = createCatches(info, make, thandles, statement);<NEW_LINE>// #89379: if inside a constructor, do not wrap the "super"/"this" call:<NEW_LINE>// please note that the "super" or "this" call is supposed to be always<NEW_LINE>// in the construc... | .getParentPath().getLeaf(); |
1,485,423 | private String doEval(String name, ModelItem modelItem, StringToObjectMap objects) {<NEW_LINE>String engineId = SoapUIScriptEngineRegistry.getScriptEngineId(modelItem);<NEW_LINE>synchronized (this) {<NEW_LINE>if (!scriptEnginePools.containsKey(engineId)) {<NEW_LINE>scriptEnginePools.put(engineId, new ScriptEnginePool(e... | SoapUIScriptEngine scriptEngine = scriptEnginePool.getScriptEngine(); |
811,651 | public ApiResponse handleApiAction(String name, JSONObject params) throws ApiException {<NEW_LINE>log.debug("handleApiAction " + name + " " + params.toString());<NEW_LINE>Context context;<NEW_LINE>switch(name) {<NEW_LINE>case ACTION_SET_AUTHORIZATION_METHOD:<NEW_LINE>context = <MASK><NEW_LINE>String headerRegex = param... | ApiUtils.getContextByParamId(params, PARAM_CONTEXT_ID); |
1,137,798 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String applicationFlag) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Wo wo = new Wo();<NEW_LINE>CacheCategory cac... | add(o.getAlias()); |
123,964 | private static MysqlVariable newSetItem(String key, SQLExpr valueExpr) throws SQLException {<NEW_LINE>switch(key.toLowerCase()) {<NEW_LINE>case "xa":<NEW_LINE>return new MysqlVariable("xa", SetItemUtil.getBooleanVal(key.toLowerCase(), valueExpr), VariableType.XA);<NEW_LINE>case "trace":<NEW_LINE>return new MysqlVariabl... | , valueExpr), VariableType.TX_READ_ONLY); |
1,496,354 | public static void start(String[] args) {<NEW_LINE>// create logger<NEW_LINE>final Logger logger = LoggerFactory.getLogger(Server.class);<NEW_LINE>// initialize the parameter parser<NEW_LINE>// Note that the parameter parser should always be the first line to execute.<NEW_LINE>// Because, here we need to parse the para... | preferredNetworks.split(REGEX_SPLIT_CHAR))); |
1,568,197 | public void checkOut(int id, String stationName, int t) {<NEW_LINE>LinkedList<StationAndTime> list = travelerMap.get(id);<NEW_LINE>StationAndTime stationAndTime = list.getLast();<NEW_LINE>String startToEndStation = stationAndTime<MASK><NEW_LINE>int duration = t - stationAndTime.getTime();<NEW_LINE>if (!averageTimeMap.c... | .getStation() + "->" + stationName; |
1,151,027 | public boolean save(IMiniTable miniTable, String trxName) {<NEW_LINE>log.info("");<NEW_LINE>int M_RMA_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "M_RMA_ID");<NEW_LINE>// Integer bpId = (Integer)bPartnerField.getValue();<NEW_LINE>MRMA rma = new MRMA(Env.<MASK><NEW_LINE>// update BP<NEW_LINE>// rm... | getCtx(), M_RMA_ID, trxName); |
331,556 | public void transformJson(HistoryJobEntity job, ObjectNode historicalData, CommandContext commandContext) {<NEW_LINE>HistoricIdentityLinkService historicIdentityLinkService = cmmnEngineConfiguration<MASK><NEW_LINE>HistoricIdentityLinkEntity historicIdentityLinkEntity = historicIdentityLinkService.createHistoricIdentity... | .getIdentityLinkServiceConfiguration().getHistoricIdentityLinkService(); |
819,000 | public static void reloadConfigParams(PluginConfig cfg) {<NEW_LINE>final String PREFIX = "StartStopManager_";<NEW_LINE>iRankType = cfg.getUnsafeIntParameter(PREFIX + "iRankType");<NEW_LINE>minPeersToBoostNoSeeds = cfg.getUnsafeIntParameter(PREFIX + "iMinPeersToBoostNoSeeds");<NEW_LINE>minSpeedForActiveDL = cfg.getUnsaf... | cfg.getUnsafeBooleanParameter(PREFIX + "bPreferLargerSwarms"); |
356,955 | public MediaStreamAttributesRequest unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MediaStreamAttributesRequest mediaStreamAttributesRequest = new MediaStreamAttributesRequest();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentPar... | ().unmarshall(context)); |
616,152 | public void write(Object value) throws Exception {<NEW_LINE>Preconditions.checkArgument(value != null, "Null values are not allowed.");<NEW_LINE>LevelDBTypeInfo ti = getTypeInfo(value.getClass());<NEW_LINE>try (WriteBatch batch = db().createWriteBatch()) {<NEW_LINE>byte[] <MASK><NEW_LINE>synchronized (ti) {<NEW_LINE>Ob... | data = serializer.serialize(value); |
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(10.5, 1500)); |
1,123,322 | protected BeanDefinitionBuilder configureDefaultAuditHandlerAttributes(AuditingConfiguration configuration, BeanDefinitionBuilder builder) {<NEW_LINE>if (StringUtils.hasText(configuration.getAuditorAwareRef())) {<NEW_LINE>builder.addPropertyValue(AUDITOR_AWARE, createLazyInitTargetSourceBeanDefinition(configuration.get... | DATE_TIME_PROVIDER, configuration.getDateTimeProviderRef()); |
725,509 | public static List<Cmd> createDiffCmds(@Nonnull Model<Object> listModel, @Nonnull Object[] oldElements, @Nonnull Object[] newElements) {<NEW_LINE>Diff.Change change = null;<NEW_LINE>try {<NEW_LINE>change = Diff.buildChanges(oldElements, newElements);<NEW_LINE>} catch (FilesTooBigForDiffException e) {<NEW_LINE>// should... | + inserted - deleted, elements)); |
456,113 | // ----- private methods -----<NEW_LINE>private void applyAce(final AccessControllable node, final Ace toAdd, final boolean revoke) throws FrameworkException {<NEW_LINE>final String principalId = toAdd.getPrincipalId();<NEW_LINE>final List<String> permissions = toAdd.getPermissions();<NEW_LINE>final Principal principal... | permission = Permissions.valueOf(permissionString); |
427,668 | public static DeltaTableName from(String tableName) {<NEW_LINE>Matcher match = TABLE_PATTERN.matcher(tableName);<NEW_LINE>if (!match.matches()) {<NEW_LINE>throw new PrestoException(NOT_SUPPORTED, "Invalid Delta table name: " + tableName + ", Expected table name form 'tableName[@v<snapshotId>][@t<snapshotAsOfTimestamp>]... | DeltaTableName(tableNameOrPath, snapshot, timestampMillisUtc); |
1,339,616 | private void generateSendMailMethod(FileObject fileObject, final String className, String sessionVariableName, String sessionGetter) throws IOException {<NEW_LINE>List<MethodModel.Variable> parameters = Arrays.asList(new MethodModel.Variable[] { MethodModel.Variable.create("java.lang.String", "email"), MethodModel.Vari... | toPhase(JavaSource.Phase.ELEMENTS_RESOLVED); |
951,492 | public static void main(String[] args) throws IOException {<NEW_LINE>String resolverPath = null;<NEW_LINE>String handlerJarPaths = null;<NEW_LINE>String handlerClassNames = null;<NEW_LINE>String inputDir = null;<NEW_LINE>try {<NEW_LINE>final CommandLineParser parser = new GnuParser();<NEW_LINE>CommandLine cl = parser.p... | ClassJarPathUtil.getAnnotationHandlers(handlerJarPaths, handlerClassNames); |
1,128,438 | private void onOK() {<NEW_LINE>int index;<NEW_LINE>try {<NEW_LINE>index = Integer.parseInt(this.textIndex.getText());<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>index = 0;<NEW_LINE>}<NEW_LINE>MethodParameterSetting twigPath = new MethodParameterSetting(this.textCallTo.getText(), this.textMethodName.getText()... | tableView.getSelectedRows()[0]; |
1,666,706 | public static <T> T addEnum(Class<T> cl, String name, List<Class<?>> ctorTypes, List<Object> ctorParams) {<NEW_LINE>try {<NEW_LINE>Unsafe.ensureClassInitialized(cl);<NEW_LINE>Field field = getValuesField(cl);<NEW_LINE>Object base = Unsafe.staticFieldBase(field);<NEW_LINE>long offset = Unsafe.staticFieldOffset(field);<N... | cl, arr.length + 1); |
1,007,897 | public void clearRange(long startAddress, long bytesToClear) {<NEW_LINE>if (bytesToClear == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long endAddress = startAddress + bytesToClear;<NEW_LINE>assert endAddress <= <MASK><NEW_LINE>int blockNumber = (int) (startAddress / CHUNK_SIZE);<NEW_LINE>int firstBlockBytesToClear = (i... | (long) this.fChunksUsed * CHUNK_SIZE; |
1,044,660 | public static byte[] fromBigDecimal(BigDecimal i) {<NEW_LINE>BigInteger bi = i.unscaledValue();<NEW_LINE>byte[] tmp = bi.toByteArray();<NEW_LINE><MASK><NEW_LINE>if ((scale <= 0x3F) && (scale > -0x3F)) {<NEW_LINE>// 6 bits are sufficient to encode<NEW_LINE>// scale unsigned<NEW_LINE>// encode sign<NEW_LINE>byte[] b = ne... | int scale = i.scale(); |
225,900 | public Page<Task> tasks(Pageable pageable, GetTasksPayload getTasksPayload) {<NEW_LINE>TaskQuery taskQuery = taskService.createTaskQuery();<NEW_LINE>if (getTasksPayload == null) {<NEW_LINE>getTasksPayload = TaskPayloadBuilder.tasks().build();<NEW_LINE>}<NEW_LINE>String authenticatedUserId = securityManager.getAuthentic... | , pageable.getMaxItems())); |
1,473,069 | public boolean apply(Game game, Ability source) {<NEW_LINE>// In the case that the enchantment is blinked<NEW_LINE>Permanent enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);<NEW_LINE>if (enchantment == null) {<NEW_LINE>// It was not blinked, use the standard method<NEW_LIN... | add(source.getControllerId()); |
1,676,775 | public void shutdownCleanup() {<NEW_LINE>Utils.setConfigBoolean("file.overwrite", configOverwriteCheckbox.isSelected());<NEW_LINE>Utils.setConfigInteger("threads.size", Integer.parseInt(configThreadsText.getText()));<NEW_LINE>Utils.setConfigInteger("download.retries", Integer.parseInt(configRetriesText.getText()));<NEW... | "clipboard.autorip", configClipboardAutorip.isSelected()); |
184,327 | private CompletableFuture<List<Map<String, Object>>> executeAsPartOfBatch(DataFetchingEnvironment environment, List<BoundQuery> queries, Exception buildException, OperationDefinition operation) {<NEW_LINE>int selections = environment.getOperationDefinition().getSelectionSet().getSelections().size();<NEW_LINE>StargateGr... | -> toBatchResults(rows, values)); |
1,254,610 | // ===================================================================================<NEW_LINE>// Source<NEW_LINE>// ======<NEW_LINE>@Override<NEW_LINE>public Map<String, Object> toSource() {<NEW_LINE>Map<String, Object> sourceMap = new HashMap<>();<NEW_LINE>if (createdBy != null) {<NEW_LINE>addFieldToSource(sourceMap... | addFieldToSource(sourceMap, "value", value); |
636,383 | public static boolean isWildFlyServlet(File serverPath) {<NEW_LINE>// NOI18N<NEW_LINE>assert serverPath != null : "Can't determine version with null server path";<NEW_LINE>String productConf = getProductConf(serverPath);<NEW_LINE>if (productConf != null) {<NEW_LINE>File productConfFile = new File(productConf);<NEW_LINE... | Manifest manifest = new Manifest(stream); |
1,276,778 | private List<URL> reverseSourceRootsInOrder(CompilationInfo info, URL thisSourceRoot, FileObject thisSourceRootFO, Map<URL, List<URL>> sourceDeps, Map<URL, List<URL>> binaryDeps, Map<URL, List<URL>> rootPeers, boolean interactive) {<NEW_LINE>if (reverseSourceRootsInOrderOverride != null) {<NEW_LINE>return reverseSource... | .keySet(), sourceDeps)); |
466,120 | private static Optional<ClusterStateReason> clusterDownReason(final ClusterState state, final Params params) {<NEW_LINE>final ContentCluster cluster = params.cluster;<NEW_LINE>final long upStorageCount = countAvailableNodesOfType(NodeType.STORAGE, cluster, state);<NEW_LINE>final long upDistributorCount = countAvailable... | Optional.of(ClusterStateReason.TOO_LOW_AVAILABLE_STORAGE_NODE_RATIO); |
1,698,963 | public void apply(final Traversal.Admin<?, ?> traversal) {<NEW_LINE>if (traversal.getEngine().isComputer())<NEW_LINE>return;<NEW_LINE>final Step<?, ?> startStep = traversal.getStartStep();<NEW_LINE>if (startStep instanceof GraphStep) {<NEW_LINE>final GraphStep<?> originalGraphStep = (GraphStep) startStep;<NEW_LINE>if (... | , (Step) titanGraphStep, traversal); |
1,218,395 | private boolean handleStart(PFSProvider pfsElement) {<NEW_LINE>print("GL Handle 'Start' command:", EMsgType.INFO);<NEW_LINE>if (writeUsb(CMD_GLUC)) {<NEW_LINE>print(" [Prefix]", EMsgType.FAIL);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>print(" [Prefix]", EMsgType.PASS);<NEW_LINE>if (writeUsb(CMD_NSPData)) {<NEW_LINE>... | print(" [Command]", EMsgType.PASS); |
81,474 | protected void dropCorruptMarkerFiles(Terminal terminal, Path path, Directory directory, boolean clean) throws IOException {<NEW_LINE>if (clean) {<NEW_LINE>confirm("This shard has been marked as corrupted but no corruption can now be detected.\n" + "This may indicate an intermittent hardware problem. The corruption mar... | ] files = directory.listAll(); |
254,668 | public void paintTrack(Graphics g) {<NEW_LINE>boolean enabled = slider.isEnabled();<NEW_LINE>float tw = UIScale.scale((float) trackWidth);<NEW_LINE>float arc = tw;<NEW_LINE>RoundRectangle2D coloredTrack = null;<NEW_LINE>RoundRectangle2D track;<NEW_LINE>if (slider.getOrientation() == JSlider.HORIZONTAL) {<NEW_LINE>float... | cw, tw, arc, arc); |
626,520 | public List<MetricsConfigBean> fromJson(String payload) {<NEW_LINE>if (StringUtils.isEmpty(payload)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>List<MetricsConfigBean> configs = new ArrayList<>();<NEW_LINE>JsonParser parser = new JsonParser();<NEW_LINE>JsonObject jsonObj = (JsonObject) parser.parse(... | arrayOfUrls = jsonObj.getAsJsonArray("urlMetricsData"); |
1,124,405 | public JSONObject serviceImpl(Query post, HttpServletResponse response, Authorization rights, JSONObjectWithDefault permissions) throws APIException {<NEW_LINE>if (post.isLocalhostAccess() && OS.canExecUnix && post.get("upgrade", "").equals("true")) {<NEW_LINE>// it's a hack to add this here, this may disappear anytime... | client_info.put("request_header", request_header); |
288,572 | public void run() {<NEW_LINE>try {<NEW_LINE>while (true && !Thread.interrupted()) {<NEW_LINE>if (!this.subscribedTopics.isEmpty()) {<NEW_LINE>this.consumerSubscriptionRebalance();<NEW_LINE>}<NEW_LINE>final ConsumerRecords<String, String> records = this.consumer.poll(10000);<NEW_LINE>final Record recordToProcess = null;... | record.topic(), payload); |
902,213 | synchronized void replaceProgress(int id, int progressMax, int progress, boolean indeterminate, String message) {<NEW_LINE>Entry oldEntry = allActiveMessages.get(id);<NEW_LINE>if (oldEntry == null) {<NEW_LINE>Log.w(TAG, "Failed to replace notification, it was not found");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (messag... | .format("handleReplace() skip, no change %s", newEntry)); |
309,827 | final GetBranchResult executeGetBranch(GetBranchRequest getBranchRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getBranchRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | endClientExecution(awsRequestMetrics, request, response); |
1,571,296 | private void initToolWindowListeners() {<NEW_LINE>myProject.getMessageBus().connect().subscribe(RunManagerListener.TOPIC, new RunManagerListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void runConfigurationAdded(@Nonnull RunnerAndConfigurationSettings settings) {<NEW_LINE>updateDashboardIfNeeded(settings);<NEW... | updateDashboardIfNeeded(env.getRunnerAndConfigurationSettings()); |
350,517 | // @see com.biglybt.ui.swt.views.table.TableCellSWTPaintListener#cellPaint(org.eclipse.swt.graphics.GC, com.biglybt.ui.swt.views.table.TableCellSWT)<NEW_LINE>@Override<NEW_LINE>public void cellPaint(GC gcImage, TableCellSWT cell) {<NEW_LINE>int percentDone = getPercentDone(cell);<NEW_LINE>Rectangle bounds = cell.getBou... | Rectangle imgBounds = img1.getBounds(); |
1,813,174 | public CodegenExpression make(CodegenMethodScope parent, CodegenClassScope classScope) {<NEW_LINE>CodegenMethod method = parent.makeChild(QueryPlanIndexItem.EPTYPE, this.getClass(), classScope);<NEW_LINE>EventPropertyGetterSPI[] propertyGetters = EventTypeUtility.getGetters(eventType, hashProps);<NEW_LINE>EPType[] prop... | codegenMultiKeyFromArrayTransform(hashMultiKeyClasses, method, classScope); |
1,841,360 | public void initPermissionColoredColumn(final Table propertyPermissionsTable) {<NEW_LINE>propertyPermissionsTable.addGeneratedColumn("permissionsInfo", new Table.ColumnGenerator<MultiplePermissionTarget>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Component generateCell(MultiplePermissionTarget target) {<NEW_LINE>... | AttributePermissionVariant permissionVariant = attributeTarget.getPermissionVariant(); |
1,267,217 | public List<Map<String, Object>> executeFix() throws DotDataException, DotRuntimeException {<NEW_LINE>Logger.info(FixTask00080DeleteOrphanedContentTypeFields.class, "Beginning DeleteOrphanedContentTypeFields");<NEW_LINE>List<Map<String, Object>> returnValue = new ArrayList<Map<String, Object>>();<NEW_LINE>if (!FixAsset... | debug(FixTask00080DeleteOrphanedContentTypeFields.class, "Ending DeleteOrphanedContentTypeFields"); |
1,670,192 | private void changeRole(PrimaryTerm term) {<NEW_LINE>threadContext.execute(() -> {<NEW_LINE>if (term.term() > currentTerm) {<NEW_LINE>log.debug("Term changed: {}", term);<NEW_LINE>currentTerm = term.term();<NEW_LINE>primary = term.primary() != null ? term.primary().memberId() : null;<NEW_LINE>backups = term.backups(des... | .role = new NoneRole(this); |
1,784,337 | public okhttp3.Call addAPIMonetizationCall(String apiId, APIMonetizationInfoDTO apIMonetizationInfoDTO, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = apIMonetizationInfoDTO;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/{apiId}/monetize".replaceA... | localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.