nus-yam/ex-repair huggingface dataset:
Program: 54655
Project: 54655
Buggy source:
/** 
 * Hides the popup and detaches it from the page. This has no effect if it is not currently showing.
 * @param autoClosed the value that will be passed to{@link CloseHandler#onClose(CloseEvent)} when the popup is closed
 */
public void hide(boolean autoClosed){
  if (!isShowing()) {
    return;
  }
  cleanup();
  resizeAnimation.setState(false);
  CloseEvent.fire(this,this,autoClosed);
}

Fixed version (ground truth):
/** 
 * Hides the popup and detaches it from the page. This has no effect if it is not currently showing.
 * @param autoClosed the value that will be passed to{@link CloseHandler#onClose(CloseEvent)} when the popup is closed
 */
public void hide(boolean autoClosed){
  if (!isShowing()) {
    return;
  }
  setState(false,true);
  CloseEvent.fire(this,this,autoClosed);
}
Program: 54656
Project: 54656
Buggy source:
/** 
 * Open or close the content. This method always called immediately after the PopupPanel showing state has changed, so we base the animation on the current state.
 * @param showing true if the popup is showing, false if not
 */
public void setState(boolean showing){
  cancel();
  boolean animate=curPanel.isAnimationEnabled;
  if (curPanel.animType != AnimationType.CENTER && !showing) {
    animate=false;
  }
  this.showing=showing;
  if (animate) {
    if (showing) {
      DOM.setStyleAttribute(curPanel.getElement(),"String_Node_Str","String_Node_Str");
      if (curPanel.topPosition != -1) {
        curPanel.setPopupPosition(curPanel.leftPosition,curPanel.topPosition);
      }
      impl.setClip(curPanel.getElement(),getRectString(0,0,0,0));
      RootPanel.get().add(curPanel);
      impl.onShow(curPanel.getElement());
    }
    DeferredCommand.addCommand(new Command(){
      public void execute(){
        run(ANIMATION_DURATION);
      }
    }
);
  }
 else {
    onInstantaneousRun();
  }
}

Fixed version (ground truth):
/** 
 * Set the showing state of the popup. If maybeAnimate is true, the animation will be used to set the state. If it is false, the animation will be cancelled.
 * @param showing the new state
 * @param maybeAnimate true to possibly run the animation
 */
private void setState(boolean showing,boolean maybeAnimate){
  if (maybeAnimate) {
    resizeAnimation.setState(showing);
  }
 else {
    resizeAnimation.cancel();
  }
  this.showing=showing;
  if (showing) {
    nativePreviewHandlerRegistration=Event.addNativePreviewHandler(new NativePreviewHandler(){
      public void onPreviewNativeEvent(      NativePreviewEvent event){
        previewNativeEvent(event);
      }
    }
);
  }
 else   if (nativePreviewHandlerRegistration != null) {
    nativePreviewHandlerRegistration.removeHandler();
    nativePreviewHandlerRegistration=null;
  }
}
Program: 54657
Project: 54657
Buggy source:
protected void onPreviewNativeEvent(NativePreviewEvent event){
  if (event.isFirstHandler() && !onEventPreview(Event.as(event.getNativeEvent()))) {
    event.cancel();
  }
}

Fixed version (ground truth):
public void onPreviewNativeEvent(NativePreviewEvent event){
  previewNativeEvent(event);
}
Program: 54658
Project: 54658
Buggy source:
public static int deepHashCode(Object[] a){
  if (a == null) {
    return 0;
  }
  int hashCode=1;
  for (int i=0, n=a.length; i < n; ++i) {
    Object obj=a[i];
    int hash;
    if (obj instanceof Object[]) {
      hash=deepHashCode((Object[])obj);
    }
 else     if (obj instanceof boolean[]) {
      hash=hashCode((boolean[])obj);
    }
 else     if (obj instanceof byte[]) {
      hash=hashCode((byte[])obj);
    }
 else     if (obj instanceof char[]) {
      hash=hashCode((char[])obj);
    }
 else     if (obj instanceof short[]) {
      hash=hashCode((short[])obj);
    }
 else     if (obj instanceof int[]) {
      hash=hashCode((int[])obj);
    }
 else     if (obj instanceof long[]) {
      hash=hashCode((long[])obj);
    }
 else     if (obj instanceof float[]) {
      hash=hashCode((float[])obj);
    }
 else     if (obj instanceof double[]) {
      hash=hashCode((double[])obj);
    }
 else {
      hash=obj.hashCode();
    }
    hashCode=(31 * hashCode + hash) | 0;
  }
  return hashCode;
}

Fixed version (ground truth):
public static int deepHashCode(Object[] a){
  if (a == null) {
    return 0;
  }
  int hashCode=1;
  for (int i=0, n=a.length; i < n; ++i) {
    Object obj=a[i];
    int hash;
    if (obj instanceof Object[]) {
      hash=deepHashCode((Object[])obj);
    }
 else     if (obj instanceof boolean[]) {
      hash=hashCode((boolean[])obj);
    }
 else     if (obj instanceof byte[]) {
      hash=hashCode((byte[])obj);
    }
 else     if (obj instanceof char[]) {
      hash=hashCode((char[])obj);
    }
 else     if (obj instanceof short[]) {
      hash=hashCode((short[])obj);
    }
 else     if (obj instanceof int[]) {
      hash=hashCode((int[])obj);
    }
 else     if (obj instanceof long[]) {
      hash=hashCode((long[])obj);
    }
 else     if (obj instanceof float[]) {
      hash=hashCode((float[])obj);
    }
 else     if (obj instanceof double[]) {
      hash=hashCode((double[])obj);
    }
 else     if (obj != null) {
      hash=obj.hashCode();
    }
 else {
      hash=0;
    }
    hashCode=(31 * hashCode + hash) | 0;
  }
  return hashCode;
}
Program: 54659
Project: 54659
Buggy source:
/** 
 * Checks or unchecks the text box, firing   {@link ValueChangeEvent} ifappropriate. <p> Note that this <em>does not</em> set the value property of the checkbox input element wrapped by this widget. For access to that property, see {@link #setFormValue(String)}
 * @param value true to check, false to uncheck. Must not be null.
 * @param fireEvents If true, and value has changed, fire a{@link ValueChangeEvent}
 * @thows IllegalArgumentException if value is null
 */
