nus-yam/ex-repair huggingface dataset:
Program: 53318
Project: 53318
Buggy source:
@Test public void testParseBuildFilesForTargetsWithOverlappingTargets() throws IOException, NoSuchBuildTargetException {
  File projectDirectoryRoot=tempDir.getRoot();
  tempDir.newFolder("String_Node_Str","String_Node_Str","String_Node_Str");
  File buildFile=tempDir.newFile("String_Node_Str" + BuckConstant.BUILD_RULES_FILE_NAME);
  Files.write("String_Node_Str" + "String_Node_Str",buildFile,Charsets.UTF_8);
  Ansi ansi=new Ansi();
  ProjectFilesystem filesystem=new ProjectFilesystem(projectDirectoryRoot);
  Parser parser=new Parser(filesystem,new BuildFileTree(ImmutableSet.<BuildTarget>of()),ansi);
  BuildTarget fooTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str",buildFile);
  BuildTarget barTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str",buildFile);
  Iterable<BuildTarget> buildTargets=ImmutableList.of(fooTarget,barTarget);
  Iterable<String> defaultIncludes=ImmutableList.of();
  DependencyGraph graph=parser.parseBuildFilesForTargets(buildTargets,defaultIncludes);
  BuildRule fooRule=graph.findBuildRuleByTarget(fooTarget);
  assertNotNull(fooRule);
  BuildRule barRule=graph.findBuildRuleByTarget(barTarget);
  assertNotNull(barRule);
}

Fixed version (ground truth):
@Test public void testParseBuildFilesForTargetsWithOverlappingTargets() throws IOException, NoSuchBuildTargetException {
  BuildTarget fooTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str",testBuildFile);
  BuildTarget barTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str",testBuildFile);
  Iterable<BuildTarget> buildTargets=ImmutableList.of(fooTarget,barTarget);
  Iterable<String> defaultIncludes=ImmutableList.of();
  DependencyGraph graph=testParser.parseBuildFilesForTargets(buildTargets,defaultIncludes);
  BuildRule fooRule=graph.findBuildRuleByTarget(fooTarget);
  assertNotNull(fooRule);
  BuildRule barRule=graph.findBuildRuleByTarget(barTarget);
  assertNotNull(barRule);
}
Program: 53319
Project: 53319
Buggy source:
@Override protected List<String> getInputsToCompareToOutput(BuildContext context){
  ImmutableList.Builder<String> inputsToConsiderForCachingPurposes=ImmutableList.builder();
  addInputsToList(res,inputsToConsiderForCachingPurposes,directoryTraverser);
  addInputsToList(assets,inputsToConsiderForCachingPurposes,directoryTraverser);
  if (manifestFile != null) {
    inputsToConsiderForCachingPurposes.add(manifestFile);
  }
  return inputsToConsiderForCachingPurposes.build();
}

Fixed version (ground truth):
@Override protected Iterable<String> getInputsToCompareToOutput(BuildContext context){
  ImmutableSortedSet.Builder<String> inputsToConsiderForCachingPurposes=ImmutableSortedSet.naturalOrder();
  addResContents(inputsToConsiderForCachingPurposes);
  addAssetsContents(inputsToConsiderForCachingPurposes);
  if (manifestFile != null) {
    inputsToConsiderForCachingPurposes.add(manifestFile);
  }
  return inputsToConsiderForCachingPurposes.build();
}
Program: 53320
Project: 53320
Buggy source:
@Override protected RuleKey.Builder ruleKeyBuilder(){
  return super.ruleKeyBuilder().set("String_Node_Str",res).set("String_Node_Str",assets);
}

Fixed version (ground truth):
@Override protected RuleKey.Builder ruleKeyBuilder(){
  ImmutableSortedSet.Builder<String> resFiles=ImmutableSortedSet.naturalOrder();
  addResContents(resFiles);
  ImmutableSortedSet.Builder<String> assetsFiles=ImmutableSortedSet.naturalOrder();
  addAssetsContents(assetsFiles);
  return super.ruleKeyBuilder().set("String_Node_Str",resFiles.build()).set("String_Node_Str",assetsFiles.build());
}
Program: 53321
Project: 53321
Buggy source:
@Override protected RuleKey.Builder ruleKeyBuilder(){
  return super.ruleKeyBuilder().set("String_Node_Str",srcs).set("String_Node_Str",resources).set("String_Node_Str",getClasspathEntries()).set("String_Node_Str",inputsToConsiderForCachingPurposes).set("String_Node_Str",isAndroidRule()).set("String_Node_Str",sourceLevel).set("String_Node_Str",targetLevel);
}

Fixed version (ground truth):
@Override protected RuleKey.Builder ruleKeyBuilder(){
  return super.ruleKeyBuilder().set("String_Node_Str",srcs).set("String_Node_Str",resources).set("String_Node_Str",getClasspathEntries()).set("String_Node_Str",isAndroidRule()).set("String_Node_Str",sourceLevel).set("String_Node_Str",targetLevel);
}
Program: 53322
Project: 53322
Buggy source:
@Override protected Iterable<String> getInputsToCompareToOutput(BuildContext context){
  ImmutableSortedSet.Builder<String> builder=ImmutableSortedSet.naturalOrder();
  if (manifestFile != null) {
    builder.add(manifestFile);
  }
  if (metaInfDirectory != null) {
    metaInfDirectoryRecurse(builder,new File(metaInfDirectory));
  }
  return builder.build();
}

Fixed version (ground truth):
@Override protected Iterable<String> getInputsToCompareToOutput(BuildContext context){
  ImmutableSortedSet.Builder<String> builder=ImmutableSortedSet.naturalOrder();
  if (manifestFile != null) {
    builder.add(manifestFile);
  }
  addMetaInfContents(builder);
  return builder.build();
}
Program: 53323
Project: 53323
Buggy source:
@Override public JavaBinaryRule build(Map<String,BuildRule> buildRuleIndex){
  return new JavaBinaryRule(createBuildRuleParams(buildRuleIndex),mainClass,manifestFile,metaInfDirectory);
}

