package Ġcom . t ib agn i . log viewer . bug report . parser Ċ Ċ import Ġcom . t ib agn i . log viewer . Progress Reporter Ċ import Ġcom . t ib agn i . log viewer . bug report . Bug Report Ċ import Ġcom . t ib agn i . log viewer . logger . wrap Profiler Ċ Ċ interface ĠBug Report Parser Ġ{ ĊĠ Ġfun Ġparse Bug Report ( bug Report Text : ĠString , Ġprogress Reporter : ĠProgress Reporter ): ĠBug Report Ċ } Ċ Ċ class ĠBug Report Parser Impl ( private Ġval Ġsection Parsers : ĠList < Bug Report Section Parser >) Ġ: ĠBug Report Parser Ġ{ ĊĠ Ġoverride Ġfun Ġparse Bug Report ( bug Report Text : ĠString , Ġprogress Reporter : ĠProgress Reporter ): ĠBug Report Ġ{ ĊĠĠĠ Ġ// ĠBug Report ĠString Ġis Ġusually Ġmass ive Ġ( se veral Ġt ens Ġof ĠMB ). ĠFor Ġthis Ġreason , Ġwe Ġsave Ġthe Ġoriginal Ġbug report ĊĠĠĠ Ġ// ĠString Ġand Ġbe Ġcareful Ġto Ġuse ĠString Views Ġto Ġmanipulate Ġeach Ġsection Ġand Ġonly Ġcreate Ġa Ġsubstring Ġwhen Ġabsolutely ĊĠĠĠ Ġ// Ġnecessary ĊĠĠĠ Ġprogress Reporter . on Progress ( 0 , Ġ" Opening Ġbug report ") ĊĠĠĠ Ġvar Ġsections Parsed Ġ= Ġ 1 ĊĠĠĠ Ġval Ġtotal Sections Ġ= Ġsection Parsers . size ĊĊĠĠĠ Ġval Ġsections Ġ= Ġsection Parsers . map NotNull Ġ{ ĊĠĠĠĠĠ Ġprogress Reporter . on Progress (( sections Parsed ++ Ġ/ Ġtotal Sections ) Ġ* Ġ 1 0 0 , Ġ" Parsing Ġ${ it . name }") ĊĠĠĠĠĠ Ġwrap Profiler ( it . name ) Ġ{ Ġit . parse ( bug Report Text ) Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġprogress Reporter . on Progress ( 1 0 0 , Ġ" Done !") ĊĊĠĠĠ Ġreturn ĠBug Report ( bug Report Text , Ġsections ) ĊĠ Ġ} Ċ }