public void setValue(Boolean value,boolean fireEvents){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (value.equals(getValue())) {
    return;
  }
  inputElem.setChecked(value);
  inputElem.setDefaultChecked(value);
  if (fireEvents) {
    ValueChangeEvent.fire(this,value);
  }
}

Fixed version (ground truth):
/** 
 * Checks or unchecks the text box, firing   {@link ValueChangeEvent} ifappropriate. <p> Note that this <em>does not</em> set the value property of the checkbox input element wrapped by this widget. For access to that property, see {@link #setFormValue(String)}
 * @param value true to check, false to uncheck. Must not be null.
 * @param fireEvents If true, and value has changed, fire a{@link ValueChangeEvent}
 * @thows IllegalArgumentException if value is null
 */
public void setValue(Boolean value,boolean fireEvents){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Boolean oldValue=getValue();
  inputElem.setChecked(value);
  inputElem.setDefaultChecked(value);
  if (value.equals(oldValue)) {
    return;
  }
  if (fireEvents) {
    ValueChangeEvent.fire(this,value);
  }
}
Program: 54663
Project: 54663
Buggy source:
private void onSelection(TreeItem item,boolean fireEvents,boolean moveFocus){
  if (item == root) {
    return;
  }
  if (curSelection != null) {
    curSelection.setSelected(false);
  }
  curSelection=item;
  if (moveFocus && curSelection != null) {
    moveFocus();
    curSelection.setSelected(true);
    if (fireEvents) {
      SelectionEvent.fire(this,curSelection);
    }
  }
}

Fixed version (ground truth):
private void onSelection(TreeItem item,boolean fireEvents,boolean moveFocus){
  if (item == root) {
    return;
  }
  if (curSelection != null) {
    curSelection.setSelected(false);
  }
  curSelection=item;
  if (curSelection != null) {
    if (moveFocus) {
      moveFocus();
    }
    curSelection.setSelected(true);
    if (fireEvents) {
      SelectionEvent.fire(this,curSelection);
    }
  }
}
Program: 54666
Project: 54666
Buggy source:
private Map<String,Resource> rerootResourcePaths(Map<String,AbstractResource> newInternalMap){
  Map<String,Resource> externalMap;
  externalMap=new HashMap<String,Resource>();
  for (  AbstractResource resource : newInternalMap.values()) {
    String path=resource.getPath();
    if (externalMap.get(path) instanceof ResourceWrapper) {
      continue;
    }
    int hitCount=0;
    for (    PathPrefix pathPrefix : pathPrefixSet.values()) {
      if (pathPrefix.allows(path)) {
        assert(path.startsWith(pathPrefix.getPrefix()));
        if (pathPrefix.shouldReroot()) {
          String rerootedPath=pathPrefix.getRerootedPath(path);
          Resource exposed=exposedResourceMap.get(rerootedPath);
          if (exposed instanceof ResourceWrapper) {
            ResourceWrapper exposedWrapper=(ResourceWrapper)exposed;
            if (exposedWrapper.resource == resource) {
              externalMap.put(rerootedPath,exposedWrapper);
              ++hitCount;
              break;
            }
          }
          AbstractResource wrapper=new ResourceWrapper(rerootedPath,resource);
          externalMap.put(rerootedPath,wrapper);
          ++hitCount;
        }
 else {
          externalMap.put(path,resource);
          ++hitCount;
        }
      }
    }
    assert(hitCount > 0);
  }
  return externalMap;
}

Fixed version (ground truth):
private Map<String,Resource> rerootResourcePaths(Map<String,AbstractResource> newInternalMap){
  Map<String,Resource> externalMap;
  externalMap=new HashMap<String,Resource>();
  for (  AbstractResource resource : newInternalMap.values()) {
    String path=resource.getPath();
    if (externalMap.get(path) instanceof ResourceWrapper) {
      continue;
    }
    int hitCount=0;
    for (    PathPrefix pathPrefix : pathPrefixSet.values()) {
      if (pathPrefix.allows(path)) {
        assert(path.startsWith(pathPrefix.getPrefix()));
        if (pathPrefix.shouldReroot()) {
          String rerootedPath=pathPrefix.getRerootedPath(path);
          if (externalMap.get(rerootedPath) instanceof ResourceWrapper) {
            ++hitCount;
            break;
          }
          Resource exposed=exposedResourceMap.get(rerootedPath);
          if (exposed instanceof ResourceWrapper) {
            ResourceWrapper exposedWrapper=(ResourceWrapper)exposed;
            if (exposedWrapper.resource == resource) {
              externalMap.put(rerootedPath,exposedWrapper);
              ++hitCount;
              break;
            }
          }
          AbstractResource wrapper=new ResourceWrapper(rerootedPath,resource);
          externalMap.put(rerootedPath,wrapper);
          ++hitCount;
        }
 else {
          externalMap.put(path,resource);
          ++hitCount;
        }
      }
    }
    assert(hitCount > 0);
  }
  return externalMap;
}
Program: 54667
Project: 54667
Buggy source:
protected void assertPathNotIncluded(Set<AbstractResource> resources,String path){
  assertNull(findResourceWithPath(resources,path));
}

Fixed version (ground truth):
protected void assertPathNotIncluded(Set<AbstractResource> resources,String path){
  assertNull("String_Node_Str" + path + "String_Node_Str"+ resources,findResourceWithPath(resources,path));
}
Program: 54668
Project: 54668
Buggy source:
protected void assertPathIncluded(Set<AbstractResource> resources,String path){
  assertNotNull(findResourceWithPath(resources,path));
}

