nus-yam/ex-repair huggingface dataset:
Program: 82435
Project: 82435
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: 82436
Project: 82436
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: 82437
Project: 82437
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: 82438
Project: 82438
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: 82439
Project: 82439
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: 82440
Project: 82440
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: 82442
Project: 82442
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: 82443
Project: 82443
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: 82444
Project: 82444
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: 82445
Project: 82445
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: 82446
Project: 82446
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: 82447
Project: 82447
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: 82448
Project: 82448
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: 82449
Project: 82449
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: 82450
Project: 82450
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: 82451
Project: 82451
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: 82452
Project: 82452
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: 82454
Project: 82454
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: 82455
Project: 82455
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: 82456
Project: 82456
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();
}
Program: 82457
Project: 82457
Buggy source:
/** 
 * Gets the container element associated with the given child widget. <p> The container element is created by the   {@link Layout} class. This shouldbe used with certain styles, such as  {@link Style#setZIndex(int)}, that must be applied to the container, rather than directly to the child widget. </p> TODO(jgw): Is this really the best way to do this?
 * @param widget the widget whose container element is to be retrieved
 * @return the widget's container element
 */
public Element getContainerElementFor(Widget widget){
  assertIsChild(widget);
  return ((LayoutData)widget.getLayoutData()).layer.getContainerElement();
}

Fixed version (ground truth):
/** 
 * Gets the container element associated with the given child widget. <p> The container element is created by the   {@link Layout} class. This shouldbe used with certain styles, such as {@link com.google.gwt.dom.client.Style#setZIndex(int)}, that must be applied to the container, rather than directly to the child widget. </p> TODO(jgw): Is this really the best way to do this?
 * @param widget the widget whose container element is to be retrieved
 * @return the widget's container element
 */
public Element getContainerElementFor(Widget widget){
  assertIsChild(widget);
  return ((LayoutData)widget.getLayoutData()).layer.getContainerElement();
}
Program: 82459
Project: 82459
Buggy source:
/** 
 * Interprets <ui:with> elements.
 */
private void createResource(XMLElement elem) throws UnableToCompleteException {
  String resourceName=elem.consumeRequiredAttribute("String_Node_Str");
  JClassType resourceType=consumeTypeAttribute(elem);
  if (elem.getAttributeCount() > 0) {
    writer.die("String_Node_Str");
  }
  FieldWriter fieldWriter=fieldManager.registerField(resourceType,resourceName);
  OwnerField ownerField=writer.getOwnerClass().getUiField(resourceName);
  if (ownerField != null) {
    if (!resourceType.equals(ownerField.getType().getRawType())) {
      writer.die("String_Node_Str",ownerField);
    }
    if (ownerField.isProvided()) {
      fieldWriter.setInitializer("String_Node_Str" + ownerField.getName());
      return;
    }
  }
  JMethod factoryMethod=writer.getOwnerClass().getUiFactoryMethod(resourceType);
  if (factoryMethod != null) {
    fieldWriter.setInitializer(String.format("String_Node_Str",factoryMethod.getName()));
  }
}

Fixed version (ground truth):
/** 
 * Interprets <ui:with> elements.
 */
private void createResource(XMLElement elem) throws UnableToCompleteException {
  String resourceName=elem.consumeRequiredAttribute("String_Node_Str");
  JClassType resourceType=consumeTypeAttribute(elem);
  if (elem.getAttributeCount() > 0) {
    writer.die("String_Node_Str",elem);
  }
  FieldWriter fieldWriter=fieldManager.registerField(resourceType,resourceName);
  OwnerField ownerField=writer.getOwnerClass().getUiField(resourceName);
  if (ownerField != null) {
    if (!resourceType.equals(ownerField.getType().getRawType())) {
      writer.die("String_Node_Str",elem,ownerField);
    }
    if (ownerField.isProvided()) {
      fieldWriter.setInitializer("String_Node_Str" + ownerField.getName());
      return;
    }
  }
  JMethod factoryMethod=writer.getOwnerClass().getUiFactoryMethod(resourceType);
  if (factoryMethod != null) {
    fieldWriter.setInitializer(String.format("String_Node_Str",factoryMethod.getName()));
  }
}
Program: 82460
Project: 82460
Buggy source:
@Override public String getTagName(Element elem){
  String tagName=getTagNameInternal(elem);
  String scopeName=getScopeNameInternal(elem);
  if ("String_Node_Str".equalsIgnoreCase(scopeName) || "String_Node_Str".equalsIgnoreCase(scopeName)) {
    return tagName;
  }
  return scopeName + "String_Node_Str" + tagName;
}

