nus-yam/ex-repair huggingface dataset:
Program: 80896
Project: 80896
Buggy source:
public XmlFileMirrorFactory(Ioc ioc,String... fileNames) throws ParserConfigurationException, SAXException, IOException {
  this.ioc=ioc;
  this.cd=new DefaultClassDefiner();
  DocumentBuilder builder=Lang.xmls();
  Document document;
  for (  String fileName : fileNames) {
    document=builder.parse(Files.findFile(fileName));
    document.normalizeDocument();
    NodeList nodeListZ=((Element)document.getDocumentElement()).getElementsByTagName("String_Node_Str");
    for (int i=0; i < nodeListZ.getLength(); i++)     parse((Element)nodeListZ.item(i));
  }
}

Fixed version (ground truth):
public XmlFileMirrorFactory(Ioc ioc,String... fileNames) throws ParserConfigurationException, SAXException, IOException {
  this.ioc=ioc;
  this.cd=new DefaultClassDefiner(getClass().getClassLoader());
  DocumentBuilder builder=Lang.xmls();
  Document document;
  for (  String fileName : fileNames) {
    document=builder.parse(Files.findFile(fileName));
    document.normalizeDocument();
    NodeList nodeListZ=((Element)document.getDocumentElement()).getElementsByTagName("String_Node_Str");
    for (int i=0; i < nodeListZ.getLength(); i++)     parse((Element)nodeListZ.item(i));
  }
}
Program: 80897
Project: 80897
Buggy source:
public static ClassDefiner cd(){
  return new DefaultClassDefiner();
}

Fixed version (ground truth):
public static ClassDefiner cd(){
  return new DefaultClassDefiner(Nutzs.class.getClassLoader());
}
Program: 80899
Project: 80899
Buggy source:
/** 
 * 根据给定的字节数组，在环中作标记，以便 dump
 * @param bs 数组
 * @return 标记模式
 * @throws IOException
 */
public MarkMode mark(byte[] bs) throws IOException {
  RingItem ri=item;
  int re;
  while ((re=ri.mark(bs)) >= 0 && ri.isDone4Mark()) {
    if (re > 0) {
      if (!ri.next.isLoaded) {
        ri.next.load(ins);
        readed+=ri.next.max;
      }
 else       if (ri.next == this.item) {
        ri.nextmark=ri.r;
        return MarkMode.NOT_FOUND;
      }
      if (ri.next.matchHeadingWithRemain(bs,re)) {
        return MarkMode.FOUND;
      }
 else {
        ri.r=ri.max;
        ri.nextmark=ri.max;
      }
    }
    if (ri.isStreamEnd)     break;
    ri=ri.next;
    if (!ri.isLoaded) {
      ri.load(ins);
      readed+=ri.max;
    }
    if (ri == item)     break;
  }
  if (re == -1)   return MarkMode.FOUND;
  return ri.isStreamEnd ? MarkMode.STREAM_END : MarkMode.NOT_FOUND;
}

Fixed version (ground truth):
/** 
 * 根据给定的字节数组，在环中作标记，以便 dump
 * @param bs 数组
 * @return 标记模式
 * @throws IOException
 */
private MarkMode mark(byte[] bs,int[] fails) throws IOException {
  RingItem ri=item;
  int re;
  while ((re=ri.mark(bs,fails)) >= 0 && ri.isDone4Mark()) {
    if (re > 0) {
      if (!ri.next.isLoaded) {
        ri.next.load(ins);
        readed+=ri.next.max;
      }
 else       if (ri.next == this.item) {
        ri.nextmark=ri.r;
        return MarkMode.NOT_FOUND;
      }
      if (ri.next.matchHeadingWithRemain(bs,re)) {
        return MarkMode.FOUND;
      }
 else {
        ri.r=ri.max;
        ri.nextmark=ri.max;
      }
    }
    if (ri.isStreamEnd)     break;
    ri=ri.next;
    if (!ri.isLoaded) {
      ri.load(ins);
      readed+=ri.max;
    }
    if (ri == item)     break;
  }
  if (re == -1)   return MarkMode.FOUND;
  return ri.isStreamEnd ? MarkMode.STREAM_END : MarkMode.NOT_FOUND;
}
Program: 80900
Project: 80900
Buggy source:
public static RemountBytes create(byte[] bs){
  int[] ps=new int[bs.length];
  for (int i=2; i < bs.length; i++) {
  }
  RemountBytes re=new RemountBytes();
  re.bytes=bs;
  re.pos=ps;
  return re;
}

Fixed version (ground truth):
public static RemountBytes create(byte[] bs){
  int[] fails=new int[bs.length];
  if (bs.length > 1) {
    for (int i=2; i < bs.length; i++) {
      int blueL=1;
      int blueR=i - 1;
      int x=0;
      for (int j=blueL; j <= blueR; j++) {
        byte red=bs[x];
        byte blue=bs[j];
        if (red == blue)         x++;
 else         x=0;
      }
      fails[i]=x;
    }
  }
  RemountBytes re=new RemountBytes();
  re.bytes=bs;
  re.fails=fails;
  return re;
}
Program: 80901
Project: 80901
Buggy source:
/** 
 * 从给定 offs 尽力匹配给出的数组。 <p> 需要注意的是，如果返回的是 >0 的数，内部的标志位将被设置到第一个匹配字符，以便 DUMP 内容。 <br> 所以，如果下一个节点给出的结论是 -1，但是 'l' 并不是0，那么说明这个匹配是失败的，需要将 本节点的 r 置到 max 处。 <p> 返回值 <ul> <li><b>-1</b> - 全部被匹配 <li><b>0</b> - 未发现匹配 <li><b>大于 0</b> - 在缓冲的末尾发现匹配，但是没有匹配全，希望下一个节点继续从这个位置匹配 </ul>
 * @param bs 数组
 * @return -1, 0 或者 +n
 */