Fixed version (ground truth):
@Override public JavaBinaryRule build(Map<String,BuildRule> buildRuleIndex){
  return new JavaBinaryRule(createBuildRuleParams(buildRuleIndex),mainClass,manifestFile,metaInfDirectory,new DefaultDirectoryTraverser());
}
Program: 53324
Project: 53324
Buggy source:
@Override protected RuleKey.Builder ruleKeyBuilder(){
  return super.ruleKeyBuilder().set("String_Node_Str",mainClass).set("String_Node_Str",manifestFile).set("String_Node_Str",metaInfDirectory);
}

Fixed version (ground truth):
@Override protected RuleKey.Builder ruleKeyBuilder(){
  ImmutableSortedSet.Builder<String> metaInfFiles=ImmutableSortedSet.naturalOrder();
  addMetaInfContents(metaInfFiles);
  return super.ruleKeyBuilder().set("String_Node_Str",mainClass).set("String_Node_Str",manifestFile).set("String_Node_Str",metaInfFiles.build());
}
Program: 53325
Project: 53325
Buggy source:
JavaBinaryRule(BuildRuleParams buildRuleParams,@Nullable String mainClass,@Nullable String manifestFile,@Nullable String metaInfDirectory){
  super(buildRuleParams);
  this.mainClass=mainClass;
  this.manifestFile=manifestFile;
  this.metaInfDirectory=metaInfDirectory;
  classpathEntriesSupplier=Suppliers.memoize(new Supplier<ImmutableSet<String>>(){
    @Override public ImmutableSet<String> get(){
      return ImmutableSet.copyOf(getClasspathEntriesMap().values());
    }
  }
);
}

Fixed version (ground truth):
JavaBinaryRule(BuildRuleParams buildRuleParams,@Nullable String mainClass,@Nullable String manifestFile,@Nullable String metaInfDirectory,DirectoryTraverser directoryTraverser){
  super(buildRuleParams);
  this.mainClass=mainClass;
  this.manifestFile=manifestFile;
  this.metaInfDirectory=metaInfDirectory;
  this.classpathEntriesSupplier=Suppliers.memoize(new Supplier<ImmutableSet<String>>(){
    @Override public ImmutableSet<String> get(){
      return ImmutableSet.copyOf(getClasspathEntriesMap().values());
    }
  }
);
  this.directoryTraverser=Preconditions.checkNotNull(directoryTraverser);
}
Program: 53326
Project: 53326
Buggy source:
@Override protected List<String> getInputsToCompareToOutput(BuildContext context){
  ImmutableList.Builder<String> inputsToConsiderForCachingPurposes=ImmutableList.builder();
  addInputsToList(nativeLibs,inputsToConsiderForCachingPurposes,directoryTraverser);
  return inputsToConsiderForCachingPurposes.build();
}

Fixed version (ground truth):
@Override protected Iterable<String> getInputsToCompareToOutput(BuildContext context){
  ImmutableSortedSet.Builder<String> inputsToConsiderForCachingPurposes=ImmutableSortedSet.naturalOrder();
  addInputsToSortedSet(nativeLibs,inputsToConsiderForCachingPurposes,directoryTraverser);
  return inputsToConsiderForCachingPurposes.build();
}
Program: 53327
Project: 53327
Buggy source:
public Builder set(String key,@Nullable ImmutableSet<String> val){
  setKey(key);
  if (val != null) {
    ImmutableSortedSet<String> sortedVal=ImmutableSortedSet.copyOf(val);
    for (    String s : sortedVal) {
      setVal(s);
    }
  }
  return separate();
}

Fixed version (ground truth):
public Builder set(String key,@Nullable ImmutableSet<String> val){
  setKey(key);
  if (val != null) {
    ImmutableSortedSet<String> sortedValues=ImmutableSortedSet.copyOf(val);
    for (    String value : sortedValues) {
      setVal(value);
    }
  }
  return separate();
}
Program: 53328
Project: 53328
Buggy source:
/** 
 * The idempotence of the RuleKey to be built is false if this method is ever called with a false argument.
 */
public Builder mergeIdempotence(boolean i){
  if (!i) {
    idempotent=false;
  }
  return this;
}

Fixed version (ground truth):
/** 
 * The idempotence of the RuleKey to be built is false if this method is ever called with a false argument.
 */
public Builder mergeIdempotence(boolean idempotence){
  if (!idempotence) {
    idempotent=false;
  }
  return this;
}
Program: 53329
Project: 53329
Buggy source:
@Test public void testGetInputsToCompareToOutput(){
  DirectoryTraverser traverser=new DirectoryTraverser(){
    @Override public void traverse(    DirectoryTraversal traversal){
      String rootPath=traversal.getRoot().getPath();
      if ("String_Node_Str".equals(rootPath)) {
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
      }
 else       if ("String_Node_Str".equals(rootPath)) {
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
      }
 else {
        throw new RuntimeException("String_Node_Str" + rootPath);
      }
    }
  }
;
  BuildTarget buildTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str");
  BuildRuleParams buildRuleParams=new BuildRuleParams(buildTarget,ImmutableSortedSet.<BuildRule>of(),ImmutableSet.of(BuildTargetPattern.MATCH_ALL));
  AndroidResourceRule androidResourceRule=new AndroidResourceRule(buildRuleParams,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",traverser);
  BuildContext context=null;
  MoreAsserts.assertListEquals("String_Node_Str" + "String_Node_Str" + "String_Node_Str",ImmutableList.of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),androidResourceRule.getInputsToCompareToOutput(context));
}

