nus-yam/ex-repair huggingface dataset:
Program: 54715
Project: 54715
Buggy source:
private byte[] findClassBytes(String className){
  if (JavaScriptHost.class.getName().equals(className)) {
    return javaScriptHostBytes;
  }
  if (classRewriter != null && classRewriter.isJsoIntf(className)) {
    return classRewriter.writeJsoIntf(className);
  }
  String lookupClassName=className.replace('.','/');
  if (classRewriter != null && classRewriter.isJsoImpl(className)) {
    lookupClassName=lookupClassName.substring(0,lookupClassName.length() - 1);
  }
  CompiledClass compiledClass=compilationState.getClassFileMap().get(lookupClassName);
  if (compiledClass != null) {
    injectJsniFor(compiledClass);
    byte[] classBytes=compiledClass.getBytes();
    if (!compiledClass.getUnit().isSuperSource()) {
      classBytes=emmaStrategy.getEmmaClassBytes(classBytes,lookupClassName,compiledClass.getUnit().getLastModified());
    }
 else {
      logger.log(TreeLogger.SPAM,"String_Node_Str" + lookupClassName + "String_Node_Str");
    }
    if (classRewriter != null) {
      byte[] newBytes=classRewriter.rewrite(className,classBytes);
      if (CLASS_DUMP) {
        if (!Arrays.equals(classBytes,newBytes)) {
          classDump(className,newBytes);
        }
      }
      classBytes=newBytes;
    }
    return classBytes;
  }
  return null;
}