Fixed version (ground truth):
@Override public String getTagName(Element elem){
  String tagName=getTagNameInternal(elem);
  String scopeName=getScopeNameInternal(elem);
  if ((scopeName == null) || "String_Node_Str".equalsIgnoreCase(scopeName)) {
    return tagName;
  }
  return scopeName + "String_Node_Str" + tagName;
}
Program: 82461
Project: 82461
Buggy source:
public void testExpires(){
  Date expiresEarly=new Date(new Date().getTime() + (5 * 1000));
  Date expiresLate=new Date(new Date().getTime() + (60 * 1000));
  Cookies.setCookie("String_Node_Str","String_Node_Str",expiresEarly);
  Cookies.setCookie("String_Node_Str","String_Node_Str",expiresLate);
  Cookies.setCookie("String_Node_Str","String_Node_Str",null);
  Timer timer=new Timer(){
    public void run(){
      assertNull(Cookies.getCookie("String_Node_Str"));
      assertEquals(Cookies.getCookie("String_Node_Str"),"String_Node_Str");
      assertEquals(Cookies.getCookie("String_Node_Str"),"String_Node_Str");
      Cookies.removeCookie("String_Node_Str");
      assertNull(Cookies.getCookie("String_Node_Str"));
      finishTest();
    }
  }
;
  timer.schedule(5010);
  delayTestFinish(6 * 1000);
}

Fixed version (ground truth):
public void testExpires(){
  int uniqueId=Random.nextInt(9000000) + 1000000;
  final String earlyCookie="String_Node_Str" + uniqueId;
  final String lateCookie="String_Node_Str" + uniqueId;
  final String sessionCookie="String_Node_Str" + uniqueId;
  Date expiresEarly=new Date(new Date().getTime() + (5 * 1000));
  Date expiresLate=new Date(new Date().getTime() + (60 * 1000));
  Cookies.setCookie(earlyCookie,"String_Node_Str",expiresEarly);
  Cookies.setCookie(lateCookie,"String_Node_Str",expiresLate);
  Cookies.setCookie(sessionCookie,"String_Node_Str",null);
  Timer timer=new Timer(){
    @Override public void run(){
      assertNull(Cookies.getCookie(earlyCookie));
      assertEquals(Cookies.getCookie(lateCookie),"String_Node_Str");
      assertEquals(Cookies.getCookie(sessionCookie),"String_Node_Str");
      Cookies.removeCookie(sessionCookie);
      assertNull(Cookies.getCookie(sessionCookie));
      finishTest();
    }
  }
;
  timer.schedule(5010);
  delayTestFinish(6 * 1000);
}
Program: 82462
Project: 82462
Buggy source:
/** 
 * Clear out all existing cookies.
 */
private void clearCookies(){
  Collection<String> cookies=Cookies.getCookieNames();
  for (  String cookie : cookies) {
    Cookies.removeCookie(cookie);
  }
}

Fixed version (ground truth):
/** 
 * Clear out all existing cookies, except the ones used in  {@link #testExpires()}.
 */
private void clearCookies(){
  Collection<String> cookies=Cookies.getCookieNames();
  for (  String cookie : cookies) {
    if (!cookie.startsWith("String_Node_Str")) {
      Cookies.removeCookie(cookie);
    }
  }
}
Program: 82464
Project: 82464
Buggy source:
public void run(){
  assertNull(Cookies.getCookie("String_Node_Str"));
  assertEquals(Cookies.getCookie("String_Node_Str"),"String_Node_Str");
  assertEquals(Cookies.getCookie("String_Node_Str"),"String_Node_Str");
  Cookies.removeCookie("String_Node_Str");
  assertNull(Cookies.getCookie("String_Node_Str"));
  finishTest();
}

