idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,190,520 | protected void unpackResults(Element testResults) throws InvalidReportException {<NEW_LINE>NodeList references = testResults.getElementsByTagName("pageHistoryReference");<NEW_LINE>for (int referenceIndex = 0; referenceIndex < references.getLength(); referenceIndex++) {<NEW_LINE>Element refElement = (Element) references... | PageHistoryReference(name, time, runTimeInMillis); |
4,644 | final NotifyRecommendationsReceivedResult executeNotifyRecommendationsReceived(NotifyRecommendationsReceivedRequest notifyRecommendationsReceivedRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(notifyRecommendationsReceivedRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | false), new NotifyRecommendationsReceivedResultJsonUnmarshaller()); |
1,795,573 | public static void main(String[] args) {<NEW_LINE>if (!validateCommandLine(args)) {<NEW_LINE>log.info(USAGE);<NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>final TreebankLangParserParams tlpp = LANGUAGE.params;<NEW_LINE>final PrintWriter pwOut = tlpp.pw();<NEW_LINE>final <MASK><NEW_LINE>guessTreebank.loadPath(guessFile... | Treebank guessTreebank = tlpp.diskTreebank(); |
158,439 | private <T> Flux<JsonNode> findItemsAsFlux(@NonNull CosmosQuery query, @NonNull String containerName, @NonNull Class<T> domainType) {<NEW_LINE>final SqlQuerySpec sqlQuerySpec = new FindQuerySpecGenerator().generateCosmos(query);<NEW_LINE>final CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequest... | LOGGER.debug("Setting partition key {}", o); |
1,682,701 | @Path("/" + CANCEL_SCHEDULED_PAYMENT_TRANSACTION)<NEW_LINE>@Consumes(APPLICATION_JSON)<NEW_LINE>@Produces(APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Cancels a scheduled payment attempt retry")<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 204, message = "Successful operation"), @ApiResponse(code = 400, me... | Status.NO_CONTENT).build(); |
862,308 | private ParticleController createDefaultPointController() {<NEW_LINE>// Emission<NEW_LINE>RegularEmitter emitter = new RegularEmitter();<NEW_LINE>emitter.getDuration().setLow(3000);<NEW_LINE>emitter.getEmission().setHigh(250);<NEW_LINE>emitter.getLife().setHigh(500, 1000);<NEW_LINE>emitter.getLife().setTimeline(new flo... | spawnSource, scaleInfluencer, colorInfluencer, velocityInfluencer); |
1,273,604 | private static Map<String, Entry> scanSuiteSources(Map<String, Object> properties, Project project) throws IOException {<NEW_LINE>File basedir = new File((String) properties.get("basedir"));<NEW_LINE>String suiteDir = (String) properties.get("suite.dir");<NEW_LINE>if (suiteDir == null) {<NEW_LINE>throw new IOException(... | entries = SUITE_SCAN_CACHE.get(suite); |
296,019 | public static void propagateError(String errorCode, String errorMessage, Exception origException, ActivityExecution execution) throws Exception {<NEW_LINE>ActivityExecutionHierarchyWalker walker = new ActivityExecutionHierarchyWalker(execution);<NEW_LINE>final ErrorDeclarationForProcessInstanceFinder errorDeclarationFi... | errorDefinition.getErrorCodeVariable(), errorCode); |
533,449 | public ECPoint twicePlus(ECPoint b) {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return b;<NEW_LINE>}<NEW_LINE>if (b.isInfinity()) {<NEW_LINE>return twice();<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>ECFieldElement X1 = this.x;<NEW_LINE>if (X1.isZero()) {<NEW_LINE>// A point with X == 0 is its own a... | L1Z1 = L1.multiply(Z1); |
1,383,457 | public void showVolumeDialog(float deltaY, int volumePercent) {<NEW_LINE><MASK><NEW_LINE>if (mVolumeDialog == null) {<NEW_LINE>View localView = LayoutInflater.from(jzvdContext).inflate(R.layout.jz_dialog_volume, null);<NEW_LINE>mDialogVolumeImageView = localView.findViewById(R.id.volume_image_tip);<NEW_LINE>mDialogVolu... | super.showVolumeDialog(deltaY, volumePercent); |
454,683 | public void stop() throws NoSuchNotificationQueue {<NEW_LINE>if (isStopped) {<NEW_LINE>log.warn("Janitor is already in a stopped state");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>incompletePaymentAttemptTask.stop();<NEW_LINE>try {<NEW_LINE>janitorExecutor.shutdown();<NEW_LINE>final boolean success = janitorExecutor.awaitTe... | warn("Janitor failed to complete termination within " + TERMINATION_TIMEOUT_SEC + "sec"); |
591,332 | public static int modOddInverse(int[] m, int[] x, int[] z) {<NEW_LINE>int len32 = m.length;<NEW_LINE>// assert len32 > 0;<NEW_LINE>// assert (m[0] & 1) != 0;<NEW_LINE>// assert m[len32 - 1] != 0;<NEW_LINE>int bits = (len32 << 5) - Integers.numberOfLeadingZeros(m[len32 - 1]);<NEW_LINE>int len30 = (bits + 29) / 30;<NEW_L... | x, 0, G, 0); |
714,487 | public Limiter buildLimiter(long id) {<NEW_LINE>String[] fields;<NEW_LINE>Object data;<NEW_LINE>Cursor cursor = mCursor;<NEW_LINE>if (cursor == null)<NEW_LINE>return null;<NEW_LINE>for (int i = 0, count = cursor.getCount(); i != count; ++i) {<NEW_LINE>cursor.moveToPosition(i);<NEW_LINE>if (cursor.getLong(0) == id)<NEW_... | MediaLibrary.SongColumns.ALBUM_ID, id); |
225,498 | public Filter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Filter filter = new Filter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = c... | class).unmarshall(context)); |
822,296 | public static DescribeInstanceAutoRenewAttributeResponse unmarshall(DescribeInstanceAutoRenewAttributeResponse describeInstanceAutoRenewAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeInstanceAutoRenewAttributeResponse.setRequestId<MASK><NEW_LINE>describeInstanceAutoRenewAttributeResponse.setPageNumber(... | (_ctx.stringValue("DescribeInstanceAutoRenewAttributeResponse.RequestId")); |
411,098 | private ArrayTypesInternal mergeTypeStates(ArrayTypesInternal a1, ArrayTypesInternal a2) {<NEW_LINE>assert (a1 != null && a2 != null);<NEW_LINE>ArrayTypesInternal toRet = new ArrayTypesInternal();<NEW_LINE>toRet.sizeState.or(a1.sizeState);<NEW_LINE>toRet.sizeState.or(a2.sizeState);<NEW_LINE>int maxSize = Math.max(a1.ty... | .mustAssign.get(i)); |
434,382 | public boolean enabled(RerunType type) {<NEW_LINE>if ((scriptFile == null) || (targets == null) || (targets.length == 0)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (scriptFile.getName().equals(JUNIT_CUSTOM_FILENAME + ".xml")) {<NEW_LINE>// NOI18N<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Project project = testSes... | ).lookup(ActionProvider.class); |
1,818,809 | protected EntityImportView mergeViews(@Nullable EntityImportView view1, @Nullable EntityImportView view2) {<NEW_LINE>if (view1 == null)<NEW_LINE>return view2;<NEW_LINE>if (view2 == null)<NEW_LINE>return view1;<NEW_LINE>EntityImportView mergedView = new EntityImportView(view1.getEntityClass());<NEW_LINE>for (EntityImpor... | EntityImportViewProperty(p1.getName()); |
1,409,927 | public void putBinary(long t, Binary v) {<NEW_LINE>if (writeCurArrayIndex == capacity) {<NEW_LINE>if (capacity >= CAPACITY_THRESHOLD) {<NEW_LINE>timeRet.add(new long[capacity]);<NEW_LINE>binaryRet.add(new Binary[capacity]);<NEW_LINE>writeCurListIndex++;<NEW_LINE>writeCurArrayIndex = 0;<NEW_LINE>} else {<NEW_LINE>int ne... | timeRet.set(0, newTimeData); |
1,389,879 | private void clearSensorData() {<NEW_LINE>sensorDataList.clear();<NEW_LINE>Node[] nodes = getNodes();<NEW_LINE>this.selectedNodes = null;<NEW_LINE>nodeList.clearSelection();<NEW_LINE>if (nodeModel.size() > 1) {<NEW_LINE>nodeModel.removeRange(1, nodeModel.size() - 1);<NEW_LINE>}<NEW_LINE>this.nodeTable.clear();<NEW_LINE... | String property = key.toString(); |
1,273,143 | public String compile(String path, PathContext context) {<NEW_LINE>StrBuilder pathBuilder = new StrBuilder(path);<NEW_LINE>context.getGroup().ifPresent(g -> pathBuilder<MASK><NEW_LINE>context.getTopic().ifPresent(t -> pathBuilder.replaceAll(TOPIC, t));<NEW_LINE>context.getSubscription().ifPresent(s -> pathBuilder.repla... | .replaceAll(GROUP, g)); |
839,341 | public void sync() {<NEW_LINE>_logger.info("Sync Feishu Users...");<NEW_LINE>try {<NEW_LINE>List<SynchroRelated> synchroRelateds = synchroRelatedService.findOrgs(this.synchronizer);<NEW_LINE>for (SynchroRelated relatedOrg : synchroRelateds) {<NEW_LINE>HttpRequestAdapter request = new HttpRequestAdapter();<NEW_LINE>Hash... | setOriginId(feiShuUser.getUnion_id()); |
754,511 | private void checkBlock4RestTemplate(Class<?> blockClass, String blockMethod, String beanName, String type) {<NEW_LINE>if (blockClass == void.class && !StringUtils.hasLength(blockMethod)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (blockClass != void.class && !StringUtils.hasLength(blockMethod)) {<NEW_LINE>log.error("{}... | "{} method attribute exists but {} class attribute is not exists in bean[{}]", type, type, beanName); |
545,922 | public void changeOrder(final RequestContext context) {<NEW_LINE>final JsonRenderer renderer = new JsonRenderer();<NEW_LINE>context.setRenderer(renderer);<NEW_LINE>final JSONObject ret = new JSONObject();<NEW_LINE>try {<NEW_LINE>final JSONObject requestJSONObject = context.requestJSON();<NEW_LINE>final String linkId = ... | e.getMessage(), e); |
1,607,085 | public static void renderPixel(DMatrixRMaj cameraMatrix, Point4D_F64 X, Point3D_F64 pixelH) {<NEW_LINE>DMatrixRMaj P = cameraMatrix;<NEW_LINE>// @formatter:off<NEW_LINE>pixelH.x = P.data[0] * X.x + P.data[1] * X.y + P.data[2] * X.z + P.data[3] * X.w;<NEW_LINE>pixelH.y = P.data[4] * X.x + P.data[5] * X.y + P.data[6] * X... | data[7] * X.w; |
799,311 | public <T> EVCacheOperationFuture<CASValue<T>> asyncGetAndTouch(final String key, final int exp, final Transcoder<T> tc) {<NEW_LINE>final CountDownLatch latch = new CountDownLatch(1);<NEW_LINE>final EVCacheOperationFuture<CASValue<T>> rv = new EVCacheOperationFuture<CASValue<T>>(key, latch, new AtomicReference<CASValue... | mconn.enqueueOperation(key, op); |
1,281,379 | /*package*/<NEW_LINE>static ResponseList<Friendship> createFriendshipList(HttpResponse res, Configuration conf) throws TwitterException {<NEW_LINE>try {<NEW_LINE>if (conf.isJSONStoreEnabled()) {<NEW_LINE>TwitterObjectFactory.clearThreadLocalMap();<NEW_LINE>}<NEW_LINE>JSONArray list = res.asJSONArray();<NEW_LINE><MASK><... | int size = list.length(); |
245,657 | final UpdateDeviceStateResult executeUpdateDeviceState(UpdateDeviceStateRequest updateDeviceStateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDeviceStateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDeviceState"); |
1,628,739 | private <T> Observable<T> handleEndpointConnect(EndpointChange endpoint) {<NEW_LINE>logger.info(<MASK><NEW_LINE>final String unwrappedHost = MasterClientWrapper.getUnwrappedHost(endpoint.getEndpoint().getHost());<NEW_LINE>SinkConnection sinkConnection = sinkConnectionFunc.call(unwrappedHost, endpoint.getEndpoint().getP... | "Opening connection to sink at " + endpoint.toString()); |
1,245,735 | public static SortedBugCollection loadBugs(MainFrame mainFrame, Project project, URL url) {<NEW_LINE>SortedBugCollection col = new SortedBugCollection(project);<NEW_LINE>try {<NEW_LINE>if (MainFrame.GUI2_DEBUG) {<NEW_LINE>System.out.println("loading from: " + url);<NEW_LINE>JOptionPane.showMessageDialog(mainFrame, "loa... | out.println("finished reading: " + url); |
1,734,360 | public void run() {<NEW_LINE>java.util.Map<File, RepositoryNode> nodes = new HashMap<File, RepositoryNode>();<NEW_LINE>for (File r : newValues) {<NEW_LINE>RepositoryInfo info = RepositoryInfo.getInstance(r);<NEW_LINE>if (info == null) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.INFO, "RepositoriesChildren.propertyChang... | new RepositoryNode(r, info)); |
269,919 | final DescribeCopyJobResult executeDescribeCopyJob(DescribeCopyJobRequest describeCopyJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCopyJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | (super.beforeMarshalling(describeCopyJobRequest)); |
1,468,077 | private <EnumT extends Enum<EnumT> & TEnum> FieldType beamType(FieldValueMetaData metadata) {<NEW_LINE>if (metadata.isTypedef()) {<NEW_LINE>final FieldType beamType = typedefs.get(metadata.getTypedefName());<NEW_LINE>if (beamType != null) {<NEW_LINE>return beamType;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>switch(metadata.type) ... | .array(beamType(listElemMetadata)); |
573,931 | public static void main(String[] args) {<NEW_LINE>ServiceNamespace ns = ServiceNamespace.Dynamodb;<NEW_LINE>ScalableDimension tableWCUs = ScalableDimension.DynamodbTableWriteCapacityUnits;<NEW_LINE>String resourceID = "table/TestTable";<NEW_LINE>// Delete the scaling policy<NEW_LINE>DeleteScalingPolicyRequest delSPRequ... | System.err.println("Unable to describe scalable target: "); |
98,795 | protected void collectMetadata(Class clazz) {<NEW_LINE>if (clazz == null)<NEW_LINE>return;<NEW_LINE>PrimaryKeyJoinColumn primaryKey = (PrimaryKeyJoinColumn) clazz.getAnnotation(PrimaryKeyJoinColumn.class);<NEW_LINE>if (primaryKey != null) {<NEW_LINE>idColumn = primaryKey.name();<NEW_LINE>} else {<NEW_LINE>idColumn = re... | clazz.getAnnotation(DiscriminatorValue.class); |
176,520 | private static QuadTree build(int dim, double[][] data, int begin, int end) {<NEW_LINE>double[] minmax = computeExtend(dim, data, begin, end);<NEW_LINE>double squareSize = computeSquareSize(minmax);<NEW_LINE>double[] mid = computeCenterofMass(dim, data, begin, end);<NEW_LINE>// Leaf:<NEW_LINE>final int size = end - beg... | chil, mid, size, squareSize); |
239,859 | final ListFindingsFiltersResult executeListFindingsFilters(ListFindingsFiltersRequest listFindingsFiltersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFindingsFiltersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,624,081 | final DisassociateDRTRoleResult executeDisassociateDRTRole(DisassociateDRTRoleRequest disassociateDRTRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateDRTRoleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | invoke(request, responseHandler, executionContext); |
633,159 | public static void fmlInit() {<NEW_LINE>CustomRotationHelper.INSTANCE.registerHandlerForAll(BlockButton.class, VanillaRotationHandlers::rotateButton);<NEW_LINE>CustomRotationHelper.INSTANCE.registerHandlerForAll(BlockTripWireHook.class, VanillaRotationHandlers::rotateTripWireHook);<NEW_LINE>CustomRotationHelper.INSTANC... | BlockTorch.class, VanillaRotationHandlers::rotateTorch); |
548,164 | private void classifyGetter(ExecutableElement builderGetter, String propertyName) {<NEW_LINE>TypeMirror originalGetterType = rewrittenPropertyTypes.get(propertyName);<NEW_LINE>TypeMirror builderGetterType = builderMethodReturnType(builderGetter);<NEW_LINE>String builderGetterTypeString = TypeEncoder.encodeWithAnnotatio... | " instead of %3$s or an Optional wrapping of %3$s", builtType, builderGetterType, originalGetterType); |
1,693,220 | public static void browseDirectory(File directory) {<NEW_LINE>try {<NEW_LINE>if (!SystemUtilities.isMac()) {<NEW_LINE>Desktop.getDesktop().open(directory);<NEW_LINE>} else {<NEW_LINE>// Mac tries to open the .app rather than browsing it. Instead, pass a child to select it in finder<NEW_LINE>File[] files = directory.li... | [0].getCanonicalFile()); |
1,642,007 | // This method prints nodes in top view of binary tree<NEW_LINE>public void printTopView() {<NEW_LINE>// base case<NEW_LINE>if (root == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Creates an empty hashset<NEW_LINE>HashSet<Integer> set = new HashSet<>();<NEW_LINE>// Create a queue and add root to it<NEW_LINE>Queue<Q... | = new LinkedList<QItem>(); |
1,139,430 | private void extractData(Path p, Path outRoot, int resultLimit, int maxAmbigiousWordCount) throws IOException {<NEW_LINE>List<Path> files = Files.walk(p, 1).filter(s -> s.toFile().isFile()).<MASK><NEW_LINE>BatchResult result = new BatchResult();<NEW_LINE>int i = 0;<NEW_LINE>for (Path file : files) {<NEW_LINE>Log.info("... | collect(Collectors.toList()); |
411,173 | public boolean process(NacosTask task) {<NEW_LINE>ServiceChangeV1Task serviceTask = (ServiceChangeV1Task) task;<NEW_LINE>if (serviceTask.getAction() == DoubleWriteAction.REMOVE) {<NEW_LINE>Loggers.SRV_LOG.info("double write removal of service {}, ephemeral: {}", serviceTask.getServiceName(), serviceTask.isEphemeral());... | ApplicationUtils.getBean(ServiceManager.class); |
467,752 | public final CursorStatementContext cursorStatement() throws RecognitionException {<NEW_LINE>CursorStatementContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 364, RULE_cursorStatement);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>setState(4271);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<... | CursorStatementContext(_ctx, getState()); |
691,374 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>final LinearLayout parent = new LinearLayout(this);<NEW_LINE>final ComponentContext componentContext = new ComponentContext(this);<NEW_LINE>mLithoView = LithoView.create(componentContext, Column.create(componentConte... | fragment_view, lifecycleFragment).commit(); |
1,230,988 | protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>final String reqBody = RestTestUtilities.readRequestBodyAsString(req);<NEW_LINE>System.out.println("REST TEST: --Remote Responses=-");<NEW_LINE>System.out.println(" Received: " + reqBody)... | resp.setHeader("Content-Type", "application/json"); |
596,795 | public boolean deleteSnapshot(SnapshotInfo snapInfo) {<NEW_LINE>snapInfo.processEvent(ObjectInDataStoreStateMachine.Event.DestroyRequested);<NEW_LINE>AsyncCallFuture<SnapshotResult> future = new AsyncCallFuture<SnapshotResult>();<NEW_LINE>DeleteSnapshotContext<CommandResult> context = new DeleteSnapshotContext<CommandR... | "delete snapshot is failed: " + e.toString()); |
96,380 | private void listConfigs(String domain, Model model) {<NEW_LINE>BusinessReportConfig config = m_configManager.queryConfigByDomain(domain);<NEW_LINE>Map<String, Set<String>> tags = m_tagConfigManger.findTagByDomain(domain);<NEW_LINE>List<BusinessItemConfig> configs = new ArrayList<BusinessItemConfig>(config.getBusinessI... | .getViewOrder()) * 100); |
761,318 | public Result<TracePoint> readSlowPoints(String agentRollupId, TraceQuery query, TracePointFilter filter, int limit) throws Exception {<NEW_LINE>BoundStatement boundStatement;<NEW_LINE>BoundStatement boundStatementPartial;<NEW_LINE>String transactionName = query.transactionName();<NEW_LINE>if (transactionName == null) ... | boundStatement, agentRollupId, query, true); |
796,958 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setTitle(R.string.diff_title);<NEW_LINE>setContentView(R.layout.title_layout);<NEW_LINE>viewFlow = (ViewFlow) findViewById(R.id.viewflow);<NEW_LINE><MASK><NEW_LINE>viewFlow.setAdapter(adapter);<NEW_LINE>TitleFlowIndi... | DiffAdapter adapter = new DiffAdapter(this); |
1,655,237 | public IPacket deserialize(byte[] data, int offset, int length) throws PacketParsingException {<NEW_LINE>ByteBuffer bb = ByteBuffer.wrap(data, offset, length);<NEW_LINE>byte[] magicConstant <MASK><NEW_LINE>bb.get(magicConstant, 0, MAGIC_CONSTANT.length);<NEW_LINE>if (!Arrays.equals(magicConstant, MAGIC_CONSTANT)) {<NEW... | = new byte[MAGIC_CONSTANT.length]; |
1,589,991 | protected mxCellMarker createMarker() {<NEW_LINE>mxCellMarker marker = new mxCellMarker(graphComponent, Color.BLUE) {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = -8451338653189373347L;<NEW_LINE><NEW_LINE>public boolean isEnabled() {<NEW_LINE>return graphComponent.getGraph().isDropEnabled();<NEW_LINE... | parent = model.getParent(parent); |
1,232,215 | public Request<DescribeReservedNodesRequest> marshall(DescribeReservedNodesRequest describeReservedNodesRequest) {<NEW_LINE>if (describeReservedNodesRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeReservedNodesRequest> request = n... | (describeReservedNodesRequest.getReservedNodeId())); |
1,839,686 | public com.amazonaws.services.glacier.model.RequestTimeoutException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.glacier.model.RequestTimeoutException requestTimeoutException = new com.amazonaws.services.glacier.model.RequestTimeoutException(null);<NEW_LINE>i... | class).unmarshall(context)); |
804,671 | public static List<RBAC> translate(String authorizationPolicy) throws IllegalArgumentException, IOException {<NEW_LINE>Object <MASK><NEW_LINE>if (!(jsonObject instanceof Map)) {<NEW_LINE>throw new IllegalArgumentException("Authorization policy should be a JSON object. Found: " + (jsonObject == null ? null : jsonObject.... | jsonObject = JsonParser.parse(authorizationPolicy); |
387,168 | private void constructOutputChunk(List<ComplexEventChunk> outputEventChunks, AggregationGroupByRateLimiterState state) {<NEW_LINE>ComplexEventChunk<ComplexEvent> outputEventChunk = new ComplexEventChunk<>();<NEW_LINE>Set<String> outputGroupingKeys = new HashSet<>();<NEW_LINE>for (GroupedComplexEvent originalComplexEven... | state.groupByAggregateAttributeValueMap.get(currentGroupByKey); |
1,099,800 | private static boolean checkAccess(Class<?> invoker, Member target, Object anInstance) {<NEW_LINE>int modifiers = target.getModifiers();<NEW_LINE>boolean isStatic = Modifier.isStatic(modifiers);<NEW_LINE>boolean isPublic = Modifier.isPublic(modifiers);<NEW_LINE>boolean <MASK><NEW_LINE>boolean isPrivate = Modifier.isPri... | isProtected = Modifier.isProtected(modifiers); |
1,506,336 | // computes all subtractions in input string also had to be called twice in gunnercal<NEW_LINE>public static String addition(String input) {<NEW_LINE>double num1 = 0, num2 = 0, ans = 0;<NEW_LINE>int b = 0, t1 = 0, t2 = 0;<NEW_LINE>String anstring = "";<NEW_LINE>String temp = "";<NEW_LINE>int count = 0;<NEW_LINE>while (... | input.substring(t2 + 1); |
1,681,626 | public AuthenticatedClientSessionModel createClientSession(RealmModel realm, ClientModel client, UserSessionModel userSession) {<NEW_LINE>final UUID clientSessionId = keyGenerator.generateKeyUUID(session, clientSessionCache);<NEW_LINE>AuthenticatedClientSessionEntity entity = new AuthenticatedClientSessionEntity(client... | () : UserSessionModel.SessionPersistenceState.PERSISTENT; |
242,359 | private void requestProbes(final ImmutableMember suspect) {<NEW_LINE>final Collection<SwimMember> members = selectRandomMembers(config.getSuspectProbes() - 1, suspect);<NEW_LINE>if (!members.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>final AtomicBoolean succeeded = new AtomicBoolean();<NEW_LINE>for (final SwimMember member ... | final AtomicInteger counter = new AtomicInteger(); |
1,815,888 | public UploadPartCopyResult uploadPartCopy(UploadPartCopyRequest uploadPartCopyRequest) throws OSSException, ClientException {<NEW_LINE>assertParameterNotNull(uploadPartCopyRequest, "uploadPartCopyRequest");<NEW_LINE><MASK><NEW_LINE>String bucketName = uploadPartCopyRequest.getBucketName();<NEW_LINE>String uploadId = u... | String key = uploadPartCopyRequest.getKey(); |
1,538,659 | private // NOSONAR<NEW_LINE>// NOSONAR<NEW_LINE>void addQuoteDeltaColumn() {<NEW_LINE>// create a modifiable copy as all menus share the same list of<NEW_LINE>// reporting periods<NEW_LINE>List<ReportingPeriod> options = new ArrayList<>(view.getPart().getReportingPeriods());<NEW_LINE>BiFunction<Object, ReportingPeriod,... | valueProvider.apply(o2, option); |
1,486,698 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<NEW_LINE>static public void fromNativeImage(Image img, PImage out) {<NEW_LINE>out.format = RGB;<NEW_LINE>out.pixels = null;<NEW_LINE>if (img instanceof BufferedImage) {<NEW_LINE>BufferedImage bi = (BufferedImage) img;<NEW_LINE>out.width = bi.g... | DataBufferInt) db).getData(); |
562,775 | public Map<K, V> build(Object[] array) {<NEW_LINE>if (array == null)<NEW_LINE>throw new NullPointerException("array == null");<NEW_LINE>long filteredBitSet = 0;<NEW_LINE>int i = 0, numFiltered = 0;<NEW_LINE>for (; i < array.length; i += 2) {<NEW_LINE>// we ignore anything starting at first null key<NEW_LINE>if (array[i... | filteredBitSet = setFilteredKey(filteredBitSet, i); |
1,635,655 | public RowBasedMatrix calulate(Matrix other, Binary op) {<NEW_LINE>assert other instanceof RowBasedMatrix;<NEW_LINE>if (op.isInplace()) {<NEW_LINE>for (int i = 0; i < rows.length; i++) {<NEW_LINE>if (null == rows[i]) {<NEW_LINE>initEmpty(i);<NEW_LINE>}<NEW_LINE>if (null == ((RowBasedMatrix) other).rows[i]) {<NEW_LINE>(... | .rows[i], op); |
894,880 | public void tickFlower() {<NEW_LINE>super.tickFlower();<NEW_LINE>if (!getLevel().isClientSide && ticksExisted % 5 == 0) {<NEW_LINE>if (getMana() >= COST) {<NEW_LINE>BlockPos coords = getCoordsToPut();<NEW_LINE>if (coords != null) {<NEW_LINE>int stateId = Block.getId(getLevel().getBlockState(coords));<NEW_LINE>getLevel(... | LevelEvent.PARTICLES_DESTROY_BLOCK, coords, stateId); |
665,323 | private void parseRelatesToNode(SoapVersion soapVersion, XmlObject requestXmlObject, Element relatesToNode) {<NEW_LINE>if (relatesToNode == null) {<NEW_LINE>cumulativeErrorMsg.append("WS-A RelatesTo property is not specified. ");<NEW_LINE>} else {<NEW_LINE>String <MASK><NEW_LINE>if (StringUtils.isNullOrEmpty(relatesToV... | relatesToValue = XmlUtils.getElementText(relatesToNode); |
1,393,721 | public UserAuthConfigInfo unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>UserAuthConfigInfo userAuthConfigInfo = new UserAuthConfigInfo();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<N... | int originalDepth = context.getCurrentDepth(); |
1,354,310 | public void mouseDragged(final MouseEvent e) {<NEW_LINE>final NodeView nodeV = getNodeView(e);<NEW_LINE>if (!isDragActive()) {<NEW_LINE>if (!nodeV.isSelected())<NEW_LINE>super.mouseDragged(e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) == (InputEvent.BUTTON1_DOWN_MASK))... | .getChildDistanceContainer().getModel(); |
82,541 | public void printDocumentTopics(ArrayList<Topication> dataset, PrintWriter pw, double threshold, int max) {<NEW_LINE>pw.print("#doc source topic proportion ...\n");<NEW_LINE>int docLen;<NEW_LINE>int[] topicCounts = new int[numTopics];<NEW_LINE>IDSorter[] sortedTopics = new IDSorter[numTopics];<NEW_LINE>for (int topic =... | dataset.get(di).topicSequence; |
56,515 | public void handleLabelsFileUpload(FileUploadEvent event) {<NEW_LINE>logger.fine("entering handleUpload method.");<NEW_LINE>UploadedFile file = event.getFile();<NEW_LINE>if (file != null) {<NEW_LINE>InputStream uploadStream = null;<NEW_LINE>try {<NEW_LINE>uploadStream = file.getInputStream();<NEW_LINE>} catch (IOExcept... | file.getFileName() + " is successfully uploaded."); |
822,226 | protected void handle(final CancelDownloadImageMsg msg) {<NEW_LINE>CancelDownloadImageReply reply = new CancelDownloadImageReply();<NEW_LINE>CancelCommand cmd = new CancelCommand();<NEW_LINE>cmd.setCancellationApiId(msg.getCancellationApiId());<NEW_LINE>restf.asyncJsonPost(buildUrl(AgentConstant.CANCEL_JOB), cmd, new J... | bus.reply(msg, reply); |
407,117 | void writeUncompressed(boolean isTopDown, BufferedImage img, int height, int width) throws IOException {<NEW_LINE>if (img.getType() != BufferedImage.TYPE_4BYTE_ABGR) {<NEW_LINE>throw new IIOException("Only TYPE_4BYTE_ABGR supported");<NEW_LINE>}<NEW_LINE>// Support<NEW_LINE>// - TODO: IndexColorModel (ucompressed, RLE4... | * i / (float) height); |
180,574 | public void populateExistingIssuesForType(Map<String, String> ruleParam) throws Exception {<NEW_LINE>String esUrl = ESUtils.getEsUrl();<NEW_LINE>String ruleId = ruleParam.get(PacmanSdkConstants.RULE_ID);<NEW_LINE>String indexName = CommonUtils.getIndexNameFromRuleParam(ruleParam);<NEW_LINE>Map<String, Object> mustFilte... | shouldFilter.put("type.keyword", "issue"); |
1,616,669 | private Mono<PagedResponse<SkuOverviewInner>> listByVendorSinglePageAsync(String vendorName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (vendorName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter vendorName is req... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,315,873 | public JsonResult execute() throws InvalidHttpRequestBodyException, InvalidOperationException {<NEW_LINE>AccountCreateRequest createRequest = getAndValidateRequestBody(AccountCreateRequest.class);<NEW_LINE>String instructorName = createRequest.getInstructorName().trim();<NEW_LINE>String instructorEmail = createRequest.... | generateNewInstructorAccountJoinEmail(instructorEmail, instructorName, joinLink); |
1,250,779 | public static void main(String[] args) throws InterruptedException {<NEW_LINE>try (final KubernetesClient client = new KubernetesClientBuilder().build()) {<NEW_LINE>SharedInformerFactory sharedInformerFactory = client.informers();<NEW_LINE>SharedIndexInformer<Pod> podInformer = sharedInformerFactory.sharedIndexInformer... | myPod = podLister.get(POD_NAME); |
1,576,932 | static void addAnnotatedFields(List<Monitor<?>> monitors, String id, TagList tags, Object obj) {<NEW_LINE>final Class<com.netflix.servo.annotations.Monitor> annoClass = com.netflix.servo.annotations.Monitor.class;<NEW_LINE>try {<NEW_LINE>Set<Field> fields = getFieldsAnnotatedBy(obj.getClass(), annoClass);<NEW_LINE>for ... | ), id, anno, tags); |
1,252,033 | public void route(EventBean theEvent, EPStatementHandle statementHandle, InternalEventRouteDest routeDest, ExprEvaluatorContext exprEvaluatorContext, boolean addToFront, int precedence) {<NEW_LINE>if (!hasPreprocessing) {<NEW_LINE>if (insertIntoListener != null) {<NEW_LINE>boolean route = insertIntoListener.inserted(th... | exprEvaluatorContext, exprEvaluatorContext.getInstrumentationProvider()); |
630,536 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = source.getSourceObject(game);<NEW_LINE>if (controller == null || sourceObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>FilterCard filter = new FilterCa... | game.addEffect(effect, source); |
1,381,795 | private static void tryAssertion13_14(RegressionEnvironment env, String stmtText, String outputLimit, AtomicInteger milestone) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>env.compileDeploy(stmtText).addListener("s0");<NEW_LINE>String[] fields = new String[] { "symbol", "volume", "price" };<NEW_LINE>ResultAssertTestResult ex... | "YAH", 11500L, 3d } }); |
1,387,413 | private boolean tryPublicKey(PubkeyBean pubkey) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException {<NEW_LINE>KeyPair pair = null;<NEW_LINE>if (manager.isKeyLoaded(pubkey.getNickname())) {<NEW_LINE>// load this key from memory if its already there<NEW_LINE>Log.d(TAG, String.format("Found unlocked key... | , pubkey.getNickname())); |
1,771,277 | protected synchronized void createQuery(String queryString) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("EJBQL query: " + queryString);<NEW_LINE>}<NEW_LINE>query = em.createQuery(queryString);<NEW_LINE>// Set parameters.<NEW_LINE>List<String> parameterNames = getCollectedParameterNames();<NEW_LINE>if (!pa... | > pairs = i.next(); |
569,532 | public void rotateLeft(IBuilderContext context) {<NEW_LINE>SideProperties props = new SideProperties();<NEW_LINE>props.readFromNBT(tileNBT);<NEW_LINE>props.rotateLeft();<NEW_LINE>props.writeToNBT(tileNBT);<NEW_LINE>Item pipeItem;<NEW_LINE>if (tileNBT.hasKey("pipeId", Constants.NBT.TAG_INT)) {<NEW_LINE>pipeItem = Item.g... | ] gatesNBT = new NBTTagCompound[6]; |
1,132,191 | public Void doCall(final EntitlementApi entitlementApi, final DefaultEntitlementContext updatedPluginContext) throws EntitlementApiException {<NEW_LINE>if (eventsStream.isSubscriptionCancelled()) {<NEW_LINE>throw new EntitlementApiException(ErrorCode.SUB_UNCANCEL_BAD_STATE, getId());<NEW_LINE>}<NEW_LINE>final InternalC... | ErrorCode.ENT_UNCANCEL_BAD_STATE, getId()); |
1,820,131 | public SaleOrder addPack(SaleOrder saleOrder, Pack pack, BigDecimal packQty) {<NEW_LINE>List<PackLine> packLineList = pack.getComponents();<NEW_LINE>if (ObjectUtils.isEmpty(packLineList)) {<NEW_LINE>return saleOrder;<NEW_LINE>}<NEW_LINE>packLineList.sort(Comparator<MASK><NEW_LINE>Integer sequence = -1;<NEW_LINE>List<Sa... | .comparing(PackLine::getSequence)); |
1,353,615 | private static StringBuilder appendPath(StringBuilder sb, int indent, PathIterator pathIterator) {<NEW_LINE>double[] coords = new double[6];<NEW_LINE>while (!pathIterator.isDone()) {<NEW_LINE>int type = pathIterator.currentSegment(coords);<NEW_LINE>String typeStr;<NEW_LINE>int endIndex;<NEW_LINE>switch(type) {<NEW_LINE... | throw new IllegalStateException("Invalid type=" + type); |
1,839,740 | public void handleStategyFailover() {<NEW_LINE>if (mIntentScanStrategyCoordinator != null) {<NEW_LINE>if (mIntentScanStrategyCoordinator.getDisableOnFailure() && mIntentScanStrategyCoordinator.getLastStrategyFailureDetectionCount() > 0) {<NEW_LINE>mIntentScanStrategyCoordinator = null;<NEW_LINE>LogManager.d(TAG, "unbin... | LogManager.d(TAG, "Done with failover"); |
20,765 | public void initialize(ExtensionContext context) {<NEW_LINE>Monitor monitor = context.getMonitor();<NEW_LINE>if (initialized) {<NEW_LINE>monitor.severe(() -> "DaybookTransferExtension is already initialized");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature... | , mapper, jobStore, BASE_URL)); |
456,039 | public static boolean saveReminders(ArrayList<ContentProviderOperation> ops, long eventId, ArrayList<ReminderEntry> reminders, ArrayList<ReminderEntry> originalReminders, boolean forceSave) {<NEW_LINE>// If the reminders have not changed, then don't update the database<NEW_LINE>if (reminders.equals(originalReminders) &... | re = reminders.get(i); |
602,165 | public ICompilationUnit handleClosed(DidCloseTextDocumentParams params) {<NEW_LINE>String uri = params.getTextDocument().getUri();<NEW_LINE>ICompilationUnit unit = JDTUtils.resolveCompilationUnit(uri);<NEW_LINE>if (unit == null) {<NEW_LINE>return unit;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>synchronized (toReconcile) {<NEW... | getUnderlyingResource().getLocationURI()); |
552,667 | public void activate(ChannelHandlerContext ctx) {<NEW_LINE>this.ctx = ctx;<NEW_LINE>sendMsgFlag = true;<NEW_LINE>sendTask = sendTimer.scheduleAtFixedRate(() -> {<NEW_LINE>try {<NEW_LINE>if (sendMsgFlag) {<NEW_LINE>send();<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Unhandled exception", e);<NEW_L... | ), e.getMessage()); |
884,161 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>return doQuery(null);<NEW_LINE>}<NEW_LINE>Object[] objs = null;<NEW_LINE>if (param.isLeaf()) {<NEW_LINE>objs = new Object[1];<NEW_LINE>objs[0] = param.<MASK><NEW_LINE>return doQuery(objs);<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NE... | getLeafExpression().calculate(ctx); |
888,394 | public void after(Object target, Object[] args, Object result, Throwable throwable) {<NEW_LINE>if (isDebug) {<NEW_LINE>logger.afterInterceptor(target, args);<NEW_LINE>}<NEW_LINE>// Ignore monitor service<NEW_LINE>if (isMonitorService(target)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Trace trace = traceContext.curre... | recordAttribute(DubboConstants.DUBBO_RESULT_ANNOTATION_KEY, result); |
1,309,423 | public void marshall(StartBackupJobRequest startBackupJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startBackupJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(startBackupJobRequest... | e.getMessage(), e); |
1,224,203 | public PythonObject toPython(Map javaObject) {<NEW_LINE>PythonGIL.assertThreadSafe();<NEW_LINE>PyObject pyDict = PyDict_New();<NEW_LINE>for (Object k : javaObject.keySet()) {<NEW_LINE>PythonObject pyKey;<NEW_LINE>if (k instanceof PythonObject) {<NEW_LINE>pyKey = (PythonObject) k;<NEW_LINE>} else if (k instanceof PyObje... | String keyStr = pyKey.toString(); |
1,582,607 | public void handleLine(String line, PropertiesParserState state) {<NEW_LINE>Stack<ClassSettings> innerClassStartPoints = getOrInit(state);<NEW_LINE>DrawHandler drawer = state.getDrawer();<NEW_LINE>if (line.equals(START)) {<NEW_LINE>ClassSettings settings = new ClassSettings(state.getAlignment().getHorizontal(), state.g... | xLimit = state.getXLimits(height); |
1,587,254 | public long argmax() {<NEW_LINE>LongFloatVectorStorage idstorage = (LongFloatVectorStorage) storage;<NEW_LINE>if (idstorage.size() == 0)<NEW_LINE>return -1;<NEW_LINE>float maxval = Float.MIN_VALUE;<NEW_LINE>long maxidx = -1;<NEW_LINE>if (idstorage.isSparse()) {<NEW_LINE>ObjectIterator<Long2FloatMap.Entry> iter = idstor... | long size = idstorage.size(); |
1,718,046 | public Object indexValueStrProp(List<Object> parameters, String lastParam, String props, Map<String, String> map, List<String> oldKeys, List<String> oldKeysNormalized) throws ParserException {<NEW_LINE>String value = "";<NEW_LINE>Object retval = null;<NEW_LINE>String delim = ";";<NEW_LINE>int minParams = 2;<NEW_LINE>in... | intval = Integer.decode(value); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.