Fixed version (ground truth):
private byte[] findClassBytes(String className){
  if (JavaScriptHost.class.getName().equals(className)) {
    return javaScriptHostBytes;
  }
  if (classRewriter != null && classRewriter.isJsoIntf(className)) {
    return classRewriter.writeJsoIntf(className);
  }
  String lookupClassName=className.replace('.','/');
  if (classRewriter != null && classRewriter.isJsoImpl(className)) {
    lookupClassName=lookupClassName.substring(0,lookupClassName.length() - 1);
  }
  CompiledClass compiledClass=compilationState.getClassFileMap().get(lookupClassName);
  byte classBytes[]=null;
  if (compiledClass != null) {
    injectJsniFor(compiledClass);
    classBytes=compiledClass.getBytes();
    if (!compiledClass.getUnit().isSuperSource()) {
      classBytes=emmaStrategy.getEmmaClassBytes(classBytes,lookupClassName,compiledClass.getUnit().getLastModified());
    }
 else {
      logger.log(TreeLogger.SPAM,"String_Node_Str" + lookupClassName + "String_Node_Str");
    }
  }
 else   if (emmaIsAvailable) {
    if (isSynthetic(className)) {
      logger.log(TreeLogger.SPAM,"String_Node_Str" + lookupClassName + "String_Node_Str");
      classBytes=emmaStrategy.getEmmaClassBytes(null,lookupClassName,0);
    }
  }
  if (classBytes != null && classRewriter != null) {
    byte[] newBytes=classRewriter.rewrite(className,classBytes);
    if (CLASS_DUMP) {
      if (!Arrays.equals(classBytes,newBytes)) {
        classDump(className,newBytes);
      }
    }
    classBytes=newBytes;
  }
  return classBytes;
}
Program: 54716
Project: 54716
Buggy source:
@SuppressWarnings("String_Node_Str") protected static void baseRemove(HandlerManager manager,EventListener listener,Type... keys){
  if (manager != null) {
    for (    Type key : keys) {
      int handlerCount=manager.getHandlerCount(key);
      for (int i=0; i < handlerCount; i++) {
        EventHandler handler=manager.getHandler(key,i);
        if (handler instanceof ListenerWrapper && ((ListenerWrapper)handler).listener.equals(listener)) {
          manager.removeHandler(key,handler);
        }
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") static <H extends EventHandler>void baseRemove(HandlerManager manager,EventListener listener,Type... keys){
  if (manager != null) {
    for (    Type<H> key : keys) {
      int handlerCount=manager.getHandlerCount(key);
      for (int i=handlerCount - 1; i >= 0; i--) {
        H handler=manager.getHandler(key,i);
        if (handler instanceof ListenerWrapper && ((ListenerWrapper)handler).listener.equals(listener)) {
          manager.removeHandler(key,handler);
        }
      }
    }
  }
}
Program: 54717
Project: 54717
Buggy source:
@Override protected synchronized Class<?> findClass(String className) throws ClassNotFoundException {
  if (className == null) {
    throw new ClassNotFoundException("String_Node_Str",new NullPointerException());
  }
  if (isInStandardJavaPackage(className)) {
    throw new ClassNotFoundException(className);
  }
  if (BRIDGE_CLASS_NAMES.containsKey(className)) {
    return BRIDGE_CLASS_NAMES.get(className);
  }
  byte[] classBytes=findClassBytes(className);
  if (classBytes == null) {
    throw new ClassNotFoundException(className);
  }
  Class<?> newClass=defineClass(className,classBytes,0,classBytes.length);
  if (className.equals(JavaScriptHost.class.getName())) {
    javaScriptHostClass=newClass;
    updateJavaScriptHost();
  }
  if (!classRewriter.isJsoIntf(className)) {
    CompiledClass compiledClass=compilationState.getClassFileMap().get(canonicalizeClassName(className));
    if (compiledClass != null) {
      toInject.push(compiledClass);
    }
  }
  if (!isInjectingClass) {
    try {
      isInjectingClass=true;
      while (toInject.size() > 0) {
        injectJsniFor(toInject.remove(0));
      }
    }
  finally {
      isInjectingClass=false;
    }
  }
  if (className.equals("String_Node_Str")) {
    gwtClass=newClass;
    updateGwtClass();
  }
  return newClass;
}

Fixed version (ground truth):
@Override protected synchronized Class<?> findClass(String className) throws ClassNotFoundException {
  if (className == null) {
    throw new ClassNotFoundException("String_Node_Str",new NullPointerException());
  }
  if (isInStandardJavaPackage(className)) {
    throw new ClassNotFoundException(className);
  }
  if (BRIDGE_CLASS_NAMES.containsKey(className)) {
    return BRIDGE_CLASS_NAMES.get(className);
  }
  byte[] classBytes=findClassBytes(className);
  if (classBytes == null) {
    throw new ClassNotFoundException(className);
  }
  boolean localInjection;
  if (!isInjectingClass) {
    localInjection=isInjectingClass=true;
  }
 else {
    localInjection=false;
  }
  Class<?> newClass=defineClass(className,classBytes,0,classBytes.length);
  if (className.equals(JavaScriptHost.class.getName())) {
    javaScriptHostClass=newClass;
    updateJavaScriptHost();
  }
  if (!classRewriter.isJsoIntf(className)) {
    CompiledClass compiledClass=compilationState.getClassFileMap().get(canonicalizeClassName(className));
    if (compiledClass != null) {
      toInject.push(compiledClass);
    }
  }
  if (localInjection) {
    try {
      while (toInject.size() > 0) {
        injectJsniFor(toInject.remove(0));
      }
    }
  finally {
      isInjectingClass=false;
    }
  }
  if (className.equals("String_Node_Str")) {
    gwtClass=newClass;
    updateGwtClass();
  }
  return newClass;
}
Program: 54718
Project: 54718
Buggy source:
public void testStaticAccess(){
  Foo.field=3;
  assertEquals(3,Foo.field--);
  assertEquals("String_Node_Str",Foo.staticValue());
  assertEquals("String_Node_Str",Foo.staticNative());
  Bar.field=10;
  assertEquals(11,++Bar.field);
  assertEquals("String_Node_Str",Bar.staticValue());
  assertEquals("String_Node_Str",Bar.staticNative());
}

Fixed version (ground truth):
public void testStaticAccess(){
  Foo.field=3;
  assertEquals(3,Foo.field--);
  assertEquals("String_Node_Str",Foo.staticValue());
  assertEquals("String_Node_Str",Foo.staticNative());
  assertEquals("String_Node_Str",Foo.staticNativeToSub());
  Bar.field=10;
  assertEquals(11,++Bar.field);
  assertEquals("String_Node_Str",Bar.staticValue());
  assertEquals("String_Node_Str",Bar.staticNative());
}
Program: 54719
Project: 54719
Buggy source:
/** 
 * Removes a previously added listener interface.
 * @param listener the listener interface to remove 
 */
@Deprecated void removeChangeListener(ChangeListener listener);

Fixed version (ground truth):
/** 
 * Removes a previously added listener interface.
 * @param listener the listener interface to remove
 */
@Deprecated void removeChangeListener(ChangeListener listener);
Program: 54720
Project: 54720
Buggy source:
/** 
 * Adds a listener interface to receive keyboard events.
 * @param listener the listener interface to add
 * @deprecated use <code>addKeyPressHandler/addKeyDownKeyDownHandler/addKeyUpHandler</code> instead
 */
@Deprecated void addKeyboardListener(KeyboardListener listener);

Fixed version (ground truth):
/** 
 * Adds a listener interface to receive keyboard events.
 * @param listener the listener interface to add
 * @deprecated use<code>addKeyPressHandler/addKeyDownKeyDownHandler/addKeyUpHandler</code> instead
 */
@Deprecated void addKeyboardListener(KeyboardListener listener);
Program: 54721
Project: 54721
Buggy source:
/** 
 * Adds a listener interface to receive mouse events.
 * @param listener the listener interface to add
 * @deprecated use <code>addMouse(Down/Up/Over/Out/Move/Scroll)Handler</code> instead
 */
@Deprecated void addMouseListener(MouseListener listener);

Fixed version (ground truth):
/** 
 * Adds a listener interface to receive mouse events.
 * @param listener the listener interface to add
 * @deprecated use <code>addMouse(Down/Up/Over/Out/Move/Scroll)Handler</code>instead
 */
@Deprecated void addMouseListener(MouseListener listener);
Program: 54722
Project: 54722
Buggy source:
/** 
 * Adds a listener interface to receive tree events.
 * @param listener the listener interface to add
 * @deprecated use addSelectionHandler,addOpenHandler, and addCloseHandler instead
 */
@Deprecated void addTreeListener(TreeListener listener);

Fixed version (ground truth):
/** 
 * Adds a listener interface to receive tree events.
 * @param listener the listener interface to add
 * @deprecated use addSelectionHandler,addOpenHandler, and addCloseHandlerinstead
 */
@Deprecated void addTreeListener(TreeListener listener);
Program: 54723
Project: 54723
Buggy source:
public void onMouseOut(MouseOutEvent event){
  listener.onMouseLeave(source(event));
}

Fixed version (ground truth):
public void onMouseOut(MouseOutEvent event){
  Element to=event.getToElement();
  Widget source=source(event);
  if (to == null || !source.getElement().isOrHasChild(to)) {
    listener.onMouseLeave(source(event));
  }
}
Program: 54724
Project: 54724
Buggy source:
public void onMouseDown(MouseDownEvent event){
  listener.onMouseDown(source(event),event.getClientX(),event.getClientY());
}

Fixed version (ground truth):
public void onMouseDown(MouseDownEvent event){
  Widget source=source(event);
  Element elem=source.getElement();
  listener.onMouseDown(source,event.getRelativeX(elem),event.getRelativeY(elem));
}
Program: 54725
Project: 54725
Buggy source:
public void onMouseOver(MouseOverEvent event){
  listener.onMouseEnter(source(event));
}

Fixed version (ground truth):
public void onMouseOver(MouseOverEvent event){
  Element from=event.getFromElement();
  Widget source=source(event);
  if (from == null || !source.getElement().isOrHasChild(from)) {
    listener.onMouseEnter(source(event));
  }
}
Program: 54726
Project: 54726
Buggy source:
public void onMouseMove(MouseMoveEvent event){
  listener.onMouseMove(source(event),event.getClientX(),event.getClientY());
}

Fixed version (ground truth):
public void onMouseMove(MouseMoveEvent event){
  Widget source=source(event);
  Element elem=source.getElement();
  listener.onMouseMove(source,event.getRelativeX(elem),event.getRelativeY(elem));
}
Program: 54727
Project: 54727
Buggy source:
public void onMouseUp(MouseUpEvent event){
  listener.onMouseUp(source(event),event.getClientX(),event.getClientY());
}

Fixed version (ground truth):
public void onMouseUp(MouseUpEvent event){
  Widget source=source(event);
  Element elem=source.getElement();
  listener.onMouseUp(source,event.getRelativeX(elem),event.getRelativeY(elem));
}
Program: 54728
Project: 54728
Buggy source:
public long lastModified(){
  long lastModified=moduleDefCreationTime;
  for (Iterator<File> iter=gwtXmlFiles.iterator(); iter.hasNext(); ) {
    File xmlFile=iter.next();
    if (xmlFile.exists()) {
      lastModified=Math.min(lastModified,xmlFile.lastModified());
    }
  }
  return lastModified;
}

Fixed version (ground truth):
public long lastModified(){
  long lastModified=0;
  for (  File xmlFile : gwtXmlFiles) {
    if (xmlFile.exists()) {
      lastModified=Math.max(lastModified,xmlFile.lastModified());
    }
  }
  return lastModified > 0 ? lastModified : moduleDefCreationTime;
}
Program: 54729
Project: 54729
Buggy source:
public StandardGeneratedResource(Class<? extends Generator> generatorType,String partialPath,URL url){
  super(StandardLinkerContext.class,generatorType,partialPath);
  this.url=url;
}

Fixed version (ground truth):
public StandardGeneratedResource(Class<? extends Generator> generatorType,String partialPath,File file){
  super(StandardLinkerContext.class,generatorType,partialPath);
  this.file=file;
}
Program: 54730
Project: 54730
Buggy source:
@Override public InputStream getContents(TreeLogger logger) throws UnableToCompleteException {
  try {
    return url.openStream();
  }
 catch (  IOException e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str",e);
    throw new UnableToCompleteException();
  }
}

Fixed version (ground truth):
@Override public InputStream getContents(TreeLogger logger) throws UnableToCompleteException {
  try {
    return new FileInputStream(file);
  }
 catch (  IOException e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str",e);
    throw new UnableToCompleteException();
  }
}
Program: 54731
Project: 54731
Buggy source:
/** 
 * Writes artifacts into output directories in the standard way.
 * @param logger logs the operation
 * @param artifacts the set of artifacts to write
 * @param outputPath the output path for deployable artifacts
 * @param extraPath optional extra path for non-deployable artifacts
 * @throws UnableToCompleteException
 */
public void produceOutputDirectory(TreeLogger logger,ArtifactSet artifacts,File outputPath,File extraPath) throws UnableToCompleteException {
  logger=logger.branch(TreeLogger.TRACE,"String_Node_Str" + outputPath.getPath(),null);
  for (  EmittedArtifact artifact : artifacts.find(EmittedArtifact.class)) {
    TreeLogger artifactLogger=logger.branch(TreeLogger.DEBUG,"String_Node_Str" + artifact.getPartialPath(),null);
    File outFile;
    if (artifact.isPrivate()) {
      if (extraPath == null) {
        continue;
      }
      outFile=new File(getExtraPathForLinker(extraPath,artifact.getLinker()),artifact.getPartialPath());
    }
 else {
      outFile=new File(outputPath,artifact.getPartialPath());
    }
    Util.copy(artifactLogger,artifact.getContents(artifactLogger),outFile);
  }
}

Fixed version (ground truth):
/** 
 * Writes artifacts into output directories in the standard way.
 * @param logger logs the operation
 * @param artifacts the set of artifacts to write
 * @param outputPath the output path for deployable artifacts
 * @param extraPath optional extra path for non-deployable artifacts
 * @throws UnableToCompleteException
 */
public void produceOutputDirectory(TreeLogger logger,ArtifactSet artifacts,File outputPath,File extraPath) throws UnableToCompleteException {
  logger=logger.branch(TreeLogger.TRACE,"String_Node_Str" + outputPath.getPath(),null);
  for (  EmittedArtifact artifact : artifacts.find(EmittedArtifact.class)) {
    TreeLogger artifactLogger=logger.branch(TreeLogger.DEBUG,"String_Node_Str" + artifact.getPartialPath(),null);
    File outFile;
    if (artifact.isPrivate()) {
      if (extraPath == null) {
        continue;
      }
      outFile=new File(getExtraPathForLinker(extraPath,artifact.getLinker()),artifact.getPartialPath());
    }
 else {
      outFile=new File(outputPath,artifact.getPartialPath());
    }
    Util.copy(artifactLogger,artifact.getContents(artifactLogger),outFile);
    outFile.setLastModified(artifact.getLastModified());
  }
}
Program: 54732
Project: 54732
Buggy source:
private Object writeReplace(){
  if (resource instanceof Serializable) {
    return this;
  }
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    Util.copy(resource.openContents(),baos);
    return new SerializedPublicResource(getPartialPath(),baos.toByteArray());
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
private Object writeReplace(){
  if (resource instanceof Serializable) {
    return this;
  }
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    Util.copy(resource.openContents(),baos);
    return new SerializedPublicResource(getPartialPath(),baos.toByteArray(),getLastModified());
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 54733
Project: 54733
Buggy source:
protected SerializedPublicResource(String partialPath,byte[] data){
  super(StandardLinkerContext.class,partialPath);
  this.data=data;
}

Fixed version (ground truth):
protected SerializedPublicResource(String partialPath,byte[] data,long lastModified){
  super(StandardLinkerContext.class,partialPath);
  this.data=data;
  this.lastModified=lastModified;
}
Program: 54734
Project: 54734
Buggy source:
@Override public void hide(){
  resizeHandlerRegistration.removeHandler();
  resizeHandlerRegistration=null;
  super.hide();
}

Fixed version (ground truth):
@Override public void hide(){
  if (resizeHandlerRegistration != null) {
    resizeHandlerRegistration.removeHandler();
    resizeHandlerRegistration=null;
  }
  super.hide();
}
Program: 54735
Project: 54735
Buggy source:
/** 
 * Synchronize against the source oracle to check for added/removed/updated units. Updated units are invalidated, and any units depending on changed units are also invalidated. All generated units are removed. TODO: something more optimal with generated files?
 */
public void refresh(TreeLogger logger){
  for (Iterator<CompilationUnit> it=unitMap.values().iterator(); it.hasNext(); ) {
    CompilationUnit unit=it.next();
    if (unit.isGenerated()) {
      unit.setState(State.FRESH);
      it.remove();
    }
  }
  refreshFromSourceOracle();
  updateExposedUnits();
  CompilationUnitInvalidator.invalidateUnitsWithInvalidRefs(TreeLogger.NULL,getCompilationUnits());
  jdtCompiler=new JdtCompiler();
  validBinaryTypeNames.clear();
  compile(logger,getCompilationUnits());
  mediator.refresh(logger,getCompilationUnits());
  markSurvivorsChecked(getCompilationUnits());
}

Fixed version (ground truth):
/** 
 * Synchronize against the source oracle to check for added/removed/updated units. Updated units are invalidated, and any units depending on changed units are also invalidated. All generated units are removed. TODO: something more optimal with generated files?
 */
public void refresh(TreeLogger logger){
  for (Iterator<CompilationUnit> it=unitMap.values().iterator(); it.hasNext(); ) {
    CompilationUnit unit=it.next();
    if (unit.isGenerated()) {
      unit.setState(State.FRESH);
      it.remove();
    }
  }
  refreshFromSourceOracle();
  updateExposedUnits();
  CompilationUnitInvalidator.invalidateUnitsWithInvalidRefs(TreeLogger.NULL,getCompilationUnits());
  jdtCompiler=new JdtCompiler();
  compile(logger,getCompilationUnits());
  mediator.refresh(logger,getCompilationUnits());
  markSurvivorsChecked(getCompilationUnits());
}
Program: 54736
Project: 54736
Buggy source:
/** 
 * Compile units and update their internal state. Invalidate any units with compile errors.
 */
private void compile(TreeLogger logger,Set<CompilationUnit> newUnits){
  PerfLogger.start("String_Node_Str");
  if (jdtCompiler.doCompile(newUnits)) {
    boolean anyErrors=CompilationUnitInvalidator.invalidateUnitsWithErrors(logger,newUnits);
    CompilationUnitInvalidator.validateCompilationUnits(newUnits,validBinaryTypeNames);
    anyErrors|=CompilationUnitInvalidator.invalidateUnitsWithErrors(logger,newUnits);
    if (anyErrors) {
      CompilationUnitInvalidator.invalidateUnitsWithInvalidRefs(logger,newUnits);
    }
    recordValidBinaryTypeNames(newUnits);
    JsniCollector.collectJsniMethods(logger,newUnits,new JsProgram());
  }
  PerfLogger.end();
}

Fixed version (ground truth):
/** 
 * Compile units and update their internal state. Invalidate any units with compile errors.
 */
private void compile(TreeLogger logger,Set<CompilationUnit> newUnits){
  PerfLogger.start("String_Node_Str");
  if (jdtCompiler.doCompile(newUnits)) {
    boolean anyErrors=CompilationUnitInvalidator.invalidateUnitsWithErrors(logger,newUnits);
    CompilationUnitInvalidator.validateCompilationUnits(newUnits,jdtCompiler.getBinaryTypeNames());
    anyErrors|=CompilationUnitInvalidator.invalidateUnitsWithErrors(logger,newUnits);
    if (anyErrors) {
      CompilationUnitInvalidator.invalidateUnitsWithInvalidRefs(logger,newUnits);
    }
    JsniCollector.collectJsniMethods(logger,newUnits,new JsProgram());
  }
  PerfLogger.end();
}
Program: 54737
Project: 54737
Buggy source:
private void addPackages(String packageName){
  while (true) {
    packages.add(String.valueOf(packageName));
    int pos=packageName.lastIndexOf('.');
    if (pos > 0) {
      packageName=packageName.substring(0,pos);
    }
 else {
      packages.add("String_Node_Str");
      break;
    }
  }
}

Fixed version (ground truth):
private void addPackages(String slashedPackageName){
  while (packages.add(slashedPackageName)) {
    int pos=slashedPackageName.lastIndexOf('/');
    if (pos > 0) {
      slashedPackageName=slashedPackageName.substring(0,pos);
    }
 else {
      packages.add("String_Node_Str");
      break;
    }
  }
}
Program: 54738
Project: 54738
Buggy source:
private boolean isPackage(String packageName){
  if (packages.contains(packageName)) {
    return true;
  }
  if (notPackages.contains(packageName)) {
    return false;
  }
  String resourceName=packageName.replace('.','/') + '/';
  if (getClassLoader().getResource(resourceName) != null) {
    addPackages(packageName);
    return true;
  }
 else {
    notPackages.add(packageName);
    return false;
  }
}

Fixed version (ground truth):
private boolean isPackage(String slashedPackageName){
  if (packages.contains(slashedPackageName)) {
    return true;
  }
  if (notPackages.contains(slashedPackageName)) {
    return false;
  }
  String resourceName=slashedPackageName + '/';
  if (getClassLoader().getResource(resourceName) != null) {
    addPackages(slashedPackageName);
    return true;
  }
 else {
    notPackages.add(slashedPackageName);
    return false;
  }
}
Program: 54739
Project: 54739
Buggy source:
public boolean doCompile(Collection<CompilationUnit> units){
  List<ICompilationUnit> icus=new ArrayList<ICompilationUnit>();
  for (  CompilationUnit unit : units) {
    String packageName=Shared.getPackageName(unit.getTypeName());
    addPackages(packageName);
    Set<CompiledClass> compiledClasses=unit.getCompiledClasses();
    if (compiledClasses == null) {
      icus.add(new CompilationUnitAdapter(unit));
    }
 else {
      recordBinaryTypes(compiledClasses);
    }
  }
  if (icus.isEmpty()) {
    return false;
  }
  PerfLogger.start("String_Node_Str");
  compiler.compile(icus.toArray(new ICompilationUnit[icus.size()]));
  PerfLogger.end();
  return true;
}

Fixed version (ground truth):
public boolean doCompile(Collection<CompilationUnit> units){
  List<ICompilationUnit> icus=new ArrayList<ICompilationUnit>();
  for (  CompilationUnit unit : units) {
    String packageName=Shared.getPackageName(unit.getTypeName()).replace('.','/');
    addPackages(packageName);
    Set<CompiledClass> compiledClasses=unit.getCompiledClasses();
    if (compiledClasses == null) {
      icus.add(new CompilationUnitAdapter(unit));
    }
 else {
      recordBinaryTypes(compiledClasses);
    }
  }
  if (icus.isEmpty()) {
    return false;
  }
  PerfLogger.start("String_Node_Str");
  compiler.compile(icus.toArray(new ICompilationUnit[icus.size()]));
  PerfLogger.end();
  return true;
}
Program: 54740
Project: 54740
Buggy source:
public NameEnvironmentAnswer findType(char[][] compoundTypeName){
  char[] binaryNameChars=CharOperation.concatWith(compoundTypeName,'.');
  String binaryName=String.valueOf(binaryNameChars);
  CompiledClass compiledClass=binaryTypes.get(binaryName);
  if (compiledClass != null) {
    return compiledClass.getNameEnvironmentAnswer();
  }
  if (isPackage(binaryName)) {
    return null;
  }
  try {
    Class.forName(binaryName,false,getClassLoader());
    String resourcePath=binaryName.replace('.','/') + "String_Node_Str";
    URL resource=getClassLoader().getResource(resourcePath);
    InputStream openStream=resource.openStream();
    try {
      ClassFileReader cfr=ClassFileReader.read(openStream,resource.toExternalForm(),true);
      return new NameEnvironmentAnswer(cfr,null);
    }
  finally {
      Utility.close(openStream);
    }
  }
 catch (  NoClassDefFoundError e) {
  }
catch (  ClassNotFoundException e) {
  }
catch (  ClassFormatException e) {
  }
catch (  IOException e) {
  }
  return null;
}

Fixed version (ground truth):
public NameEnvironmentAnswer findType(char[][] compoundTypeName){
  char[] binaryNameChars=CharOperation.concatWith(compoundTypeName,'/');
  String binaryName=String.valueOf(binaryNameChars);
  CompiledClass compiledClass=binaryTypes.get(binaryName);
  if (compiledClass != null) {
    return compiledClass.getNameEnvironmentAnswer();
  }
  if (isPackage(binaryName)) {
    return null;
  }
  try {
    URL resource=getClassLoader().getResource(binaryName + "String_Node_Str");
    if (resource != null) {
      InputStream openStream=resource.openStream();
      try {
        ClassFileReader cfr=ClassFileReader.read(openStream,resource.toExternalForm(),true);
        return new NameEnvironmentAnswer(cfr,null);
      }
  finally {
        Utility.close(openStream);
      }
    }
  }
 catch (  ClassFormatException e) {
  }
catch (  IOException e) {
  }
  return null;
}
Program: 54741
Project: 54741
Buggy source:
private void recordBinaryTypes(Set<CompiledClass> compiledClasses){
  for (  CompiledClass compiledClass : compiledClasses) {
    binaryTypes.put(compiledClass.getBinaryName().replace('/','.'),compiledClass);
  }
}

Fixed version (ground truth):
private void recordBinaryTypes(Set<CompiledClass> compiledClasses){
  for (  CompiledClass compiledClass : compiledClasses) {
    binaryTypes.put(compiledClass.getBinaryName(),compiledClass);
  }
}
Program: 54742
Project: 54742
Buggy source:
/** 
 * Full refresh based on new units.
 */
public void refresh(TreeLogger logger,Set<CompilationUnit> units){
  binaryMapper.clear();
  sourceMapper.clear();
  typeOracle.reset();
  addNewUnits(logger,units);
}

Fixed version (ground truth):
/** 
 * Full refresh based on new units.
 */
public void refresh(TreeLogger logger,Set<CompilationUnit> units){
  binaryMapper.clear();
  typeOracle.reset();
  addNewUnits(logger,units);
}
Program: 54743
Project: 54743
Buggy source:
@Override protected int startUpServer(){
  PerfLogger.start("String_Node_Str");
  try {
    TreeLogger serverLogger=getTopLogger().branch(TreeLogger.INFO,"String_Node_Str" + getPort(),null);
    ModuleDef[] moduleArray=modules.toArray(new ModuleDef[modules.size()]);
    for (    ModuleDef moduleDef : moduleArray) {
      String[] servletPaths=moduleDef.getServletPaths();
      if (servletPaths.length > 0) {
        serverLogger.log(TreeLogger.WARN,"String_Node_Str" + moduleDef.getName() + "String_Node_Str");
      }
    }
    servletFilter=new GWTShellServletFilter(serverLogger,options,moduleArray);
    server=launcher.start(serverLogger,getPort(),options.getOutDir(),servletFilter);
  }
 catch (  UnableToCompleteException e) {
    PerfLogger.end();
    return -1;
  }
  assert(server != null);
  PerfLogger.end();
  return server.getPort();
}

Fixed version (ground truth):
@Override protected int startUpServer(){
  PerfLogger.start("String_Node_Str");
  try {
    TreeLogger serverLogger=getTopLogger().branch(TreeLogger.INFO,"String_Node_Str" + getPort(),null);
    ModuleDef[] moduleArray=modules.toArray(new ModuleDef[modules.size()]);
    for (    ModuleDef moduleDef : moduleArray) {
      String[] servletPaths=moduleDef.getServletPaths();
      if (servletPaths.length > 0) {
        serverLogger.log(TreeLogger.WARN,"String_Node_Str" + moduleDef.getName() + "String_Node_Str");
      }
    }
    servletFilter=new GWTShellServletFilter(serverLogger,options,moduleArray);
    server=launcher.start(serverLogger,getPort(),options.getOutDir(),servletFilter);
    assert(server != null);
    return server.getPort();
  }
 catch (  BindException e) {
    System.err.println("String_Node_Str" + getPort() + "String_Node_Str");
  }
catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
 finally {
    PerfLogger.end();
  }
  return -1;
}
Program: 54744
Project: 54744
Buggy source:
ServletContainer start(TreeLogger topLogger,int port,File appRootDir,Filter shellServletFilter) throws UnableToCompleteException ;

Fixed version (ground truth):
/** 
 * Start an embedded HTTP server.
 * @param logger the server logger
 * @param port the TCP port to serve on
 * @param appRootDir the base WAR directory
 * @param filter a servlet filter that must be installed on the root path toserve generated files
 * @return the launch servlet contained
 * @throws BindException if the requested port is already in use
 * @throws Exception if the server fails to start for any other reason
 */
ServletContainer start(TreeLogger logger,int port,File appRootDir,Filter filter) throws BindException, Exception ;
Program: 54745
Project: 54745
Buggy source:
@SuppressWarnings("String_Node_Str") public ServletContainer start(TreeLogger logger,int port,File appRootDir,Filter shellServletFilter) throws UnableToCompleteException {
  checkStartParams(logger,port,appRootDir);
  System.setProperty("String_Node_Str","String_Node_Str");
  JettyTreeLogger.setDefaultConstruction(logger,TreeLogger.INFO);
  System.setProperty("String_Node_Str",JettyTreeLogger.class.getName());
  Log.isDebugEnabled();
  if (JettyTreeLogger.isDefaultConstructionReady()) {
    Log.setLog(new JettyTreeLogger());
  }
  Server server=new Server();
  SelectChannelConnector connector=new SelectChannelConnector();
  connector.setPort(port);
  connector.setHost("String_Node_Str");
  server.addConnector(connector);
  WebAppContext wac=new WebAppContext(appRootDir.getAbsolutePath(),"String_Node_Str");
  wac.getInitParams().put("String_Node_Str","String_Node_Str");
  FilterHolder filterHolder=new FilterHolder();
  filterHolder.setFilter(shellServletFilter);
  wac.addFilter(filterHolder,"String_Node_Str",Handler.ALL);
  server.setHandler(wac);
  server.setStopAtShutdown(true);
  try {
    server.start();
    int actualPort=connector.getLocalPort();
    return new JettyServletContainer(logger,wac,actualPort,appRootDir);
  }
 catch (  Exception e) {
    logger.log(TreeLogger.ERROR,"String_Node_Str",e);
    throw new UnableToCompleteException();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public ServletContainer start(TreeLogger logger,int port,File appRootDir,Filter shellServletFilter) throws Exception {
  checkStartParams(logger,port,appRootDir);
  System.setProperty("String_Node_Str","String_Node_Str");
  JettyTreeLogger.setDefaultConstruction(logger,TreeLogger.INFO);
  System.setProperty("String_Node_Str",JettyTreeLogger.class.getName());
  Log.isDebugEnabled();
  if (JettyTreeLogger.isDefaultConstructionReady()) {
    Log.setLog(new JettyTreeLogger());
  }
  Server server=new Server();
  SelectChannelConnector connector=new SelectChannelConnector();
  connector.setPort(port);
  connector.setHost("String_Node_Str");
  connector.setReuseAddress(false);
  server.addConnector(connector);
  WebAppContext wac=new WebAppContext(appRootDir.getAbsolutePath(),"String_Node_Str");
  wac.getInitParams().put("String_Node_Str","String_Node_Str");
  FilterHolder filterHolder=new FilterHolder();
  filterHolder.setFilter(shellServletFilter);
  wac.addFilter(filterHolder,"String_Node_Str",Handler.ALL);
  server.setHandler(wac);
  server.setStopAtShutdown(true);
  server.start();
  return new JettyServletContainer(logger,wac,connector.getLocalPort(),appRootDir);
}
Program: 54746
Project: 54746
Buggy source:
public static void main(String[] args){
  BootStrapPlatform.init();
  GWTHosted shellMain=new GWTHosted();
  if (shellMain.processArgs(args)) {
    shellMain.run();
  }
  System.exit(0);
}

Fixed version (ground truth):
public static void main(String[] args){
  GWTHosted shellMain=new GWTHosted();
  if (shellMain.processArgs(args)) {
    shellMain.run();
  }
  System.exit(0);
}
Program: 54747
Project: 54747
Buggy source:
public static void main(String[] args){
  BootStrapPlatform.init();
  GWTShell shellMain=new GWTShell();
  if (shellMain.processArgs(args)) {
    shellMain.run();
  }
  System.exit(0);
}

Fixed version (ground truth):
public static void main(String[] args){
  GWTShell shellMain=new GWTShell();
  if (shellMain.processArgs(args)) {
    shellMain.run();
  }
  System.exit(0);
}
Program: 54748
Project: 54748
Buggy source:
/** 
 * Sets up all the major aspects of running the shell graphically, including creating the main window and optionally starting the embedded Tomcat server.
 */
public void run(){
  try {
    BootStrapPlatform.applyPlatformHacks();
    if (!startUp()) {
      return;
    }
    BootStrapPlatform.maybeInitializeAWT();
    launchStartupUrls(getTopLogger());
    pumpEventLoop();
    shutDown();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Sets up all the major aspects of running the shell graphically, including creating the main window and optionally starting the embedded Tomcat server.
 */
public void run(){
  try {
    if (!startUp()) {
      return;
    }
    BootStrapPlatform.maybeInitializeAWT();
    launchStartupUrls(getTopLogger());
    pumpEventLoop();
    shutDown();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 54749
Project: 54749
Buggy source:
protected GWTShell(boolean forceServer,boolean noURLs){
  registerHandler(getArgHandlerPort());
  if (!forceServer) {
    registerHandler(new ArgHandlerNoServerFlag());
  }
  registerHandler(new ArgHandlerWhitelist());
  registerHandler(new ArgHandlerBlacklist());
  registerHandler(new ArgHandlerLogLevel(options));
  registerHandler(new ArgHandlerGenDir(options));
  registerHandler(new ArgHandlerExtraDir(options));
  if (!noURLs) {
    registerHandler(new ArgHandlerStartupURLsExtra());
  }
  registerHandler(new ArgHandlerOutDir(options));
  registerHandler(new ArgHandlerScriptStyle(options));
  registerHandler(new ArgHandlerEnableAssertions(options));
  registerHandler(new ArgHandlerDisableAggressiveOptimization(options));
}

Fixed version (ground truth):
protected GWTShell(boolean forceServer,boolean noURLs){
  BootStrapPlatform.init();
  BootStrapPlatform.applyPlatformHacks();
  registerHandler(getArgHandlerPort());
  if (!forceServer) {
    registerHandler(new ArgHandlerNoServerFlag());
  }
  registerHandler(new ArgHandlerWhitelist());
  registerHandler(new ArgHandlerBlacklist());
  registerHandler(new ArgHandlerLogLevel(options));
  registerHandler(new ArgHandlerGenDir(options));
  registerHandler(new ArgHandlerExtraDir(options));
  if (!noURLs) {
    registerHandler(new ArgHandlerStartupURLsExtra());
  }
  registerHandler(new ArgHandlerOutDir(options));
  registerHandler(new ArgHandlerScriptStyle(options));
  registerHandler(new ArgHandlerEnableAssertions(options));
  registerHandler(new ArgHandlerDisableAggressiveOptimization(options));
}
Program: 54750
Project: 54750
Buggy source:
/** 
 * Retrieves the JUnitShell. This should only be invoked during TestRunner execution of JUnit tests.
 */
private static JUnitShell getUnitTestShell(){
  if (unitTestShell == null) {
    BootStrapPlatform.init();
    BootStrapPlatform.applyPlatformHacks();
    unitTestShell=new JUnitShell();
    unitTestShell.lastLaunchFailed=true;
    String[] args=unitTestShell.synthesizeArgs();
    if (!unitTestShell.processArgs(args)) {
      throw new JUnitFatalLaunchException("String_Node_Str");
    }
    unitTestShell.messageQueue=new JUnitMessageQueue(unitTestShell.numClients);
    if (!unitTestShell.startUp()) {
      throw new JUnitFatalLaunchException("String_Node_Str");
    }
    unitTestShell.lastLaunchFailed=false;
  }
  return unitTestShell;
}

Fixed version (ground truth):
/** 
 * Retrieves the JUnitShell. This should only be invoked during TestRunner execution of JUnit tests.
 */
private static JUnitShell getUnitTestShell(){
  if (unitTestShell == null) {
    unitTestShell=new JUnitShell();
    unitTestShell.lastLaunchFailed=true;
    String[] args=unitTestShell.synthesizeArgs();
    if (!unitTestShell.processArgs(args)) {
      throw new JUnitFatalLaunchException("String_Node_Str");
    }
    unitTestShell.messageQueue=new JUnitMessageQueue(unitTestShell.numClients);
    if (!unitTestShell.startUp()) {
      throw new JUnitFatalLaunchException("String_Node_Str");
    }
    unitTestShell.lastLaunchFailed=false;
  }
  return unitTestShell;
}
Program: 54751
Project: 54751
Buggy source:
/** 
 * Returns <code>true</code>if the object is an instance of EventListener and the object belongs to this module.
 */
protected static boolean isMyListener(Object object){
  return object instanceof com.google.gwt.user.client.EventListener && !(object instanceof JavaScriptObject);
}

Fixed version (ground truth):
/** 
 * Returns <code>true</code>if the object is an instance of EventListener and the object belongs to this module.
 */
protected static boolean isMyListener(Object object){
  return !(object instanceof JavaScriptObject) && (object instanceof com.google.gwt.user.client.EventListener);
}
Program: 54752
Project: 54752
Buggy source:
@Override public boolean add(E o){
  return map.put(o,this) == null;
}

Fixed version (ground truth):
@Override public boolean add(E o){
  return map.put(o,Boolean.FALSE) == null;
}
Program: 54753
Project: 54753
Buggy source:
/** 
 * Used to wrap subset maps in a new TreeSet.
 * @param map map to use for backing store
 */
private TreeSet(SortedMap<E,Object> map){
  this.map=map;
}

Fixed version (ground truth):
/** 
 * Used to wrap subset maps in a new TreeSet.
 * @param map map to use for backing store
 */
private TreeSet(SortedMap<E,Boolean> map){
  this.map=map;
}
Program: 54754
Project: 54754
Buggy source:
public int compare(String a,String b){
  if (a == null || b == null) {
    throw new NullPointerException();
  }
  return b.compareTo(a);
}

Fixed version (ground truth):
public int compare(T a,T b){
  if (a == null || b == null) {
    throw new NullPointerException();
  }
  return b.compareTo(a);
}
Program: 54755
Project: 54755
Buggy source:
public static TreeMap<String,MarkerTypeTreeMap> createTreeMap(boolean defaultComparator){
  TreeMap<String,MarkerTypeTreeMap> map;
  if (defaultComparator) {
    map=new TreeMap<String,MarkerTypeTreeMap>();
  }
 else {
    map=new TreeMap<String,MarkerTypeTreeMap>(new ReverseSorter());
  }
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  return map;
}

Fixed version (ground truth):
public static TreeMap<String,MarkerTypeTreeMap> createTreeMap(boolean defaultComparator){
  TreeMap<String,MarkerTypeTreeMap> map;
  if (defaultComparator) {
    map=new TreeMap<String,MarkerTypeTreeMap>();
  }
 else {
    map=new TreeMap<String,MarkerTypeTreeMap>(new ReverseSorter<String>());
  }
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  map.put("String_Node_Str",new MarkerTypeTreeMap("String_Node_Str"));
  return map;
}
Program: 54756
Project: 54756
Buggy source:
/** 
 * Gets the text currently selected within this text box.
 * @return the selected text, or an empty string if none is selected
 */
public String getSelectedText(){
  int start=getCursorPos(), length=getSelectionLength();
  return getText().substring(start,start + length);
}

Fixed version (ground truth):
/** 
 * Gets the text currently selected within this text box.
 * @return the selected text, or an empty string if none is selected
 */
public String getSelectedText(){
  int start=getCursorPos();
  if (start < 0) {
    return "String_Node_Str";
  }
  int length=getSelectionLength();
  return getText().substring(start,start + length);
}
Program: 54757
Project: 54757
Buggy source:
/** 
 * Sets the cursor position.
 * @param pos the new cursor position
 */
public void setCursorPos(int pos){
  setSelectionRange(pos,0);
}

Fixed version (ground truth):
/** 
 * Sets the cursor position. This will only work when the widget is attached to the document and not hidden.
 * @param pos the new cursor position
 */
public void setCursorPos(int pos){
  setSelectionRange(pos,0);
}
Program: 54758
Project: 54758
Buggy source:
/** 
 * Selects all of the text in the box. This will only work when the widget is attached to the document.
 */
public void selectAll(){
  int length=getText().length();
  if (length > 0) {
    setSelectionRange(0,length);
  }
}

Fixed version (ground truth):
/** 
 * Selects all of the text in the box. This will only work when the widget is attached to the document and not hidden.
 */
public void selectAll(){
  int length=getText().length();
  if (length > 0) {
    setSelectionRange(0,length);
  }
}
Program: 54759
Project: 54759
Buggy source:
/** 
 * Sets the range of text to be selected. This will only work when the widget is attached to the document.
 * @param pos the position of the first character to be selected
 * @param length the number of characters to be selected
 */
public void setSelectionRange(int pos,int length){
  if (!isAttached()) {
    return;
  }
  if (length < 0) {
    throw new IndexOutOfBoundsException("String_Node_Str" + length);
  }
  if ((pos < 0) || (length + pos > getText().length())) {
    throw new IndexOutOfBoundsException("String_Node_Str" + pos + "String_Node_Str"+ (pos + length)+ "String_Node_Str"+ getText().length());
  }
  impl.setSelectionRange(getElement(),pos,length);
}

Fixed version (ground truth):
/** 
 * Sets the range of text to be selected. This will only work when the widget is attached to the document and not hidden.
 * @param pos the position of the first character to be selected
 * @param length the number of characters to be selected
 */
public void setSelectionRange(int pos,int length){
  if (!isAttached()) {
    return;
  }
  if (length < 0) {
    throw new IndexOutOfBoundsException("String_Node_Str" + length);
  }
  if ((pos < 0) || (length + pos > getText().length())) {
    throw new IndexOutOfBoundsException("String_Node_Str" + pos + "String_Node_Str"+ (pos + length)+ "String_Node_Str"+ getText().length());
  }
  impl.setSelectionRange(getElement(),pos,length);
}
Program: 54760
Project: 54760
Buggy source:
/** 
 * Tests various text selection methods in text area.
 */
public void disabledTestSelection(){
  TextBoxBase area=createTextBoxBase();
  assertEquals("String_Node_Str",area.getSelectedText());
  area.selectAll();
  assertEquals(0,area.getSelectionLength());
  try {
    area.setSelectionRange(0,1);
    fail("String_Node_Str");
  }
 catch (  IndexOutOfBoundsException e) {
  }
  RootPanel.get().add(area);
  area.setText("String_Node_Str");
  area.selectAll();
  assertEquals(1,area.getSelectionLength());
  area.setText("String_Node_Str");
  assertEquals(0,area.getSelectionLength());
  area.setText("String_Node_Str");
  area.setSelectionRange(2,2);
  assertEquals(2,area.getCursorPos());
  area.setSelectionRange(0,0);
}

Fixed version (ground truth):
/** 
 * Tests various text selection methods in text area.
 */
public void disabledTestSelection(){
  TextBoxBase area=createTextBoxBase();
  assertEquals("String_Node_Str",area.getSelectedText());
  area.selectAll();
  assertEquals(0,area.getSelectionLength());
  try {
    area.setSelectionRange(0,1);
    fail("String_Node_Str");
  }
 catch (  IndexOutOfBoundsException e) {
  }
  RootPanel.get().add(area);
  area.setText("String_Node_Str");
  area.selectAll();
  assertEquals(1,area.getSelectionLength());
  area.setText("String_Node_Str");
  assertEquals(0,area.getSelectionLength());
  area.setText("String_Node_Str");
  area.setSelectionRange(2,2);
  assertEquals(2,area.getCursorPos());
  area.setSelectionRange(0,0);
{
    TextBoxBase area2=createTextBoxBase();
    area2.setVisible(false);
    RootPanel.get().add(area2);
    area.selectAll();
  }
}
Program: 54761
Project: 54761
Buggy source:
public DefaultMuseum(){
  addIssue(new Issue1245());
  addIssue(new Issue1772());
  addIssue(new Issue1897());
  addIssue(new Issue1932());
  addIssue(new Issue2261());
  addIssue(new Issue2290());
  addIssue(new Issue2307());
  addIssue(new Issue2321());
  addIssue(new Issue2331());
  addIssue(new Issue2338());
  addIssue(new Issue2339());
  addIssue(new Issue2390());
  addIssue(new Issue1169());
  addIssue(new Issue2392());
  addIssue(new Issue2443());
  addIssue(new TestFireEvents());
}

Fixed version (ground truth):
public DefaultMuseum(){
  addIssue(new Issue1245());
  addIssue(new Issue1772());
  addIssue(new Issue1897());
  addIssue(new Issue1932());
  addIssue(new Issue2261());
  addIssue(new Issue2290());
  addIssue(new Issue2307());
  addIssue(new Issue2321());
  addIssue(new Issue2331());
  addIssue(new Issue2338());
  addIssue(new Issue2339());
  addIssue(new Issue2390());
  addIssue(new Issue1169());
  addIssue(new Issue2392());
  addIssue(new Issue2443());
  addIssue(new Issue2553());
  addIssue(new TreeVisuals());
  addIssue(new TestFireEvents());
}
Program: 54762
Project: 54762
Buggy source:
@Override void initializeClonableElements(){
  super.initializeClonableElements();
  if (GWT.isClient()) {
    DOM.setElementPropertyInt(BASE_INTERNAL_ELEM,"String_Node_Str",0);
    DOM.setElementPropertyInt(BASE_INTERNAL_ELEM,"String_Node_Str",0);
    BASE_INTERNAL_ELEM.getStyle().setPropertyPx("String_Node_Str",3);
    DOM.setStyleAttribute(BASE_BARE_ELEM,"String_Node_Str","String_Node_Str");
    DOM.setStyleAttribute(BASE_BARE_ELEM,"String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
@Override void initializeClonableElements(){
  super.initializeClonableElements();
  if (GWT.isClient()) {
    DOM.setStyleAttribute(BASE_BARE_ELEM,"String_Node_Str","String_Node_Str");
    DOM.setStyleAttribute(BASE_BARE_ELEM,"String_Node_Str","String_Node_Str");
  }
}
Program: 54763
Project: 54763
Buggy source:
public void onMouseUp(Widget sender,int x,int y){
  dragging=false;
  DOM.releaseCapture(caption.getElement());
}

Fixed version (ground truth):
public void onMouseUp(Widget sender,int x,int y){
  dragging=false;
  DOM.releaseCapture(getElement());
}
Program: 54764
Project: 54764
Buggy source:
public void onMouseDown(Widget sender,int x,int y){
  dragging=true;
  DOM.setCapture(caption.getElement());
  dragStartX=x;
  dragStartY=y;
}

Fixed version (ground truth):
public void onMouseDown(Widget sender,int x,int y){
  dragging=true;
  DOM.setCapture(getElement());
  dragStartX=x;
  dragStartY=y;
}
Program: 54765
Project: 54765
Buggy source:
/** 
 * Creates an empty dialog box specifying its "auto-hide" property. It should not be shown until its child widget has been added using  {@link #add(Widget)}.
 * @param autoHide <code>true</code> if the dialog should be automaticallyhidden when the user clicks outside of it
 * @param modal <code>true</code> if keyboard and mouse events for widgetsnot contained by the dialog should be ignored
 */
public DialogBox(boolean autoHide,boolean modal){
  super(autoHide,modal,"String_Node_Str");
  Element td=getCellElement(0,1);
  DOM.appendChild(td,caption.getElement());
  adopt(caption);
  caption.setStyleName("String_Node_Str");
  caption.addMouseListener(this);
  setStyleName(DEFAULT_STYLENAME);
}

Fixed version (ground truth):
/** 
 * Creates an empty dialog box specifying its "auto-hide" property. It should not be shown until its child widget has been added using  {@link #add(Widget)}.
 * @param autoHide <code>true</code> if the dialog should be automaticallyhidden when the user clicks outside of it
 * @param modal <code>true</code> if keyboard and mouse events for widgetsnot contained by the dialog should be ignored
 */
public DialogBox(boolean autoHide,boolean modal){
  super(autoHide,modal,"String_Node_Str");
  Element td=getCellElement(0,1);
  DOM.appendChild(td,caption.getElement());
  adopt(caption);
  caption.setStyleName("String_Node_Str");
  mouseListeners.add(this);
  setStyleName(DEFAULT_STYLENAME);
  sinkEvents(Event.MOUSEEVENTS);
}