Fixed version (ground truth):
@Override public void run(){
  assertNull(Cookies.getCookie(earlyCookie));
  assertEquals(Cookies.getCookie(lateCookie),"String_Node_Str");
  assertEquals(Cookies.getCookie(sessionCookie),"String_Node_Str");
  Cookies.removeCookie(sessionCookie);
  assertNull(Cookies.getCookie(sessionCookie));
  finishTest();
}
Program: 82466
Project: 82466
Buggy source:
public String getModuleName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getModuleName(){
  return "String_Node_Str";
}
Program: 82467
Project: 82467
Buggy source:
/** 
 * Create a method call whose type is overridden to the specified type, ignoring the return type of the target method. This constructor is used during normalizing transformations to preserve type semantics when calling externally-defined compiler implementation methods. For example, Cast.dynamicCast() returns Object but that method is used to implement the cast operation. Using a stronger type on the call expression allows us to preserve type information during the latter phases of compilation.
 */
public JMethodCall(SourceInfo info,JExpression instance,JMethod method,JType overrideReturnType){
  super(info);
  this.instance=instance;
  this.method=method;
  assert(overrideReturnType != null);
  this.overrideReturnType=overrideReturnType;
}

Fixed version (ground truth):
/** 
 * Create a method call whose type is overridden to the specified type, ignoring the return type of the target method. This constructor is used during normalizing transformations to preserve type semantics when calling externally-defined compiler implementation methods. For example, Cast.dynamicCast() returns Object but that method is used to implement the cast operation. Using a stronger type on the call expression allows us to preserve type information during the latter phases of compilation.
 */
public JMethodCall(SourceInfo info,JExpression instance,JMethod method,JType overrideReturnType){
  super(info);
  assert(method != null);
  assert(instance != null || method.isStatic());
  this.instance=instance;
  this.method=method;
  assert(overrideReturnType != null);
  this.overrideReturnType=overrideReturnType;
}
Program: 82468
Project: 82468
Buggy source:
/** 
 * Adds a widget to the panel at the specified position. Setting a position of <code>(-1, -1)</code> will cause the child widget to be positioned statically.
 * @param w the widget to be added
 * @param left the widget's left position
 * @param top the widget's top position
 */
public void add(Widget w,int left,int top){
  w.removeFromParent();
  setWidgetPositionImpl(w,left,top);
  add(w);
}

Fixed version (ground truth):
/** 
 * Adds a widget to the panel at the specified position. Setting a position of <code>(-1, -1)</code> will cause the child widget to be positioned statically.
 * @param w the widget to be added
 * @param left the widget's left position
 * @param top the widget's top position
 */
public void add(Widget w,int left,int top){
  w.removeFromParent();
  int beforeIndex=getWidgetCount();
  setWidgetPositionImpl(w,left,top);
  insert(w,beforeIndex);
}
Program: 82469
Project: 82469
Buggy source:
/** 
 * Adds the specified widget to the deck.
 * @param w the widget to be added
 */
@Override public void add(Widget w){
  Element container=createWidgetContainer();
  DOM.appendChild(getElement(),container);
  super.add(w,container);
  finishWidgetInitialization(container,w);
}

Fixed version (ground truth):
@Override public void add(Widget w){
  Element container=createWidgetContainer();
  DOM.appendChild(getElement(),container);
  super.add(w,container);
  finishWidgetInitialization(container,w);
}
Program: 82470
Project: 82470
Buggy source:
/** 
 * Inserts a widget before the specified index.
 * @param w the widget to be inserted
 * @param beforeIndex the index before which it will be inserted
 * @throws IndexOutOfBoundsException if <code>beforeIndex</code> is out ofrange
 */
public void insert(Widget w,int beforeIndex){
  Element container=createWidgetContainer();
  DOM.insertChild(getElement(),container,beforeIndex);
  insert(w,container,beforeIndex,true);
  finishWidgetInitialization(container,w);
}

Fixed version (ground truth):
public void insert(Widget w,int beforeIndex){
  Element container=createWidgetContainer();
  DOM.insertChild(getElement(),container,beforeIndex);
  insert(w,container,beforeIndex,true);
  finishWidgetInitialization(container,w);
}
Program: 82471
Project: 82471
Buggy source:
/** 
 * Adds a child widget to the panel. If the Widget is already attached to the HorizontalPanel, it will be moved to the end of the panel.
 * @param w the widget to be added
 */