Fixed version (ground truth):
protected void assertPathIncluded(Set<AbstractResource> resources,String path){
  assertNotNull("String_Node_Str" + path + "String_Node_Str"+ resources,findResourceWithPath(resources,path));
}
Program: 54669
Project: 54669
Buggy source:
private void testResourceModification(ClassPathEntry cpe1,ClassPathEntry cpe2){
  TreeLogger logger=createTestTreeLogger();
  MOCK_CPE0 cpe0=new MOCK_CPE0();
  MOCK_CPE3 cpe3=new MOCK_CPE3();
  ResourceOracleImpl oracle=createResourceOracle(cpe0,cpe1,cpe2,cpe3);
{
    oracle.refresh(logger);
    ResourceOracleSnapshot s=new ResourceOracleSnapshot(oracle);
    s.assertPathIncluded("String_Node_Str",cpe1);
    s.assertPathIncluded("String_Node_Str",cpe1);
  }
  cpe0.addResource("String_Node_Str");
  cpe3.addResource("String_Node_Str");
{
    oracle.refresh(logger);
    ResourceOracleSnapshot s=new ResourceOracleSnapshot(oracle);
    s.assertPathIncluded("String_Node_Str",cpe0);
    s.assertPathIncluded("String_Node_Str",cpe1);
  }
{
    ResourceOracleSnapshot before=new ResourceOracleSnapshot(oracle);
    before.assertCollectionsConsistent(9);
    cpe3.updateResource("String_Node_Str");
    ResourceOracleSnapshot after=refreshAndSnapshot(logger,oracle);
    after.assertSameCollections(before);
  }
{
    ResourceOracleSnapshot before=new ResourceOracleSnapshot(oracle);
    before.assertCollectionsConsistent(9);
    cpe0.updateResource("String_Node_Str");
    ResourceOracleSnapshot after=refreshAndSnapshot(logger,oracle);
    after.assertNotSameCollections(before);
  }
}

Fixed version (ground truth):
private void testResourceModification(ClassPathEntry cpe1,ClassPathEntry cpe2){
  TreeLogger logger=createTestTreeLogger();
  MOCK_CPE0 cpe0=new MOCK_CPE0();
  MOCK_CPE3 cpe3=new MOCK_CPE3();
  ResourceOracleImpl oracle=createResourceOracle(cpe0,cpe1,cpe2,cpe3);
{
    ResourceOracleSnapshot s=refreshAndSnapshot(logger,oracle);
    s.assertPathIncluded("String_Node_Str",cpe1);
    s.assertPathIncluded("String_Node_Str",cpe1);
  }
  cpe0.addResource("String_Node_Str");
  cpe3.addResource("String_Node_Str");
{
    ResourceOracleSnapshot s=refreshAndSnapshot(logger,oracle);
    s.assertPathIncluded("String_Node_Str",cpe0);
    s.assertPathIncluded("String_Node_Str",cpe1);
  }
{
    ResourceOracleSnapshot before=new ResourceOracleSnapshot(oracle);
    before.assertCollectionsConsistent(9);
    cpe3.updateResource("String_Node_Str");
    ResourceOracleSnapshot after=refreshAndSnapshot(logger,oracle);
    after.assertSameCollections(before);
  }
{
    ResourceOracleSnapshot before=new ResourceOracleSnapshot(oracle);
    before.assertCollectionsConsistent(9);
    cpe0.updateResource("String_Node_Str");
    ResourceOracleSnapshot after=refreshAndSnapshot(logger,oracle);
    after.assertNotSameCollections(before);
  }
}
Program: 54670
Project: 54670
Buggy source:
private void testReadingResource(ClassPathEntry cpe1,ClassPathEntry cpe2) throws IOException {
  TreeLogger logger=createTestTreeLogger();
  ResourceOracleImpl oracle=createResourceOracle(cpe1,cpe2);
  oracle.refresh(logger);
  ResourceOracleSnapshot s=new ResourceOracleSnapshot(oracle);
  s.assertCollectionsConsistent(9);
  s.assertPathIncluded("String_Node_Str",cpe1);
  s.assertPathIncluded("String_Node_Str",cpe2);
{
    AbstractResource res=s.findResourceWithPath("String_Node_Str");
    BufferedReader rdr=null;
    try {
      InputStream is=res.openContents();
      assertNotNull(is);
      rdr=new BufferedReader(new InputStreamReader(is));
      assertTrue(rdr.readLine().indexOf("String_Node_Str") >= 0);
    }
  finally {
      Utility.close(rdr);
    }
  }
{
    AbstractResource res=s.findResourceWithPath("String_Node_Str");
    BufferedReader rdr=null;
    try {
      InputStream is=res.openContents();
      assertNotNull(is);
      rdr=new BufferedReader(new InputStreamReader(is));
      assertTrue(rdr.readLine().indexOf("String_Node_Str") >= 0);
    }
  finally {
      Utility.close(rdr);
    }
  }
{
  }
}

Fixed version (ground truth):
private void testReadingResource(ClassPathEntry cpe1,ClassPathEntry cpe2) throws IOException {
  TreeLogger logger=createTestTreeLogger();
  ResourceOracleImpl oracle=createResourceOracle(cpe1,cpe2);
  ResourceOracleSnapshot s=refreshAndSnapshot(logger,oracle);
  s.assertCollectionsConsistent(9);
  s.assertPathIncluded("String_Node_Str",cpe1);
  s.assertPathIncluded("String_Node_Str",cpe2);
{
    AbstractResource res=s.findResourceWithPath("String_Node_Str");
    BufferedReader rdr=null;
    try {
      InputStream is=res.openContents();
      assertNotNull(is);
      rdr=new BufferedReader(new InputStreamReader(is));
      assertTrue(rdr.readLine().indexOf("String_Node_Str") >= 0);
    }
  finally {
      Utility.close(rdr);
    }
  }
{
    AbstractResource res=s.findResourceWithPath("String_Node_Str");
    BufferedReader rdr=null;
    try {
      InputStream is=res.openContents();
      assertNotNull(is);
      rdr=new BufferedReader(new InputStreamReader(is));
      assertTrue(rdr.readLine().indexOf("String_Node_Str") >= 0);
    }
  finally {
      Utility.close(rdr);
    }
  }
{
  }
}
Program: 54671
Project: 54671
Buggy source:
/** 
 * Creates an array of class path entries, setting up each one with a well-known set of client prefixes.
 * @param entries
 * @return
 */
