nus-yam/ex-repair huggingface dataset:
Program: 27100
Project: 27100
Buggy source:
/** 
 * Computes the restricted type of this type knowing that the  {@code ToBoolean} predicate has a specific value. For more informationabout the  {@code ToBoolean} predicate, see{@link #getPossibleToBooleanOutcomes}.
 * @param outcome the value of the {@code ToBoolean} predicate
 * @return the restricted type, or the Any Type if the underlying type couldnot have yielded this ToBoolean value TODO(user): Move this method to the SemanticRAI and use the visit method of types to get the restricted type.
 */
public JSType getRestrictedTypeGivenToBooleanOutcome(boolean outcome){
  if (outcome && this == getNativeType(JSTypeNative.UNKNOWN_TYPE)) {
    return getNativeType(JSTypeNative.CHECKED_UNKNOWN_TYPE);
  }
  BooleanLiteralSet literals=getPossibleToBooleanOutcomes();
  if (literals.contains(outcome)) {
    return this;
  }
 else {
    return getNativeType(JSTypeNative.NO_TYPE);
  }
}

Fixed version (ground truth):
/** 
 * Computes the restricted type of this type knowing that the  {@code ToBoolean} predicate has a specific value. For more informationabout the  {@code ToBoolean} predicate, see{@link #getPossibleToBooleanOutcomes}.
 * @param outcome the value of the {@code ToBoolean} predicate
 * @return the restricted type, or the Any Type if the underlying type couldnot have yielded this ToBoolean value TODO(user): Move this method to the SemanticRAI and use the visit method of types to get the restricted type.
 */
public JSType getRestrictedTypeGivenToBooleanOutcome(boolean outcome){
  if (outcome && areIdentical(this,getNativeType(JSTypeNative.UNKNOWN_TYPE))) {
    return getNativeType(JSTypeNative.CHECKED_UNKNOWN_TYPE);
  }
  BooleanLiteralSet literals=getPossibleToBooleanOutcomes();
  if (literals.contains(outcome)) {
    return this;
  }
 else {
    return getNativeType(JSTypeNative.NO_TYPE);
  }
}
Program: 27101
Project: 27101
Buggy source:
/** 
 * Computes the subset of   {@code this} and {@code that} types undershallow inequality.
 * @return A pair containing the restricted type of {@code this} as the firstcomponent and the restricted type of  {@code that} as the secondelement. The returned pair is never  {@code null} even though itscomponents may be  {@code null}
 */
public TypePair getTypesUnderShallowInequality(JSType that){
  if (that.isUnionType()) {
    TypePair p=that.toMaybeUnionType().getTypesUnderShallowInequality(this);
    return new TypePair(p.typeB,p.typeA);
  }
  if (isNullType() && that.isNullType() || isVoidType() && that.isVoidType()) {
    return new TypePair(null,null);
  }
 else {
    return new TypePair(this,that);
  }
}

Fixed version (ground truth):
/** 
 * Computes the subset of   {@code this} and {@code that} types undershallow inequality.
 * @return A pair containing the restricted type of {@code this} as the firstcomponent and the restricted type of  {@code that} as the secondelement. The returned pair is never  {@code null} even though itscomponents may be  {@code null}
 */
public TypePair getTypesUnderShallowInequality(JSType that){
  if (that.isUnionType()) {
    TypePair p=that.toMaybeUnionType().getTypesUnderShallowInequality(this);
    return new TypePair(p.typeB,p.typeA);
  }
  if ((isNullType() && that.isNullType()) || (isVoidType() && that.isVoidType())) {
    return new TypePair(null,null);
  }
 else {
    return new TypePair(this,that);
  }
}
Program: 27103
Project: 27103
Buggy source:
public static boolean isEquivalent(JSType typeA,JSType typeB){
  return (typeA == null || typeB == null) ? typeA == typeB : typeA.isEquivalentTo(typeB);
}

Fixed version (ground truth):
public static boolean isEquivalent(JSType typeA,JSType typeB){
  return (typeA == null || typeB == null) ? areIdentical(typeA,typeB) : typeA.isEquivalentTo(typeB);
}
Program: 27104
Project: 27104
Buggy source:
public final boolean isUnresolvedOrResolvedUnknown(){
  return isNoResolvedType() || isNamedType() && isUnknownType();
}

Fixed version (ground truth):
public final boolean isUnresolvedOrResolvedUnknown(){
  return isNoResolvedType() || (isNamedType() && isUnknownType());
}
Program: 27105
Project: 27105
Buggy source:
private void checkProtoCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (referencedType == this) {
    handleTypeCycle(reporter);
  }
}

Fixed version (ground truth):
private void checkProtoCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (areIdentical(referencedType,this)) {
    handleTypeCycle(reporter);
  }
}
Program: 27106
Project: 27106
Buggy source:
private void checkEnumElementCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (referencedType instanceof EnumElementType && ((EnumElementType)referencedType).getPrimitiveType() == this) {
    handleTypeCycle(reporter);
  }
}

Fixed version (ground truth):
private void checkEnumElementCycle(ErrorReporter reporter){
  JSType referencedType=getReferencedType();
  if (referencedType instanceof EnumElementType && areIdentical(this,((EnumElementType)referencedType).getPrimitiveType())) {
    handleTypeCycle(reporter);
  }
}
Program: 27108
Project: 27108
Buggy source:
/** 
 * @return Whether the given property access is on 'this' or a static property on a class. 
 */
private boolean isCandidatePropertyDefinition(Node n){
  Node target=n.getFirstChild();
  return target.isThis() || isConstructor(target);
}

