ComponentDto component = findComponent(fileKey, session);
JsonWriter json = response.newJsonWriter().beginObject();
String duplications = findDataFromComponent(fileKey, CoreMetrics.DUPLICATIONS_DATA_KEY, session);
List<DuplicationsParser.Block> blocks = parser.parse(component, duplications, session);
duplicationsJsonWriter.write(blocks, json, session);
json.endObject().close();
} finally {
MyBatis.closeQuietly(session);
}
}