int mark(byte[] bs){
  if (!isLoaded)   throw new MarkUnloadedRingItemException();
  byte start=bs[0];
  for (; r < max; r++) {
    if (buffer[r] == start) {
      int re=0;
      int j=r;
      while (true) {
        re++;
        j++;
        if (re >= bs.length || j >= max)         break;
        if (bs[re] != buffer[j])         break;
      }
      if (re == bs.length) {
        nextmark=j;
        return -1;
      }
 else       if (j == max) {
        nextmark=max;
        if (isStreamEnd) {
          r=max;
          return 0;
        }
        return re;
      }
      r=j;
    }
  }
  nextmark=max;
  return 0;
}

Fixed version (ground truth):
/** 
 * 从给定 offs 尽力匹配给出的数组。 <p> 需要注意的是，如果返回的是 >0 的数，内部的标志位将被设置到第一个匹配字符，以便 DUMP 内容。 <br> 所以，如果下一个节点给出的结论是 -1，但是 'l' 并不是0，那么说明这个匹配是失败的，需要将 本节点的 r 置到 max 处。 <p> 返回值 <ul> <li><b>-1</b> - 全部被匹配 <li><b>0</b> - 未发现匹配 <li><b>大于 0</b> - 在缓冲的末尾发现匹配，但是没有匹配全，希望下一个节点继续从这个位置匹配 </ul>
 * @param bs 数组
 * @return -1, 0 或者 +n
 */
int mark(byte[] bs,int[] fails){
  if (!isLoaded)   throw new MarkUnloadedRingItemException();
  byte start=bs[0];
  for (; r < max; r++) {
    if (buffer[r] == start) {
      int re=0;
      int j=r;
      while (true) {
        re++;
        j++;
        if (re == bs.length) {
          nextmark=j;
          return -1;
        }
        if (j == max) {
          nextmark=max;
          if (isStreamEnd) {
            r=max;
            return 0;
          }
          return re;
        }
        if (bs[re] != buffer[j]) {
          re=fails[re];
          if (bs[re] != buffer[j]) {
            break;
          }
 else {
            r+=re == 0 ? 1 : re;
          }
        }
      }
      r=j;
    }
  }
  nextmark=max;
  return 0;
}
Program: 80903
Project: 80903
Buggy source:
@Test public void test_by_buffer2() throws IOException {
  byte[] boundary=Lang.toBytes("String_Node_Str".toCharArray());
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  br.skipMark();
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  assertEquals(25,br.readed);
}

Fixed version (ground truth):
@Test public void test_by_buffer2() throws IOException {
  RemountBytes boundary=RemountBytes.create("String_Node_Str");
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  br.skipMark();
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  assertEquals(25,br.readed);
}
Program: 80904
Project: 80904
Buggy source:
@Test public void test_by_buffer() throws IOException {
  byte[] boundary=Lang.toBytes("String_Node_Str".toCharArray());
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  br.skipMark();
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  assertEquals(27,br.readed);
}