Fixed version (ground truth):
@Test public void testGetInputsToCompareToOutput(){
  DirectoryTraverser traverser=new DirectoryTraverser(){
    @Override public void traverse(    DirectoryTraversal traversal){
      String rootPath=traversal.getRoot().getPath();
      if ("String_Node_Str".equals(rootPath)) {
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
      }
 else       if ("String_Node_Str".equals(rootPath)) {
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
      }
 else {
        throw new RuntimeException("String_Node_Str" + rootPath);
      }
    }
  }
;
  BuildTarget buildTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str");
  BuildRuleParams buildRuleParams=new BuildRuleParams(buildTarget,ImmutableSortedSet.<BuildRule>of(),ImmutableSet.of(BuildTargetPattern.MATCH_ALL));
  AndroidResourceRule androidResourceRule=new AndroidResourceRule(buildRuleParams,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",traverser);
  BuildContext context=null;
  MoreAsserts.assertIterablesEquals("String_Node_Str" + "String_Node_Str",ImmutableList.of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),androidResourceRule.getInputsToCompareToOutput(context));
}
Program: 53330
Project: 53330
Buggy source:
private JavaBinaryRule createSampleJavaBinaryRule(Map<String,BuildRule> buildRuleIndex){
  JavaLibraryRule javaLibrary=new DefaultJavaLibraryRule(new BuildRuleParams(BuildTargetFactory.newInstance("String_Node_Str"),ImmutableSortedSet.<BuildRule>of(),ImmutableSet.of(BuildTargetPattern.MATCH_ALL)),ImmutableSet.<String>of("String_Node_Str"),ImmutableSet.<String>of(),null,AnnotationProcessingParams.EMPTY);
  buildRuleIndex.put(javaLibrary.getFullyQualifiedName(),javaLibrary);
  JavaBinaryRule javaBinary=new JavaBinaryRule(new BuildRuleParams(BuildTargetFactory.newInstance("String_Node_Str"),ImmutableSortedSet.<BuildRule>of(javaLibrary),ImmutableSet.<BuildTargetPattern>of()),"String_Node_Str",null,null);
  buildRuleIndex.put(javaBinary.getFullyQualifiedName(),javaBinary);
  return javaBinary;
}

Fixed version (ground truth):
private JavaBinaryRule createSampleJavaBinaryRule(Map<String,BuildRule> buildRuleIndex){
  JavaLibraryRule javaLibrary=new DefaultJavaLibraryRule(new BuildRuleParams(BuildTargetFactory.newInstance("String_Node_Str"),ImmutableSortedSet.<BuildRule>of(),ImmutableSet.of(BuildTargetPattern.MATCH_ALL)),ImmutableSet.<String>of("String_Node_Str"),ImmutableSet.<String>of(),null,AnnotationProcessingParams.EMPTY);
  buildRuleIndex.put(javaLibrary.getFullyQualifiedName(),javaLibrary);
  JavaBinaryRule javaBinary=new JavaBinaryRule(new BuildRuleParams(BuildTargetFactory.newInstance("String_Node_Str"),ImmutableSortedSet.<BuildRule>of(javaLibrary),ImmutableSet.<BuildTargetPattern>of()),"String_Node_Str",null,null,new DefaultDirectoryTraverser());
  buildRuleIndex.put(javaBinary.getFullyQualifiedName(),javaBinary);
  return javaBinary;
}
Program: 53331
Project: 53331
Buggy source:
@Test public void testGetInputsToCompareToOutput(){
  DirectoryTraverser traverser=new DirectoryTraverser(){
    @Override public void traverse(    DirectoryTraversal traversal){
      String rootPath=traversal.getRoot().getPath();
      if ("String_Node_Str".equals(rootPath)) {
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
      }
 else {
        throw new RuntimeException("String_Node_Str" + rootPath);
      }
    }
  }
;
  BuildTarget buildTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str");
  BuildRuleParams buildRuleParams=new BuildRuleParams(buildTarget,ImmutableSortedSet.<BuildRule>of(),ImmutableSet.of(BuildTargetPattern.MATCH_ALL));
  PrebuiltNativeLibraryBuildRule nativeLibraryRule=new PrebuiltNativeLibraryBuildRule(buildRuleParams,"String_Node_Str",traverser);
  BuildContext context=null;
  MoreAsserts.assertListEquals("String_Node_Str" + "String_Node_Str" + "String_Node_Str",ImmutableList.of("String_Node_Str","String_Node_Str","String_Node_Str"),nativeLibraryRule.getInputsToCompareToOutput(context));
}

Fixed version (ground truth):
@Test public void testGetInputsToCompareToOutput(){
  DirectoryTraverser traverser=new DirectoryTraverser(){
    @Override public void traverse(    DirectoryTraversal traversal){
      String rootPath=traversal.getRoot().getPath();
      if ("String_Node_Str".equals(rootPath)) {
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
        traversal.visit(null,"String_Node_Str");
      }
 else {
        throw new RuntimeException("String_Node_Str" + rootPath);
      }
    }
  }
;
  BuildTarget buildTarget=BuildTargetFactory.newInstance("String_Node_Str","String_Node_Str");
  BuildRuleParams buildRuleParams=new BuildRuleParams(buildTarget,ImmutableSortedSet.<BuildRule>of(),ImmutableSet.of(BuildTargetPattern.MATCH_ALL));
  PrebuiltNativeLibraryBuildRule nativeLibraryRule=new PrebuiltNativeLibraryBuildRule(buildRuleParams,"String_Node_Str",traverser);
  BuildContext context=null;
  MoreAsserts.assertIterablesEquals("String_Node_Str" + "String_Node_Str" + "String_Node_Str",ImmutableList.of("String_Node_Str","String_Node_Str","String_Node_Str"),nativeLibraryRule.getInputsToCompareToOutput(context));
}
Program: 53332
Project: 53332
Buggy source:
public void testPut_ComparableKey(){
  final boolean java6CompatibleSources=!TestUtils.isJvm() || TestUtils.getJdkVersion() < 7;
  TreeMap<String,Object> map=new TreeMap<String,Object>();
  ConflictingKey conflictingKey=new ConflictingKey("String_Node_Str");
  try {
    TreeMap untypedMap=map;
    untypedMap.put(conflictingKey,"String_Node_Str");
    assertTrue("String_Node_Str",java6CompatibleSources);
  }
 catch (  ClassCastException e) {
    assertFalse(java6CompatibleSources);
  }
  try {
    map.put("String_Node_Str","String_Node_Str");
    assertFalse("String_Node_Str",java6CompatibleSources);
  }
 catch (  ClassCastException expected) {
    assertTrue(java6CompatibleSources);
  }
}

