nus-yam/ex-repair huggingface dataset:
Program: 80664
Project: 80664
Buggy source:
protected ParamInjector evalInjector(Class<?> type,Param param){
  if (Map.class.isAssignableFrom(type))   return new MapSelfInjector();
  if (null == param)   return null;
  String paramName=param.value();
  if (File.class.isAssignableFrom(type))   return new FileInjector(paramName);
  if (FieldMeta.class.isAssignableFrom(type))   return new FileMetaInjector(paramName);
  if (TempFile.class.isAssignableFrom(type))   return new TempFileInjector(paramName);
  if (InputStream.class.isAssignableFrom(type))   return new InputStreamInjector(paramName);
  if (Reader.class.isAssignableFrom(type))   return new ReaderInjector(paramName);
  if (List.class.isAssignableFrom(type))   return new MapListInjector(paramName);
  if (type.isArray())   return new MapArrayInjector(type.getComponentType(),paramName);
  if ("String_Node_Str".equals(paramName)) {
    if (type.isAssignableFrom(Map.class))     return new MapPairInjector();
    return new ObjectPairInjector(null,type);
  }
 else   if (paramName.startsWith("String_Node_Str") && paramName.length() > 2) {
    return new ObjectPairInjector(null,type);
  }
  return new MapItemInjector(paramName,type);
}

Fixed version (ground truth):
protected ParamInjector evalInjector(Class<?> type,Param param){
  if (Map.class.isAssignableFrom(type))   return new MapSelfInjector();
  if (null == param)   return super.evalInjector(type,param);
  String paramName=param.value();
  if (File.class.isAssignableFrom(type))   return new FileInjector(paramName);
  if (FieldMeta.class.isAssignableFrom(type))   return new FileMetaInjector(paramName);
  if (TempFile.class.isAssignableFrom(type))   return new TempFileInjector(paramName);
  if (InputStream.class.isAssignableFrom(type))   return new InputStreamInjector(paramName);
  if (Reader.class.isAssignableFrom(type))   return new ReaderInjector(paramName);
  if (List.class.isAssignableFrom(type))   return new MapListInjector(paramName);
  return super.evalInjector(type,param);
}
Program: 80665
Project: 80665
Buggy source:
@Test public void test_base(){
  resp=get("String_Node_Str");
  assertNotNull(resp);
  assertEquals(200,resp.getStatus());
  assertEquals(getContextPath(),resp.getContent());
}

Fixed version (ground truth):
@Test public void test_base(){
  get("String_Node_Str");
  assertNotNull(resp);
  assertEquals(200,resp.getStatus());
  assertEquals(getContextPath(),resp.getContent());
}
Program: 80666
Project: 80666
Buggy source:
public Response post(String path,Map<String,Object> params){
  resp=Sender.create(Request.create("String_Node_Str" + getContextPath() + path,METHOD.POST,params,null)).send();
  assertNotNull(resp);
  return resp;
}

Fixed version (ground truth):
public Response post(String path,Map<String,Object> params){
  resp=Sender.create(Request.create(getBaseURL() + path,METHOD.POST,params,null)).send();
  assertNotNull(resp);
  return resp;
}
Program: 80667
Project: 80667
Buggy source:
public Response get(String path){
  resp=Http.get("String_Node_Str" + getContextPath() + path);
  assertNotNull(resp);
  return resp;
}

Fixed version (ground truth):
public Response get(String path){
  resp=Http.get(getBaseURL() + path);
  assertNotNull(resp);
  return resp;
}
Program: 80668
Project: 80668
Buggy source:
public Sql insert(Entity<?> en,Object obj){
  StringBuilder fields=new StringBuilder();
  StringBuilder values=new StringBuilder();
  FieldMatcher fm=FieldFilter.get(en.getType());
  Map<String,Object> map=new HashMap<String,Object>();
  for (Iterator<EntityField> it=en.fields().iterator(); it.hasNext(); ) {
    EntityField ef=it.next();
    String fn=ef.getName();
    if (ef.isSerial() || ef.isReadonly())     continue;
    Object value=ef.getValue(obj);
    if (null != fm) {
      if (fm.isIgnoreNull() && null == value)       continue;
 else       if (!fm.match(fn))       continue;
    }
 else     if (null == value) {
      if (ef.hasDefaultValue())       value=ef.getDefaultValue(obj);
 else       continue;
    }
    fields.append(',').append(ef.getColumnName());
    values.append("String_Node_Str").append(fn);
    map.put(fn,value);
  }
  fields.deleteCharAt(0);
  values.deleteCharAt(0);
  Sql sql=Sqls.create(format("String_Node_Str",en.getTableName(),fields,values)).setEntity(en);
  sql.params().putAll(map);
  return sql;
}

Fixed version (ground truth):
public Sql insert(Entity<?> en,Object obj){
  StringBuilder fields=new StringBuilder();
  StringBuilder values=new StringBuilder();
  FieldMatcher fm=FieldFilter.get(en.getType());
  Map<String,Object> map=new HashMap<String,Object>();
  for (Iterator<EntityField> it=en.fields().iterator(); it.hasNext(); ) {
    EntityField ef=it.next();
    String fn=ef.getName();
    if (ef.isSerial() || ef.isReadonly())     continue;
    Object value=ef.getValue(obj);
    if (null != fm) {
      if (fm.isIgnoreNull() && null == value)       continue;
 else       if (!fm.match(fn))       continue;
    }
 else     if (null == value) {
      if (ef.hasDefaultValue())       value=ef.getDefaultValue(obj);
 else       continue;
    }
    fields.append(',').append(ef.getColumnName());
    values.append("String_Node_Str").append(fn);
    map.put(fn,value);
  }
  if (fields.length() == 0)   throw Lang.makeThrow(DaoException.class,"String_Node_Str",en.getTableName());
  fields.deleteCharAt(0);
  values.deleteCharAt(0);
  Sql sql=Sqls.create(format("String_Node_Str",en.getTableName(),fields,values)).setEntity(en);
  sql.params().putAll(map);
  return sql;
}
Program: 80669
Project: 80669
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj instanceof Pair<?>)   if (Strings.equals(((Pair<?>)obj).name,name))   Lang.equals(((Pair<?>)obj).value,value);
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj instanceof Pair<?>)   if (Strings.equals(((Pair<?>)obj).name,name))   return Lang.equals(((Pair<?>)obj).value,value);
  return false;
}
Program: 80670
Project: 80670
Buggy source:
public static Pair<String> create(String s){
  String[] ss=Strings.splitIgnoreBlank(s,"String_Node_Str");
  String name=null;
  String value=null;
  String pattern=PTN_3;
  if (null != ss)   if (ss.length == 1) {
    name=ss[0];
  }
 else   if (ss.length == 2) {
    name=ss[0];
    if (ss[1].length() > 0) {
      if (ss[1].charAt(0) == '"') {
        value=ss[1].substring(1,ss[1].length() - 2);
        pattern=PTN_3;
      }
 else       if (ss[1].charAt(0) == '\'') {
        value=ss[1].substring(1,ss[1].length() - 2);
        pattern=PTN_2;
      }
 else {
        value=ss[1];
        pattern=PTN_1;
      }
    }
  }
  Pair<String> re=new Pair<String>(name,value);
  re.pattern=pattern;
  return re;
}

