idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,784,725 | private void execute(String name, BstEntry context) {<NEW_LINE>if (context != null) {<NEW_LINE>if (context.fields.containsKey(name)) {<NEW_LINE>stack.push(context.fields.get(name));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (context.localStrings.containsKey(name)) {<NEW_LINE>stack.push(context.localStrings.get(name));<NE... | .localIntegers.get(name)); |
1,650,586 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | accountName, name, Context.NONE); |
73,655 | private void loadSettings() {<NEW_LINE>// Get the settings preferences<NEW_LINE>SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);<NEW_LINE>mVibrateOn = sp.getBoolean(PREF_VIBRATE_ON, false);<NEW_LINE>mVibrateLen = getPrefInt(sp, PREF_VIBRATE_LEN, getResources().getString(R.string.vibrate_durat... | .bool.enable_autocorrect)) & mShowSuggestions; |
1,594,403 | private int addElement(Instruction inst, List<OperandFieldElement> elements, Object opElem, boolean underline, int opIndex, int subOpIndex, int characterOffset) {<NEW_LINE>if (opElem instanceof VariableOffset) {<NEW_LINE>List<Object> objList = ((VariableOffset) opElem).getObjects();<NEW_LINE>return addElements(inst, el... | return characterOffset + as.length(); |
1,512,361 | public com.amazonaws.services.lambda.model.PolicyLengthExceededException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.lambda.model.PolicyLengthExceededException policyLengthExceededException = new com.amazonaws.services.lambda.model.PolicyLengthExceededExcept... | JsonToken token = context.getCurrentToken(); |
1,794,464 | private File createJson(File singleJson, Map<String, String> shortNameMap, List<File> esas) throws InstallException, RepositoryException {<NEW_LINE>for (File esa : esas) {<NEW_LINE>try {<NEW_LINE>populateFeatureNameFromManifest(esa, shortNameMap);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new InstallException(M... | fileToGroupIdMap.get(esa))); |
1,253,825 | private void checkHelpSetURL(URL hsURL, ClassLoader globalClassLoader, ClassLoader moduleClassLoader, Map<String, URLClassLoader> classLoaderMap, String cnb) {<NEW_LINE>HelpSet hs = null;<NEW_LINE>try {<NEW_LINE>hs = new HelpSet(moduleClassLoader, hsURL);<NEW_LINE>} catch (HelpSetException ex) {<NEW_LINE>throw new Buil... | Map map = hs.getCombinedMap(); |
406,949 | static PropertyValue[] interpretCircleLayerProperties(Object o) {<NEW_LINE>final Map<String, String> data = (Map<String<MASK><NEW_LINE>final List<PropertyValue> properties = new LinkedList();<NEW_LINE>final JsonParser parser = new JsonParser();<NEW_LINE>for (Map.Entry<String, String> entry : data.entrySet()) {<NEW_LINE... | , String>) toMap(o); |
528,691 | public void loadLogger(Set<String> deletedFiles, Set<String> newFiles) {<NEW_LINE>if (!syncLogFile.exists()) {<NEW_LINE>LOGGER.info("log file {} doesn't exist.", syncLogFile.getAbsolutePath());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try (BufferedReader br = new BufferedReader(new FileReader(syncLogFile))) {<NEW_LINE>Stri... | lastLocalFile.getAbsoluteFile(), e); |
224,369 | public void run(RegressionEnvironment env) {<NEW_LINE>String eplNoAnArrayIsString = "create schema Lvl3 (id string);\n" + "create schema Lvl2 (lvl3 Lvl3);\n" + "create schema Lvl1 (lvl2 Lvl2);\n" + "create schema Lvl0 (lvl1 Lvl1, indexNumber int);\n" + "select lvl1.lvl2.lvl3.id[indexNumber] from Lvl0;\n";<NEW_LINE>env.... | + "create schema Lvl2 (lvl3 Lvl3);\n" + "create schema Lvl1 (lvl2 Lvl2);\n" + "create schema Lvl0 (lvl1 Lvl1, indexNumber int);\n" + "select lvl1.lvl2.lvl3[indexNumber] from Lvl0;\n"; |
34,821 | protected int doWork() {<NEW_LINE>final SamReaderFactory samReaderFactory = SamReaderFactory.makeDefault().referenceSequence(REFERENCE_SEQUENCE);<NEW_LINE>try (final SamReader samReader1 = samReaderFactory.open(SAM_FILES.get(0));<NEW_LINE>final SamReader samReader2 = samReaderFactory.open(SAM_FILES.get(1))) {<NEW_LINE>... | System.out.println("SAM files differ."); |
1,840,891 | final DownloadDefaultKeyPairResult executeDownloadDefaultKeyPair(DownloadDefaultKeyPairRequest downloadDefaultKeyPairRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(downloadDefaultKeyPairRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DownloadDefaultKeyPair"); |
1,177,318 | protected void registerInterceptors(final IModelValidationEngine engine) {<NEW_LINE>//<NEW_LINE>// Candidate -> Purchase order<NEW_LINE>engine.addModelValidator(new de.metas.procurement.base.order.interceptor.C_Order());<NEW_LINE>engine.addModelValidator(de.metas.procurement.base.order.interceptor.C_OrderLine.instance)... | model.interceptor.AD_User()); |
785,470 | public String smallestFromLeaf(TreeNode root) {<NEW_LINE>final List<String> paths = new ArrayList<>();<NEW_LINE>Map<Integer, Character> map = new HashMap<>();<NEW_LINE>map.put(0, 'a');<NEW_LINE>map.put(1, 'b');<NEW_LINE>map.put(2, 'c');<NEW_LINE>map.put(3, 'd');<NEW_LINE>map.put(4, 'e');<NEW_LINE>map.put(5, 'f');<NEW_L... | map.put(19, 't'); |
195,051 | public J visitAssignment(J.Assignment assignment, P p) {<NEW_LINE>J.Assignment a = assignment;<NEW_LINE>a = a.withPrefix(visitSpace(a.getPrefix(), Space<MASK><NEW_LINE>a = a.withMarkers(visitMarkers(a.getMarkers(), p));<NEW_LINE>Statement temp = (Statement) visitStatement(a, p);<NEW_LINE>if (!(temp instanceof J.Assignm... | .Location.ASSIGNMENT_PREFIX, p)); |
1,807,721 | // READ CONSTRAINT<NEW_LINE>private static ConstraintDescriptor readConstraintRule(long id, ByteBuffer source) throws MalformedSchemaRuleException {<NEW_LINE>SchemaDescriptor schema;<NEW_LINE>byte constraintRuleType = source.get();<NEW_LINE>String name;<NEW_LINE>switch(constraintRuleType) {<NEW_LINE>case EXISTS_CONSTRA... | nodeKeyConstraintDescriptor = ConstraintDescriptorFactory.nodeKeyForSchema(schema); |
1,770,858 | public static ListCompliancePackTemplatesResponse unmarshall(ListCompliancePackTemplatesResponse listCompliancePackTemplatesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCompliancePackTemplatesResponse.setRequestId(_ctx.stringValue("ListCompliancePackTemplatesResponse.RequestId"));<NEW_LINE>CompliancePackTemplates... | ("ListCompliancePackTemplatesResponse.CompliancePackTemplatesResult.CompliancePackTemplates[" + i + "].CompliancePackTemplateName")); |
761,710 | public void closeNonActiveSessions(Function<Session, Boolean> conditionToRemove) {<NEW_LINE>// Loop through all non active sessions. Safely remove and clean all of<NEW_LINE>// the data for each non active session meeting the condition<NEW_LINE>for (Iterator<Entry<String, Session>> iter = sessionsNotActive.entrySet().it... | log.error("InterruptedException while waiting for non active Session closing lock to be available to clean up non active session session {}", sessionId); |
1,830,654 | private void loadNode227() throws IOException, SAXException {<NEW_LINE>DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_XmlSchema_ServerDiagnosticsSummaryDataType, new QualifiedName(0, "ServerDiagnosticsSummaryDataType"), new LocalizedText("en", "ServerDiagnosticsSummar... | Object o = decoder.readVariantValue(); |
1,691,627 | private void verifyRedirectBindingSignature(String paramKey, KeyLocator keyLocator, String keyId) throws VerificationException {<NEW_LINE>String request = facade.getRequest().getQueryParamValue(paramKey);<NEW_LINE>String algorithm = facade.getRequest().getQueryParamValue(GeneralConstants.SAML_SIG_ALG_REQUEST_KEY);<NEW_... | ).getQueryParamValue(GeneralConstants.SAML_SIGNATURE_REQUEST_KEY); |
1,772,675 | public void manualNetworkTrace() throws Exception {<NEW_LINE>byte[] data = "badgerbadgerbadgerbadgerMUSHROOM!".getBytes();<NEW_LINE>// [START perf_manual_network_trace]<NEW_LINE>HttpMetric metric = FirebasePerformance.getInstance().newHttpMetric("https://www.google.com", FirebasePerformance.HttpMethod.GET);<NEW_LINE>fi... | setHttpResponseCode(conn.getResponseCode()); |
287,510 | private static StyleSpans<Collection<String>> computeHighlighting(String text) {<NEW_LINE>StyleSpansBuilder<Collection<String>> <MASK><NEW_LINE>BreakIterator wb = BreakIterator.getWordInstance();<NEW_LINE>wb.setText(text);<NEW_LINE>int lastIndex = wb.first();<NEW_LINE>int lastKwEnd = 0;<NEW_LINE>while (lastIndex != Bre... | spansBuilder = new StyleSpansBuilder<>(); |
1,238,484 | private void removeBindings() {<NEW_LINE>amountTextField.textProperty().unbindBidirectional(model.amount);<NEW_LINE>volumeTextField.textProperty().unbindBidirectional(model.volume);<NEW_LINE>totalToPayTextField.textProperty().unbind();<NEW_LINE>addressTextField.amountAsCoinProperty().unbind();<NEW_LINE>amountTextField.... | .visibleProperty().unbind(); |
196,985 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player damagedPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));<NEW_LINE>if (controller == null || damagedPlayer == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>... | playFromExile, new RogueAttackedThisTurnCondition(copiedAbility)); |
1,234,371 | protected String doInBackground(Void... params) {<NEW_LINE>if (!NetworkUtils.isOnline(mCtx)) {<NEW_LINE>return "No connection available!";<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>JSONObject j = new JSONObject();<NEW_LINE>try {<NEW_LINE>j.put("username", "username");<NEW_LINE>j.put("password", "pass");<NEW_LINE>j.put("pois",... | name = json.getString("name"); |
1,199,245 | protected void addToTracks(float scaleBottom, QueueCorner found) {<NEW_LINE>// threads will be slower if there aren't enough tracks<NEW_LINE>if (found.size() < minimumTracksConcurrent) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// pre-declare memory for each track<NEW_LINE>List<PyramidKltFeature> workTracks... | super.addToTracks(scaleBottom, found); |
1,374,530 | public static DeleteAlbumsResponse unmarshall(DeleteAlbumsResponse deleteAlbumsResponse, UnmarshallerContext context) {<NEW_LINE>deleteAlbumsResponse.setRequestId(context.stringValue("DeleteAlbumsResponse.RequestId"));<NEW_LINE>deleteAlbumsResponse.setCode(context.stringValue("DeleteAlbumsResponse.Code"));<NEW_LINE>del... | = new ArrayList<Result>(); |
1,417,877 | private void collectOrderedCompanionsToTriggerInterfaceClinit(String anInterface, LinkedHashSet<String> visitedInterfaces, ImmutableList.Builder<String> companionCollector) {<NEW_LINE>if (!visitedInterfaces.add(anInterface)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClassReader bytecode = classpath.readIfKnown(anInterface... | ] parentInterfaces = bytecode.getInterfaces(); |
128,766 | final PublishBatchResult executePublishBatch(PublishBatchRequest publishBatchRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(publishBatchRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,111,563 | public void draw(Canvas canvas) {<NEW_LINE>Logger.D(TAG, "draw+");<NEW_LINE>if (isPortrait()) {<NEW_LINE>boundingRect = new Rect(0, 0, SHORT_SIDE, LONG_SIDE);<NEW_LINE>} else {<NEW_LINE>boundingRect = new Rect(0, 0, LONG_SIDE, SHORT_SIDE);<NEW_LINE>}<NEW_LINE>if (isPowerConnected) {<NEW_LINE>canvas.drawPicture(batPicC,... | canvas.drawPicture(batPic2, boundingRect); |
1,638,192 | public final static int convertToUTF8Bytes(int unicodeScalar, byte[] outputBytes, int offset, int maxLength) {<NEW_LINE>int dst = offset;<NEW_LINE>int end = offset + maxLength;<NEW_LINE>switch(getUTF8ByteCount(unicodeScalar)) {<NEW_LINE>case 1:<NEW_LINE>if (dst >= end)<NEW_LINE>throw new ArrayIndexOutOfBoundsException(... | dst++] = getByte2Of2(unicodeScalar); |
973,852 | private static String[] split(String str, String separator, int max) {<NEW_LINE>StringTokenizer tok;<NEW_LINE>if (separator == null) {<NEW_LINE>tok = new StringTokenizer(str);<NEW_LINE>} else {<NEW_LINE>tok = new StringTokenizer(str, separator);<NEW_LINE>}<NEW_LINE>int listSize = tok.countTokens();<NEW_LINE>if (max > 0... | list[i].length(); |
1,589,513 | private Collection<com.dianping.cat.home.alert.summary.entity.Alert> convertToAlert(List<TopologyEdge> edges, Date date) {<NEW_LINE>Map<String, com.dianping.cat.home.alert.summary.entity.Alert> alerts = new LinkedHashMap<String, com.dianping.cat.home.alert.summary.entity.Alert>();<NEW_LINE>for (TopologyEdge edge : edge... | setContext(edge.getDes()); |
1,112,935 | final ListDomainNamesResult executeListDomainNames(ListDomainNamesRequest listDomainNamesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDomainNamesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
335,739 | public static LongDoubleVector mergeSparseDoubleVector(LongIndexGetParam param, List<PartitionGetResult> partResults) {<NEW_LINE>long dim = PSAgentContext.get().getMatrixMetaManager().getMatrixMeta(param.getMatrixId()).getColNum();<NEW_LINE>LongDoubleVector vector = VFactory.sparseLongKeyDoubleVector(dim, param.size())... | IndexPartGetResult) part).getPartKey(); |
1,757,500 | public Map<String, Object> createAlertgroup(User loginUser, String groupName, String desc, String alertInstanceIds) {<NEW_LINE>Map<String, Object> result = new HashMap<>();<NEW_LINE>// only admin can operate<NEW_LINE>if (isNotAdmin(loginUser, result)) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>AlertGroup alertGroup ... | setCreateUserId(loginUser.getId()); |
784,743 | public static DescribeDomainRealTimeHttpCodeDataResponse unmarshall(DescribeDomainRealTimeHttpCodeDataResponse describeDomainRealTimeHttpCodeDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDomainRealTimeHttpCodeDataResponse.setRequestId<MASK><NEW_LINE>describeDomainRealTimeHttpCodeDataResponse.setDomainName(... | (_ctx.stringValue("DescribeDomainRealTimeHttpCodeDataResponse.RequestId")); |
1,618,714 | private CellDataSet execute(ThinQuery tq, ICellSetFormatter formatter) {<NEW_LINE>try {<NEW_LINE>Long start = (new Date()).getTime();<NEW_LINE>log.debug("Query Start");<NEW_LINE>CellSet cellSet = executeInternalQuery(tq);<NEW_LINE>log.debug("Query End");<NEW_LINE>String runId = "RUN#:" + ID_GENERATOR.get();<NEW_LINE>Lo... | Date()).getTime(); |
1,718,365 | private void train(List<Pair<String, FileFilter>> trainTreebankPath, Pair<String, FileFilter> devTreebankPath, String serializedPath) {<NEW_LINE>log.info("Training method: " + op.trainOptions().trainingMethod);<NEW_LINE>log.debug("Headfinder used to binarize trees: " + getTLPParams().headFinder().getClass());<NEW_LINE>... | transitionIndex = new HashIndex<>(); |
1,083,339 | private void writeWAVHeader(FileChannel fileChannel, int sampleRateHz) throws IOException {<NEW_LINE>ByteBuffer b = _wavHeaderBuffer;<NEW_LINE>b.rewind().limit(b.capacity());<NEW_LINE>b.put("RIFF".getBytes());<NEW_LINE>// Placeholder until all audio is recorded<NEW_LINE>long totalDataLen = 0;<NEW_LINE>b.putInt((int) to... | put("WAVE".getBytes()); |
1,789,388 | public NewDeviceMetadataType unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>NewDeviceMetadataType newDeviceMetadataType = new NewDeviceMetadataType();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | int originalDepth = context.getCurrentDepth(); |
935,551 | private // view's center and scale according to the cropping rectangle.<NEW_LINE>void centerBasedOnHighlightView(HighlightView hv) {<NEW_LINE>Rect drawRect = hv.drawRect;<NEW_LINE><MASK><NEW_LINE>float height = drawRect.height();<NEW_LINE>float thisWidth = getWidth();<NEW_LINE>float thisHeight = getHeight();<NEW_LINE>f... | float width = drawRect.width(); |
1,097,871 | private final static int decode_base64_byte2(int c1, int c2, int c3, int c4) {<NEW_LINE>// convert |= (c2 << 12); [6:1]+12 => [18:13]<NEW_LINE>// convert |= (c3 << 6); [6:1]+6 => [12:7]<NEW_LINE>// b2 = (char)((convert & 0x0000FF00) >> 8); [32:1] & 0x0000FF00 => [16:9] - 8 => [8:1]<NEW_LINE>// [18:13] - 8 -> [10:5]... | , c3, c4) >= 2); |
420,880 | protected void writeColumnDefinition(DdlBuffer buffer, Column column, DdlIdentity identity) {<NEW_LINE>String columnDefn = convert(column.getType());<NEW_LINE>if (identity.useIdentity() && isTrue(column.isPrimaryKey())) {<NEW_LINE>columnDefn = asIdentityColumn(columnDefn, identity);<NEW_LINE>}<NEW_LINE>buffer.append(" ... | (" default ").append(defaultValue); |
529,012 | public void actionPerformed(ActionEvent e) {<NEW_LINE>HintMetadata hint = this.hint;<NEW_LINE>try {<NEW_LINE>if (hint == null) {<NEW_LINE>hint = getSelectedHint();<NEW_LINE>}<NEW_LINE>if (hint == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataObject d = getDataObject(hint);<NEW_LINE>if (d == null) {<NEW_LINE>return;<... | .getInstance().reload(); |
746,889 | private void endElement() {<NEW_LINE>qName = pullParser.getName();<NEW_LINE>this.elementStack.pop();<NEW_LINE>if (ELEMENT_NAME_RULE.equals(qName)) {<NEW_LINE>this.ruleStack.pop();<NEW_LINE>if (this.ruleStack.empty()) {<NEW_LINE>if (isVisible(this.currentRule)) {<NEW_LINE>this.renderTheme.addRule(this.currentRule);<NEW_... | = this.ruleStack.peek(); |
276,744 | public void configureSbaStructure(List<AssociatedTriple> inliersThreeView) {<NEW_LINE>final SceneStructureMetric structure = metricSba.structure;<NEW_LINE>final SceneObservations observations = metricSba.observations;<NEW_LINE>// Even if the cameras are all the same, we will tell that they are different just because th... | 2, 2, true, view1_to_target); |
1,241,132 | protected void performAction(final Node[] activatedNodes) {<NEW_LINE>RequestProcessor.getDefault().post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>final TableNode node = activatedNodes[0].getLookup(<MASK><NEW_LINE>final DatabaseConnection connection = node.getLookup().lookup(Dat... | ).lookup(TableNode.class); |
6,693 | public void endElement(String uri, String localName, String qName) throws SAXException {<NEW_LINE>if (qName.equals("onentry") || qName.equals("onexit")) {<NEW_LINE>isEntryAction = null;<NEW_LINE>} else if (qName.equals("state") || qName.equals("final") || qName.equals("parallel")) {<NEW_LINE>MutableState<T, S, E, C<MAS... | > currentState = currentStates.pop(); |
1,644,323 | public static Object intoFlipper(EditorValue editorValue) {<NEW_LINE>return editorValue.when(new EditorValue.EditorVisitor<Object>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object isShape(EditorShape object) {<NEW_LINE>FlipperObject.Builder bb = new FlipperObject.Builder();<NEW_LINE>for (Map.Entry<String, Editor... | bb = new FlipperArray.Builder(); |
928,628 | private void go(final boolean back) {<NEW_LINE>final NodeHolder lastNodeHolder = currentNodeHolder;<NEW_LINE>if (back) {<NEW_LINE>if (canGoBack()) {<NEW_LINE>nodeIterator.previous();<NEW_LINE>nodeIterator.previous();<NEW_LINE>currentNodeHolder = nodeIterator.next();<NEW_LINE>} else {<NEW_LINE>backAction.setEnabled(fals... | .getModeController().getController(); |
1,234,360 | public static String[] resolveStringValues(@Nullable Object value, @Nullable Function<Object, Object> valueMapper) {<NEW_LINE>if (value == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (valueMapper != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (value instanceof CharSequence) {<NEW_LINE>return new String[] { ... | value = valueMapper.apply(value); |
604,990 | public static void writeOperations(StreamOutput outStream, List<Operation> toWrite) throws IOException {<NEW_LINE>final ReleasableBytesStreamOutput out = new ReleasableBytesStreamOutput(BigArrays.NON_RECYCLING_INSTANCE);<NEW_LINE>try {<NEW_LINE>outStream.writeInt(toWrite.size());<NEW_LINE>final BufferedChecksumStreamOu... | out.skip(Integer.BYTES); |
1,103,042 | public static void main(String... args) throws IOException {<NEW_LINE>HostSelectionInterceptor hostSelectionInterceptor = new HostSelectionInterceptor();<NEW_LINE>OkHttpClient okHttpClient = new OkHttpClient.Builder().addInterceptor(hostSelectionInterceptor).build();<NEW_LINE>Retrofit retrofit = new Retrofit.Builder().... | callFactory(okHttpClient).build(); |
29,033 | public EvaluationMetricResult evaluate(Aggregations aggs) {<NEW_LINE>long[] tp = new long[thresholds.length];<NEW_LINE>long[] fp = new long[thresholds.length];<NEW_LINE>long[] tn = new long[thresholds.length];<NEW_LINE>long[] fn = new long[thresholds.length];<NEW_LINE>for (int i = 0; i < thresholds.length; i++) {<NEW_L... | i], Condition.TN)); |
745,922 | private BuilderDebugItem convertDebugItem(@Nonnull DebugItem debugItem) {<NEW_LINE>switch(debugItem.getDebugItemType()) {<NEW_LINE>case DebugItemType.START_LOCAL:<NEW_LINE>{<NEW_LINE>StartLocal startLocal = (StartLocal) debugItem;<NEW_LINE>return new BuilderStartLocal(startLocal.getRegister(), (StringReference) convert... | (startLocal.getSignatureReference())); |
904,396 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_post_feed);<NEW_LINE>mCallbackManager = CallbackManager.Factory.create();<NEW_LINE>LoginManager.getInstance().registerCallback(mCallbackManager, this);<NEW_LINE>PostAdapter postApa... | (intent, SELECT_PICTURE), PICK_IMAGE); |
94,715 | public YoBitOrderBooksReturn deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>JsonNode node = p.readValueAsTree();<NEW_LINE>Map<String, YoBitOrderBook> tickers = new HashMap<>();<NEW_LINE>if (node.isObject()) {<NEW_LINE>Iterator<Map.Entry<String, JsonNode>> priceEntryIter = node.fiel... | JsonNode jsonNode = priceEntryNode.getValue(); |
140,358 | public void initializeExtendsBound(AnnotatedWildcardType wildcard) {<NEW_LINE>AnnotatedTypeFactory typeFactory = wildcard.atypeFactory;<NEW_LINE>WildcardType javaWildcardType = wildcard.getUnderlyingType();<NEW_LINE>TypeMirror javaExtendsBound;<NEW_LINE>if (javaWildcardType.getExtendsBound() != null) {<NEW_LINE>javaExt... | TypesUtils.getObjectTypeMirror(typeFactory.processingEnv); |
411,841 | public void onError(Throwable t) {<NEW_LINE>if (this.done) {<NEW_LINE>Operators.onErrorDropped(t, <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.done = true;<NEW_LINE>if (this.value == null) {<NEW_LINE>this.actual.onError(t);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!Exceptions.addThrowable(ERROR, this, t)) {<NEW_LIN... | this.actual.currentContext()); |
812,228 | public DescribePackagesFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribePackagesFilter describePackagesFilter = new DescribePackagesFilter();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_... | int originalDepth = context.getCurrentDepth(); |
967,880 | public void dryRun(BuildTool buildTool, CreateExtensionCommandHandler invocation, OutputOptionMixin output) {<NEW_LINE>CommandLine.Help help = spec.commandLine().getHelp();<NEW_LINE>output.printText(new String[] { "\nA new extension would have been created in", "\t" + outputDirectory().toString(), "\nThe extension woul... | dryRunOutput = new TreeMap<>(); |
1,670,909 | public void run() {<NEW_LINE>try {<NEW_LINE>if (env.exception.get() != null)<NEW_LINE>return;<NEW_LINE>if (splits.size() <= 2) {<NEW_LINE>addSplits(env, new TreeSet<>(splits));<NEW_LINE>splits.forEach(s -> env.latch.countDown());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int mid = splits.size() / 2;<NEW_LINE>// split the mi... | splits.size()))); |
1,753,382 | public void keyPressed(KeyEvent e) {<NEW_LINE>final JList list = UIUtil.findComponentOfType(myFlatWelcomeFrame.getComponent(), JList.class);<NEW_LINE>if (e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_SPACE) {<NEW_LINE>InputEvent event = e;<NEW_LINE>if (e.getComponent() instanceof JComponent) {<NE... | getGlobalInstance().doForceFocusWhenFocusSettlesDown(list); |
967,796 | public static void printInfo(String parentName, Relationship r, Part p, StringBuilder sb, String indent) {<NEW_LINE>String relationshipType = "";<NEW_LINE>if (p.getSourceRelationships().size() > 0) {<NEW_LINE>relationshipType = p.getSourceRelationships().get(0).getType();<NEW_LINE>}<NEW_LINE>if (r == null) {<NEW_LINE>s... | JAXBElementDebug((JAXBElement) o)); |
784,570 | public void enableWaypointType(int type, boolean enable) {<NEW_LINE>// An item will be displayed in the Waypoint list if either "Show..." or "Announce..." is selected for it in the Navigation settings<NEW_LINE>// Keep both "Show..." and "Announce..." Nav settings in sync when user changes what to display in the Waypoin... | ANNOUNCE_NEARBY_POI.setModeValue(appMode, enable); |
160,848 | private void executeAT() {<NEW_LINE>// It seem that MTK devices doesn't need "\r" but QC devices do.<NEW_LINE>// We need a device-type check here, perhaps: gsm.version.ril-impl.<NEW_LINE>Editable cmd = mAtCommand.getText();<NEW_LINE>if (cmd != null && cmd.length() != 0) {<NEW_LINE>log.debug(<MASK><NEW_LINE>if (getSeria... | "ExecuteAT: attempting to send: {}", cmd.toString()); |
465,448 | private static void checkForFireAirMixture(ServerWorld serverWorld, LivingEntity livingEntity) {<NEW_LINE>ElementalFire entityFire = livingEntity.getCapability(CapabilityElementalFire.CAPABILITY_ELEMENTAL_FIRE).orElse(null);<NEW_LINE>if (entityFire == null)<NEW_LINE>return;<NEW_LINE>ElementalAir entityAir = livingEntit... | Math.max(airChargeFraction, fireChargeFraction); |
1,494,381 | final ListDataIntegrationsResult executeListDataIntegrations(ListDataIntegrationsRequest listDataIntegrationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDataIntegrationsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListD... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
126,773 | private void resetStats(GlobalManager gm, DownloadManagerListener listener, stats statsWithLowNoise, stats statsNoLowNoise) {<NEW_LINE>List<DownloadManager<MASK><NEW_LINE>for (Iterator<DownloadManager> iter = downloadManagers.iterator(); iter.hasNext(); ) {<NEW_LINE>DownloadManager dm = iter.next();<NEW_LINE>boolean lo... | > downloadManagers = gm.getDownloadManagers(); |
284,366 | private List<NameValueCountPair> listStartTimeMonthPair(Business business, EffectivePerson effectivePerson) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(ReadCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery... | wos = new ArrayList<>(); |
469,389 | public CreateUserProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateUserProfileResult createUserProfileResult = new CreateUserProfileResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | JsonToken token = context.getCurrentToken(); |
1,105,738 | protected void initGame() {<NEW_LINE>getGameScene().setBackgroundColor(Color.LIGHTGRAY);<NEW_LINE>entityBuilder().buildScreenBoundsAndAttach(50);<NEW_LINE>// platform<NEW_LINE>entityBuilder().at(400, 400).viewWithBBox(new Rectangle(500, 20, Color.BROWN)).with(new PhysicsComponent()).buildAndAttach();<NEW_LINE>PhysicsCo... | with(physics).buildAndAttach(); |
1,516,480 | protected void startAndCompleteReportingInstances(ProcessEngine engine, BpmnModelInstance model, Date currentTime, int offset) {<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>int currentMonth = calendar.get(Calendar.MONTH);<NEW_LINE>int currentYear = calendar.get(Calendar.YEAR);<NEW_LINE>calendar.add(Ca... | TaskService taskService = engine.getTaskService(); |
795,606 | public Set<Trip> match(EstimatedVehicleJourney journey) {<NEW_LINE>Set<Trip> trips = null;<NEW_LINE>if (journey.getVehicleRef() != null && (journey.getVehicleModes() != null && journey.getVehicleModes().contains(VehicleModesEnumeration.RAIL))) {<NEW_LINE>trips = getCachedTripsByVehicleRef(journey.getVehicleRef().getVal... | trips = getMatchingTripsOnStopOrSiblings(lastStopPoint, arrivalTime); |
1,410,031 | private void markupFRegAndBitInstruction(Instruction instr) {<NEW_LINE>if (instr.getNumOperands() != 2) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String regName = markupFRegInstruction(instr, 0, null);<NEW_LINE>if (regName == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object[] <MASK><NEW_LINE>if (objs.length != 1 || !(o... | objs = instr.getOpObjects(1); |
1,597,091 | private void init() {<NEW_LINE>this.grabSnapshot = new JButton();<NEW_LINE>this.grabSnapshot.setText(DesktopUtilActivator.getResources().getI18NString("service.gui.avatar.imagepicker.CLICK"));<NEW_LINE>this.grabSnapshot.setName("grab");<NEW_LINE>this.grabSnapshot.addActionListener(this);<NEW_LINE>this.grabSnapshot.setE... | new FlowLayout(FlowLayout.RIGHT)); |
163,442 | private static FullRowType concat(RelDataTypeFactory typeFactory, List<Label> inputs) {<NEW_LINE>final ImmutableMap.Builder<Integer, Integer> newFullColumnIndexMap = ImmutableMap.builder();<NEW_LINE>final ImmutableBitSet.<MASK><NEW_LINE>// build full row type<NEW_LINE>final RelDataType newFullRowType = LabelUtil.concat... | Builder newColumnInputSet = ImmutableBitSet.builder(); |
535,448 | private synchronized boolean isInGuardedSection(final Position startPos, final Position endPos) {<NEW_LINE>EditorCookie editor = sourceDataObject.getCookie(EditorCookie.class);<NEW_LINE>StyledDocument doc = null;<NEW_LINE>GuardedSectionManager guards = null;<NEW_LINE>if (editor != null) {<NEW_LINE>try {<NEW_LINE>doc = ... | (GuardedSection) it.next(); |
166,509 | protected VariousChoicesPanel createLocalVariableConflictPanel(final LocalVariableConflict lvc, final TaskMonitor monitor) {<NEW_LINE>Address entryPt = lvc.entry;<NEW_LINE>// [0]=Original, [1]=Latest, [2]=My<NEW_LINE>Variable[] vars = lvc.vars;<NEW_LINE>Variable origLocal = vars[ORIGINAL_VAR];<NEW_LINE>Variable latestL... | String my = myLocal.getName(); |
637,893 | public void afterPropertiesSet() {<NEW_LINE>super.afterPropertiesSet();<NEW_LINE>proxyObject = ProxyFactory.getProxy(getServiceInterface(), this);<NEW_LINE>if (jsonRpcHttpClient == null) {<NEW_LINE>if (objectMapper == null && applicationContext != null && applicationContext.containsBean("objectMapper")) {<NEW_LINE>obje... | beanOfTypeIncludingAncestors(applicationContext, ObjectMapper.class); |
222,780 | private Sequence group_o(Sequence seq, Context ctx) {<NEW_LINE><MASK><NEW_LINE>int vcount = exps.length;<NEW_LINE>Object[] values = this.values;<NEW_LINE>Sequence result = new Sequence();<NEW_LINE>Sequence group = data;<NEW_LINE>if (group == null) {<NEW_LINE>group = new Sequence();<NEW_LINE>}<NEW_LINE>ComputeStack stac... | Expression[] exps = this.exps; |
689,228 | void releaseManual(ThreadPoolTask toRelease) {<NEW_LINE>if (!toRelease.canManualRelease()) {<NEW_LINE>throw new IllegalStateException("task not manually releasable");<NEW_LINE>}<NEW_LINE>synchronized (this) {<NEW_LINE>long elapsed = SystemTime.getMonotonousTime() - toRelease.worker.run_start_time;<NEW_LINE>if (elapsed ... | ", state = " + toRelease.worker.state); |
1,813,954 | public Text[][] render(OptionSpec option, IParamLabelRenderer paramLabelRenderer, ColorScheme scheme) {<NEW_LINE>String[] names = option.names();<NEW_LINE>if (names.length > 2) {<NEW_LINE>throw new CommandLine.PicocliException("Options should have 2 names at most.");<NEW_LINE>}<NEW_LINE>Text shortName = names.length > ... | formatDescription(descriptions, option, scheme); |
398,064 | public void mouseMoved(MouseEvent e) {<NEW_LINE>if (!enableEditor) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>e.getComponent().requestFocus();<NEW_LINE>if (e.isAltDown() || e.isAltGraphDown()) {<NEW_LINE>// request focus for the key listener to work...<NEW_LINE>e.getComponent().requestFocus();<NEW_LINE>// add new element<N... | .getComponent().repaint(); |
487,318 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "crand");<NEW_LINE>final IOperandTreeNode targetC... | getChildren().get(0); |
1,126,079 | protected void updateSourceInfoMap() {<NEW_LINE>if (sourceInfoMap != null) {<NEW_LINE>// create mapping of statement ranges<NEW_LINE>Map<Range, Range> statementShifts = new HashMap<Range, Range>();<NEW_LINE>for (int j = 0; j < statementRanges.numStatements(); j++) {<NEW_LINE>int permutedStart = statementRanges.start(j)... | newArrayList(sourceInfoMap.getRanges()); |
965,719 | final DescribeReservedElasticsearchInstancesResult executeDescribeReservedElasticsearchInstances(DescribeReservedElasticsearchInstancesRequest describeReservedElasticsearchInstancesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReservedElasticsearchInstancesRequest);<NEW_LINE>AWS... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,137,773 | private Mono<Response<EdgePoliciesInner>> listEdgePoliciesWithResponseAsync(String resourceGroupName, String accountName, ListEdgePoliciesInput parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
1,705,581 | private void addToWrapper(EntityMetadata entityMetadata, AttributeWrapper wrapper, Object embeddedObject, Attribute attrib, Attribute embeddedAttrib) {<NEW_LINE>if (embeddedObject == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>byte[] value = PropertyAccessorHelper.get(embeddedObject, (<MASK><NEW_LINE>byte[] name;<NEW_... | Field) attrib.getJavaMember()); |
1,268,745 | public DataHolder parseModel() {<NEW_LINE>EList<PackageableElement> packagedElements = model.getPackagedElements();<NEW_LINE>// expect root machine to be a one having no machines in a submachineState field.<NEW_LINE>StateMachine stateMachine = null;<NEW_LINE>Collection<StateMachine> stateMachines = EcoreUtil.getObjects... | > submachineRefs = machine.getSubmachineStates(); |
1,749,312 | private void initComponentTabChangeListener() {<NEW_LINE>// init component SelectedTabChangeListener only when needed, making sure it is<NEW_LINE>// after all lazy tabs listeners<NEW_LINE>if (!componentTabChangeListenerInitialized) {<NEW_LINE>component.addSelectedTabChangeListener(event -> {<NEW_LINE>if (context instan... | ComponentContext) context).executeInitTasks(); |
287,799 | public Map<Integer, Double> labelCounts() {<NEW_LINE>Map<Integer, Double> ret = new HashMap<>();<NEW_LINE>if (labels == null)<NEW_LINE>return ret;<NEW_LINE>long nTensors = labels.tensorsAlongDimension(1);<NEW_LINE>for (int i = 0; i < nTensors; i++) {<NEW_LINE>INDArray row = labels.tensorAlongDimension(i, 1);<NEW_LINE>I... | labels.tensorAlongDimension(i, 1); |
1,094,724 | public CreateFolderMembershipResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateFolderMembershipResult createFolderMembershipResult = new CreateFolderMembershipResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentPar... | class).unmarshall(context)); |
136,457 | static JerseyLink.Builder initBuilder(JerseyLink.Builder lb, String value) {<NEW_LINE>throwIllegalArgumentExceptionIfNull(value, LocalizationMessages.LINK_IS_NULL());<NEW_LINE>try {<NEW_LINE>value = value.trim();<NEW_LINE>final String params;<NEW_LINE>if (value.startsWith("<")) {<NEW_LINE>final int gtIndex = value.inde... | "Error parsing link value '" + value + "'", e); |
911,422 | public RubyString inspect(ThreadContext context) {<NEW_LINE>int off = this.off;<NEW_LINE>int s = (dt.getHourOfDay() * 60 + dt.getMinuteOfHour()) * 60 + dt.getSecondOfMinute() - off;<NEW_LINE>long ns = (dt.getMillisOfSecond() * 1_000_000) + (subMillisNum * 1_000_000) / subMillisDen;<NEW_LINE>// e.g. #<Date: 2018-01-15 (... | (getJulianDayNumber(), 10)); |
569,180 | private void readEntryData(ResourceEntry entry, String name, InputStream binaryStream, int contentLength, JarEntry jarEntry) {<NEW_LINE>if (binaryStream == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>byte[] binaryContent = new byte[contentLength];<NEW_LINE>try {<NEW_LINE>int pos = 0;<NEW_LINE>while (true) {<NEW_LINE>i... | pos, binaryContent.length - pos); |
271,316 | protected void writeFiles(Encoder encoder, ImmutableList<? extends ComponentArtifactMetadata> artifacts) throws IOException {<NEW_LINE>int fileArtifactsCount = (int) artifacts.stream().filter(a -> a instanceof UrlBackedArtifactMetadata).count();<NEW_LINE>int ivyArtifactsCount = artifacts.size() - fileArtifactsCount;<NE... | ) file).getFileName()); |
466,750 | public static GetCustomsCreditResponse unmarshall(GetCustomsCreditResponse getCustomsCreditResponse, UnmarshallerContext _ctx) {<NEW_LINE>getCustomsCreditResponse.setRequestId(_ctx.stringValue("GetCustomsCreditResponse.RequestId"));<NEW_LINE>getCustomsCreditResponse.setCode(_ctx.integerValue("GetCustomsCreditResponse.C... | = new ArrayList<String>(); |
1,209,958 | public static void addSessionKillsToBatch(PreparedStatement statement, FinishedSession session) throws SQLException {<NEW_LINE>UUID playerUUID = session.getPlayerUUID();<NEW_LINE>ServerUUID serverUUID = session.getServerUUID();<NEW_LINE>Optional<PlayerKills> playerKills = session.getExtraData().get(PlayerKills.class);<... | 8, kill.getDate()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.