Fixed version (ground truth):
public void testPut_ComparableKey(){
  final boolean java6CompatibleSources=!TestUtils.isJvm() || TestUtils.getJdkVersion() < 7;
  TreeMap map=new TreeMap();
  ConflictingKey conflictingKey=new ConflictingKey("String_Node_Str");
  try {
    TreeMap untypedMap=map;
    untypedMap.put(conflictingKey,"String_Node_Str");
    assertTrue("String_Node_Str",java6CompatibleSources);
  }
 catch (  ClassCastException e) {
    assertFalse(java6CompatibleSources);
  }
  try {
    map.put("String_Node_Str","String_Node_Str");
    assertFalse("String_Node_Str",java6CompatibleSources);
  }
 catch (  ClassCastException expected) {
    assertTrue(java6CompatibleSources);
  }
}
Program: 53333
Project: 53333
Buggy source:
@Override protected void verifyMap(){
  if (!TestUtils.isJvm()) {
    TreeMapViolator.callAssertCorrectness(map);
  }
  super.verifyMap();
}

Fixed version (ground truth):
@Override protected void verifyMap(){
  if (!TestUtils.isJvm()) {
    TreeMapViolator.callAssertCorrectness((TreeMap)map);
  }
  super.verifyMap();
}
Program: 53334
Project: 53334
Buggy source:
@SuppressWarnings("String_Node_Str") public static native void callAssertCorrectness(Map map);

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static native void callAssertCorrectness(TreeMap map);
Program: 53335
Project: 53335
Buggy source:
private void checkMethodParameters(JMethod method){
  boolean hasOptionalParameters=false;
  for (  JParameter parameter : method.getParams()) {
    if (parameter.isOptional()) {
      if (parameter.getType().isPrimitiveType()) {
        logError(method,"String_Node_Str",parameter.getName(),getMemberDescription(method));
      }
      hasOptionalParameters=true;
      continue;
    }
    if (hasOptionalParameters && !parameter.isVarargs()) {
      logError(method,"String_Node_Str" + "String_Node_Str",parameter.getName(),getMemberDescription(method));
      break;
    }
  }
  if (hasOptionalParameters && method.getJsMemberType() != JsMemberType.CONSTRUCTOR && method.getJsMemberType() != JsMemberType.METHOD && !method.isOrOverridesJsFunctionMethod()) {
    logError(method,"String_Node_Str" + "String_Node_Str",getMemberDescription(method));
  }
  if (method.isJsMethodVarargs()) {
    checkJsVarargs(method);
  }
  for (  JMethod overriddenMethod : method.getOverriddenMethods()) {
    for (int i=0; i < overriddenMethod.getParams().size(); i++) {
      if (overriddenMethod.getParams().get(i).isOptional()) {
        if (!method.getParams().get(i).isOptional()) {
          logError(method,"String_Node_Str",getMemberDescription(method),method.getParams().get(i).getName());
          return;
        }
        break;
      }
    }
  }
}

Fixed version (ground truth):
private void checkMethodParameters(JMethod method){
  if (method.isSynthetic()) {
    return;
  }
  boolean hasOptionalParameters=false;
  for (  JParameter parameter : method.getParams()) {
    if (parameter.isOptional()) {
      if (parameter.getType().isPrimitiveType()) {
        logError(method,"String_Node_Str",parameter.getName(),getMemberDescription(method));
      }
      hasOptionalParameters=true;
      continue;
    }
    if (hasOptionalParameters && !parameter.isVarargs()) {
      logError(method,"String_Node_Str" + "String_Node_Str",parameter.getName(),getMemberDescription(method));
      break;
    }
  }
  if (hasOptionalParameters && method.getJsMemberType() != JsMemberType.CONSTRUCTOR && method.getJsMemberType() != JsMemberType.METHOD && !method.isOrOverridesJsFunctionMethod()) {
    logError(method,"String_Node_Str" + "String_Node_Str",getMemberDescription(method));
  }
  if (method.isJsMethodVarargs()) {
    checkJsVarargs(method);
  }
  for (  JMethod overriddenMethod : method.getOverriddenMethods()) {
    for (int i=0; i < overriddenMethod.getParams().size(); i++) {
      if (overriddenMethod.getParams().get(i).isOptional()) {
        if (!method.getParams().get(i).isOptional()) {
          logError(method,"String_Node_Str",getMemberDescription(method),method.getParams().get(i).getName());
          return;
        }
        break;
      }
    }
  }
}
Program: 53336
Project: 53336
Buggy source:
/** 
 * Removes the element at the specified position in the elements array, adjusting head and tail as necessary. This results in motion of elements backwards or forwards in the array.
 * @return -1 if elements moved backwards (left-shifted); 1 if forwards (right-shifted).
 */
private int removeAtIndex(int i){
  final int mask=array.length - 1;
  int headDistance=(i - head) & mask;
  int tailDistance=(tail - i) & mask;
  if (headDistance >= tailDistance) {
    shiftLeftAtIndex(i);
    return -1;
  }
 else {
    shiftRightAtIndex(i);
    return 1;
  }
}

