nus-yam/ex-repair huggingface dataset:
Program: 54372
Project: 54372
Buggy source:
private void writeClassSerializationStatements(){
  if (typesSentToBrowser.maybeEnhanced(serializableClass) && typesSentFromBrowser.maybeEnhanced(serializableClass)) {
    sourceWriter.println("String_Node_Str" + WEAK_MAPPING_CLASS_NAME + "String_Node_Str");
  }
  for (  JField serializableField : serializableFields) {
    JType fieldType=serializableField.getType();
    String writeMethodName=Shared.getStreamWriteMethodNameFor(fieldType);
    sourceWriter.print("String_Node_Str");
    sourceWriter.print(writeMethodName);
    sourceWriter.print("String_Node_Str");
    if (needsAccessorMethods(serializableField)) {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(Shared.capitalize(serializableField.getName()));
      sourceWriter.println("String_Node_Str");
    }
 else {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(serializableField.getName());
      sourceWriter.println("String_Node_Str");
    }
  }
  sourceWriter.println();
  JClassType superClass=serializableClass.getSuperclass();
  if (superClass != null && (typesSentFromBrowser.isSerializable(superClass) || typesSentToBrowser.isSerializable(superClass))) {
    String fieldSerializerName=SerializationUtils.getFieldSerializerName(typeOracle,superClass);
    sourceWriter.print(fieldSerializerName);
    sourceWriter.println("String_Node_Str");
  }
}

Fixed version (ground truth):
private void writeClassSerializationStatements(){
  if (serializableClass.isEnhanced()) {
    sourceWriter.println("String_Node_Str" + WEAK_MAPPING_CLASS_NAME + "String_Node_Str");
  }
  for (  JField serializableField : serializableFields) {
    JType fieldType=serializableField.getType();
    String writeMethodName=Shared.getStreamWriteMethodNameFor(fieldType);
    sourceWriter.print("String_Node_Str");
    sourceWriter.print(writeMethodName);
    sourceWriter.print("String_Node_Str");
    if (needsAccessorMethods(serializableField)) {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(Shared.capitalize(serializableField.getName()));
      sourceWriter.println("String_Node_Str");
    }
 else {
      sourceWriter.print("String_Node_Str");
      sourceWriter.print(serializableField.getName());
      sourceWriter.println("String_Node_Str");
    }
  }
  sourceWriter.println();
  JClassType superClass=serializableClass.getSuperclass();
  if (superClass != null && (typesSentFromBrowser.isSerializable(superClass) || typesSentToBrowser.isSerializable(superClass))) {
    String fieldSerializerName=SerializationUtils.getFieldSerializerName(typeOracle,superClass);
    sourceWriter.print(fieldSerializerName);
    sourceWriter.println("String_Node_Str");
  }
}
Program: 54376
Project: 54376
Buggy source:
public SerializableTypeOracleImpl(Set<JClassType> serializableTypes,Set<JClassType> possiblyInstantiatedTypes,Set<JClassType> possiblyEnhancedTypes){
  serializableTypesSet=serializableTypes;
  this.possiblyInstantiatedTypes=possiblyInstantiatedTypes;
  this.possiblyEnhancedTypes=possiblyEnhancedTypes;
}

Fixed version (ground truth):
public SerializableTypeOracleImpl(Set<JClassType> serializableTypes,Set<JClassType> possiblyInstantiatedTypes){
  serializableTypesSet=serializableTypes;
  this.possiblyInstantiatedTypes=possiblyInstantiatedTypes;
}
Program: 54377
Project: 54377
Buggy source:
/** 
 * Set any created BrowserChannelServers to ignore remote deaths. <p>This is most commonly wanted by JUnitShell.
 * @param ignoreRemoteDeath
 */
public void setIgnoreRemoteDeath(boolean ignoreRemoteDeath){
  this.ignoreRemoteDeath=ignoreRemoteDeath;
}

Fixed version (ground truth):
/** 
 * Set any created BrowserChannelServers to ignore remote deaths. <p> This is most commonly wanted by JUnitShell.
 * @param ignoreRemoteDeath
 */
public void setIgnoreRemoteDeath(boolean ignoreRemoteDeath){
  this.ignoreRemoteDeath=ignoreRemoteDeath;
}
Program: 54379
Project: 54379
Buggy source:
private void terminateDueToException(Exception e){
  pendingRequestMap.blockAdds(e);
}

