Due to a Java compiler bug (hiding .orElseThrow() in a sub-method does the trick)
183391
private IQ mergeDefinitions(Collection<IQ> queries) {
        return queryMerger.mergeDefinitions(queries)
                .orElseThrow(() -> new MappingMergingException("The query should be present"));
    }
311819
private void printMethodDeclaration(MethodDeclaration m, boolean isCompanionClass) {
    ExecutableElement methodElement = m.getExecutableElement();
    TypeElement typeElement = ElementUtil.getDeclaringClass(methodElement);

    if (typeElement.getKind().isInterface()) {
      // isCompanion and isStatic must be both false (i.e. this prints a non-static method decl
      // in @protocol) or must both be true (i.e. this prints a static method decl in the
      // companion class' @interface).
      if (isCompanionClass != ElementUtil.isStatic(methodElement)) {
        return;
      }
    }

    newline();
    JavadocGenerator.printDocComment(getBuilder(), m.getJavadoc());

    String methodSignature = getMethodSignature(m);

    // In order to properly map the method name from the entire signature, we must isolate it from
    // associated type and parameter declarations.  The method name is guaranteed to be between the
    // first closing parenthesis and first colon (for methods with arguments), or the entirety of
    // the declaration after the first closing parenthesis (for methods with no arguments).
    int identifierStartIndex = methodSignature.indexOf(')') + 1;
    int identifierEndIndex =
        methodSignature.contains(":") ? methodSignature.indexOf(':') : methodSignature.length();
    generatedSourceMappings.addMethodMapping(
        m /* methodDeclaration */,
        getBuilder().length() + identifierStartIndex /* targetBegin */,
        identifierEndIndex - identifierStartIndex /* length */);

    print(methodSignature);

    String methodName = nameTable.getMethodSelector(methodElement);
    if (!m.isConstructor() && NameTable.needsObjcMethodFamilyNoneAttribute(methodName)) {
      // Getting around a clang warning.
      // clang assumes that methods with names starting with new, alloc or copy
      // return objects of the same type as the receiving class, regardless of
      // the actual declared return type. This attribute tells clang to not do
      // that, please.
      // See http://clang.llvm.org/docs/AutomaticReferenceCounting.html
      // Sections 5.1 (Explicit method family control)
      // and 5.2.2 (Related result types)
      print(" OBJC_METHOD_FAMILY_NONE");
    }

    if (needsDeprecatedAttribute(m.getAnnotations())) {
      print(" " + DEPRECATED_ATTRIBUTE);
    }
    if (m.isUnavailable()) {
      print(" NS_UNAVAILABLE");
    }
    println(";");
  }
862436
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        conditionalTarget = -1;
        sawMethodWeight = 0;
        super.visitCode(obj);
    }
847878
protected final void declareReturnType(IndentingWriter o, List<IType> intermediates, boolean usesDefaltValues) throws BindingException {
    generateAccessModifier(o);

    if (returnType == null && intermediates == null) {
      o.print("void ");
    } else {
      // we assume that the [retval] param to be passed by reference
      TypeBinding retBinding = TypeBinding.bind(g, returnType, null);

      // add @ReturnValue if necessary
      if ((!retBinding.isDefault && needsMarshalAs()) || (retParam != -1 && (params[retParam].isIn() || retParam != params.length - 1))
          || intermediates != null
          || usesDefaltValues) {
        o.print("@ReturnValue(");
        o.beginCommaMode();
        if (!retBinding.isDefault && needsMarshalAs()) {
          o.comma();
          o.print("type=NativeType." + retBinding.nativeType.name());
        }
        if (retParam != -1 && params[retParam].isIn()) {
          o.comma();
          o.print("inout=true");
        }
        if (retParam != -1 && retParam != params.length - 1 || usesDefaltValues) {
          o.comma();
          o.print("index=" + retParam);
        }

        if (intermediates != null) {
          o.comma();
          o.print("defaultPropertyThrough={");
          o.beginCommaMode();
          for (IType im : intermediates) {
            TypeBinding vb = TypeBinding.bind(g, im, null);
            o.comma();
            o.print(vb.javaType);
            o.print(".class");
          }
          o.endCommaMode();
          o.print("}");
        }

        o.endCommaMode();
        o.println(")");
      }

      o.print(retBinding.javaType);
      o.print(' ');
    }
  }