Fixed version (ground truth):
/** 
 * Removes the element at the specified position in the elements array, adjusting head and tail as necessary. This results in motion of elements backwards or forwards in the array.
 * @return -1 if elements moved backwards (left-shifted); 1 if forwards (right-shifted).
 */
private int removeAtIndex(int i){
  final int mask=array.length - 1;
  int headDistance=(i - head) & mask;
  int tailDistance=(tail - i) & mask;
  int size=(tail - head) & mask;
  checkConcurrentModification(headDistance < size);
  if (headDistance >= tailDistance) {
    shiftLeftAtIndex(i);
    return -1;
  }
 else {
    shiftRightAtIndex(i);
    return 1;
  }
}
Program: 53337
Project: 53337
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public <T>T[] toArray(T[] out){
  int size=size();
  if (out.length < size) {
    out=ArrayHelper.createFrom(out,size);
  }
  Object[] dest=out;
  final int mask=size - 1;
  for (int i=head, dstIdx=0; dstIdx < size; i=(i + 1) & mask, ++dstIdx) {
    dest[dstIdx]=array[i];
  }
  if (out.length > size) {
    out[size]=null;
  }
  return out;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public <T>T[] toArray(T[] out){
  int size=size();
  if (out.length < size) {
    out=ArrayHelper.createFrom(out,size);
  }
  copyElements(out,size);
  if (out.length > size) {
    out[size]=null;
  }
  return out;
}
Program: 53338
Project: 53338
Buggy source:
/** 
 * Increase the capacity of this deque when full, i.e., when head and tail have wrapped around to become equal.
 */
private void ensureCapacity(){
  if (head != tail) {
    return;
  }
  int numElements=array.length;
  int newLength=nextArrayLength(numElements);
  if (head != 0) {
    E[] newArray=ArrayHelper.createFrom(array,newLength);
    array=toArray(newArray);
  }
 else {
    ArrayHelper.setLength(array,newLength);
  }
  head=0;
  tail=numElements;
}

Fixed version (ground truth):
/** 
 * Increase the capacity of this deque when full, i.e., when head and tail have wrapped around to become equal.
 */
private void ensureCapacity(){
  if (head != tail) {
    return;
  }
  int numElements=array.length;
  int newLength=nextArrayLength(numElements);
  if (head != 0) {
    E[] newArray=ArrayHelper.createFrom(array,newLength);
    copyElements(newArray,numElements);
    array=newArray;
    head=0;
  }
 else {
    ArrayHelper.setLength(array,newLength);
  }
  tail=numElements;
}
Program: 53339
Project: 53339
Buggy source:
@Override public String apply(String constantName){
  return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,constantName);
}

Fixed version (ground truth):
@Override public String apply(String constantName){
  String lowerCase=CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,constantName);
  if (!constantName.equals(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE,lowerCase))) {
    return constantName;
  }
  return lowerCase;
}
Program: 53340
Project: 53340
Buggy source:
/** 
 * In GSS, constant names are defined in upper case but a method name to access a constant in a CssResource interface can be written in lower camel case. <p> This method converts all constant names in a lower camel case identifier.
 */
private Collection<String> renameDefs(Iterable<String> constantsNames){
  return Lists.newArrayList(Iterables.transform(constantsNames,new Function<String,String>(){
    @Override public String apply(    String constantName){
      return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,constantName);
    }
  }
));
}

Fixed version (ground truth):
/** 
 * In GSS, constant names are defined in upper case but a method name to access a constant in a CssResource interface can be written in lower camel case. <p> This method converts all constant names in a lower camel case identifier.
 */
private Collection<String> renameDefs(Iterable<String> constantsNames){
  return Lists.newArrayList(Iterables.transform(constantsNames,new Function<String,String>(){
    @Override public String apply(    String constantName){
      String lowerCase=CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,constantName);
      if (!constantName.equals(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE,lowerCase))) {
        return constantName;
      }
      return lowerCase;
    }
  }
));
}
Program: 53341
Project: 53341
Buggy source:
private PathPrefixSet createInclusivePathPrefixSet(){
  pathPrefixes=new PathPrefixSet();
  pathPrefixes.add(new PathPrefix("String_Node_Str",null));
  return pathPrefixes;
}

Fixed version (ground truth):
private PathPrefixSet createInclusivePathPrefixSet(){
  PathPrefixSet pathPrefixSet=new PathPrefixSet();
  pathPrefixSet.add(new PathPrefix("String_Node_Str",null));
  pathPrefixes.add(pathPrefixSet);
  return pathPrefixSet;
}
Program: 53342
Project: 53342
Buggy source:
public static <T,K,D,A,M extends Map<K,D>>Collector<T,?,M> groupingBy(Function<? super T,? extends K> classifier,Supplier<M> mapFactory,Collector<? super T,A,D> downstream){
  return groupingBy0(LinkedHashMap::new,classifier,mapFactory,downstream);
}

Fixed version (ground truth):
public static <T,K,D,A,M extends Map<K,D>>Collector<T,?,M> groupingBy(Function<? super T,? extends K> classifier,Supplier<M> mapFactory,Collector<? super T,A,D> downstream){
  return groupingBy0(() -> {
    return new LinkedHashMap<>();
  }
,classifier,mapFactory,downstream);
}
Program: 53343
Project: 53343
Buggy source:
private static PathPrefixSet createInclusivePathPrefixSet(){
  PathPrefixSet pathPrefixes=new PathPrefixSet();
  pathPrefixes.add(new PathPrefix("String_Node_Str",null));
  return pathPrefixes;
}

