nus-yam/ex-repair huggingface dataset:
Program: 82223
Project: 82223
Buggy source:
public boolean retainAll(Collection<?> c){
  return flush(list.retainAll(c));
}

Fixed version (ground truth):
public boolean retainAll(Collection<?> c){
  boolean toRet=list.retainAll(c);
  minModified=0;
  maxModified=size();
  modified=true;
  return flush(toRet);
}
Program: 82224
Project: 82224
Buggy source:
public void execute(){
  p.animate(100,new AnimationCallback(){
    public void onLayout(    Layer layer,    double progress){
    }
    public void onAnimationComplete(){
      finishTest();
    }
  }
);
}

Fixed version (ground truth):
public void execute(){
  int offsetWidth=lp.getOffsetWidth();
  int offsetHeight=lp.getOffsetHeight();
  assertTrue(offsetWidth > 0);
  assertTrue(offsetHeight > 0);
  finishTest();
}
Program: 82225
Project: 82225
Buggy source:
@Override public void render(String value,StringBuilder sb){
  sb.append("String_Node_Str");
  if (value.charAt(0) == '-') {
    sb.append("String_Node_Str");
  }
 else {
    sb.append("String_Node_Str");
  }
  sb.append(value);
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
@Override public void render(String value,StringBuilder sb){
  if (value == null || value.length() == 0) {
    return;
  }
  sb.append("String_Node_Str");
  if (value.charAt(0) == '-') {
    sb.append("String_Node_Str");
  }
 else {
    sb.append("String_Node_Str");
  }
  sb.append(value);
  sb.append("String_Node_Str");
}
Program: 82226
Project: 82226
Buggy source:
@Override public void render(String value,StringBuilder sb){
  sb.append("String_Node_Str");
  if (highlightRegex == null || highlightRegex.length() == 0) {
    sb.append(value);
    sb.append("String_Node_Str");
    return;
  }
  RegExp regExp=RegExp.compile(highlightRegex,"String_Node_Str");
  int fromIndex=0;
  int length=value.length();
  MatchResult result;
  while (fromIndex < length) {
    result=regExp.exec(value);
    if (result == null) {
      break;
    }
    int index=result.getIndex();
    String match=result.getGroup(0);
    sb.append(value.substring(fromIndex,index));
    sb.append("String_Node_Str");
    sb.append(match);
    sb.append("String_Node_Str");
    fromIndex=index + match.length();
    regExp.setLastIndex(fromIndex);
  }
  if (fromIndex < length) {
    sb.append(value.substring(fromIndex));
  }
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
@Override public void render(String value,StringBuilder sb){
  sb.append("String_Node_Str");
  if (highlightRegex == null) {
    sb.append(value);
    sb.append("String_Node_Str");
    return;
  }
  int fromIndex=0;
  int length=value.length();
  MatchResult result;
  highlightRegex.setLastIndex(0);
  while (fromIndex < length) {
    result=highlightRegex.exec(value);
    if (result == null) {
      break;
    }
    int index=result.getIndex();
    String match=result.getGroup(0);
    sb.append(value.substring(fromIndex,index));
    sb.append("String_Node_Str");
    sb.append(match);
    sb.append("String_Node_Str");
    fromIndex=index + match.length();
    highlightRegex.setLastIndex(fromIndex);
  }
  if (fromIndex < length) {
    sb.append(value.substring(fromIndex));
  }
  sb.append("String_Node_Str");
}
Program: 82227
Project: 82227
Buggy source:
public void setHighlightRegex(String highlightRegex){
  this.highlightRegex=highlightRegex;
}

Fixed version (ground truth):
public void setHighlightRegex(String highlightText){
  if (highlightText != null && highlightText.length() > 0) {
    highlightRegex=RegExp.compile(highlightText,"String_Node_Str");
  }
 else {
    highlightRegex=null;
  }
}
Program: 82228
Project: 82228
Buggy source:
private Result getQuotes(SortedSet<String> symbols,Range range){
  int start=range.getStart();
  int end=Math.min(start + range.getLength(),symbols.size());
  if (end <= start) {
    return new Result(new StockQuoteList(0),0);
  }
  SortedSet<String> symbolsInRange=new TreeSet<String>();
  int idx=0;
  for (  String symbol : symbols) {
    if (idx >= start && idx < end) {
      symbolsInRange.add(symbol);
    }
    idx++;
  }
  SortedSet<String> symbolsToQuery=new TreeSet<String>();
  long now=System.currentTimeMillis();
  for (  String symbol : symbolsInRange) {
    Quote quote=QUOTES.get(symbol);
    if (quote == null || now - quote.getCreatedTime() >= 5000) {
      symbolsToQuery.add(symbol);
    }
 else {
    }
  }
  if (symbolsToQuery.size() > 0) {
    GoogleFinance.queryServer(symbolsToQuery,QUOTES);
  }
  StockQuoteList toRet=new StockQuoteList(start);
  for (  String symbol : symbolsInRange) {
    Quote quote=QUOTES.get(symbol);
    if (quote == null) {
      System.out.println("String_Node_Str" + symbol);
    }
 else {
      String name=Stocks.companyNamesBySymbol.get(symbol);
      PlayerStatus player=ensurePlayer();
      Integer sharesOwned=player.getSharesOwned(symbol);
      boolean favorite=player.isFavorite(symbol);
      int totalPaid=player.getAverageCostBasis(symbol);
      toRet.add(new StockQuote(symbol,name,quote.getPrice(),quote.getChange(),sharesOwned == null ? 0 : sharesOwned.intValue(),favorite,totalPaid));
    }
  }
  return new Result(toRet,symbols.size());
}

Fixed version (ground truth):
private Result getQuotes(SortedSet<String> symbols,Range range){
  int start=range.getStart();
  int end=Math.min(start + range.getLength(),symbols.size());
  if (end <= start) {
    return new Result(new StockQuoteList(0),0);
  }
  SortedSet<String> symbolsInRange=new TreeSet<String>();
  int idx=0;
  for (  String symbol : symbols) {
    if (idx >= start && idx < end) {
      symbolsInRange.add(symbol);
    }
    idx++;
  }
  SortedSet<String> symbolsToQuery=new TreeSet<String>();
  long now=System.currentTimeMillis();
  for (  String symbol : symbolsInRange) {
    Quote quote=QUOTES.get(symbol);
    if (quote == null || now - quote.getCreatedTime() >= 5000) {
      symbolsToQuery.add(symbol);
    }
 else {
    }
  }
  if (symbolsToQuery.size() > 0) {
    GoogleFinance.queryServer(symbolsToQuery,QUOTES);
  }
  StockQuoteList toRet=new StockQuoteList(start);
  for (  String symbol : symbolsInRange) {
    Quote quote=QUOTES.get(symbol);
    if (quote == null) {
      System.out.println("String_Node_Str" + symbol);
    }
 else {
      String name=Stocks.companyNamesBySymbol.get(symbol);
      PlayerStatus player=ensurePlayer();
      Integer sharesOwned=player.getSharesOwned(symbol);
      boolean favorite=player.isFavorite(symbol);
      int totalPaid=player.getAverageCostBasis(symbol);
      toRet.add(new StockQuote(symbol,name,quote.getPrice(),quote.getChange(),sharesOwned == null ? 0 : sharesOwned.intValue(),favorite,totalPaid));
    }
  }
  return new Result(toRet,toRet.size());
}
Program: 82229
Project: 82229
Buggy source:
private Result getSearchQuotes(String query,Range searchRange){
  SortedSet<String> symbols=new TreeSet<String>();
  boolean queryIsAlpha=true;
  for (int i=0; i < query.length(); i++) {
    char c=query.charAt(i);
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z')) {
      queryIsAlpha=false;
      break;
    }
  }
  query=query.toUpperCase(Locale.US);
  if (queryIsAlpha) {
    getTickersByPrefix(query,symbols);
  }
  Pattern pattern=compile("String_Node_Str" + query + "String_Node_Str");
  if (pattern != null) {
    if (!queryIsAlpha) {
      getTickersBySymbolRegex(pattern,symbols);
    }
    getTickersByNameRegex(pattern,symbols);
  }
  return getQuotes(symbols,searchRange);
}

Fixed version (ground truth):
private Result getSearchQuotes(String query,Range searchRange){
  SortedSet<String> symbols=new TreeSet<String>();
  boolean queryIsAlpha=true;
  for (int i=0; i < query.length(); i++) {
    char c=query.charAt(i);
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z')) {
      queryIsAlpha=false;
      break;
    }
  }
  query=query.toUpperCase(Locale.US);
  if (queryIsAlpha) {
    getTickersByPrefix(query,symbols);
  }
  Pattern pattern=compile("String_Node_Str" + query + "String_Node_Str");
  if (pattern != null) {
    if (!queryIsAlpha) {
      getTickersBySymbolRegex(pattern,symbols);
    }
    if (query.length() > 2) {
      getTickersByNameRegex(pattern,symbols);
    }
  }
  return getQuotes(symbols,searchRange);
}
Program: 82230
Project: 82230
Buggy source:
/** 
 * Testing for public void java.util.Date.setHours(int). 
 */
