idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,105,647 | public InvokeDynamicAST visit(int lineNo, String line) throws ASTParseException {<NEW_LINE>try {<NEW_LINE>// Split here:<NEW_LINE>// v v v<NEW_LINE>// INVOKEDYNAMIC name desc handle[...] args[...]<NEW_LINE>String[] trim = line.trim().split("\\s+(?=.*\\[(?=.*\\[))");<NEW_LINE>if (trim.length < 4)<NEW_LINE>throw ne... | args = new ArrayList<>(); |
434,906 | public ListInsightsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListInsightsResult listInsightsResult = new ListInsightsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.get... | String currentParentElement = context.getCurrentParentElement(); |
160,938 | public String extractSignificantQueryParams(final HTTPRequest r) {<NEW_LINE>if (r.getQueryString() == null || r.getQueryString().isEmpty() || this.getConsistentHashQueryParams().isEmpty()) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>final SortedSet<String> qparams = new TreeSet<String>();<NEW_LINE>try {<NEW_LINE>for (fin... | error(err.toString()); |
910,916 | public void listHooksWithOptions() {<NEW_LINE>// BEGIN: com.azure.ai.metricsadvisor.administration.MetricsAdvisorAdministrationAsyncClient.listHooks#ListHookOptions<NEW_LINE>ListHookOptions options = new ListHookOptions().setSkip(100).setMaxPageSize(20);<NEW_LINE>int[] pageCount = new int[1];<NEW_LINE>metricsAdvisorAdm... | "Web Hook Description: %s%n", webHook.getDescription()); |
1,428,451 | public void annotate(@Nonnull final VirtualFile contentRoot, @Nonnull final CoverageSuitesBundle suite, @Nonnull final CoverageDataManager dataManager, @Nonnull final ProjectData data, final Project project, final Annotator annotator) {<NEW_LINE>if (!contentRoot.isValid()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO... | (normalizeFilePath(file), file); |
1,312,236 | public ProductsProposalRowsData load() {<NEW_LINE>List<ProductsProposalRow> rows = loadRows();<NEW_LINE>logger.debug("loaded {} productsProposalRows for priceListVersionIds={}", rows.size(), priceListVersionIds);<NEW_LINE>rows = updateLastShipmentDays(rows);<NEW_LINE>final PriceListVersionId singlePriceListVersionId = ... | ViewHeaderPropertiesBuilder headerProperties = ViewHeaderProperties.builder(); |
480,512 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "create context MyContext start SupportBean_S0 end pattern [SupportBean_S1(id=100) -> SupportBean_S1(id=200)];\n" + "@name('s0') context MyContext select sum(intPrimitive) as thesum from SupportBean;\n";<NEW_LINE>env.compileDeploy(epl).addListener("s0")... | "E4", 40, 30 + 40); |
1,561,274 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0".split(",");<NEW_LINE>SupportEvalBuilder builder = new SupportEvalBuilder("SupportBean_ST0_Container");<NEW_LINE>builder.expression(fields[0], "contained.selectFrom(x => key0).sequenceEqual(contained.selectFrom(y => id))");<NEW_LINE>builder.sta... | ).expect(fields, true); |
1,194,759 | public JsonAttributeSetInstance extractJsonAttributeSetInstance(@NonNull final ImmutableAttributeSet attributeSet, @NonNull final OrgId orgId) {<NEW_LINE>final IOrgDAO orgDAO = Services.get(IOrgDAO.class);<NEW_LINE>final JsonAttributeSetInstance.JsonAttributeSetInstanceBuilder jsonAttributeSetInstance = JsonAttributeSe... | attributeValueType = attributeSet.getAttributeValueType(attributeId); |
1,044,600 | public void addAccess(String typename, String[][] methodsAndConstructors, String[][] fields, boolean silent, TypeAccess... access) {<NEW_LINE>if (!silent) {<NEW_LINE>logger.debug("Registering reflective access to " + typename + ": " + (access == null ? "" : Arrays.asList(access)));<NEW_LINE>}<NEW_LINE>ClassDescriptor c... | [0], false, allowUnsafeAccess); |
291,015 | private void saveSettings() {<NEW_LINE>try {<NEW_LINE>DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();<NEW_LINE>DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();<NEW_LINE>Document document = documentBuilder.newDocument();<NEW_LINE>Element settingsElement... | transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "3"); |
1,596,411 | public static String toXML(PortletPreferencesImpl prefs) throws SystemException {<NEW_LINE>try {<NEW_LINE>Map preferences = prefs.getPreferences();<NEW_LINE>DocumentFactory docFactory = DocumentFactory.getInstance();<NEW_LINE>Element portletPreferences = docFactory.createElement("portlet-preferences");<NEW_LINE>Iterato... | ] values = preference.getValues(); |
85,948 | public static void scanSeqNosInReader(DirectoryReader directoryReader, long fromSeqNo, long toSeqNo, LongConsumer onNewSeqNo) throws IOException {<NEW_LINE>final DirectoryReader reader = Lucene.wrapAllDocsLive(directoryReader);<NEW_LINE>final IndexSearcher searcher = new IndexSearcher(reader);<NEW_LINE>searcher.setQuer... | throw new IllegalStateException("seq_no doc_values not found for doc_id=" + docId); |
1,049,737 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>PREF_ID = getString(R.string.pref_theme);<NEW_LINE>PREF_ID_NO_ACTION_BAR = getString(R.string.pref_theme_no_action_bar);<NEW_LINE>sharedPref = this.getSharedPreferences(getString(R.string.pref_file_key), Context.M... | findViewById(R.id.radioButton1); |
1,067,632 | public AssociateSubnetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AssociateSubnetsResult associateSubnetsResult = new AssociateSubnetsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | )).unmarshall(context)); |
1,296,983 | private static FederalStateData buildFederalStateData(int federalStateCode, LocalStatisticsJsonStringObject localStatisticsJsonStringObject) {<NEW_LINE>if (hasSevenDayHospitalizationStatistics(localStatisticsJsonStringObject)) {<NEW_LINE>return FederalStateData.newBuilder().setFederalState(FederalState.forNumber(getFed... | )))).build(); |
951,767 | public void trimToSize(int maxSize) {<NEW_LINE>while (true) {<NEW_LINE>K key;<NEW_LINE>V value;<NEW_LINE>synchronized (this) {<NEW_LINE>if (size < 0 || (map.isEmpty() && size != 0)) {<NEW_LINE>throw new IllegalStateException(getClass().getName() + ".sizeOf() is reporting inconsistent results!");<NEW_LINE>}<NEW_LINE>if ... | .iterator().next(); |
718,025 | public void paint(Graphics g2, JComponent c) {<NEW_LINE>final Graphics2D g = (Graphics2D) g2;<NEW_LINE>final GraphicsConfig config = new GraphicsConfig(g);<NEW_LINE>final Color bg = c.getBackground();<NEW_LINE>g.setPaint(bg);<NEW_LINE>TableColumnModel model = ((JTableHeader) c).getColumnModel();<NEW_LINE>final int h = ... | 1, w, h - 1); |
1,212,663 | public synchronized // sf@2005)<NEW_LINE>void // sf@2005)<NEW_LINE>writeSetPixelFormat(// sf@2005)<NEW_LINE>int bitsPerPixel, // sf@2005)<NEW_LINE>int depth, // sf@2005)<NEW_LINE>boolean bigEndian, // sf@2005)<NEW_LINE>boolean trueColour, // sf@2005)<NEW_LINE>int redMax, // sf@2005)<NEW_LINE>int greenMax, // sf@2005)<N... | greenMax >> 8) & 0xff); |
1,180,385 | public Scenario toScenario(String dynamicExpression, int exampleIndex, int updateLine, List<Tag> tagsForExamples) {<NEW_LINE>Scenario s = new <MASK><NEW_LINE>s.setName(name);<NEW_LINE>s.setDescription(description);<NEW_LINE>s.setLine(updateLine);<NEW_LINE>s.setDynamicExpression(dynamicExpression);<NEW_LINE>if (tags != ... | Scenario(feature, section, exampleIndex); |
313,845 | private static // ---- Setting : used when a node is used to make a NodeValue<NEW_LINE>NodeValue nodeToNodeValue(Node node) {<NEW_LINE>if (node.isVariable())<NEW_LINE>Log.<MASK><NEW_LINE>if (!node.isLiteral())<NEW_LINE>// Not a literal - no value to extract<NEW_LINE>return new NodeValueNode(node);<NEW_LINE>boolean hasL... | warn(NodeValue.class, "Variable passed to NodeValue.nodeToNodeValue"); |
264,831 | private void energyCheck(int i) throws ContradictionException {<NEW_LINE>int xm = vars[i].getLB();<NEW_LINE>int xM = vars[i].getUB() + vars[i + 2 * n].getUB();<NEW_LINE>int ym = vars[i + n].getLB();<NEW_LINE>int yM = vars[i + n].getUB() + vars[i + 3 * n].getUB();<NEW_LINE>int am = vars[i + 2 * n].getLB() * vars[i + 3 *... | + n].getLB()); |
1,652,324 | public Builder mergeFrom(edu.stanford.nlp.loglinear.model.proto.ConcatVectorTableProto.ConcatVectorTable other) {<NEW_LINE>if (other == edu.stanford.nlp.loglinear.model.proto.ConcatVectorTableProto.ConcatVectorTable.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (!other.dimensionSize_.isEmpty()) {<NEW_LINE>if ... | .alwaysUseFieldBuilders ? getFactorTableFieldBuilder() : null; |
1,318,659 | public void execute(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {<NEW_LINE>ScriptingEngines scriptingEngines = CommandContextUtil.getCmmnEngineConfiguration().getScriptingEngines();<NEW_LINE>if (scriptingEngines == null) {<NEW_LINE>throw new FlowableException("Could not execute script ... | String resultVariableName = scriptTask.getResultVariableName(); |
1,542,683 | public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {<NEW_LINE>this.context = context;<NEW_LINE>this.logger = logger;<NEW_LINE>TypeOracle oracle = context.getTypeOracle();<NEW_LINE>JClassType toGenerate = oracle.findType(typeName).isInterface();<NEW_LINE... | factory.createSourceWriter(context, pw); |
1,720,765 | public void launchIntentSenderForResult(IntentSender intent, final int code, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options, final TiActivityResultHandler resultHandler) {<NEW_LINE>TiActivityResultHandler wrapper = new TiActivityResultHandler() {<NEW_LINE><NEW_LINE>public void onErr... | activity, requestCode, resultCode, data); |
1,502,405 | public boolean upgradeVmDb(final long vmId, final ServiceOffering newServiceOffering, ServiceOffering currentServiceOffering) {<NEW_LINE>final VMInstanceVO vmForUpdate = _vmDao.findById(vmId);<NEW_LINE>vmForUpdate.setServiceOfferingId(newServiceOffering.getId());<NEW_LINE>final ServiceOffering newSvcOff = _entityMgr.fi... | _vmDao.update(vmId, vmForUpdate); |
728,695 | public static I_C_Order extend(@NonNull final I_C_Order existentOrder) {<NEW_LINE>if (I_C_Order.CONTRACTSTATUS_Extended.equals(existentOrder.getContractStatus())) {<NEW_LINE>throw new AdempiereException(Services.get(IMsgBL.class).getTranslatableMsgText(MSG_EXTEND_CONTRACT_ALREADY_PROLONGED));<NEW_LINE>} else {<NEW_LINE... | .class).retrieveLastFlatrateTermFromOrder(existentOrder); |
1,271,218 | public static void main(String[] args) {<NEW_LINE><MASK><NEW_LINE>insereArvore(Arvore, 56);<NEW_LINE>insereArvore(Arvore, 67);<NEW_LINE>insereArvore(Arvore, 24);<NEW_LINE>insereArvore(Arvore, 61);<NEW_LINE>insereArvore(Arvore, 52);<NEW_LINE>System.out.print("Pre : ");<NEW_LINE>preOrdem(Arvore);<NEW_LINE>System.out.prin... | No Arvore = new No(45); |
1,833,046 | public static void printInorder(Node root) {<NEW_LINE>if (root == null) {<NEW_LINE>// if tree is empty<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// to point to the current node during traversal<NEW_LINE>Node curr = root;<NEW_LINE>// to point to the previous node encountered during traversal<NEW_LINE>Node prev;<NEW_LINE>whil... | print(curr.data + " "); |
561,309 | protected GangliaReporter createInstance() throws Exception {<NEW_LINE>final GangliaReporter.Builder reporter = GangliaReporter.forRegistry(getMetricRegistry());<NEW_LINE>if (hasProperty(DURATION_UNIT)) {<NEW_LINE>reporter.convertDurationsTo(getProperty(DURATION_UNIT, TimeUnit.class));<NEW_LINE>}<NEW_LINE>if (hasProper... | (TMAX, Integer.TYPE)); |
998,288 | private void precomputeAnnotations() {<NEW_LINE>isSensitive = hasAnnotation(Sensitive.class) || hasPrefixWithAnnotation(<MASK><NEW_LINE>isDeprecated = hasAnnotation(Deprecated.class) || hasPrefixWithAnnotation(getKey(), Deprecated.class);<NEW_LINE>if (hasAnnotation(Deprecated.class)) {<NEW_LINE>Deprecated dep = getAnno... | getKey(), Sensitive.class); |
598,660 | private boolean loadKeyStores() {<NEW_LINE>if (!config.getTlsConfig().isEnabled()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Maintain a local copy of the trust and key managers in case anything goes wrong<NEW_LINE>TrustManagerFactory tmf;<NEW_LINE>KeyManagerFactory kmf;<NEW_LINE>try {<NEW_LINE>String ksLocation =... | ts.load(fileInputStream, tsPwd); |
26,618 | public void onDialogClosed(boolean positiveResult) {<NEW_LINE>if (positiveResult) {<NEW_LINE>int hours;<NEW_LINE>int minutes;<NEW_LINE>if (Build.VERSION.SDK_INT >= 23) {<NEW_LINE>hours = timePicker.getHour();<NEW_LINE>minutes = timePicker.getMinute();<NEW_LINE>} else {<NEW_LINE>hours = timePicker.getCurrentHour();<NEW_... | set(Calendar.HOUR_OF_DAY, hours); |
74,118 | public static StackTraceElement[] fromArray(CompositeData[] stackTraceDataVal) {<NEW_LINE>// Bail out early on null input.<NEW_LINE>if (stackTraceDataVal == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String[] attributeNames = getMethodNames();<NEW_LINE>String[] attributeTypes = getMethodReturnTypeNames();<NEW_LI... | classNameVal, methodNameVal, fileNameVal, lineNumberVal); |
1,504,742 | private ContextMenuAdapter createSwitchProfileOptionsMenu(@NonNull OsmandApplication app, @NonNull ContextMenuAdapter adapter, boolean nightMode) {<NEW_LINE>drawerMode = DRAWER_MODE_NORMAL;<NEW_LINE>createProfilesController(app, adapter, nightMode, true);<NEW_LINE>List<ApplicationMode> activeModes = ApplicationMode.val... | > profilesObjects = routingDataUtils.getRoutingProfiles(); |
158,480 | public static void main(String[] args) throws Exception {<NEW_LINE>if (args.length != 4) {<NEW_LINE>System.err.printf("Expected 4 parameters, got %d\n", args.length);<NEW_LINE>System.err.println("Usage: java MacExample compute/verify key-file input-file mac-file");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>String mo... | handle.getPrimitive(Mac.class); |
522,384 | public SortClusterConfig load() {<NEW_LINE>HttpGet httpGet = null;<NEW_LINE>try {<NEW_LINE>String clusterName = this.context.getString(CommonPropertiesHolder.KEY_CLUSTER_ID);<NEW_LINE>String url = ManagerUrlHandler.getSortClusterConfigUrl() + "?apiVersion=1.0&clusterName=" + clusterName + "&md5=";<NEW_LINE>if (StringUt... | addHeader(HttpHeaders.CONNECTION, "close"); |
1,064,531 | public TransactionReport queryDailyReport(String domain, Date start, Date end) {<NEW_LINE>TransactionReportMerger merger = new TransactionReportMerger(new TransactionReport(domain));<NEW_LINE>long startTime = start.getTime();<NEW_LINE><MASK><NEW_LINE>String name = TransactionAnalyzer.ID;<NEW_LINE>for (; startTime < end... | long endTime = end.getTime(); |
263,233 | public void createBindings() {<NEW_LINE>LengthConverter lengthConverter = new LengthConverter();<NEW_LINE>MutableLocationProxy homingFiducialLocation = new MutableLocationProxy();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, head, "homingFiducialLocation", homingFiducialLocation, "location");<NEW_LINE>addWrappedBinding(hom... | head, "zProbeActuatorName", comboBoxZProbeActuator, "selectedItem"); |
751,501 | final PutPipelineDefinitionResult executePutPipelineDefinition(PutPipelineDefinitionRequest putPipelineDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putPipelineDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
797,721 | public void open(FunctionContext context) {<NEW_LINE>monitor = KmonCreatorForBlink.getMonitor(context, this.getClass().getSimpleName());<NEW_LINE>if (monitor != null) {<NEW_LINE>monitor.registerGauge(Constant.LOG_EXTRACT_SINGLE_DOC_SIZE);<NEW_LINE>monitor.registerGauge(Constant.LOG_EXTRACT_LATENCY);<NEW_LINE>monitor.re... | getClass().getSimpleName()); |
810,571 | private MethodSpec generateRequestOptionOverride(TypeName typeToOverrideIn, ExecutableElement methodToOverride) {<NEW_LINE>MethodSpec.Builder result = processorUtil.overriding(methodToOverride).returns(typeToOverrideIn);<NEW_LINE>result.addCode(CodeBlock.builder().add("return ($T) super.$N(", typeToOverrideIn, methodTo... | (AnnotationSpec.get(mirror)); |
1,656,370 | public void search2(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>request = wrapRequest(request);<NEW_LINE>Player player = playerService.getPlayer(request, response);<NEW_LINE>String username = securityService.getCurrentUsername(request);<NEW_LINE>Integer musicFolderId = getIntPa... | criteria, musicFolders, IndexType.ALBUM); |
341,661 | public static Class<?> loadClass(final Class<?> theClass, final String fullQualifiedName) {<NEW_LINE>SecurityManager sm = System.getSecurityManager();<NEW_LINE>if (fullQualifiedName == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (sm != null) {<NEW_LINE>sm.checkPackageDefinition(extractPackageNameFromClassName(... | .currentThread().getContextClassLoader(); |
1,076,554 | private void doRunCreatePOandProductionOrder(Map<Integer, MiniMRPProduct> miniMrpProducts) {<NEW_LINE>MRequisition requisition = null;<NEW_LINE>// Calculate Required and production QTY<NEW_LINE>runProcessCalculatePlannedQty(miniMrpProducts);<NEW_LINE>// Create Requisition Order with Lines<NEW_LINE>for (Integer productI... | (date.getTime())); |
453,680 | private // TODO: make this a method of SikuliDocument, no need to pass document as argument<NEW_LINE>void changeIndentation(DefaultStyledDocument doc, int linenum, int columns) throws BadLocationException {<NEW_LINE>PreferencesUser pref = PreferencesUser.get();<NEW_LINE>boolean expandTab = pref.getExpandTab();<NEW_LINE... | int tabWidth = pref.getTabWidth(); |
1,224,889 | /*<NEW_LINE>*<NEW_LINE>*/<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>private Object invokeFunctionAndEnrichResultIfNecessary(Object value) {<NEW_LINE>AtomicReference<Message<?>> firstInputMessage = new AtomicReference<>();<NEW_LINE>Object inputValue;<NEW_LINE>if (value instanceof Flux) {<NEW_LINE>inputValue = ((F... | ((Publisher) result, firstInputMessage); |
1,743,118 | final PutScalingPolicyResult executePutScalingPolicy(PutScalingPolicyRequest putScalingPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putScalingPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
698,447 | public Void run(EntityMappingsMetadata metadata) {<NEW_LINE>TypeElement javaClass = ctx.getJavaClass();<NEW_LINE>Object modelElement = ctx.getModelElement();<NEW_LINE>do {<NEW_LINE>if (JPAHelper.isAnyMemberAnnotatedAsIdOrEmbeddedId(modelElement)) {<NEW_LINE>haveId[0] = true;<NEW_LINE>// OK<NEW_LINE>return null;<NEW_LIN... | ModelUtils.getEntity(metadata, javaClass); |
947,829 | protected String doIt() throws Exception {<NEW_LINE>List<Object> <MASK><NEW_LINE>StringBuffer whereClause = new StringBuffer(I_HR_LeaveType.COLUMNNAME_IsLeaveRepeated).append(" = ").append(" ?");<NEW_LINE>parameters.add(true);<NEW_LINE>if (getLeaveTypeId() > 0) {<NEW_LINE>parameters.add(getLeaveTypeId());<NEW_LINE>wher... | parameters = new ArrayList<>(); |
39,234 | protected String createQueryString() {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (String key : this.parameters.keySet()) {<NEW_LINE>if (sb.length() > 0) {<NEW_LINE>sb.append("&");<NEW_LINE>}<NEW_LINE>Object value = this.parameters.get(key);<NEW_LINE>if (value != null) {<NEW_LINE>if (value instanceof... | key).toString())); |
1,261,413 | // search related extensions<NEW_LINE>private void buildSearchIndex() {<NEW_LINE>synchronized (searchIndex) {<NEW_LINE>if (searchIndex.size() > 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final ArrayList<BasePreferenceFragment> fragments = new ArrayList<>();<NEW_LINE>fragments.add(new PreferenceServicesFragmen... | (R.drawable.settings_arrow)); |
450,514 | private I_M_Movement createMovementHeader() {<NEW_LINE>final I_M_Movement movement = InterfaceWrapperHelper.newInstance(I_M_Movement.class);<NEW_LINE>movement.setDocStatus(IDocument.STATUS_Drafted);<NEW_LINE>movement.setDocAction(IDocument.ACTION_Complete);<NEW_LINE>//<NEW_LINE>// Org and Document Type<NEW_LINE>final C... | (request.getShipperId())); |
954,243 | public String importConfiguratorCreators(InputStream xmlInputStream, String configFilePath) throws IOException {<NEW_LINE>InputStream inputStream = this.getClass().getResourceAsStream(configFilePath);<NEW_LINE>File configFile = File.createTempFile("config", ".xml");<NEW_LINE>FileOutputStream fout = new FileOutputStream... | = new File(tempDir, "configurator-creator.xml"); |
448,533 | public int fstat(Emulator<?> emulator, StatStructure stat) {<NEW_LINE>int blockSize = emulator.getPageAlign();<NEW_LINE>int st_mode;<NEW_LINE>if (IO.STDOUT.equals(file.getName())) {<NEW_LINE>st_mode = IO.S_IFCHR | 0x777;<NEW_LINE>} else if (Files.isSymbolicLink(file.toPath())) {<NEW_LINE>st_mode = IO.S_IFLNK;<NEW_LINE>... | + blockSize - 1) / blockSize); |
542,667 | private void createAndConfigureFramework() throws IOException {<NEW_LINE>Properties config = new Properties();<NEW_LINE>// allow multiple bundles w/ the same symbolic name -- location can distinguish<NEW_LINE>config.setProperty(Constants.FRAMEWORK_BSNVERSION, Constants.FRAMEWORK_BSNVERSION_MULTIPLE);<NEW_LINE>// use th... | put(FelixConstants.LOG_LEVEL_PROP, "1"); |
500,156 | public static LevelZeroCommandQueue createCommandQueue(LevelZeroDevice device, LevelZeroContext context) {<NEW_LINE>// A) Get the number of command queue groups<NEW_LINE>int[] numQueueGroups = new int[1];<NEW_LINE>int result = device.zeDeviceGetCommandQueueGroupProperties(device.getDeviceHandlerPtr(), numQueueGroups, n... | getDeviceProperties().getName()); |
143,718 | private void match(String token) {<NEW_LINE>String str = curStr.toString();<NEW_LINE>int index = str.indexOf(token);<NEW_LINE>if (index == -1) {<NEW_LINE>index = str.indexOf(token.toLowerCase());<NEW_LINE>}<NEW_LINE>if (index == -1) {<NEW_LINE>this.isMatch = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>str = str.substri... | iphosts.size() - 1); |
93,619 | protected JComponent showWindowThisTab(Window window, String caption, String description) {<NEW_LINE>getDialogParams().reset();<NEW_LINE>window.setWidth("100%");<NEW_LINE>window.setHeight("100%");<NEW_LINE>JComponent layout;<NEW_LINE>if (isMainWindowManager) {<NEW_LINE>layout = <MASK><NEW_LINE>} else {<NEW_LINE>layout ... | (JComponent) tabsPane.getSelectedComponent(); |
777,960 | protected Image platformImageBytesToImage(byte[] bytes, long format) throws IOException {<NEW_LINE>String mimeType = null;<NEW_LINE>if (format == PNG_ATOM.getAtom()) {<NEW_LINE>mimeType = "image/png";<NEW_LINE>} else if (format == JFIF_ATOM.getAtom()) {<NEW_LINE>mimeType = "image/jpeg";<NEW_LINE>} else {<NEW_LINE>// Ch... | + "/" + df.getSubType(); |
923,114 | public com.amazonaws.services.codepipeline.model.PipelineNameInUseException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.codepipeline.model.PipelineNameInUseException pipelineNameInUseException = new com.amazonaws.services.codepipeline.model.PipelineNameInUse... | String currentParentElement = context.getCurrentParentElement(); |
505,307 | private void checkConsumedAndProducedValues(Instruction ins, ValueNumber[] consumedValueList, ValueNumber[] producedValueList) {<NEW_LINE>int numConsumed = ins.consumeStack(getCPG());<NEW_LINE>int numProduced = ins.produceStack(getCPG());<NEW_LINE>if (numConsumed == Constants.UNPREDICTABLE) {<NEW_LINE>throw new Invalid... | numConsumed + ", got " + consumedValueList.length); |
1,497,374 | private void validateFeature(FeatureBuilder builder, TestSuite suite) {<NEW_LINE>checkValue(suite, builder, SUBSYSTEM_MANIFEST_VERSION, "1");<NEW_LINE>checkValue(suite, builder, IBM_FEATURE_VERSION, "2");<NEW_LINE>checkValue(suite, builder, SUBSYSTEM_TYPE, OSGI_SUBSYSTEM_FEATURE);<NEW_LINE>checkSet(suite, builder, SUBS... | setFailure(IBM_APP_FORCE_RESTART + " was not set correctly. Should contain install or uninstall, Found: " + val); |
1,017,809 | public void onClick(View view) {<NEW_LINE>try {<NEW_LINE>if (isSet2) {<NEW_LINE>buttonControlMain3.setBackgroundColor(Color.parseColor("#c72c2c"));<NEW_LINE>isSet2 = false;<NEW_LINE>}<NEW_LINE>Double data1 = Double.parseDouble(editTextControlMain.getText().toString());<NEW_LINE>Double dataIncrement = data1 + 0.0025;<NE... | (0, DataFormatter.MEDIUM_PRECISION_FORMAT)); |
1,092,156 | public InsightRuleContributor unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>InsightRuleContributor insightRuleContributor = new InsightRuleContributor();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument... | XMLEvent xmlEvent = context.nextEvent(); |
172,687 | protected AggregatorFactory doBuild(QueryShardContext queryShardContext, AggregatorFactory parent, Builder subFactoriesBuilder) throws IOException {<NEW_LINE>if (findNestedAggregatorFactory(parent) == null) {<NEW_LINE>throw new IllegalArgumentException("Reverse nested aggregation [" + name + "] can only be used inside ... | queryShardContext, parent, subFactoriesBuilder, metadata); |
1,206,090 | final DescribeLoadBasedAutoScalingResult executeDescribeLoadBasedAutoScaling(DescribeLoadBasedAutoScalingRequest describeLoadBasedAutoScalingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeLoadBasedAutoScalingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,141,973 | private <T> CommandResult<T> tryConsumeLocally(RemoteCommand<T> command) {<NEW_LINE>long currentTimeNanos = timeMeter.currentTimeNanos();<NEW_LINE>if (isNeedToExecuteRemoteImmediately(command, currentTimeNanos)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>long predictedConsumptionSinceLastSync = sampling.predictedConsu... | BucketEntryWrapper(state.copy()); |
846,035 | private Point fixupDisplayBounds(Point tipSize, Point location) {<NEW_LINE>Rectangle bounds;<NEW_LINE>Point rightBounds = new Point(tipSize.x + location.x, tipSize.y + location.y);<NEW_LINE>bounds = shell.getDisplay()<MASK><NEW_LINE>if (!(bounds.contains(location) && bounds.contains(rightBounds))) {<NEW_LINE>if (rightB... | .getPrimaryMonitor().getBounds(); |
818,054 | public static synchronized void flush() {<NEW_LINE>JooqLogger delegate = JooqLogger.getLogger(BufferedLog.class);<NEW_LINE>if (!messages.isEmpty()) {<NEW_LINE>delegate.warn("Buffered warning and error messages:");<NEW_LINE>delegate.warn("------------------------------------");<NEW_LINE>}<NEW_LINE>for (Message m : messa... | m.details, m.throwable); |
891,128 | public FlutterCommand flutterRun(@NotNull PubRoot root, @NotNull VirtualFile main, @NotNull FlutterDevice device, @NotNull RunMode mode, @NotNull FlutterLaunchMode flutterLaunchMode, @NotNull Project project, String... additionalArgs) {<NEW_LINE>final List<String> args = new ArrayList<>();<NEW_LINE>args.add("--machine"... | new String[] {})); |
1,848,170 | public void draw(Graphics2D graphics) {<NEW_LINE>if (!frequencies.isEmpty()) {<NEW_LINE>List<SensoryDissonanceResult> results = sdc.calculate(frequencies, amplitudes);<NEW_LINE>int prevFreqInCents = 0;<NEW_LINE>int prevMagnitude = 0;<NEW_LINE>double maxDissonance = 0;<NEW_LINE>for (SensoryDissonanceResult result : resu... | get(i).getdifferenceInCents(); |
1,559,680 | private void bindValues(SQLiteStatement stmt, JobHolder jobHolder) {<NEW_LINE>if (jobHolder.getInsertionOrder() != null) {<NEW_LINE>stmt.bindLong(DbOpenHelper.INSERTION_ORDER_COLUMN.columnIndex + 1, jobHolder.getInsertionOrder());<NEW_LINE>}<NEW_LINE>stmt.bindString(DbOpenHelper.ID_COLUMN.columnIndex + 1, jobHolder.get... | 1, jobHolder.getPriority()); |
1,666,616 | private I_C_Order createPurchaseOrder(@NonNull final I_C_BPartner vendor, @NonNull final I_C_Order salesOrder) {<NEW_LINE>final I_C_Order purchaseOrder = InterfaceWrapperHelper.newInstance(I_C_Order.class, context);<NEW_LINE>// services<NEW_LINE>final IOrderBL orderBL = Services.get(IOrderBL.class);<NEW_LINE>final IOrg... | (Env.getAD_User_ID(ctx)); |
1,085,493 | public void run() {<NEW_LINE>userActionsLog.trace("Menu item {} triggered", item.getId());<NEW_LINE>StopWatch sw = createStopWatch(item);<NEW_LINE>Class<?> <MASK><NEW_LINE>if (clazz == null) {<NEW_LINE>throw new IllegalStateException(String.format("Can't load class: %s", runnableClass));<NEW_LINE>}<NEW_LINE>if (!Runnab... | clazz = scripting.loadClass(runnableClass); |
284,780 | public void modifyTestElement(TestElement s) {<NEW_LINE>SubscriberSampler sampler = (SubscriberSampler) s;<NEW_LINE>super.configureTestElement(sampler);<NEW_LINE>sampler.setUseJNDIProperties(String.valueOf(useProperties.isSelected()));<NEW_LINE>sampler.setJNDIIntialContextFactory(jndiICF.getText());<NEW_LINE>sampler.se... | setPauseBetweenErrors(jmsErrorPauseBetween.getText()); |
1,051,797 | final CreateDimensionResult executeCreateDimension(CreateDimensionRequest createDimensionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDimensionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | (super.beforeMarshalling(createDimensionRequest)); |
1,474,397 | // parse the query<NEW_LINE>private Map<String, String[]> parseQuery(String qs) {<NEW_LINE>Map<String, String[]> ret = new TreeMap<String, String[]>();<NEW_LINE>try {<NEW_LINE>String[] pairs = qs.split("&");<NEW_LINE>for (String pair : pairs) {<NEW_LINE>String name;<NEW_LINE>String value;<NEW_LINE>int pos = pair.indexO... | .length()), "UTF-8"); |
1,619,140 | public OResultSet executeSimple(OCommandContext ctx) {<NEW_LINE>OInternalResultSet result = new OInternalResultSet();<NEW_LINE>String operation = this.operation.getStringValue();<NEW_LINE>Object key = this.key.execute(new OResultInternal(), ctx);<NEW_LINE>if (key == null) {<NEW_LINE>key = this.key.getDefaultAlias();<NE... | OEnterpriseEndpoint ee = db.getEnterpriseEndpoint(); |
575,307 | public static void clearSelectionCache(TileMap tileMap) {<NEW_LINE>if (tileMap.isSelectionInverted()) {<NEW_LINE>SelectionData selection = new SelectionData(tileMap.getMarkedChunks(), tileMap.isSelectionInverted());<NEW_LINE>File[] cacheDirs = Config.getCacheDirs();<NEW_LINE>for (File cacheDir : cacheDirs) {<NEW_LINE>F... | Point2i(entry.getLongKey()); |
439,747 | public final void validate(MappingLookup mappers) {<NEW_LINE>if (this.copyTo() != null && this.copyTo().copyToFields().isEmpty() == false) {<NEW_LINE>if (mappers.isMultiField(this.name())) {<NEW_LINE>throw new IllegalArgumentException("[copy_to] may not be used to copy from a multi-field: [" + this.name() + "]");<NEW_L... | targetScope = mappers.getNestedScope(copyTo); |
1,006,893 | public LocalWindowsNativeProcessPtySession session(String[] args, Map<String, String> env) throws IOException {<NEW_LINE>STARTUPINFOEX si = prepareStartupInfo();<NEW_LINE>PROCESS_INFORMATION pi = new PROCESS_INFORMATION();<NEW_LINE>if (!ConsoleApiNative.INSTANCE.CreateProcessW(null, /*lpApplicationName*/<NEW_LINE>new W... | Kernel32.INSTANCE.GetLastError()); |
1,112,588 | public final void restMethodInvocationArgument() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST restMethodInvocationArgument_AST = null;<NEW_LINE>AST tmp271_AST = null;<NEW_LINE>tmp271_AST = astFactory.create(LT(1));<NEW_LINE><MAS... | astFactory.addASTChild(currentAST, tmp271_AST); |
265,998 | public Map<Long, List<String>> findDuplicates(Object doc) {<NEW_LINE>// duplicate validation<NEW_LINE>// the check on duplicates must be provided on raw data without apply the default label or auto generate the id<NEW_LINE>AtomicLong index = new AtomicLong(-1);<NEW_LINE>return getDocumentCollection(doc).stream().flatMa... | getValue().get(0); |
1,653,073 | protected Predicate<byte[]> intersects() {<NEW_LINE>final ShapeField.DecodedTriangle scratchTriangle = new ShapeField.DecodedTriangle();<NEW_LINE>return triangle -> {<NEW_LINE>ShapeField.decodeTriangle(triangle, scratchTriangle);<NEW_LINE>switch(scratchTriangle.type) {<NEW_LINE>case POINT:<NEW_LINE>{<NEW_LINE>double al... | GeoEncodingUtils.decodeLongitude(scratchTriangle.aX); |
1,564,014 | protected void updateCheckBoxes(OperationPermissionTarget item) {<NEW_LINE>itemChanging = true;<NEW_LINE>if (isSingleSelection()) {<NEW_LINE>if (item != null) {<NEW_LINE>for (EntityOperationControl control : operationControls) {<NEW_LINE>updateCheckBoxes(item.getValue(control.getMetaProperty()), control.getAllowChecker... | ), control.getDenyChecker()); |
710,896 | final DeleteTableResult executeDeleteTable(DeleteTableRequest deleteTableRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteTableRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTable"); |
843,903 | public final void update(@NotNull AnActionEvent e) {<NEW_LINE>if (app.getVMServiceManager() != null) {<NEW_LINE>app.getVMServiceManager().getServiceExtensionState(extensionDescription.getExtension()).listen((state) -> {<NEW_LINE>selectedPlatform = PlatformTarget.parseValue((String) state.getValue());<NEW_LINE>}, true);... | setDescription(extensionDescription.getDescription()); |
1,337,357 | protected void readElementsFromXml(EwsServiceXmlReader reader) throws Exception {<NEW_LINE>reader.readStartElement(XmlNamespace.Messages, XmlElementNames.RootFolder);<NEW_LINE>int totalItemsInView = reader.readAttributeValue(Integer.class, XmlAttributeNames.TotalItemsInView);<NEW_LINE>boolean moreItemsAvailable = !read... | XmlNamespace.Types, XmlElementNames.Groups); |
657,319 | private void mergeBrowse(MBrowse browse, MBrowseCustom customBrowse) {<NEW_LINE>// Name<NEW_LINE>if (!Util.isEmpty(customBrowse.getName())) {<NEW_LINE>browse.setName(customBrowse.getName());<NEW_LINE>}<NEW_LINE>// Description<NEW_LINE>if (!Util.isEmpty(customBrowse.getDescription())) {<NEW_LINE>browse.setDescription(cu... | get_Translation(I_AD_Browse.COLUMNNAME_Help, language); |
1,402,672 | final ListSupportedPhoneNumberCountriesResult executeListSupportedPhoneNumberCountries(ListSupportedPhoneNumberCountriesRequest listSupportedPhoneNumberCountriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSupportedPhoneNumberCountriesRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
663,538 | public io.kubernetes.client.proto.V1.EnvVarSource buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1.EnvVarSource result = new io.kubernetes.client.proto.V1.EnvVarSource(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<... | .fieldRef_ = fieldRefBuilder_.build(); |
1,369,742 | public void write(final JsonWriter writer, @Nullable final T instance) {<NEW_LINE>if (instance == null) {<NEW_LINE>writer.writeNull();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Class<?> current = instance.getClass();<NEW_LINE>for (FormatDescription<T> od : descriptions) {<NEW_LINE>if (current != od.manifest)<NEW_LINE>... | writer.writeByte(JsonWriter.ARRAY_END); |
627,271 | private SatelliteVisualizationViewer<AttributedVertex, AttributedEdge> createSatelliteViewer(VisualizationViewer<AttributedVertex, AttributedEdge> parentViewer) {<NEW_LINE>Dimension viewerSize = parentViewer.getSize();<NEW_LINE>Dimension satelliteSize = new Dimension(viewerSize.width / 4, viewerSize.height / 4);<NEW_LI... | ().test(v)); |
659,440 | private static String toStringInternal(Timestamp timestamp) {<NEW_LINE>int year = timestamp.getYear() + 1900;<NEW_LINE>int month = timestamp.getMonth() + 1;<NEW_LINE>int day = timestamp.getDate();<NEW_LINE>int hour = timestamp.getHours();<NEW_LINE>int minute = timestamp.getMinutes();<NEW_LINE>int second = timestamp.get... | .length())) + nanosString; |
387,630 | // TODO: Remove on Vespa 8<NEW_LINE>@SuppressWarnings("removal")<NEW_LINE>private CreateVisitorMessage createMessage(VisitorIterator.BucketProgress bucket) {<NEW_LINE>CreateVisitorMessage msg = new CreateVisitorMessage(params.getVisitorLibrary(), getNextVisitorId(), receiver.getConnectionSpec(), dataDestination);<NEW_L... | setDocumentSelection(params.getDocumentSelection()); |
179,943 | public void arrange(@Nonnull PsiFile file, @Nonnull Collection<TextRange> ranges, @Nullable final ArrangementCallback callback) {<NEW_LINE>myCodeChanged = false;<NEW_LINE>final Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file);<NEW_LINE>if (document == null) {<NEW_LINE>return;<NEW_... | final Context<? extends ArrangementEntry> context; |
233,541 | public static boolean evaluateLogic(Evaluatee source, String logic) {<NEW_LINE>// Conditional<NEW_LINE>StringTokenizer st = new StringTokenizer(logic.trim(), "&|", true);<NEW_LINE><MASK><NEW_LINE>if (// only uneven arguments<NEW_LINE>((it / 2) - ((it + 1) / 2)) == 0) {<NEW_LINE>s_log.severe("Logic does not comply with ... | int it = st.countTokens(); |
111,967 | public FieldNode visitEnumConstant(final EnumConstantContext ctx) {<NEW_LINE>ClassNode classNode = ctx.getNodeMetaData(CLASS_DECLARATION_CLASS_NODE);<NEW_LINE>Objects.requireNonNull(classNode, "classNode should not be null");<NEW_LINE>InnerClassNode anonymousInnerClassNode = null;<NEW_LINE>if (asBoolean(ctx.anonymousIn... | .arguments(), anonymousInnerClassNode)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.