A number of factual anecdotes may help to illustrate the complexity of the problem.
A group of people attending a party are holding a conversation in Polish. The Scottish hostess approaches the group to ask how everyone is enjoying the party, and the conversation switches to English. Presently the hostess leaves to talk with other guests, and the group continues to talk in English for several minutes. After a short pause in the conversation one of the members of the group reverts to Polish, and the rest of the group follows suit.
A foreigner visiting a Japanese department store approaches one of the shop assistants and asks for something in Japanese. The customer's Japanese is grammatically correct and well pronounced, and the assistant has no difficulty in understanding what the person has said. Nevertheless she chooses to reply in English. For several minutes the conversation continues in two languages, the customer speaking in Japanese, and the assistant persisting in a use of English.
On a flight from Honolulu to Tokyo, two young Oriental ladies are discussing, in elementary accented Japanese, the friends they will meet and the shopping they will do when they get to Japan. Their conversation is interrupted when a cabin attendant comes along and asks them, in English, whether they would care for some light refreshment. Both of them answer in fluent unaccented American English, and after the cabin attendant has gone to attend to their order, they switch back to Japanese.