private ResourceOracleImpl createResourceOracle(ClassPathEntry... entries){
  PathPrefixSet pps=new PathPrefixSet();
  pps.add(new PathPrefix("String_Node_Str",null));
  pps.add(new PathPrefix("String_Node_Str",null));
  pps.add(new PathPrefix("String_Node_Str",null));
  pps.add(new PathPrefix("String_Node_Str",null));
  List<ClassPathEntry> classPath=new ArrayList<ClassPathEntry>();
  for (  ClassPathEntry entry : entries) {
    classPath.add(entry);
  }
  ResourceOracleImpl oracle=new ResourceOracleImpl(classPath);
  oracle.setPathPrefixes(pps);
  return oracle;
}

Fixed version (ground truth):
/** 
 * Creates an array of class path entries, setting up each one with a well-known set of client prefixes.
 */
private ResourceOracleImpl createResourceOracle(ClassPathEntry... entries){
  PathPrefixSet pps=new PathPrefixSet();
  pps.add(new PathPrefix("String_Node_Str",null));
  pps.add(new PathPrefix("String_Node_Str",null));
  pps.add(new PathPrefix("String_Node_Str",null));
  pps.add(new PathPrefix("String_Node_Str",null));
  List<ClassPathEntry> classPath=new ArrayList<ClassPathEntry>();
  for (  ClassPathEntry entry : entries) {
    classPath.add(entry);
  }
  ResourceOracleImpl oracle=new ResourceOracleImpl(classPath);
  oracle.setPathPrefixes(pps);
  return oracle;
}
Program: 54672
Project: 54672
Buggy source:
/** 
 * Compare two methods based on name and original argument types  {@link JMethod#getOriginalParamTypes()}. Note that nothing special is done here regarding methods with type parameters in their argument lists. The caller must be careful that this level of matching is sufficient.
 */