@Override public void add(Widget w){
  Element td=createAlignedTd();
  DOM.appendChild(tableRow,td);
  add(w,td);
}

Fixed version (ground truth):
@Override public void add(Widget w){
  Element td=createAlignedTd();
  DOM.appendChild(tableRow,td);
  add(w,td);
}
Program: 82472
Project: 82472
Buggy source:
/** 
 * Inserts a widget before the specified index. If the Widget is already attached to the HorizontalPanel, it will be moved to the specified index.
 * @param w the widget to be inserted
 * @param beforeIndex the index before which it will be inserted
 * @throws IndexOutOfBoundsException if <code>beforeIndex</code> is out ofrange
 */
public void insert(Widget w,int beforeIndex){
  checkIndexBoundsForInsertion(beforeIndex);
  Element td=createAlignedTd();
  DOM.insertChild(tableRow,td,beforeIndex);
  insert(w,td,beforeIndex,false);
}

Fixed version (ground truth):
public void insert(Widget w,int beforeIndex){
  checkIndexBoundsForInsertion(beforeIndex);
  Element td=createAlignedTd();
  DOM.insertChild(tableRow,td,beforeIndex);
  insert(w,td,beforeIndex,false);
}
Program: 82473
Project: 82473
Buggy source:
/** 
 * Inserts a widget before the specified index.
 * @param w the widget to be inserted
 * @param beforeIndex the index before which it will be inserted
 * @throws IndexOutOfBoundsException if <code>beforeIndex</code> is out ofrange
 */
public void insert(Widget w,int beforeIndex){
  Element trh=DOM.createTR();
  Element tdh=DOM.createTD();
  DOM.appendChild(trh,tdh);
  DOM.appendChild(tdh,createHeaderElem());
  Element trb=DOM.createTR();
  Element tdb=DOM.createTD();
  DOM.appendChild(trb,tdb);
  beforeIndex=adjustIndex(w,beforeIndex);
  int effectiveIndex=beforeIndex * 2;
  DOM.insertChild(body,trb,effectiveIndex);
  DOM.insertChild(body,trh,effectiveIndex);
  setStyleName(tdh,DEFAULT_ITEM_STYLENAME,true);
  DOM.setElementPropertyInt(tdh,"String_Node_Str",hashCode());
  DOM.setElementProperty(tdh,"String_Node_Str","String_Node_Str");
  setStyleName(tdb,DEFAULT_STYLENAME + "String_Node_Str",true);
  DOM.setElementProperty(tdb,"String_Node_Str","String_Node_Str");
  DOM.setElementProperty(tdb,"String_Node_Str","String_Node_Str");
  insert(w,tdb,beforeIndex,false);
  updateIndicesFrom(beforeIndex);
  if (visibleStack == -1) {
    showStack(0);
  }
 else {
    setStackVisible(beforeIndex,false);
    if (visibleStack >= beforeIndex) {
      ++visibleStack;
    }
    setStackVisible(visibleStack,true);
  }
}

Fixed version (ground truth):
public void insert(Widget w,int beforeIndex){
  Element trh=DOM.createTR();
  Element tdh=DOM.createTD();
  DOM.appendChild(trh,tdh);
  DOM.appendChild(tdh,createHeaderElem());
  Element trb=DOM.createTR();
  Element tdb=DOM.createTD();
  DOM.appendChild(trb,tdb);
  beforeIndex=adjustIndex(w,beforeIndex);
  int effectiveIndex=beforeIndex * 2;
  DOM.insertChild(body,trb,effectiveIndex);
  DOM.insertChild(body,trh,effectiveIndex);
  setStyleName(tdh,DEFAULT_ITEM_STYLENAME,true);
  DOM.setElementPropertyInt(tdh,"String_Node_Str",hashCode());
  DOM.setElementProperty(tdh,"String_Node_Str","String_Node_Str");
  setStyleName(tdb,DEFAULT_STYLENAME + "String_Node_Str",true);
  DOM.setElementProperty(tdb,"String_Node_Str","String_Node_Str");
  DOM.setElementProperty(tdb,"String_Node_Str","String_Node_Str");
  insert(w,tdb,beforeIndex,false);
  updateIndicesFrom(beforeIndex);
  if (visibleStack == -1) {
    showStack(0);
  }
 else {
    setStackVisible(beforeIndex,false);
    if (visibleStack >= beforeIndex) {
      ++visibleStack;
    }
    setStackVisible(visibleStack,true);
  }
}
Program: 82474
Project: 82474
Buggy source:
/** 
 * Adds a child widget to the panel. If the Widget is already attached to the VerticalPanel, it will be moved to the end of the panel.
 * @param w the widget to be added
 */
