idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
235,480 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>((WordPress) getActivity().getApplication()).component().inject(this);<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>AppLog.d(T.READER, "reader post list > restoring instance state");<NEW_LINE>if (savedInstance... | savedInstanceState.getSerializable(ReaderConstants.ARG_TAG); |
183,682 | public void writeSFixed64List(int fieldNumber, List<Long> value, boolean packed) throws IOException {<NEW_LINE>if (packed) {<NEW_LINE>output.writeTag(fieldNumber, WIRETYPE_LENGTH_DELIMITED);<NEW_LINE>// Compute and write the length of the data.<NEW_LINE>int dataSize = 0;<NEW_LINE>for (int i = 0; i < value.size(); ++i) ... | (value.get(i)); |
1,849,638 | public void propagate(InstanceState state) {<NEW_LINE>// get attributes<NEW_LINE>BitWidth dataWidth = state.getAttributeValue(StdAttr.WIDTH);<NEW_LINE>// compute outputs<NEW_LINE>Value gt = Value.FALSE;<NEW_LINE>Value eq = Value.TRUE;<NEW_LINE>Value lt = Value.FALSE;<NEW_LINE>Value a = state.getPortValue(IN0);<NEW_LINE... | mode = state.getAttributeValue(MODE_ATTR); |
423,718 | public void actionPerformed(ActionEvent e) {<NEW_LINE>UIHelper uiHelper = new UIHelper(owlEditorKit);<NEW_LINE>Set<OWLOntology> ontologies = uiHelper.pickOWLOntologies();<NEW_LINE>for (OWLOntology ont : ontologies) {<NEW_LINE>// @@TODO what about anonymous ontologies?<NEW_LINE>String uriString = ont.getOntologyID().get... | uriString.length() - 1); |
1,148,296 | public okhttp3.Call readNodeCall(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/nodes/{name}".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.... | HashMap<String, Object>(); |
1,802,448 | void calc(FastDistanceSparseData left, FastDistanceSparseData right, double[] res) {<NEW_LINE>Arrays.fill(res, 0.0);<NEW_LINE>int[][] leftIndices = left.getIndices();<NEW_LINE>int[][] rightIndices = right.getIndices();<NEW_LINE>double[][] leftValues = left.getValues();<NEW_LINE>double[][] rightValues = right.getValues(... | = right.label.getData(); |
861,916 | private void loadNode1180() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ProgramStateMachineType_ProgramDiagnostics_LastMethodCall, new QualifiedName(0, "LastMethodCall"), new LocalizedText("en", "LastMethodCall"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), ... | this.nodeManager.addNode(node); |
338,992 | public void updateUserRole(UserRequest user) {<NEW_LINE><MASK><NEW_LINE>UserGroupExample userGroupExample = new UserGroupExample();<NEW_LINE>userGroupExample.createCriteria().andUserIdEqualTo(userId);<NEW_LINE>List<UserGroup> userGroups = userGroupMapper.selectByExample(userGroupExample);<NEW_LINE>List<String> list = u... | String userId = user.getId(); |
195,939 | public void run(RegressionEnvironment env) {<NEW_LINE>String startTime = "2002-05-30T09:00:00.000";<NEW_LINE>env.advanceTime(DateTime.parseDefaultMSec(startTime));<NEW_LINE>String sdfPattern = "yyyy.MM.dd G 'at' HH:mm:ss";<NEW_LINE>SimpleDateFormat sdf = new SimpleDateFormat(sdfPattern);<NEW_LINE>DateTimeFormatter dtf ... | (SupportDateTime.make(startTime)); |
534,385 | public DeleteServiceTemplateResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteServiceTemplateResult deleteServiceTemplateResult = new DeleteServiceTemplateResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | JsonToken token = context.getCurrentToken(); |
685,697 | private static Object evalNumeric(Number left, Number right, QueryDataTypeFamily family) {<NEW_LINE>try {<NEW_LINE>switch(family) {<NEW_LINE>case TINYINT:<NEW_LINE>return (byte) (left.byteValue() / right.longValue());<NEW_LINE>case SMALLINT:<NEW_LINE>return (short) (left.shortValue(<MASK><NEW_LINE>case INTEGER:<NEW_LIN... | ) / right.longValue()); |
1,476,640 | void start() throws IOException {<NEW_LINE>if (compactedLogFile != null && compactedLogFile.exists()) {<NEW_LINE><MASK><NEW_LINE>String compactedFilename = compactedLogFile.getName();<NEW_LINE>// create a hard link "x.log" for file "x.log.y.compacted"<NEW_LINE>this.newEntryLogFile = new File(dir, compactedFilename.subs... | File dir = compactedLogFile.getParentFile(); |
928,908 | public void draw(DrawHandler drawHandler, DrawingInfo drawingInfo) {<NEW_LINE>double width = drawingInfo.getSymmetricWidth(getFirstLifeline(), getLastLifeline(), tick);<NEW_LINE>double height = TextSplitter.getSplitStringHeight(textLines, width - ROUND_PART_WIDTH * 2, drawHandler) + VERTICAL_BORDER_PADDING * 2;<NEW_LIN... | ()).getSymmetricHorizontalStart(tick); |
1,724,194 | public static ExtendedUri parseExtendedUri(final Element element) throws ParseException {<NEW_LINE>try {<NEW_LINE>final URI uri = new URI(getChild(element, "default-uri").getTextContent());<NEW_LINE>final long size = Long.parseLong(element.getAttribute("size"));<NEW_LINE>final String <MASK><NEW_LINE>final List<URI> alt... | md5 = element.getAttribute("md5"); |
1,340,869 | private Set<BrokerEntity> detectMetricAnomalies(Map<BrokerEntity, ValuesAndExtrapolations> metricsHistoryByBroker, Map<BrokerEntity, ValuesAndExtrapolations> currentMetricsByBroker) {<NEW_LINE>// Preprocess raw metrics to get the metrics of interest for each broker.<NEW_LINE>Map<BrokerEntity, List<Double>> historicalLo... | BrokerEntity broker = entry.getKey(); |
1,848,903 | void updatePowerSavingsLabels() {<NEW_LINE>boolean isMotionSensorOn = ClientPrefs.getInstance(mView.getContext()).isMotionSensorEnabled();<NEW_LINE>int battPct = ClientPrefs.getInstance(mView.getContext()).getMinBatteryPercent();<NEW_LINE>TextView tv = (TextView) mView.findViewById(R.id.textview_stop_at_battery);<NEW_L... | getString(R.string.off); |
62,647 | private void writeToCsv(List<List<?>> data) {<NEW_LINE>if (titles != null) {<NEW_LINE>synchronized (this) {<NEW_LINE>if (titles == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>data.add(0, titles);<NEW_LINE>titles = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<String> content = data.stream().map(d -> {<NEW_LINE>return d.st... | toString()).find(); |
1,087,688 | public final int addCluster(final String clusterName, final int requestedId) {<NEW_LINE>try {<NEW_LINE>stateLock.acquireWriteLock();<NEW_LINE>try {<NEW_LINE>interruptionManager.enterCriticalPath();<NEW_LINE>checkOpennessAndMigration();<NEW_LINE>checkIfThreadIsBlocked();<NEW_LINE>if (requestedId < 0) {<NEW_LINE>throw ne... | ).getName() + "]"); |
1,330,401 | public synchronized void performRequest(final Collection<K> keys, final TimestampBound timestampBound, final RequestResponseHandler<HashMap<K, V>, F> handler) {<NEW_LINE>final HashSet<K> keysRemaining = new HashSet<>(keys);<NEW_LINE>final HashMap<K, V> cacheResult = new HashMap<>(keys.size());<NEW_LINE>long oldestTimes... | oldestTimestamp, value.getTimestamp()); |
1,165,261 | public static void parsePodTemplate(AbstractModel model, PodTemplate pod) {<NEW_LINE>if (pod != null) {<NEW_LINE>if (pod.getMetadata() != null) {<NEW_LINE>model.templatePodLabels = pod.getMetadata().getLabels();<NEW_LINE>model.templatePodAnnotations = pod.getMetadata().getAnnotations();<NEW_LINE>}<NEW_LINE>if (pod.getA... | (pod.getTolerations())); |
1,719,887 | static GoCompile createGoCompileRule(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params, ActionGraphBuilder graphBuilder, GoBuckConfig goBuckConfig, Path packageName, ImmutableSet<SourcePath> srcs, List<String> compilerFlags, List<String> assemblerFlags, GoPlatform platform, Iterable<B... | getCGoLibrary(graphBuilder, platform, cgoBuildTarget); |
1,631,278 | public void renderTileEntityAt(TileGenericPipe pipe, double x, double y, double z, float f, int argumentthatisalwaysminusone) {<NEW_LINE>if (BuildCraftCore.render == RenderMode.NoDynamic) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (pipe.pipe == null)<NEW_LINE>return;<NEW_LINE>if (pipe.pipe.container == null)<NEW_LINE>re... | ().mcProfiler.endSection(); |
955,836 | private void writeSnapshotAndCount(MetricName metricName, Snapshot snapshot, long count, double factor, String helpMessage) throws IOException {<NEW_LINE><MASK><NEW_LINE>writer.writeHelp(sanitizeName, helpMessage);<NEW_LINE>writer.writeType(sanitizeName, MetricType.SUMMARY);<NEW_LINE>Map<String, String> tags = metricNa... | String sanitizeName = metricName.getName(); |
309,478 | private String scanResource(Class<? extends IBaseResource> theClass, ResourceDef resourceDefinition) {<NEW_LINE>ourLog.debug("Scanning resource class: {}", theClass.getName());<NEW_LINE>boolean primaryNameProvider = true;<NEW_LINE>String resourceName = resourceDefinition.name();<NEW_LINE>if (isBlank(resourceName)) {<NE... | pullAnnotation(parent, ResourceDef.class); |
1,838,933 | public void readFromNBT(@Nonnull NBTTagCompound nbtRoot) {<NEW_LINE>super.readFromNBT(nbtRoot);<NEW_LINE>for (EnumFacing dir : EnumFacing.VALUES) {<NEW_LINE>String key = "upgrades." + dir.name();<NEW_LINE>if (nbtRoot.hasKey(key)) {<NEW_LINE>NBTTagCompound upTag = (NBTTagCompound) nbtRoot.getTag(key);<NEW_LINE><MASK><NE... | ItemStack ups = new ItemStack(upTag); |
1,761,611 | protected void saveContentletVersionInfo(ContentletVersionInfo cvInfo, boolean updateVersionTS) throws DotDataException, DotStateException {<NEW_LINE>boolean isNew = true;<NEW_LINE>if (UtilMethods.isSet(cvInfo.getIdentifier())) {<NEW_LINE>try {<NEW_LINE>final Optional<ContentletVersionInfo> fromDB = findContentletVersi... | addParam(cvInfo.getVersionTs()); |
1,681,647 | public void findMessages(final MethodCall methodCall, final MethodChannel.Result result) {<NEW_LINE>List<String> messageIDList = CommonUtil.getParam(methodCall, result, "messageIDList");<NEW_LINE>V2TIMManager.getMessageManager().findMessages(messageIDList, new V2TIMValueCallback<List<V2TIMMessage>>() {<NEW_LINE><NEW_LI... | messageList = new LinkedList<>(); |
1,681,296 | private void injectToList(List listObject, Class<?> elementType, List<String> stepFieldNames, int step, Object value) throws Exception {<NEW_LINE>String fieldName = stepFieldNames.get(step);<NEW_LINE>if (step + 1 >= stepFieldNames.size() && fieldName.matches("\\[\\d+]")) {<NEW_LINE>int index = Integer.parseInt(fieldNam... | listObject.set(index, value); |
615,342 | public void testSFLocalEnvEntry_Float_InvalidValue() throws Exception {<NEW_LINE>SFLa ejb1 = fhome1.create();<NEW_LINE>try {<NEW_LINE>// The test case looks for a environment variable named "envFloatInvalid".<NEW_LINE>Float tempFloat = ejb1.getFloatEnvVar("envFloatBlankValue");<NEW_LINE>fail("Get environment invalid fl... | getClass().getName()); |
1,707,719 | private <T> T attr(AttributeKey<T> key, boolean ownAttr) {<NEW_LINE>requireNonNull(key, "key");<NEW_LINE>final AtomicReferenceArray<DefaultAttribute<?>> attributes = this.attributes;<NEW_LINE>if (attributes == null) {<NEW_LINE>if (!ownAttr && rootAttributeMap != null) {<NEW_LINE>return rootAttributeMap.attr(key);<NEW_L... | <?> next = curr.next; |
1,539,391 | public boolean validateCheckSum(Map<HdfsFile, byte[]> fileCheckSumMap) {<NEW_LINE>if (checkSumType == CheckSumType.NONE) {<NEW_LINE>logger.info("No check-sum verification required");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>CheckSum <MASK><NEW_LINE>for (HdfsFile file : allFiles) {<NEW_LINE>byte[] fileCheckSum = fileCh... | checkSumGenerator = CheckSum.getInstance(checkSumType); |
249,400 | public EpsilonApproQuantile.SketchEntry[] createWQSummary(int maxSize, double eps, EpsilonApproQuantile.SketchEntry[] buffer, double[] dynamicWeights, BitSet validFlags) {<NEW_LINE>for (int i = 0, index = 0; i < n; ++i) {<NEW_LINE>final FeatureMeta featureMeta = featureMetas[i];<NEW_LINE>if (featureMeta.getType().equal... | final FeatureMeta featureMeta = featureMetas[i]; |
784,914 | void sealAndInitialize(FhirContext theContext, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theClassToElementDefinitions) {<NEW_LINE>Map<String, BaseRuntimeElementDefinition<?>> datatypeAttributeNameToDefinition = new HashMap<>();<NEW_LINE>myDatatypeToAttributeName = new HashMap<>();<NEW_LINE>myDatatype... | ).getName() + "]"); |
1,154,822 | public static <T, K, V, M extends Multimap<K, V>> Collector<T, ?, M> flatteningToMultimap(java.util.function.Function<? super T, ? extends K> keyFunction, java.util.function.Function<? super T, ? extends Stream<? extends V>> valueFunction, java.util.function.Supplier<M> multimapSupplier) {<NEW_LINE>checkNotNull(keyFunc... | key = keyFunction.apply(input); |
941,276 | public boolean parseText(String src, List<CompilationUnitTree> trees, Consumer<SourcePositions> sourcePositions, Consumer<DocTrees> docTrees, DiagnosticCollector<JavaFileObject> errorHandler) {<NEW_LINE>init();<NEW_LINE>ArrayList<JavaFileObject> javaStringObjects = new ArrayList<>();<NEW_LINE>javaStringObjects.add(new ... | (javacTask).getSourcePositions()); |
103,373 | private StringBuffer printNode(MTreeNode node, Properties ctx) {<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>// Leaf<NEW_LINE>if (!node.isSummary()) {<NEW_LINE>String cssClassName = "";<NEW_LINE>String servletName = "";<NEW_LINE>if (node.isWindow()) {<NEW_LINE>cssClassName = "menuWindow";<NEW_LINE>servletNa... | append(node.getNode_ID()); |
169,968 | protected void customizeCellRenderer(@Nonnull JList<? extends FileInfo> list, FileInfo value, int index, boolean selected, boolean hasFocus) {<NEW_LINE>Project project = mySwitcherPanel.project;<NEW_LINE><MASK><NEW_LINE>String renderedName = value.getNameForRendering();<NEW_LINE>setIcon(VfsIconUtil.getIcon(virtualFile,... | VirtualFile virtualFile = value.getFirst(); |
988,085 | private void validateCommandPlacement(String placement) {<NEW_LINE>if (placement == COMMAND_PLACEMENT_VALUE_TOP) {<NEW_LINE>((BorderLayout) getTitleAreaContainer().getLayout()).setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_SCALE);<NEW_LINE>if (!(getTitleComponent() instanceof Button)) {<NEW_LINE>Button b = new Button(... | UIManager uim = parent.getUIManager(); |
96,590 | public InteractionResultHolder<ItemStack> use(Level worldIn, Player playerIn, @NotNull InteractionHand handIn) {<NEW_LINE>ItemStack itemstack = playerIn.getItemInHand(handIn);<NEW_LINE>if (!worldIn.isClientSide) {<NEW_LINE>ThrownEnderpearl enderpearlentity = new ThrownEnderpearl(worldIn, playerIn);<NEW_LINE>enderpearle... | ).addCooldown(this, 20); |
463,104 | public InstanceIdentity postInstanceRegisterInformation(InstanceRegisterInformation info, java.util.Map<String, java.util.List<String>> headers) {<NEW_LINE>WebTarget target = base.path("/instance");<NEW_LINE>Invocation.Builder invocationBuilder = target.request("application/json");<NEW_LINE>if (credsHeader != null) {<N... | invocationBuilder.header(credsHeader, credsToken); |
587,123 | public static void main(String[] args) {<NEW_LINE>final CliBuilder<Runnable> builder = Cli.builder("druid");<NEW_LINE>builder.withDescription("Druid command-line runner.").withDefaultCommand(Help.class).withCommands(Help.class, Version.class);<NEW_LINE>List<Class<? extends Runnable>> serverCommands = Arrays.asList(CliC... | injector.getInstance(ExtensionsConfig.class); |
293,736 | public int fill(FluidStack resource, FluidAction doFill) {<NEW_LINE>if (resource == null)<NEW_LINE>return 0;<NEW_LINE>int canAccept = resource.getAmount();<NEW_LINE>if (canAccept <= 0)<NEW_LINE>return 0;<NEW_LINE>Set<DirectionalFluidOutput> outputList = getConnectedFluidHandlers(pipe.getBlockPos(), pipe.level);<NEW_LIN... | Math.min(limit, canAccept); |
879,053 | public String doSaveAs(String filePath, String extension) throws IOException {<NEW_LINE>boolean ownXmlFormat = extension.equals(Program.getInstance().getExtension());<NEW_LINE>JFileChooser fileChooser = createSaveFileChooser(!ownXmlFormat, filePath);<NEW_LINE>String chosenFileName = chooseFileName(ownXmlFormat, filters... | get(fileChooser.getFileFilter()); |
1,523,867 | public void paint(GGlassPane glassPane, Graphics g) {<NEW_LINE>Rectangle defaultBounds = component.getBounds();<NEW_LINE>int width = (int) (defaultBounds.width * emphasis);<NEW_LINE>int height = (int) (defaultBounds.height * emphasis);<NEW_LINE>Rectangle emphasizedBounds = new Rectangle(defaultBounds.x, defaultBounds.y... | defaultBounds.height) >> 1); |
1,806,120 | private JComponent createTopCombo(JFileChooser fc) {<NEW_LINE>JPanel panel = new JPanel();<NEW_LINE>if (fc.getAccessory() != null) {<NEW_LINE>panel.setBorder(BorderFactory.createEmptyBorder(4, 0, 8, 0));<NEW_LINE>} else {<NEW_LINE>panel.setBorder(BorderFactory.createEmptyBorder(6, 0, 10, 0));<NEW_LINE>}<NEW_LINE>panel.... | lookInComboBoxLabel.setAlignmentX(JComponent.LEFT_ALIGNMENT); |
432,480 | public void addDownload(final HttpMetadata metadata, final String file) {<NEW_LINE>if (refreshCallback != null) {<NEW_LINE>if (refreshCallback.isValidLink(metadata)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// HttpMetadata md = HttpMetadata.load(refreshCallback.getId());<NEW_LINE>// if (md.getType() == metadata.getType()... | .getFileName().toString(); |
1,422,248 | private void updateIPBlocked() {<NEW_LINE>if (!CoreFactory.isCoreRunning()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Core core = CoreFactory.getSingleton();<NEW_LINE>// IP Filter Status Section<NEW_LINE>IpFilter ip_filter = core.getIpFilterManager().getIPFilter();<NEW_LINE>ipBlocked.setForeground(display.getSystemColor(i... | ().getNbBadIps())); |
218,537 | public static Writable reduceStringOrCategoricalColumn(StringReduceOp op, List<Writable> values) {<NEW_LINE>switch(op) {<NEW_LINE>case MERGE:<NEW_LINE>case APPEND:<NEW_LINE>StringBuilder stringBuilder = new StringBuilder();<NEW_LINE>for (Writable w : values) {<NEW_LINE>stringBuilder.append(w.toString());<NEW_LINE>}<NEW... | Text(stringBuilder.toString()); |
653,077 | private CodegenMethod evaluateCodegenRewritten(EPTypeClass requiredType, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenExpressionField nodeObject = getNodeObject(codegenClassScope);<NEW_LINE>EPType inner = innerForge.getEvaluationType();<NEW_LINE>EPTypeClass evaluationTyp... | .getEvaluationType()), eval); |
1,429,983 | final StartMonitoringMemberResult executeStartMonitoringMember(StartMonitoringMemberRequest startMonitoringMemberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startMonitoringMemberRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
204,978 | private static <T, U> void eachSequentiallyImpl(Iterator<T> iterator, CFFactory<T, U> cfFactory, int index, List<U> tmpResult, CompletableFuture<List<U>> overallResult) {<NEW_LINE>if (!iterator.hasNext()) {<NEW_LINE>overallResult.complete(tmpResult);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CompletableFuture<U> cf;<NEW_LIN... | cf = new CompletableFuture<>(); |
1,146,816 | protected void flushToNode(ContainerUnloader container, NodeDraft nodeDraft, Node node) {<NEW_LINE>if (nodeDraft.getColor() != null) {<NEW_LINE>node.setColor(nodeDraft.getColor());<NEW_LINE>}<NEW_LINE>if (nodeDraft.getLabel() != null) {<NEW_LINE>if (node.getLabel() == null || !nodeDraft.isCreatedAuto()) {<NEW_LINE>node... | setY(nodeDraft.getY()); |
1,267,225 | private boolean processCommonOptions(MainOptions mainOpts, Command command) throws SystemExitException {<NEW_LINE>if (command.help) {<NEW_LINE>throw command.usage(null);<NEW_LINE>}<NEW_LINE>boolean verbose;<NEW_LINE>switch(command.logLevel) {<NEW_LINE>case "error":<NEW_LINE>case "warn":<NEW_LINE>case "info":<NEW_LINE>v... | command.logPath, command.logbackConfigPath); |
366,029 | public PNode visit(IfSSTNode node) {<NEW_LINE>int oldNum = generatorInfo.getNumOfActiveFlags();<NEW_LINE>ExpressionNode test = (ExpressionNode) node.test.accept(this);<NEW_LINE>StatementNode thenStatement = (StatementNode) node.thenStatement.accept(this);<NEW_LINE>// TODO: Do we need to generate empty else block, if do... | node.elseStatement.accept(this); |
319,807 | public void toMatrix(Mat4f mat) {<NEW_LINE>float q00 = q0 * q0;<NEW_LINE>float q11 = q1 * q1;<NEW_LINE>float q22 = q2 * q2;<NEW_LINE>float q33 = q3 * q3;<NEW_LINE>// Diagonal elements<NEW_LINE>mat.set(0, 0, q00 + q11 - q22 - q33);<NEW_LINE>mat.set(1, 1, q00 - q11 + q22 - q33);<NEW_LINE>mat.set(2, 2, <MASK><NEW_LINE>// ... | q00 - q11 - q22 + q33); |
1,471,194 | private static void saveEslintError(SensorContext context, EslintError eslintError, InputFile inputFile, String originalFilePath) {<NEW_LINE>String eslintKey = eslintError.ruleId;<NEW_LINE>if (eslintKey == null) {<NEW_LINE>LOG.warn("Parse error issue from ESLint will not be imported, file " + inputFile.uri());<NEW_LINE... | location = getLocation(eslintError, inputFile); |
1,578,952 | final GetRoomResult executeGetRoom(GetRoomRequest getRoomRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRoomRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Reques... | endClientExecution(awsRequestMetrics, request, response); |
1,820,901 | public static SweepableCellsRowResult of(RowResult<byte[]> rowResult) {<NEW_LINE>SweepableCellsRow rowName = SweepableCellsRow.BYTES_HYDRATOR.hydrateFromBytes(rowResult.getRowName());<NEW_LINE>Set<SweepableCellsColumnValue> columnValues = Sets.newHashSetWithExpectedSize(rowResult.getColumns().size());<NEW_LINE>for (Ent... | , ImmutableSet.copyOf(columnValues)); |
1,449,397 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(untagResourceRequest)); |
344,460 | public void save(File directory) throws WebBrowserException {<NEW_LINE>File dir = directory;<NEW_LINE>if (dir == null) {<NEW_LINE>// may return null<NEW_LINE>dir = this.getBrowser().getResultDirectory();<NEW_LINE>}<NEW_LINE>if (dir == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// start with a human-readable String fo... | ("text/xml")) ? ".xml" : ".html"; |
1,088,112 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.... | > originalList = meeting.getInviteDelPersonList(); |
593,809 | public HibernatePagingItemReader<T> build() {<NEW_LINE>Assert.notNull(this.sessionFactory, "A SessionFactory must be provided");<NEW_LINE>Assert.state(this.fetchSize >= 0, "fetchSize must not be negative");<NEW_LINE>if (this.saveState) {<NEW_LINE>Assert.hasText(this.name, "A name is required when saveState is set to tr... | reader.setFetchSize(this.fetchSize); |
362,755 | static <A, O, I extends AttributeIndex<A, O>> boolean supportsQueryInternal(I backingIndex, Query<O> filterQuery, Query<O> rootQuery, Query<O> branchQuery, QueryOptions queryOptions) {<NEW_LINE>if (!backingIndex.supportsQuery(branchQuery, queryOptions)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Check: rootQuery e... | (And<O>) filterQuery); |
468,358 | public void init(int WindowNo, FormFrame frame) {<NEW_LINE>m_WindowNo = WindowNo;<NEW_LINE>m_frame = frame;<NEW_LINE>// Layout<NEW_LINE>frame.getContentPane().add(this, BorderLayout.CENTER);<NEW_LINE>this.setLayout(new BorderLayout());<NEW_LINE>this.add(tabbedPane, BorderLayout.CENTER);<NEW_LINE>this.add(confirmPanel, ... | selectPanel.add(attributeCombo1, null); |
429,663 | private void addDetailedThreadMetrics(long timestamp, MetricList metrics) {<NEW_LINE>ThreadMXBean bean = ManagementFactory.getThreadMXBean();<NEW_LINE>if (!bean.isThreadContentionMonitoringSupported()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!bean.isThreadContentionMonitoringEnabled()) {<NEW_LINE>bean.setThreadConte... | = new long[VALID_STATES.length]; |
737,215 | public void initialize() {<NEW_LINE>if (initialized) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// put initialization code here<NEW_LINE>initValues(startPackage);<NEW_LINE>if (newName != null) {<NEW_LINE>FileObject fob;<NEW_LINE>do {<NEW_LINE>// NOI18N<NEW_LINE>fob = <MASK><NEW_LINE>if (fob != null) {<NEW_LINE>// NOI18N<NE... | fo.getFileObject(newName + ".java"); |
1,130,238 | public TableAnswerElement answer(NetworkSnapshot snapshot) {<NEW_LINE>UndefinedReferencesQuestion question = (UndefinedReferencesQuestion) _question;<NEW_LINE>// Find all the filenames that produced the queried nodes. This might have false positives if<NEW_LINE>// a file produced multiple nodes, but that was already mi... | > rows = LinkedHashMultiset.create(); |
14,819 | public Invoker<T> select(final InvokeContext invocation) throws NoInvokerException {<NEW_LINE>long hash = Math.abs(StringUtils.convertLong(invocation.getAttachment(<MASK><NEW_LINE>long consistentHash = Math.abs(StringUtils.convertLong(invocation.getAttachment(Constants.TARS_CONSISTENT_HASH), 0));<NEW_LINE>if (consisten... | Constants.TARS_HASH), 0)); |
971,384 | public void showDialog(UUID roomId) {<NEW_LINE>this.roomId = roomId;<NEW_LINE>if (!lastSessionId.equals(SessionHandler.getSessionId())) {<NEW_LINE>lastSessionId = SessionHandler.getSessionId();<NEW_LINE>this.player1Panel.setPlayerName(SessionHandler.getUserName());<NEW_LINE>// no computer<NEW_LINE>this.player1Panel.sho... | (SessionHandler.getDeckTypes())); |
384,198 | public // for each jar/zip file, call convertJar<NEW_LINE>int processArgumentsAndCheckEnvironment(String[] args) {<NEW_LINE><MASK><NEW_LINE>int rc = Config.checkRealTimeEnvironment();<NEW_LINE>if (rc != 0) {<NEW_LINE>if (config().requiresRealTimeEnvironment()) {<NEW_LINE>System.err.println(config().myName() + " must be... | config().preliminaryCheck(args); |
1,374,729 | public ServiceResponse serviceImpl(Query call, HttpServletResponse response, Authorization authorization, final JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>if (authorization.getIdentity() == null) {<NEW_LINE>throw new APIException(422, "Bad access token.");<NEW_LINE>}<NEW_LINE>JSONObject result = ... | email, client.getName()); |
638,510 | public String bulkEdit(@RequestParam(required = false) String[] selectedUsers, @RequestParam(required = false) final String[] selectedSpaces, HttpServletRequest req) {<NEW_LINE>Profile authUser = utils.getAuthUser(req);<NEW_LINE>boolean <MASK><NEW_LINE>String operation = req.getParameter("operation");<NEW_LINE>String s... | isAdmin = utils.isAdmin(authUser); |
234,395 | public void resolve(final ResolveContext resolveContext, final DependencyGraphVisitor modelVisitor, boolean includeSyntheticDependencies) {<NEW_LINE>IdGenerator<Long> idGenerator = new LongIdGenerator();<NEW_LINE>DefaultBuildableComponentResolveResult rootModule = new DefaultBuildableComponentResolveResult();<NEW_LINE>... | ResolutionStrategyInternal resolutionStrategy = resolveContext.getResolutionStrategy(); |
545,721 | private List<City> fillWithCities(String name, final ResultMatcher<City> resultMatcher, final List<Integer> typeFilter) throws IOException {<NEW_LINE>List<City> result = new ArrayList<City>();<NEW_LINE>ResultMatcher<MapObject> matcher = new ResultMatcher<MapObject>() {<NEW_LINE><NEW_LINE>List<City> cache = new ArrayLis... | searchMapObjectsByName(name, matcher, typeFilter); |
346,400 | public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {<NEW_LINE>String failureUrlParam = StringUtil.cleanseUrlString(request.getParameter("failureUrl"));<NEW_LINE>String successUrlParam = StringUtil.cleanseU... | Boolean) request.getAttribute("sessionTimeout"); |
1,777,909 | public void sendEventToConsumers(EventRegistryEvent eventRegistryEvent) {<NEW_LINE>Collection<EventRegistryEventConsumer> engineEventRegistryEventConsumers = engineConfiguration.getEventRegistryEventConsumers().values();<NEW_LINE>EventRegistryProcessingInfo eventRegistryProcessingInfo = null;<NEW_LINE>for (EventRegistr... | setEventConsumerInfos(processingInfo.getEventConsumerInfos()); |
675,890 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static com.sun.jdi.request.MonitorWaitRequest createMonitorWaitRequest(com.sun.jdi.request.EventRequestManager a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrap... | jpda.jdi.InternalExceptionWrapper(ex); |
652,230 | public CreateResponse create(ComplexKeyGroupMembership groupMembership) {<NEW_LINE>// For create construct a key based on the memberID and groupID in the membership<NEW_LINE>// object<NEW_LINE>if (!groupMembership.getId().hasMemberID() || !groupMembership.getId().hasGroupID()) {<NEW_LINE>throw new RestLiServiceExceptio... | CreateResponse(complexResourceKey, HttpStatus.S_201_CREATED); |
1,636,959 | private static SequenceQuery<AbstractInsnNode> conditionalAtStart() {<NEW_LINE>final Slot<Integer> counterVariable = <MASK><NEW_LINE>final Slot<LabelNode> loopStart = Slot.create(LabelNode.class);<NEW_LINE>final Slot<LabelNode> loopEnd = Slot.create(LabelNode.class);<NEW_LINE>return // .then(anIntegerConstant().and(deb... | Slot.create(Integer.class); |
1,605,947 | public static boolean deleteOldies(File dir, int maxLifeInSeconds, String prefix, boolean root) {<NEW_LINE>Date currentDate = new Date();<NEW_LINE><MASK><NEW_LINE>boolean empty = true;<NEW_LINE>boolean success = true;<NEW_LINE>long threasholdMillisec = currentDateMillisec - (maxLifeInSeconds * 1000);<NEW_LINE>if (dir.i... | long currentDateMillisec = currentDate.getTime(); |
272,827 | public SuccessResponseEntity addContainer(@AuditParam("namespace") @PathVariable String namespace, AddContainerModel addContainerModel, HttpServletRequest request) throws SaturnJobConsoleException {<NEW_LINE>if (addContainerModel.getContainerToken() == null) {<NEW_LINE>throw new SaturnJobConsoleException("Please input ... | tmp.length() - 1); |
1,749,652 | public void testBytesMessageStringBuffer(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE><MASK><NEW_LINE>emptyQueue(jmsQCFBindings, jmsQueue);<NEW_LINE>boolean failedTest = false;<NEW_LINE>BytesMessage msgOut = jmsContext.createBytesMessage();<NEW_LINE>msgOut.writeByte((byte) 55);<... | JMSContext jmsContext = jmsQCFBindings.createContext(); |
1,235,286 | public static void replaceLinks(final ODocument iVertex, final String iFieldName, final OIdentifiable iVertexToRemove, final OIdentifiable iNewVertex) {<NEW_LINE>if (iVertex == null)<NEW_LINE>return;<NEW_LINE>final Object fieldValue = iVertexToRemove != null ? iVertex.field(iFieldName) : iVertex.removeField(iFieldName)... | final ORidBag bag = (ORidBag) fieldValue; |
1,720,198 | public RequestTimeline takeTimelineSnapshot() {<NEW_LINE>Instant now = Instant.now();<NEW_LINE><MASK><NEW_LINE>Instant timeAcquired = this.timeAcquired();<NEW_LINE>Instant timeConnected = this.timeConnected();<NEW_LINE>Instant timeConfigured = this.timeConfigured();<NEW_LINE>Instant timeSent = this.timeSent();<NEW_LINE... | Instant timeCreated = this.timeCreated(); |
735,376 | private static List<OptionItem> fromPresets(Context context, VideoPreset[] presets, PlayerData playerData, Runnable onFormatSelected) {<NEW_LINE>List<OptionItem> result = new ArrayList<>();<NEW_LINE>FormatItem selectedFormat = playerData.getFormat(FormatItem.TYPE_VIDEO);<NEW_LINE>boolean isPresetSelection = selectedFor... | != null && selectedFormat.isPreset(); |
1,372,443 | public static boolean canAccessInfo(String infoWindowName) {<NEW_LINE>boolean result = false;<NEW_LINE>int roleid = Env.getAD_Role_ID(Env.getCtx());<NEW_LINE>String sqlRolePermission = "Select COUNT(AD_ROLE_ID) AS ROWCOUNT FROM AD_ROLE WHERE AD_ROLE_ID=" + roleid + " AND ALLOW_INFO_" + infoWindowName + "='Y'";<NEW_LINE... | DB.close(rs, prolestmt); |
48,649 | private HttpServerOptions createDefaultHttpServerOptions() {<NEW_LINE>HttpServerOptions serverOptions = new HttpServerOptions();<NEW_LINE>serverOptions.setIdleTimeout(TransportConfig.getConnectionIdleTimeoutInSeconds());<NEW_LINE>serverOptions.setCompressionSupported(TransportConfig.getCompressed());<NEW_LINE>serverOpt... | setHttp2ConnectionWindowSize(TransportConfig.getHttp2ConnectionWindowSize()); |
165,906 | private void exportTasksIntoSystemClipboard() {<NEW_LINE>Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();<NEW_LINE>// We create a copy of the task model here, to allow for manipulations with the tasks when builing<NEW_LINE>// an instance of the external document flavor.<NEW_LINE>// See issue http... | customDefMap.put(def, def); |
1,192,607 | public void onEvent(Event event) {<NEW_LINE>if (RpcRunningState.isUnitTestMode() || lookoutCollectDisable) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Class eventClass = event.getClass();<NEW_LINE>if (eventClass == ClientEndInvokeEvent.class) {<NEW_LINE>ClientEndInvokeEvent clientEndInvokeEvent = (ClientEndInvokeEvent) even... | removeThreadPool(serverStartedEvent.getServerConfig()); |
1,027,217 | protected boolean copyObject(String source, String destination) {<NEW_LINE>LOG.<MASK><NEW_LINE>// Retry copy for a few times, in case some Swift internal errors happened during copy.<NEW_LINE>for (int i = 0; i < NUM_RETRIES; i++) {<NEW_LINE>try {<NEW_LINE>Container container = mAccount.getContainer(mContainerName);<NEW... | debug("copy from {} to {}", source, destination); |
683,088 | public static boolean checkPathExist(String remotePath, BrokerDesc brokerDesc) throws UserException {<NEW_LINE>Pair<TFileBrokerService.Client, TNetworkAddress> pair = getBrokerAddressAndClient(brokerDesc, ClientPool.brokerTimeoutMs);<NEW_LINE>TFileBrokerService.Client client = pair.first;<NEW_LINE>TNetworkAddress addre... | rep = client.checkPathExist(req); |
458,708 | public PublishBatchResultEntry unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>PublishBatchResultEntry publishBatchResultEntry = new PublishBatchResultEntry();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocu... | int xmlEvent = context.nextEvent(); |
422,157 | private Object returnVMInfo(ObjectOutput o) throws IOException {<NEW_LINE>Map<String, String> result = new HashMap<String, String>();<NEW_LINE>Properties props = System.getProperties();<NEW_LINE>for (String s : props.stringPropertyNames()) {<NEW_LINE>if (!s.startsWith("java")) {<NEW_LINE>// NOI18N<NEW_LINE>continue;<NE... | append(f.getPath()); |
1,677,739 | protected GHResponse routeVia(GHRequest request, Solver solver) {<NEW_LINE>GHResponse ghRsp = new GHResponse();<NEW_LINE>StopWatch sw = new StopWatch().start();<NEW_LINE>DirectedEdgeFilter directedEdgeFilter = solver.createDirectedEdgeFilter();<NEW_LINE>List<Snap> snaps = ViaRouting.lookup(encodingManager, request.getP... | .paths, getWaypoints(snaps)); |
1,429,437 | private static Request prepareReindexRequest(ReindexRequest reindexRequest, boolean waitForCompletion) {<NEW_LINE>String endpoint = new EndpointBuilder().addPathPart("_reindex").build();<NEW_LINE>Request request = new Request(HttpMethod.POST.name(), endpoint);<NEW_LINE>Params params = new Params(request).withWaitForCom... | withRequestsPerSecond(reindexRequest.getRequestsPerSecond()); |
510,556 | public void syncAttributesToASIAware(@NonNull final IAttributeSet attributeSet, @NonNull final IAttributeSetInstanceAware asiAware) {<NEW_LINE>final AttributeSetInstanceId oldAsiId = AttributeSetInstanceId.ofRepoIdOrNone(asiAware.getM_AttributeSetInstance_ID());<NEW_LINE>final AttributeSetInstanceId asiId;<NEW_LINE>if ... | ofRepoId(asiCopy.getM_AttributeSetInstance_ID()); |
764,235 | public static String encodeToString(byte[] challenge) throws Exception {<NEW_LINE>if (Platform.isAndroid()) {<NEW_LINE>// Base64.encodeToString(sha256_HMAC.doFinal(challenge), Base64.DEFAULT).trim()<NEW_LINE>// Equivalent of the above commented line of code but using reflections<NEW_LINE>// so that this class works on ... | ].class, int.class); |
1,159,187 | protected void consumeMethodHeaderNameWithTypeParameters(boolean isAnnotationMethod) {<NEW_LINE>// MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('<NEW_LINE>// AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('<NEW_LINE>// RecoveryMethodHeaderName ::= Modifiersopt Typ... | .identifierPositionStack[this.identifierPtr--]; |
943,233 | public <T> Subscriber<T> wrapPublisherSubscriberAndSubscription(final Subscriber<T> subscriber, final ContextMap context) {<NEW_LINE>if (subscriber instanceof ContextPreservingSubscriber) {<NEW_LINE>final ContextPreservingSubscriber<T> s <MASK><NEW_LINE>if (s.saved == context) {<NEW_LINE>return subscriber instanceof Co... | = (ContextPreservingSubscriber<T>) subscriber; |
881,816 | final ActivateUserResult executeActivateUser(ActivateUserRequest activateUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(activateUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.