Fixed version (ground truth):
private void terminateDueToException(Exception e){
  pendingRequestMap.blockAdds(e);
  if (terminationCallback != null) {
    terminationCallback.onTermination(e);
  }
}
Program: 54380
Project: 54380
Buggy source:
public RemoteUI(String host,int port,String clientId,int webServerPort,int browserChannelPort){
  try {
    this.clientId=clientId;
    this.browserChannelPort=browserChannelPort;
    this.webServerPort=webServerPort;
    Socket socket=new Socket(host,port);
    devModeRequestProcessor=new DevModeServiceRequestProcessor(this);
    transport=new MessageTransport(socket.getInputStream(),socket.getOutputStream(),devModeRequestProcessor);
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public RemoteUI(String host,int port,String clientId,int webServerPort,int browserChannelPort){
  try {
    this.clientId=clientId;
    this.browserChannelPort=browserChannelPort;
    this.webServerPort=webServerPort;
    Socket socket=new Socket(host,port);
    socket.setKeepAlive(true);
    socket.setTcpNoDelay(true);
    devModeRequestProcessor=new DevModeServiceRequestProcessor(this);
    transport=new MessageTransport(socket.getInputStream(),socket.getOutputStream(),devModeRequestProcessor,this);
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 54382
Project: 54382
Buggy source:
@Override protected void doCommitBranch(AbstractTreeLogger childBeingCommitted,Type type,String msg,Throwable caught,HelpInfo helpInfo){
  SwingTreeLogger commitChild=(SwingTreeLogger)childBeingCommitted;
  LogEvent logEvent=new LogEvent(commitChild,true,commitChild.getBranchedIndex(),type,msg,caught,helpInfo);
  commitChild.treeNode=new DefaultMutableTreeNode(logEvent);
  addUpdate(logEvent);
}

Fixed version (ground truth):
@Override protected void doCommitBranch(AbstractTreeLogger childBeingCommitted,Type type,String msg,Throwable caught,HelpInfo helpInfo){
}
Program: 54383
Project: 54383
Buggy source:
/** 
 * Constructs the top-level TreeItemLogger.
 * @param panel
 */
public SwingTreeLogger(SwingLoggerPanel panel){
  this.panel=panel;
  treeNode=(DefaultMutableTreeNode)panel.treeModel.getRoot();
}

Fixed version (ground truth):
/** 
 * Used to create a branch treelogger, supplying a tree node to use rather than the panel's.
 * @param panel
 * @param treeNode
 */
private SwingTreeLogger(SwingLoggerPanel panel,DefaultMutableTreeNode treeNode){
  this.panel=panel;
  this.treeNode=treeNode;
}
Program: 54384
Project: 54384
Buggy source:
private int findInsertionPoint(DefaultMutableTreeNode parent,int index){
  int high=parent.getChildCount() - 1;
  if (high < 0) {
    return 0;
  }
  int low=0;
  while (low <= high) {
    final int mid=low + ((high - low) >> 1);
    DefaultMutableTreeNode midChild=(DefaultMutableTreeNode)parent.getChildAt(mid);
    final Object userObject=midChild.getUserObject();
    int compIdx=-1;
    if (userObject instanceof LogEvent) {
      LogEvent event=(LogEvent)userObject;
      compIdx=event.index;
    }
    if (compIdx < index) {
      low=mid + 1;
    }
 else     if (compIdx > index) {
      high=mid - 1;
    }
 else {
      return mid;
    }
  }
  return low;
}

Fixed version (ground truth):
private int findInsertionPoint(DefaultMutableTreeNode parentNode,int index){
  int high=parentNode.getChildCount() - 1;
  if (high < 0) {
    return 0;
  }
  int low=0;
  while (low <= high) {
    final int mid=low + ((high - low) >> 1);
    DefaultMutableTreeNode midChild=(DefaultMutableTreeNode)parentNode.getChildAt(mid);
    final Object userObject=midChild.getUserObject();
    int compIdx=-1;
    if (userObject instanceof LogEvent) {
      LogEvent event=(LogEvent)userObject;
      compIdx=event.index;
    }
    if (compIdx < index) {
      low=mid + 1;
    }
 else     if (compIdx > index) {
      high=mid - 1;
    }
 else {
      return mid;
    }
  }
  return low;
}
Program: 54385
Project: 54385
Buggy source:
/** 
 * Update this log event's inherited priority, which is the highest priority of this event and any child events.
 * @param inheritedPriority
 * @return true if the priority was upgraded
 */
public boolean updateInheritedPriority(Type inheritedPriority){
  if (this.inheritedPriority.isLowerPriorityThan(inheritedPriority)) {
    this.inheritedPriority=inheritedPriority;
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Update this log event's inherited priority, which is the highest priority of this event and any child events.
 * @param childPriority
 * @return true if the priority was upgraded
 */
public boolean updateInheritedPriority(Type childPriority){
  if (this.inheritedPriority.isLowerPriorityThan(childPriority)) {
    this.inheritedPriority=childPriority;
    return true;
  }
  return false;
}
Program: 54386
Project: 54386
Buggy source:
public LogEvent(SwingTreeLogger logger,boolean isBranchCommit,int index,Type type,String message,Throwable caught,HelpInfo helpInfo){
  this.childLogger=logger;
  this.isBranchCommit=isBranchCommit;
  this.index=index;
  this.type=type;
  this.inheritedPriority=type;
  this.message=message;
  this.helpInfo=helpInfo;
  this.timestamp=new Date();
  this.exceptionDetail=AbstractTreeLogger.getStackTraceAsString(caught);
  this.exceptionName=AbstractTreeLogger.getExceptionName(caught);
}

Fixed version (ground truth):
/** 
 * Create a log event.
 * @param logger
 * @param isBranchCommit
 * @param index
 * @param type
 * @param message
 * @param caught
 * @param helpInfo
 */
public LogEvent(SwingTreeLogger logger,boolean isBranchCommit,int index,Type type,String message,Throwable caught,HelpInfo helpInfo){
  this.childLogger=logger;
  this.isBranchCommit=isBranchCommit;
  this.index=index;
  this.type=type;
  this.inheritedPriority=type;
  this.message=message;
  this.helpInfo=helpInfo;
  this.timestamp=new Date();
  this.exceptionDetail=AbstractTreeLogger.getStackTraceAsString(caught);
  this.exceptionName=AbstractTreeLogger.getExceptionName(caught);
}
Program: 54387
Project: 54387
Buggy source:
public Type getInheritedPriority(){
  return inheritedPriority;
}

Fixed version (ground truth):
/** 
 * @return the inherited priority, which will be the highest priority ofthis event or any child.
 */
public Type getInheritedPriority(){
  return inheritedPriority;
}
Program: 54388
Project: 54388
Buggy source:
@Override protected AbstractTreeLogger doBranch(){
  SwingTreeLogger newLogger=new SwingTreeLogger(panel);
  return newLogger;
}

Fixed version (ground truth):
@Override protected AbstractTreeLogger doBranch(){
  SwingTreeLogger newLogger=new SwingTreeLogger(panel,new DefaultMutableTreeNode(null));
  return newLogger;
}
Program: 54390
Project: 54390
Buggy source:
public void animate(int duration,final Layout.AnimationCallback callback){
  animCmd.schedule(duration,callback);
}

Fixed version (ground truth):
public void animate(int duration,final Layout.AnimationCallback callback){
  layoutCmd.schedule(duration,callback);
}
Program: 54391
Project: 54391
Buggy source:
public void forceLayout(){
  animCmd.cancel();
  doLayout();
  layout.layout();
  onResize();
}

Fixed version (ground truth):
public void forceLayout(){
  layoutCmd.cancel();
  doLayout();
  layout.layout();
  onResize();
}
Program: 54392
Project: 54392
Buggy source:
/** 
 * Creates an empty dock panel.
 * @param unit the unit to be used for layout
 */
public DockLayoutPanel(Unit unit){
  this.unit=unit;
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  animCmd=new DockAnimateCommand(layout);
}

Fixed version (ground truth):
/** 
 * Creates an empty dock panel.
 * @param unit the unit to be used for layout
 */
public DockLayoutPanel(Unit unit){
  this.unit=unit;
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  layoutCmd=new DockAnimateCommand(layout);
}
Program: 54393
Project: 54393
Buggy source:
/** 
 * Creates a new command for the given layout object
 * @param layout
 */
public LayoutCommand(Layout layout){
  this.layout=layout;
}

Fixed version (ground truth):
/** 
 * Creates a new command for the given layout object.
 * @param layout
 */
public LayoutCommand(Layout layout){
  this.layout=layout;
}
Program: 54394
Project: 54394
Buggy source:
public void animate(final int duration,final AnimationCallback callback){
  animCmd.schedule(duration,callback);
}

Fixed version (ground truth):
public void animate(final int duration,final AnimationCallback callback){
  layoutCmd.schedule(duration,callback);
}
Program: 54395
Project: 54395
Buggy source:
/** 
 * Creates an empty layout panel.
 */
public LayoutPanel(){
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  animCmd=new LayoutCommand(layout);
}

Fixed version (ground truth):
/** 
 * Creates an empty layout panel.
 */
public LayoutPanel(){
  setElement(Document.get().createDivElement());
  layout=new Layout(getElement());
  layoutCmd=new LayoutCommand(layout);
}
Program: 54396
Project: 54396
Buggy source:
public void forceLayout(){
  animCmd.cancel();
  layout.layout();
  onResize();
}

Fixed version (ground truth):
public void forceLayout(){
  layoutCmd.cancel();
  layout.layout();
  onResize();
}
Program: 54397
Project: 54397
Buggy source:
public void parse(XMLElement elem,String fieldName,JClassType type,UiBinderWriter writer) throws UnableToCompleteException {
  for (  XMLElement child : elem.consumeChildElements()) {
    String ns=child.getNamespaceUri();
    String tagName=child.getLocalName();
    if (ns.equals(elem.getNamespaceUri()) && localTagNameIsCell(tagName)) {
      XMLElement widget=child.consumeSingleChildElement();
      String childFieldName=writer.parseElementToField(widget);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
      parseCellAttributes(child,fieldName,childFieldName,writer);
    }
 else {
      String childFieldName=writer.parseElementToField(child);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
    }
  }
}

Fixed version (ground truth):
public void parse(XMLElement elem,String fieldName,JClassType type,UiBinderWriter writer) throws UnableToCompleteException {
  for (  XMLElement child : elem.consumeChildElements()) {
    String ns=child.getNamespaceUri();
    String tagName=child.getLocalName();
    if (ns != null && ns.equals(elem.getNamespaceUri()) && localTagNameIsCell(tagName)) {
      XMLElement widget=child.consumeSingleChildElement();
      String childFieldName=writer.parseElementToField(widget);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
      parseCellAttributes(child,fieldName,childFieldName,writer);
    }
 else {
      if (!writer.isWidgetElement(child)) {
        writer.die("String_Node_Str",elem,elem.getPrefix(),CELL_TAG.toLowerCase(),child);
      }
      String childFieldName=writer.parseElementToField(child);
      writer.addStatement("String_Node_Str",fieldName,childFieldName);
    }
  }
}
Program: 54398
Project: 54398
Buggy source:
/** 
 * Parses the root UiBinder element, and kicks off the parsing of the rest of the document.
 */
public String parse(XMLElement elem) throws UnableToCompleteException {
  findResources(elem);
  messagesWriter.findMessagesConfig(elem);
  XMLElement uiRoot=elem.consumeSingleChildElement();
  return writer.parseElementToField(uiRoot);
}

Fixed version (ground truth):
/** 
 * Parses the root UiBinder element, and kicks off the parsing of the rest of the document.
 */
public String parse(XMLElement elem) throws UnableToCompleteException {
  if (!writer.isBinderElement(elem)) {
    writer.die("String_Node_Str" + "String_Node_Str" + "String_Node_Str",elem.getPrefix(),elem.getLocalName(),UiBinderWriter.BINDER_URI,elem.getPrefix());
  }
  if (!TAG.equals(elem.getLocalName())) {
    writer.die("String_Node_Str",elem.getPrefix(),TAG,elem);
  }
  findResources(elem);
  messagesWriter.findMessagesConfig(elem);
  XMLElement uiRoot=elem.consumeSingleChildElement();
  return writer.parseElementToField(uiRoot);
}
Program: 54399
Project: 54399
Buggy source:
/** 
 * Consumes a single child element, ignoring any text nodes and throwing an exception if no child is found, or more than one child element is found.
 * @throws UnableToCompleteException on no children, or too many
 */
public XMLElement consumeSingleChildElement() throws UnableToCompleteException {
  XMLElement ret=null;
  for (  XMLElement child : consumeChildElements()) {
    if (ret != null) {
      writer.die("String_Node_Str" + "String_Node_Str",getLocalName(),ret,child);
    }
    ret=child;
  }
  if (ret == null) {
    writer.die("String_Node_Str",this);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Consumes a single child element, ignoring any text nodes and throwing an exception if no child is found, or more than one child element is found.
 * @throws UnableToCompleteException on no children, or too many
 */
public XMLElement consumeSingleChildElement() throws UnableToCompleteException {
  XMLElement ret=null;
  for (  XMLElement child : consumeChildElements()) {
    if (ret != null) {
      writer.die("String_Node_Str" + "String_Node_Str",this,ret,child);
    }
    ret=child;
  }
  if (ret == null) {
    writer.die("String_Node_Str",this);
  }
  return ret;
}
Program: 54400
Project: 54400
Buggy source:
/** 
 * Removes the given handler from the specified event type. Normally, applications should call   {@link HandlerRegistration#removeHandler()}instead.
 * @param < H > handler type
 * @param type the event type
 * @param handler the handler
 * @deprecated This method is likely to be removed along with "listener"interfaces in a future release. If you have a reason it should be retained beyond that time, please add your comments to GWT <a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=3102">issue 3102</a>
 */
@Deprecated public <H extends EventHandler>void removeHandler(GwtEvent.Type<H> type,final H handler){
  if (firingDepth > 0) {
    enqueueRemove(type,handler);
  }
 else {
    doRemove(type,handler);
  }
}

Fixed version (ground truth):
/** 
 * Removes the given handler from the specified event type. Normally, applications should call   {@link HandlerRegistration#removeHandler()}instead.
 * @param < H > handler type
 * @param type the event type
 * @param handler the handler
 */
public <H extends EventHandler>void removeHandler(GwtEvent.Type<H> type,final H handler){
  if (firingDepth > 0) {
    enqueueRemove(type,handler);
  }
 else {
    doRemove(type,handler);
  }
}
Program: 54401
Project: 54401
Buggy source:
@SuppressWarnings("String_Node_Str") public void testRemoveHandlers(){
  HandlerManager manager=new HandlerManager("String_Node_Str");
  addHandlers(manager);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3,adaptor1);
  assertNotFired(click1,click2);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3);
  assertNotFired(adaptor1,click1,click2);
  reset();
  manager.fireEvent(new ClickEvent(){
  }
);
  assertNotFired(mouse1,mouse2,mouse3);
  assertFired(click1,click2,adaptor1);
}

Fixed version (ground truth):
public void testRemoveHandlers(){
  HandlerManager manager=new HandlerManager("String_Node_Str");
  addHandlers(manager);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3,adaptor1);
  assertNotFired(click1,click2);
  manager.removeHandler(MouseDownEvent.getType(),adaptor1);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(mouse1,mouse2,mouse3);
  assertNotFired(adaptor1,click1,click2);
  reset();
  manager.fireEvent(new ClickEvent(){
  }
);
  assertNotFired(mouse1,mouse2,mouse3);
  assertFired(click1,click2,adaptor1);
}
Program: 54402
Project: 54402
Buggy source:
@SuppressWarnings("String_Node_Str") public void testConcurrentAddAfterRemoveIsNotClobbered(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  MouseDownHandler one=new MouseDownHandler(){
    public void onMouseDown(    MouseDownEvent event){
      manager.removeHandler(MouseDownEvent.getType(),mouse1);
      manager.addHandler(MouseDownEvent.getType(),mouse1);
      add(this);
    }
  }
;
  manager.addHandler(MouseDownEvent.getType(),one);
  if (!GWT.isScript()) {
    try {
      manager.fireEvent(new MouseDownEvent(){
      }
);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    return;
  }
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one,mouse1);
}

Fixed version (ground truth):
public void testConcurrentAddAfterRemoveIsNotClobbered(){
  final HandlerManager manager=new HandlerManager("String_Node_Str");
  MouseDownHandler one=new MouseDownHandler(){
    public void onMouseDown(    MouseDownEvent event){
      manager.removeHandler(MouseDownEvent.getType(),mouse1);
      manager.addHandler(MouseDownEvent.getType(),mouse1);
      add(this);
    }
  }
;
  manager.addHandler(MouseDownEvent.getType(),one);
  if (!GWT.isScript()) {
    try {
      manager.fireEvent(new MouseDownEvent(){
      }
);
      fail("String_Node_Str");
    }
 catch (    AssertionError e) {
    }
    return;
  }
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one);
  reset();
  manager.fireEvent(new MouseDownEvent(){
  }
);
  assertFired(one,mouse1);
}
Program: 54403
Project: 54403
Buggy source:
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult).}
 */
@Override protected String getModulePrefix(TreeLogger logger,LinkerContext context,String strongName) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}

Fixed version (ground truth):
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger,LinkerContext,CompilationResult)}.
 */
