The imposition of the prison term sparked a foul-mouthed tirade at the Dunedin District Court hearing and Davis initially maintained his claims of innocence.
However, last year he admitted his involvement at a parole hearing.
In explanation for the drug supply, Davis said he had oxycodone prescribed to himself and he grew cannabis which he kept in boxes in his bedroom.
He did not stop anyone else having access to the substances.
At trial, the court heard Davis was at his home with one victim, who he had plied with alcohol and cannabis.
The boy woke with Davis lying behind him with his hand down his pants.
The judge described the sexual offending as predatory, self-gratifying and involving an element of grooming.
There were 200 occasions in which class-C drugs were supplied and 10 occasions in which class-B drugs were supplied, the court heard.
Davis had a criminal history stretching back to 1994, the Parole Board heard, but this had been his first time behind bars.
He was assessed by a psychologist as a low-to-medium risk of re-offending.
While serving his sentence, Davis had worked outside the wire and been on two guided release activities.
His sentence ends in June 2021.
Trendle said Davis did not need to be electronically monitored; his conditions included:
• To notify Probation of any changes to employment.
• Not to have contact with anyone under 16 without consent of Probation.
• To abide by a 10pm-6am curfew for the first three months of parole.
• Not to contact victims of offending.
• To attend a drug-and-alcohol assessment and any treatment directed.
• Not to possess alcohol or non-prescription drugs.
• To live at an address approved by Probation.