@Override public void add(Widget w){
  Element tr=DOM.createTR();
  Element td=createAlignedTd();
  DOM.appendChild(tr,td);
  DOM.appendChild(getBody(),tr);
  add(w,td);
}

Fixed version (ground truth):
@Override public void add(Widget w){
  Element tr=DOM.createTR();
  Element td=createAlignedTd();
  DOM.appendChild(tr,td);
  DOM.appendChild(getBody(),tr);
  add(w,td);
}
Program: 82475
Project: 82475
Buggy source:
/** 
 * Inserts a widget before the specified index. If the Widget is already attached to the VerticalPanel, it will be moved to the specified index.
 * @param w the widget to be inserted
 * @param beforeIndex the index before which it will be inserted
 * @throws IndexOutOfBoundsException if <code>beforeIndex</code> is out ofrange
 */
public void insert(Widget w,int beforeIndex){
  checkIndexBoundsForInsertion(beforeIndex);
  Element tr=DOM.createTR();
  Element td=createAlignedTd();
  DOM.appendChild(tr,td);
  DOM.insertChild(getBody(),tr,beforeIndex);
  insert(w,td,beforeIndex,false);
}

Fixed version (ground truth):
public void insert(Widget w,int beforeIndex){
  checkIndexBoundsForInsertion(beforeIndex);
  Element tr=DOM.createTR();
  Element td=createAlignedTd();
  DOM.appendChild(tr,td);
  DOM.insertChild(getBody(),tr,beforeIndex);
  insert(w,td,beforeIndex,false);
}
Program: 82476
Project: 82476
Buggy source:
public void addBugs(){
  addIssue(new Issue1245());
  addIssue(new Issue1772());
  addIssue(new Issue1897());
  addIssue(new Issue1932());
  addIssue(new Issue2261());
  addIssue(new Issue2290());
  addIssue(new Issue2307());
  addIssue(new Issue2318());
  addIssue(new Issue2321());
  addIssue(new Issue2331());
  addIssue(new Issue2338());
  addIssue(new Issue2339());
  addIssue(new Issue2390());
  addIssue(new Issue1169());
  addIssue(new Issue2392());
  addIssue(new Issue2443());
  addIssue(new Issue2553());
  addIssue(new Issue2855());
  addIssue(new Issue3172());
}

Fixed version (ground truth):
public void addBugs(){
  addIssue(new Issue1245());
  addIssue(new Issue1772());
  addIssue(new Issue1897());
  addIssue(new Issue1932());
  addIssue(new Issue2261());
  addIssue(new Issue2290());
  addIssue(new Issue2307());
  addIssue(new Issue2318());
  addIssue(new Issue2321());
  addIssue(new Issue2331());
  addIssue(new Issue2338());
  addIssue(new Issue2339());
  addIssue(new Issue2390());
  addIssue(new Issue1169());
  addIssue(new Issue2392());
  addIssue(new Issue2443());
  addIssue(new Issue2553());
  addIssue(new Issue2855());
  addIssue(new Issue3172());
  addIssue(new Issue3973());
}
Program: 82477
Project: 82477
Buggy source:
@Override protected void onDetach(){
  super.onDetach();
  if (synthesizedFrame != null) {
    impl.unhookEvents(synthesizedFrame,getElement());
    Document.get().getBody().removeChild(synthesizedFrame);
    synthesizedFrame=null;
  }
}

Fixed version (ground truth):
@Override protected void onDetach(){
  super.onDetach();
  impl.unhookEvents(synthesizedFrame,getElement());
  if (synthesizedFrame != null) {
    Document.get().getBody().removeChild(synthesizedFrame);
    synthesizedFrame=null;
  }
}
Program: 82478
Project: 82478
Buggy source:
@Override protected void onAttach(){
  super.onAttach();
  if (frameName != null) {
    createFrame();
    Document.get().getBody().appendChild(synthesizedFrame);
    impl.hookEvents(synthesizedFrame,getElement(),this);
  }
}

