Dujana was arrested in June on charges of illegal possession of explosives and firearms and was also accused of leading an armed branch of Jemaah Islamiyah.
The charges against the Dujana do not relate to any specific incident, although one of the men he protected, Noordin M Top, a Malaysian national, is accused of masterminding the Bali attacks which killed 202 people.
Wachyono said Dujana had hidden weapons, provided financial aid and facilities to terrorists, and had failed to inform authorities about their whereabouts.
Dujana, who once taught at Islamic schools in Indonesia and Malaysia, will serve just over 14 years in jail as the 10 months he had already spent in detention will be deducted from the sentence, the judge said.
He was also fined $1,100 for having been an executive of Jemaah Islamiyah.
Asked by the judges if he wanted to appeal the sentence, he replied that he needed time to consider.
Shot and wounded
Another senior Jemaah Islamiyah leader, Zarkasi, who is said to have led the extremist group in 2004 - before Dujana rose to prominence within the organisation - was also sentenced to 15 years on Monday for "evil conspiracy in terror activities".
The two men were arrested within a week of each other in different parts of central Java.
Dujana was shot and wounded by police during a raid on his hideout in the city of Banyumas.
Jemaah Islamiyah was previously believed to have links with al-Qaeda, but security analysts now believe the organisation is isolated.
Legal proceedings against Jemaah Islamiyah members are being closely watched in Australia, which suffered the most losses in the attacks on crowded tourist bars in Bali.