<commit_before>package com.example.musedroid.musedroid;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.nfc.tech.Ndef;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RatingBar;
import android.widget.TextView;
import android.widget.Toast;

import com.github.clans.fab.FloatingActionButton;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.places.GeoDataClient;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.PlaceBufferResponse;
import com.google.android.gms.location.places.PlacePhotoMetadata;
import com.google.android.gms.location.places.PlacePhotoMetadataBuffer;
import com.google.android.gms.location.places.PlacePhotoMetadataResponse;
import com.google.android.gms.location.places.PlacePhotoResponse;
import com.google.android.gms.location.places.Places;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;

import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import java.util.Random;

public class MuseumShow extends AppCompatActivity implements Listener {
    //NFC
    public static final String TAG = MainActivity.class.getSimpleName();
    private static final String RATING = "Museum rating";
    private static final String DESCRIPTION = "museum description";
    private static final String TITLE = "museum title";
    private static final String ADDRESS = "museum address";
    private static final String PHONENUMBER = "museum phoneNumber";
    private static final String WEBSITE = "museum website";
    private static final String MUSEUM_BITMAP = "museum image";
    Intent intent;
    TextView museumDescription, museumAddress, museumPhoneNumber, museumWebsite;
    Museum museum;
    ImageView toolbarImage;
    String address, phoneNumber, website;
    Bitmap museumImage;
    RatingBar ratingBar;
    Context context;
    GeoDataClient mGeoDataClient;
    private GoogleApiClient mGoogleApiClient;
    private EditText mEtMessage;
    private Button mBtWrite;
    private Button mBtRead;
    //private NFCWriteFragment mNfcWriteFragment;
    private NFCReadFragment mNfcReadFragment;
    private boolean isDialogDisplayed = false;
    private NfcAdapter mNfcAdapter;
    private boolean isNfcSupported = true;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_museum_show);
        context = this;
        mGeoDataClient = Places.getGeoDataClient(this, null);<commit_msg>restore toast message on failure<commit_after>package com.example.musedroid.musedroid;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.nfc.tech.Ndef;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RatingBar;
import android.widget.TextView;
import android.widget.Toast;

import com.github.clans.fab.FloatingActionButton;
import com.google.android.gms.location.places.GeoDataClient;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.PlaceBufferResponse;
import com.google.android.gms.location.places.PlacePhotoMetadata;
import com.google.android.gms.location.places.PlacePhotoMetadataBuffer;
import com.google.android.gms.location.places.PlacePhotoMetadataResponse;
import com.google.android.gms.location.places.PlacePhotoResponse;
import com.google.android.gms.location.places.Places;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;

import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import java.util.Random;

public class MuseumShow extends AppCompatActivity implements Listener {
    //NFC
    public static final String TAG = MainActivity.class.getSimpleName();
    private static final String RATING = "Museum rating";
    private static final String DESCRIPTION = "museum description";
    private static final String TITLE = "museum title";
    private static final String ADDRESS = "museum address";
    private static final String PHONENUMBER = "museum phoneNumber";
    private static final String WEBSITE = "museum website";
    private static final String MUSEUM_BITMAP = "museum image";
    Intent intent;
    TextView museumDescription, museumAddress, museumPhoneNumber, museumWebsite;
    Museum museum;
    ImageView toolbarImage;
    String address, phoneNumber, website;
    Bitmap museumImage;
    RatingBar ratingBar;
    Context context;
    GeoDataClient mGeoDataClient;
    //private NFCWriteFragment mNfcWriteFragment;
    private NFCReadFragment mNfcReadFragment;
    private boolean isDialogDisplayed = false;
    private NfcAdapter mNfcAdapter;
    private boolean isNfcSupported = true;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_museum_show);
        context = this;
        mGeoDataClient = Places.getGeoDataClient(this, null);
{'fraction_non_alphanumeric': 0.08178248249957316, 'fraction_numerical': 0.0003414717432132491, 'mean_word_length': 5.0957336108220606, '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': '257537', 'n_tokens_mistral': 1662, 'n_tokens_neox': 1622, 'n_words': 387}