620647
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        userValues.clear();
        jaxbContextRegs.clear();

        if (Values.STATIC_INITIALIZER.equals(methodName) || Values.CONSTRUCTOR.equals(methodName)) {
            return;
        }

        super.visitCode(obj);
        
        for (Integer pc : jaxbContextRegs.values()) {
        	bugReporter.reportBug(new BugInstance(this, BugType.PMB_LOCAL_BASED_JAXB_CONTEXT.name(), "<clinit>".equals(getMethodName()) ? LOW_PRIORITY : NORMAL_PRIORITY)
        			.addClass(this).addMethod(this).addSourceLine(this, pc.intValue()));
        }
    }
596748
private void generateDoneMethod(SourceWriter sw, JClassType nonLazyType,
      TreeLogger treeLogger) {
    sw.indent();
    sw.println("public Function done() {");
    sw.indent();
    sw.println("return new Function() {");
    sw.indent();

    sw.println("public void f() {");
    sw.indent();
    String classID = nonLazyType.getSimpleSourceName();
    if ("GQuery".equals(classID)) {
      classID = "GQUERY";
    }

    sw.println(
        "ctx = GQuery.$((Element) getElement()).as(" + nonLazyType.getQualifiedSourceName() + "."
            + classID + ");");
    sw.println("for (int i = 0; i < closures.length(); i++) {");
    sw.indent();
    sw.println("closures.get(i).invoke();");
    sw.outdent();
    sw.println("}");
    sw.outdent();
    sw.println("}");
    sw.outdent();
    sw.println("};");
    sw.outdent();
    sw.println("}");
  }
270581
static String access(ExecutableElement method) {
    Set<Modifier> mods = method.getModifiers();
    if (mods.contains(Modifier.PUBLIC)) {
      return "public ";
    } else if (mods.contains(Modifier.PROTECTED)) {
      return "protected ";
    } else {
      return "";
    }
  }
929822
private void checkEmbedAgainst(PageCompilingContext pc, EvaluatorCompiler compiler, Map<String, String> properties, Class<?> embedClass, Node node) {

    // TODO also type check them against expressions
    for (String property : properties.keySet()) {
        try {
            if (!compiler.isWritable(property)) {
                pc.errors.add(
                    CompileError.in(node.outerHtml())
                      //TODO we need better line number detection if there is whitespace between the annotation and tag.
                      .near(node.siblingIndex()-1) // TODO -  line number of the annotation
                      .causedBy(CompileErrors.PROPERTY_NOT_WRITEABLE,
                          String.format("Property %s#%s was not writable. Did you forget to create "
                              + "a setter or @Visible annotation?", embedClass.getSimpleName(), property))
                );
            }
        } catch (ExpressionCompileException ece) {
            pc.errors.add(
                CompileError.in(node.outerHtml())
                    .near(node.siblingIndex()) // TODO - line number
                    .causedBy(CompileErrors.ERROR_COMPILING_PROPERTY)
            );
        }
     }
  }
953748
private void handleMainMethodIfPresent(List methods) {
        boolean found = false;
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            MethodNode node = (MethodNode) iter.next();
            if(node.getName().equals("main")) {
                if (node.isStatic() && node.getParameters().length == 1) {
                    boolean retTypeMatches, argTypeMatches;
                    ClassNode argType = node.getParameters()[0].getType();
                    ClassNode retType = node.getReturnType();

                    argTypeMatches = (argType.equals(ClassHelper.OBJECT_TYPE) || argType.getName().contains("String[]"));
                    retTypeMatches = (retType == ClassHelper.VOID_TYPE || retType == ClassHelper.OBJECT_TYPE);
                    
                    if(retTypeMatches && argTypeMatches) {
                        if(found) {
                            throw new RuntimeException("Repetitive main method found.");
                        } else {
                            found = true;
                        }
                        // if script has both loose statements as well as main(), then main() is ignored
                        if(statementBlock.isEmpty()) {
                            addStatement(node.getCode());
                        }
                        iter.remove();
                    }
                }
            }
        }
    }
371074
static ObjectMethod objectMethodToOverride(ExecutableElement method) {
    String name = method.getSimpleName().toString();
    switch (method.getParameters().size()) {
      case 0:
        if (name.equals("toString")) {
          return ObjectMethod.TO_STRING;
        } else if (name.equals("hashCode")) {
          return ObjectMethod.HASH_CODE;
        }
        break;
      case 1:
        if (name.equals("equals")) {
          TypeMirror param = getOnlyElement(method.getParameters()).asType();
          if (param.getKind().equals(TypeKind.DECLARED)) {
            TypeElement paramType = MoreTypes.asTypeElement(param);
            if (paramType.getQualifiedName().contentEquals("java.lang.Object")) {
              return ObjectMethod.EQUALS;
            }
          }
        }
        break;
      default:
        // No relevant Object methods have more than one parameter.
    }
    return ObjectMethod.NONE;
  }
