idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
311,140 | public void loadData() {<NEW_LINE>if (!isAdded()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mService = PublicizeTable.getService(mServiceId);<NEW_LINE>if (mService == null) {<NEW_LINE>ToastUtils.showToast(getActivity(), R.string.error_generic);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>setTitle(mService.getLabel());<NEW_LINE>/... | findViewById(R.id.text_description); |
1,199,444 | public void paintComponent(Graphics g_) {<NEW_LINE>Rectangle clip = g_.getClipBounds();<NEW_LINE>if (clip.height < 0)<NEW_LINE>return;<NEW_LINE>Graphics2D g = (Graphics2D) getComponentGraphics(g_);<NEW_LINE>AffineTransform old = setMirrorTransformIfNeeded(g, 0, getWidth());<NEW_LINE>EditorUIUtil.setupAntialiasing(g);<N... | paintLineNumbers(g, startVisualLine, endVisualLine); |
273,937 | public void run(CompilationController cc) throws Exception {<NEW_LINE><MASK><NEW_LINE>Element element = oldHandle.resolveElement(cc);<NEW_LINE>if (element == null || element.getKind() != ElementKind.METHOD) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PropertyType type = null;<NEW_LINE>ExecutableElement ee = (ExecutableEleme... | cc.toPhase(Phase.RESOLVED); |
44,063 | final DeleteClientVpnEndpointResult executeDeleteClientVpnEndpoint(DeleteClientVpnEndpointRequest deleteClientVpnEndpointRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteClientVpnEndpointRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,057,598 | private void writeKeyValuesTo(NavigableMap<DataKey, DataValue> map, OutputStream outStream, DataSourceTable sourceTable, byte[] sourceTableBytes) throws IOException {<NEW_LINE>Set<Map.Entry<DataKey, DataValue>> entries = map.entrySet();<NEW_LINE>int[] orderedValueSizes = new int[entries.size()];<NEW_LINE>int valueSizeI... | outStream, orderedValueSizes[valueSizeIndex++]); |
206,535 | public void refreshActiveWork(Map<String, List<KeyedGetDataRequest>> active) {<NEW_LINE>activeHeartbeats.<MASK><NEW_LINE>try {<NEW_LINE>if (useStreamingRequests) {<NEW_LINE>// With streaming requests, always send the request even when it is empty, to ensure that<NEW_LINE>// we trigger health checks for the stream even ... | set(active.size()); |
1,554,278 | Annotation annotate(File file, String revision) throws IOException {<NEW_LINE>ArrayList<String> argv = new ArrayList<>();<NEW_LINE>ensureCommand(CMD_PROPERTY_KEY, CMD_FALLBACK);<NEW_LINE>argv.add(RepoCommand);<NEW_LINE>argv.add("annotate");<NEW_LINE>argv.add(file.getName());<NEW_LINE>Properties props = getProperties(fi... | branch = props.getProperty(BRANCH_PROPERTY); |
950,279 | static public ETuple2 compile(EObject obj1, EObject obj2) {<NEW_LINE>if (obj1 instanceof ECompiledRE) {<NEW_LINE>return new ETuple2(ERT.am_ok, obj1);<NEW_LINE>}<NEW_LINE>ESeq opts = obj2.testSeq();<NEW_LINE>Options o = new Options();<NEW_LINE>String pattern;<NEW_LINE>ETuple4 tup = ETuple4.cast(obj1);<NEW_LINE>if (tup !... | = tup.elem4.testBinary(); |
1,430,635 | private void annotatePromoterOverlaps(final SimpleInterval variantInterval, final Map<String, Set<String>> variantConsequenceDict) {<NEW_LINE>final Set<String> <MASK><NEW_LINE>variantConsequenceDict.values().forEach(codingAnnotationGenes::addAll);<NEW_LINE>final Iterator<SVIntervalTree.Entry<String>> promotersForVarian... | codingAnnotationGenes = new HashSet<>(); |
310,857 | private void lowerInvoke(Invoke invoke, LoweringTool tool, StructuredGraph graph) {<NEW_LINE>if (invoke.callTarget() instanceof MethodCallTargetNode) {<NEW_LINE>MethodCallTargetNode callTarget = (MethodCallTargetNode) invoke.callTarget();<NEW_LINE>NodeInputList<ValueNode> parameters = callTarget.arguments();<NEW_LINE>V... | javaType(tool.getMetaAccess()); |
1,437,937 | public boolean removeErrorBarPolicy(final IErrorBarPolicy<?> errorBarPolicy) {<NEW_LINE>boolean result = false;<NEW_LINE>if (Chart2D.DEBUG_THREADING) {<NEW_LINE>System.out.println("addErrorBarPolicy, 0 locks");<NEW_LINE>}<NEW_LINE>this.ensureInitialized();<NEW_LINE>synchronized (this.m_renderer) {<NEW_LINE>if (Chart2D.... | this.m_errorBarPolicies.remove(errorBarPolicy); |
2,768 | public static boolean simpleChimeraWithStichableAlignments(final AlignmentInterval intervalOne, final AlignmentInterval intervalTwo) {<NEW_LINE>if (intervalOne.startInAssembledContig > intervalTwo.startInAssembledContig)<NEW_LINE>throw new IllegalArgumentException("Assumption that input intervals are sorted by their st... | intervalTwo.referenceSpan.getStart()); |
202,815 | public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, final boolean isOnTheFly, @NotNull final LocalInspectionToolSession session) {<NEW_LINE>final PsiFile file = holder.getFile();<NEW_LINE>final VirtualFile virtualFile = file.getVirtualFile();<NEW_LINE>final Project project = holder.getProject();... | indexFacade.isPartialSpecFile(virtualFile, project); |
234,365 | protected void buildAreas() {<NEW_LINE>areas = new ArrayList<>();<NEW_LINE>String mapProperty = properties.get(Image.PN_MAP, String.class);<NEW_LINE>if (StringUtils.isNotEmpty(mapProperty)) {<NEW_LINE>// Parse the image map areas as defined at {@code Image.PN_MAP}<NEW_LINE>String[] mapAreas = StringUtils.split(mapPrope... | (remainingTokens[0], "\""); |
493,847 | private Object parseArrayValue(StringTokenizer tokenizer) {<NEW_LINE>Object arrayContents;<NEW_LINE>String contentType;<NEW_LINE>String token;<NEW_LINE>// index type<NEW_LINE>token = <MASK><NEW_LINE>checkExpectedToken(INT_TOKEN, token);<NEW_LINE>contentType = consumeTokens(tokenizer, NEW_LINE_TOKEN, BLANK_SPACE_TOKEN);... | consumeTokens(tokenizer, NEW_LINE_TOKEN, BLANK_SPACE_TOKEN); |
125,161 | public ListExecutionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListExecutionsResult listExecutionsResult = new ListExecutionsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>Jso... | int originalDepth = context.getCurrentDepth(); |
881,283 | public void marshall(ContainerRecipeSummary containerRecipeSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (containerRecipeSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(containerRecipeSum... | containerRecipeSummary.getName(), NAME_BINDING); |
1,837,337 | public String propertiesToString(boolean skipIfChild) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>@SuppressWarnings("HiddenField")<NEW_LINE>List<MASK><NEW_LINE>// eliminate children (they are rendered as part of the tree)<NEW_LINE>int remainingProperties = TO_STRING_MAX_PROP;<NEW_LINE>int maxWidth = 0;<... | <?> children = children(); |
291,740 | public void run() {<NEW_LINE>// Guava Stopwatch is useful here, for a friendlier toString, but the versions of Guava<NEW_LINE>// are different in incompatible ways, so we avoid it here and use Duration instead, so<NEW_LINE>// there won't be conflicts.<NEW_LINE>long startTime;<NEW_LINE>Duration duration;<NEW_LINE>if (!R... | System.nanoTime() - startTime); |
1,746,278 | public void scrutinize(Statement statement, EntityIdValue entityId, boolean added) {<NEW_LINE>if (!added) {<NEW_LINE>// not scrutinizing removed statements<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Snak mainSnak = statement.getClaim().getMainSnak();<NEW_LINE>PropertyIdValue pid = mainSnak.getPropertyId();<NEW_LINE>List<Stat... | issue.setProperty("property_entity", pid); |
18,239 | private Object readResponse(TProtocol in) throws Exception {<NEW_LINE><MASK><NEW_LINE>reader.readStructBegin();<NEW_LINE>Object results = null;<NEW_LINE>Exception exception = null;<NEW_LINE>while (reader.nextField()) {<NEW_LINE>if (reader.getFieldId() == 0) {<NEW_LINE>results = reader.readField(successCodec);<NEW_LINE>... | TProtocolReader reader = new TProtocolReader(in); |
241,242 | public static ImageResult toJpeg(@NonNull ImageProxy image, boolean flip) throws IOException {<NEW_LINE>ImageProxy.PlaneProxy[] planes = image.getPlanes();<NEW_LINE>ByteBuffer buffer = planes[0].getBuffer();<NEW_LINE>Rect cropRect = shouldCropImage(image) ? image.getCropRect() : null;<NEW_LINE>byte[] data = new byte[bu... | TAG, "Ignoring the stated rotation and rotating the crop rect 90 degrees (stated rotation is " + rotation + " degrees)."); |
547,145 | private JPanel destinationDirPanel() {<NEW_LINE>JPanel panel = new JPanel(new GridLayout(2, 1));<NEW_LINE>panel.setOpaque(false);<NEW_LINE>panel.add(new JLabel(MessageUtils.getLocalizedMessage("export.terms.label.output_path")));<NEW_LINE>JPanel inputPanel = new JPanel(new FlowLayout(FlowLayout.LEADING));<NEW_LINE>inpu... | (System.getProperty("user.home")); |
559,698 | public Set<Map<String, List<String>>> searchForMultipleAttributeValues(String base, String filter, Object[] params, String[] attributeNames) {<NEW_LINE>// Escape the params acording to RFC2254<NEW_LINE>Object[] encodedParams = new String[params.length];<NEW_LINE>for (int i = 0; i < params.length; i++) {<NEW_LINE>encode... | support.LdapUtils.convertLdapException(ex); |
608,619 | public Iterator<T> iterator() {<NEW_LINE>return new Iterator<T>() {<NEW_LINE><NEW_LINE>private int index = 0;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>int size;<NEW_LINE>synchronized (wrapped) {<NEW_LINE>size = wrapped.size();<NEW_LINE>}<NEW_LINE>while (!completed) {<NEW_LINE>if (index ... | return index < wrapped.size(); |
1,317,315 | private void doEnableLocationProviders(HashMap<String, LocationProviderProxy> locationProviders) {<NEW_LINE>// Enable if we have 1+ location event listeners OR an async getCurrentPosition() callback queued<NEW_LINE>if (numLocationListeners > 0 || currentPositionCallback.size() > 0) {<NEW_LINE>disableLocationProviders()... | .keySet().iterator(); |
312,026 | private void addMetrics(AggregationBuilder parentAgg, Heading heading, boolean addCount) {<NEW_LINE>for (Column metric : heading.columns()) {<NEW_LINE>if (metric.getOp() == Operation.AVG)<NEW_LINE>parentAgg.subAggregation(AggregationBuilders.avg(metric.getAggName()).field(metric.getColumn()));<NEW_LINE>else if (addCoun... | (metric.getAggName())); |
1,039,395 | public void onCompilationSuccess(OptimizedCallTarget target, TruffleInlining inliningDecision, GraphInfo graph, CompilationResultInfo result, int tier) {<NEW_LINE>CompilationData data = getCurrentData();<NEW_LINE>int compiledCodeSize = result.getTargetCodeSize();<NEW_LINE>statistics.finishCompilation(data.finish(), fal... | setGraalNodeCount(graph.getNodeCount()); |
1,844,714 | private void refreshController(boolean keepLocation) throws IOException {<NEW_LINE>int diffIndex = -1;<NEW_LINE>if (controller != null) {<NEW_LINE>diffIndex = controller.getDifferenceIndex();<NEW_LINE>controller.removePropertyChangeListener(this);<NEW_LINE>addPropertyChangeListener(this);<NEW_LINE>if (locationKeeper !=... | c.setName(getName()); |
249,064 | final DescribeNodegroupResult executeDescribeNodegroup(DescribeNodegroupRequest describeNodegroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeNodegroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | (super.beforeMarshalling(describeNodegroupRequest)); |
1,257,418 | private RubyString inspectStruct(final ThreadContext context, final boolean recur) {<NEW_LINE>final Ruby runtime = context.runtime;<NEW_LINE>RubyString buffer = RubyString.newString(runtime, new ByteList(32));<NEW_LINE>buffer.cat(STRUCT_BEG);<NEW_LINE>String cname = getMetaClass()<MASK><NEW_LINE>final char first = cnam... | .getRealClass().getName(); |
1,684,432 | private void moveClassInstanceMethodWithStub(String className, Node methodDefinition, Node destinationParent) {<NEW_LINE>checkArgument(methodDefinition.isMemberFunctionDef(), methodDefinition);<NEW_LINE>Node classMembers = checkNotNull(methodDefinition.getParent());<NEW_LINE>checkState(classMembers.isClassMembers(), cl... | classDefiningStatement = NodeUtil.getEnclosingStatement(classMembers); |
905,128 | private void doRegisterServiceProvided(Class<?> interfaceClass, Object service, boolean dynamicRegister) {<NEW_LINE>Objects.requireNonNull(service, "Service instance can not be null! Interface: " + interfaceClass.getName());<NEW_LINE>// #if ( can_do_strict_checking_of_service_registration )<NEW_LINE>// if (constructorF... | interfaceClass + "; from plugin " + getName()); |
772,036 | public void computeEnabled() {<NEW_LINE>boolean empty = model.getSignalCount() == 0;<NEW_LINE>boolean sel = !empty && !leftPanel.getSelectionModel().isSelectionEmpty();<NEW_LINE>setEnabled(LogisimMenuBar.CUT, sel);<NEW_LINE>setEnabled(LogisimMenuBar.COPY, sel);<NEW_LINE>setEnabled(LogisimMenuBar.PASTE, true);<NEW_LINE>... | setEnabled(LogisimMenuBar.LOWER, sel); |
868,710 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>java.awt.GridBagConstraints gridBagConstraints;<NEW_LINE>pnlAttributes = new javax.swing.JPanel();<NEW_LINE>jLabel1 = new javax.swing.JLabel();<NEW_LINE>jLabel2 = new javax.swing.J... | javax.swing.GroupLayout(this); |
285,105 | private static Map<TypeVariable, Type> buildGenericInfo(Class<?> clazz) {<NEW_LINE>Class<?> childClass = clazz;<NEW_LINE>Class<?> currentClass = clazz.getSuperclass();<NEW_LINE>if (currentClass == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Map<TypeVariable, Type> typeVarMap = null;<NEW_LINE>// analyse the whole ... | .get(childGenericParentActualTypeArgs[i]); |
841,172 | private String[] generateListenerMethodHeader(String methodName, Method originalMethod, Writer writer) throws IOException {<NEW_LINE>Class[] paramTypes = originalMethod.getParameterTypes();<NEW_LINE>String[] paramNames;<NEW_LINE>if (paramTypes.length == 1 && EventObject.class.isAssignableFrom(paramTypes[0])) {<NEW_LINE... | getSourceClassName(paramTypes[i])); |
1,510,779 | private void checkCachedStream(Message m, OutputStream osOriginal, boolean enabled) throws Exception {<NEW_LINE>XMLStreamWriter writer = null;<NEW_LINE>if (enabled) {<NEW_LINE>writer = <MASK><NEW_LINE>} else {<NEW_LINE>writer = (XMLStreamWriter) m.get(XMLStreamWriter.class.getName());<NEW_LINE>}<NEW_LINE>if (writer ins... | m.getContent(XMLStreamWriter.class); |
1,327,173 | static Point processPointIntersectOrDiff_(Point point, Geometry intersector, double tolerance, boolean bClipIn) {<NEW_LINE>if (point.isEmpty())<NEW_LINE>return ((Point) point.createInstance());<NEW_LINE>if (intersector.isEmpty()) {<NEW_LINE>return bClipIn ? ((Point) point.createInstance()) : null;<NEW_LINE>}<NEW_LINE>P... | = intersector.getDimension() == 2; |
1,640,922 | private void downloadSaneBody(SyncConfig syncConfig, Pop3Folder remoteFolder, BackendFolder backendFolder, Pop3Message message) throws MessagingException {<NEW_LINE>FetchProfile fp = new FetchProfile();<NEW_LINE>fp.add(FetchProfile.Item.BODY_SANE);<NEW_LINE>int maxDownloadSize = syncConfig.getMaximumAutoDownloadMessage... | saveMessage(message, MessageDownloadState.FULL); |
536,840 | private void buildMoreCompletionContext(Expression expression) {<NEW_LINE>ASTNode parentNode = null;<NEW_LINE>int kind = topKnownElementKind(SELECTION_OR_ASSIST_PARSER);<NEW_LINE>if (kind != 0) {<NEW_LINE>int info = topKnownElementInfo(SELECTION_OR_ASSIST_PARSER);<NEW_LINE>nextElement: switch(kind) {<NEW_LINE>case K_BE... | = new Statement[] { caseStatement }; |
938,174 | static Map<String, Float> resolveMappingFields(SearchExecutionContext context, Map<String, Float> fieldsAndWeights, String fieldSuffix) {<NEW_LINE>Map<String, Float> <MASK><NEW_LINE>for (Map.Entry<String, Float> fieldEntry : fieldsAndWeights.entrySet()) {<NEW_LINE>boolean allField = Regex.isMatchAllPattern(fieldEntry.g... | resolvedFields = new HashMap<>(); |
174,452 | public static QueryTimeTemplateDetailResponse unmarshall(QueryTimeTemplateDetailResponse queryTimeTemplateDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryTimeTemplateDetailResponse.setRequestId(_ctx.stringValue("QueryTimeTemplateDetailResponse.RequestId"));<NEW_LINE>queryTimeTemplateDetailResponse.setSuccess(... | (_ctx.integerValue("QueryTimeTemplateDetailResponse.Data.AllDay")); |
742,252 | public RecordStore openRecordStore(String recordStoreName, boolean createIfNecessary) throws RecordStoreException {<NEW_LINE>initializeIfNecessary();<NEW_LINE>recordStoreName = recordStoreName.replaceAll(FileUtils.ILLEGAL_FILENAME_CHARS, "");<NEW_LINE>Object value = recordStores.get(recordStoreName);<NEW_LINE>if (value... | w(TAG, "loadFromDisk: ERROR stubbing broken record " + file); |
188,360 | public SubModule unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SubModule subModule = new SubModule();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonTok... | class).unmarshall(context)); |
476,650 | static protected Geometry simplifyAsFeature(/* const */<NEW_LINE>Geometry geometry, /* const */<NEW_LINE>SpatialReference spatialReference, boolean bForce, ProgressTracker progressTracker) {<NEW_LINE>if (geometry.isEmpty())<NEW_LINE>return geometry;<NEW_LINE>Geometry.Type gt = geometry.getType();<NEW_LINE>if (gt == Geo... | Geometry res = geometry.copy(); |
775,985 | private static void sortNodes(DBNNode[] children) {<NEW_LINE>final DBPPreferenceStore prefStore = DBWorkbench.getPlatform().getPreferenceStore();<NEW_LINE>// Sort children is we have this feature on in preferences<NEW_LINE>// and if children are not folders<NEW_LINE>if (children.length > 0) {<NEW_LINE>DBNNode firstChil... | = firstChild instanceof DBNResource || firstChild instanceof DBNPath; |
218,565 | public static void main(@NotNull String... args) throws IOException, InterruptedException {<NEW_LINE>if (args.length < 1) {<NEW_LINE>System.err.println("Usage: java " + ChronicleReader.class.getName() + " {chronicle-base-path} [from-index]");<NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>int dataBitsHintSize = Integer.... | System.out.print(ch); |
490,405 | public CopyPackageVersionsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CopyPackageVersionsResult copyPackageVersionsResult = new CopyPackageVersionsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | int originalDepth = context.getCurrentDepth(); |
556,939 | final GetSupportedResourceTypesResult executeGetSupportedResourceTypes(GetSupportedResourceTypesRequest getSupportedResourceTypesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSupportedResourceTypesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,205,083 | private ParticleController createDefaultModelInstanceController() {<NEW_LINE>// Emission<NEW_LINE>RegularEmitter emitter = new RegularEmitter();<NEW_LINE>emitter.getDuration().setLow(3000);<NEW_LINE>emitter.<MASK><NEW_LINE>emitter.getLife().setHigh(500, 1000);<NEW_LINE>emitter.getLife().setTimeline(new float[] { 0, 0.6... | getEmission().setHigh(80); |
844,444 | public static DescribeVServerGroupAttributeResponse unmarshall(DescribeVServerGroupAttributeResponse describeVServerGroupAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVServerGroupAttributeResponse.setRequestId<MASK><NEW_LINE>describeVServerGroupAttributeResponse.setServiceManagedMode(_ctx.stringValue(... | (_ctx.stringValue("DescribeVServerGroupAttributeResponse.RequestId")); |
1,852,804 | private static void clip3primeEndsTo5primeEnds(final SAMRecord pos, final SAMRecord neg, final boolean hardClipReads, final boolean useUnclippedEnds) {<NEW_LINE>final int negEnd = useUnclippedEnds ? neg.getUnclippedEnd() : neg.getEnd();<NEW_LINE>final int posStart = useUnclippedEnds ? pos.getUnclippedStart() : pos.getS... | pos3PrimeMostUnclipped = getReadPositionAtReferencePositionIgnoreSoftClips(pos, negEnd); |
1,441,234 | public void endElement(String uri, String localName, String qName) throws SAXException {<NEW_LINE>if (itemList.size() < maxItemCount) {<NEW_LINE>if ("item".equals(localName) || "entry".equals(localName)) {<NEW_LINE>// NOI18N<NEW_LINE>if (null != currentItem && currentItem.isValid()) {<NEW_LINE>itemList.add(currentItem)... | .toString().trim(); |
1,485,817 | private void sendHttp2Response0(HttpResponseStatus status, boolean error, ByteBuf data) {<NEW_LINE>Http2Headers headers = new DefaultHttp2Headers().status(status.codeAsText());<NEW_LINE>if (request.getSerializeType() > 0) {<NEW_LINE>String serialization = SerializerFactory.getAliasByCode(request.getSerializeType());<NE... | set(RemotingConstants.HEAD_SERIALIZE_TYPE, serialization); |
126,860 | public int createTextureAtlas(final int width, final int height) {<NEW_LINE>try {<NEW_LINE>// we initialize a buffer here that will be used as base for all texture atlas images<NEW_LINE>if (initialData == null) {<NEW_LINE>initialData = BufferUtils.createByteBuffer(width * height * 4);<NEW_LINE>for (int i = 0; i < width... | .put((byte) 0x00); |
308,071 | private void register(Kryo kryo, Class<?>[] types, Serializer<?> serializer, int id) {<NEW_LINE>Registration <MASK><NEW_LINE>if (existing != null) {<NEW_LINE>boolean matches = false;<NEW_LINE>for (Class<?> type : types) {<NEW_LINE>if (existing.getType() == type) {<NEW_LINE>matches = true;<NEW_LINE>break;<NEW_LINE>}<NEW... | existing = kryo.getRegistration(id); |
900,240 | private void updateChildren() {<NEW_LINE>Node newLeft = leftProperty().get();<NEW_LINE>// Remove leftPane in any case<NEW_LINE>getChildren().remove(leftPane);<NEW_LINE>if (newLeft != null) {<NEW_LINE>leftPane = new StackPane(newLeft);<NEW_LINE>leftPane.setManaged(false);<NEW_LINE>leftPane.setAlignment(Pos.CENTER_LEFT);... | getChildren().add(rightPane); |
622,271 | protected void generateComponentLifecycle() {<NEW_LINE>// 1. onCreate:<NEW_LINE>searchAndBuildMethod(AndroidEntryPointConstants.SERVICE_ONCREATE, component, thisLocal);<NEW_LINE>// service has two different lifecycles:<NEW_LINE>// lifecycle1:<NEW_LINE>// 2. onStart:<NEW_LINE>searchAndBuildMethod(AndroidEntryPointConsta... | AndroidEntryPointConstants.SERVICE_ONDESTROY, component, thisLocal); |
1,268,093 | private static String debugString(@Nullable ClientSession session) {<NEW_LINE>if (session == null) {<NEW_LINE>return "null";<NEW_LINE>}<NEW_LINE>String debugString = String.format("[%s@%s ", ClassUtils.getShortName(session.getClass()), Integer.toHexString(session.hashCode()));<NEW_LINE>try {<NEW_LINE>if (session.getSer... | "txActive = %s, ", session.hasActiveTransaction()); |
1,287,152 | public AuthenticationDescription unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AuthenticationDescription authenticationDescription = new AuthenticationDescription();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | )).unmarshall(context)); |
728,222 | private static String checkCompatiblyEscaped30(String str, String test, Report report) {<NEW_LINE>String result = "";<NEW_LINE>char[] chars = str.toCharArray();<NEW_LINE>for (char c : chars) {<NEW_LINE>if (Character.isISOControl(c)) {<NEW_LINE>result += "\"" + Character.toString(c) + "\",";<NEW_LINE>test += Character.t... | test += Character.toString(c); |
73,274 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_recycler_view_example);<NEW_LINE>RecyclerView recyclerView = findViewById(R.id.recycler_view);<NEW_LINE>recyclerView.setHasFixedSize(true);<NEW_LINE>RecyclerView.<MASK><NEW_LINE>re... | LayoutManager mLayoutManager = new LinearLayoutManager(this); |
1,064,058 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE><MASK><NEW_LINE>ScriptVersion scriptVersion = emc.find(id, ScriptVersi... | Business business = new Business(emc); |
433,883 | protected void initScene() {<NEW_LINE>PointLight light1 = new PointLight();<NEW_LINE>light1.setPower(1.5f);<NEW_LINE>PointLight light2 = new PointLight();<NEW_LINE>light2.setPower(1.5f);<NEW_LINE>getCurrentScene().addLight(light1);<NEW_LINE>getCurrentScene().addLight(light2);<NEW_LINE>getCurrentCamera().setPosition(0, ... | setRepeatMode(Animation.RepeatMode.REVERSE_INFINITE); |
554,230 | protected Map<String, String> submoduleUrls() {<NEW_LINE>String[] args = new String[] { "config", "--get-regexp", "^submodule\\..+\\.url" };<NEW_LINE>CommandLine gitCmd = <MASK><NEW_LINE>ConsoleResult result = runOrBomb(gitCmd, false);<NEW_LINE>List<String> submoduleList = result.output();<NEW_LINE>HashMap<String, Stri... | gitWd().withArgs(args); |
1,203,536 | private void loadComments(final int page, final boolean isReload) {<NEW_LINE>mView.showLoading();<NEW_LINE>final boolean readCacheFirst = page == 1 && !isReload;<NEW_LINE>HttpObserver<ArrayList<IssueEvent>> httpObserver = new HttpObserver<ArrayList<IssueEvent>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onEr... | > result = response.body(); |
1,133,753 | FormatterFunc createFormat() throws Exception {<NEW_LINE>ClassLoader classLoader = jarState.getClassLoader();<NEW_LINE>// instantiate the formatter and get its format method<NEW_LINE>Class<?> optionsClass = classLoader.loadClass(OPTIONS_CLASS);<NEW_LINE>Class<?> optionsBuilderClass = classLoader.loadClass(OPTIONS_BUILD... | options = optionsBuilderBuildMethod.invoke(optionsBuilder); |
854,960 | public void onSuccess(V2TIMGroupMemberInfoResult v2TIMGroupMemberInfoResult) {<NEW_LINE>List<GroupMemberInfo> members = new ArrayList<>();<NEW_LINE>for (int i = 0; i < v2TIMGroupMemberInfoResult.getMemberInfoList().size(); i++) {<NEW_LINE>GroupMemberInfo member = new GroupMemberInfo();<NEW_LINE>members.add(member.cover... | GroupMemberInfo memberInfo = iterator.next(); |
860,741 | public static <A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> Arguments13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> of(@Nullable A1 arg1, @Nullable A2 arg2, @Nullable A3 arg3, @Nullable A4 arg4, @Nullable A5 arg5, @Nullable A6 arg6, @Nullable A7 arg7, @Nullable A8 arg8, @Nullable A9 arg9, @Nullab... | arg10, arg11, arg12, arg13); |
1,096,433 | public Object call(boolean isConstructor, Object functionReference, JSFunction function, Object self, Object... args) {<NEW_LINE>// 13.2.1<NEW_LINE>ExecutionContext fnContext = null;<NEW_LINE>try {<NEW_LINE>fnContext = createFunctionExecutionContext(isConstructor, <MASK><NEW_LINE>ThreadContextManager.pushContext(fnCont... | functionReference, function, self, args); |
1,746,516 | private void configureContainer(ContainerProperties container) {<NEW_LINE>PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();<NEW_LINE>Listener properties = this.properties.getListener();<NEW_LINE>map.from(properties::getAckMode).to(container::setAckMode);<NEW_LINE>map.from(properties::getClientId<MA... | ).to(container::setClientId); |
343,984 | public void createFromParts(ReadableArray parts, String blobId) {<NEW_LINE>int totalBlobSize = 0;<NEW_LINE>ArrayList<byte[]> partList = new ArrayList<>(parts.size());<NEW_LINE>for (int i = 0; i < parts.size(); i++) {<NEW_LINE>ReadableMap part = parts.getMap(i);<NEW_LINE>switch(part.getString("type")) {<NEW_LINE>case "b... | + part.getString("type")); |
14,864 | public Object createId(EntityMetaData metaData, String string) {<NEW_LINE>Class<?> type = metaData.getIdType();<NEW_LINE>// According to JPA-spec all primitive types (and wrappers) are supported, String, util.Date, sql.Date,<NEW_LINE>// BigDecimal and BigInteger<NEW_LINE>if (type == Long.class || type == long.class) {<... | (Long.parseLong(string)); |
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... | setUserAffinity(pod.getAffinity()); |
206,696 | public void write(RandomAccessFile raf, DataConverter dc) throws IOException {<NEW_LINE>raf.seek(0);<NEW_LINE>raf.writeByte(e_ident_magic_num);<NEW_LINE>raf.write(e_ident_magic_str.getBytes());<NEW_LINE>raf.writeByte(e_ident_class);<NEW_LINE>raf.writeByte(e_ident_data);<NEW_LINE>raf.writeByte(e_ident_version);<NEW_LINE... | (dc.getBytes(e_shentsize)); |
152,519 | private String renderFirstLine(InnerClass innerClass, CompilationUnit compilationUnit) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(innerClass.getVisibility().getValue());<NEW_LINE>if (innerClass.isAbstract()) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>sb.append("abstract ");<NEW_LINE>}<NEW_LINE>if (in... | .getTypeParameters(), compilationUnit)); |
1,071,433 | public void renderTo(Iterable<BlockDoc> blocks, Element parent) {<NEW_LINE>Document document = parent.getOwnerDocument();<NEW_LINE>// <thead><NEW_LINE>// <tr><NEW_LINE>// <td>Block</td><NEW_LINE>// <td>Description</td><NEW_LINE>// </tr><NEW_LINE>// </thead><NEW_LINE>Element thead = document.createElement("thead");<NEW_... | literal = document.createElement("literal"); |
1,153,572 | protected void encodeMarkup(FacesContext context, UICalendar uicalendar, String value) throws IOException {<NEW_LINE>Calendar calendar = (Calendar) uicalendar;<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String clientId = calendar.getClientId(context);<NEW_LINE>String styleClass = calendar.ge... | "id", clientId + "_inline", null); |
1,020,204 | public void createPartControl(Composite parent) {<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>this.setPartName("ResponseTime[" + server.getName() + "]");<NEW_LINE>GridLayout layout = new GridLayout(1, true);<NEW_LINE>layout.marginHeight = 5;<NEW_LINE>layout.marginWidth = 5;<NEW_LI... | canvas.setScrollBarVisibility(FigureCanvas.NEVER); |
460,725 | private void initialize(int n) {<NEW_LINE>if (columnNames == null || columnNames.size() != n) {<NEW_LINE>columnNames = createDefaultColumnNames(n);<NEW_LINE>}<NEW_LINE>exampleCountPerColumn = Nd4j.zeros(DataType.DOUBLE, n);<NEW_LINE>labelsSumPerColumn = Nd4j.<MASK><NEW_LINE>sumSquaredErrorsPerColumn = Nd4j.zeros(DataTy... | zeros(DataType.DOUBLE, n); |
97,809 | public synchronized void createUser(User user, int account) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>long id = user.getId();<NEW_LINE>String screenName = user.getScreenName();<NEW_LINE>String name = user.getName();<NEW_LINE>String proPicUrl = user.getOriginalProfileImageURL();<NEW_LINE>values.put... | FollowersSQLiteHelper.TABLE_HOME, null, values); |
592,316 | public Blob createBlob() throws SQLException {<NEW_LINE>final <MASK><NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "createBlob");<NEW_LINE>Blob blob;<NEW_LINE>try {<NEW_LINE>activate();<NEW_LINE>blob = connImpl.createBlob();<NEW_LINE>if (freeResourcesOnClose)<NEW_LINE>blobs.add(blob);<NEW_L... | boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); |
1,558,726 | public void deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String workspaceName = <MASK><NEW_LINE>if (workspaceName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id)));<NEW_LINE>}<NE... | Utils.getValueFromIdByName(id, "workspaces"); |
1,147,681 | private List<DataSourceListBo> reorderDataSourceListBos(List<DataSourceListBo> dataSourceListBos) {<NEW_LINE>// reorder dataSourceBo using id and timeSlot<NEW_LINE>MultiKeyMap<Long, DataSourceListBo> dataSourceListBoMap = new MultiKeyMap<>();<NEW_LINE>for (DataSourceListBo dataSourceListBo : dataSourceListBos) {<NEW_LI... | setAgentId(dataSourceBo.getAgentId()); |
1,727,684 | public final Operand16Context operand16() throws RecognitionException {<NEW_LINE>Operand16Context _localctx = new Operand16Context(_ctx, getState());<NEW_LINE>enterRule(_localctx, 38, RULE_operand16);<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(341);<NEW_LINE>_errHandler.sync(this)... | _localctx).argument = argument(); |
41,713 | public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(java.util.Collection<io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm> items) {<NEW_LINE>if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {<NEW_LINE>this.preferredDuringSchedulingIgnoredDuringExecution = new java.util.ArrayLi... | openapi.models.V1WeightedPodAffinityTermBuilder(item); |
1,306,748 | private void processCustomRoles(String parent, boolean isOrgLevel) throws Exception {<NEW_LINE>logger.atInfo().log("Processing custom roles: " + parent);<NEW_LINE>Set<Role> customRole = null;<NEW_LINE>try {<NEW_LINE>if (isOrgLevel) {<NEW_LINE>customRole = iamClient.fetchCustomRolesOrgLevel(parent);<NEW_LINE>} else {<NE... | customRole = iamClient.fetchCustomRolesProjectLevel(parent); |
1,128,732 | final DeleteDistributionConfigurationResult executeDeleteDistributionConfiguration(DeleteDistributionConfigurationRequest deleteDistributionConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDistributionConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | (super.beforeMarshalling(deleteDistributionConfigurationRequest)); |
838,952 | // GEN-LAST:event_codenameOneTabsActionPerformed<NEW_LINE>private void propertiesMouseClicked(java.awt.event.MouseEvent evt) {<NEW_LINE>// GEN-FIRST:event_propertiesMouseClicked<NEW_LINE>if (BaseForm.isRightClick(evt)) {<NEW_LINE>AbstractAction clearModified = new AbstractAction() {<NEW_LINE><NEW_LINE>public void actio... | int row = properties.getSelectedRow(); |
1,837,878 | public void statsRequest(PEPeer originator, Map request, Map reply) {<NEW_LINE><MASK><NEW_LINE>gm.statsRequest(request, reply);<NEW_LINE>Map info = new HashMap();<NEW_LINE>reply.put("dl", info);<NEW_LINE>try {<NEW_LINE>info.put("u_lim", new Long(getUploadRateLimitBytesPerSecond()));<NEW_LINE>info.put("d_lim", new Long(... | GlobalManager gm = download_manager.getGlobalManager(); |
591,143 | public static ListVpcEndpointsResponse unmarshall(ListVpcEndpointsResponse listVpcEndpointsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVpcEndpointsResponse.setRequestId(_ctx.stringValue("ListVpcEndpointsResponse.RequestId"));<NEW_LINE>listVpcEndpointsResponse.setNextToken(_ctx.stringValue("ListVpcEndpointsRespon... | ("ListVpcEndpointsResponse.Endpoints[" + i + "].EndpointDomain")); |
1,308,119 | static // / @brief Print the solution.<NEW_LINE>void printSolution(DataModel data, RoutingModel routing, RoutingIndexManager manager, Assignment solution) {<NEW_LINE>// Solution cost.<NEW_LINE>logger.info("Objective : " + solution.objectiveValue());<NEW_LINE>// Inspect solution.<NEW_LINE>logger.info("Route for Vehicle ... | index = routing.start(0); |
353,146 | private Cursor handleBack(SqlSlowSqlCcl slowSqlCcl, ExecutionContext executionContext) {<NEW_LINE>int affectedRows = 0;<NEW_LINE>try (Connection metaDbConn = MetaDbUtil.getConnection()) {<NEW_LINE>metaDbConn.setAutoCommit(false);<NEW_LINE>CclTriggerAccessor cclTriggerAccessor = new CclTriggerAccessor();<NEW_LINE>cclTri... | getCclRuleDataId(InstIdUtil.getInstId()); |
1,772,050 | private void handleController0() {<NEW_LINE>if (buttonUp(ControllerListener.TRIGGER_BUTTON)) {<NEW_LINE>addButtonAction(ControllerId.ZERO, ButtonState.UP);<NEW_LINE>} else if (buttonDown(ControllerListener.TRIGGER_BUTTON)) {<NEW_LINE>addButtonAction(ControllerId.ZERO, ButtonState.DOWN);<NEW_LINE>} else if (buttonUp(Con... | ControllerId.TWO, ButtonState.UP); |
1,748,564 | public static void handleFilteredAttributes(Field component, Datasource datasource, MetaPropertyPath mpp) {<NEW_LINE>if (component.isRequired() && datasource.getState() == Datasource.State.VALID && datasource.getItem() != null && mpp.getMetaProperty().getRange().isClass()) {<NEW_LINE>Entity targetItem = datasource.getI... | .getMetaProperty().getName(); |
864,303 | private void sendAltContacts(DHTUDPPacketRequestPing request, DHTUDPPacketReplyPing reply) {<NEW_LINE>if (request.getProtocolVersion() >= DHTTransportUDP.PROTOCOL_VERSION_ALT_CONTACTS) {<NEW_LINE>int[] alt_nets = request.getAltNetworks();<NEW_LINE>int[<MASK><NEW_LINE>if (alt_nets.length > 0) {<NEW_LINE>List<DHTTranspor... | ] counts = request.getAltNetworkCounts(); |
1,540,124 | public static String updateUserRole(String ApplicationRoot, String playerId, String newRole) {<NEW_LINE>log.debug("*** Setter.updateUserRole ***");<NEW_LINE>String result = null;<NEW_LINE>try {<NEW_LINE>Connection conn = Database.getCoreConnection(ApplicationRoot);<NEW_LINE>log.debug("Preparing userUpdateRole call");<N... | callstmnt.setString(1, playerId); |
940,751 | private void test(int substringSearchMethodId) {<NEW_LINE>String text = "abcdrenetestreneabdreneabcdd";<NEW_LINE>String pattern1 = "rene";<NEW_LINE>SubstringSearch substringSearch1 = createSubstringSearch(substringSearchMethodId, pattern1);<NEW_LINE>if (substringSearch1 == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>S... | (String.valueOf(offset)); |
743,624 | public DescribeServiceUpdatesResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeServiceUpdatesResult describeServiceUpdatesResult = new DescribeServiceUpdatesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (c... | ().unmarshall(context)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.