nus-yam/ex-repair huggingface dataset:
Program: 54881
Project: 54881
Buggy source:
private boolean computeHasClinitRecursive(JReferenceType type,Set<JReferenceType> computed,Set<JReferenceType> alreadySeen){
  alreadySeen.add(type);
  if (computed.contains(type)) {
    return hasClinitSet.contains(type);
  }
  JMethod method=type.methods.get(0);
  assert(JProgram.isClinit(method));
  CheckClinitVisitor v=new CheckClinitVisitor();
  v.accept(method);
  if (v.hasNonClinitCalls()) {
    return true;
  }
  for (  JReferenceType target : v.getClinitTargets()) {
    if (alreadySeen.contains(target)) {
      continue;
    }
    if (computeHasClinitRecursive(target,computed,alreadySeen)) {
      return true;
    }
 else {
      continue;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean computeHasClinitRecursive(JReferenceType type,Set<JReferenceType> computed,Set<JReferenceType> alreadySeen){
  alreadySeen.add(type);
  if (computed.contains(type)) {
    return hasClinitSet.contains(type);
  }
  JMethod method=type.methods.get(0);
  assert(JProgram.isClinit(method));
  CheckClinitVisitor v=new CheckClinitVisitor();
  v.accept(method);
  if (v.hasLiveCode()) {
    return true;
  }
  for (  JReferenceType target : v.getClinitTargets()) {
    if (alreadySeen.contains(target)) {
      continue;
    }
    if (computeHasClinitRecursive(target,computed,alreadySeen)) {
      return true;
    }
 else {
      continue;
    }
  }
  return false;
}
Program: 54882
Project: 54882
Buggy source:
@Override public boolean visit(JMultiExpression x,Context ctx){
  for (  JExpression expr : x.exprs) {
    if (canContainClinitCalls(expr)) {
      accept(expr);
    }
 else {
      hasNonClinitCalls=true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean visit(JMultiExpression x,Context ctx){
  for (  JExpression expr : x.exprs) {
    if (mightBeDeadCode(expr)) {
      accept(expr);
    }
 else {
      hasLiveCode=true;
    }
  }
  return false;
}
Program: 54883
Project: 54883
Buggy source:
public static Boolean valueOf(String s){
  if (s != null && s.equalsIgnoreCase("String_Node_Str")) {
    return TRUE;
  }
 else {
    return FALSE;
  }
}

Fixed version (ground truth):
public static Boolean valueOf(String s){
  return valueOf(parseBoolean(s));
}
Program: 54884
Project: 54884
Buggy source:
@Override public int hashCode(){
  final int hashCodeForTrue=1231;
  final int hashCodeForFalse=1237;
  return value ? hashCodeForTrue : hashCodeForFalse;
}

Fixed version (ground truth):
@Override public int hashCode(){
  return value ? 1231 : 1237;
}
Program: 54885
Project: 54885
Buggy source:
public int compareTo(Boolean other){
  if (!value) {
    return other.value ? -1 : 0;
  }
 else {
    return other.value ? 0 : 1;
  }
}

Fixed version (ground truth):
public int compareTo(Boolean other){
  return (this.value == other.value) ? 0 : (this.value ? 1 : -1);
}
Program: 54886
Project: 54886
Buggy source:
public Boolean(String s){
  this((s != null) && s.equalsIgnoreCase("String_Node_Str"));
}

Fixed version (ground truth):
public Boolean(String s){
  this(parseBoolean(s));
}
Program: 54888
Project: 54888
Buggy source:
/** 
 * Evaluates a trusted JSON string and returns its JSONValue representation. CAUTION! For efficiency, this method is implemented using the JavaScript <code>eval()</code> function, which can execute arbitrary script. DO NOT pass an untrusted string into this method.
 * @param jsonString a JSON object to parse
 * @return a JSONValue that has been built by parsing the JSON string
 * @throws NullPointerException if <code>jsonString</code> is<code>null</code>
 * @throws IllegalArgumentException if <code>jsonString</code> is empty
 */
public static JSONValue parse(String jsonString){
  if (jsonString == null) {
    throw new NullPointerException();
  }
  if (jsonString == "String_Node_Str") {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    return evaluate(jsonString);
  }
 catch (  JavaScriptException ex) {
    throw new JSONException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Evaluates a trusted JSON string and returns its JSONValue representation. CAUTION! For efficiency, this method is implemented using the JavaScript <code>eval()</code> function, which can execute arbitrary script. DO NOT pass an untrusted string into this method.
 * @param jsonString a JSON object to parse
 * @return a JSONValue that has been built by parsing the JSON string
 * @throws NullPointerException if <code>jsonString</code> is<code>null</code>
 * @throws IllegalArgumentException if <code>jsonString</code> is empty
 */
public static JSONValue parse(String jsonString){
  if (jsonString == null) {
    throw new NullPointerException();
  }
  if (jsonString.length() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    return evaluate(jsonString);
  }
 catch (  JavaScriptException ex) {
    throw new JSONException(ex);
  }
}
Program: 54889
Project: 54889
Buggy source:
/** 
 * Ensure a number is displayed with two digits.
 * @return A two-character representation of the number.
 */
@SuppressWarnings("String_Node_Str") private static String padTwo(int number){
  if (number < 10) {
    return "String_Node_Str" + number;
  }
 else {
    return String.valueOf(number);
  }
}

Fixed version (ground truth):
/** 
 * Ensure a number is displayed with two digits.
 * @return a two-character base 10 representation of the number
 */
protected static String padTwo(int number){
  if (number < 10) {
    return "String_Node_Str" + number;
  }
 else {
    return String.valueOf(number);
  }
}
Program: 54890
Project: 54890
Buggy source:
public float invokeNativeFloat(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Float value=JsValueGlue.get(result,null,Float.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.floatValue();
}

Fixed version (ground truth):
public float invokeNativeFloat(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Float value=JsValueGlue.get(result,null,Float.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.floatValue();
}
Program: 54891
Project: 54891
Buggy source:
public short invokeNativeShort(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Short value=JsValueGlue.get(result,null,Short.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.shortValue();
}

Fixed version (ground truth):
public short invokeNativeShort(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Short value=JsValueGlue.get(result,null,Short.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.shortValue();
}
Program: 54892
Project: 54892
Buggy source:
public char invokeNativeChar(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Character value=JsValueGlue.get(result,null,Character.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.charValue();
}

Fixed version (ground truth):
public char invokeNativeChar(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Character value=JsValueGlue.get(result,null,Character.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.charValue();
}
Program: 54893
Project: 54893
Buggy source:
public double invokeNativeDouble(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Double value=JsValueGlue.get(result,null,Double.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.doubleValue();
}

Fixed version (ground truth):
public double invokeNativeDouble(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Double value=JsValueGlue.get(result,null,Double.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.doubleValue();
}
Program: 54894
Project: 54894
Buggy source:
public int invokeNativeInt(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Integer value=JsValueGlue.get(result,null,Integer.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.intValue();
}

Fixed version (ground truth):
public int invokeNativeInt(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Integer value=JsValueGlue.get(result,null,Integer.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.intValue();
}
Program: 54895
Project: 54895
Buggy source:
public byte invokeNativeByte(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Byte value=JsValueGlue.get(result,null,Byte.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.byteValue();
}

Fixed version (ground truth):
public byte invokeNativeByte(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Byte value=JsValueGlue.get(result,null,Byte.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.byteValue();
}
Program: 54896
Project: 54896
Buggy source:
public Object invokeNativeObject(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  return JsValueGlue.get(result,getIsolatedClassLoader(),Object.class,"String_Node_Str" + name + "String_Node_Str");
}

Fixed version (ground truth):
public Object invokeNativeObject(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  return JsValueGlue.get(result,getIsolatedClassLoader(),Object.class,msgPrefix);
}
Program: 54897
Project: 54897
Buggy source:
public boolean invokeNativeBoolean(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Boolean value=JsValueGlue.get(result,getIsolatedClassLoader(),boolean.class,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.booleanValue();
}

Fixed version (ground truth):
public boolean invokeNativeBoolean(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Boolean value=JsValueGlue.get(result,getIsolatedClassLoader(),boolean.class,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.booleanValue();
}
Program: 54898
Project: 54898
Buggy source:
public long invokeNativeLong(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix="String_Node_Str" + name + "String_Node_Str";
  Long value=JsValueGlue.get(result,null,Long.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.longValue();
}

Fixed version (ground truth):
public long invokeNativeLong(String name,Object jthis,Class<?>[] types,Object[] args) throws Throwable {
  JsValue result=invokeNative(name,jthis,types,args);
  String msgPrefix=composeResultErrorMsgPrefix(name,"String_Node_Str");
  Long value=JsValueGlue.get(result,null,Long.TYPE,msgPrefix);
  if (value == null) {
    throw new HostedModeException(msgPrefix + "String_Node_Str");
  }
  return value.longValue();
}
Program: 54899
Project: 54899
Buggy source:
@Override protected void onTypeRef(SourceTypeBinding referencedType,CompilationUnitDeclaration unitOfReferrer){
  String referencedFn=String.valueOf(referencedType.getFileName());
  CompilationUnitDeclaration referencedCud=cudsByFileName.get(referencedFn);
  if (referencedCud == null) {
    String referrerFn=String.valueOf(unitOfReferrer.getFileName());
    if (cudsByFileName.containsKey(referrerFn) && !pendingRemovals.contains(referrerFn)) {
      TreeLogger branch=logger.branch(TreeLogger.TRACE,"String_Node_Str" + referrerFn + "String_Node_Str",null);
      final String badTypeName=CharOperation.toString(referencedType.compoundName);
      branch.branch(TreeLogger.TRACE,"String_Node_Str" + badTypeName,null);
      pendingRemovals.add(referrerFn);
    }
  }
}

Fixed version (ground truth):
@Override protected void onTypeRef(SourceTypeBinding referencedType,CompilationUnitDeclaration unitOfReferrer){
  String referencedFn=String.valueOf(referencedType.getFileName());
  if (!unchangedCudsByFileName.containsKey(referencedFn) && !changedCudsByFileName.containsKey(referencedFn)) {
    String referrerFn=String.valueOf(unitOfReferrer.getFileName());
    if (changedCudsByFileName.containsKey(referrerFn) && !pendingRemovals.contains(referrerFn)) {
      TreeLogger branch=logger.branch(TreeLogger.TRACE,"String_Node_Str" + referrerFn + "String_Node_Str",null);
      final String badTypeName=CharOperation.toString(referencedType.compoundName);
      branch.branch(TreeLogger.TRACE,"String_Node_Str" + badTypeName,null);
      pendingRemovals.add(referrerFn);
    }
  }
}
Program: 54900
Project: 54900
Buggy source:
private static void removeUnitsWithErrors(TreeLogger logger,Map<String,CompilationUnitDeclaration> cudsByFileName){
  boolean anyRemoved=false;
  for (Iterator<CompilationUnitDeclaration> iter=cudsByFileName.values().iterator(); iter.hasNext(); ) {
    CompilationUnitDeclaration cud=iter.next();
    CompilationResult result=cud.compilationResult;
    IProblem[] errors=result.getErrors();
    if (errors != null && errors.length > 0) {
      anyRemoved=true;
      iter.remove();
      String fileName=CharOperation.charToString(cud.getFileName());
      char[] source=cud.compilationResult.compilationUnit.getContents();
      Util.maybeDumpSource(logger,fileName,source,String.valueOf(cud.getMainTypeName()));
      logger.log(TreeLogger.TRACE,"String_Node_Str" + fileName + "String_Node_Str",null);
    }
  }
  if (anyRemoved) {
    removeInfectedUnits(logger,cudsByFileName);
  }
}

Fixed version (ground truth):
private static void removeUnitsWithErrors(TreeLogger logger,Map<String,CompilationUnitDeclaration> changedCudsByFileName,Map<String,CompilationUnitDeclaration> unchangedCudsByFileName){
  boolean anyRemoved=false;
  for (Iterator<CompilationUnitDeclaration> iter=changedCudsByFileName.values().iterator(); iter.hasNext(); ) {
    CompilationUnitDeclaration cud=iter.next();
    CompilationResult result=cud.compilationResult;
    IProblem[] errors=result.getErrors();
    if (errors != null && errors.length > 0) {
      anyRemoved=true;
      iter.remove();
      String fileName=CharOperation.charToString(cud.getFileName());
      char[] source=cud.compilationResult.compilationUnit.getContents();
      Util.maybeDumpSource(logger,fileName,source,String.valueOf(cud.getMainTypeName()));
      logger.log(TreeLogger.TRACE,"String_Node_Str" + fileName + "String_Node_Str",null);
    }
  }
  if (anyRemoved) {
    removeInfectedUnits(logger,changedCudsByFileName,unchangedCudsByFileName);
  }
}
Program: 54903
Project: 54903
Buggy source:
@Test public void testConstructorFromInjector(){
  provider=new GuiceInstanceProvider(createInjector());
  assertEquals("String_Node_Str",provider.getInstance(Service.class,"String_Node_Str").sayHello());
}

Fixed version (ground truth):
@Test public void testConstructorFromInjector(){
  InstanceProvider provider=new GuiceInstanceProvider(createInjector());
  assertEquals("String_Node_Str",provider.getInstance(Service.class,"String_Node_Str").sayHello());
}
Program: 54904
Project: 54904
Buggy source:
@Test public void testConstructorFromModule(){
  assertEquals("String_Node_Str",provider.getInstance(Service.class,"String_Node_Str").sayHello());
}

Fixed version (ground truth):
@Test public void testConstructorFromModule(){
  assertEquals("String_Node_Str",getProvider().getInstance(Service.class,"String_Node_Str").sayHello());
}
Program: 54905
Project: 54905
Buggy source:
@Override @Test public void testGetInstanceWithAnnotation(){
  Service3 service=provider.getInstance(Service3.class,MyBindingAnnotation.class);
  assertNotNull(service);
}

Fixed version (ground truth):
@Override @Test public void testGetInstanceWithAnnotation(){
  Service3 service=getProvider().getInstance(Service3.class,MyBindingAnnotation.class);
  assertNotNull(service);
}
Program: 54906
Project: 54906
Buggy source:
private ConfigurationFileImpl(final File file){
  if (file == null) {
    throw new ConfigurationException("String_Node_Str" + file.getName() + "String_Node_Str");
  }
  if (!file.exists()) {
    throw new ConfigurationException("String_Node_Str" + file.getName() + "String_Node_Str");
  }
  if (!file.canRead()) {
    throw new ConfigurationException("String_Node_Str" + file.getName() + "String_Node_Str");
  }
  load();
}

Fixed version (ground truth):
private ConfigurationFileImpl(final File file){
  if (file == null) {
    throw new ConfigurationException("String_Node_Str" + file.getName() + "String_Node_Str");
  }
  if (!file.exists()) {
    throw new ConfigurationException("String_Node_Str" + file.getName() + "String_Node_Str");
  }
  if (!file.canRead()) {
    throw new ConfigurationException("String_Node_Str" + file.getName() + "String_Node_Str");
  }
  this.file=file;
  load();
}
Program: 54907
Project: 54907
Buggy source:
@Override public void load(){
  hTable=new Hashtable<String,String>();
  Properties props=new Properties();
  InputStream in=null;
  try {
    in=new FileInputStream(file);
    props.load(in);
    hTable=pfu.rectifyProperties(props);
    LOGGER.debug("String_Node_Str",file.getAbsolutePath(),new Date());
  }
 catch (  IOException e) {
    throw new ConfigurationException("String_Node_Str" + file,e);
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException e) {
        throw new ConfigurationException("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void load(){
  hTable=new Hashtable<String,String>();
  Properties props=new Properties();
  InputStream in=null;
  try {
    System.out.println(file.getName());
    in=new FileInputStream(file);
    props.load(in);
    hTable=pfu.rectifyProperties(props);
    LOGGER.debug("String_Node_Str",file.getAbsolutePath(),new Date());
  }
 catch (  IOException e) {
    throw new ConfigurationException("String_Node_Str" + file,e);
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException e) {
        throw new ConfigurationException("String_Node_Str",e);
      }
    }
  }
}
Program: 54908
Project: 54908
Buggy source:
@Test public void testFromFileSystemFile(){
  String pathname=getClass().getResource("String_Node_Str").getFile();
  File file=new File(pathname);
  assertTrue(instance.fromFileSystem(file) instanceof ConfigurationFileImpl);
}

Fixed version (ground truth):
@Test public void testFromFileSystemFile(){
  String pathname=getClass().getResource("String_Node_Str").getFile();
  File file=new File(pathname);
  assertTrue(file.canRead());
  assertTrue(instance.fromFileSystem(file) instanceof ConfigurationFileImpl);
}
Program: 54909
Project: 54909
Buggy source:
@Test public void testConstructorFromModule(){
  Service service=provider.getInstance(Service.class,"String_Node_Str");
  assertEquals("String_Node_Str",service.sayHello());
}

Fixed version (ground truth):
@Test public void testConstructorFromModule(){
  Service service=getProvider().getInstance(Service.class,"String_Node_Str");
  assertEquals("String_Node_Str",service.sayHello());
}
Program: 54910
Project: 54910
Buggy source:
@Test public void testGetInstanceByFactoryBean(){
  Service service=provider.getInstance(MyService1.class);
  assertEquals("String_Node_Str",service.sayHello());
}

Fixed version (ground truth):
@Test public void testGetInstanceByFactoryBean(){
  Service service=getProvider().getInstance(MyService1.class);
  assertEquals("String_Node_Str",service.sayHello());
}
Program: 54911
Project: 54911
Buggy source:
@Test public void testGetInstanceByFactoryBean(){
  Service service=provider.getInstance(MyService1.class);
  assertEquals("String_Node_Str",service.sayHello());
}

Fixed version (ground truth):
@Test public void testGetInstanceByFactoryBean(){
  Service service=getProvider().getInstance(MyService1.class);
  assertEquals("String_Node_Str",service.sayHello());
}
Program: 54912
Project: 54912
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(String page,String pagesize,Long userId,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryByRoleCustom(start,limit,search);
  if (userId != null) {
    List<RoleVO> roles=all.getResult();
    for (    RoleVO role : roleApplication.findRoleByUserAccount(userAccount)) {
      roles.remove(role);
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(int page,int pagesize,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setName(roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryNotAssignRoleByUseraccount(page,pagesize,userAccount,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54913
Project: 54913
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,userNameForSearch,userAccountForSearch);
  Page<UserVO> all=userApplication.pageQueryUserCustom(page,pagesize,search);
  if (roleId != null) {
    RoleVO role=new RoleVO();
    role.setId(roleId);
    List<UserVO> users=all.getResult();
    try {
      for (      UserVO user : roleApplication.findUserByRole(role)) {
        users.remove(user);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setId(roleId);
  UserVO userVO=new UserVO();
  userVO.setName(userNameForSearch);
  userVO.setUserAccount(userAccountForSearch);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,userVO,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54914
Project: 54914
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(String page,String pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(start,limit,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(int page,int pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,null,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54915
Project: 54915
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(String page,String pagesize,Long userId,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryByRoleCustom(start,limit,search);
  if (userId != null) {
    List<RoleVO> roles=all.getResult();
    for (    RoleVO role : roleApplication.findRoleByUserAccount(userAccount)) {
      roles.remove(role);
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(int page,int pagesize,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setName(roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryNotAssignRoleByUseraccount(page,pagesize,userAccount,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54916
Project: 54916
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,userNameForSearch,userAccountForSearch);
  Page<UserVO> all=userApplication.pageQueryUserCustom(page,pagesize,search);
  if (roleId != null) {
    RoleVO role=new RoleVO();
    role.setId(roleId);
    List<UserVO> users=all.getResult();
    try {
      for (      UserVO user : roleApplication.findUserByRole(role)) {
        users.remove(user);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setId(roleId);
  UserVO userVO=new UserVO();
  userVO.setName(userNameForSearch);
  userVO.setUserAccount(userAccountForSearch);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,userVO,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54917
Project: 54917
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(String page,String pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(start,limit,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(int page,int pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,null,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54918
Project: 54918
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(String page,String pagesize,Long userId,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryByRoleCustom(start,limit,search);
  if (userId != null) {
    List<RoleVO> roles=all.getResult();
    for (    RoleVO role : roleApplication.findRoleByUserAccount(userAccount)) {
      roles.remove(role);
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(int page,int pagesize,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setName(roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryNotAssignRoleByUseraccount(page,pagesize,userAccount,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54919
Project: 54919
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,userNameForSearch,userAccountForSearch);
  Page<UserVO> all=userApplication.pageQueryUserCustom(page,pagesize,search);
  if (roleId != null) {
    RoleVO role=new RoleVO();
    role.setId(roleId);
    List<UserVO> users=all.getResult();
    try {
      for (      UserVO user : roleApplication.findUserByRole(role)) {
        users.remove(user);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setId(roleId);
  UserVO userVO=new UserVO();
  userVO.setName(userNameForSearch);
  userVO.setUserAccount(userAccountForSearch);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,userVO,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54920
Project: 54920
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(String page,String pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(start,limit,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(int page,int pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,null,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54921
Project: 54921
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(String page,String pagesize,Long userId,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryByRoleCustom(start,limit,search);
  if (userId != null) {
    List<RoleVO> roles=all.getResult();
    for (    RoleVO role : roleApplication.findRoleByUserAccount(userAccount)) {
      roles.remove(role);
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryRolesForAssign(int page,int pagesize,String userAccount,String roleNameForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setName(roleNameForSearch);
  Page<RoleVO> all=roleApplication.pageQueryNotAssignRoleByUseraccount(page,pagesize,userAccount,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54922
Project: 54922
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  QueryConditionVO search=new QueryConditionVO();
  initSearchCondition(search,userNameForSearch,userAccountForSearch);
  Page<UserVO> all=userApplication.pageQueryUserCustom(page,pagesize,search);
  if (roleId != null) {
    RoleVO role=new RoleVO();
    role.setId(roleId);
    List<UserVO> users=all.getResult();
    try {
      for (      UserVO user : roleApplication.findUserByRole(role)) {
        users.remove(user);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryUsersForAssign(int page,int pagesize,Long roleId,String userNameForSearch,String userAccountForSearch){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVO=new RoleVO();
  roleVO.setId(roleId);
  UserVO userVO=new UserVO();
  userVO.setName(userNameForSearch);
  userVO.setUserAccount(userAccountForSearch);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,userVO,roleVO);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54923
Project: 54923
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(String page,String pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  int start=Integer.parseInt(page);
  int limit=Integer.parseInt(pagesize);
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(start,limit,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",start * limit - limit);
  dataMap.put("String_Node_Str",limit);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> queryNotAssignUserByRole(int page,int pagesize,Long roleId){
  Map<String,Object> dataMap=new HashMap<String,Object>();
  RoleVO roleVoForFind=new RoleVO();
  roleVoForFind.setId(roleId);
  Page<UserVO> all=roleApplication.pageQueryNotAssignUserByRole(page,pagesize,null,roleVoForFind);
  dataMap.put("String_Node_Str",all.getResult());
  dataMap.put("String_Node_Str",page * pagesize - pagesize);
  dataMap.put("String_Node_Str",pagesize);
  dataMap.put("String_Node_Str",all.getTotalCount());
  return dataMap;
}
Program: 54924
Project: 54924
Buggy source:
@Override public void createUserIfNecessary(Project project,Developer developer){
  new ProjectAuthorization().authorize(jenkinsUrl,project,driver,developer);
}

Fixed version (ground truth):
@Override public void createUserIfNecessary(Project project,Developer developer){
  new UserCreator().createUser(jenkinsUrl,developer,driver);
}
Program: 54925
Project: 54925
Buggy source:
public void assignUsersToRole(Project project,String role,Developer... developers){
  new GlobalProjectAuthorization().authorize(jenkinsUrl,driver,developers);
}

Fixed version (ground truth):
public void assignUsersToRole(Project project,String role,Developer... developers){
  new ProjectAuthorization().authorize(jenkinsUrl,project,driver,developers);
  new GlobalProjectAuthorization().authorize(jenkinsUrl,driver,developers);
}
Program: 54927
Project: 54927
Buggy source:
public boolean createUser(String jenkinsUrl,Developer developer,WebDriver driver){
  jenkinsUrl=UrlUtil.removeEndIfExists(jenkinsUrl,"String_Node_Str");
  if (!(jenkinsUrl + "String_Node_Str").equals(driver.getCurrentUrl())) {
    driver.get(jenkinsUrl + "String_Node_Str");
  }
  WebElement usernameInput=driver.findElement(By.name("String_Node_Str"));
  usernameInput.sendKeys(developer.getName());
  WebElement passwordInput1=driver.findElement(By.name("String_Node_Str"));
  passwordInput1.sendKeys(developer.getPassword());
  WebElement passwordInput2=driver.findElement(By.name("String_Node_Str"));
  passwordInput2.sendKeys(developer.getPassword());
  WebElement fullnameInput=driver.findElement(By.name("String_Node_Str"));
  fullnameInput.sendKeys(developer.getFullName());
  WebElement emailInput=driver.findElement(By.name("String_Node_Str"));
  emailInput.sendKeys(developer.getEmail());
  emailInput.submit();
  if (!driver.getCurrentUrl().endsWith("String_Node_Str")) {
    error=driver.findElement(By.cssSelector("String_Node_Str")).getText();
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean createUser(String jenkinsUrl,Developer developer,WebDriver driver){
  jenkinsUrl=UrlUtil.removeEndIfExists(jenkinsUrl,"String_Node_Str");
  if (!(jenkinsUrl + "String_Node_Str").equals(driver.getCurrentUrl())) {
    driver.get(jenkinsUrl + "String_Node_Str");
  }
  WebElement usernameInput=driver.findElement(By.name("String_Node_Str"));
  usernameInput.sendKeys(developer.getName());
  WebElement passwordInput1=driver.findElement(By.name("String_Node_Str"));
  passwordInput1.sendKeys(developer.getPassword());
  WebElement passwordInput2=driver.findElement(By.name("String_Node_Str"));
  passwordInput2.sendKeys(developer.getPassword());
  WebElement fullnameInput=driver.findElement(By.name("String_Node_Str"));
  fullnameInput.sendKeys(developer.getFullName());
  WebElement emailInput=driver.findElement(By.name("String_Node_Str"));
  emailInput.sendKeys(developer.getEmail());
  emailInput.submit();
  if (!driver.getCurrentUrl().endsWith("String_Node_Str")) {
    throw new CISClientBaseRuntimeException(driver.findElement(By.cssSelector("String_Node_Str")).getText());
  }
  return true;
}
Program: 54928
Project: 54928
Buggy source:
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> update(ParamsPojo params){
  ResourceTypeVO resourceTypeVO=params.getResourceTypeVO();
  Map<String,Object> dataMap=new HashMap<String,Object>();
  dataMap.put("String_Node_Str","String_Node_Str");
  try {
    resourceTypeApplication.update(resourceTypeVO);
  }
 catch (  ApplicationException e) {
    dataMap.put("String_Node_Str","String_Node_Str");
  }
  return dataMap;
}

Fixed version (ground truth):
@ResponseBody @RequestMapping("String_Node_Str") public Map<String,Object> update(ParamsPojo params){
  ResourceTypeVO resourceTypeVO=params.getResourceTypeVO();
  Map<String,Object> dataMap=new HashMap<String,Object>();
  resourceTypeApplication.update(resourceTypeVO);
  dataMap.put("String_Node_Str","String_Node_Str");
  return dataMap;
}
Program: 54929
Project: 54929
Buggy source:
/** 
 * Common method as single entry point responsible fo request execution
 * @param context clientContext to be used when executing request
 * @param request Request to execute
 * @param responseHandler can be null if you need raw HttpResponse or not null response handler for result handling.
 * @param < T > will return raw HttpResponse when responseHandler is null or value reslved using provided ResponseHandler instance
 * @return value resolved using response handler or raw HttpResponse when responseHandler is null
 */
protected <T>T execute(HttpClientContext context,HttpRequestBase request,ResponseHandler<T> responseHandler) throws IOException {
  try {
    HttpContext requestLocalContext=new BasicHttpContext(context);
    if (responseHandler != null) {
      return this.client.execute(request,responseHandler,requestLocalContext);
    }
 else {
      return (T)this.client.execute(request,requestLocalContext);
    }
  }
 catch (  HttpResponseException e) {
    throw e;
  }
catch (  IOException e) {
    request.abort();
    throw e;
  }
}

Fixed version (ground truth):
/** 
 * Common method as single entry point responsible fo request execution
 * @param context clientContext to be used when executing request
 * @param request Request to execute
 * @param responseHandler can be null if you need raw HttpResponse or not null response handler for result handling.
 * @param < T > will return raw HttpResponse when responseHandler is null or value reslved using provided ResponseHandler instance
 * @return value resolved using response handler or raw HttpResponse when responseHandler is null
 */
protected <T>T execute(HttpClientContext context,HttpRequestBase request,ResponseHandler<T> responseHandler) throws IOException {
  HttpContext requestLocalContext=new BasicHttpContext(context);
  try {
    if (responseHandler != null) {
      return this.client.execute(request,responseHandler,requestLocalContext);
    }
 else {
      return (T)this.client.execute(request,requestLocalContext);
    }
  }
 catch (  HttpResponseException e) {
    throw e;
  }
catch (  IOException e) {
    request.abort();
    throw e;
  }
 finally {
    context.setAttribute(HttpClientContext.USER_TOKEN,requestLocalContext.getAttribute(HttpClientContext.USER_TOKEN));
  }
}
Program: 54930
Project: 54930
Buggy source:
public DavQuota(Response response){
  Prop prop=response.getPropstat().get(0).getProp();
  this.quotaAvailableBytes=Long.valueOf(prop.getQuotaAvailableBytes().getContent().get(0));
  this.quotaUsedBytes=Long.valueOf(prop.getQuotaUsedBytes().getContent().get(0));
}

Fixed version (ground truth):
public DavQuota(Response response){
  this.quotaAvailableBytes=this.getAvailable(response);
  this.quotaUsedBytes=this.getUsed(response);
}
Program: 54931
Project: 54931
Buggy source:
public String toXml(){
  return SardineUtil.toXml(toJaxb());
}

Fixed version (ground truth):
public String toXml() throws IOException {
  return SardineUtil.toXml(toJaxb());
}
Program: 54932
Project: 54932
Buggy source:
/** 
 * @return A new marshaller
 * @throws IOException When there is a JAXB error
 */
private static Marshaller createMarshaller(){
  try {
    return JAXB_CONTEXT.createMarshaller();
  }
 catch (  JAXBException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * @return A new marshaller
 * @throws IOException When there is a JAXB error
 */
private static Marshaller createMarshaller() throws IOException {
  try {
    return JAXB_CONTEXT.createMarshaller();
  }
 catch (  JAXBException e) {
    throw new IOException(e.getMessage(),e);
  }
}