public void testSetHours(){
  for (int i=0; i < 24; i++) {
    Date accum0=create();
    accum0.setHours(i);
    assertEquals(accum0.getHours(),i);
  }
}

Fixed version (ground truth):
/** 
 * Testing for public void java.util.Date.setHours(int). 
 */
public void testSetHours(){
  for (int i=0; i < 24; i++) {
    Date accum0=create();
    if (isDst(accum0)) {
      return;
    }
    accum0.setHours(i);
    assertEquals(accum0.getHours(),i);
  }
}
Program: 82231
Project: 82231
Buggy source:
/** 
 * Returns the precision of this   {@code BigDecimal}. The precision is the number of decimal digits used to represent this decimal. It is equivalent to the number of digits of the unscaled value. The precision of   {@code 0}is   {@code 1} (independent of the scale).
 * @return the precision of this {@code BigDecimal}.
 */
public int precision(){
  if (precision > 0) {
    return precision;
  }
  int decimalDigits=1;
  double doubleUnsc=1;
  if (bitLength < 1024) {
    if (bitLength >= 54) {
      doubleUnsc=getUnscaledValue().doubleValue();
    }
 else     if (bitLength >= 1) {
      doubleUnsc=smallValue;
    }
    decimalDigits+=(int)Math.log10(Math.abs(doubleUnsc));
  }
 else {
    decimalDigits+=(bitLength - 1) * LOG10_2;
    if (getUnscaledValue().divide(Multiplication.powerOf10(decimalDigits)).signum() != 0) {
      decimalDigits++;
    }
  }
  precision=decimalDigits;
  return precision;
}

Fixed version (ground truth):
/** 
 * Returns the precision of this   {@code BigDecimal}. The precision is the number of decimal digits used to represent this decimal. It is equivalent to the number of digits of the unscaled value. The precision of   {@code 0}is   {@code 1} (independent of the scale).
 * @return the precision of this {@code BigDecimal}.
 */
public int precision(){
  if (precision > 0) {
    return precision;
  }
  double decimalDigits=1;
  double doubleUnsc=1;
  if (bitLength < SMALL_VALUE_BITS) {
    if (bitLength >= 1) {
      doubleUnsc=smallValue;
    }
    decimalDigits+=Math.log10(Math.abs(doubleUnsc));
  }
 else {
    decimalDigits+=(bitLength - 1) * LOG10_2;
    if (getUnscaledValue().divide(Multiplication.powerOf10(decimalDigits)).signum() != 0) {
      decimalDigits++;
    }
  }
  precision=(int)decimalDigits;
  return precision;
}
Program: 82232
Project: 82232
Buggy source:
private static BigDecimal addAndMult10(BigDecimal thisValue,BigDecimal augend,double diffScale){
  if (diffScale < DOUBLE_TEN_POW.length && Math.max(thisValue.bitLength,augend.bitLength + DOUBLE_TEN_POW_BIT_LENGTH[(int)diffScale]) + 1 < 54) {
    return valueOf(thisValue.smallValue + augend.smallValue * DOUBLE_TEN_POW[(int)diffScale],thisValue.scale);
  }
  return new BigDecimal(thisValue.getUnscaledValue().add(Multiplication.multiplyByTenPow(augend.getUnscaledValue(),(int)diffScale)),thisValue.scale);
}