@Override protected String getModulePrefix(TreeLogger logger,LinkerContext context,String strongName) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}
Program: 54404
Project: 54404
Buggy source:
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult).}
 */
@Override protected String getCompilationExtension(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}

Fixed version (ground truth):
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger,LinkerContext,CompilationResult)}.
 */
@Override protected String getCompilationExtension(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}
Program: 54405
Project: 54405
Buggy source:
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger, LinkerContext, CompilationResult).}
 */
@Override protected String getModuleSuffix(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}

Fixed version (ground truth):
/** 
 * Unimplemented. Normally required by  {@link #doEmitCompilation(TreeLogger,LinkerContext,CompilationResult)}.
 */
@Override protected String getModuleSuffix(TreeLogger logger,LinkerContext context) throws UnableToCompleteException {
  throw new UnableToCompleteException();
}
Program: 54406
Project: 54406
Buggy source:
/** 
 * Returns a string where all URL component escape sequences have been converted back to their original character representations.
 * @param encodedURLComponent string containing encoded URL componentsequences
 * @return string with no encoded URL component encoded sequences
 * @throws NullPointerException if encodedURLComponent is <code>null</code>
 */
public static String decodeComponent(String encodedURLComponent){
  StringValidator.throwIfNull("String_Node_Str",encodedURLComponent);
  return decodeComponentImpl(encodedURLComponent);
}

