anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: autonomousapps/dependency-analysis-android-gradle-plugin
Issue: AdviceAggregateReportTask class cast exception

`AdviceAggregateReportTask` crashes when trying to cast `(dependency as ProjectDependency)`

**Plugin version**
`0.61.0`

**Gradle version**
`6.6.1`

**Android Gradle Plugin (AGP) version**
`4.2.0-alpha13` - yes, I know it's not supported yet

**Describe the bug**
```
Caused by: java.lang.ClassCastException: org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency_Decorated incompatible with org.gradle.api.artifacts.ProjectDependency
        at com.autonomousapps.tasks.AdviceAggregateReportTask.action(AdviceAggregateReportTask.kt:40)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
```

**To Reproduce**
Steps to reproduce the behavior:
Running `./gradlew buildHealth` fails with exception

Seems to happen because of a `compileOnly` dependency.

**Expected behavior**
Running `./gradlew buildHealth` should gracefully handle unsupported dependencies

Changed files:
src/main/kotlin/com/autonomousapps/tasks/AdviceAggregateReportTask.kt

diff --git a/src/main/kotlin/com/autonomousapps/tasks/AdviceAggregateReportTask.kt b/src/main/kotlin/com/autonomousapps/tasks/AdviceAggregateReportTask.kt
index d8ce9b81..5e7488f7 100644
--- a/src/main/kotlin/com/autonomousapps/tasks/AdviceAggregateReportTask.kt
+++ b/src/main/kotlin/com/autonomousapps/tasks/AdviceAggregateReportTask.kt
@@ -35,15 +35,19 @@ abstract class AdviceAggregateReportTask : DefaultTask() {
     val projectReportPrettyFile = projectReportPretty.getAndDelete()
 
     val comprehensiveAdvice: Map<String, Set<ComprehensiveAdvice>> =
-      adviceAllReports.dependencies.map { dependency ->
-        val path = (dependency as ProjectDependency).dependencyProject.path
+      adviceAllReports.dependencies
+        // They should all be project dependencies, but
+        // https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/issues/295
+        .filterIsInstance<ProjectDependency>()
+        .map { dependency ->
+          val path = dependency.dependencyProject.path
 
-        val compAdvice: Set<ComprehensiveAdvice> = adviceAllReports.fileCollection(dependency)
-          .filter { it.exists() }
-          .mapToSet { it.readText().fromJson() }
+          val compAdvice: Set<ComprehensiveAdvice> = adviceAllReports.fileCollection(dependency)
+            .filter { it.exists() }
+            .mapToSet { it.readText().fromJson() }
 
-        path to compAdvice.toMutableSet()
-      }.mergedMap()
+          path to compAdvice.toMutableSet()
+        }.mergedMap()
 
     val buildHealth = comprehensiveAdvice.map { (path, advice) ->
       ComprehensiveAdvice(