Fixed version (ground truth):
private static BigDecimal addAndMult10(BigDecimal thisValue,BigDecimal augend,double diffScale){
  if (diffScale < DOUBLE_TEN_POW.length && Math.max(thisValue.bitLength,augend.bitLength + DOUBLE_TEN_POW_BIT_LENGTH[(int)diffScale]) + 1 < SMALL_VALUE_BITS) {
    return valueOf(thisValue.smallValue + augend.smallValue * DOUBLE_TEN_POW[(int)diffScale],thisValue.scale);
  }
  return new BigDecimal(thisValue.getUnscaledValue().add(Multiplication.multiplyByTenPow(augend.getUnscaledValue(),(int)diffScale)),thisValue.scale);
}
Program: 82234
Project: 82234
Buggy source:
/** 
 * Returns the sign of this   {@code BigDecimal}.
 * @return {@code -1} if {@code this < 0},   {@code 0} if {@code this == 0},  {@code 1} if {@code this > 0}.
 */
public int signum(){
  if (bitLength < 54) {
    return this.smallValue < 0 ? -1 : this.smallValue > 0 ? 1 : 0;
  }
  return getUnscaledValue().signum();
}

Fixed version (ground truth):
/** 
 * Returns the sign of this   {@code BigDecimal}.
 * @return {@code -1} if {@code this < 0},   {@code 0} if {@code this == 0},  {@code 1} if {@code this > 0}.
 */
public int signum(){
  if (bitLength < SMALL_VALUE_BITS) {
    return this.smallValue < 0 ? -1 : this.smallValue > 0 ? 1 : 0;
  }
  return getUnscaledValue().signum();
}
Program: 82235
Project: 82235
Buggy source:
/** 
 * It does all rounding work of the public method   {@code round(MathContext)}, performing an inplace rounding without creating a new object.
 * @param mc the {@code MathContext} for perform the rounding.
 * @see #round(MathContext)
 */
private void inplaceRound(MathContext mc){
  int mcPrecision=mc.getPrecision();
  if (approxPrecision() - mcPrecision <= 0 || mcPrecision == 0) {
    return;
  }
  int discardedPrecision=precision() - mcPrecision;
  if ((discardedPrecision <= 0)) {
    return;
  }
  if (this.bitLength < 54) {
    smallRound(mc,discardedPrecision);
    return;
  }
  BigInteger sizeOfFraction=Multiplication.powerOf10(discardedPrecision);
  BigInteger[] integerAndFraction=getUnscaledValue().divideAndRemainder(sizeOfFraction);
  double newScale=scale - discardedPrecision;
  int compRem;
  BigDecimal tempBD;
  if (integerAndFraction[1].signum() != 0) {
    compRem=(integerAndFraction[1].abs().shiftLeftOneBit().compareTo(sizeOfFraction));
    compRem=roundingBehavior(integerAndFraction[0].testBit(0) ? 1 : 0,integerAndFraction[1].signum() * (5 + compRem),mc.getRoundingMode());
    if (compRem != 0) {
      integerAndFraction[0]=integerAndFraction[0].add(BigInteger.valueOf(compRem));
    }
    tempBD=new BigDecimal(integerAndFraction[0]);
    if (tempBD.precision() > mcPrecision) {
      integerAndFraction[0]=integerAndFraction[0].divide(BigInteger.TEN);
      newScale--;
    }
  }
  scale=toIntScale(newScale);
  precision=mcPrecision;
  setUnscaledValue(integerAndFraction[0]);
}

Fixed version (ground truth):
/** 
 * It does all rounding work of the public method   {@code round(MathContext)}, performing an inplace rounding without creating a new object.
 * @param mc the {@code MathContext} for perform the rounding.
 * @see #round(MathContext)
 */
private void inplaceRound(MathContext mc){
  int mcPrecision=mc.getPrecision();
  if (approxPrecision() - mcPrecision < 0 || mcPrecision == 0) {
    return;
  }
  int discardedPrecision=precision() - mcPrecision;
  if ((discardedPrecision <= 0)) {
    return;
  }
  if (this.bitLength < SMALL_VALUE_BITS) {
    smallRound(mc,discardedPrecision);
    return;
  }
  BigInteger sizeOfFraction=Multiplication.powerOf10(discardedPrecision);
  BigInteger[] integerAndFraction=getUnscaledValue().divideAndRemainder(sizeOfFraction);
  double newScale=scale - discardedPrecision;
  int compRem;
  BigDecimal tempBD;
  if (integerAndFraction[1].signum() != 0) {
    compRem=(integerAndFraction[1].abs().shiftLeftOneBit().compareTo(sizeOfFraction));
    compRem=roundingBehavior(integerAndFraction[0].testBit(0) ? 1 : 0,integerAndFraction[1].signum() * (5 + compRem),mc.getRoundingMode());
    if (compRem != 0) {
      integerAndFraction[0]=integerAndFraction[0].add(BigInteger.valueOf(compRem));
    }
    tempBD=new BigDecimal(integerAndFraction[0]);
    if (tempBD.precision() > mcPrecision) {
      integerAndFraction[0]=integerAndFraction[0].divide(BigInteger.TEN);
      newScale--;
    }
  }
  scale=toIntScale(newScale);
  precision=mcPrecision;
  setUnscaledValue(integerAndFraction[0]);
}
Program: 82238
Project: 82238
Buggy source:
/** 
 * Returns a hash code for this   {@code BigDecimal}.
 * @return hash code for {@code this}.
 */
@Override public int hashCode(){
  if (hashCode != 0) {
    return hashCode;
  }
  if (bitLength < 54) {
    long longValue=(long)smallValue;
    hashCode=(int)(longValue & 0xffffffff);
    hashCode=33 * hashCode + (int)((longValue >> 32) & 0xffffffff);
    hashCode=17 * hashCode + (int)scale;
    return hashCode;
  }
  hashCode=17 * intVal.hashCode() + (int)scale;
  return hashCode;
}

Fixed version (ground truth):
/** 
 * Returns a hash code for this   {@code BigDecimal}.
 * @return hash code for {@code this}.
 */
