for (ComponentArtifactsResult componentResult : componentResults) {
for (IdeExtendedRepoFileDependency dependency : dependencies.get(componentResult.getId())) {
Set<ArtifactResult> sourceArtifacts = componentResult.getArtifacts(SourcesArtifact.class);
ResolvedArtifactResult closestSourceArtifact = auxiliaryArtifactMatchStrategy.findBestMatch(sourceArtifacts, dependency);
if (closestSourceArtifact != null) {
dependency.setSourceFile(closestSourceArtifact.getFile());
}
Set<ArtifactResult> javadocArtifacts = componentResult.getArtifacts(JavadocArtifact.class);
ResolvedArtifactResult closestJavadocArtifact = auxiliaryArtifactMatchStrategy.findBestMatch(javadocArtifacts, dependency);
if(closestJavadocArtifact != null){
dependency.setJavadocFile(closestJavadocArtifact.getFile());
}
}
}
}