418410
@Override
    public void sawOpcode(int seen) {
        if (seen != Const.INVOKESPECIAL) {
            sawOpenInAppendMode = false;
            return;
        }
        String calledClassName = getClassConstantOperand();
        String calledMethodName = getNameConstantOperand();
        String calledMethodSig = getSigConstantOperand();
        if (!sawOpenInAppendMode) {
            if ("java/io/ObjectOutputStream".equals(calledClassName) && Const.CONSTRUCTOR_NAME.equals(calledMethodName)
                    && "(Ljava/io/OutputStream;)V".equals(calledMethodSig)
                    && stack.getStackItem(0).getSpecialKind() == OpcodeStack.Item.FILE_OPENED_IN_APPEND_MODE) {
                bugReporter.reportBug(new BugInstance(this, "IO_APPENDING_TO_OBJECT_OUTPUT_STREAM", Priorities.HIGH_PRIORITY)
                .addClassAndMethod(this).addSourceLine(this));
            }
            return;
        }
        if ("java/io/FileOutputStream".equals(calledClassName) && Const.CONSTRUCTOR_NAME.equals(calledMethodName)
                && ("(Ljava/io/File;Z)V".equals(calledMethodSig) || "(Ljava/lang/String;Z)V".equals(calledMethodSig))) {
            OpcodeStack.Item item = stack.getStackItem(0);
            Object value = item.getConstant();
            sawOpenInAppendMode = value instanceof Integer && ((Integer) value).intValue() == 1;
        } else if ("java/io/BufferedOutputStream".equals(calledClassName) && Const.CONSTRUCTOR_NAME.equals(calledMethodName)
                && "(Ljava/io/OutputStream;)V".equals(calledMethodSig)) {
            // do nothing

        } else if ("java/io/ObjectOutputStream".equals(calledClassName) && Const.CONSTRUCTOR_NAME.equals(calledMethodName)
                && "(Ljava/io/OutputStream;)V".equals(calledMethodSig)) {
            bugReporter.reportBug(new BugInstance(this, "IO_APPENDING_TO_OBJECT_OUTPUT_STREAM", Priorities.HIGH_PRIORITY)
                .addClassAndMethod(this).addSourceLine(this));
            sawOpenInAppendMode = false;
        } else {
            sawOpenInAppendMode = false;
        }

    }