Fixed version (ground truth):
private PathPrefixSet createInclusivePathPrefixSet(){
  pathPrefixes=new PathPrefixSet();
  pathPrefixes.add(new PathPrefix("String_Node_Str",null));
  return pathPrefixes;
}
Program: 53344
Project: 53344
Buggy source:
private boolean mightNeedDevirtualization(JMethod method,JReferenceType instanceType){
  if (instanceType == null || !method.needsDynamicDispatch()) {
    return false;
  }
  if (devirtualMethodByMethod.containsKey(method)) {
    return true;
  }
  if (method.isJsOverlay()) {
    return true;
  }
  if (method.getEnclosingType().isJsNative()) {
    return false;
  }
  EnumSet<DispatchType> dispatchType=program.getDispatchType(instanceType);
  dispatchType.remove(DispatchType.HAS_JAVA_VIRTUAL_DISPATCH);
  return !dispatchType.isEmpty();
}

Fixed version (ground truth):
private boolean mightNeedDevirtualization(JMethod method,JReferenceType instanceType){
  if (instanceType == null || !method.needsDynamicDispatch()) {
    return false;
  }
  if (devirtualMethodByMethod.containsKey(method)) {
    return true;
  }
  if (isOverlayMethod(method)) {
    return true;
  }
  if (method.getEnclosingType().isJsNative()) {
    return false;
  }
  EnumSet<DispatchType> dispatchType=program.getDispatchType(instanceType);
  dispatchType.remove(DispatchType.HAS_JAVA_VIRTUAL_DISPATCH);
  return !dispatchType.isEmpty();
}
Program: 53345
Project: 53345
Buggy source:
String f(int i,String... args);

Fixed version (ground truth):
@Override public boolean f(){
  return true;
}
Program: 53346
Project: 53346
Buggy source:
int apply(SomeInteger t,int u);

Fixed version (ground truth):
boolean apply();
Program: 53347
Project: 53347
Buggy source:
public void testSetDefaultValue_noSet(){
  try {
    attribute3.setDefault(div);
    fail();
  }
 catch (  AssertionError e) {
  }
}

Fixed version (ground truth):
public void testSetDefaultValue_noSet(){
  try {
    attribute3.setDefault(div);
    throw new Error();
  }
 catch (  AssertionError e) {
  }
}
Program: 53348
Project: 53348
Buggy source:
private int throwError(){
  throw new Error();
}

Fixed version (ground truth):
private int throwError(){
  throw new IllegalArgumentException();
}
Program: 53350
Project: 53350
Buggy source:
/** 
 * Tests HeadingElement.as() (it has slightly more complex assertion logic than most).
 */