Fixed version (ground truth):
@Override protected void onAttach(){
  super.onAttach();
  if (frameName != null) {
    createFrame();
    Document.get().getBody().appendChild(synthesizedFrame);
  }
  impl.hookEvents(synthesizedFrame,getElement(),this);
}
Program: 82480
Project: 82480
Buggy source:
private void doGetModule(HttpServletRequest request,HttpServletResponse response,TreeLogger logger,RequestParts parts) throws IOException {
  String msg="String_Node_Str" + parts.moduleName + "String_Node_Str";
  logger=logger.branch(TreeLogger.TRACE,msg,null);
  try {
    getModuleDef(logger,parts.moduleName);
  }
 catch (  UnableToCompleteException e) {
    sendErrorResponse(response,HttpServletResponse.SC_NOT_FOUND,"String_Node_Str" + Util.escapeXml(parts.moduleName) + "String_Node_Str");
    return;
  }
  response.setContentType("String_Node_Str");
  PrintWriter writer=response.getWriter();
  writer.println("String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(parts.moduleName);
  writer.println("String_Node_Str");
  Map<String,String[]> params=getParameterMap(request);
  for (  Map.Entry<String,String[]> entry : params.entrySet()) {
    String[] values=entry.getValue();
    if (values.length > 0) {
      writer.print("String_Node_Str");
      writer.print(entry.getKey());
      writer.print("String_Node_Str");
      writer.print(values[values.length - 1]);
      writer.println("String_Node_Str");
    }
  }
  writer.println("String_Node_Str");
  writer.println("String_Node_Str" + "String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
}

Fixed version (ground truth):
private void doGetModule(HttpServletRequest request,HttpServletResponse response,TreeLogger logger,RequestParts parts) throws IOException {
  String msg="String_Node_Str" + parts.moduleName + "String_Node_Str";
  logger=logger.branch(TreeLogger.TRACE,msg,null);
  try {
    getModuleDef(logger,parts.moduleName);
  }
 catch (  UnableToCompleteException e) {
    sendErrorResponse(response,HttpServletResponse.SC_NOT_FOUND,"String_Node_Str" + Util.escapeXml(parts.moduleName) + "String_Node_Str");
    return;
  }
  response.setContentType("String_Node_Str");
  PrintWriter writer=response.getWriter();
  writer.println("String_Node_Str");
  writer.print("String_Node_Str");
  writer.print(parts.moduleName);
  writer.println("String_Node_Str");
  Map<String,String[]> params=getParameterMap(request);
  for (  Map.Entry<String,String[]> entry : params.entrySet()) {
    String[] values=entry.getValue();
    if (values.length > 0) {
      writer.print("String_Node_Str");
      writer.print(entry.getKey());
      writer.print("String_Node_Str");
      writer.print(values[values.length - 1]);
      writer.println("String_Node_Str");
    }
  }
  writer.println("String_Node_Str");
  writer.println("String_Node_Str" + "String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
}
Program: 82481
Project: 82481
Buggy source:
public void execute(){
  unregisterCallbacks(CALLBACKS);
  Node script=Document.get().getElementById(callbackId);
  getDocumentElement().getFirstChild().removeChild(script);
}

Fixed version (ground truth):
public void execute(){
  unregisterCallbacks(CALLBACKS);
  Node script=Document.get().getElementById(callbackId);
  getHeadElement().removeChild(script);
}
Program: 82482
Project: 82482
Buggy source:
/** 
 * Cleans everything once the response has been received: deletes the script tag and unregisters the callback.
 */
private void unload(){
  DeferredCommand.addCommand(new Command(){
    public void execute(){
      unregisterCallbacks(CALLBACKS);
      Node script=Document.get().getElementById(callbackId);
      getDocumentElement().getFirstChild().removeChild(script);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Cleans everything once the response has been received: deletes the script tag and unregisters the callback.
 */
private void unload(){
  DeferredCommand.addCommand(new Command(){
    public void execute(){
      unregisterCallbacks(CALLBACKS);
      Node script=Document.get().getElementById(callbackId);
      getHeadElement().removeChild(script);
    }
  }
);
}
Program: 82483
Project: 82483
Buggy source:
/** 
 * Sends a request using the JSONP mechanism.
 * @param baseUri To be sent to the server.
 */
void send(final String baseUri){
  registerCallbacks(CALLBACKS);
  StringBuffer uri=new StringBuffer(baseUri);
  uri.append(baseUri.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
  String prefix=CALLBACKS_NAME + "String_Node_Str" + callbackId;
  uri.append(callbackParam).append("String_Node_Str").append(prefix).append("String_Node_Str");
  if (failureCallbackParam != null) {
    uri.append("String_Node_Str");
    uri.append(failureCallbackParam).append("String_Node_Str").append(prefix).append("String_Node_Str");
  }
  ScriptElement script=Document.get().createScriptElement();
  script.setType("String_Node_Str");
  script.setId(callbackId);
  script.setSrc(uri.toString());
  getDocumentElement().getFirstChild().appendChild(script);
  timer=new Timer(){
    @Override public void run(){
      onFailure(new TimeoutException("String_Node_Str" + baseUri));
    }
  }
;
  timer.schedule(timeout);
}

Fixed version (ground truth):
/** 
 * Sends a request using the JSONP mechanism.
 * @param baseUri To be sent to the server.
 */
void send(final String baseUri){
  registerCallbacks(CALLBACKS);
  StringBuffer uri=new StringBuffer(baseUri);
  uri.append(baseUri.contains("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
  String prefix=CALLBACKS_NAME + "String_Node_Str" + callbackId;
  uri.append(callbackParam).append("String_Node_Str").append(prefix).append("String_Node_Str");
  if (failureCallbackParam != null) {
    uri.append("String_Node_Str");
    uri.append(failureCallbackParam).append("String_Node_Str").append(prefix).append("String_Node_Str");
  }
  ScriptElement script=Document.get().createScriptElement();
  script.setType("String_Node_Str");
  script.setId(callbackId);
  script.setSrc(uri.toString());
  getHeadElement().appendChild(script);
  timer=new Timer(){
    @Override public void run(){
      onFailure(new TimeoutException("String_Node_Str" + baseUri));
    }
  }
;
  timer.schedule(timeout);
}
Program: 82484
Project: 82484
Buggy source:
/** 
 * Run the specified callback once the necessary code for it has been loaded.
 */
public static void runAsync(RunAsyncCallback callback){
  UncaughtExceptionHandler handler=sUncaughtExceptionHandler;
  if (handler == null) {
    callback.onSuccess();
  }
 else {
    try {
      callback.onSuccess();
    }
 catch (    Throwable e) {
      handler.onUncaughtException(e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Run the specified callback once the necessary code for it has been loaded.
 */
public static void runAsync(RunAsyncCallback callback){
  if (isScript()) {
    AsyncFragmentLoader.BROWSER_LOADER.logEventProgress("String_Node_Str","String_Node_Str");
    AsyncFragmentLoader.BROWSER_LOADER.logEventProgress("String_Node_Str","String_Node_Str");
  }
  UncaughtExceptionHandler handler=sUncaughtExceptionHandler;
  if (handler == null) {
    callback.onSuccess();
  }
 else {
    try {
      callback.onSuccess();
    }
 catch (    Throwable e) {
      handler.onUncaughtException(e);
    }
  }
}
Program: 82485
Project: 82485
Buggy source:
private static String downloadGroup(int splitPoint){
  return "String_Node_Str" + splitPoint;
}

Fixed version (ground truth):
private String downloadGroup(int fragment){
  return (fragment == leftoversFragment()) ? LwmLabels.LEFTOVERS_DOWNLOAD : LwmLabels.downloadGroupForExclusive(fragment);
}
Program: 82486
Project: 82486
Buggy source:
private void logFragmentLoaded(int fragment){
  String logGroup=(fragment == leftoversFragment()) ? LwmLabels.LEFTOVERS_DOWNLOAD : LwmLabels.downloadGroup(fragment);
  logEventProgress(logGroup,LwmLabels.END,fragment,null);
}

Fixed version (ground truth):
private void logFragmentLoaded(int fragment){
  String logGroup=downloadGroup(fragment);
  logEventProgress(logGroup,LwmLabels.END,fragment,null);
}