Fixed version (ground truth):
/** 
 * Returns a string where all URL component escape sequences have been converted back to their original character representations.
 * @param encodedURLComponent string containing encoded URL componentsequences
 * @param fromQueryString if <code>true</code>, +'s will be turned intospaces, otherwise they'll be kept as-is.
 * @return string with no encoded URL component encoded sequences
 * @throws NullPointerException if encodedURLComponent is <code>null</code>
 */
public static String decodeComponent(String encodedURLComponent,boolean fromQueryString){
  StringValidator.throwIfNull("String_Node_Str",encodedURLComponent);
  return fromQueryString ? decodeComponentImpl(encodedURLComponent) : decodeComponentRawImpl(encodedURLComponent);
}
Program: 54407
Project: 54407
Buggy source:
/** 
 * Returns a string where all characters that are not valid for a URL component have been escaped. The escaping of a character is done by converting it into its UTF-8 encoding and then encoding each of the resulting bytes as a %xx hexadecimal escape sequence. <p> The following character sets are <em>not</em> escaped by this method: <ul> <li>ASCII digits or letters</li> <li>ASCII punctuation characters: <pre>- _ . ! ~ * ' ( )</pre></li> </ul> </p> <p> Notice that this method <em>does</em> encode the URL component delimiter characters:<blockquote> <pre> ; / ? : &amp; = + $ , # </pre> </blockquote> </p>
 * @param decodedURLComponent a string containing invalid URL characters
 * @return a string with all invalid URL characters escaped
 * @throws NullPointerException if decodedURLComponent is <code>null</code>
 */
