A Sunderland police officer searched for intelligence about an arrest of a drugs courier as he spoke on the telephone to the mastermind of the drugs gang, a court heard.
PC Gary Christie used his computer access as an intelligence officer to look for details about Jamie Malloy two days after Malloy was arrested with a kilo of cocaine in his car, a court heard.
As he made the search Christie was speaking to Asa Dobbing, who was using Malloy as a courier, a jury heard.
Police data analyst Neil Wardingham told Teesside Crown Court there was several pages of intelligence about Malloy on the Northumbria Police system.
But there was no details of Mallloy's recent arrest, probably because the arrest took place outside the Northumbria Police area.
Mr Wardingham said that in a 15-month period there was 839 contacts between Christie and Dobbing.
Many of those were for social purposes, including an exchange to arrange a meeting after a football match in which Christie texted: "I'm out with the pigs."
Dobbing replied: "Ha-ha, I don't mind the police."
Under-cross examination from Chris Knox, for Christie, Mr Wardingham agreed he had taken screen grabs of the intelligence system in June, 2014, several months after Christie had viewed them.
"It's live system," said Mr Knox. "Entries can be changed, so it's not possible to say if the information on the screen grabs was the same as that viewed by Mr Christie."
Mr Wardingham agreed that was so in the case of some of the screens, but others would not have changed.
"Mr Christie could have searched another system in relation to out of area arrests, but he did not do so?" asked Mr Knox.
Mr Wardingham agreed Christie could have searched elsewhere.
The jury heard searching a day's arrests is a routine part of the job of an intelligence officer.
Mr Knox said Christie is known in his social circle by the nickname Ginger Pig, due to his hair colour and occupation.
"Asa Dobbing sent a great deal of texts," added Mr Knox. "He was in the habit of sending lots of texts, including circular texts, and he would share jokes, many of which were wholly inappropriate and certainly not at all politically correct.
"So we must be very cautious about interpreting numbers of texts sent."
Christie, 42, of Silksworth Lane, Sunderland, denies misconduct in public office, and conspiracy to supply class A drugs between August 2012, and April, 2014.
Dobbing, 37, of Ryhope Grange Court, Sunderland, denies aiding abetting a person to commit misconduct in public office between the same dates.