Fixed version (ground truth):
@Test public void test_by_buffer() throws IOException {
  RemountBytes boundary=RemountBytes.create("String_Node_Str");
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  br.skipMark();
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  assertEquals(27,br.readed);
}
Program: 80905
Project: 80905
Buggy source:
@Test public void test_mark_dangerous_char() throws IOException {
  byte[] boundary=Lang.toBytes("String_Node_Str".toCharArray());
  String str="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}

Fixed version (ground truth):
@Test public void test_mark_dangerous_char() throws IOException {
  RemountBytes boundary=RemountBytes.create("String_Node_Str");
  String str="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}
Program: 80906
Project: 80906
Buggy source:
@Test public void test_mark_dangerous_char2() throws IOException {
  byte[] boundary=Lang.toBytes("String_Node_Str".toCharArray());
  String str="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}

Fixed version (ground truth):
@Test public void test_mark_dangerous_char2() throws IOException {
  RemountBytes boundary=RemountBytes.create("String_Node_Str");
  String str="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,10);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}
Program: 80907
Project: 80907
Buggy source:
@Test public void test_cross_ring_item() throws IOException {
  byte[] boundary=Lang.toBytes("String_Node_Str".toCharArray());
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.NOT_FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}

Fixed version (ground truth):
@Test public void test_cross_ring_item() throws IOException {
  RemountBytes boundary=RemountBytes.create("String_Node_Str");
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.NOT_FOUND,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  mode=br.mark(boundary);
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}
Program: 80908
Project: 80908
Buggy source:
@Test public void test_case_A(){
  RemountBytes rb=RB("String_Node_Str");
  assertEquals(0,rb.pos[0]);
  assertEquals(0,rb.pos[1]);
  assertEquals(1,rb.pos[2]);
  assertEquals(0,rb.pos[3]);
}

Fixed version (ground truth):
@Test public void test_case_A(){
  RemountBytes rb=RB("String_Node_Str");
  assertEquals(0,rb.fails[0]);
  assertEquals(0,rb.fails[1]);
  assertEquals(1,rb.fails[2]);
  assertEquals(0,rb.fails[3]);
}
Program: 80909
Project: 80909
Buggy source:
@Test public void test_case_C(){
  RemountBytes rb=RB("String_Node_Str");
  assertEquals(0,rb.pos[0]);
  assertEquals(0,rb.pos[1]);
  assertEquals(0,rb.pos[2]);
  assertEquals(0,rb.pos[3]);
  assertEquals(0,rb.pos[4]);
  assertEquals(0,rb.pos[5]);
  assertEquals(3,rb.pos[6]);
}

Fixed version (ground truth):
@Test public void test_case_C(){
  RemountBytes rb=RB("String_Node_Str");
  assertEquals(0,rb.fails[0]);
  assertEquals(0,rb.fails[1]);
  assertEquals(0,rb.fails[2]);
  assertEquals(0,rb.fails[3]);
  assertEquals(1,rb.fails[4]);
  assertEquals(2,rb.fails[5]);
  assertEquals(3,rb.fails[6]);
}
Program: 80910
Project: 80910
Buggy source:
@Test public void test_case_B(){
  RemountBytes rb=RB("String_Node_Str");
  assertEquals(0,rb.pos[0]);
  assertEquals(0,rb.pos[1]);
  assertEquals(0,rb.pos[2]);
  assertEquals(0,rb.pos[3]);
  assertEquals(2,rb.pos[4]);
}

Fixed version (ground truth):
@Test public void test_case_B(){
  RemountBytes rb=RB("String_Node_Str");
  assertEquals(0,rb.fails[0]);
  assertEquals(0,rb.fails[1]);
  assertEquals(0,rb.fails[2]);
  assertEquals(1,rb.fails[3]);
  assertEquals(2,rb.fails[4]);
}
Program: 80911
Project: 80911
Buggy source:
Exp(String name,String op,Object value){
  this.name=name;
  this.op=Strings.trim(op);
  if (ptn.matcher(this.op).find())   this.op="String_Node_Str" + this.op + "String_Node_Str";
  this.value=value;
}

Fixed version (ground truth):
Exp(String name,String op,Object value){
  this.name=name;
  this.op=Strings.trim(op);
  if (ptn.matcher(this.op).find())   this.op=this.op.toUpperCase();
  this.value=value;
}
Program: 80912
Project: 80912
Buggy source:
public void render(StringBuilder sb,Entity<?> en){
  if (null != en) {
    EntityField ef=en.getField(name);
    sb.append(null != ef ? ef.getColumnName() : name);
  }
 else   sb.append(name);
  sb.append(op);
  sb.append(Sqls.formatFieldValue(value));
}

Fixed version (ground truth):
public void render(final StringBuilder sb,Entity<?> en){
  if (null != en) {
    EntityField ef=en.getField(name);
    sb.append(null != ef ? ef.getColumnName() : name);
  }
 else   sb.append(name);
  if ("String_Node_Str".equals(op)) {
    sb.append("String_Node_Str");
    if (null == value)     throw Lang.makeThrow("String_Node_Str",sb);
    if (value instanceof Collection<?> || value.getClass().isArray()) {
      sb.append('(');
      Lang.each(value,new Each<Object>(){
        public void invoke(        int i,        Object ele,        int length) throws ExitLoop, LoopException {
          sb.append(Sqls.formatFieldValue(ele)).append(',');
        }
      }
);
      sb.setCharAt(sb.length() - 1,')');
    }
 else     sb.append(Sqls.formatFieldValue(value));
  }
 else   if (null == value && "String_Node_Str".equals(op)) {
    sb.append("String_Node_Str");
  }
 else   if ("String_Node_Str".equals(op) || "String_Node_Str".equals(op)) {
    sb.append(' ').append(op).append(' ').append(Sqls.formatFieldValue(value));
  }
 else {
    sb.append(op).append(Sqls.formatFieldValue(value));
  }
}
Program: 80914
Project: 80914
Buggy source:
/** 
 * 根据请求对象创建参数 MAP， 同时根据 QueryString，为 MAP 设置初始值
 * @param req 请求对象
 * @return 参数 MAP
 */
public static Map<String,Object> createParamsMap(HttpServletRequest req){
  Map<String,Object> params=new HashMap<String,Object>();
  String qs=req.getQueryString();
  if (null != qs) {
    String[] pairs=Strings.splitIgnoreBlank(qs,"String_Node_Str");
    for (    String pair : pairs) {
      String[] pp=pair.split("String_Node_Str");
      if (pp.length > 1)       params.put(pp[0],pp[1]);
 else       params.put(pp[0],null);
    }
  }
  return params;
}

Fixed version (ground truth):
/** 
 * 根据请求对象创建参数 MAP， 同时根据 QueryString，为 MAP 设置初始值
 * @param req 请求对象
 * @return 参数 MAP
 */
public static NutMap createParamsMap(HttpServletRequest req){
  NutMap params=new NutMap();
  String qs=req.getQueryString();
  if (null != qs) {
    String[] pairs=Strings.splitIgnoreBlank(qs,"String_Node_Str");
    for (    String pair : pairs) {
      String[] pp=pair.split("String_Node_Str");
      if (pp.length > 1)       params.put(pp[0],pp[1]);
 else       params.put(pp[0],null);
    }
  }
  return params;
}
Program: 80915
Project: 80915
Buggy source:
public void update(Dao dao,Object obj){
  if (null == obj)   return;
  Sql sql=this.sql.duplicate();
  if (vars.length > 0) {
    sql.vars().set("String_Node_Str",ef.getEntity().getViewName());
    sql.vars().set("String_Node_Str",ef.getColumnName());
    Object refer=TableName.get();
    if (null != refer) {
      if (TableName.isPrimitive(refer))       for (      String var : vars)       if (var.equals("String_Node_Str") || var.equals("String_Node_Str"))       continue;
 else       sql.vars().set(var,refer);
 else {
        Mirror<?> me=Mirror.me(refer.getClass());
        for (        String var : vars) {
          if (var.equals("String_Node_Str") || var.equals("String_Node_Str"))           continue;
 else {
            Object v=me.getValue(refer,var);
            sql.vars().set(var,v);
          }
        }
      }
    }
  }
  if (params.length > 0) {
    Mirror<?> me=Mirror.me(obj.getClass());
    for (    Field f : params) {
      Object v=me.getValue(obj,f);
      sql.params().set(f.getName(),v);
    }
  }
  dao.execute(sql);
  ef.setValue(obj,sql.getResult());
}

Fixed version (ground truth):
public void update(Dao dao,Object obj){
  if (null == obj)   return;
  Sql sql=this.sql.duplicate();
  if (vars.length > 0) {
    sql.vars().set("String_Node_Str",ef.getEntity().getViewName());
    sql.vars().set("String_Node_Str",ef.getColumnName());
    Object refer=TableName.get();
    if (null == refer)     refer=obj;
    if (null != refer) {
      if (TableName.isPrimitive(refer))       for (      String var : vars)       if (var.equals("String_Node_Str") || var.equals("String_Node_Str"))       continue;
 else       sql.vars().set(var,refer);
 else {
        Mirror<?> me=Mirror.me(refer.getClass());
        for (        String var : vars) {
          if (var.equals("String_Node_Str") || var.equals("String_Node_Str"))           continue;
 else {
            Object v=me.getValue(refer,var);
            sql.vars().set(var,v);
          }
        }
      }
    }
  }
  if (params.length > 0) {
    Mirror<?> me=Mirror.me(obj.getClass());
    for (    Field f : params) {
      Object v=me.getValue(obj,f);
      sql.params().set(f.getName(),v);
    }
  }
  dao.execute(sql);
  ef.setValue(obj,sql.getResult());
}
Program: 80916
Project: 80916
Buggy source:
@SuppressWarnings("String_Node_Str") private void map2Json(Map map) throws IOException {
  if (null == map)   return;
  appendBraceBegin();
  increaseFormatIndent();
  ArrayList<Pair> list=new ArrayList<Pair>(map.size());
  for (  Object key : map.keySet()) {
    String name=null == key ? "String_Node_Str" : key.toString();
    Object value=map.get(name);
    if (!this.isIgnore(name,value))     list.add(new Pair(name,value));
  }
  for (Iterator<Pair> it=list.iterator(); it.hasNext(); ) {
    Pair p=it.next();
    this.appendPair(p.name,p.value);
    if (it.hasNext())     this.appendPairEnd();
  }
  decreaseFormatIndent();
  appendBraceEnd();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void map2Json(Map map) throws IOException {
  if (null == map)   return;
  appendBraceBegin();
  increaseFormatIndent();
  ArrayList<Pair> list=new ArrayList<Pair>(map.size());
  for (  Object key : map.keySet()) {
    String name=null == key ? "String_Node_Str" : key.toString();
    Object value=map.get(key);
    if (!this.isIgnore(name,value))     list.add(new Pair(name,value));
  }
  for (Iterator<Pair> it=list.iterator(); it.hasNext(); ) {
    Pair p=it.next();
    this.appendPair(p.name,p.value);
    if (it.hasNext())     this.appendPairEnd();
  }
  decreaseFormatIndent();
  appendBraceEnd();
}
Program: 80917
Project: 80917
Buggy source:
public Object get(HttpServletRequest req,HttpServletResponse resp,Object refer){
  Object obj=mirror.born();
  for (int i=0; i < injs.length; i++) {
    Injecting inj=injs[i];
    String s=req.getParameter(names[i]);
    if (Strings.isBlank(s))     s=null;
    inj.inject(obj,s);
  }
  return obj;
}

Fixed version (ground truth):
public Object get(HttpServletRequest req,HttpServletResponse resp,Object refer){
  Object obj=mirror.born();
  for (int i=0; i < injs.length; i++) {
    Injecting inj=injs[i];
    String s=req.getParameter(names[i]);
    if (null == s)     continue;
    if (Strings.isBlank(s))     s=null;
    inj.inject(obj,s);
  }
  return obj;
}
Program: 80918
Project: 80918
Buggy source:
/** 
 * 清除数据表所有记录
 * @param tableName 表名
 */
void clear(String tableName);

Fixed version (ground truth):
/** 
 * 清除数据表所有记录
 * @param tableName 表名
 * @return 影响的行数
 */
int clear(String tableName);
Program: 80919
Project: 80919
Buggy source:
public void clear(String tableName,Condition condition){
  Sql sql;
  if (null == condition) {
    sql=sqlMaker.truncate(tableName);
  }
 else {
    sql=sqlMaker.clear(tableName).setCondition(condition);
  }
  execute(sql);
}

Fixed version (ground truth):
public int clear(String tableName,Condition condition){
  Sql sql;
  if (null == condition) {
    sql=sqlMaker.truncate(tableName);
  }
 else {
    sql=sqlMaker.clear(tableName).setCondition(condition);
  }
  execute(sql);
  return sql.getUpdateCount();
}
Program: 80920
Project: 80920
Buggy source:
public void clear(){
  dao().clear(getEntityClass(),null);
}

Fixed version (ground truth):
public int clear(){
  return dao().clear(getEntityClass(),null);
}
Program: 80921
Project: 80921
Buggy source:
public void delete(long id){
  dao().delete(getEntityClass(),id);
}

Fixed version (ground truth):
public int delete(long id){
  return dao().delete(getEntityClass(),id);
}
Program: 80922
Project: 80922
Buggy source:
public void delete(String name){
  dao().delete(getEntityClass(),name);
}

Fixed version (ground truth):
public int delete(String name){
  return dao().delete(getEntityClass(),name);
}
Program: 80923
Project: 80923
Buggy source:
public void delete(String name){
  dao().delete(getEntityClass(),name);
}

Fixed version (ground truth):
public int delete(String name){
  return dao().delete(getEntityClass(),name);
}
Program: 80924
Project: 80924
Buggy source:
@SuppressWarnings("String_Node_Str") public <T>T fetch(T obj){
  if (null != obj) {
    Entity<?> entity=(Entity)getEntity(obj.getClass());
    EntityField idnf=entity.getIdentifiedField();
    Sql sql;
    if (idnf == null) {
      Object[] args=evalArgsByPks(entity,obj);
      if (null != args) {
        sql=sqlMaker.fetchx(entity,args);
      }
 else {
        throw new DaoException(format("String_Node_Str",entity.getType().getName()));
      }
    }
 else {
      sql=sqlMaker.fetch(entity,idnf);
      sql.params().set(idnf.getFieldName(),idnf.getValue(obj));
    }
    execute(sql);
    return sql.getObject((Class<T>)entity.getType());
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <T>T fetch(T obj){
  if (null != obj) {
    Entity<?> entity=(Entity)getEntity(obj.getClass());
    EntityField idnf=entity.getIdentifiedField();
    Sql sql;
    if (idnf == null) {
      Object[] args=evalArgsByPks(entity,obj);
      if (null != args) {
        sql=sqlMaker.fetchx(entity,args);
      }
 else {
        throw new DaoException(format("String_Node_Str",entity.getType().getName()));
      }
    }
 else {
      sql=sqlMaker.fetch(entity,idnf);
      sql.params().set(idnf.getName(),idnf.getValue(obj));
    }
    execute(sql);
    return sql.getObject((Class<T>)entity.getType());
  }
  return null;
}
Program: 80925
Project: 80925
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.getFieldName();
    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);
  }
  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: 80926
Project: 80926
Buggy source:
public Sql update(Entity<?> en,Object obj){
  StringBuilder sb=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.getFieldName();
    if (ef == en.getIdentifiedField() || ef.isPk() || ef.isReadonly())     continue;
    Object value=ef.getValue(obj);
    if (null != fm) {
      if (fm.isIgnoreNull() && null == value)       continue;
 else       if (!fm.match(fn))       continue;
    }
    sb.append(',').append(ef.getColumnName()).append('=').append("String_Node_Str").append(fn);
    map.put(fn,value);
  }
  sb.deleteCharAt(0);
  EntityField idf=en.getIdentifiedField();
  if (null != idf) {
    String fmt=format("String_Node_Str",en.getTableName(),sb,idf.getColumnName(),idf.getFieldName());
    Sql sql=Sqls.create(fmt).setEntity(en);
    sql.params().putAll(map).set(idf.getFieldName(),idf.getValue(obj));
    return sql;
  }
  EntityField[] pks=en.getPkFields();
  if (null == pks || pks.length <= 1) {
    throw Lang.makeThrow("String_Node_Str",en.getType());
  }
  Object[] args=new Object[pks.length];
  for (int i=0; i < args.length; i++) {
    args[i]=pks[i].getValue(obj);
  }
  String fmt=format("String_Node_Str",en.getTableName(),sb);
  Sql sql=Sqls.create(fmt).setEntity(en);
  sql.params().putAll(map);
  sql.setCondition(new PkCondition(args));
  return sql;
}

Fixed version (ground truth):
public Sql update(Entity<?> en,Object obj){
  StringBuilder sb=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 == en.getIdentifiedField() || ef.isPk() || ef.isReadonly())     continue;
    Object value=ef.getValue(obj);
    if (null != fm) {
      if (fm.isIgnoreNull() && null == value)       continue;
 else       if (!fm.match(fn))       continue;
    }
    sb.append(',').append(ef.getColumnName()).append('=').append("String_Node_Str").append(fn);
    map.put(fn,value);
  }
  sb.deleteCharAt(0);
  EntityField idf=en.getIdentifiedField();
  if (null != idf) {
    String fmt=format("String_Node_Str",en.getTableName(),sb,idf.getColumnName(),idf.getName());
    Sql sql=Sqls.create(fmt).setEntity(en);
    sql.params().putAll(map).set(idf.getName(),idf.getValue(obj));
    return sql;
  }
  EntityField[] pks=en.getPkFields();
  if (null == pks || pks.length <= 1) {
    throw Lang.makeThrow("String_Node_Str",en.getType());
  }
  Object[] args=new Object[pks.length];
  for (int i=0; i < args.length; i++) {
    args[i]=pks[i].getValue(obj);
  }
  String fmt=format("String_Node_Str",en.getTableName(),sb);
  Sql sql=Sqls.create(fmt).setEntity(en);
  sql.params().putAll(map);
  sql.setCondition(new PkCondition(args));
  return sql;
}
Program: 80927
Project: 80927
Buggy source:
public Sql delete(Entity<?> entity,EntityField ef){
  return Sqls.create(format("String_Node_Str",entity.getTableName(),ef.getColumnName(),ef.getFieldName())).setEntity(entity);
}

Fixed version (ground truth):
public Sql delete(Entity<?> entity,EntityField ef){
  return Sqls.create(format("String_Node_Str",entity.getTableName(),ef.getColumnName(),ef.getName())).setEntity(entity);
}
Program: 80928
Project: 80928
Buggy source:
public Sql fetch(Entity<?> entity,EntityField ef){
  String fields=evalActivedFields(entity);
  String fmt;
  if (ef == null) {
    fmt=format("String_Node_Str",fields,entity.getViewName());
  }
 else   if (ef.isName() && !ef.isCasesensitive()) {
    fmt=format("String_Node_Str",fields,entity.getViewName(),ef.getColumnName(),ef.getFieldName());
  }
 else {
    fmt=format("String_Node_Str",fields,entity.getViewName(),ef.getColumnName(),ef.getFieldName());
  }
  return Sqls.fetchEntity(fmt).setEntity(entity);
}

Fixed version (ground truth):
public Sql fetch(Entity<?> entity,EntityField ef){
  String fields=evalActivedFields(entity);
  String fmt;
  if (ef == null) {
    fmt=format("String_Node_Str",fields,entity.getViewName());
  }
 else   if (ef.isName() && !ef.isCasesensitive()) {
    fmt=format("String_Node_Str",fields,entity.getViewName(),ef.getColumnName(),ef.getName());
  }
 else {
    fmt=format("String_Node_Str",fields,entity.getViewName(),ef.getColumnName(),ef.getName());
  }
  return Sqls.fetchEntity(fmt).setEntity(entity);
}
Program: 80929
Project: 80929
Buggy source:
public boolean exists(long id){
  EntityField ef=getEntity().getIdField();
  if (null == ef)   return false;
  return dao().count(getEntityClass(),Cnd.where(ef.getFieldName(),"String_Node_Str",id)) > 0;
}

Fixed version (ground truth):
public boolean exists(long id){
  EntityField ef=getEntity().getIdField();
  if (null == ef)   return false;
  return dao().count(getEntityClass(),Cnd.where(ef.getName(),"String_Node_Str",id)) > 0;
}
Program: 80930
Project: 80930
Buggy source:
public boolean exists(String name){
  EntityField ef=getEntity().getNameField();
  if (null == ef)   return false;
  return dao().count(getEntityClass(),Cnd.where(ef.getFieldName(),"String_Node_Str",name)) > 0;
}

Fixed version (ground truth):
public boolean exists(String name){
  EntityField ef=getEntity().getNameField();
  if (null == ef)   return false;
  return dao().count(getEntityClass(),Cnd.where(ef.getName(),"String_Node_Str",name)) > 0;
}
Program: 80931
Project: 80931
Buggy source:
public boolean exists(String name){
  EntityField ef=getEntity().getNameField();
  if (null == ef)   return false;
  return dao().count(getEntityClass(),Cnd.where(ef.getFieldName(),"String_Node_Str",name)) > 0;
}

Fixed version (ground truth):
public boolean exists(String name){
  EntityField ef=getEntity().getNameField();
  if (null == ef)   return false;
  return dao().count(getEntityClass(),Cnd.where(ef.getName(),"String_Node_Str",name)) > 0;
}
Program: 80932
Project: 80932
Buggy source:
private void pojo2Json(Object obj) throws IOException {
  if (null == obj)   return;
  Class<? extends Object> type=obj.getClass();
  ToJson tj=type.getAnnotation(ToJson.class);
  String myMethodName=Strings.sNull(null == tj ? null : tj.value(),"String_Node_Str");
  Method myMethod;
  try {
    myMethod=type.getMethod(myMethodName);
    Object re=myMethod.invoke(obj);
    writer.append(re.toString());
    return;
  }
 catch (  Exception e1) {
    try {
      myMethod=type.getMethod(myMethodName,JsonFormat.class);
      Object re=myMethod.invoke(obj,format);
      writer.append(re.toString());
      return;
    }
 catch (    Exception e) {
    }
  }
  Mirror<?> me=Mirror.me(type);
  Field[] fields=me.getFields();
  appendBraceBegin();
  increaseFormatIndent();
  ArrayList<Pair> list=new ArrayList<Pair>(fields.length);
  for (  Field f : fields) {
    String name=f.getName();
    try {
      Object value=me.getValue(obj,f);
      if (!this.isIgnore(name,value))       list.add(new Pair(name,value));
    }
 catch (    FailToGetValueException e) {
    }
  }
  for (Iterator<Pair> it=list.iterator(); it.hasNext(); ) {
    Pair p=it.next();
    this.appendPair(p.name,p.value);
    if (it.hasNext())     this.appendPairEnd();
  }
  decreaseFormatIndent();
  appendBraceEnd();
}

Fixed version (ground truth):
private void pojo2Json(Object obj) throws IOException {
  if (null == obj)   return;
  Class<? extends Object> type=obj.getClass();
  ToJson tj=type.getAnnotation(ToJson.class);
  String myMethodName=Strings.sNull(null == tj ? null : tj.value(),"String_Node_Str");
  Method myMethod;
  try {
    myMethod=type.getMethod(myMethodName);
    Object re=myMethod.invoke(obj);
    writer.append(re.toString());
    return;
  }
 catch (  Exception e1) {
    try {
      myMethod=type.getMethod(myMethodName,JsonFormat.class);
      Object re=myMethod.invoke(obj,format);
      writer.append(re.toString());
      return;
    }
 catch (    Exception e) {
    }
  }
  Mirror<?> me=Mirror.me(type);
  Field[] fields=me.getFields();
  appendBraceBegin();
  increaseFormatIndent();
  ArrayList<Pair> list=new ArrayList<Pair>(fields.length);
  for (  Field f : fields) {
    String name=f.getName();
    try {
      Object value=me.getValue(obj,name);
      if (!this.isIgnore(name,value))       list.add(new Pair(name,value));
    }
 catch (    FailToGetValueException e) {
    }
  }
  for (Iterator<Pair> it=list.iterator(); it.hasNext(); ) {
    Pair p=it.next();
    this.appendPair(p.name,p.value);
    if (it.hasNext())     this.appendPairEnd();
  }
  decreaseFormatIndent();
  appendBraceEnd();
}
Program: 80933
Project: 80933
Buggy source:
private void buildSQLMaps(){
  sqlMaps=new HashMap<String,String>();
  if (null != paths)   for (  String path : paths) {
    if (null == path)     continue;
    InputStream stream=Files.findFileAsStream(path);
    if (stream != null) {
      Reader reader=null;
      try {
        reader=new InputStreamReader(stream);
        loadSQL(reader);
      }
 catch (      IOException e) {
        Logs.getLog(getClass()).warnf("String_Node_Str",e);
      }
 finally {
        Streams.safeClose(reader);
        Streams.safeClose(stream);
      }
    }
  }
}

Fixed version (ground truth):
private void buildSQLMaps() throws MalformedURLException, IOException {
  sqlMaps=new HashMap<String,String>();
  if (null != paths)   for (  String path : paths) {
    if (null == path)     continue;
    File f=Files.findFile(Strings.trim(path));
    if (f == null || (!f.exists())) {
      InputStream stream=ClassLoaderUtil.getStream(path);
      if (stream != null) {
        InputStreamReader reader=null;
        try {
          reader=new InputStreamReader(stream,"String_Node_Str");
          loadSQL(reader);
        }
  finally {
          Streams.safeClose(reader);
          Streams.safeClose(stream);
        }
      }
    }
 else {
      File[] files;
      if (f.isDirectory()) {
        files=f.listFiles(sqkFileFilter == null ? defaultSqkFileFilter : sqkFileFilter);
      }
 else       files=Lang.array(f);
      try {
        for (        File file : files) {
          Reader stream=Streams.fileInr(file);
          loadSQL(stream);
        }
      }
 catch (      Exception e) {
        throw Lang.wrapThrow(e);
      }
    }
  }
}
Program: 80934
Project: 80934
Buggy source:
@Test public void check_parse_comboSqls(){
  sqls=new FileSqlManager("String_Node_Str");
  ComboSql sql=sqls.createCombo();
  assertEquals(10,sql.count());
}

Fixed version (ground truth):
@Test public void check_parse_comboSqls(){
  SqlManager sqls=new FileSqlManager("String_Node_Str");
  ComboSql sql=sqls.createCombo();
  assertEquals(10,sql.count());
}
Program: 80935
Project: 80935
Buggy source:
@Test public void check_Query_SQL(){
  sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void check_Query_SQL(){
  SqlManager sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}
Program: 80936
Project: 80936
Buggy source:
@Test public void check_Update_SQL(){
  sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void check_Update_SQL(){
  SqlManager sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}
Program: 80937
Project: 80937
Buggy source:
@Test public void check_Fetch_SQL(){
  sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void check_Fetch_SQL(){
  SqlManager sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}
Program: 80938
Project: 80938
Buggy source:
@Test public void check_Create_SQL(){
  sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void check_Create_SQL(){
  SqlManager sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}
Program: 80939
Project: 80939
Buggy source:
@Test public void check_PersonTestSQLs(){
  sqls=new FileSqlManager("String_Node_Str");
  String[] keys={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int i=0; i < keys.length; i++) {
    assertEquals(keys[i],sqls.keys()[i]);
  }
}

Fixed version (ground truth):
@Test public void check_PersonTestSQLs(){
  SqlManager sqls=new FileSqlManager("String_Node_Str");
  String[] keys={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int i=0; i < keys.length; i++) {
    assertEquals(keys[i],sqls.keys()[i]);
  }
}
Program: 80940
Project: 80940
Buggy source:
@Test public void test_sqls_save() throws IOException {
  sqls=new FileSqlManager("String_Node_Str");
  int count=sqls.count();
  File f=Files.findFile("String_Node_Str");
  ((FileSqlManager)sqls).saveAs(f.getAbsolutePath());
  sqls=new FileSqlManager("String_Node_Str");
  assertEquals(count,sqls.count());
}

Fixed version (ground truth):
@Test public void test_sqls_save() throws IOException {
  SqlManager sqls=new FileSqlManager("String_Node_Str");
  int count=sqls.count();
  File f=Files.findFile("String_Node_Str");
  ((FileSqlManager)sqls).saveAs(f.getAbsolutePath());
  sqls=new FileSqlManager("String_Node_Str");
  assertEquals(count,sqls.count());
}
Program: 80941
Project: 80941
Buggy source:
@Test public void check_Insert_SQL(){
  sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void check_Insert_SQL(){
  SqlManager sqls=new FileSqlManager(PATH);
  Sql sql=sqls.create("String_Node_Str");
  assertTrue(sql.toString().toUpperCase().startsWith("String_Node_Str"));
}
Program: 80942
Project: 80942
Buggy source:
@Test public void check_Count_SQL(){
  sqls=new FileSqlManager(PATH);
  assertEquals(10,sqls.count());
  String[] keys={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int i=0; i < keys.length; i++) {
    assertEquals(keys[i],sqls.keys()[i]);
  }
}

Fixed version (ground truth):
@Test public void check_Count_SQL(){
  SqlManager sqls=new FileSqlManager(PATH);
  assertEquals(10,sqls.count());
  String[] keys={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (int i=0; i < keys.length; i++) {
    assertEquals(keys[i],sqls.keys()[i]);
  }
}
Program: 80943
Project: 80943
Buggy source:
public Object get(IocMaking ing){
  return ing.getIoc().get(type,name);
}

Fixed version (ground truth):
public Object get(IocMaking ing){
  Ioc ioc=ing.getIoc();
  if (ioc instanceof Ioc2)   return ((Ioc2)ioc).get(type,name,ing.getContext());
  return ioc.get(type,name);
}
Program: 80944
Project: 80944
Buggy source:
public boolean equals(Object obj){
  Project p=(Project)obj;
  return id == p.id & name.equals(p.name) & alias.equals(p.alias);
}

Fixed version (ground truth):
public boolean equals(Object obj){
  Project p=(Project)obj;
  return id == p.id && name.equals(p.name) && alias.equals(p.alias);
}
Program: 80946
Project: 80946
Buggy source:
private static String[] findInJar(String jarPath,Class<?> baseClass){
  try {
    jarPath=decodePath(jarPath);
    ZipEntry[] entrys=Files.findEntryInZip(new ZipFile(jarPath),baseClass.getPackage().getName().replace('.','/') + "String_Node_Str");
    if (null != entrys && entrys.length > 0) {
      String[] classNames=new String[entrys.length];
      for (int i=0; i < entrys.length; i++) {
        String ph=entrys[i].getName();
        classNames[i]=ph.substring(0,ph.lastIndexOf('.')).replaceAll("String_Node_Str","String_Node_Str");
      }
      return classNames;
    }
  }
 catch (  IOException e) {
  }
  return null;
}

Fixed version (ground truth):
private static String[] findInJar(String jarPath,Package packageA){
  try {
    jarPath=decodePath(jarPath);
    ZipEntry[] entrys=Files.findEntryInZip(new ZipFile(jarPath),packageA.getName().replace('.','/') + "String_Node_Str");
    if (null != entrys && entrys.length > 0) {
      String[] classNames=new String[entrys.length];
      for (int i=0; i < entrys.length; i++) {
        String ph=entrys[i].getName();
        classNames[i]=ph.substring(0,ph.lastIndexOf('.')).replaceAll("String_Node_Str","String_Node_Str");
      }
      return classNames;
    }
  }
 catch (  IOException e) {
  }
  return null;
}
Program: 80947
Project: 80947
Buggy source:
private static String[] findInClassPath(File dir,Class<?> classZ){
  try {
    File[] files=dir.listFiles(new FileFilter(){
      public boolean accept(      File pathname){
        return pathname.getName().endsWith("String_Node_Str");
      }
    }
);
    if (null != files && files.length > 0) {
      String[] classNames=new String[files.length];
      Package packageA=classZ.getPackage();
      for (int i=0; i < files.length; i++) {
        String fileName=files[i].getName();
        String classShortName=fileName.substring(0,fileName.length() - "String_Node_Str".length());
        classNames[i]=packageA.getName() + "String_Node_Str" + classShortName;
      }
      return classNames;
    }
  }
 catch (  SecurityException e) {
  }
  return null;
}

Fixed version (ground truth):
private static String[] findInClassPath(File dir,Package packageA){
  try {
    File[] files=dir.listFiles(new FileFilter(){
      public boolean accept(      File pathname){
        return pathname.getName().endsWith("String_Node_Str");
      }
    }
);
    if (null != files && files.length > 0) {
      String[] classNames=new String[files.length];
      for (int i=0; i < files.length; i++) {
        String fileName=files[i].getName();
        String classShortName=fileName.substring(0,fileName.length() - "String_Node_Str".length());
        classNames[i]=packageA.getName() + "String_Node_Str" + classShortName;
      }
      return classNames;
    }
  }
 catch (  SecurityException e) {
  }
  return null;
}
Program: 80948
Project: 80948
Buggy source:
/** 
 * It will list all Class object same package with the Class you give. Whatever the class file you give existed in normal directory or jar file.
 * @param baseClass
 * @return a class List
 */
public static List<Class<?>> scanClass(Class<?> baseClass){
  File dir=getBasePath(baseClass);
  if (dir == null)   return null;
  String[] classNames=null;
  String jarPath=getJarPath(dir);
  if (jarPath != null) {
    classNames=findInJar(jarPath,baseClass);
  }
 else   classNames=findInClassPath(dir,baseClass);
  if (classNames == null)   return null;
  List<Class<?>> list=new ArrayList<Class<?>>(classNames.length);
  for (  String className : classNames)   try {
    list.add(Class.forName(className));
  }
 catch (  Throwable e) {
  }
  return list;
}

Fixed version (ground truth):
/** 
 * It will list all Class object in the package you give. <p/>Whatever the class file you give existed in normal directory or jar file. <p/><b>Not working in GAE</b>
 * @return a class List
 * @throws NullPointerException when packageZ is null
 */
public static List<Class<?>> scanClass(File dir,Package packageZ){
  if (dir == null)   dir=Files.findFile(packageZ.getName().replaceAll("String_Node_Str","String_Node_Str"));
  String[] classNames=null;
  String jarPath=getJarPath(dir);
  if (jarPath != null) {
    classNames=findInJar(jarPath,packageZ);
  }
 else   classNames=findInClassPath(dir,packageZ);
  if (classNames == null)   return null;
  List<Class<?>> list=new ArrayList<Class<?>>(classNames.length);
  for (  String className : classNames)   try {
    list.add(Class.forName(className));
  }
 catch (  Throwable e) {
  }
  return list;
}