public static String encodeComponent(String decodedURLComponent){
  StringValidator.throwIfNull("String_Node_Str",decodedURLComponent);
  return encodeComponentImpl(decodedURLComponent);
}

Fixed version (ground truth):
/** 
 * Returns a string where all characters that are not valid for a URL component have been escaped. The escaping of a character is done by converting it into its UTF-8 encoding and then encoding each of the resulting bytes as a %xx hexadecimal escape sequence. <p> The following character sets are <em>not</em> escaped by this method: <ul> <li>ASCII digits or letters</li> <li>ASCII punctuation characters: <pre>- _ . ! ~ * ' ( )</pre></li> </ul> </p> <p> Notice that this method <em>does</em> encode the URL component delimiter characters:<blockquote> <pre> ; / ? : &amp; = + $ , # </pre> </blockquote> </p>
 * @param decodedURLComponent a string containing invalid URL characters
 * @param queryStringSpaces if <code>true</code>, spaces will be encoded as +'s.
 * @return a string with all invalid URL characters escaped
 * @throws NullPointerException if decodedURLComponent is <code>null</code>
 */
public static String encodeComponent(String decodedURLComponent,boolean queryStringSpaces){
  StringValidator.throwIfNull("String_Node_Str",decodedURLComponent);
  return queryStringSpaces ? encodeComponentImpl(decodedURLComponent) : encodeComponentRawImpl(decodedURLComponent);
}
Program: 54408
Project: 54408
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.URL#decodeComponent(java.lang.String)}.
 */
