<commit_before>package org.cyanogenmod.launcher.cards;

import android.content.Context;

import org.cyanogenmod.launcher.home.api.cards.DataCard;

import it.gmariotti.cardslib.library.internal.Card;
import it.gmariotti.cardslib.library.internal.CardHeader;

public class ApiCard extends Card {
    private String mApiAuthority;
    private long mDbId;

    public ApiCard(Context context) {
        super(context);
    }

    public void setApiAuthority(String authority) {
        mApiAuthority = authority;
    }

    public String getApiAuthority() {
        return mApiAuthority;
    }

    public long getDbId() {
        return mDbId;
    }

    public void setDbId(long dbId) {
        mDbId = dbId;
    }

    public void updateFromDataCard(DataCard dataCard) {
        setId(dataCard.getGlobalId());
        setDbId(dataCard.getId());
        setApiAuthority(dataCard.getAuthority());
        CardHeader cardHeader = new CardHeader(getContext());
        cardHeader.setTitle(dataCard.getTitle());
        addCardHeader(cardHeader);
        setSwipeable(true);
        setTitle(dataCard.getContentCreatedDate().toString());
    }
}<commit_msg>CmHomeApi : Make ApiCard more generic<commit_after>package org.cyanogenmod.launcher.cards;

import android.content.Context;

import org.cyanogenmod.launcher.home.api.cards.DataCard;

import it.gmariotti.cardslib.library.internal.Card;

public class ApiCard extends Card {
    private String mApiAuthority;
    private long mDbId;

    public ApiCard(Context context) {
        super(context);
    }

    public ApiCard(Context context, int innerLayout) {
        super(context, innerLayout);
    }

    public void setApiAuthority(String authority) {
        mApiAuthority = authority;
    }

    public String getApiAuthority() {
        return mApiAuthority;
    }

    public long getDbId() {
        return mDbId;
    }

    public void setDbId(long dbId) {
        mDbId = dbId;
    }

    public void updateFromDataCard(DataCard dataCard) {
        setId(dataCard.getGlobalId());
        setDbId(dataCard.getId());
        setApiAuthority(dataCard.getAuthority());
        setSwipeable(true);
    }
}
{'fraction_non_alphanumeric': 0.09411219286045433, 'fraction_numerical': 0.0, 'mean_word_length': 3.048780487804878, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '253898', 'n_tokens_mistral': 667, 'n_tokens_neox': 654, 'n_words': 126}