boolean[] detectedRepeatOnIndex = new boolean[typeNames.length];
for (int i = 0; i < detectedRepeatOnIndex.length; i++) {
detectedRepeatOnIndex[i] = false;
}
for (int i = 0; i < typeNames.length; i++) {
TypeName typeName = typeNames[i];
if (!detectedRepeatOnIndex[i]) {
Element element = typeName.getName().getStaticElement();
for (int j = i + 1; j < typeNames.length; j++) {
TypeName typeName2 = typeNames[j];
Identifier identifier2 = typeName2.getName();
String name2 = identifier2.getName();
Element element2 = identifier2.getStaticElement();
if (element != null && element.equals(element2)) {
detectedRepeatOnIndex[j] = true;
reportErrorForNode(CompileTimeErrorCode.IMPLEMENTS_REPEATED, typeName2, name2);