public void testDecodeComponent(){
  try {
    URL.decodeComponent(null);
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  assertEquals("String_Node_Str",URL.decodeComponent("String_Node_Str"));
  assertEquals("String_Node_Str",URL.decodeComponent("String_Node_Str"));
  String actualURLComponent=URL.decodeComponent(ENCODED_URL_COMPONENT);
  assertEquals(DECODED_URL_COMPONENT,actualURLComponent);
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.URL#decodeComponent(java.lang.String)}.
 */
public void testDecodeComponent(){
  try {
    URL.decodeComponent(null);
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  assertEquals("String_Node_Str",URL.decodeComponent("String_Node_Str"));
  assertEquals("String_Node_Str",URL.decodeComponent("String_Node_Str"));
  String actualURLComponent=URL.decodeComponent(ENCODED_URL_COMPONENT);
  assertEquals(DECODED_URL_COMPONENT,actualURLComponent);
  actualURLComponent=URL.decodeComponent(ENCODED_URL_COMPONENT_QS);
  assertEquals(DECODED_URL_COMPONENT,actualURLComponent);
}
Program: 54409
Project: 54409
Buggy source:
/** 
 * Test method for  {@link com.google.gwt.http.client.URL#encodeComponent(java.lang.String)}.
 */
public void testEncodeComponent(){
  try {
    URL.encodeComponent(null);
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  assertEquals("String_Node_Str",URL.encodeComponent("String_Node_Str"));
  assertEquals("String_Node_Str",URL.encodeComponent("String_Node_Str"));
  String actualURLComponent=URL.encodeComponent(DECODED_URL_COMPONENT);
  assertEquals(ENCODED_URL_COMPONENT,actualURLComponent);
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.google.gwt.http.client.URL#encodeComponent(java.lang.String)}.
 */
public void testEncodeComponent(){
  try {
    URL.encodeComponent(null);
    fail("String_Node_Str");
  }
 catch (  NullPointerException ex) {
  }
  assertEquals("String_Node_Str",URL.encodeComponent("String_Node_Str"));
  assertEquals("String_Node_Str",URL.encodeComponent("String_Node_Str"));
  String actualURLComponent=URL.encodeComponent(DECODED_URL_COMPONENT);
  assertEquals(ENCODED_URL_COMPONENT_QS,actualURLComponent);
}
Program: 54411
Project: 54411
Buggy source:
static JMethodCall makeStaticCall(JMethodCall x,JMethod newMethod){
  JMethodCall newCall=new JMethodCall(x.getSourceInfo().makeChild(MakeCallsStatic.class,"String_Node_Str"),null,newMethod);
  newCall.addArg(x.getInstance());
  newCall.addArgs(x.getArgs());
  return newCall;
}

Fixed version (ground truth):
static JExpression makeStaticCall(JMethodCall x,JMethod newMethod){
  JMethodCall newCall=new JMethodCall(x.getSourceInfo().makeChild(MakeCallsStatic.class,"String_Node_Str"),null,newMethod);
  if (x.getInstance() instanceof JMultiExpression) {
    JMultiExpression multi=(JMultiExpression)x.getInstance();
    int lastIndex=multi.exprs.size() - 1;
    newCall.addArg(multi.exprs.get(lastIndex));
    newCall.addArgs(x.getArgs());
    multi.exprs.set(lastIndex,newCall);
    return multi;
  }
 else {
    newCall.addArg(x.getInstance());
    newCall.addArgs(x.getArgs());
    return newCall;
  }
}
Program: 54412
Project: 54412
Buggy source:
private void addAllOuterThisRefs(List<? super JFieldRef> list,JExpression expr,JClassType classType){
  if (classType.getFields().size() > 0) {
    JField field=classType.getFields().get(0);
    if (field.getName().startsWith("String_Node_Str")) {
      list.add(new JFieldRef(expr.getSourceInfo(),expr,field,currentClass));
    }
  }
}

Fixed version (ground truth):
private void addAllOuterThisRefs(List<? super JFieldRef> list,JExpression expr,JClassType classType){
  if (classType.getFields().size() > 0) {
    JField field=classType.getFields().get(0);
    if (field.getName().startsWith("String_Node_Str") || field.getName().startsWith("String_Node_Str")) {
      list.add(new JFieldRef(expr.getSourceInfo(),expr,field,currentClass));
    }
  }
}
Program: 54414
Project: 54414
Buggy source:
/** 
 * From the list of locales matched for any resources in this resource list, choose the one that is least derived from the original search locale.
 * @param locale originally requested locale
 * @return least derived matched locale
 */
public GwtLocale findLeastDerivedLocale(GwtLocale locale){
}

Fixed version (ground truth):
/** 
 * From the list of locales matched for any resources in this resource list, choose the one that is least derived from the original search locale.
 * @param logger logger to use
 * @param locale originally requested locale
 * @return least derived matched locale
 */
public GwtLocale findLeastDerivedLocale(TreeLogger logger,GwtLocale locale){
  List<GwtLocale> searchList=locale.getCompleteSearchList();
  Map<GwtLocale,Integer> derivedIndex=new HashMap<GwtLocale,Integer>();
  for (int i=0; i < searchList.size(); ++i) {
    derivedIndex.put(searchList.get(i),i);
  }
  GwtLocale best=LocaleUtils.getLocaleFactory().getDefault();
  int bestIdx=Integer.MAX_VALUE;
  for (int i=0; i < list.size(); ++i) {
    GwtLocale matchLocale=list.get(i).getMatchLocale();
    Integer wrappedIdx=derivedIndex.get(matchLocale);
    if (wrappedIdx == null) {
      logger.log(TreeLogger.WARN,"String_Node_Str" + matchLocale + "String_Node_Str"+ searchList);
      continue;
    }
    int idx=wrappedIdx;
    if (idx < bestIdx) {
      bestIdx=idx;
      best=matchLocale;
    }
  }
  return best;
}
Program: 54416
Project: 54416
Buggy source:
public Contacts(){
  initWidget(panel=binder.createAndBindUi(this));
  for (int i=0; i < contacts.length; ++i) {
    addContact(contacts[i]);
  }
}

Fixed version (ground truth):
public Contacts(){
  initWidget(binder.createAndBindUi(this));
  for (int i=0; i < contacts.length; ++i) {
    addContact(contacts[i]);
  }
}
Program: 54417
Project: 54417
Buggy source:
/** 
 * Add a statement to be run after everything has been instantiated, in the style of   {@link String#format}
 */
public void addInitStatement(String format,Object... params){
  initStatements.add(String.format(format,params));
}

Fixed version (ground truth):
/** 
 * Add a statement to be run after everything has been instantiated, in the style of   {@link String#format}
 */
public void addInitStatement(String format,Object... params){
  initStatements.add(formatCode(format,params));
}
Program: 54418
Project: 54418
Buggy source:
/** 
 * Adds a statement to the block run after fields are declared, in the style of   {@link String#format}
 */
public void addStatement(String format,Object... args){
  statements.add(String.format(format,args));
}

Fixed version (ground truth):
/** 
 * Adds a statement to the block run after fields are declared, in the style of   {@link String#format}
 */
public void addStatement(String format,Object... args){
  statements.add(formatCode(format,args));
}
Program: 54419
Project: 54419
Buggy source:
/** 
 * Instructs the writer to initialize the field with a specific contructor invocaction, instead of the default GWT.create call.
 */
public void setFieldInitializerAsConstructor(String fieldName,JClassType type,String... args){
  setFieldInitializer(fieldName,String.format("String_Node_Str",type.getQualifiedSourceName(),asCommaSeparatedList(args)));
}

Fixed version (ground truth):
/** 
 * Instructs the writer to initialize the field with a specific contructor invocaction, instead of the default GWT.create call.
 */
public void setFieldInitializerAsConstructor(String fieldName,JClassType type,String... args){
  setFieldInitializer(fieldName,formatCode("String_Node_Str",type.getQualifiedSourceName(),asCommaSeparatedList(args)));
}
Program: 54420
Project: 54420
Buggy source:
/** 
 * Write declarations for variables or fields to hold elements declared with gwt:field in the template. For those that have not had constructor generation suppressed, emit GWT.create() calls instantiating them (or die if they have no default constructor).
 * @throws UnableToCompleteException on constructor problem
 */
private void writeGwtFields(IndentedWriter niceWriter) throws UnableToCompleteException {
  Collection<OwnerField> ownerFields=getOwnerClass().getUiFields();
  for (  OwnerField ownerField : ownerFields) {
    if (ownerField.isProvided()) {
      String fieldName=ownerField.getName();
      FieldWriter fieldWriter=fieldManager.lookup(fieldName);
      if (fieldWriter != null) {
        fieldManager.lookup(fieldName).setInitializerMaybe(String.format("String_Node_Str",fieldName));
      }
    }
  }
  fieldManager.writeGwtFieldsDeclaration(niceWriter,uiOwnerType.getName());
}

Fixed version (ground truth):
/** 
 * Write declarations for variables or fields to hold elements declared with gwt:field in the template. For those that have not had constructor generation suppressed, emit GWT.create() calls instantiating them (or die if they have no default constructor).
 * @throws UnableToCompleteException on constructor problem
 */
private void writeGwtFields(IndentedWriter niceWriter) throws UnableToCompleteException {
  Collection<OwnerField> ownerFields=getOwnerClass().getUiFields();
  for (  OwnerField ownerField : ownerFields) {
    if (ownerField.isProvided()) {
      String fieldName=ownerField.getName();
      FieldWriter fieldWriter=fieldManager.lookup(fieldName);
      if (fieldWriter != null) {
        fieldManager.lookup(fieldName).setInitializerMaybe(formatCode("String_Node_Str",fieldName));
      }
    }
  }
  fieldManager.writeGwtFieldsDeclaration(niceWriter,uiOwnerType.getName());
}
Program: 54421
Project: 54421
Buggy source:
@Override public List<TestInfo[]> getTestBlocks(String syntheticModuleName){
  Set<TestInfo> allTestsInModule=GWTTestCase.getTestsForModule(syntheticModuleName).getTests();
  TestInfo[] testBlock=allTestsInModule.toArray(new TestInfo[allTestsInModule.size()]);
  List<TestInfo[]> testBlocks=new ArrayList<TestInfo[]>();
  testBlocks.add(testBlock);
  return testBlocks;
}

Fixed version (ground truth):
@Override public List<TestInfo[]> getTestBlocks(String syntheticModuleName){
  Set<TestInfo> allTestsInModule=getTestsForModule(syntheticModuleName);
  List<TestInfo[]> testBlocks=new ArrayList<TestInfo[]>();
  if (allTestsInModule.size() > 0) {
    TestInfo[] testBlock=allTestsInModule.toArray(new TestInfo[allTestsInModule.size()]);
    testBlocks.add(testBlock);
  }
  return testBlocks;
}
Program: 54422
Project: 54422
Buggy source:
/** 
 * Get the list of remote user agents to compile. This method returns null until all clients have connected.
 * @return the list of remote user agents
 */
public static String[] getRemoteUserAgents(){
  return getUnitTestShell().remoteUserAgents;
}

Fixed version (ground truth):
/** 
 * Get the list of remote user agents to compile. This method returns null until all clients have connected.
 * @return the list of remote user agents
 */
public static String[] getRemoteUserAgents(){
  if (unitTestShell == null) {
    return null;
  }
  return unitTestShell.remoteUserAgents;
}
Program: 54423
Project: 54423
Buggy source:
/** 
 * 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();
    ArgProcessor argProcessor=unitTestShell.new ArgProcessor();
    if (!argProcessor.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();
    ArgProcessor argProcessor=unitTestShell.new ArgProcessor();
    if (!argProcessor.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;
  }
  if (unitTestShell.thread != Thread.currentThread()) {
    throw new IllegalThreadStateException("String_Node_Str");
  }
  return unitTestShell;
}
Program: 54424
Project: 54424
Buggy source:
/** 
 * returns the set of banned   {@code Platform} for a test method.
 */
private static Set<Platform> getBannedPlatforms(TestCase testCase){
  Class<?> testClass=testCase.getClass();
  Set<Platform> bannedSet=EnumSet.noneOf(Platform.class);
  if (testClass.isAnnotationPresent(DoNotRunWith.class)) {
    bannedSet.addAll(Arrays.asList(testClass.getAnnotation(DoNotRunWith.class).value()));
  }
  try {
    Method testMethod=testClass.getMethod(testCase.getName());
    if (testMethod.isAnnotationPresent(DoNotRunWith.class)) {
      bannedSet.addAll(Arrays.asList(testMethod.getAnnotation(DoNotRunWith.class).value()));
    }
  }
 catch (  SecurityException e) {
    e.printStackTrace();
  }
catch (  NoSuchMethodException e) {
    e.printStackTrace();
  }
  return bannedSet;
}

Fixed version (ground truth):
/** 
 * Returns the set of banned   {@code Platform} for a test method.
 * @param testClass the testClass
 * @param methodName the name of the test method
 */
private static Set<Platform> getBannedPlatforms(Class<?> testClass,String methodName){
  Set<Platform> bannedSet=EnumSet.noneOf(Platform.class);
  if (testClass.isAnnotationPresent(DoNotRunWith.class)) {
    bannedSet.addAll(Arrays.asList(testClass.getAnnotation(DoNotRunWith.class).value()));
  }
  try {
    Method testMethod=testClass.getMethod(methodName);
    if (testMethod.isAnnotationPresent(DoNotRunWith.class)) {
      bannedSet.addAll(Arrays.asList(testMethod.getAnnotation(DoNotRunWith.class).value()));
    }
  }
 catch (  SecurityException e) {
    e.printStackTrace();
  }
catch (  NoSuchMethodException e) {
    e.printStackTrace();
  }
  return bannedSet;
}
Program: 54425
Project: 54425
Buggy source:
/** 
 * Enforce the singleton pattern. The call to   {@link GWTShell}'s ctor forces server mode and disables processing extra arguments as URLs to be shown.
 */
private JUnitShell(){
  setRunTomcat(true);
  setHeadless(true);
  if (System.getProperty(PROP_JUNIT_HYBRID_MODE) != null) {
    runStyle=new RunStyleLocalWeb(this);
  }
}

Fixed version (ground truth):
/** 
 * Enforce the singleton pattern. The call to   {@link GWTShell}'s ctor forces server mode and disables processing extra arguments as URLs to be shown.
 */
private JUnitShell(){
  thread=Thread.currentThread();
  setRunTomcat(true);
  setHeadless(true);
  if (System.getProperty(PROP_JUNIT_HYBRID_MODE) != null) {
    runStyle=new RunStyleLocalWeb(this);
  }
}
Program: 54427
Project: 54427
Buggy source:
@Override public void setName(String name){
  super.setName(name);
  if (JUnitShell.mustNotExecuteTest(this)) {
    return;
  }
synchronized (ALL_GWT_TESTS_LOCK) {
    String syntheticModuleName=getSyntheticModuleName();
    TestModuleInfo moduleInfo=ALL_GWT_TESTS.get(syntheticModuleName);
    if (moduleInfo == null) {
      moduleInfo=new TestModuleInfo(getModuleName(),syntheticModuleName,getStrategy());
      ALL_GWT_TESTS.put(syntheticModuleName,moduleInfo);
    }
    moduleInfo.getTests().add(new TestInfo(syntheticModuleName,getClass().getName(),getName()));
  }
}

Fixed version (ground truth):
@Override public void setName(String name){
  super.setName(name);
synchronized (ALL_GWT_TESTS_LOCK) {
    String syntheticModuleName=getSyntheticModuleName();
    TestModuleInfo moduleInfo=ALL_GWT_TESTS.get(syntheticModuleName);
    if (moduleInfo == null) {
      moduleInfo=new TestModuleInfo(getModuleName(),syntheticModuleName,getStrategy());
      ALL_GWT_TESTS.put(syntheticModuleName,moduleInfo);
    }
    moduleInfo.getTests().add(new TestInfo(syntheticModuleName,getClass().getName(),getName()));
  }
}
Program: 54428
Project: 54428
Buggy source:
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(FakeMessagesMakerTest.class);
  suite.addTestSuite(BatchingStrategyTest.class);
  suite.addTestSuite(JUnitMessageQueueTest.class);
  suite.addTestSuite(GWTTestCaseNoClientTest.class);
  suite.addTestSuite(BenchmarkNoClientTest.class);
  suite.addTestSuite(GWTTestCaseTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("String_Node_Str");
  suite.addTestSuite(GWTTestCaseTest.class);
  suite.addTestSuite(BatchingStrategyTest.class);
  suite.addTestSuite(FakeMessagesMakerTest.class);
  suite.addTestSuite(JUnitMessageQueueTest.class);
  suite.addTestSuite(GWTTestCaseNoClientTest.class);
  suite.addTestSuite(BenchmarkNoClientTest.class);
  return suite;
}
Program: 54429
Project: 54429
Buggy source:
/** 
 * returns true iff execution completes normally.
 */
public boolean process() throws IOException, BrowserChannelException {
  if (!init()) {
    disconnectFromHost();
    return false;
  }
  logger.log(TreeLogger.DEBUG,"String_Node_Str" + MessageType.LOAD_MODULE + "String_Node_Str"+ htmlUnitSessionHandler.getUserAgent());
  ReturnMessage returnMessage=null;
synchronized (htmlUnitSessionHandler.getHtmlPage()) {
    new LoadModuleMessage(this,url,tabKey,sessionKey,moduleName,htmlUnitSessionHandler.getUserAgent()).send();
    returnMessage=reactToMessages(htmlUnitSessionHandler,true);
  }
  logger.log(TreeLogger.DEBUG,"String_Node_Str" + returnMessage.getReturnValue() + "String_Node_Str"+ returnMessage.isException());
  return !returnMessage.isException();
}

Fixed version (ground truth):
/** 
 * returns true iff execution completes normally.
 */
public boolean process() throws IOException, BrowserChannelException {
  if (!init()) {
    disconnectFromHost();
    return false;
  }
  logger.log(TreeLogger.DEBUG,"String_Node_Str" + MessageType.LOAD_MODULE + "String_Node_Str"+ htmlUnitSessionHandler.getUserAgent());
  ReturnMessage returnMessage=null;
synchronized (htmlUnitSessionHandler.getHtmlPage()) {
    new LoadModuleMessage(this,url,tabKey,sessionKey,moduleName,htmlUnitSessionHandler.getUserAgent()).send();
    returnMessage=reactToMessages(htmlUnitSessionHandler,true);
    if (shouldDisconnect) {
      disconnectFromHost();
    }
  }
  logger.log(TreeLogger.DEBUG,"String_Node_Str" + returnMessage.getReturnValue() + "String_Node_Str"+ returnMessage.isException());
  return !returnMessage.isException();
}
Program: 54430
Project: 54430
Buggy source:
public ReturnMessage reactToMessagesWhileWaitingForReturn(HtmlUnitSessionHandler handler) throws IOException, BrowserChannelException {
  return reactToMessages(handler,true);
}

Fixed version (ground truth):
public ReturnMessage reactToMessagesWhileWaitingForReturn(HtmlUnitSessionHandler handler) throws IOException, BrowserChannelException {
  ReturnMessage returnMessage=reactToMessages(handler,true);
  if (shouldDisconnect) {
    disconnectFromHost();
  }
  return returnMessage;
}
Program: 54432
Project: 54432
Buggy source:
public void onModuleLoad(){
  SplitLayoutPanel p=new SplitLayoutPanel();
  p.add(new HTML("String_Node_Str"),Direction.WEST,128);
  p.add(new HTML("String_Node_Str"),Direction.NORTH,384);
  p.add(new HTML("String_Node_Str"),Direction.CENTER,0);
  p.layout();
  RootLayoutPanel rp=RootLayoutPanel.get();
  rp.add(p);
  rp.layout();
}

Fixed version (ground truth):
public void onModuleLoad(){
  SplitLayoutPanel p=new SplitLayoutPanel();
  p.addWest(new HTML("String_Node_Str"),128);
  p.addNorth(new HTML("String_Node_Str"),384);
  p.add(new HTML("String_Node_Str"));
  p.layout();
  RootLayoutPanel rp=RootLayoutPanel.get();
  rp.add(p);
  rp.layout();
}