public void testHeadingElementAs(){
  DivElement placeHolder=Document.get().createDivElement();
  for (int i=0; i < 6; ++i) {
    placeHolder.setInnerHTML("String_Node_Str" + (i + 1) + "String_Node_Str");
    assertNotNull(HeadingElement.as(placeHolder.getFirstChildElement()));
  }
  if (getClass().desiredAssertionStatus()) {
    Element notHeading=Document.get().createDivElement();
    try {
      HeadingElement.as(notHeading);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Tests HeadingElement.as() (it has slightly more complex assertion logic than most).
 */
public void testHeadingElementAs(){
  DivElement placeHolder=Document.get().createDivElement();
  for (int i=0; i < 6; ++i) {
    placeHolder.setInnerHTML("String_Node_Str" + (i + 1) + "String_Node_Str");
    assertNotNull(HeadingElement.as(placeHolder.getFirstChildElement()));
  }
  if (getClass().desiredAssertionStatus()) {
    Element notHeading=Document.get().createDivElement();
    try {
      HeadingElement.as(notHeading);
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53351
Project: 53351
Buggy source:
/** 
 * Test that styles only allow camelCase.
 */
public void testStyleCamelCase(){
  DivElement div=Document.get().createDivElement();
  div.getStyle().setProperty("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",div.getStyle().getProperty("String_Node_Str"));
  div.getStyle().setPropertyPx("String_Node_Str",10);
  assertEquals("String_Node_Str",div.getStyle().getProperty("String_Node_Str"));
  if (Style.class.desiredAssertionStatus()) {
    try {
      div.getStyle().setProperty("String_Node_Str","String_Node_Str");
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    try {
      div.getStyle().setPropertyPx("String_Node_Str",20);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    try {
      div.getStyle().getProperty("String_Node_Str");
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Test that styles only allow camelCase.
 */
public void testStyleCamelCase(){
  DivElement div=Document.get().createDivElement();
  div.getStyle().setProperty("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",div.getStyle().getProperty("String_Node_Str"));
  div.getStyle().setPropertyPx("String_Node_Str",10);
  assertEquals("String_Node_Str",div.getStyle().getProperty("String_Node_Str"));
  if (Style.class.desiredAssertionStatus()) {
    try {
      div.getStyle().setProperty("String_Node_Str","String_Node_Str");
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    try {
      div.getStyle().setPropertyPx("String_Node_Str",20);
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    try {
      div.getStyle().getProperty("String_Node_Str");
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53352
Project: 53352
Buggy source:
public void testEmptyClassNameAssertion(){
  DivElement div=Document.get().createDivElement();
  if (getClass().desiredAssertionStatus()) {
    div.setClassName("String_Node_Str");
    try {
      div.addClassName("String_Node_Str");
      fail();
    }
 catch (    AssertionError e) {
    }
    try {
      div.addClassName("String_Node_Str");
      fail();
    }
 catch (    AssertionError e) {
    }
    try {
      div.addClassName(null);
      fail();
    }
 catch (    AssertionError e) {
    }
    try {
      div.removeClassName("String_Node_Str");
      fail();
    }
 catch (    AssertionError e) {
    }
    try {
      div.removeClassName("String_Node_Str");
      fail();
    }
 catch (    AssertionError e) {
    }
    try {
      div.removeClassName(null);
      fail();
    }
 catch (    AssertionError e) {
    }
    assertEquals("String_Node_Str",div.getClassName());
  }
}

Fixed version (ground truth):
public void testEmptyClassNameAssertion(){
  DivElement div=Document.get().createDivElement();
  if (getClass().desiredAssertionStatus()) {
    div.setClassName("String_Node_Str");
    try {
      div.addClassName("String_Node_Str");
      throw new Error();
    }
 catch (    AssertionError e) {
    }
    try {
      div.addClassName("String_Node_Str");
      throw new Error();
    }
 catch (    AssertionError e) {
    }
    try {
      div.addClassName(null);
      throw new Error();
    }
 catch (    AssertionError e) {
    }
    try {
      div.removeClassName("String_Node_Str");
      throw new Error();
    }
 catch (    AssertionError e) {
    }
    try {
      div.removeClassName("String_Node_Str");
      throw new Error();
    }
 catch (    AssertionError e) {
    }
    try {
      div.removeClassName(null);
      throw new Error();
    }
 catch (    AssertionError e) {
    }
    assertEquals("String_Node_Str",div.getClassName());
  }
}
Program: 53353
Project: 53353
Buggy source:
public void testConcurrentAddAfterRemoveIsNotClobbered(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  MouseDownHandler one=new MouseDownHandler(){
    @Override public void onMouseDown(    MouseDownEvent event){
      manager.removeHandler(MouseDownEvent.getType(),mouse1);
      manager.addHandler(MouseDownEvent.getType(),mouse1);
      add(this);
    }
  }
;
  manager.addHandler(MouseDownEvent.getType(),one);
  boolean assertsOn=getClass().desiredAssertionStatus();
  if (assertsOn) {
    try {
      manager.fireEvent(new MouseDownEvent(){
      }
);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    return;
  }
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one,mouse1);
}

Fixed version (ground truth):
public void testConcurrentAddAfterRemoveIsNotClobbered(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  MouseDownHandler one=new MouseDownHandler(){
    @Override public void onMouseDown(    MouseDownEvent event){
      manager.removeHandler(MouseDownEvent.getType(),mouse1);
      manager.addHandler(MouseDownEvent.getType(),mouse1);
      add(this);
    }
  }
;
  manager.addHandler(MouseDownEvent.getType(),one);
  boolean assertsOn=getClass().desiredAssertionStatus();
  if (assertsOn) {
    try {
      manager.fireEvent(new MouseDownEvent(){
      }
);
    }
 catch (    AssertionError e) {
    }
    return;
  }
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one,mouse1);
}
Program: 53354
Project: 53354
Buggy source:
public void notestRemoveUnhandledType(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  HandlerRegistration reg=manager.addHandler(MouseDownEvent.getType(),mouse1);
  reg.removeHandler();
  if (!GWT.isScript()) {
    try {
      reg.removeHandler();
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
 else {
    reg.removeHandler();
  }
}

Fixed version (ground truth):
public void notestRemoveUnhandledType(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  HandlerRegistration reg=manager.addHandler(MouseDownEvent.getType(),mouse1);
  reg.removeHandler();
  if (!GWT.isScript()) {
    try {
      reg.removeHandler();
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
 else {
    reg.removeHandler();
  }
}
Program: 53355
Project: 53355
Buggy source:
public void testAssertThrowsNpe(){
  final SimpleEventBus eventBus=new SimpleEventBus();
  try {
    assertThrowsNpe(new ScheduledCommand(){
      @Override public void execute(){
        eventBus.addHandler(MouseDownEvent.getType(),mouse1);
      }
    }
);
    fail("String_Node_Str");
  }
 catch (  AssertionFailedError e) {
  }
}

Fixed version (ground truth):
public void testAssertThrowsNpe(){
  final SimpleEventBus eventBus=new SimpleEventBus();
  try {
    assertThrowsNpe(new ScheduledCommand(){
      @Override public void execute(){
        eventBus.addHandler(MouseDownEvent.getType(),mouse1);
      }
    }
);
    throw new Error("String_Node_Str");
  }
 catch (  AssertionFailedError e) {
  }
}
Program: 53356
Project: 53356
Buggy source:
public void testSet(){
  if (storage == null) {
    return;
  }
  assertEquals(null,storage.getItem("String_Node_Str"));
  assertEquals(0,storage.getLength());
  storage.setItem("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",storage.getItem("String_Node_Str"));
  assertEquals(1,storage.getLength());
  storage.setItem("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",storage.getItem("String_Node_Str"));
  assertEquals(1,storage.getLength());
  if (!GWT.isScript()) {
    try {
      storage.setItem("String_Node_Str","String_Node_Str");
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testSet(){
  if (storage == null) {
    return;
  }
  assertEquals(null,storage.getItem("String_Node_Str"));
  assertEquals(0,storage.getLength());
  storage.setItem("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",storage.getItem("String_Node_Str"));
  assertEquals(1,storage.getLength());
  storage.setItem("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str","String_Node_Str",storage.getItem("String_Node_Str"));
  assertEquals(1,storage.getLength());
  if (!GWT.isScript()) {
    try {
      storage.setItem("String_Node_Str","String_Node_Str");
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53357
Project: 53357
Buggy source:
/** 
 * Tests that   {@link RootPanel#detachNow(Widget)} can only be called once perwidget.
 */
public void testDetachNowTwiceFails(){
  if (!GWT.isScript()) {
    try {
      ensureDiv().setInnerHTML("String_Node_Str" + TEST_URL + "String_Node_Str");
      Anchor a=Anchor.wrap(Document.get().getElementById("String_Node_Str"));
      RootPanel.detachNow(a);
      RootPanel.detachNow(a);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Tests that   {@link RootPanel#detachNow(Widget)} can only be called once perwidget.
 */
public void testDetachNowTwiceFails(){
  if (!GWT.isScript()) {
    try {
      ensureDiv().setInnerHTML("String_Node_Str" + TEST_URL + "String_Node_Str");
      Anchor a=Anchor.wrap(Document.get().getElementById("String_Node_Str"));
      RootPanel.detachNow(a);
      RootPanel.detachNow(a);
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53358
Project: 53358
Buggy source:
/** 
 * Tests that   {@link RootPanel#detachOnWindowClose(Widget)} can only be calledonce per widget.
 */
public void testDetachOnWindowCloseTwiceFails(){
  if (!GWT.isScript()) {
    try {
      ensureDiv().setInnerHTML("String_Node_Str" + TEST_URL + "String_Node_Str");
      Anchor a=Anchor.wrap(Document.get().getElementById("String_Node_Str"));
      RootPanel.detachOnWindowClose(a);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Tests that   {@link RootPanel#detachOnWindowClose(Widget)} can only be calledonce per widget.
 */
public void testDetachOnWindowCloseTwiceFails(){
  if (!GWT.isScript()) {
    try {
      ensureDiv().setInnerHTML("String_Node_Str" + TEST_URL + "String_Node_Str");
      Anchor a=Anchor.wrap(Document.get().getElementById("String_Node_Str"));
      RootPanel.detachOnWindowClose(a);
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53359
Project: 53359
Buggy source:
/** 
 * Tests that wrap() may only be called on elements that are already attached to the DOM.
 */
public void testWrapUnattachedFails(){
  if (!GWT.isScript()) {
    try {
      AnchorElement aElem=Document.get().createAnchorElement();
      Anchor.wrap(aElem);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Tests that wrap() may only be called on elements that are already attached to the DOM.
 */
public void testWrapUnattachedFails(){
  if (!GWT.isScript()) {
    try {
      AnchorElement aElem=Document.get().createAnchorElement();
      Anchor.wrap(aElem);
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53360
Project: 53360
Buggy source:
/** 
 * Tests that wrapping an element that is already a child of an existing widget's element fails.
 */
public void testWrappingChildElementFails(){
  if (!GWT.isScript()) {
    try {
      FlowPanel p=new FlowPanel();
      RootPanel.get().add(p);
      p.add(new HTML("String_Node_Str"));
      Element unwrappableElement=Document.get().getElementById("String_Node_Str");
      Anchor.wrap(unwrappableElement);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Tests that wrapping an element that is already a child of an existing widget's element fails.
 */
public void testWrappingChildElementFails(){
  if (!GWT.isScript()) {
    try {
      FlowPanel p=new FlowPanel();
      RootPanel.get().add(p);
      p.add(new HTML("String_Node_Str"));
      Element unwrappableElement=Document.get().getElementById("String_Node_Str");
      Anchor.wrap(unwrappableElement);
      throw new Error("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53361
Project: 53361
Buggy source:
public void testInlineLabel(){
  new TestInlineLabel();
  if (!GWT.isScript()) {
    try {
      new BrokenInlineLabel();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testInlineLabel(){
  new TestInlineLabel();
  if (!GWT.isScript()) {
    try {
      new BrokenInlineLabel();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53362
Project: 53362
Buggy source:
public void testImage(){
  new TestImage();
  if (!GWT.isScript()) {
    try {
      new BrokenImage();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testImage(){
  new TestImage();
  if (!GWT.isScript()) {
    try {
      new BrokenImage();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53363
Project: 53363
Buggy source:
public void testAnchor(){
  new TestAnchor();
  if (!GWT.isScript()) {
    try {
      new BrokenAnchor();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testAnchor(){
  new TestAnchor();
  if (!GWT.isScript()) {
    try {
      new BrokenAnchor();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53364
Project: 53364
Buggy source:
public void testLabel(){
  new TestLabel();
  if (!GWT.isScript()) {
    try {
      new BrokenLabel();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testLabel(){
  new TestLabel();
  if (!GWT.isScript()) {
    try {
      new BrokenLabel();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53365
Project: 53365
Buggy source:
public void testHTML(){
  new TestHTML();
  if (!GWT.isScript()) {
    try {
      new BrokenHTML();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testHTML(){
  new TestHTML();
  if (!GWT.isScript()) {
    try {
      new BrokenHTML();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53366
Project: 53366
Buggy source:
public void testListBox(){
  new TestListBox();
  if (!GWT.isScript()) {
    try {
      new BrokenListBox();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testListBox(){
  new TestListBox();
  if (!GWT.isScript()) {
    try {
      new BrokenListBox();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53367
Project: 53367
Buggy source:
public void testFrame(){
  new TestFrame();
  if (!GWT.isScript()) {
    try {
      new BrokenFrame();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testFrame(){
  new TestFrame();
  if (!GWT.isScript()) {
    try {
      new BrokenFrame();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53368
Project: 53368
Buggy source:
public void testInlineHTML(){
  new TestInlineHTML();
  if (!GWT.isScript()) {
    try {
      new BrokenInlineHTML();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testInlineHTML(){
  new TestInlineHTML();
  if (!GWT.isScript()) {
    try {
      new BrokenInlineHTML();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53369
Project: 53369
Buggy source:
public void testFormPanel(){
  new TestFormPanel();
  if (!GWT.isScript()) {
    try {
      new BrokenFormPanel();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testFormPanel(){
  new TestFormPanel();
  if (!GWT.isScript()) {
    try {
      new BrokenFormPanel();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53370
Project: 53370
Buggy source:
public void testSimpleRadioButton(){
  new TestSimpleRadioButton();
  if (!GWT.isScript()) {
    try {
      new BrokenSimpleRadioButton();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testSimpleRadioButton(){
  new TestSimpleRadioButton();
  if (!GWT.isScript()) {
    try {
      new BrokenSimpleRadioButton();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}
Program: 53371
Project: 53371
Buggy source:
public void testHidden(){
  new TestHidden();
  if (!GWT.isScript()) {
    try {
      new BrokenHidden();
      fail(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}

Fixed version (ground truth):
public void testHidden(){
  new TestHidden();
  if (!GWT.isScript()) {
    try {
      new BrokenHidden();
      throw new Error(ASSERTION_ERROR);
    }
 catch (    AssertionError e) {
    }
  }
}