Fixed version (ground truth):
public static Pair<String> create(String s){
  String[] ss=Strings.splitIgnoreBlank(s,"String_Node_Str");
  String name=null;
  String value=null;
  String pattern=PTN_3;
  if (null != ss)   if (ss.length == 1) {
    name=ss[0];
  }
 else   if (ss.length == 2) {
    name=ss[0];
    if (ss[1].length() > 0) {
      if (ss[1].charAt(0) == '"') {
        value=ss[1].substring(1,ss[1].length() - 1);
        pattern=PTN_3;
      }
 else       if (ss[1].charAt(0) == '\'') {
        value=ss[1].substring(1,ss[1].length() - 1);
        pattern=PTN_2;
      }
 else {
        value=ss[1];
        pattern=PTN_1;
      }
    }
  }
  Pair<String> re=new Pair<String>(name,value);
  re.pattern=pattern;
  return re;
}
Program: 80671
Project: 80671
Buggy source:
@SuppressWarnings("String_Node_Str") private <T>T parseArray(Mirror<T> me,ParameterizedType type) throws Exception {
  Type tt=null;
  boolean reurnAsList=true;
  List list=null;
  if (null == me) {
    list=new LinkedList();
  }
 else   if (me.getType().isArray()) {
    list=new LinkedList();
    reurnAsList=false;
    tt=me.getType().getComponentType();
  }
 else   if (List.class.isAssignableFrom(me.getType())) {
    reurnAsList=true;
    if (me.is(List.class))     list=new LinkedList();
 else     list=(List)me.born();
    tt=type.getActualTypeArguments()[0];
  }
 else {
    throw makeError(String.format("String_Node_Str",me.getType().getName()));
  }
  nextChar();
  skipCommentsAndBlank();
  while (cursor != -1 && cursor != ']') {
    Object o=parseFromCurrentLocation(tt);
    list.add(o);
    skipCommentsAndBlank();
    if (cursor == ']')     break;
    if (cursor != ',')     throw makeError("String_Node_Str");
    nextChar();
    skipCommentsAndBlank();
  }
  nextChar();
  if (reurnAsList)   return (T)list;
  Object ary=Array.newInstance((Class<?>)tt,list.size());
  int i=0;
  for (Iterator it=list.iterator(); it.hasNext(); )   Array.set(ary,i++,Castors.me().castTo(it.next(),(Class<?>)tt));
  return (T)ary;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private <T>T parseArray(Mirror<T> me,ParameterizedType type) throws Exception {
  Type tt=null;
  boolean reurnAsList=true;
  List list=null;
  if (null == me) {
    list=new LinkedList();
  }
 else   if (me.getType().isArray()) {
    list=new LinkedList();
    reurnAsList=false;
    tt=me.getType().getComponentType();
  }
 else   if (List.class.isAssignableFrom(me.getType())) {
    reurnAsList=true;
    if (me.is(List.class))     list=new LinkedList();
 else     list=(List)me.born();
    if (type != null && type.getActualTypeArguments() != null)     tt=type.getActualTypeArguments()[0];
  }
 else {
    throw makeError(String.format("String_Node_Str",me.getType().getName()));
  }
  nextChar();
  skipCommentsAndBlank();
  while (cursor != -1 && cursor != ']') {
    Object o=parseFromCurrentLocation(tt);
    list.add(o);
    skipCommentsAndBlank();
    if (cursor == ']')     break;
    if (cursor != ',')     throw makeError("String_Node_Str");
    nextChar();
    skipCommentsAndBlank();
  }
  nextChar();
  if (reurnAsList)   return (T)list;
  Object ary=Array.newInstance((Class<?>)tt,list.size());
  int i=0;
  for (Iterator it=list.iterator(); it.hasNext(); )   Array.set(ary,i++,Castors.me().castTo(it.next(),(Class<?>)tt));
  return (T)ary;
}
Program: 80672
Project: 80672
Buggy source:
protected void parseArgs(Element beanElement,IocObject iocObject) throws Throwable {
  NodeList argsNodeList=beanElement.getElementsByTagName(TAG_ARGS);
  if (argsNodeList.getLength() > 0) {
    Element argsElement=(Element)argsNodeList.item(0);
    NodeList argNodeList=argsElement.getChildNodes();
    for (int i=0; i < argNodeList.getLength(); i++) {
      if (argNodeList.item(i) instanceof Element)       iocObject.addArg(parseX((Element)argNodeList.item(i)));
    }
  }
}

Fixed version (ground truth):
protected void parseArgs(Element beanElement,IocObject iocObject) throws Throwable {
  List<Element> list=getChildNodesByTagName(beanElement,TAG_ARGS);
  if (list.size() > 0) {
    Element argsElement=list.get(0);
    NodeList argNodeList=argsElement.getChildNodes();
    for (int i=0; i < argNodeList.getLength(); i++) {
      if (argNodeList.item(i) instanceof Element)       iocObject.addArg(parseX((Element)argNodeList.item(i)));
    }
  }
}
Program: 80673
Project: 80673
Buggy source:
protected void parseEvents(Element beanElement,IocObject iocObject){
  NodeList eventsNodeList=beanElement.getElementsByTagName("String_Node_Str");
  if (eventsNodeList.getLength() > 0) {
    Element eventsElement=(Element)eventsNodeList.item(0);
    IocEventSet iocEventSet=new IocEventSet();
    NodeList fetchNodeList=eventsElement.getElementsByTagName("String_Node_Str");
    if (fetchNodeList.getLength() > 0)     iocEventSet.setFetch(((Element)fetchNodeList.item(0)).getTextContent());
    NodeList createNodeList=eventsElement.getElementsByTagName("String_Node_Str");
    if (createNodeList.getLength() > 0)     iocEventSet.setCreate(((Element)createNodeList.item(0)).getTextContent());
    NodeList deposeNodeList=eventsElement.getElementsByTagName("String_Node_Str");
    if (deposeNodeList.getLength() > 0)     iocEventSet.setDepose(((Element)deposeNodeList.item(0)).getTextContent());
    if (iocEventSet.getCreate() == null)     if (iocEventSet.getDepose() == null)     if (iocEventSet.getFetch() == null)     return;
    iocObject.setEvents(iocEventSet);
  }
}

Fixed version (ground truth):
protected void parseEvents(Element beanElement,IocObject iocObject){
  List<Element> elist=getChildNodesByTagName(beanElement,"String_Node_Str");
  if (elist.size() > 0) {
    Element eventsElement=elist.get(0);
    IocEventSet iocEventSet=new IocEventSet();
    elist=getChildNodesByTagName(eventsElement,"String_Node_Str");
    if (elist.size() > 0)     iocEventSet.setFetch(elist.get(0).getTextContent());
    elist=getChildNodesByTagName(eventsElement,"String_Node_Str");
    if (elist.size() > 0)     iocEventSet.setCreate(elist.get(0).getTextContent());
    elist=getChildNodesByTagName(eventsElement,"String_Node_Str");
    if (elist.size() > 0)     iocEventSet.setDepose(elist.get(0).getTextContent());
    if (iocEventSet.getCreate() == null)     if (iocEventSet.getDepose() == null)     if (iocEventSet.getFetch() == null)     return;
    iocObject.setEvents(iocEventSet);
  }
}
Program: 80674
Project: 80674
Buggy source:
protected Map<String,?> paserMap(Element element){
  Map<String,Object> map=new HashMap<String,Object>();
  if (element.hasChildNodes()) {
    NodeList nodeList=element.getElementsByTagName(ITEM_TAG);
    for (int i=0; i < nodeList.getLength(); i++) {
      if (nodeList.item(i) instanceof Element) {
        Element elementItem=(Element)nodeList.item(i);
        String key=elementItem.getAttribute("String_Node_Str");
        if (map.containsKey(key))         throw new IllegalArgumentException("String_Node_Str");
        NodeList list=elementItem.getChildNodes();
        for (int j=0; j < list.getLength(); j++) {
          if (list.item(j) instanceof Element) {
            map.put(key,list.item(j).getTextContent());
            break;
          }
        }
        if (!map.containsKey(key))         map.put(key,null);
      }
    }
  }
  return map;
}

Fixed version (ground truth):
protected Map<String,?> paserMap(Element element) throws Throwable {
  Map<String,Object> map=new HashMap<String,Object>();
  if (element.hasChildNodes()) {
    List<Element> elist=getChildNodesByTagName(element,ITEM_TAG);
    for (    Element elementItem : elist) {
      String key=elementItem.getAttribute("String_Node_Str");
      if (map.containsKey(key))       throw new IllegalArgumentException("String_Node_Str");
      NodeList list=elementItem.getChildNodes();
      for (int j=0; j < list.getLength(); j++) {
        if (list.item(j) instanceof Element) {
          map.put(key,parseX((Element)list.item(j)));
          break;
        }
      }
      if (!map.containsKey(key))       map.put(key,null);
    }
  }
  return map;
}
Program: 80675
Project: 80675
Buggy source:
protected void parseFields(Element beanElement,IocObject iocObject) throws Throwable {
  NodeList fieldNodeList=beanElement.getElementsByTagName(TAG_FIELD);
  if (fieldNodeList.getLength() > 0) {
    int len=fieldNodeList.getLength();
    for (int i=0; i < len; i++) {
      Element fieldElement=(Element)fieldNodeList.item(i);
      IocField iocField=new IocField();
      iocField.setName(fieldElement.getAttribute("String_Node_Str"));
      if (fieldElement.hasChildNodes()) {
        NodeList nodeList=fieldElement.getChildNodes();
        for (int j=0; j < nodeList.getLength(); j++) {
          if (nodeList.item(j) instanceof Element) {
            iocField.setValue(parseX((Element)nodeList.item(j)));
            break;
          }
        }
      }
      iocObject.addField(iocField);
    }
  }
}

Fixed version (ground truth):
protected void parseFields(Element beanElement,IocObject iocObject) throws Throwable {
  List<Element> list=getChildNodesByTagName(beanElement,TAG_FIELD);
  for (  Element fieldElement : list) {
    IocField iocField=new IocField();
    iocField.setName(fieldElement.getAttribute("String_Node_Str"));
    if (fieldElement.hasChildNodes()) {
      NodeList nodeList=fieldElement.getChildNodes();
      for (int j=0; j < nodeList.getLength(); j++) {
        if (nodeList.item(j) instanceof Element) {
          iocField.setValue(parseX((Element)nodeList.item(j)));
          break;
        }
      }
    }
    iocObject.addField(iocField);
  }
}
Program: 80676
Project: 80676
Buggy source:
public void rollback() throws SQLException {
  if (null == sp)   conn.rollback();
 else   conn.rollback(sp);
}

Fixed version (ground truth):
public void rollback() throws SQLException {
  if (null != sp)   conn.rollback(sp);
}
Program: 80677
Project: 80677
Buggy source:
@SuppressWarnings("String_Node_Str") public OptSymbolLoader(){
  root=new OptNode();
  List<Class<?>> optTypes=Scans.me().scanPackage(AbstractOperator.class);
  for (  Class<?> optType : optTypes) {
    if (!Modifier.isAbstract(optType.getModifiers()) && ElOperator.class.isAssignableFrom(optType) && null == optType.getAnnotation(OptHidden.class)) {
      Class<? extends ElOperator> theType=(Class<? extends ElOperator>)optType;
      ElOperator optObj=El.opt(theType);
      char[] cs=optObj.getString().toCharArray();
      OptNode on=root;
      for (      char c : cs) {
        on=on.addNode(c);
      }
      if (on.getOperator() != null) {
        throw Lang.makeThrow("String_Node_Str",on.getOperator().getClass().getName(),optType.getName());
      }
      on.setOperator(optObj);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public OptSymbolLoader(){
  root=new OptNode();
  if (optTypes.size() == 0) {
synchronized (optTypes) {
      if (optTypes.size() == 0) {
        List<Class<?>> optTypes=Scans.me().scanPackage(AbstractOperator.class);
        for (        Class<?> optType : optTypes) {
          if (!Modifier.isAbstract(optType.getModifiers()) && ElOperator.class.isAssignableFrom(optType) && null == optType.getAnnotation(OptHidden.class)) {
            OptSymbolLoader.optTypes.add(optType);
          }
        }
      }
    }
  }
  for (  Class<?> optType : optTypes) {
    Class<? extends ElOperator> theType=(Class<? extends ElOperator>)optType;
    ElOperator optObj=El.opt(theType);
    char[] cs=optObj.getString().toCharArray();
    OptNode on=root;
    for (    char c : cs) {
      on=on.addNode(c);
    }
    if (on.getOperator() != null) {
      throw Lang.makeThrow("String_Node_Str",on.getOperator().getClass().getName(),optType.getName());
    }
    on.setOperator(optObj);
  }
}
Program: 80678
Project: 80678
Buggy source:
/** 
 * 获取一个Type类型实际对应的Class
 */
@SuppressWarnings("String_Node_Str") public static Class<?> getTypeClass(Type type){
  Class<?> clazz=null;
  if (type instanceof ParameterizedType) {
    ParameterizedType pt=(ParameterizedType)type;
    clazz=(Class<?>)pt.getRawType();
  }
 else   if (type instanceof Class<?>) {
    clazz=(Class<?>)type;
  }
 else   if (type instanceof GenericArrayType) {
    GenericArrayType gat=(GenericArrayType)type;
    return getTypeClass(gat.getGenericComponentType());
  }
 else   if (type instanceof TypeVariable) {
    TypeVariable tv=(TypeVariable)type;
    Type[] ts=tv.getBounds();
    if (ts != null && ts.length > 0)     return getTypeClass(ts[0]);
  }
 else   if (type instanceof WildcardType) {
    WildcardType wt=(WildcardType)type;
    Type[] t_low=wt.getLowerBounds();
    if (t_low.length > 0)     return getTypeClass(t_low[0]);
    Type[] t_up=wt.getUpperBounds();
    return getTypeClass(t_up[0]);
  }
  return clazz;
}

Fixed version (ground truth):
/** 
 * 获取一个Type类型实际对应的Class
 */
@SuppressWarnings("String_Node_Str") public static Class<?> getTypeClass(Type type){
  Class<?> clazz=null;
  if (type instanceof ParameterizedType) {
    ParameterizedType pt=(ParameterizedType)type;
    clazz=(Class<?>)pt.getRawType();
  }
 else   if (type instanceof Class<?>) {
    clazz=(Class<?>)type;
  }
 else   if (type instanceof GenericArrayType) {
    GenericArrayType gat=(GenericArrayType)type;
    Class<?> typeClass=getTypeClass(gat.getGenericComponentType());
    return Array.newInstance(typeClass,0).getClass();
  }
 else   if (type instanceof TypeVariable) {
    TypeVariable tv=(TypeVariable)type;
    Type[] ts=tv.getBounds();
    if (ts != null && ts.length > 0)     return getTypeClass(ts[0]);
  }
 else   if (type instanceof WildcardType) {
    WildcardType wt=(WildcardType)type;
    Type[] t_low=wt.getLowerBounds();
    if (t_low.length > 0)     return getTypeClass(t_low[0]);
    Type[] t_up=wt.getUpperBounds();
    return getTypeClass(t_up[0]);
  }
  return clazz;
}
Program: 80679
Project: 80679
Buggy source:
public RequestDispatcher getRequestDispatcher(String arg0){
  throw Lang.noImplement();
}

Fixed version (ground truth):
public RequestDispatcher getRequestDispatcher(String dest){
  return new MockRequestDispatcher(dispatcherTarget,dest);
}
Program: 80680
Project: 80680
Buggy source:
public MockHttpServletRequest(){
  this.headers=new HashMap<String,String>();
}

Fixed version (ground truth):
public MockHttpServletRequest(){
  this.headers=new HashMap<String,String>();
  this.dispatcherTarget=new String[1];
}
Program: 80681
Project: 80681
Buggy source:
protected String evalPath(HttpServletRequest req,Object obj){
  Context context=Lang.context();
  Context expContext=createContext(req,obj);
  for (  Entry<String,ElObj> en : exps.entrySet())   context.set(en.getKey(),en.getValue().eval(expContext).getString());
  return this.dest.render(context).toString();
}

Fixed version (ground truth):
protected String evalPath(HttpServletRequest req,Object obj){
  if (null == dest)   return null;
  Context context=Lang.context();
  Context expContext=createContext(req,obj);
  for (  Entry<String,ElObj> en : exps.entrySet())   context.set(en.getKey(),en.getValue().eval(expContext).getString());
  return Strings.trim(this.dest.render(context).toString());
}
Program: 80682
Project: 80682
Buggy source:
public AbstractPathView(String dest){
  this.dest=new CharSegment(Strings.trim(dest));
  this.exps=new HashMap<String,ElObj>();
  for (  String key : this.dest.keys()) {
    this.exps.put(key,El.compile(key));
  }
}

Fixed version (ground truth):
public AbstractPathView(String dest){
  if (null != dest) {
    this.dest=new CharSegment(Strings.trim(dest));
    this.exps=new HashMap<String,ElObj>();
    for (    String key : this.dest.keys()) {
      this.exps.put(key,El.compile(key));
    }
  }
}
Program: 80683
Project: 80683
Buggy source:
protected String getExt(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * 子类可以覆盖这个方法，给出自己特殊的后缀
 * @return 后缀
 */
protected String getExt(){
  return "String_Node_Str";
}
Program: 80684
Project: 80684
Buggy source:
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws Exception {
  String path=evalPath(req,obj);
  if (Strings.isBlank(path)) {
    path=Mvcs.getRequestPath(req);
    path="String_Node_Str" + Files.renameSuffix(path,getExt());
  }
  RequestDispatcher rd=req.getRequestDispatcher(path);
  if (rd == null)   throw Lang.makeThrow("String_Node_Str",path);
  rd.forward(req,resp);
}

Fixed version (ground truth):
public void render(HttpServletRequest req,HttpServletResponse resp,Object obj) throws Exception {
  String path=evalPath(req,obj);
  if (Strings.isBlank(path)) {
    path=Mvcs.getRequestPath(req);
    path="String_Node_Str" + (path.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + Files.renameSuffix(path,getExt());
  }
 else   if (path.charAt(0) == '/') {
    String ext=getExt();
    if (!path.toLowerCase().endsWith(ext))     path+=ext;
  }
 else {
    path="String_Node_Str" + path.replace('.','/') + getExt();
  }
  RequestDispatcher rd=req.getRequestDispatcher(path);
  if (rd == null)   throw Lang.makeThrow("String_Node_Str",path);
  rd.forward(req,resp);
}
Program: 80685
Project: 80685
Buggy source:
public ForwardView(String dest){
  super(dest);
}

Fixed version (ground truth):
public ForwardView(String dest){
  super(dest == null ? null : dest.replace('\\','/'));
}
Program: 80686
Project: 80686
Buggy source:
/** 
 * 为一次 HTTP 请求，创建一个可以被表达式引擎接受的上下文对象
 * @param req HTTP 请求对象
 * @param obj 入口函数的返回值
 * @return 上下文对象
 */
@SuppressWarnings("String_Node_Str") public static Context createContext(HttpServletRequest req,Object obj){
  Context context=Lang.context();
  Object servletContext=req.getSession().getServletContext().getAttribute(Loading.CONTEXT_NAME);
  if (servletContext != null) {
    context.putAll((Context)servletContext);
  }
  for (  Object o : req.getParameterMap().keySet()) {
    String key=(String)o;
    context.set(key,req.getParameter(key));
  }
  for (Enumeration<String> en=req.getAttributeNames(); en.hasMoreElements(); ) {
    String tem=en.nextElement();
    context.set(tem,req.getAttribute(tem));
  }
  if (null != obj)   context.set(ViewProcessor.DEFAULT_ATTRIBUTE,obj);
  return context;
}

Fixed version (ground truth):
/** 
 * 为一次 HTTP 请求，创建一个可以被表达式引擎接受的上下文对象
 * @param req HTTP 请求对象
 * @param obj 入口函数的返回值
 * @return 上下文对象
 */
@SuppressWarnings("String_Node_Str") public static Context createContext(HttpServletRequest req,Object obj){
  Context context=Lang.context();
  Object servletContext=req.getSession().getServletContext().getAttribute(Loading.CONTEXT_NAME);
  if (servletContext != null) {
    context.putAll((Context)servletContext);
  }
  Map<String,String> p=new HashMap<String,String>();
  for (  Object o : req.getParameterMap().keySet()) {
    String key=(String)o;
    context.set(key,req.getParameter(key));
    p.put(key,req.getParameter(key));
  }
  context.set("String_Node_Str",p);
  for (Enumeration<String> en=req.getAttributeNames(); en.hasMoreElements(); ) {
    String tem=en.nextElement();
    context.set(tem,req.getAttribute(tem));
  }
  if (null != obj)   context.set(ViewProcessor.DEFAULT_ATTRIBUTE,obj);
  return context;
}
Program: 80687
Project: 80687
Buggy source:
/** 
 * @param < T >
 * @param type
 * @return
 * @throws Exception
 */
private Object parseFromCurrentLocation(Type type) throws Exception {
  Class<?> clazz=null;
  ParameterizedType pt=null;
  if (type instanceof Class) {
    clazz=(Class<?>)type;
  }
  if (type instanceof ParameterizedType) {
    pt=(ParameterizedType)type;
    clazz=(Class<?>)pt.getRawType();
  }
  Mirror<?> me=Mirror.me(clazz);
switch (cursor) {
case -1:
    return null;
case '[':
  return parseArray(me,pt);
case '{':
return parseObj(me,pt);
case 'u':
return parseUndefined();
case 'n':
return parseNull();
case '\'':
case '"':
return parseString(me);
case 't':
return parseTrue(me);
case 'f':
return parseFalse(me);
case '.':
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return parseNumber(me);
case 'v':
while (-1 != nextChar()) if ('{' == cursor) return parseFromCurrentLocation(type);
default :
throw makeError("String_Node_Str");
}
}

Fixed version (ground truth):
/** 
 * @param < T >
 * @param type
 * @return
 * @throws Exception
 */
private Object parseFromCurrentLocation(Type type) throws Exception {
  Class<?> clazz=Lang.getTypeClass(type);
  ParameterizedType pt=null;
  if (type instanceof ParameterizedType) {
    pt=(ParameterizedType)type;
    clazz=(Class<?>)pt.getRawType();
  }
  Mirror<?> me=Mirror.me(clazz);
switch (cursor) {
case -1:
    return null;
case '[':
  return parseArray(me,pt);
case '{':
return parseObj(me,pt);
case 'u':
return parseUndefined();
case 'n':
return parseNull();
case '\'':
case '"':
return parseString(me);
case 't':
return parseTrue(me);
case 'f':
return parseFalse(me);
case '.':
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return parseNumber(me);
case 'v':
while (-1 != nextChar()) if ('{' == cursor) return parseFromCurrentLocation(type);
default :
throw makeError("String_Node_Str");
}
}
Program: 80688
Project: 80688
Buggy source:
/** 
 * 获取一个类的某个一个泛型参数
 * @param klass 类
 * @param index 参数下标 （从 0 开始）
 * @return 泛型参数类型
 */
@SuppressWarnings("String_Node_Str") public static <T>Class<T> getTypeParam(Class<?> klass,int index){
  Type[] types=getTypeParams(klass);
  if (index >= 0 && index < types.length) {
    Type t=types[index];
    if (t instanceof Class<?>) {
      return (Class<T>)t;
    }
 else     if (t instanceof ParameterizedType) {
      t=((ParameterizedType)t).getRawType();
      return (Class<T>)t;
    }
    throw Lang.makeThrow("String_Node_Str",t.toString());
  }
  throw Lang.makeThrow("String_Node_Str",index,types.length);
}

Fixed version (ground truth):
/** 
 * 获取一个类的某个一个泛型参数
 * @param klass 类
 * @param index 参数下标 （从 0 开始）
 * @return 泛型参数类型
 */
@SuppressWarnings("String_Node_Str") public static <T>Class<T> getTypeParam(Class<?> klass,int index){
  Type[] types=getTypeParams(klass);
  if (index >= 0 && index < types.length) {
    Type t=types[index];
    Class<T> clazz=(Class<T>)Lang.getTypeClass(t);
    if (clazz == null)     throw Lang.makeThrow("String_Node_Str",t.toString());
    return clazz;
  }
  throw Lang.makeThrow("String_Node_Str",index,types.length);
}
Program: 80689
Project: 80689
Buggy source:
public Object[] adapt(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  Object[] args=new Object[injs.length];
  int len=Math.min(args.length,null == pathArgs ? 0 : pathArgs.length);
  int i=0;
  for (; i < len; i++) {
    args[i]=injs[i].get(sc,req,resp,null == pathArgs ? null : pathArgs[i]);
  }
  Class<?>[] argTypes=method.getParameterTypes();
  for (; i < injs.length; i++) {
    args[i]=injs[i].get(sc,req,resp,null);
    if (args[i] == null && argTypes[i].isPrimitive()) {
      args[i]=getPrimitiveDefaultValue(argTypes[i]);
    }
  }
  return args;
}

Fixed version (ground truth):
public Object[] adapt(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  Object[] args=new Object[injs.length];
  int len=Math.min(args.length,null == pathArgs ? 0 : pathArgs.length);
  int i=0;
  for (; i < len; i++) {
    args[i]=injs[i].get(sc,req,resp,null == pathArgs ? null : pathArgs[i]);
  }
  Class<?>[] argTypes=method.getParameterTypes();
  for (; i < injs.length; i++) {
    args[i]=injs[i].get(sc,req,resp,null);
    if (args[i] == null && argTypes[i].isPrimitive()) {
      args[i]=Lang.getPrimitiveDefaultValue(argTypes[i]);
    }
  }
  return args;
}
Program: 80690
Project: 80690
Buggy source:
public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null == name)   return Json.fromJson(type,refer.toString());
  NutMap map=Json.fromJson(NutMap.class,refer.toString());
  Object theObj=map.get(name);
  if (null == theObj)   return null;
  Class<?> clazz=null;
  if (type instanceof ParameterizedType) {
    clazz=(Class<?>)((ParameterizedType)type).getRawType();
  }
  clazz=(Class<?>)type;
  return Castors.me().castTo(theObj,clazz);
}

Fixed version (ground truth):
public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null == name)   return Json.fromJson(type,refer.toString());
  NutMap map=Json.fromJson(NutMap.class,refer.toString());
  Object theObj=map.get(name);
  if (null == theObj)   return null;
  Class<?> clazz=Lang.getTypeClass(type);
  return Castors.me().castTo(theObj,clazz);
}
Program: 80691
Project: 80691
Buggy source:
public ActionChain eval(NutConfig config,ActionInfo ai){
  try {
    List<Processor> list=new ArrayList<Processor>();
    for (    String name : co.getProcessors(ai.getChainName())) {
      Processor processor=getProcessorByName(config,name);
      processor.init(config,ai);
      list.add(processor);
    }
    Processor errorProcessor=getProcessorByName(config,co.getErrorProcessor(ai.getChainName()));
    errorProcessor.init(config,ai);
    return new NutActionChain(list,errorProcessor);
  }
 catch (  Throwable e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
public ActionChain eval(NutConfig config,ActionInfo ai){
  try {
    List<Processor> list=new ArrayList<Processor>();
    for (    String name : co.getProcessors(ai.getChainName())) {
      Processor processor=getProcessorByName(config,name);
      processor.init(config,ai);
      list.add(processor);
    }
    Processor errorProcessor=getProcessorByName(config,co.getErrorProcessor(ai.getChainName()));
    errorProcessor.init(config,ai);
    ActionChain chain=new NutActionChain(list,errorProcessor);
    return chain;
  }
 catch (  Throwable e) {
    if (logger.isDebugEnabled())     logger.debugf("String_Node_Str",ai.getMethod());
    throw Lang.wrapThrow(e);
  }
}
Program: 80692
Project: 80692
Buggy source:
public void process(ActionContext ac) throws Throwable {
  Object re=ac.getMethodReturn();
  Object err=ac.getError();
  if (re != null && re instanceof View) {
    if (re instanceof ViewWrapper)     putRequestAttribute(ac.getRequest(),((ViewWrapper)re).getData());
    ((View)re).render(ac.getRequest(),ac.getResponse(),err);
  }
 else {
    putRequestAttribute(ac.getRequest(),re);
    view.render(ac.getRequest(),ac.getResponse(),null == re ? err : re);
  }
  doNext(ac);
}

Fixed version (ground truth):
public void process(ActionContext ac) throws Throwable {
  Object re=ac.getMethodReturn();
  Object err=ac.getError();
  if (re != null && re instanceof View) {
    if (re instanceof ViewWrapper)     putRequestAttribute(ac.getRequest(),((ViewWrapper)re).getData());
    ((View)re).render(ac.getRequest(),ac.getResponse(),err);
  }
 else {
    putRequestAttribute(ac.getRequest(),null == re ? err : re);
    view.render(ac.getRequest(),ac.getResponse(),null == re ? err : re);
  }
  doNext(ac);
}
Program: 80693
Project: 80693
Buggy source:
public void init(FilterConfig conf) throws ServletException {
  FilterNutConfig config=new FilterNutConfig(conf);
  String skipMode=Strings.sNull(conf.getInitParameter("String_Node_Str"),"String_Node_Str").toLowerCase();
  if (!"String_Node_Str".equals(skipMode)) {
    handler=new ActionHandler(config);
    String regx=Strings.sNull(config.getInitParameter("String_Node_Str"),IGNORE);
    if (!"String_Node_Str".equalsIgnoreCase(regx)) {
      ignorePtn=Pattern.compile(regx,Pattern.CASE_INSENSITIVE);
    }
  }
 else   this.skipMode=true;
}

Fixed version (ground truth):
public void init(FilterConfig conf) throws ServletException {
  FilterNutConfig config=new FilterNutConfig(conf);
  String skipMode=Strings.sNull(conf.getInitParameter("String_Node_Str"),"String_Node_Str").toLowerCase();
  if (!"String_Node_Str".equals(skipMode)) {
    handler=new ActionHandler(config);
    String regx=Strings.sNull(config.getInitParameter("String_Node_Str"),IGNORE);
    if (!"String_Node_Str".equalsIgnoreCase(regx)) {
      ignorePtn=Pattern.compile(regx,Pattern.CASE_INSENSITIVE);
    }
  }
 else   this.skipMode=true;
  String doNextFilter=Strings.sNull(conf.getInitParameter("String_Node_Str"),"String_Node_Str").toLowerCase();
  this.doNextFilter="String_Node_Str".equals(doNextFilter);
}
Program: 80694
Project: 80694
Buggy source:
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws IOException, ServletException {
  if (!skipMode) {
    RequestPath path=Mvcs.getRequestPathObject((HttpServletRequest)req);
    if (null == ignorePtn || !ignorePtn.matcher(path.getUrl()).find()) {
      if (handler.handle((HttpServletRequest)req,(HttpServletResponse)resp))       return;
    }
  }
 else {
    Mvcs.updateRequestAttributes((HttpServletRequest)req);
  }
  chain.doFilter(req,resp);
}

Fixed version (ground truth):
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws IOException, ServletException {
  if (!skipMode) {
    RequestPath path=Mvcs.getRequestPathObject((HttpServletRequest)req);
    if (null == ignorePtn || !ignorePtn.matcher(path.getUrl()).find()) {
      if (handler.handle((HttpServletRequest)req,(HttpServletResponse)resp))       if (!doNextFilter)       return;
    }
  }
  Mvcs.updateRequestAttributes((HttpServletRequest)req);
  chain.doFilter(req,resp);
}
Program: 80695
Project: 80695
Buggy source:
@Override public void init(NutConfig config,ActionInfo ai) throws Throwable {
  method=ai.getMethod();
  moduleType=ai.getModuleType();
  if (!Strings.isBlank(ai.getInjectName()))   injectName=ai.getInjectName();
}

Fixed version (ground truth):
@Override public void init(NutConfig config,ActionInfo ai) throws Throwable {
  method=ai.getMethod();
  moduleType=ai.getModuleType();
  if (Strings.isBlank(ai.getInjectName())) {
    moduleObj=Mirror.me(moduleType).born();
  }
 else {
    injectName=ai.getInjectName();
  }
}
Program: 80696
Project: 80696
Buggy source:
public void process(ActionContext ac) throws Throwable {
  RequestIocContext reqContext=null;
  try {
    if (null == injectName) {
      ac.setModule(Mirror.me(moduleType).born());
    }
 else {
      Ioc ioc=ac.getIoc();
      if (null == ioc)       throw Lang.makeThrow("String_Node_Str",injectName);
      Object obj;
      if (ioc instanceof Ioc2) {
        reqContext=new RequestIocContext(ac.getRequest());
        SessionIocContext sessionContext=new SessionIocContext(ac.getRequest().getSession());
        IocContext myContext=new ComboContext(reqContext,sessionContext);
        obj=((Ioc2)ioc).get(moduleType,injectName,myContext);
      }
 else       obj=ioc.get(moduleType,injectName);
      ac.setModule(obj);
    }
    ac.setMethod(method);
    doNext(ac);
  }
  finally {
    if (reqContext != null)     try {
      reqContext.depose();
    }
 catch (    Throwable e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public void process(ActionContext ac) throws Throwable {
  RequestIocContext reqContext=null;
  try {
    if (null != moduleObj) {
      ac.setModule(moduleObj);
    }
 else {
      Ioc ioc=ac.getIoc();
      if (null == ioc)       throw Lang.makeThrow("String_Node_Str",injectName);
      Object obj;
      if (ioc instanceof Ioc2) {
        reqContext=new RequestIocContext(ac.getRequest());
        SessionIocContext sessionContext=new SessionIocContext(ac.getRequest().getSession());
        IocContext myContext=new ComboContext(reqContext,sessionContext);
        obj=((Ioc2)ioc).get(moduleType,injectName,myContext);
      }
 else       obj=ioc.get(moduleType,injectName);
      ac.setModule(obj);
    }
    ac.setMethod(method);
    doNext(ac);
  }
  finally {
    if (reqContext != null)     try {
      reqContext.depose();
    }
 catch (    Throwable e) {
      e.printStackTrace();
    }
  }
}
Program: 80697
Project: 80697
Buggy source:
@Override public void process(ActionContext ac) throws Throwable {
  super.process(ac);
  if (log.isDebugEnabled())   log.debug("String_Node_Str",ac.getError());
}

Fixed version (ground truth):
@Override public void process(ActionContext ac) throws Throwable {
  if (log.isDebugEnabled())   log.debug("String_Node_Str",ac.getError());
  super.process(ac);
}
Program: 80698
Project: 80698
Buggy source:
public List<NutResource> list(String src,String filter){
  final List<NutResource> list=new LinkedList<NutResource>();
  final Pattern regex=null == filter ? null : Pattern.compile(filter);
  File f=Files.findFile(src);
  if (f != null && f.exists()) {
    if (f.isFile())     list.addAll(scanInDir(regex,src,f.getParentFile(),ignoreHidden));
 else     list.addAll(scanInDir(regex,src,f,ignoreHidden));
  }
 else {
    String path=Disks.absolute(src,getClass().getClassLoader(),Encoding.defaultEncoding());
    if (null != path) {
      f=new File(path);
      if (!path.contains("String_Node_Str")) {
        int pos=path.lastIndexOf(src);
        list.addAll(scanInDir(regex,path.substring(0,pos),f,ignoreHidden));
      }
 else {
        JarEntryInfo jeInfo=new JarEntryInfo(path);
        list.addAll(scanInJar(checkSrc(jeInfo.getEntryName()),regex,jeInfo.getJarPath()));
      }
    }
 else {
      String classpath=System.getProperties().getProperty("String_Node_Str");
      if (LOG.isInfoEnabled())       LOG.info("String_Node_Str" + classpath);
      String[] paths=classpath.split(System.getProperties().getProperty("String_Node_Str"));
      for (      String pathZ : paths) {
        if (pathZ.endsWith("String_Node_Str"))         list.addAll(scanInJar(checkSrc(src),regex,pathZ));
 else         list.addAll(scanInDir(regex,pathZ,new File(pathZ + "String_Node_Str" + src),ignoreHidden));
      }
    }
  }
  return list;
}

Fixed version (ground truth):
public List<NutResource> list(String src,String filter){
  final List<NutResource> list=new LinkedList<NutResource>();
  final Pattern regex=null == filter ? null : Pattern.compile(filter);
  File f=Files.findFile(src);
  if (f != null && f.exists()) {
    if (f.isFile())     list.addAll(scanInDir(regex,src,f.getParentFile(),ignoreHidden));
 else     list.addAll(scanInDir(regex,src,f,ignoreHidden));
  }
 else {
    String path=Disks.absolute(src,getClass().getClassLoader(),Encoding.defaultEncoding());
    if (null != path) {
      f=new File(path);
      if (!path.contains("String_Node_Str")) {
        int pos=path.lastIndexOf(src);
        if (pos > 0)         list.addAll(scanInDir(regex,path.substring(0,pos),f,ignoreHidden));
      }
 else {
        JarEntryInfo jeInfo=new JarEntryInfo(path);
        list.addAll(scanInJar(checkSrc(jeInfo.getEntryName()),regex,jeInfo.getJarPath()));
      }
    }
 else {
      String classpath=System.getProperties().getProperty("String_Node_Str");
      if (LOG.isInfoEnabled())       LOG.info("String_Node_Str" + classpath);
      String[] paths=classpath.split(System.getProperties().getProperty("String_Node_Str"));
      for (      String pathZ : paths) {
        if (pathZ.endsWith("String_Node_Str"))         list.addAll(scanInJar(checkSrc(src),regex,pathZ));
 else         list.addAll(scanInDir(regex,pathZ,new File(pathZ + "String_Node_Str" + src),ignoreHidden));
      }
    }
  }
  return list;
}
Program: 80699
Project: 80699
Buggy source:
public BinElObj append(ElOperator opt,ElObj obj){
  if (null == operator) {
    return setOperator(opt).setRight(obj);
  }
  BinElObj nn=new BinElObj();
  if (opt.isHigherThan(operator)) {
    if (right instanceof BinElObj) {
      setRight(((BinElObj)right).append(opt,obj));
    }
 else {
      nn.setLeft(right).setOperator(opt).setRight(obj);
      setRight(nn);
    }
  }
 else {
    BinElObj on=this;
    while (on.parent != null) {
      on=on.parent;
      if (!on.getOperator().isHigherThan(opt))       break;
    }
    nn.setLeft(on).setOperator(opt).setRight(obj);
  }
  return nn;
}

Fixed version (ground truth):
public BinElObj append(ElOperator opt,ElObj obj){
  if (null == operator) {
    return setOperator(opt).setRight(obj);
  }
  BinElObj nn;
  if (opt.isHigherThan(operator)) {
    if (right instanceof BinElObj) {
      nn=((BinElObj)right).append(opt,obj);
    }
 else {
      nn=new BinElObj();
      nn.setLeft(right).setOperator(opt).setRight(obj);
      setRight(nn);
    }
  }
 else {
    nn=new BinElObj();
    BinElObj on=this;
    while (on.parent != null) {
      if (!on.getOperator().isHigherThan(opt))       break;
      on=on.parent;
    }
    nn.parent=on.parent;
    nn.setLeft(on).setOperator(opt).setRight(obj);
    if (null != nn.parent)     nn.parent.setRight(nn);
  }
  return nn;
}
Program: 80700
Project: 80700
Buggy source:
Map<String,Map<String,String>> load(String refer);

Fixed version (ground truth):
Map<String,Map<String,Object>> load(String refer);
Program: 80701
Project: 80701
Buggy source:
private void evalLocalization(NutConfig config,Class<?> mainModule){
  Localization lc=mainModule.getAnnotation(Localization.class);
  if (null != lc) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",lc.value());
    Map<String,Map<String,String>> msgss=Mirror.me(lc.type()).born().load(lc.value());
    config.setAttributeIgnoreNull(Localization.class.getName(),msgss);
  }
 else   if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
private void evalLocalization(NutConfig config,Class<?> mainModule){
  Localization lc=mainModule.getAnnotation(Localization.class);
  if (null != lc) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",lc.value());
    Map<String,Map<String,Object>> msgss=Mirror.me(lc.type()).born().load(lc.value());
    config.setAttributeIgnoreNull(Localization.class.getName(),msgss);
  }
 else   if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
}
Program: 80704
Project: 80704
Buggy source:
private void string2Json(String s) throws IOException {
  if (null == s)   writer.append("String_Node_Str");
 else {
    char[] cs=s.toCharArray();
    writer.append(format.getSeparator());
    for (    char c : cs) {
switch (c) {
case '"':
        writer.append("String_Node_Str");
      break;
case '\n':
    writer.append("String_Node_Str");
  break;
case '\t':
writer.append("String_Node_Str");
break;
case '\r':
writer.append("String_Node_Str");
break;
case '\\':
writer.append("String_Node_Str");
break;
default :
writer.append(c);
}
}
writer.append(format.getSeparator());
}
}

Fixed version (ground truth):
private void string2Json(String s) throws IOException {
  if (null == s)   writer.append("String_Node_Str");
 else {
    char[] cs=s.toCharArray();
    writer.append(format.getSeparator());
    for (    char c : cs) {
switch (c) {
case '"':
        writer.append("String_Node_Str");
      break;
case '\n':
    writer.append("String_Node_Str");
  break;
case '\t':
writer.append("String_Node_Str");
break;
case '\r':
writer.append("String_Node_Str");
break;
case '\\':
writer.append("String_Node_Str");
break;
default :
if (c >= 256 && format.isAutoUnicode()) writer.append("String_Node_Str").append(Integer.toHexString(c).toUpperCase());
 else writer.append(c);
}
}
writer.append(format.getSeparator());
}
}
Program: 80705
Project: 80705
Buggy source:
public void init(Method method){
  Class<?>[] argTypes=method.getParameterTypes();
  injs=new ParamInjector[argTypes.length];
  Annotation[][] annss=method.getParameterAnnotations();
  for (int i=0; i < annss.length; i++) {
    Annotation[] anns=annss[i];
    Param param=null;
    Attr attr=null;
    IocObj iocObj=null;
    for (int x=0; x < anns.length; x++)     if (anns[x] instanceof Param) {
      param=(Param)anns[x];
      break;
    }
 else     if (anns[x] instanceof Attr) {
      attr=(Attr)anns[x];
      break;
    }
 else     if (anns[x] instanceof IocObj) {
      iocObj=(IocObj)anns[x];
      break;
    }
    if (null != attr) {
      injs[i]=evalInjectorByAttrScope(attr);
      continue;
    }
    if (null != iocObj) {
      injs[i]=new IocObjInjector(method.getParameterTypes()[i],iocObj.value());
      continue;
    }
    injs[i]=evalInjectorByParamType(argTypes[i]);
    if (null != injs[i])     continue;
    injs[i]=evalInjector(argTypes[i],param);
    if (null == injs[i])     injs[i]=new ErrorInjector(method,i);
  }
}

Fixed version (ground truth):
public void init(Method method){
  this.method=method;
  Class<?>[] argTypes=method.getParameterTypes();
  injs=new ParamInjector[argTypes.length];
  Annotation[][] annss=method.getParameterAnnotations();
  for (int i=0; i < annss.length; i++) {
    Annotation[] anns=annss[i];
    Param param=null;
    Attr attr=null;
    IocObj iocObj=null;
    for (int x=0; x < anns.length; x++)     if (anns[x] instanceof Param) {
      param=(Param)anns[x];
      break;
    }
 else     if (anns[x] instanceof Attr) {
      attr=(Attr)anns[x];
      break;
    }
 else     if (anns[x] instanceof IocObj) {
      iocObj=(IocObj)anns[x];
      break;
    }
    if (null != attr) {
      injs[i]=evalInjectorByAttrScope(attr);
      continue;
    }
    if (null != iocObj) {
      injs[i]=new IocObjInjector(method.getParameterTypes()[i],iocObj.value());
      continue;
    }
    injs[i]=evalInjectorByParamType(argTypes[i]);
    if (null != injs[i])     continue;
    injs[i]=evalInjector(argTypes[i],param);
    if (null == injs[i])     injs[i]=new ErrorInjector(method,i);
  }
}