42718
@Override
    public void sawOpcode(int seen) {
        try {
            stack.precomputation(this);

            if (seen == Const.INVOKEVIRTUAL) {
                String clsName = getClassConstantOperand();
                if ("java/io/ObjectOutputStream".equals(clsName)) {
                    String name = getNameConstantOperand();
                    if ("writeObject".equals(name) && (stack.getStackDepth() > 0)) {
                        OpcodeStack.Item item = stack.getStackItem(0);
                        JavaClass cls = item.getJavaClass();

                        if ((cls != null) && (cls.getClassName().indexOf(Values.INNER_CLASS_SEPARATOR) >= 0) && hasOuterClassSyntheticReference(cls)) {
                            bugReporter.reportBug(new BugInstance(this, BugType.PUS_POSSIBLE_UNSUSPECTED_SERIALIZATION.name(), NORMAL_PRIORITY).addClass(this)
                                    .addMethod(this).addSourceLine(this));
                        }
                    }
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
1319440
@Override
    public void visitCode(Code obj) {
        try {
            Method m = getMethod();
            Type retType = m.getReturnType();
            if ("Ljava/lang/Boolean;".equals(retType.getSignature())) {
                stack.resetForMethodEntry(this);
                super.visitCode(obj);
            }
        } catch (StopOpcodeParsingException e) {
            // if the method was already reported
        }
    }
635208
function(oArgs) {
    //TODO: filter for all spurious events at a lower level
    if(!Dom.isAncestor(oArgs.target,Ev.getRelatedTarget(oArgs.event))) {
        this.highlightRow(oArgs.target);
    }
}
104132
private ImmutableList<MethodDeclaration> generateStateMethodsForSoyElementClass(
      String soyElementClassName, TemplateStateVar stateVar) {
    JsType jsType = JsType.forIncrementalDomState(stateVar.type());
    String stateAccessorSuffix =
        Ascii.toUpperCase(stateVar.name().substring(0, 1)) + stateVar.name().substring(1);
    Expression stateValue = id("this").dotAccess(STATE_PREFIX + stateVar.name());
    MethodDeclaration getStateMethod =
        MethodDeclaration.create(
            "get" + stateAccessorSuffix,
            JsDoc.builder().addParameterizedAnnotation("return", jsType.typeExpr()).build(),
            Statement.returnValue(stateValue));

    jsType = JsType.forIncrementalDomState(stateVar.type());
    ImmutableList.Builder<Statement> setStateMethodStatements = ImmutableList.builder();
    Optional<Expression> typeAssertion =
        jsType.getSoyTypeAssertion(
            id(stateVar.name()), stateVar.name(), templateTranslationContext.codeGenerator());
    if (typeAssertion.isPresent()) {
      setStateMethodStatements.add(typeAssertion.get().asStatement());
    }
    setStateMethodStatements.add(
        stateValue.assign(id(stateVar.name())).asStatement(), Statement.returnValue(id("this")));
    MethodDeclaration setStateMethod =
        MethodDeclaration.create(
            "set" + stateAccessorSuffix,
            JsDoc.builder()
                .addParam(stateVar.name(), jsType.typeExpr())
                .addParameterizedAnnotation("return", "!" + soyElementClassName)
                .build(),
            Statement.of(setStateMethodStatements.build()));
    return ImmutableList.of(getStateMethod, setStateMethod);
  }
1152339
private void fixGetSet(HashMap<String, HashMap> propertyTable)
            throws IntrospectionException {

        if (propertyTable == null) {
            return;
        }

        for (Map.Entry<String, HashMap> entry : propertyTable.entrySet()) {
            HashMap<String, Object> table = entry.getValue();
            ArrayList<Method> getters = (ArrayList<Method>) table
                    .get(STR_GETTERS);
            ArrayList<Method> setters = (ArrayList<Method>) table
                    .get(STR_SETTERS);

            Method normalGetter = null;
            Method indexedGetter = null;
            Method normalSetter = null;
            Method indexedSetter = null;

            Class<?> normalPropType = null;
            Class<?> indexedPropType = null;

            if (getters == null) {
                getters = new ArrayList<Method>();
            }

            if (setters == null) {
                setters = new ArrayList<Method>();
            }

            // retrieve getters
            Class<?>[] paramTypes = null;
            String methodName = null;
            for (Method getter : getters) {
                paramTypes = getter.getParameterTypes();
                methodName = getter.getName();
                // checks if it's a normal getter
                if (paramTypes == null || paramTypes.length == 0) {
                    // normal getter found
                    if (normalGetter == null
                            || methodName.startsWith(PREFIX_IS)) {
                        normalGetter = getter;
                    }
                }

                // checks if it's an indexed getter
                if (paramTypes != null && paramTypes.length == 1
                        && paramTypes[0] == int.class) {
                    // indexed getter found
                    if (indexedGetter == null
                            || methodName.startsWith(PREFIX_GET)
                            || (methodName.startsWith(PREFIX_IS) && !indexedGetter
                                    .getName().startsWith(PREFIX_GET))) {
                        indexedGetter = getter;
                    }
                }
            }

            // retrieve normal setter
            if (normalGetter != null) {
                // Now we will try to look for normal setter of the same type.
                Class<?> propertyType = normalGetter.getReturnType();

                for (Method setter : setters) {
                    if (setter.getParameterTypes().length == 1
                            && propertyType
                                    .equals(setter.getParameterTypes()[0])) {
                        normalSetter = setter;
                        break;
                    }
                }
            } else {
                // Normal getter wasn't defined. Let's look for the last
                // defined setter

                for (Method setter : setters) {
                    if (setter.getParameterTypes().length == 1) {
                        normalSetter = setter;
                    }
                }
            }

            // retrieve indexed setter
            if (indexedGetter != null) {
                // Now we will try to look for indexed setter of the same type.
                Class<?> propertyType = indexedGetter.getReturnType();

                for (Method setter : setters) {
                    if (setter.getParameterTypes().length == 2
                            && setter.getParameterTypes()[0] == int.class
                            && propertyType
                                    .equals(setter.getParameterTypes()[1])) {
                        indexedSetter = setter;
                        break;
                    }
                }
            } else {
                // Indexed getter wasn't defined. Let's look for the last
                // defined indexed setter

                for (Method setter : setters) {
                    if (setter.getParameterTypes().length == 2
                            && setter.getParameterTypes()[0] == int.class) {
                        indexedSetter = setter;
                    }
                }
            }

            // determine property type
            if (normalGetter != null) {
                normalPropType = normalGetter.getReturnType();
            } else if (normalSetter != null) {
                normalPropType = normalSetter.getParameterTypes()[0];
            }

            // determine indexed getter/setter type
            if (indexedGetter != null) {
                indexedPropType = indexedGetter.getReturnType();
            } else if (indexedSetter != null) {
                indexedPropType = indexedSetter.getParameterTypes()[1];
            }

            // convert array-typed normal getters to indexed getters
            if (normalGetter != null && normalGetter.getReturnType().isArray()) {

            }

            // RULES
            // These rules were created after performing extensive black-box
            // testing of RI

            // RULE1
            // Both normal getter and setter of the same type were defined;
            // no indexed getter/setter *PAIR* of the other type defined
            if (normalGetter != null && normalSetter != null
                    && (indexedGetter == null || indexedSetter == null)) {
                table.put(STR_NORMAL, STR_VALID);
                table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                table.put(STR_NORMAL + STR_PROPERTY_TYPE, normalPropType);
                continue;
            }

            // RULE2
            // normal getter and/or setter was defined; no indexed
            // getters & setters defined
            if ((normalGetter != null || normalSetter != null)
                    && indexedGetter == null && indexedSetter == null) {
                table.put(STR_NORMAL, STR_VALID);
                table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                table.put(STR_NORMAL + STR_PROPERTY_TYPE, normalPropType);
                continue;
            }

            // RULE3
            // mix of normal / indexed getters and setters are defined. Types
            // are compatible
            if ((normalGetter != null || normalSetter != null)
                    && (indexedGetter != null || indexedSetter != null)) {
                // (1)!A!B!C!D
                if (normalGetter != null && normalSetter != null
                        && indexedGetter != null && indexedSetter != null) {
                    if (indexedGetter.getName().startsWith(PREFIX_GET)) {
                        table.put(STR_NORMAL, STR_VALID);
                        table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                        table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                        table.put(STR_NORMAL + STR_PROPERTY_TYPE,
                                normalPropType);

                        table.put(STR_INDEXED, STR_VALID);
                        table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                        table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                        table.put(STR_INDEXED + STR_PROPERTY_TYPE,
                                indexedPropType);
                    } else {
                        if (normalPropType != boolean.class
                                && normalGetter.getName().startsWith(PREFIX_IS)) {
                            table.put(STR_INDEXED, STR_VALID);
                            table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                            table.put(STR_INDEXED + STR_PROPERTY_TYPE,
                                    indexedPropType);
                        } else {
                            table.put(STR_NORMAL, STR_VALID);
                            table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                            table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                            table.put(STR_NORMAL + STR_PROPERTY_TYPE,
                                    normalPropType);
                        }
                    }
                    continue;
                }

                // (2)!AB!C!D
                if (normalGetter != null && normalSetter == null
                        && indexedGetter != null && indexedSetter != null) {
                    table.put(STR_NORMAL, STR_VALID);
                    table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                    table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                    table.put(STR_NORMAL + STR_PROPERTY_TYPE, normalPropType);

                    table.put(STR_INDEXED, STR_VALID);
                    if (indexedGetter.getName().startsWith(PREFIX_GET)) {
                        table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                    }
                    table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                    table.put(STR_INDEXED + STR_PROPERTY_TYPE, indexedPropType);
                    continue;
                }

                // (3)A!B!C!D
                if (normalGetter == null && normalSetter != null
                        && indexedGetter != null && indexedSetter != null) {
                    table.put(STR_INDEXED, STR_VALID);
                    if (indexedGetter.getName().startsWith(PREFIX_GET)) {
                        table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                    }
                    table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                    table.put(STR_INDEXED + STR_PROPERTY_TYPE, indexedPropType);
                    continue;
                }

                // (4)!AB!CD
                if (normalGetter != null && normalSetter == null
                        && indexedGetter != null && indexedSetter == null) {
                    if (indexedGetter.getName().startsWith(PREFIX_GET)) {
                        table.put(STR_NORMAL, STR_VALID);
                        table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                        table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                        table.put(STR_NORMAL + STR_PROPERTY_TYPE,
                                normalPropType);

                        table.put(STR_INDEXED, STR_VALID);
                        table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                        table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                        table.put(STR_INDEXED + STR_PROPERTY_TYPE,
                                indexedPropType);
                    } else {
                        table.put(STR_NORMAL, STR_VALID);
                        table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                        table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                        table.put(STR_NORMAL + STR_PROPERTY_TYPE,
                                normalPropType);
                    }
                    continue;
                }

                // (5)A!B!CD
                if (normalGetter == null && normalSetter != null
                        && indexedGetter != null && indexedSetter == null) {
                    if (indexedGetter.getName().startsWith(PREFIX_GET)) {
                        table.put(STR_NORMAL, STR_VALID);
                        table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                        table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                        table.put(STR_NORMAL + STR_PROPERTY_TYPE,
                                normalPropType);

                        table.put(STR_INDEXED, STR_VALID);
                        table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                        table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                        table.put(STR_INDEXED + STR_PROPERTY_TYPE,
                                indexedPropType);
                    } else {
                        table.put(STR_NORMAL, STR_VALID);
                        table.put(STR_NORMAL + PREFIX_GET, normalGetter);
                        table.put(STR_NORMAL + PREFIX_SET, normalSetter);
                        table.put(STR_NORMAL + STR_PROPERTY_TYPE,
                                normalPropType);
                    }
                    continue;
                }

                // (6)!ABC!D
                if (normalGetter != null && normalSetter == null
                        && indexedGetter == null && indexedSetter != null) {
                    table.put(STR_INDEXED, STR_VALID);
                    table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                    table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                    table.put(STR_INDEXED + STR_PROPERTY_TYPE, indexedPropType);
                    continue;
                }

                // (7)A!BC!D
                if (normalGetter == null && normalSetter != null
                        && indexedGetter == null && indexedSetter != null) {
                    table.put(STR_INDEXED, STR_VALID);
                    table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                    table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                    table.put(STR_INDEXED + STR_PROPERTY_TYPE, indexedPropType);
                    continue;
                }
            }

            // RULE4
            // no normal normal getter / setter.
            // Only indexed getter and/or setter is given
            // no normal setters / getters defined
            if (normalSetter == null && normalGetter == null
                    && (indexedGetter != null || indexedSetter != null)) {
                if (indexedGetter != null
                        && indexedGetter.getName().startsWith(PREFIX_IS)) {
                    if (indexedSetter != null) {
                        table.put(STR_INDEXED, STR_VALID);
                        table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                        table.put(STR_INDEXED + STR_PROPERTY_TYPE,
                                indexedPropType);
                    }
                    continue;
                }
                table.put(STR_INDEXED, STR_VALID);
                table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                table.put(STR_INDEXED + STR_PROPERTY_TYPE, indexedPropType);
                continue;
            }

            // RULE5
            // Both indexed getter and setter methods are defined
            // no normal getter/setter *PAIR* of the other type defined
            if ((normalSetter != null || normalGetter != null)
                    && indexedGetter != null && indexedSetter != null) {
                table.put(STR_INDEXED, STR_VALID);
                table.put(STR_INDEXED + PREFIX_GET, indexedGetter);
                table.put(STR_INDEXED + PREFIX_SET, indexedSetter);
                table.put(STR_INDEXED + STR_PROPERTY_TYPE, indexedPropType);
                continue;
            }

            // default rule - invalid property
            table.put(STR_NORMAL, STR_INVALID);
            table.put(STR_INDEXED, STR_INVALID);
        }

    }
237998
private static void fixUninitializedVarDeclarations(Node n, Node containingBlock) {
    // Inner loop structure must already have logic to initialize its
    // variables.  In particular FOR-IN structures must not be modified.
    if (NodeUtil.isLoopStructure(n)) {
      return;
    }

    if ((n.isVar() || n.isLet()) && n.hasOneChild()) {
      Node name = n.getFirstChild();
      // It isn't initialized.
      if (!name.hasChildren()) {
        Node srcLocation = name;
        name.addChildToBack(NodeUtil.newUndefinedNode(srcLocation));
        containingBlock.addChildToFront(n.detach());
      }
      return;
    }

    for (Node c = n.getFirstChild(); c != null; c = c.getNext()) {
      fixUninitializedVarDeclarations(c, containingBlock);
    }
  }