The jury in the trial of the two boys accused of Ana Kriégel's murder, was not told that Boy A had searched online for "child porn" and "animal porn" and had thousands of pornographic images on two mobile phones.
Mr Justice Paul McDermott refused to allow the prosecution to lead this evidence as he said it was "highly prejudicial" to the first accused boy.
The judge also refused to allow a photograph of a mannequin wearing what gardaí called Boy A’s "murder kit" to be shown to jurors.
In evidence given in the absence of the jury, the court heard gardaí searched Boy A’s home on 24 May 2018, following his arrest on suspicion of murder.
They discovered two mobile phones in his bedroom.One phone had 5001 images, a "vast amount" of which were pornographic, prosecuting counsel, Brendan Grehan told the court.
Ten images were identified by Garda Joan Sheridan as being of particular interest to gardaí.
On the same phone, Garda Sheridan found searches for "child porn", "dark web", "horse porn" and "animal porn" all from November 2017.
And the court heard two urls brought users to a website featuring pornographic videos, one of which had the name Anastasia in the title.
An iphone 4 taken from Boy A’s room and registered under his name had almost 7,500 images.
Again, Mr Grehan told the court a "vast amount" were pornographic - mainly in animated form.Forty-two images on that phone were considered relevant to the garda investigation.
The judge ruled that if Boy A were to be found guilty, the pornographic material could be helpful to a professional in determining how or why the offence occurred, but he said that was a separate issue to the trial.
He also noted the material on the phones, preceded the offence by a number of months.
Boy A and Boy B guilty of murdering Ana Kriégel
Evidence gave brief glimpse of Ana, a 'unique' girl 'full of fun'
The 'overwhelming' forensic case against Boy A
Hours of garda interviews that revealed Boy B's devious lies
Psychologist's evidence Boy B was traumatised ruled out by judge
Watch: The route taken to Glenwood House
Two boys are guilty of murder - what happens next?
The "extensive nature of the downloads" would be "highly prejudicial to the fair trial of the accused".
He said evidence must be cogent and must not invite speculation and said he was not satisfied it advanced the prosecution case.
The judge also refused to allow photographs of a mannequin, wearing what gardaí described as Boy A's "murder kit" to go to the jury.
Mr Grehan showed the court the photographs of a mannequin, dressed by forensic expert, John Hoade in Boy A’s clothes and boots and the items found in the rucksack recovered from his home.
He explained that in the pictures the mannequin had his hood up, his home-made zombie mask over his face and knee and shin guards in place.
His black snood was around the neck and gloves were on his hands.He said this was a visual aid to the jury and was no more than a representation of what the jury had already seen, "in a different format".
Defence counsel, Patrick Gageby said the pictures were speculative and there was no evidence that the image portrayed accurately what was worn.
The judge ruled them out saying whatever limited probative value they had was outweighed by the disproportionate prejudicial effects.
Mr Justice McDermott further ruled out most of a questionnaire found in Boy A’s room, saying it was "juvenile jottings".
In answers to questions, the boy said he was "strange", he thought "differently" and felt "not much". A response that he liked to hang out in "abandoned places" was allowed to go to the jury.
The prosecution also played a video found on one of Boy A’s phones of the two boys together.
It showed Boy B using a homemade weapon to hit a concrete block while Boy A filmed him.
Mr Grehan said it showed the two interacting together and "engaging in one of their hobbies".
The judge said he couldn’t see any relevance to the trial and the prosecution was trying to draw an inference which was not justified.
The prosecution also sought to introduce evidence gleaned from a device taken from Boy B’s home. It included pictures of masks, internet searches relating to horror stories and searches for knives.
The court heard that the masks were made in a school art class and defence counsel, Damien Colgan said his instructions were that the horror stories were searched for as part of a school project in the boy’s English class.
Mr Grehan said he had not intended to lead the evidence in relation to knives, until the boy’s father was cross examined by Mr Colgan to the effect that Boy B liked only childish activities like Lego.
An interest in knives and tomahawks showed "perhaps a more rounded picture than the one sought to be portrayed", he said.
Mr Justice McDermott said the case had nothing to do with knives and he did not accept that the father’s evidence justified this material being introduced into the trial.
It would introduce an overwhelmingly speculative and prejudicial series of factors into the case.
Masks featured in the case he said, but the pictures appeared to show Boy B or another young person modelling a mask in a classroom with a number of other students.
The judge said to invite the jury to take that material and connect it to a charge of murder against Boy B did not seem to be something that would be fair.
The judge also ruled part of Boy B’s final interview with gardaí in July 2018 should be edited out from the video to be shown to the jury.
In the deleted portion, gardaí put it to Boy B that 14 May was "doomsday" in the satanic calendar. The boy denied being aware of this.