Please move this whole block into a seperate method. You'll need to pass it the CVideoDatabase (videodatabase) object, the parameterObject value and the CVideoInfoTag object (infos). But having the exact same code block in three different places in the same source file and class is a lot of unnecessary duplication.