Fixed version (ground truth):
/** 
 * @return Whether the given node is a @private property declaration that is not marked constant.
 */
private boolean isCandidatePropertyDefinition(Node n){
  if (!NodeUtil.isLhsOfAssign(n)) {
    return false;
  }
  Node target=n.getFirstChild();
  if (!(target.isThis() || isConstructor(target))) {
    return false;
  }
  JSDocInfo info=NodeUtil.getBestJSDocInfo(n);
  return info != null && info.getVisibility() == Visibility.PRIVATE && !info.isConstant() && !info.hasTypedefType() && !info.hasEnumParameterType() && !info.isInterface() && !isFunctionProperty(n);
}
Program: 27109
Project: 27109
Buggy source:
@Override public void visit(NodeTraversal t,Node n,Node parent){
switch (n.getToken()) {
case SCRIPT:
    reportMissingConst(t);
  break;
case GETELEM:
case GETPROP:
Node lastChild=n.getLastChild();
if (!lastChild.isString()) {
return;
}
String propName=lastChild.getString();
if (isCandidatePropertyDefinition(n) && isNonConstCheckablePrivatePropDecl(n)) {
candidates.add(n);
}
 else if (isModificationOp(n)) {
modified.add(propName);
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void visit(NodeTraversal t,Node n,Node parent){
switch (n.getToken()) {
case SCRIPT:
    reportMissingConst(t);
  break;
case GETELEM:
case GETPROP:
Node lastChild=n.getLastChild();
if (!lastChild.isString()) {
return;
}
String propName=lastChild.getString();
if (isCandidatePropertyDefinition(n)) {
candidates.add(n);
}
 else if (isModificationOp(n)) {
modified.add(propName);
}
break;
default :
break;
}
}
Program: 27110
Project: 27110
Buggy source:
private void processAllFiles(Deque<ScriptDescription> scriptDescriptions,Iterable<Node> scriptNodes){
  for (  Node c : scriptNodes) {
    checkState(c.isScript(),c);
    NodeTraversal.traverse(compiler,c,new UnwrapGoogLoadModule());
    pushScript(new ScriptDescription());
    currentScript.rootNode=c;
    scriptDescriptions.addLast(currentScript);
    NodeTraversal.traverse(compiler,c,new ScriptPreprocessor());
    NodeTraversal.traverse(compiler,c,new ScriptRecorder());
    popScript();
  }
  reportUnrecognizedRequires();
  if (compiler.hasHaltingErrors()) {
    return;
  }
  for (  Node c : scriptNodes) {
    pushScript(scriptDescriptions.removeFirst());
    NodeTraversal.traverse(compiler,c,new ScriptUpdater());
    popScript();
  }
}

Fixed version (ground truth):
private void processAllFiles(Deque<ScriptDescription> scriptDescriptions,Iterable<Node> scriptNodes){
  for (  Node c : scriptNodes) {
    checkState(c.isScript(),c);
    if (c.isFromExterns() && !NodeUtil.isFromTypeSummary(c)) {
      continue;
    }
    NodeTraversal.traverse(compiler,c,new UnwrapGoogLoadModule());
    pushScript(new ScriptDescription());
    currentScript.rootNode=c;
    scriptDescriptions.addLast(currentScript);
    NodeTraversal.traverse(compiler,c,new ScriptPreprocessor());
    NodeTraversal.traverse(compiler,c,new ScriptRecorder());
    popScript();
  }
  reportUnrecognizedRequires();
  if (compiler.hasHaltingErrors()) {
    return;
  }
  for (  Node c : scriptNodes) {
    if (c.isFromExterns() && !NodeUtil.isFromTypeSummary(c)) {
      continue;
    }
    pushScript(scriptDescriptions.removeFirst());
    NodeTraversal.traverse(compiler,c,new ScriptUpdater());
    popScript();
  }
}
Program: 27111
Project: 27111
Buggy source:
public void testIjsModule(){
  allowExternsChanges();
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected(lines("String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
public void testIjsModule(){
  allowExternsChanges();
  test(new String[]{lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str")},new String[]{lines("String_Node_Str","String_Node_Str")});
}
Program: 27112
Project: 27112
Buggy source:
public void testExternsReferencesToGoogModuleTypesAreRewritten(){
  CompilerOptions options=createCompilerOptions();
  options.setClosurePass(true);
  options.setCheckTypes(true);
  test(options,new String[]{LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")},(String[])null);
}

Fixed version (ground truth):
public void testExternsReferencesToGoogModuleTypesAreRewritten(){
  CompilerOptions options=createCompilerOptions();
  options.setClosurePass(true);
  options.setCheckTypes(true);
  test(options,new String[]{LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")},(String[])null);
}
Program: 27113
Project: 27113
Buggy source:
Node processAstRoot(ProgramTree rootNode){
  Node scriptNode=newNode(Token.SCRIPT);
  for (  ParseTree child : rootNode.sourceElements) {
    scriptNode.addChildToBack(transform(child));
  }
  parseDirectives(scriptNode);
  boolean isGoogModule=isGoogModuleFile(scriptNode);
  if (isGoogModule || features.has(Feature.MODULES)) {
    Node moduleNode=newNode(Token.MODULE_BODY);
    setSourceInfo(moduleNode,rootNode);
    moduleNode.addChildrenToBack(scriptNode.removeChildren());
    scriptNode.addChildToBack(moduleNode);
    if (isGoogModule) {
      scriptNode.putBooleanProp(Node.GOOG_MODULE,true);
    }
  }
  return scriptNode;
}

Fixed version (ground truth):
Node processAstRoot(ProgramTree rootNode){
  Node scriptNode=newNode(Token.SCRIPT);
  for (  ParseTree child : rootNode.sourceElements) {
    scriptNode.addChildToBack(transform(child));
  }
  parseDirectives(scriptNode);
  boolean isGoogModule=isGoogModuleFile(scriptNode);
  if (isGoogModule || features.has(Feature.MODULES)) {
    Node moduleNode=newNode(Token.MODULE_BODY);
    setSourceInfo(moduleNode,rootNode);
    moduleNode.addChildrenToBack(scriptNode.removeChildren());
    scriptNode.addChildToBack(moduleNode);
    if (isGoogModule) {
      scriptNode.putBooleanProp(Node.GOOG_MODULE,true);
    }
 else {
      scriptNode.putBooleanProp(Node.ES6_MODULE,true);
    }
  }
  return scriptNode;
}
Program: 27115
Project: 27115
Buggy source:
@Override protected void setUp() throws Exception {
  super.setUp();
  enableTypeCheck();
  enableClosurePass();
  enableClosurePassForExpected();
  enableRewriteClosureCode();
  setLanguage(LanguageMode.ECMASCRIPT_2015,LanguageMode.ECMASCRIPT5_STRICT);
  enableClosurePass();
  configuration=DEFAULT_CONFORMANCE;
  ignoreWarnings(DiagnosticGroups.MISSING_PROPERTIES);
}

Fixed version (ground truth):
@Override protected void setUp() throws Exception {
  super.setUp();
  enableTypeCheck();
  enableClosurePass();
  enableClosurePassForExpected();
  enableRewriteClosureCode();
  setLanguage(LanguageMode.ECMASCRIPT_2015,LanguageMode.ECMASCRIPT5_STRICT);
  configuration=DEFAULT_CONFORMANCE;
  ignoreWarnings(DiagnosticGroups.MISSING_PROPERTIES);
}
Program: 27118
Project: 27118
Buggy source:
protected final void assertTypeNotEquals(String msg,JSType a,JSType b){
  Asserts.assertTypeNotEquals(msg,a,b);
}

Fixed version (ground truth):
protected final void assertTypeNotEquals(JSType a,JSType b){
  Asserts.assertTypeNotEquals(a,b);
}
Program: 27119
Project: 27119
Buggy source:
/** 
 * Gets a   {@link Property} given the node that references it; the {@link Property} is createdif it does not already exist.
 * @return A {@link Property}, or null if the provided node is not a qualified name.
 */
private Property getOrCreateProperty(Node propNode){
  if (!propNode.isQualifiedName()) {
    return null;
  }
  String propName=propNode.isGetProp() ? propNode.getLastChild().getString() : propNode.getQualifiedName();
  if (propertyMap.containsKey(propName)) {
    return propertyMap.get(propName);
  }
  Property property=new Property(propName);
  propertyMap.put(propName,property);
  if (propNode.isGetProp()) {
    Property parentProperty=getOrCreateProperty(propNode.getFirstChild());
    if (parentProperty != null) {
      parentProperty.children.add(property);
    }
  }
  return property;
}

Fixed version (ground truth):
/** 
 * Gets a   {@link Property} given the node that references it; the {@link Property} is createdif it does not already exist.
 * @return A {@link Property}, or null if the provided node is not a qualified name.
 */
private Property getOrCreateProperty(Node propNode){
  if (!propNode.isQualifiedName()) {
    return null;
  }
  String propName=propNode.isGetProp() ? propNode.getLastChild().getString() : propNode.getQualifiedName();
  Property property=propertyMap.computeIfAbsent(propName,name -> new Property(name));
  if (propNode.isGetProp()) {
    Property parentProperty=getOrCreateProperty(propNode.getFirstChild());
    if (parentProperty != null) {
      parentProperty.children.add(property);
    }
  }
  return property;
}
Program: 27121
Project: 27121
Buggy source:
private void replaceSymbol(NodeTraversal t,Node node,String name,CompilerInput input){
  Node parent=node.getParent();
  boolean isCrossModule=isCrossModuleName(name);
  if (!isCrossModule) {
    if (!NodeUtil.isNameDeclaration(parent)) {
      return;
    }
    boolean hasInterestingChildren=false;
    for (    Node c : parent.children()) {
      if (!c.isName() || isCrossModuleName(c.getString()) || isExternVar(c.getString(),t)) {
        hasInterestingChildren=true;
        break;
      }
    }
    if (!hasInterestingChildren) {
      return;
    }
  }
  Node replacement=isCrossModule ? IR.getprop(IR.name(globalSymbolNamespace).srcref(node),IR.string(name).srcref(node)) : IR.name(name).srcref(node);
  replacement.srcref(node);
  if (node.hasChildren()) {
    Node assign=IR.assign(replacement,node.removeFirstChild());
    parent.replaceChild(node,assign);
    compiler.reportChangeToEnclosingScope(assign);
  }
 else   if (isCrossModule) {
    parent.replaceChild(node,replacement);
    compiler.reportChangeToEnclosingScope(replacement);
    if (parent.isCall() && !maybeReferencesThis.contains(name)) {
      parent.putBooleanProp(Node.FREE_CALL,false);
    }
  }
  if (!isCrossModule && NodeUtil.isNameDeclaration(parent)) {
    preDeclarations.add(new ModuleGlobal(input.getAstRoot(compiler),IR.name(name).srcref(node)));
  }
  compiler.reportChangeToEnclosingScope(parent);
}

Fixed version (ground truth):
/** 
 * Replaces a global cross-module name with an access on the global namespace symbol 
 */
private void replaceSymbol(Node node,String name){
  Node parent=node.getParent();
  Node replacement=IR.getprop(IR.name(globalSymbolNamespace),IR.string(name));
  replacement.useSourceInfoFromForTree(node);
  parent.replaceChild(node,replacement);
  compiler.reportChangeToEnclosingScope(replacement);
  if (parent.isCall() && !maybeReferencesThis.contains(name)) {
    parent.putBooleanProp(Node.FREE_CALL,false);
  }
  compiler.reportChangeToEnclosingScope(parent);
}
Program: 27122
Project: 27122
Buggy source:
/** 
 * Rewrites extern names to be explicit children of window instead of only implicitly referencing it. This enables injecting window into a scope and make all global symbols depend on the injected object.
 */
private void visitExtern(Node nameNode,Node parent){
  String name=nameNode.getString();
  if (globalSymbolNamespace.equals(name) || SPECIAL_EXTERNS.contains(name)) {
    return;
  }
  Node windowPropAccess=IR.getprop(IR.name(WINDOW),IR.string(name));
  if (NodeUtil.isNameDeclaration(parent) && nameNode.hasOneChild()) {
    Node assign=IR.assign(windowPropAccess,nameNode.removeFirstChild());
    assign.setJSDocInfo(parent.getJSDocInfo());
    parent.replaceChild(nameNode,assign.srcrefTree(parent));
  }
 else {
    parent.replaceChild(nameNode,windowPropAccess.srcrefTree(nameNode));
  }
  compiler.reportChangeToEnclosingScope(parent);
}

Fixed version (ground truth):
/** 
 * Rewrites extern names to be explicit children of window instead of only implicitly referencing it. This enables injecting window into a scope and make all global symbols depend on the injected object.
 */
private void visitExtern(Node nameNode,Node parent){
  String name=nameNode.getString();
  if (globalSymbolNamespace.equals(name) || SPECIAL_EXTERNS.contains(name)) {
    return;
  }
  Node windowPropAccess=IR.getprop(IR.name(WINDOW),IR.string(name));
  parent.replaceChild(nameNode,windowPropAccess.srcrefTree(nameNode));
  compiler.reportChangeToEnclosingScope(parent);
}
Program: 27123
Project: 27123
Buggy source:
private void visitName(NodeTraversal t,Node n,Node parent){
  String name=n.getString();
  if (parent.isFunction() && name.isEmpty()) {
    return;
  }
  if (isExternVar(name,t)) {
    visitExtern(n,parent);
    return;
  }
  Var var=t.getScope().getVar(name);
  if (!var.isGlobal() && (name.equals(globalSymbolNamespace) || name.startsWith(globalSymbolNamespace + DISAMBIGUATION_SUFFIX))) {
    n.setString(name + DISAMBIGUATION_SUFFIX);
    compiler.reportChangeToEnclosingScope(n);
  }
  if (!var.isGlobal()) {
    return;
  }
  replaceSymbol(t,n,name,t.getInput());
}

Fixed version (ground truth):
private void visitName(NodeTraversal t,Node n,Node parent){
  String name=n.getString();
  if (parent.isFunction() && name.isEmpty()) {
    return;
  }
  if (isExternVar(name,t)) {
    visitExtern(n,parent);
    return;
  }
  Var var=t.getScope().getVar(name);
  if (!var.isGlobal() && (name.equals(globalSymbolNamespace) || name.startsWith(globalSymbolNamespace + DISAMBIGUATION_SUFFIX))) {
    n.setString(name + DISAMBIGUATION_SUFFIX);
    compiler.reportChangeToEnclosingScope(n);
  }
  if (!(var.isGlobal() && isCrossModuleName(name))) {
    return;
  }
  replaceSymbol(n,name);
}
Program: 27124
Project: 27124
Buggy source:
public void testObjectDestructuringDeclarations(){
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void testObjectDestructuringDeclarations(){
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
  test("String_Node_Str","String_Node_Str");
}
Program: 27125
Project: 27125
Buggy source:
public void testSameVarDeclaredInExternsAndSource(){
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
}

Fixed version (ground truth):
public void testSameVarDeclaredInExternsAndSource(){
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
  test(externs("String_Node_Str"),srcs("String_Node_Str"),expected("String_Node_Str"));
}
Program: 27126
Project: 27126
Buggy source:
public void testObjectDestructuringDeclarations_acrossModules(){
  assumeCrossModuleNames=false;
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
}

Fixed version (ground truth):
public void testObjectDestructuringDeclarations_acrossModules(){
  assumeCrossModuleNames=false;
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
  test(createModules("String_Node_Str","String_Node_Str"),new String[]{"String_Node_Str","String_Node_Str"});
}
Program: 27127
Project: 27127
Buggy source:
public void testObjectDestructuringDeclarations_allSameModule(){
  assumeCrossModuleNames=false;
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
}

Fixed version (ground truth):
public void testObjectDestructuringDeclarations_allSameModule(){
  assumeCrossModuleNames=false;
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
  testSame("String_Node_Str");
}
Program: 27129
Project: 27129
Buggy source:
/** 
 * Whether this type is meaningfully different from   {@code that} type forthe purposes of data flow analysis. This is a trickier check than pure equality, because it has to properly handle unknown types. See  {@code EquivalenceMethod} for more info.
 * @see <a href="http://www.youtube.com/watch?v=_RpSv3HjpEw">Unknown unknowns</a>
 */
public final boolean differsFrom(JSType that){
  return !checkEquivalenceHelper(that,EquivalenceMethod.DATA_FLOW);
}

Fixed version (ground truth):
/** 
 * Whether this type is meaningfully different from   {@code that} type forthe purposes of data flow analysis. This is a trickier check than pure equality, because it has to properly handle unknown types. See  {@code EquivalenceMethod} for more info.
 * @see <a href="http://www.youtube.com/watch?v=_RpSv3HjpEw">Unknown unknowns</a>
 */
public final boolean differsFrom(JSType that){
  return !checkEquivalenceHelper(that,EquivalenceMethod.DATA_FLOW,EqCache.create());
}
Program: 27130
Project: 27130
Buggy source:
/** 
 * Detects cycles in either the implicit prototype chain, or the implemented/extended interfaces.<p>
 * @return True iff a cycle was detected.
 */
final boolean detectInheritanceCycle(){
  return detectImplicitPrototypeCycle() || Iterables.contains(this.getCtorImplementedInterfaces(),this) || Iterables.contains(this.getCtorExtendedInterfaces(),this);
}

Fixed version (ground truth):
/** 
 * Detects cycles in either the implicit prototype chain, or the implemented/extended interfaces.<p>
 * @return True iff a cycle was detected.
 */
final boolean detectInheritanceCycle(){
  if (detectImplicitPrototypeCycle() || Iterables.contains(this.getCtorImplementedInterfaces(),this)) {
    return true;
  }
  FunctionType fnType=this.getConstructor();
  return fnType != null && fnType.checkExtendsLoop() != null;
}
Program: 27131
Project: 27131
Buggy source:
public static void assertTypeEquals(String message,JSType a,JSType b){
  checkNotNull(a);
  checkNotNull(b);
  Assert.assertTrue(message + (message.isEmpty() ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ a+ "String_Node_Str"+ "String_Node_Str"+ b,a.isEquivalentTo(b));
  Assert.assertTrue(message + "String_Node_Str" + "String_Node_Str"+ b+ "String_Node_Str"+ "String_Node_Str"+ a,b.isEquivalentTo(a));
}

Fixed version (ground truth):
public static void assertTypeEquals(String message,JSType a,JSType b){
  checkNotNull(a);
  checkNotNull(b);
  Assert.assertTrue(message + (message.isEmpty() ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ a+ "String_Node_Str"+ "String_Node_Str"+ b,a.isEquivalentTo(b,true));
  Assert.assertTrue(message + "String_Node_Str" + "String_Node_Str"+ b+ "String_Node_Str"+ "String_Node_Str"+ a,b.isEquivalentTo(a,true));
}
Program: 27133
Project: 27133
Buggy source:
public AbstractScope<?,?> getClosestHoistScope(){
  for (int i=scopeRoots.size(); i > 0; i--) {
    if (isHoistScopeRootNode(scopeRoots.get(i - 1))) {
      return instantiateScopes(i);
    }
  }
  return (AbstractScope<?,?>)scopes.peek().getClosestHoistScope();
}

Fixed version (ground truth):
public AbstractScope<?,?> getClosestHoistScope(){
  for (int i=scopeRoots.size(); i > 0; i--) {
    if (isHoistScopeRootNode(scopeRoots.get(i - 1))) {
      return instantiateScopes(i);
    }
  }
  return scopes.peek().getClosestHoistScope();
}
Program: 27134
Project: 27134
Buggy source:
/** 
 * Keep applying fixes to the given file until no more fixes can be found, or until fixes have been applied   {@code MAX_FIXES} times.
 */
static void fixRepeatedly(String filename) throws IOException {
  for (int i=0; i < MAX_FIXES; i++) {
    if (!fix(filename)) {
      break;
    }
  }
}

Fixed version (ground truth):
/** 
 * Keep applying fixes to the given file until no more fixes can be found, or until fixes have been applied   {@code MAX_FIXES} times.
 */
static void fixRepeatedly(String filename,ImmutableSet<DiagnosticType> unfixableErrors) throws IOException {
  for (int i=0; i < MAX_FIXES; i++) {
    if (!fix(filename,unfixableErrors)) {
      break;
    }
  }
}
Program: 27135
Project: 27135
Buggy source:
/** 
 * @return Whether any fixes were applied. 
 */
private static boolean fix(String filename) throws IOException {
  Compiler compiler=new Compiler(System.out);
  FixingErrorManager errorManager=new FixingErrorManager();
  compiler.setErrorManager(errorManager);
  errorManager.setCompiler(compiler);
  lint(Paths.get(filename),compiler);
  Collection<SuggestedFix> fixes=errorManager.getAllFixes();
  if (!fixes.isEmpty()) {
    ApplySuggestedFixes.applySuggestedFixesToFiles(fixes);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @return Whether any fixes were applied. 
 */
private static boolean fix(String filename,ImmutableSet<DiagnosticType> unfixableErrors) throws IOException {
  Compiler compiler=new Compiler(System.out);
  FixingErrorManager errorManager=new FixingErrorManager(unfixableErrors);
  compiler.setErrorManager(errorManager);
  errorManager.setCompiler(compiler);
  lint(Paths.get(filename),compiler);
  Collection<SuggestedFix> fixes=errorManager.getAllFixes();
  if (!fixes.isEmpty()) {
    ApplySuggestedFixes.applySuggestedFixesToFiles(fixes);
    return true;
  }
  return false;
}
Program: 27136
Project: 27136
Buggy source:
public FixingErrorManager(){
}

Fixed version (ground truth):
public FixingErrorManager(ImmutableSet<DiagnosticType> unfixableErrors){
  this.unfixableErrors=unfixableErrors;
}
Program: 27137
Project: 27137
Buggy source:
@Override public void report(CheckLevel level,JSError error){
  super.report(level,error);
  fixes.putAll(error,ErrorToFixMapper.getFixesForJsError(error,compiler));
}

Fixed version (ground truth):
@Override public void report(CheckLevel level,JSError error){
  super.report(level,error);
  if (!unfixableErrors.contains(error.getType())) {
    fixes.putAll(error,ErrorToFixMapper.getFixesForJsError(error,compiler));
  }
}
Program: 27139
Project: 27139
Buggy source:
static boolean isPrototypeAssignment(Node getProp){
  if (!getProp.isGetProp()) {
    return false;
  }
  Node parent=getProp.getParent();
  return parent.isAssign() && parent.getFirstChild() == getProp && parent.getFirstChild().getLastChild().getString().equals("String_Node_Str");
}

Fixed version (ground truth):
static boolean isPrototypeAssignment(Node getProp){
  if (!getProp.isGetProp()) {
    return false;
  }
  Node parent=getProp.getParent();
  return parent.isAssign() && parent.getFirstChild() == getProp && getProp.getLastChild().getString().equals("String_Node_Str");
}
Program: 27141
Project: 27141
Buggy source:
public void testConstructorType9(){
  testTypes("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testConstructorType9(){
  testTypes("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str");
}
Program: 27142
Project: 27142
Buggy source:
public void testDirectPrototypeAssign(){
  testTypes("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
public void testDirectPrototypeAssign(){
  testTypes(lines("String_Node_Str","String_Node_Str","String_Node_Str"),"String_Node_Str" + "String_Node_Str");
}
Program: 27143
Project: 27143
Buggy source:
/** 
 * @return The statement containing the expression or null if the subExpressionis not contain in a Node where inlining is known to be possible. For example, a WHILE node condition expression.
 */
@Nullable static Node findExpressionRoot(Node subExpression){
  Node child=subExpression;
  for (  Node parent : child.getAncestors()) {
    Token parentType=parent.getToken();
switch (parentType) {
case EXPR_RESULT:
case IF:
case SWITCH:
case RETURN:
case THROW:
      Preconditions.checkState(child == parent.getFirstChild());
    return parent;
case VAR:
case CONST:
case LET:
  Preconditions.checkState(child == parent.getFirstChild());
if (parent.getParent().isVanillaFor() && parent == parent.getParent().getFirstChild()) {
  return null;
}
 else {
  return parent;
}
case FOR:
if (child == parent.getFirstChild()) {
return parent;
}
case FOR_IN:
case FOR_OF:
case SCRIPT:
case BLOCK:
case LABEL:
case CASE:
case DEFAULT_CASE:
return null;
default :
break;
}
child=parent;
}
throw new IllegalStateException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @return The statement containing the expression or null if the subExpressionis not contain in a Node where inlining is known to be possible. For example, a WHILE node condition expression.
 */
@Nullable static Node findExpressionRoot(Node subExpression){
  Node child=subExpression;
  for (  Node parent : child.getAncestors()) {
    Token parentType=parent.getToken();
switch (parentType) {
case EXPR_RESULT:
case IF:
case SWITCH:
case RETURN:
case THROW:
      Preconditions.checkState(child == parent.getFirstChild());
    return parent;
case VAR:
case CONST:
case LET:
  Preconditions.checkState(child == parent.getFirstChild());
if (parent.getParent().isVanillaFor() && parent == parent.getParent().getFirstChild()) {
  return parent.getParent();
}
 else {
  return parent;
}
case FOR:
if (child == parent.getFirstChild()) {
return parent;
}
case FOR_IN:
case FOR_OF:
case SCRIPT:
case BLOCK:
case LABEL:
case CASE:
case DEFAULT_CASE:
return null;
default :
break;
}
child=parent;
}
throw new IllegalStateException("String_Node_Str");
}
Program: 27145
Project: 27145
Buggy source:
public void testFindExpressionRoot5(){
  assertThat(findExpressionRoot("String_Node_Str","String_Node_Str")).isNull();
}

Fixed version (ground truth):
public void testFindExpressionRoot5(){
  assertNode(findExpressionRoot("String_Node_Str","String_Node_Str")).hasType(Token.FOR);
}
Program: 27146
Project: 27146
Buggy source:
/** 
 * @return The result of calling {@link ExpressionDecomposer#findExpressionRoot} on the CALLnode in  {@code js} whose callee is a NAME matching {@code name}.
 */
@Nullable private Node findExpressionRoot(String js,String name){
  Compiler compiler=getCompiler();
  Node tree=parse(compiler,js);
  Node call=findCall(tree,name);
  checkNotNull(call);
  return ExpressionDecomposer.findExpressionRoot(call);
}

Fixed version (ground truth):
/** 
 * @return The result of calling {@link ExpressionDecomposer#findExpressionRoot} on the CALLnode in  {@code js} whose callee is a NAME matching {@code name}.
 */
@Nullable private Node findExpressionRoot(String js,String name){
  Compiler compiler=getCompiler();
  Node tree=parse(compiler,js);
  Node call=findCall(tree,name);
  checkNotNull(call);
  Node root=ExpressionDecomposer.findExpressionRoot(call);
  if (root != null) {
    checkState(NodeUtil.isStatement(root),root);
  }
  return root;
}
Program: 27147
Project: 27147
Buggy source:
public void testShadowVariables19(){
  test(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
public void testShadowVariables19(){
  test(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
}
Program: 27149
Project: 27149
Buggy source:
public void testDestructuringEvaluationOrder(){
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void testDestructuringEvaluationOrder(){
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
}
Program: 27150
Project: 27150
Buggy source:
public void testDestructuringDefaultValue(){
  inline("String_Node_Str","String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void testDestructuringDefaultValue(){
  inline("String_Node_Str","String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
}
Program: 27151
Project: 27151
Buggy source:
public void testGithubIssue2818(){
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void testGithubIssue2818(){
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
}
Program: 27152
Project: 27152
Buggy source:
public void testDestructuringComputedProperty(){
  inline("String_Node_Str","String_Node_Str");
  noInline("String_Node_Str");
}

Fixed version (ground truth):
public void testDestructuringComputedProperty(){
  inline("String_Node_Str","String_Node_Str");
  noInline("String_Node_Str");
  noInline("String_Node_Str");
  inline("String_Node_Str","String_Node_Str");
}
Program: 27155
Project: 27155
Buggy source:
private ParseTree parseMultiplicativeExpression(){
  SourcePosition start=getTreeStartLocation();
  ParseTree left=parseExponentiationExpression();
  while (peekMultiplicativeOperator()) {
    Token operator=nextToken();
    ParseTree right=parseUnaryExpression();
    left=new BinaryOperatorTree(getTreeLocation(start),left,operator,right);
  }
  return left;
}

Fixed version (ground truth):
private ParseTree parseMultiplicativeExpression(){
  SourcePosition start=getTreeStartLocation();
  ParseTree left=parseExponentiationExpression();
  while (peekMultiplicativeOperator()) {
    Token operator=nextToken();
    ParseTree right=parseExponentiationExpression();
    left=new BinaryOperatorTree(getTreeLocation(start),left,operator,right);
  }
  return left;
}
Program: 27156
Project: 27156
Buggy source:
public void testExponentiationOperator(){
  languageMode=LanguageMode.ECMASCRIPT_2016;
  assertPrintSame("String_Node_Str");
  assertPrint("String_Node_Str","String_Node_Str");
  assertPrintSame("String_Node_Str");
  assertPrintSame("String_Node_Str");
  assertPrintSame("String_Node_Str");
  assertPrint("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void testExponentiationOperator(){
  languageMode=LanguageMode.ECMASCRIPT_2016;
  assertPrintSame("String_Node_Str");
  assertPrint("String_Node_Str","String_Node_Str");
  assertPrintSame("String_Node_Str");
  assertPrintSame("String_Node_Str");
  assertPrintSame("String_Node_Str");
  assertPrint("String_Node_Str","String_Node_Str");
  assertPrint("String_Node_Str","String_Node_Str");
  assertPrintSame("String_Node_Str");
}
Program: 27157
Project: 27157
Buggy source:
public void testExponentOperator(){
  mode=LanguageMode.ECMASCRIPT7;
  strictMode=STRICT;
  parseError("String_Node_Str","String_Node_Str");
  expectFeatures(Feature.EXPONENT_OP);
  parse("String_Node_Str");
  parse("String_Node_Str");
  parse("String_Node_Str");
  parse("String_Node_Str");
  mode=LanguageMode.ECMASCRIPT6;
  strictMode=SLOPPY;
  parseWarning("String_Node_Str",requiresLanguageModeMessage(LanguageMode.ECMASCRIPT7,Feature.EXPONENT_OP));
}

Fixed version (ground truth):
public void testExponentOperator(){
  mode=LanguageMode.ECMASCRIPT7;
  strictMode=STRICT;
  parseError("String_Node_Str","String_Node_Str");
  expectFeatures(Feature.EXPONENT_OP);
  parse("String_Node_Str");
  parse("String_Node_Str");
  parse("String_Node_Str");
  parse("String_Node_Str");
  parse("String_Node_Str");
  mode=LanguageMode.ECMASCRIPT6;
  strictMode=SLOPPY;
  parseWarning("String_Node_Str",requiresLanguageModeMessage(LanguageMode.ECMASCRIPT7,Feature.EXPONENT_OP));
}
Program: 27158
Project: 27158
Buggy source:
/** 
 * Resolve any stub declarations to unknown types if we could not find types for them during traversal.
 */
void resolveStubDeclarations(){
  for (  StubDeclaration stub : stubDeclarations) {
    Node n=stub.node;
    Node parent=n.getParent();
    String qName=n.getQualifiedName();
    String propName=n.getLastChild().getString();
    String ownerName=stub.ownerName;
    boolean isExtern=stub.isExtern;
    if (scope.isDeclared(qName,false)) {
      continue;
    }
    ObjectType ownerType=getObjectSlot(ownerName);
    defineSlot(n,parent,unknownType,true);
    if (ownerType != null && (isExtern || ownerType.isFunctionPrototypeType())) {
      ownerType.defineInferredProperty(propName,unknownType,n);
    }
 else {
      typeRegistry.registerPropertyOnType(propName,ownerType == null ? unknownType : ownerType);
    }
  }
}

Fixed version (ground truth):
/** 
 * Resolve any stub declarations to unknown types if we could not find types for them during traversal.
 */
void resolveStubDeclarations(){
  for (  StubDeclaration stub : stubDeclarations) {
    Node n=stub.node;
    Node parent=n.getParent();
    String qName=n.getQualifiedName();
    String propName=n.getLastChild().getString();
    String ownerName=stub.ownerName;
    boolean isExtern=stub.isExtern;
    if (scope.isDeclared(qName,false)) {
      continue;
    }
    ObjectType ownerType=getObjectSlot(ownerName);
    JSType inheritedType=getInheritedInterfacePropertyType(ownerType,propName);
    JSType stubType=inheritedType == null ? unknownType : inheritedType;
    defineSlot(n,parent,stubType,true);
    if (ownerType != null && (isExtern || ownerType.isFunctionPrototypeType())) {
      ownerType.defineInferredProperty(propName,stubType,n);
    }
 else {
      typeRegistry.registerPropertyOnType(propName,ownerType == null ? stubType : ownerType);
    }
  }
}
Program: 27159
Project: 27159
Buggy source:
private ObjectType getThisTypeForCollectingProperties(){
  Node rootNode=scope.getRootNode();
  if (rootNode.isFromExterns())   return null;
  JSType type=rootNode.getJSType();
  if (type == null || !type.isFunctionType())   return null;
  FunctionType fnType=type.toMaybeFunctionType();
  JSType fnThisType=fnType.getTypeOfThis();
  return fnThisType.isUnknownType() ? null : fnThisType.toObjectType();
}

Fixed version (ground truth):
private ObjectType getThisTypeForCollectingProperties(){
  Node rootNode=scope.getRootNode();
  if (rootNode.isFromExterns()) {
    return null;
  }
  JSType type=rootNode.getJSType();
  if (type == null || !type.isFunctionType()) {
    return null;
  }
  FunctionType fnType=type.toMaybeFunctionType();
  JSType fnThisType=fnType.getTypeOfThis();
  return fnThisType.isUnknownType() ? null : fnThisType.toObjectType();
}
Program: 27161
Project: 27161
Buggy source:
public void testSetters(){
  typeCheck("String_Node_Str",GlobalTypeInfoCollector.SETTER_WITH_RETURN);
  typeCheck("String_Node_Str",GlobalTypeInfoCollector.SETTER_WITH_RETURN);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),JSTypeCreatorFromJSDoc.TEMPLATED_GETTER_SETTER);
  typeCheck("String_Node_Str",NewTypeInference.RETURN_NONDECLARED_TYPE);
  typeCheck("String_Node_Str",JSTypeCreatorFromJSDoc.FUNCTION_WITH_NONFUNC_JSDOC);
  typeCheck("String_Node_Str",NewTypeInference.ILLEGAL_OBJLIT_KEY);
  typeCheck("String_Node_Str",NewTypeInference.ILLEGAL_OBJLIT_KEY);
  typeCheck("String_Node_Str",NewTypeInference.INVALID_OPERAND_TYPE);
  typeCheck("String_Node_Str",NewTypeInference.INEXISTENT_PROPERTY);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str"),NewTypeInference.MISTYPED_ASSIGN_RHS);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str"),NewTypeInference.MISTYPED_ASSIGN_RHS);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str"),NewTypeInference.MISTYPED_ASSIGN_RHS);
}

Fixed version (ground truth):
public void testSetters(){
  typeCheck("String_Node_Str",GlobalTypeInfoCollector.SETTER_WITH_RETURN);
  typeCheck("String_Node_Str",GlobalTypeInfoCollector.SETTER_WITH_RETURN);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),JSTypeCreatorFromJSDoc.TEMPLATED_GETTER_SETTER);
  typeCheck("String_Node_Str",NewTypeInference.RETURN_NONDECLARED_TYPE);
  typeCheck("String_Node_Str",JSTypeCreatorFromJSDoc.FUNCTION_WITH_NONFUNC_JSDOC);
  typeCheck("String_Node_Str",NewTypeInference.ILLEGAL_OBJLIT_KEY);
  typeCheck("String_Node_Str",NewTypeInference.ILLEGAL_OBJLIT_KEY);
  typeCheck("String_Node_Str",NewTypeInference.INVALID_OPERAND_TYPE);
  typeCheck("String_Node_Str",NewTypeInference.INEXISTENT_PROPERTY);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str"),NewTypeInference.MISTYPED_ASSIGN_RHS);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str"),NewTypeInference.MISTYPED_ASSIGN_RHS);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str"),NewTypeInference.MISTYPED_ASSIGN_RHS);
  typeCheck(LINE_JOINER.join("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),JSTypeCreatorFromJSDoc.FUNCTION_WITH_NONFUNC_JSDOC);
}
Program: 27163
Project: 27163
Buggy source:
public void testReferenceInDestructuringPatternComputedProperty(){
  inFunction(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
public void testReferenceInDestructuringPatternComputedProperty(){
  inFunction("String_Node_Str");
  inFunction(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
}
Program: 27164
Project: 27164
Buggy source:
public void testDestructuring(){
  inFunction("String_Node_Str");
  inFunction("String_Node_Str");
}

Fixed version (ground truth):
public void testDestructuring(){
  inFunction("String_Node_Str");
  inFunction("String_Node_Str");
  inFunction("String_Node_Str","String_Node_Str");
  inFunction("String_Node_Str");
}
Program: 27165
Project: 27165
Buggy source:
public void testReferenceInDestructuringPatternDefaultValue(){
  inFunction(lines("String_Node_Str","String_Node_Str","String_Node_Str"));
  inFunction(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  inFunction(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
public void testReferenceInDestructuringPatternDefaultValue(){
  inFunction(lines("String_Node_Str","String_Node_Str","String_Node_Str"));
  inFunction(lines("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  inFunction("String_Node_Str");
  inFunction("String_Node_Str");
}