private static boolean methodsDoMatch(JMethod method1,JMethod method2){
  if (method1.isStatic() || method2.isStatic()) {
    return false;
  }
  if (!method1.getName().equals(method2.getName())) {
    return false;
  }
  List<JType> params1=method1.getOriginalParamTypes();
  List<JType> params2=method2.getOriginalParamTypes();
  int params1size=params1.size();
  if (params1size != params2.size()) {
    return false;
  }
  for (int i=0; i < params1size; ++i) {
    if (params1.get(i) != params2.get(i)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Compare two methods based on name and original argument types  {@link JMethod#getOriginalParamTypes()}. Note that nothing special is done here regarding methods with type parameters in their argument lists. The caller must be careful that this level of matching is sufficient.
 */
public static boolean methodsDoMatch(JMethod method1,JMethod method2){
  if (method1.isStatic() || method2.isStatic()) {
    return false;
  }
  if (!method1.getName().equals(method2.getName())) {
    return false;
  }
  List<JType> params1=method1.getOriginalParamTypes();
  List<JType> params2=method2.getOriginalParamTypes();
  int params1size=params1.size();
  if (params1size != params2.size()) {
    return false;
  }
  for (int i=0; i < params1size; ++i) {
    if (params1.get(i) != params2.get(i)) {
      return false;
    }
  }
  return true;
}
Program: 54673
Project: 54673
Buggy source:
public void testUninstantiableAccess(){
  UninstantiableType u=null;
  try {
    accessUninstantiableField(u);
    fail("String_Node_Str");
  }
 catch (  JavaScriptException expected) {
  }
  try {
    accessUninstantiableMethod(u);
    fail("String_Node_Str");
  }
 catch (  JavaScriptException expected) {
  }
  try {
    volatileUninstantiableType=(UninstantiableType)(new Object());
    fail("String_Node_Str");
  }
 catch (  ClassCastException expected) {
  }
  try {
    volatileInt=u.intField++;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileInt=u.intField--;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileInt=++u.intField;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileInt=--u.intField;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    u.intField=0;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileBoolean=u.intField == 0;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileBoolean=u.returnInt() == 0;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
}

Fixed version (ground truth):
public void testUninstantiableAccess(){
  UninstantiableType u=null;
  try {
    accessUninstantiableField(u);
    fail("String_Node_Str");
  }
 catch (  JavaScriptException expected) {
  }
  try {
    accessUninstantiableMethod(u);
    fail("String_Node_Str");
  }
 catch (  JavaScriptException expected) {
  }
  try {
    volatileUninstantiableType=(UninstantiableType)(new Object());
    fail("String_Node_Str");
  }
 catch (  ClassCastException expected) {
  }
  try {
    volatileInt=u.intField++;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileInt=u.intField--;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileInt=++u.intField;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileInt=--u.intField;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    u.intField=0;
  }
 catch (  Exception expected) {
  }
  try {
    volatileBoolean=u.intField == 0;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
  try {
    volatileBoolean=u.returnInt() == 0;
    fail("String_Node_Str");
  }
 catch (  Exception expected) {
  }
}
Program: 54675
Project: 54675
Buggy source:
/** 
 * Closes the menu bar.
 * @deprecated use {@link #addCloseHandler(CloseHandler)} instead.
 */
@Deprecated public void onPopupClosed(PopupPanel sender,boolean autoClosed){
  if (autoClosed) {
    closeAllParents();
  }
  onHide();
  CloseEvent.fire(MenuBar.this,sender);
  shownChildMenu=null;
  popup=null;
}

Fixed version (ground truth):
/** 
 * Closes the menu bar.
 * @deprecated use {@link #addCloseHandler(CloseHandler)} instead.
 */
@Deprecated public void onPopupClosed(PopupPanel sender,boolean autoClosed){
  if (autoClosed) {
    closeAllParents();
  }
  onHide();
  CloseEvent.fire(MenuBar.this,sender);
  shownChildMenu=null;
  popup=null;
  if (parentMenu != null && parentMenu.popup != null) {
    parentMenu.popup.setPreviewingAllNativeEvents(true);
  }
}
Program: 54676
Project: 54676
Buggy source:
public void onError(Widget sender){
  fail("String_Node_Str" + image.getUrl() + "String_Node_Str");
}

Fixed version (ground truth):
public void onError(Widget sender){
  ++firedError;
}
Program: 54677
Project: 54677
Buggy source:
public void onLoad(LoadEvent event){
  if (++onLoadEventCount == 4) {
    if (listener.isFinished()) {
      finishTest();
    }
 else {
      fail("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void onLoad(Widget sender){
  ++firedLoad;
}
Program: 54678
Project: 54678
Buggy source:
/** 
 * Perform an initial hosted mode link, without overwriting newer or unmodified files in the output folder.
 * @param logger the logger to use
 * @param module the module to link
 * @param includePublicFiles if <code>true</code>, include public files inthe link, otherwise do not include them
 * @throws UnableToCompleteException
 */
private void link(TreeLogger logger,ModuleDef module,boolean includePublicFiles) throws UnableToCompleteException {
  File moduleOutDir=new File(options.getWarDir(),module.getName());
  File moduleExtraDir=(options.getExtraDir() == null) ? null : new File(options.getExtraDir(),module.getName());
  StandardLinkerContext linkerStack=new StandardLinkerContext(logger,module,options);
  linkerStacks.put(module.getName(),linkerStack);
  if (!includePublicFiles) {
    linkerStack.getArtifacts().clear();
  }
  ArtifactSet artifacts=linkerStack.invokeLink(logger);
  linkerStack.produceOutputDirectory(logger,artifacts,moduleOutDir,moduleExtraDir);
}

Fixed version (ground truth):
/** 
 * Perform an initial hosted mode link, without overwriting newer or unmodified files in the output folder.
 * @param logger the logger to use
 * @param module the module to link
 * @param includePublicFiles if <code>true</code>, include public files inthe link, otherwise do not include them
 * @throws UnableToCompleteException
 */
private void link(TreeLogger logger,ModuleDef module) throws UnableToCompleteException {
  File moduleOutDir=new File(options.getWarDir(),module.getName());
  File moduleExtraDir=(options.getExtraDir() == null) ? null : new File(options.getExtraDir(),module.getName());
  StandardLinkerContext linkerStack=new StandardLinkerContext(logger,module,options);
  linkerStacks.put(module.getName(),linkerStack);
  ArtifactSet artifacts=linkerStack.invokeLink(logger);
  linkerStack.produceOutputDirectory(logger,artifacts,moduleOutDir,moduleExtraDir);
}
Program: 54679
Project: 54679
Buggy source:
@Override protected boolean doStartup(){
  if (!super.doStartup()) {
    return false;
  }
  tempWorkDir=options.getWorkDir() == null;
  if (tempWorkDir) {
    try {
      options.setWorkDir(Utility.makeTemporaryDirectory(null,"String_Node_Str"));
    }
 catch (    IOException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
      return false;
    }
  }
  for (  String moduleName : options.getModuleNames()) {
    TreeLogger loadLogger=getTopLogger().branch(TreeLogger.DEBUG,"String_Node_Str" + moduleName);
    try {
      ModuleDef module=loadModule(loadLogger,moduleName,false);
      String[] servletPaths=module.getServletPaths();
      if (servletPaths.length > 0) {
        loadLogger.log(TreeLogger.WARN,"String_Node_Str" + moduleName + "String_Node_Str");
      }
      link(loadLogger,module,false);
    }
 catch (    UnableToCompleteException e) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override protected boolean doStartup(){
  if (!super.doStartup()) {
    return false;
  }
  tempWorkDir=options.getWorkDir() == null;
  if (tempWorkDir) {
    try {
      options.setWorkDir(Utility.makeTemporaryDirectory(null,"String_Node_Str"));
    }
 catch (    IOException e) {
      System.err.println("String_Node_Str");
      e.printStackTrace();
      return false;
    }
  }
  for (  String moduleName : options.getModuleNames()) {
    TreeLogger loadLogger=getTopLogger().branch(TreeLogger.DEBUG,"String_Node_Str" + moduleName);
    try {
      ModuleDef module=loadModule(loadLogger,moduleName,false);
      String[] servletPaths=module.getServletPaths();
      if (servletPaths.length > 0) {
        loadLogger.log(TreeLogger.WARN,"String_Node_Str" + moduleName + "String_Node_Str");
      }
      link(loadLogger,module);
    }
 catch (    UnableToCompleteException e) {
      return false;
    }
  }
  return true;
}
Program: 54680
Project: 54680
Buggy source:
@Override protected boolean initModule(String moduleName){
  ModuleDef module=modulesByName.get(moduleName);
  if (module == null) {
    getTopLogger().log(TreeLogger.WARN,"String_Node_Str" + moduleName + "String_Node_Str");
    return false;
  }
  try {
    boolean shouldRefreshPage=false;
    if (module.isGwtXmlFileStale()) {
      shouldRefreshPage=true;
      module=loadModule(getTopLogger(),module.getCanonicalName(),false);
    }
    link(getTopLogger(),module,true);
    return shouldRefreshPage;
  }
 catch (  UnableToCompleteException e) {
    return false;
  }
}

Fixed version (ground truth):
@Override protected boolean initModule(String moduleName){
  ModuleDef module=modulesByName.get(moduleName);
  if (module == null) {
    getTopLogger().log(TreeLogger.WARN,"String_Node_Str" + moduleName + "String_Node_Str");
    return false;
  }
  try {
    boolean shouldRefreshPage=false;
    if (module.isGwtXmlFileStale()) {
      shouldRefreshPage=true;
      module=loadModule(getTopLogger(),module.getCanonicalName(),false);
    }
    link(getTopLogger(),module);
    return shouldRefreshPage;
  }
 catch (  UnableToCompleteException e) {
    return false;
  }
}
Program: 54681
Project: 54681
Buggy source:
/** 
 * Overridden to defer the call to super.sinkEvents until the first time this widget is attached to the dom, as a performance enhancement. Subclasses wishing to customize sinkEvents can preserve this deferred sink behavior by putting their implementation behind a check of   {@link #isOrWasAttached()}: <pre>  {@literal @}Override public void sinkEvents(int eventBitsToAdd) { if (isOrWasAttached()) { /  {@literal *} customized sink code goes here {@literal *}/ } else { super.sinkEvents(eventBitsToAdd); } } </pre>
 */
@Override public void sinkEvents(int eventBitsToAdd){
  if (isOrWasAttached()) {
    super.sinkEvents(eventBitsToAdd);
  }
 else {
    eventsToSink|=eventBitsToAdd;
  }
}

Fixed version (ground truth):
/** 
 * Overridden to defer the call to super.sinkEvents until the first time this widget is attached to the dom, as a performance enhancement. Subclasses wishing to customize sinkEvents can preserve this deferred sink behavior by putting their implementation behind a check of <code>isOrWasAttached()</code>: <pre>  {@literal @}Override public void sinkEvents(int eventBitsToAdd) { if (isOrWasAttached()) { /  {@literal *} customized sink code goes here {@literal *}/ } else { super.sinkEvents(eventBitsToAdd); } } </pre>
 */
@Override public void sinkEvents(int eventBitsToAdd){
  if (isOrWasAttached()) {
    super.sinkEvents(eventBitsToAdd);
  }
 else {
    eventsToSink|=eventBitsToAdd;
  }
}
Program: 54682
Project: 54682
Buggy source:
/** 
 * Move the tree focus to the specified selected item.
 */
private void moveFocus(){
  HasFocus focusableWidget=curSelection.getFocusableWidget();
  if (focusableWidget != null) {
    focusableWidget.setFocus(true);
    DOM.scrollIntoView(((Widget)focusableWidget).getElement());
  }
 else {
    Element selectedElem=curSelection.getContentElem();
    int containerLeft=getAbsoluteLeft();
    int containerTop=getAbsoluteTop();
    int left=DOM.getAbsoluteLeft(selectedElem) - containerLeft;
    int top=DOM.getAbsoluteTop(selectedElem) - containerTop;
    int width=DOM.getElementPropertyInt(selectedElem,"String_Node_Str");
    int height=DOM.getElementPropertyInt(selectedElem,"String_Node_Str");
    if (width == 0 || height == 0) {
      DOM.setIntStyleAttribute(focusable,"String_Node_Str",0);
      DOM.setIntStyleAttribute(focusable,"String_Node_Str",0);
      return;
    }
    DOM.setStyleAttribute(focusable,"String_Node_Str",left + "String_Node_Str");
    DOM.setStyleAttribute(focusable,"String_Node_Str",top + "String_Node_Str");
    DOM.setStyleAttribute(focusable,"String_Node_Str",width + "String_Node_Str");
    DOM.setStyleAttribute(focusable,"String_Node_Str",height + "String_Node_Str");
    DOM.scrollIntoView(focusable);
    updateAriaAttributes();
    setFocus(true);
  }
}

Fixed version (ground truth):
/** 
 * Move the tree focus to the specified selected item.
 */
private void moveFocus(){
  Focusable focusableWidget=curSelection.getFocusable();
  if (focusableWidget != null) {
    focusableWidget.setFocus(true);
    DOM.scrollIntoView(((Widget)focusableWidget).getElement());
  }
 else {
    Element selectedElem=curSelection.getContentElem();
    int containerLeft=getAbsoluteLeft();
    int containerTop=getAbsoluteTop();
    int left=DOM.getAbsoluteLeft(selectedElem) - containerLeft;
    int top=DOM.getAbsoluteTop(selectedElem) - containerTop;
    int width=DOM.getElementPropertyInt(selectedElem,"String_Node_Str");
    int height=DOM.getElementPropertyInt(selectedElem,"String_Node_Str");
    if (width == 0 || height == 0) {
      DOM.setIntStyleAttribute(focusable,"String_Node_Str",0);
      DOM.setIntStyleAttribute(focusable,"String_Node_Str",0);
      return;
    }
    DOM.setStyleAttribute(focusable,"String_Node_Str",left + "String_Node_Str");
    DOM.setStyleAttribute(focusable,"String_Node_Str",top + "String_Node_Str");
    DOM.setStyleAttribute(focusable,"String_Node_Str",width + "String_Node_Str");
    DOM.setStyleAttribute(focusable,"String_Node_Str",height + "String_Node_Str");
    DOM.scrollIntoView(focusable);
    updateAriaAttributes();
    setFocus(true);
  }
}
Program: 54683
Project: 54683
Buggy source:
/** 
 * Returns the widget, if any, that should be focused on if this TreeItem is selected.
 * @return widget to be focused.
 */
protected HasFocus getFocusableWidget(){
  Widget w=getWidget();
  if (w instanceof HasFocus) {
    return (HasFocus)w;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Returns the widget, if any, that should be focused on if this TreeItem is selected.
 * @deprecated use {@link #getFocusable()} instead
 * @return widget to be focused.
 */
@Deprecated protected HasFocus getFocusableWidget(){
  Widget w=getWidget();
  if (w instanceof HasFocus) {
    return (HasFocus)w;
  }
 else {
    return null;
  }
}
Program: 54684
Project: 54684
Buggy source:
/** 
 * Gets the mouse x-position on the user's display.
 * @return the mouse x-position
 * @throws AssertionError if event type is not one of{@link Event#MOUSEEVENTS},   {@link Event#ONMOUSEWHEEL},  {@link Event#ONCLICK},   {@link Event#ONDBLCLICK}, or  {@link Event#ONCONTEXTMENU}
 */
public final int getScreenX(){
  return DOM.eventGetScreenX(this);
}

Fixed version (ground truth):
/** 
 * Gets the mouse x-position on the user's display.
 * @return the mouse x-position
 */
public final int getScreenX(){
  return DOM.eventGetScreenX(this);
}
Program: 54685
Project: 54685
Buggy source:
@Override public void onBrowserEvent(Event event){
  widget.onBrowserEvent(event);
}

Fixed version (ground truth):
@Override public void onBrowserEvent(Event event){
  super.onBrowserEvent(event);
  widget.onBrowserEvent(event);
}
Program: 54686
Project: 54686
Buggy source:
@Override public void onBrowserEvent(Event event){
  if (DOM.eventGetType(event) == Event.ONCLICK) {
    super.onBrowserEvent(event);
    if (impl.handleAsClick(event)) {
      History.newItem(getTargetHistoryToken());
      DOM.eventPreventDefault(event);
    }
  }
}

Fixed version (ground truth):
@Override public void onBrowserEvent(Event event){
  super.onBrowserEvent(event);
  if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
    History.newItem(getTargetHistoryToken());
    DOM.eventPreventDefault(event);
  }
}
Program: 54687
Project: 54687
Buggy source:
@Override public void onBrowserEvent(Event event){
  super.onBrowserEvent(event);
  MenuItem item=findItem(DOM.eventGetTarget(event));
switch (DOM.eventGetType(event)) {
case Event.ONCLICK:
{
      FocusPanel.impl.focus(getElement());
      if (item != null) {
        doItemAction(item,true);
      }
      break;
    }
case Event.ONMOUSEOVER:
{
    if (item != null) {
      itemOver(item,true);
    }
    break;
  }
case Event.ONMOUSEOUT:
{
  if (item != null) {
    itemOver(null,true);
  }
  break;
}
case Event.ONFOCUS:
{
selectFirstItemIfNoneSelected();
break;
}
case Event.ONKEYDOWN:
{
int keyCode=DOM.eventGetKeyCode(event);
switch (keyCode) {
case KeyCodes.KEY_LEFT:
if (LocaleInfo.getCurrentLocale().isRTL()) {
  moveToNextItem();
}
 else {
  moveToPrevItem();
}
eatEvent(event);
break;
case KeyCodes.KEY_RIGHT:
if (LocaleInfo.getCurrentLocale().isRTL()) {
moveToPrevItem();
}
 else {
moveToNextItem();
}
eatEvent(event);
break;
case KeyCodes.KEY_UP:
moveUp();
eatEvent(event);
break;
case KeyCodes.KEY_DOWN:
moveDown();
eatEvent(event);
break;
case KeyCodes.KEY_ESCAPE:
closeAllParents();
eatEvent(event);
break;
case KeyCodes.KEY_ENTER:
if (!selectFirstItemIfNoneSelected()) {
doItemAction(selectedItem,true);
eatEvent(event);
}
break;
}
break;
}
}
}

Fixed version (ground truth):
@Override public void onBrowserEvent(Event event){
  MenuItem item=findItem(DOM.eventGetTarget(event));
switch (DOM.eventGetType(event)) {
case Event.ONCLICK:
{
      FocusPanel.impl.focus(getElement());
      if (item != null) {
        doItemAction(item,true);
      }
      break;
    }
case Event.ONMOUSEOVER:
{
    if (item != null) {
      itemOver(item,true);
    }
    break;
  }
case Event.ONMOUSEOUT:
{
  if (item != null) {
    itemOver(null,true);
  }
  break;
}
case Event.ONFOCUS:
{
selectFirstItemIfNoneSelected();
break;
}
case Event.ONKEYDOWN:
{
int keyCode=DOM.eventGetKeyCode(event);
switch (keyCode) {
case KeyCodes.KEY_LEFT:
if (LocaleInfo.getCurrentLocale().isRTL()) {
  moveToNextItem();
}
 else {
  moveToPrevItem();
}
eatEvent(event);
break;
case KeyCodes.KEY_RIGHT:
if (LocaleInfo.getCurrentLocale().isRTL()) {
moveToPrevItem();
}
 else {
moveToNextItem();
}
eatEvent(event);
break;
case KeyCodes.KEY_UP:
moveUp();
eatEvent(event);
break;
case KeyCodes.KEY_DOWN:
moveDown();
eatEvent(event);
break;
case KeyCodes.KEY_ESCAPE:
closeAllParents();
eatEvent(event);
break;
case KeyCodes.KEY_ENTER:
if (!selectFirstItemIfNoneSelected()) {
doItemAction(selectedItem,true);
eatEvent(event);
}
break;
}
break;
}
}
super.onBrowserEvent(event);
}
Program: 54688
Project: 54688
Buggy source:
@Override public void onBrowserEvent(Event event){
  if (DOM.eventGetType(event) == Event.ONCLICK) {
    Element target=DOM.eventGetTarget(event);
    int index=findDividerIndex(target);
    if (index != -1) {
      showStack(index);
    }
  }
}

Fixed version (ground truth):
@Override public void onBrowserEvent(Event event){
  if (DOM.eventGetType(event) == Event.ONCLICK) {
    Element target=DOM.eventGetTarget(event);
    int index=findDividerIndex(target);
    if (index != -1) {
      showStack(index);
    }
  }
  super.onBrowserEvent(event);
}
Program: 54689
Project: 54689
Buggy source:
@Override protected final Type<BlurHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<BlurHandler> getAssociatedType(){
  return TYPE;
}
Program: 54690
Project: 54690
Buggy source:
@Override protected final Type<ChangeHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<ChangeHandler> getAssociatedType(){
  return TYPE;
}
Program: 54691
Project: 54691
Buggy source:
@Override protected final Type<ClickHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<ClickHandler> getAssociatedType(){
  return TYPE;
}
Program: 54692
Project: 54692
Buggy source:
@Override protected final Type<ContextMenuHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<ContextMenuHandler> getAssociatedType(){
  return TYPE;
}
Program: 54693
Project: 54693
Buggy source:
@Override protected abstract DomEvent.Type<H> getAssociatedType();

Fixed version (ground truth):
@Override public abstract DomEvent.Type<H> getAssociatedType();
Program: 54694
Project: 54694
Buggy source:
@Override protected final Type<DoubleClickHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<DoubleClickHandler> getAssociatedType(){
  return TYPE;
}
Program: 54695
Project: 54695
Buggy source:
@Override protected final Type<ErrorHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<ErrorHandler> getAssociatedType(){
  return TYPE;
}
Program: 54696
Project: 54696
Buggy source:
@Override protected final Type<FocusHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<FocusHandler> getAssociatedType(){
  return TYPE;
}
Program: 54697
Project: 54697
Buggy source:
@Override protected final Type<KeyDownHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<KeyDownHandler> getAssociatedType(){
  return TYPE;
}
Program: 54698
Project: 54698
Buggy source:
@Override protected final Type<KeyPressHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<KeyPressHandler> getAssociatedType(){
  return TYPE;
}
Program: 54699
Project: 54699
Buggy source:
@Override protected final Type<KeyUpHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<KeyUpHandler> getAssociatedType(){
  return TYPE;
}
Program: 54700
Project: 54700
Buggy source:
@Override protected final Type<LoadHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<LoadHandler> getAssociatedType(){
  return TYPE;
}
Program: 54701
Project: 54701
Buggy source:
@Override protected final Type<LoseCaptureHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<LoseCaptureHandler> getAssociatedType(){
  return TYPE;
}
Program: 54702
Project: 54702
Buggy source:
@Override protected final Type<MouseDownHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<MouseDownHandler> getAssociatedType(){
  return TYPE;
}
Program: 54703
Project: 54703
Buggy source:
@Override protected final Type<MouseMoveHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<MouseMoveHandler> getAssociatedType(){
  return TYPE;
}
Program: 54704
Project: 54704
Buggy source:
@Override protected final Type<MouseOutHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<MouseOutHandler> getAssociatedType(){
  return TYPE;
}
Program: 54705
Project: 54705
Buggy source:
@Override protected final Type<MouseOverHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<MouseOverHandler> getAssociatedType(){
  return TYPE;
}
Program: 54706
Project: 54706
Buggy source:
@Override protected final Type<MouseUpHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<MouseUpHandler> getAssociatedType(){
  return TYPE;
}
Program: 54707
Project: 54707
Buggy source:
@Override protected final Type<MouseWheelHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<MouseWheelHandler> getAssociatedType(){
  return TYPE;
}
Program: 54708
Project: 54708
Buggy source:
@Override protected final Type<ScrollHandler> getAssociatedType(){
  return TYPE;
}

Fixed version (ground truth):
@Override public final Type<ScrollHandler> getAssociatedType(){
  return TYPE;
}
Program: 54709
Project: 54709
Buggy source:
/** 
 * Gets the result text of the form submission.
 * @return the result html, or <code>null</code> if there was an errorreading it
 * @tip The result html can be <code>null</code> as a result of submitting aform to a different domain.
 */
public String getResults(){
  return resultHtml;
}

Fixed version (ground truth):
/** 
 * Gets the result text of the form submission.
 * @return the result html, or <code>null</code> if there was an error readingit
 * @tip The result html can be <code>null</code> as a result of submitting aform to a different domain.
 */
public String getResults(){
  return resultHtml;
}
Program: 54710
Project: 54710
Buggy source:
/** 
 * Fired when the popup is closed.
 * @param sender popup being closed.
 * @param autoClosed <code>true</code> if the popup was automaticallyclosed; <code>false</code> if it was closed programmatically.
 */
@Deprecated void onPopupClosed(PopupPanel sender,boolean autoClosed);

Fixed version (ground truth):
/** 
 * Fired when the popup is closed.
 * @param sender popup being closed.
 * @param autoClosed <code>true</code> if the popup was automatically closed;<code>false</code> if it was closed programmatically.
 */
@Deprecated void onPopupClosed(PopupPanel sender,boolean autoClosed);
Program: 54711
Project: 54711
Buggy source:
/** 
 * Fires a popup closed event to all listeners.
 * @param sender the widget sending the event.
 * @param autoClosed <code>true</code> if the popup was automaticallyclosed; <code>false</code> if it was closed programmatically.
 */
@Deprecated public void firePopupClosed(PopupPanel sender,boolean autoClosed){
  for (  PopupListener listener : this) {
    listener.onPopupClosed(sender,autoClosed);
  }
}

Fixed version (ground truth):
/** 
 * Fires a popup closed event to all listeners.
 * @param sender the widget sending the event.
 * @param autoClosed <code>true</code> if the popup was automatically closed;<code>false</code> if it was closed programmatically.
 */
@Deprecated public void firePopupClosed(PopupPanel sender,boolean autoClosed){
  for (  PopupListener listener : this) {
    listener.onPopupClosed(sender,autoClosed);
  }
}
Program: 54712
Project: 54712
Buggy source:
/** 
 * Gets the style associated with a date (does not include styles set via   {@link #addTransientStyleToDates}).
 * @param date the date
 * @return the styles associated with this date
 */
public String getStyleOfDate(Date date){
  return styler.getStyleName(date);
}

Fixed version (ground truth):
/** 
 * Gets the style associated with a date (does not include styles set via  {@link #addTransientStyleToDates}).
 * @param date the date
 * @return the styles associated with this date
 */
public String getStyleOfDate(Date date){
  return styler.getStyleName(date);
}
Program: 54713
Project: 54713
Buggy source:
/** 
 * Refreshes all components of this date picker.
 */
protected final void refreshAll(){
  highlighted=null;
  getModel().refresh();
  getView().refresh();
  getMonthSelector().refresh();
  ShowRangeEvent.fire(this,getFirstDate(),getLastDate());
}

Fixed version (ground truth):
/** 
 * Refreshes all components of this date picker.
 */
protected final void refreshAll(){
  highlighted=null;
  getModel().refresh();
  getView().refresh();
  getMonthSelector().refresh();
  if (isAttached()) {
    ShowRangeEvent.fire(this,getFirstDate(),getLastDate());
  }
}
Program: 54714
Project: 54714
Buggy source:
/** 
 * Adds the given style name to the specified dates, which must be visible.  This is only set until the next time the DatePicker is refreshed.
 */
public final void addTransientStyleToDates(String styleName,Iterable<Date> dates){
  for (  Date d : dates) {
    addTransientStyleToDates(styleName,d);
  }
}

Fixed version (ground truth):
/** 
 * Adds the given style name to the specified dates, which must be visible. This is only set until the next time the DatePicker is refreshed.
 */
public final void addTransientStyleToDates(String styleName,Iterable<Date> dates){
  for (  Date d : dates) {
    addTransientStyleToDates(styleName,d);
  }
}