@Override public int hashCode(){
  if (hashCode != 0) {
    return hashCode;
  }
  if (bitLength < SMALL_VALUE_BITS) {
    long longValue=(long)smallValue;
    hashCode=(int)(longValue & 0xffffffff);
    hashCode=33 * hashCode + (int)((longValue >> 32) & 0xffffffff);
    hashCode=17 * hashCode + (int)scale;
    return hashCode;
  }
  hashCode=17 * intVal.hashCode() + (int)scale;
  return hashCode;
}
Program: 82239
Project: 82239
Buggy source:
/** 
 * Returns a new   {@code BigDecimal} whose value is {@code this} 10^{@code n}. The scale of the result is   {@code this.scale()} - {@code n}. The precision of the result is the precision of   {@code this}. <p> This method has the same effect as   {@link #movePointRight}, except that the precision is not changed.
 * @param n number of places the decimal point has to be moved.
 * @return {@code this * 10^n}
 */
public BigDecimal scaleByPowerOfTen(int n){
  double newScale=scale - n;
  if (bitLength < 54) {
    if (smallValue == 0) {
      return zeroScaledBy(newScale);
    }
    return valueOf(smallValue,toIntScale(newScale));
  }
  return new BigDecimal(getUnscaledValue(),toIntScale(newScale));
}

Fixed version (ground truth):
/** 
 * Returns a new   {@code BigDecimal} whose value is {@code this} 10^{@code n}. The scale of the result is   {@code this.scale()} - {@code n}. The precision of the result is the precision of   {@code this}. <p> This method has the same effect as   {@link #movePointRight}, except that the precision is not changed.
 * @param n number of places the decimal point has to be moved.
 * @return {@code this * 10^n}
 */
public BigDecimal scaleByPowerOfTen(int n){
  double newScale=scale - n;
  if (bitLength < SMALL_VALUE_BITS) {
    if (smallValue == 0) {
      return zeroScaledBy(newScale);
    }
    return valueOf(smallValue,toIntScale(newScale));
  }
  return new BigDecimal(getUnscaledValue(),toIntScale(newScale));
}
Program: 82240
Project: 82240
Buggy source:
private void setUnscaledValue(BigInteger unscaledValue){
  this.intVal=unscaledValue;
  this.bitLength=unscaledValue.bitLength();
  if (this.bitLength < 54) {
    this.smallValue=unscaledValue.longValue();
  }
}

Fixed version (ground truth):
private void setUnscaledValue(BigInteger unscaledValue){
  this.intVal=unscaledValue;
  this.bitLength=unscaledValue.bitLength();
  if (this.bitLength < SMALL_VALUE_BITS) {
    this.smallValue=unscaledValue.longValue();
  }
}
Program: 82241
Project: 82241
Buggy source:
private static BigDecimal divideBigIntegers(BigInteger scaledDividend,BigInteger scaledDivisor,int scale,RoundingMode roundingMode){
  BigInteger[] quotAndRem=scaledDividend.divideAndRemainder(scaledDivisor);
  BigInteger quotient=quotAndRem[0];
  BigInteger remainder=quotAndRem[1];
  if (remainder.signum() == 0) {
    return new BigDecimal(quotient,scale);
  }
  int sign=scaledDividend.signum() * scaledDivisor.signum();
  int compRem;
  if (scaledDivisor.bitLength() < 54) {
    long rem=remainder.longValue();
    long divisor=scaledDivisor.longValue();
    compRem=longCompareTo(Math.abs(rem) << 1,Math.abs(divisor));
    compRem=roundingBehavior(quotient.testBit(0) ? 1 : 0,sign * (5 + compRem),roundingMode);
  }
 else {
    compRem=remainder.abs().shiftLeftOneBit().compareTo(scaledDivisor.abs());
    compRem=roundingBehavior(quotient.testBit(0) ? 1 : 0,sign * (5 + compRem),roundingMode);
  }
  if (compRem != 0) {
    if (quotient.bitLength() < 54) {
      return valueOf(quotient.longValue() + compRem,scale);
    }
    quotient=quotient.add(BigInteger.valueOf(compRem));
    return new BigDecimal(quotient,scale);
  }
  return new BigDecimal(quotient,scale);
}

Fixed version (ground truth):
private static BigDecimal divideBigIntegers(BigInteger scaledDividend,BigInteger scaledDivisor,int scale,RoundingMode roundingMode){
  BigInteger[] quotAndRem=scaledDividend.divideAndRemainder(scaledDivisor);
  BigInteger quotient=quotAndRem[0];
  BigInteger remainder=quotAndRem[1];
  if (remainder.signum() == 0) {
    return new BigDecimal(quotient,scale);
  }
  int sign=scaledDividend.signum() * scaledDivisor.signum();
  int compRem;
  if (scaledDivisor.bitLength() < SMALL_VALUE_BITS) {
    long rem=remainder.longValue();
    long divisor=scaledDivisor.longValue();
    compRem=longCompareTo(Math.abs(rem) << 1,Math.abs(divisor));
    compRem=roundingBehavior(quotient.testBit(0) ? 1 : 0,sign * (5 + compRem),roundingMode);
  }
 else {
    compRem=remainder.abs().shiftLeftOneBit().compareTo(scaledDivisor.abs());
    compRem=roundingBehavior(quotient.testBit(0) ? 1 : 0,sign * (5 + compRem),roundingMode);
  }
  if (compRem != 0) {
    if (quotient.bitLength() < SMALL_VALUE_BITS) {
      return valueOf(quotient.longValue() + compRem,scale);
    }
    quotient=quotient.add(BigInteger.valueOf(compRem));
    return new BigDecimal(quotient,scale);
  }
  return new BigDecimal(quotient,scale);
}
Program: 82242
Project: 82242
Buggy source:
private BigDecimal movePoint(double newScale){
  if (isZero()) {
    return zeroScaledBy(Math.max(newScale,0));
  }
  if (newScale >= 0) {
    if (bitLength < 54) {
      return valueOf(smallValue,toIntScale(newScale));
    }
    return new BigDecimal(getUnscaledValue(),toIntScale(newScale));
  }
  if (-newScale < DOUBLE_TEN_POW.length && bitLength + DOUBLE_TEN_POW_BIT_LENGTH[(int)-newScale] < 54) {
    return valueOf(smallValue * DOUBLE_TEN_POW[(int)-newScale],0);
  }
  return new BigDecimal(Multiplication.multiplyByTenPow(getUnscaledValue(),(int)-newScale),0);
}

