protected ProjectSizeBean finishSessionUpload(String userId, int sessionNumber, boolean initialParse, ProjectSizeBean bean) {
if (bean.equals(EMPTY)){
return bean;
}
assert (!bean.isStandardized());
ProjectSizeBean result = new ProjectSizeBean();
result.javaFilesCounts = new HashMap<Integer, Integer>();
result.virtFilesCounts = new HashMap<Integer, Integer>();
int jfAll = 0;
for (Map.Entry<String, Integer> entry : bean.sRootJavaFile.entrySet()) {
add(result.javaFilesCounts, entry.getValue());
jfAll += entry.getValue();
}
if (jfAll != 0){
result.userLogJavaFilesCounts = Collections.singletonMap(jfAll, 1);
}else{
result.userLogJavaFilesCounts = Collections.emptyMap();
}
int vfAll = 0;
for (Map.Entry<String, Integer> entry : bean.sRootVirtualFile.entrySet()) {
add(result.virtFilesCounts, entry.getValue());
vfAll += entry.getValue();
}
if (vfAll != 0){
result.userLogVirtFilesCounts = Collections.singletonMap(vfAll, 1);
}else{
result.userLogVirtFilesCounts = Collections.emptyMap();
}
assert (result.isStandardized());
return result;
}