Fixed version (ground truth):
private BigDecimal movePoint(double newScale){
  if (isZero()) {
    return zeroScaledBy(Math.max(newScale,0));
  }
  if (newScale >= 0) {
    if (bitLength < SMALL_VALUE_BITS) {
      return valueOf(smallValue,toIntScale(newScale));
    }
    return new BigDecimal(getUnscaledValue(),toIntScale(newScale));
  }
  if (-newScale < DOUBLE_TEN_POW.length && bitLength + DOUBLE_TEN_POW_BIT_LENGTH[(int)-newScale] < SMALL_VALUE_BITS) {
    return valueOf(smallValue * DOUBLE_TEN_POW[(int)-newScale],0);
  }
  return new BigDecimal(Multiplication.multiplyByTenPow(getUnscaledValue(),(int)-newScale),0);
}
Program: 82243
Project: 82243
Buggy source:
private BigDecimal(long smallValue,int scale){
  this.scale=scale;
  this.bitLength=bitLength(smallValue);
  if (bitLength < 54) {
    this.smallValue=smallValue;
  }
 else {
    this.intVal=BigInteger.valueOf(smallValue);
  }
}

Fixed version (ground truth):
private BigDecimal(long smallValue,int scale){
  this.scale=scale;
  this.bitLength=bitLength(smallValue);
  if (bitLength < SMALL_VALUE_BITS) {
    this.smallValue=smallValue;
  }
 else {
    this.intVal=BigInteger.valueOf(smallValue);
  }
}
Program: 82244
Project: 82244
Buggy source:
/** 
 * Returns   {@code true} if {@code x} is a {@code BigDecimal} instance and ifthis instance is equal to this big decimal. Two big decimals are equal if their unscaled value and their scale is equal. For example, 1.0 (10*10^(-1)) is not equal to 1.00 (100*10^(-2)). Similarly, zero instances are not equal if their scale differs.
 * @param x object to be compared with {@code this}.
 * @return true if {@code x} is a {@code BigDecimal} and {@code this == x}.
 */
@Override public boolean equals(Object x){
  if (this == x) {
    return true;
  }
  if (x instanceof BigDecimal) {
    BigDecimal x1=(BigDecimal)x;
    return x1.scale == scale && (bitLength < 54 ? (x1.smallValue == smallValue) : intVal.equals(x1.intVal));
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if {@code x} is a {@code BigDecimal} instance and ifthis instance is equal to this big decimal. Two big decimals are equal if their unscaled value and their scale is equal. For example, 1.0 (10*10^(-1)) is not equal to 1.00 (100*10^(-2)). Similarly, zero instances are not equal if their scale differs.
 * @param x object to be compared with {@code this}.
 * @return true if {@code x} is a {@code BigDecimal} and {@code this == x}.
 */
@Override public boolean equals(Object x){
  if (this == x) {
    return true;
  }
  if (x instanceof BigDecimal) {
    BigDecimal x1=(BigDecimal)x;
    return x1.scale == scale && (bitLength < SMALL_VALUE_BITS ? (x1.smallValue == smallValue) : intVal.equals(x1.intVal));
  }
  return false;
}
Program: 82245
Project: 82245
Buggy source:
private void record(JsExpression x,JsContext<JsExpression> ctx){
  if (ctx.isLvalue()) {
    return;
  }
 else   if (x.getSourceInfo().getStartLine() == lastLine && (!recordFileNames || x.getSourceInfo().getFileName().equals(lastFile))) {
    return;
  }
  SourceInfo info=x.getSourceInfo().makeChild(JsStackEmulator.class,"String_Node_Str");
  JsExpression location=program.getStringLiteral(info,String.valueOf(lastLine=info.getStartLine()));
  if (recordFileNames) {
    JsStringLiteral stringLit=program.getStringLiteral(info,baseName(lastFile=info.getFileName()) + "String_Node_Str");
    location=new JsBinaryOperation(info,JsBinaryOperator.ADD,stringLit,location);
  }
  JsArrayAccess access=new JsArrayAccess(info,lineNumbers.makeRef(info),stackIndexRef(info));
  JsBinaryOperation asg=new JsBinaryOperation(info,JsBinaryOperator.ASG,access,location);
  JsBinaryOperation comma=new JsBinaryOperation(info,JsBinaryOperator.COMMA,asg,x);
  ctx.replaceMe(comma);
}

Fixed version (ground truth):
private void record(JsExpression x,JsContext<JsExpression> ctx){
  if (ctx.isLvalue()) {
    return;
  }
 else   if (nodesInRefContext.contains(x)) {
    return;
  }
 else   if (x.getSourceInfo().getStartLine() == lastLine && (!recordFileNames || x.getSourceInfo().getFileName().equals(lastFile))) {
    return;
  }
  SourceInfo info=x.getSourceInfo().makeChild(JsStackEmulator.class,"String_Node_Str");
  JsExpression location=program.getStringLiteral(info,String.valueOf(lastLine=info.getStartLine()));
  if (recordFileNames) {
    JsStringLiteral stringLit=program.getStringLiteral(info,baseName(lastFile=info.getFileName()) + "String_Node_Str");
    location=new JsBinaryOperation(info,JsBinaryOperator.ADD,stringLit,location);
  }
  JsArrayAccess access=new JsArrayAccess(info,lineNumbers.makeRef(info),stackIndexRef(info));
  JsBinaryOperation asg=new JsBinaryOperation(info,JsBinaryOperator.ASG,access,location);
  JsBinaryOperation comma=new JsBinaryOperation(info,JsBinaryOperator.COMMA,asg,x);
  ctx.replaceMe(comma);
}
Program: 82246
Project: 82246
Buggy source:
public void traverse(JsVisitor v,JsContext<JsStatement> ctx){
  if (v.visit(this,ctx)) {
    if (iterExpr != null) {
      iterExpr=v.accept(iterExpr);
    }
    objExpr=v.accept(objExpr);
    body=v.accept(body);
  }
  v.endVisit(this,ctx);
}

Fixed version (ground truth):
public void traverse(JsVisitor v,JsContext<JsStatement> ctx){
  if (v.visit(this,ctx)) {
    if (iterExpr != null) {
      iterExpr=v.acceptLvalue(iterExpr);
    }
    objExpr=v.accept(objExpr);
    body=v.accept(body);
  }
  v.endVisit(this,ctx);
}
Program: 82247
Project: 82247
Buggy source:
/** 
 * Closes the menu bar.
 * @deprecated Use {@link #addCloseHandler(CloseHandler)} instead
 */
@Deprecated public void onPopupClosed(PopupPanel sender,boolean autoClosed){
  if (autoClosed) {
    closeAllParents();
  }
  onHide(autoClosed);
  CloseEvent.fire(MenuBar.this,sender);
  shownChildMenu=null;
  popup=null;
  if (parentMenu != null && parentMenu.popup != null) {
    parentMenu.popup.setPreviewingAllNativeEvents(true);
  }
}

Fixed version (ground truth):
/** 
 * Closes the menu bar.
 * @deprecated Use {@link #addCloseHandler(CloseHandler)} instead
 */
@Deprecated public void onPopupClosed(PopupPanel sender,boolean autoClosed){
  if (autoClosed) {
    closeAllParents();
  }
  onHide(!autoClosed);
  CloseEvent.fire(MenuBar.this,sender);
  shownChildMenu=null;
  popup=null;
  if (parentMenu != null && parentMenu.popup != null) {
    parentMenu.popup.setPreviewingAllNativeEvents(true);
  }
}
Program: 82248
Project: 82248
Buggy source:
public void parse(XMLElement elem,String fieldName,JClassType type,UiBinderWriter writer) throws UnableToCompleteException {
  String debugId=elem.consumeStringAttribute("String_Node_Str",null);
  if (null != debugId) {
    writer.addStatement("String_Node_Str",fieldName,debugId);
  }
  String[] styleNames=elem.consumeStringArrayAttribute("String_Node_Str");
  for (  String s : styleNames) {
    writer.addStatement("String_Node_Str",fieldName,s);
  }
  styleNames=elem.consumeStringArrayAttribute("String_Node_Str");
  for (  String s : styleNames) {
    writer.addStatement("String_Node_Str",fieldName,s);
  }
}

Fixed version (ground truth):
public void parse(XMLElement elem,String fieldName,JClassType type,UiBinderWriter writer) throws UnableToCompleteException {
  String debugId=elem.consumeStringAttribute("String_Node_Str",null);
  if (null != debugId) {
    writer.addStatement("String_Node_Str",fieldName,debugId);
  }
  String styleName=elem.consumeStringAttribute("String_Node_Str",null);
  String stylePrimaryName=elem.consumeStringAttribute("String_Node_Str",null);
  if (null != styleName && null != stylePrimaryName) {
    writer.die("String_Node_Str" + "String_Node_Str",elem);
  }
  if (null != styleName) {
    writer.addStatement("String_Node_Str",fieldName,styleName);
  }
  if (null != stylePrimaryName) {
    writer.addStatement("String_Node_Str",fieldName,stylePrimaryName);
  }
  String[] extraStyleNames=elem.consumeStringArrayAttribute("String_Node_Str");
  for (  String s : extraStyleNames) {
    writer.addStatement("String_Node_Str",fieldName,s);
  }
  extraStyleNames=elem.consumeStringArrayAttribute("String_Node_Str");
  for (  String s : extraStyleNames) {
    writer.addStatement("String_Node_Str",fieldName,s);
  }
}
Program: 82249
Project: 82249
Buggy source:
private void registerParsers(){
  addElementParser("String_Node_Str","String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
}

Fixed version (ground truth):
private void registerParsers(){
  addElementParser("String_Node_Str","String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
}
Program: 82250
Project: 82250
Buggy source:
public void testHappy() throws UnableToCompleteException, SAXException, IOException {
  StringBuffer b=new StringBuffer();
  b.append("String_Node_Str");
  b.append("String_Node_Str");
  b.append("String_Node_Str");
  String[] expected={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  tester.parse(b.toString());
  Iterator<String> i=tester.writer.statements.iterator();
  for (  String e : expected) {
    assertEquals(e,i.next());
  }
  assertFalse(i.hasNext());
  assertNull(tester.logger.died);
}

Fixed version (ground truth):
public void testHappy() throws UnableToCompleteException, SAXException, IOException {
  StringBuffer b=new StringBuffer();
  b.append("String_Node_Str" + "String_Node_Str");
  b.append("String_Node_Str");
  b.append("String_Node_Str");
  String[] expected={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  tester.parse(b.toString());
  Iterator<String> i=tester.writer.statements.iterator();
  for (  String e : expected) {
    assertEquals(e,i.next());
  }
  assertFalse(i.hasNext());
  assertNull(tester.logger.died);
}
Program: 82251
Project: 82251
Buggy source:
@Override public void gwtTearDown() throws Exception {
  RootPanel.get().clear();
  super.gwtTearDown();
}

Fixed version (ground truth):
@Override public void gwtTearDown() throws Exception {
  domUi.root.getParentElement().removeChild(domUi.root);
  RootPanel.get().clear();
  super.gwtTearDown();
}
Program: 82252
Project: 82252
Buggy source:
public void testAddStyleNamesAndDebugId(){
  Label l=widgetUi.lblDebugId;
  assertEquals("String_Node_Str",l.getElement().getId());
  WidgetBasedUiExternalResources resources=GWT.create(WidgetBasedUiExternalResources.class);
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains(resources.style().prettyText()));
}

Fixed version (ground truth):
public void testAddStyleNamesAndDebugId(){
  Label l=widgetUi.lblDebugId;
  assertEquals("String_Node_Str",l.getElement().getId());
  assertEquals("String_Node_Str",l.getStylePrimaryName());
  WidgetBasedUiExternalResources resources=GWT.create(WidgetBasedUiExternalResources.class);
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains("String_Node_Str"));
  assertTrue(l.getStyleName().contains("String_Node_Str" + resources.style().prettyText()));
}
Program: 82253
Project: 82253
Buggy source:
/** 
 * Extract the module's base path from the current request.
 * @return the module's base path, modulo protocol and host, as reported by{@link com.google.gwt.core.client.GWT#getModuleBaseURL()} or<code>null</code> if the request did not contain the {@value com.google.gwt.user.client.rpc.RpcRequestBuilder#MODULE_BASE_HEADER} header
 */
protected final String getRequestModuleBasePath(){
  try {
    String header=getThreadLocalRequest().getHeader(MODULE_BASE_HEADER);
    if (header == null) {
      return null;
    }
    return new URL(header).getPath();
  }
 catch (  MalformedURLException e) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Extract the module's base path from the current request.
 * @return the module's base path, modulo protocol and host, as reported by{@link com.google.gwt.core.client.GWT#getModuleBaseURL()} or<code>null</code> if the request did not contain the {@value com.google.gwt.user.client.rpc.RpcRequestBuilder#MODULE_BASE_HEADER} header
 */
protected final String getRequestModuleBasePath(){
  try {
    String header=getThreadLocalRequest().getHeader(MODULE_BASE_HEADER);
    if (header == null) {
      return null;
    }
    String path=new URL(header).getPath();
    String contextPath=getThreadLocalRequest().getContextPath();
    if (!path.startsWith(contextPath)) {
      return null;
    }
    return path.substring(contextPath.length());
  }
 catch (  MalformedURLException e) {
    return null;
  }
}
Program: 82254
Project: 82254
Buggy source:
/** 
 * Clear the opacity css property.
 */
public final void clearOpacity(){
  clearProperty(STYLE_OPACITY);
}

Fixed version (ground truth):
/** 
 * Clear the opacity css property.
 */
public final void clearOpacity(){
  DOMImpl.impl.cssClearOpacity(this);
}
Program: 82255
Project: 82255
Buggy source:
/** 
 * Set the opacity css property.
 */
public final void setOpacity(double value){
  setProperty(STYLE_OPACITY,value + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Set the opacity css property.
 */
public final void setOpacity(double value){
  DOMImpl.impl.cssSetOpacity(this,value);
}
Program: 82256
Project: 82256
Buggy source:
public Tab(Widget child){
  super(Document.get().createDivElement());
  getElement().appendChild(inner=Document.get().createDivElement());
  setWidget(child);
  setStyleName("String_Node_Str");
  inner.setClassName("String_Node_Str");
  getElement().getStyle().setProperty("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public Tab(Widget child){
  super(Document.get().createDivElement());
  getElement().appendChild(inner=Document.get().createDivElement());
  setWidget(child);
  setStyleName("String_Node_Str");
  inner.setClassName("String_Node_Str");
  getElement().getStyle().setFloat(Style.Float.LEFT);
}
Program: 82257
Project: 82257
Buggy source:
private void writeClassOpen(IndentedWriter w){
  w.write("String_Node_Str",implClassName,uiRootType.getName(),uiOwnerType.getName(),baseClass.getName());
  w.indent();
}

Fixed version (ground truth):
private void writeClassOpen(IndentedWriter w){
  w.write("String_Node_Str",implClassName,uiRootType.getParameterizedQualifiedSourceName(),uiOwnerType.getParameterizedQualifiedSourceName(),baseClass.getParameterizedQualifiedSourceName());
  w.indent();
}
Program: 82258
Project: 82258
Buggy source:
/** 
 * Writes the UiBinder's source.
 */
private void writeBinder(IndentedWriter w,String rootField) throws UnableToCompleteException {
  writePackage(w);
  writeImports(w);
  w.newline();
  writeClassOpen(w);
  writeStatics(w);
  w.newline();
  w.write("String_Node_Str",uiRootType.getName(),uiOwnerType.getName());
  w.indent();
  w.newline();
  writeGwtFields(w);
  w.newline();
  writeAddedStatements(w);
  w.newline();
  writeInitStatements(w);
  w.newline();
  writeHandlers(w);
  w.newline();
  writeOwnerFieldSetters(w);
  writeCssInjectors(w);
  w.write("String_Node_Str",rootField);
  w.outdent();
  w.write("String_Node_Str");
  w.outdent();
  w.write("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Writes the UiBinder's source.
 */
private void writeBinder(IndentedWriter w,String rootField) throws UnableToCompleteException {
  writePackage(w);
  writeImports(w);
  w.newline();
  writeClassOpen(w);
  writeStatics(w);
  w.newline();
  w.write("String_Node_Str",uiRootType.getParameterizedQualifiedSourceName(),uiOwnerType.getParameterizedQualifiedSourceName());
  w.indent();
  w.newline();
  writeGwtFields(w);
  w.newline();
  writeAddedStatements(w);
  w.newline();
  writeInitStatements(w);
  w.newline();
  writeHandlers(w);
  w.newline();
  writeOwnerFieldSetters(w);
  writeCssInjectors(w);
  w.write("String_Node_Str",rootField);
  w.outdent();
  w.write("String_Node_Str");
  w.outdent();
  w.write("String_Node_Str");
}
Program: 82259
Project: 82259
Buggy source:
private void registerParsers(){
  addElementParser("String_Node_Str","String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
}

Fixed version (ground truth):
private void registerParsers(){
  addElementParser("String_Node_Str","String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
  addWidgetParser("String_Node_Str");
}
Program: 82260
Project: 82260
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,formatCode("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.
 * @param fieldName the field to intialize
 * @param type the type of the field
 * @param arguments to the constructor call
 */
public void setFieldInitializerAsConstructor(String fieldName,JClassType type,String... args){
  setFieldInitializer(fieldName,formatCode("String_Node_Str",type.getQualifiedSourceName(),asCommaSeparatedList(args)));
}
Program: 82261
Project: 82261
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(FieldWriterOfGeneratedCssResourceTest.class);
  suite.addTestSuite(GwtResourceEntityResolverTest.class);
  suite.addTestSuite(HandlerEvaluatorTest.class);
  suite.addTestSuite(TokenatorTest.class);
  suite.addTestSuite(XMLElementTest.class);
  suite.addTestSuite(OwnerClassTest.class);
  suite.addTestSuite(OwnerFieldClassTest.class);
  suite.addTestSuite(OwnerFieldTest.class);
  suite.addTestSuite(CssNameConverterTest.class);
  suite.addTestSuite(IntAttributeParserTest.class);
  suite.addTestSuite(FieldReferenceConverterTest.class);
  suite.addTestSuite(StrictAttributeParserTest.class);
  suite.addTestSuite(StringAttributeParserTest.class);
  suite.addTestSuite(LengthAttributeParserTest.class);
  suite.addTestSuite(DialogBoxParserTest.class);
  suite.addTestSuite(DockLayoutPanelParserTest.class);
  suite.addTestSuite(IsEmptyParserTest.class);
  suite.addTestSuite(LayoutPanelParserTest.class);
  suite.addTestSuite(StackLayoutPanelParserTest.class);
  suite.addTestSuite(TabLayoutPanelParserTest.class);
  suite.addTestSuite(UIObjectParserTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(FieldWriterOfGeneratedCssResourceTest.class);
  suite.addTestSuite(GwtResourceEntityResolverTest.class);
  suite.addTestSuite(HandlerEvaluatorTest.class);
  suite.addTestSuite(TokenatorTest.class);
  suite.addTestSuite(XMLElementTest.class);
  suite.addTestSuite(OwnerClassTest.class);
  suite.addTestSuite(OwnerFieldClassTest.class);
  suite.addTestSuite(OwnerFieldTest.class);
  suite.addTestSuite(CssNameConverterTest.class);
  suite.addTestSuite(IntAttributeParserTest.class);
  suite.addTestSuite(FieldReferenceConverterTest.class);
  suite.addTestSuite(StrictAttributeParserTest.class);
  suite.addTestSuite(StringAttributeParserTest.class);
  suite.addTestSuite(LengthAttributeParserTest.class);
  suite.addTestSuite(DialogBoxParserTest.class);
  suite.addTestSuite(DockLayoutPanelParserTest.class);
  suite.addTestSuite(ImageParserTest.class);
  suite.addTestSuite(IsEmptyParserTest.class);
  suite.addTestSuite(LayoutPanelParserTest.class);
  suite.addTestSuite(StackLayoutPanelParserTest.class);
  suite.addTestSuite(TabLayoutPanelParserTest.class);
  suite.addTestSuite(UIObjectParserTest.class);
  return suite;
}
Program: 82262
Project: 82262
Buggy source:
/** 
 * @return a pale reflection of com.google.gwt.user.ui, plus{@link JavaResourceBase#getStandardResources}
 */
public static Set<Resource> getUiResources(){
  Set<Resource> rtn=new HashSet<Resource>(Arrays.asList(JavaResourceBase.getStandardResources()));
  rtn.add(BUTTON);
  rtn.add(CLICK_EVENT);
  rtn.add(CLICK_HANDLER);
  rtn.add(DIALOG_BOX);
  rtn.add(DOCK_LAYOUT_PANEL);
  rtn.add(EVENT_HANDLER);
  rtn.add(GWT_EVENT);
  rtn.add(HANDLER_REGISTRATION);
  rtn.add(HAS_CLICK_HANDLERS);
  rtn.add(HAS_HORIZONTAL_ALIGNMENT);
  rtn.add(HAS_VERTICAL_ALIGNMENT);
  rtn.add(LABEL);
  rtn.add(LAYOUT_PANEL);
  rtn.add(MOUSE_OVER_EVENT);
  rtn.add(MOUSE_OVER_HANDLER);
  rtn.add(SPLIT_LAYOUT_PANEL);
  rtn.add(STACK_LAYOUT_PANEL);
  rtn.add(STYLE);
  rtn.add(TAB_LAYOUT_PANEL);
  rtn.add(UI_OBJECT);
  rtn.add(UI_BINDER);
  rtn.add(UI_FACTORY);
  rtn.add(WIDGET);
  return rtn;
}

Fixed version (ground truth):
/** 
 * @return a pale reflection of com.google.gwt.user.ui, plus{@link JavaResourceBase#getStandardResources}
 */
public static Set<Resource> getUiResources(){
  Set<Resource> rtn=new HashSet<Resource>(Arrays.asList(JavaResourceBase.getStandardResources()));
  rtn.add(BUTTON);
  rtn.add(CLICK_EVENT);
  rtn.add(CLICK_HANDLER);
  rtn.add(DIALOG_BOX);
  rtn.add(DOCK_LAYOUT_PANEL);
  rtn.add(EVENT_HANDLER);
  rtn.add(GWT_EVENT);
  rtn.add(IMAGE);
  rtn.add(IMAGE_RESOURCE);
  rtn.add(HANDLER_REGISTRATION);
  rtn.add(HAS_CLICK_HANDLERS);
  rtn.add(HAS_HORIZONTAL_ALIGNMENT);
  rtn.add(HAS_VERTICAL_ALIGNMENT);
  rtn.add(LABEL);
  rtn.add(LAYOUT_PANEL);
  rtn.add(MOUSE_OVER_EVENT);
  rtn.add(MOUSE_OVER_HANDLER);
  rtn.add(SPLIT_LAYOUT_PANEL);
  rtn.add(STACK_LAYOUT_PANEL);
  rtn.add(STYLE);
  rtn.add(TAB_LAYOUT_PANEL);
  rtn.add(UI_OBJECT);
  rtn.add(UI_BINDER);
  rtn.add(UI_FACTORY);
  rtn.add(WIDGET);
  return rtn;
}
Program: 82263
Project: 82263
Buggy source:
public void testImageResourceInImageWidget(){
  assertEquals(widgetUi.prettyImage.getWidth(),widgetUi.babyWidget.getOffsetWidth());
  assertEquals(widgetUi.prettyImage.getHeight(),widgetUi.babyWidget.getOffsetHeight());
  assertEquals(widgetUi.prettyImage.getTop(),widgetUi.babyWidget.getOriginTop());
  assertEquals(widgetUi.prettyImage.getLeft(),widgetUi.babyWidget.getOriginLeft());
}

Fixed version (ground truth):
public void testImageResourceInImageWidget(){
  ImageResource resource=widgetUi.prettyImage;
  Image widget=widgetUi.babyWidget;
  assertEquals(resource.getWidth(),widget.getOffsetWidth());
  assertEquals(resource.getHeight(),widget.getOffsetHeight());
  assertEquals(resource.getTop(),widget.getOriginTop());
  assertEquals(resource.getLeft(),widget.getOriginLeft());
  assertEquals("String_Node_Str",widget.getAltText());
  assertEquals("String_Node_Str",widget.getStyleName());
}
Program: 82264
Project: 82264
Buggy source:
/** 
 * Set the bind address for the web server socket. <p> Will be called before   {@link #start(TreeLogger,int,File)}, if at all. If not called, the SCL should listen on all addresses.
 * @param bindAddress host name or IP address, suitable for use with{@link InetAddress#getByName(String)}
 */
public void setBindAddress(String bindAddress){
}

Fixed version (ground truth):
/** 
 * Set the bind address for the web server socket. <p> Will be called before   {@link #start(TreeLogger,int,File)}, if at all. If not called, the SCL should listen on all addresses.
 * @param bindAddress host name or IP address, suitable for use with{@link java.net.InetAddress#getByName(String)}
 */
public void setBindAddress(String bindAddress){
}