nus-yam/ex-repair huggingface dataset:
Program: 43332
Project: 43332
Buggy source:
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    if (mf.isId() && mf.isAutoIncreasement()) {
      sb.append("String_Node_Str");
    }
 else {
      sb.append(' ').append(evalFieldType(mf));
      if (mf.isName() && en.getPkType() != PkType.NAME) {
        sb.append("String_Node_Str");
      }
 else {
        if (mf.isUnsigned())         sb.append("String_Node_Str");
        if (mf.isNotNull())         sb.append("String_Node_Str");
        if (mf.isAutoIncreasement())         throw Lang.noImplement();
        if (mf.hasDefaultValue())         sb.append("String_Node_Str").append(mf.getDefaultValue(null)).append('\'');
      }
    }
    sb.append(',');
  }
  List<MappingField> pks=en.getPks();
  if (!pks.isEmpty()) {
    sb.append('\n');
    sb.append(String.format("String_Node_Str",en.getTableName()));
    for (    MappingField pk : pks) {
      sb.append(pk.getColumnName()).append(',');
    }
    sb.setCharAt(sb.length() - 1,')');
    sb.append("String_Node_Str");
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  createRelation(dao,en);
  return true;
}

Fixed version (ground truth):
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    if (mf.isId() && mf.isAutoIncreasement()) {
      sb.append("String_Node_Str");
    }
 else {
      sb.append(' ').append(evalFieldType(mf));
      if (mf.isName() && en.getPkType() != PkType.NAME) {
        sb.append("String_Node_Str");
      }
 else {
        if (mf.isUnsigned())         sb.append("String_Node_Str");
        if (mf.isNotNull())         sb.append("String_Node_Str");
        if (mf.isAutoIncreasement())         throw Lang.noImplement();
        if (mf.hasDefaultValue())         sb.append("String_Node_Str").append(getDefaultValue(mf)).append('\'');
      }
    }
    sb.append(',');
  }
  List<MappingField> pks=en.getPks();
  if (!pks.isEmpty()) {
    sb.append('\n');
    sb.append(String.format("String_Node_Str",en.getTableName()));
    for (    MappingField pk : pks) {
      sb.append(pk.getColumnName()).append(',');
    }
    sb.setCharAt(sb.length() - 1,')');
    sb.append("String_Node_Str");
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  createRelation(dao,en);
  return true;
}
Program: 43333
Project: 43333
Buggy source:
@Override public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  if (en.getPks().size() > 1 && en.getPkType() == PkType.ID) {
    return false;
  }
  boolean mPks=en.getPks().size() > 1;
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    if (mf.isId() && en.getPkType() == PkType.ID) {
      sb.append("String_Node_Str");
      continue;
    }
 else     sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isUnsigned())       sb.append("String_Node_Str");
      if (mf.isNotNull())       sb.append("String_Node_Str");
      if (mf.isPk() && !mPks) {
        sb.append("String_Node_Str");
      }
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(mf.getDefaultValue(null)).append('\'');
    }
    sb.append(',');
  }
  List<MappingField> pks=en.getPks();
  if (mPks) {
    sb.append('\n');
    sb.append("String_Node_Str").append(en.getTableName()).append("String_Node_Str");
    for (    MappingField pk : pks) {
      sb.append(pk.getColumnName()).append(',');
    }
    sb.setCharAt(sb.length() - 1,')');
    sb.append("String_Node_Str");
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  createRelation(dao,en);
  return true;
}

Fixed version (ground truth):
@Override public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  if (en.getPks().size() > 1 && en.getPkType() == PkType.ID) {
    return false;
  }
  boolean mPks=en.getPks().size() > 1;
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    if (mf.isId() && en.getPkType() == PkType.ID) {
      sb.append("String_Node_Str");
      continue;
    }
 else     sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isUnsigned())       sb.append("String_Node_Str");
      if (mf.isNotNull())       sb.append("String_Node_Str");
      if (mf.isPk() && !mPks) {
        sb.append("String_Node_Str");
      }
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(getDefaultValue(mf)).append('\'');
    }
    sb.append(',');
  }
  List<MappingField> pks=en.getPks();
  if (mPks) {
    sb.append('\n');
    sb.append("String_Node_Str").append(en.getTableName()).append("String_Node_Str");
    for (    MappingField pk : pks) {
      sb.append(pk.getColumnName()).append(',');
    }
    sb.setCharAt(sb.length() - 1,')');
    sb.append("String_Node_Str");
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  createRelation(dao,en);
  return true;
}
Program: 43334
Project: 43334
Buggy source:
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isUnsigned())       sb.append("String_Node_Str");
      if (mf.isNotNull())       sb.append("String_Node_Str");
      if (mf.isAutoIncreasement())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(mf.getDefaultValue(null)).append('\'');
    }
    sb.append(',');
  }
  List<MappingField> pks=en.getPks();
  if (!pks.isEmpty()) {
    sb.append('\n');
    sb.append("String_Node_Str");
    for (    MappingField pk : pks) {
      sb.append(pk.getColumnName()).append(',');
    }
    sb.setCharAt(sb.length() - 1,')');
    sb.append("String_Node_Str");
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  createRelation(dao,en);
  return true;
}

Fixed version (ground truth):
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isUnsigned())       sb.append("String_Node_Str");
      if (mf.isNotNull())       sb.append("String_Node_Str");
      if (mf.isAutoIncreasement())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(getDefaultValue(mf)).append('\'');
    }
    sb.append(',');
  }
  List<MappingField> pks=en.getPks();
  if (!pks.isEmpty()) {
    sb.append('\n');
    sb.append("String_Node_Str");
    for (    MappingField pk : pks) {
      sb.append(pk.getColumnName()).append(',');
    }
    sb.setCharAt(sb.length() - 1,')');
    sb.append("String_Node_Str");
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  createRelation(dao,en);
  return true;
}
Program: 43335
Project: 43335
Buggy source:
@SuppressWarnings("String_Node_Str") public <T>Mirror<T> getMirror(Class<T> type,String name){
  if (MethodInterceptor.class.isAssignableFrom(type) || type.getName().endsWith(ClassAgent.CLASSNAME_SUFFIX) || AopConfigration.IOCNAME.equals(name)|| AopConfigration.class.isAssignableFrom(type))   return Mirror.me(type);
  try {
    return (Mirror<T>)Mirror.me(cd.load(type.getName() + ClassAgent.CLASSNAME_SUFFIX));
  }
 catch (  ClassNotFoundException e) {
  }
  if (aopConfigration == null)   if (ioc.has(AopConfigration.IOCNAME))   aopConfigration=ioc.get(AopConfigration.class,AopConfigration.IOCNAME);
 else   aopConfigration=new AnnotationAopConfigration();
  List<InterceptorPair> interceptorPairs=aopConfigration.getInterceptorPairList(ioc,type);
  if (interceptorPairs == null || interceptorPairs.size() < 1)   return Mirror.me(type);
  ClassAgent agent=new AsmClassAgent();
  for (  InterceptorPair interceptorPair : interceptorPairs)   agent.addInterceptor(interceptorPair.getMethodMatcher(),interceptorPair.getMethodInterceptor());
  return Mirror.me(agent.define(cd,type));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <T>Mirror<T> getMirror(Class<T> type,String name){
  if (MethodInterceptor.class.isAssignableFrom(type) || type.getName().endsWith(ClassAgent.CLASSNAME_SUFFIX) || AopConfigration.IOCNAME.equals(name)|| AopConfigration.class.isAssignableFrom(type)) {
    return Mirror.me(type);
  }
  try {
    return (Mirror<T>)Mirror.me(cd.load(type.getName() + ClassAgent.CLASSNAME_SUFFIX));
  }
 catch (  ClassNotFoundException e) {
  }
  if (aopConfigration == null)   if (ioc.has(AopConfigration.IOCNAME))   aopConfigration=ioc.get(AopConfigration.class,AopConfigration.IOCNAME);
 else   aopConfigration=new AnnotationAopConfigration();
  List<InterceptorPair> interceptorPairs=aopConfigration.getInterceptorPairList(ioc,type);
  if (interceptorPairs == null || interceptorPairs.size() < 1) {
    if (log.isDebugEnabled())     log.debugf("String_Node_Str",type);
    return Mirror.me(type);
  }
  ClassAgent agent=new AsmClassAgent();
  for (  InterceptorPair interceptorPair : interceptorPairs)   agent.addInterceptor(interceptorPair.getMethodMatcher(),interceptorPair.getMethodInterceptor());
  return Mirror.me(agent.define(cd,type));
}
Program: 43336
Project: 43336
Buggy source:
@Override protected String evalFieldType(MappingField mf){
  if (mf.getColumnType() == ColType.INT) {
    int width=mf.getWidth();
    if (width <= 0)     return "String_Node_Str";
 else     if (width <= 4) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
 else     if (width <= 8) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
    return "String_Node_Str" + (width * 4) + "String_Node_Str";
  }
 else   if (mf.getColumnType() == ColType.BOOLEAN)   return "String_Node_Str";
  return super.evalFieldType(mf);
}

Fixed version (ground truth):
@Override protected String evalFieldType(MappingField mf){
  if (mf.getColumnType() == ColType.INT) {
    int width=mf.getWidth();
    if (width <= 0)     return "String_Node_Str";
 else     if (width <= 4) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
 else     if (width <= 8) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
    return "String_Node_Str" + (width * 4) + "String_Node_Str";
  }
  return super.evalFieldType(mf);
}
Program: 43337
Project: 43337
Buggy source:
@Override protected String evalFieldType(MappingField mf){
  if (mf.getColumnType() == ColType.INT) {
    int width=mf.getWidth();
    if (width <= 0)     return "String_Node_Str";
 else     if (width <= 4) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
 else     if (width <= 8) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
    return "String_Node_Str" + (width * 4) + "String_Node_Str";
  }
  return super.evalFieldType(mf);
}

Fixed version (ground truth):
@Override protected String evalFieldType(MappingField mf){
  if (mf.getColumnType() == ColType.INT) {
    int width=mf.getWidth();
    if (width <= 0)     return "String_Node_Str";
 else     if (width <= 4) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
 else     if (width <= 8) {
      return "String_Node_Str" + (width * 4) + "String_Node_Str";
    }
    return "String_Node_Str" + (width * 4) + "String_Node_Str";
  }
 else   if (mf.getColumnType() == ColType.BOOLEAN)   return "String_Node_Str";
  return super.evalFieldType(mf);
}
Program: 43339
Project: 43339
Buggy source:
public Object parse(Reader reader){
  this.reader=reader;
  try {
    if (!tryNextChar())     return null;
    skipCommentsAndBlank();
    if (cursor == 'v') {
      OUTER:       while (true) {
        nextChar();
switch (cursor) {
case '{':
          break OUTER;
      }
    }
  }
  return parseFromHere();
}
 catch (IOException e) {
  throw Lang.wrapThrow(e);
}
}

Fixed version (ground truth):
public Object parse(Reader reader){
  if (reader == null)   return null;
  this.reader=reader;
  try {
    if (!tryNextChar())     return null;
    skipCommentsAndBlank();
    if (cursor == 'v') {
      OUTER:       while (true) {
        nextChar();
switch (cursor) {
case '{':
          break OUTER;
      }
    }
  }
  return parseFromHere();
}
 catch (IOException e) {
  throw Lang.wrapThrow(e);
}
}
Program: 43340
Project: 43340
Buggy source:
@SuppressWarnings("String_Node_Str") public void doRun() throws IOException {
  StringBuilder sb=new StringBuilder();
  line=br.readLine();
  while (null != line) {
    sb.append(line).append('\n');
    if (Strings.isBlank(line))     break;
    line=br.readLine();
  }
  if (log.isDebugEnabled())   log.debug("String_Node_Str" + sb);
  try {
    LinkedHashMap<String,Object> map=Json.fromJson(LinkedHashMap.class,sb);
    SocketAction action=saTable.get(map.get("String_Node_Str").toString());
    if (null != action) {
      SocketContext context=new SocketContext(this);
      if (action instanceof JsonAction)       ((JsonAction)action).run(map,context);
 else       action.run(context);
    }
 else {
      Writer writer=Streams.utf8w(ops);
      Map<String,Object> x=new HashMap<String,Object>();
      x.put("String_Node_Str",false);
      x.put("String_Node_Str","String_Node_Str");
      Json.toJson(writer,x);
      try {
        writer.close();
      }
 catch (      IOException e) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str",e);
      }
    }
  }
 catch (  JsonException e) {
    if (log.isWarnEnabled())     log.warnf("String_Node_Str",e.getMessage(),sb);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void doRun() throws IOException {
  StringBuilder sb=new StringBuilder();
  line=br.readLine();
  while (null != line) {
    sb.append(line).append('\n');
    if (Strings.isBlank(line))     break;
    line=br.readLine();
  }
  if (log.isDebugEnabled())   log.debug("String_Node_Str" + sb);
  try {
    LinkedHashMap<String,Object> map=Json.fromJson(LinkedHashMap.class,br);
    SocketAction action=saTable.get(map.get("String_Node_Str").toString());
    if (null != action) {
      SocketContext context=new SocketContext(this);
      if (action instanceof JsonAction)       ((JsonAction)action).run(map,context);
 else       action.run(context);
    }
 else {
      Writer writer=Streams.utf8w(ops);
      Map<String,Object> x=new HashMap<String,Object>();
      x.put("String_Node_Str",false);
      x.put("String_Node_Str","String_Node_Str");
      Json.toJson(writer,x);
      try {
        writer.close();
      }
 catch (      IOException e) {
        if (log.isWarnEnabled())         log.warn("String_Node_Str",e);
      }
    }
  }
 catch (  JsonException e) {
  }
}
Program: 43341
Project: 43341
Buggy source:
public static JsonEntityField eval(Mirror<?> mirror,Field fld){
  JsonField jf=fld.getAnnotation(JsonField.class);
  if (null != jf && jf.ignore())   return null;
  JsonEntityField jef=new JsonEntityField();
  jef.injecting=mirror.getInjecting(fld.getName());
  jef.ejecting=mirror.getEjecting(fld.getName());
  jef.genericType=fld.getGenericType();
  if (null != jf && !Strings.isBlank(jf.value()))   jef.name=jf.value();
 else   jef.name=fld.getName();
  return jef;
}

Fixed version (ground truth):
public static JsonEntityField eval(Mirror<?> mirror,Field fld){
  JsonField jf=fld.getAnnotation(JsonField.class);
  if (null != jf && jf.ignore())   return null;
  JsonEntityField jef=new JsonEntityField();
  jef.injecting=mirror.getInjecting(fld.getName());
  jef.genericType=fld.getGenericType();
  if (null != jf && !Strings.isBlank(jf.by()))   jef.ejecting=new EjectBySimpleEL(jf.by());
 else   jef.ejecting=mirror.getEjecting(fld.getName());
  if (null != jf && !Strings.isBlank(jf.value()))   jef.name=jf.value();
 else   jef.name=fld.getName();
  return jef;
}
Program: 43342
Project: 43342
Buggy source:
@Test public void test_enum(){
  Random<Color> r=new EnumRandom<Color>(){
  }
;
  Set<Color> re=new HashSet<Color>(Arrays.asList(Color.values()));
  Set<Color> rs=new HashSet<Color>();
  for (int j=0; j < 4; j++) {
    for (int i=0; i < 4; i++)     rs.add(r.next());
    assertTrue(Lang.equals(re,rs));
  }
}

Fixed version (ground truth):
@Ignore("String_Node_Str") @Test public void test_enum(){
  Random<Color> r=new EnumRandom<Color>(){
  }
;
  Set<Color> re=new HashSet<Color>(Arrays.asList(Color.values()));
  Set<Color> rs=new HashSet<Color>();
  for (int j=0; j < 4; j++) {
    for (int i=0; i < 4; i++)     rs.add(r.next());
    assertTrue(Lang.equals(re,rs));
  }
}
Program: 43343
Project: 43343
Buggy source:
public void setData(String data){
  this.data=data.getBytes(Encoding.CHARSET_UTF8);
}

Fixed version (ground truth):
public void setData(String data){
  try {
    this.data=data.getBytes(Encoding.UTF8);
  }
 catch (  UnsupportedEncodingException e) {
  }
}
Program: 43344
Project: 43344
Buggy source:
public InputStream getInputStream(){
  if (null == data) {
    StringBuilder sb=new StringBuilder();
    for (    String key : params.keySet()) {
      sb.append(key).append('=').append(params.get(key)).append('&');
    }
    sb.setCharAt(sb.length() - 1,'\n');
    byte[] bytes=sb.toString().getBytes(Encoding.CHARSET_UTF8);
    return new ByteInputStream(bytes);
  }
  return null == data ? null : new ByteInputStream(data);
}

Fixed version (ground truth):
public InputStream getInputStream(){
  if (null == data) {
    StringBuilder sb=new StringBuilder();
    for (    String key : params.keySet()) {
      sb.append(key).append('=').append(params.get(key)).append('&');
    }
    sb.setCharAt(sb.length() - 1,'\n');
    byte[] bytes=null;
    try {
      bytes=sb.toString().getBytes(Encoding.UTF8);
    }
 catch (    UnsupportedEncodingException e) {
    }
    return new ByteInputStream(bytes);
  }
  return null == data ? null : new ByteInputStream(data);
}
Program: 43345
Project: 43345
Buggy source:
/** 
 * 整合两个整数数组为一个数组
 * @param ary 整数数组
 * @param is 变参
 * @return 新的整合过的数组
 */
public static int[] join(int[] ary,int... is){
  if (null == ary)   return is;
  int[] re=Arrays.copyOf(ary,ary.length + is.length);
  int i=ary.length;
  for (  int num : is)   re[i++]=num;
  return re;
}

Fixed version (ground truth):
/** 
 * 整合两个整数数组为一个数组 <b>这个方法在JDK5不可用!!<b/>
 * @param ary 整数数组
 * @param is 变参
 * @return 新的整合过的数组
 */
public static int[] join(int[] ary,int... is){
  if (null == ary)   return is;
  int[] re=Arrays.copyOf(ary,ary.length + is.length);
  int i=ary.length;
  for (  int num : is)   re[i++]=num;
  return re;
}
Program: 43346
Project: 43346
Buggy source:
public void write(String str){
  if (!atom.socket.isClosed())   try {
    atom.ops.write(str.getBytes(Encoding.CHARSET_UTF8));
  }
 catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
public void write(String str){
  if (!atom.socket.isClosed())   try {
    atom.ops.write(str.getBytes(Encoding.UTF8));
  }
 catch (  IOException e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 43347
Project: 43347
Buggy source:
@Test public void test_pathargs(){
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
}

Fixed version (ground truth):
@Test public void test_pathargs(){
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
  get("String_Node_Str");
  assertEquals("String_Node_Str",resp.getContent());
}
Program: 43348
Project: 43348
Buggy source:
public synchronized void load(Reader reader) throws IOException {
  BufferedReader tr=null;
  if (reader instanceof BufferedReader)   tr=(BufferedReader)reader;
 else   tr=new BufferedReader(reader);
  this.clear();
  String s;
  while (null != (s=tr.readLine())) {
    if (Strings.isBlank(s))     continue;
    if (s.length() > 0 && s.charAt(0) == '#')     continue;
    int pos;
    char c='0';
    for (pos=0; pos < s.length(); pos++) {
      c=s.charAt(pos);
      if (c == '=' || c == ':')       break;
    }
    if (c == '=') {
      String name=s.substring(0,pos);
      maps.put(name,s.substring(pos + 1));
      keys.add(name);
    }
 else     if (c == ':') {
      String name=s.substring(0,pos);
      StringBuffer sb=new StringBuffer();
      sb.append(s.substring(pos + 1));
      String ss;
      while (null != (ss=tr.readLine())) {
        if (ss.length() > 0 && ss.charAt(0) == '#')         break;
        sb.append("String_Node_Str" + ss);
      }
      maps.put(name,sb.toString());
      keys.add(name);
      if (null == ss)       return;
    }
 else {
      maps.put(s,null);
      keys.add(s);
    }
  }
}

Fixed version (ground truth):
public synchronized void load(Reader reader) throws IOException {
  BufferedReader tr=null;
  if (reader instanceof BufferedReader)   tr=(BufferedReader)reader;
 else   tr=new BufferedReader(reader);
  this.clear();
  String s;
  while (null != (s=tr.readLine())) {
    if (Strings.isBlank(s))     continue;
    if (s.length() > 0 && s.trim().charAt(0) == '#')     continue;
    int pos;
    char c='0';
    for (pos=0; pos < s.length(); pos++) {
      c=s.charAt(pos);
      if (c == '=' || c == ':')       break;
    }
    if (c == '=') {
      String name=s.substring(0,pos);
      maps.put(name,s.substring(pos + 1));
      keys.add(name);
    }
 else     if (c == ':') {
      String name=s.substring(0,pos);
      StringBuffer sb=new StringBuffer();
      sb.append(s.substring(pos + 1));
      String ss;
      while (null != (ss=tr.readLine())) {
        if (ss.length() > 0 && ss.charAt(0) == '#')         break;
        sb.append("String_Node_Str" + ss);
      }
      maps.put(name,sb.toString());
      keys.add(name);
      if (null == ss)       return;
    }
 else {
      maps.put(s,null);
      keys.add(s);
    }
  }
}
Program: 43349
Project: 43349
Buggy source:
/** 
 * 转换成操作树
 */
private Deque<Object> OperatorTree(Queue<Object> rpn){
  Deque<Object> operand=new LinkedList<Object>();
  while (!rpn.isEmpty()) {
    if (rpn.peek() instanceof Operator) {
      Operator opt=(Operator)rpn.poll();
      opt.wrap(operand);
      operand.addFirst(opt);
      continue;
    }
    if (rpn.peek() instanceof IdentifierObj) {
      ((IdentifierObj)rpn.peek()).setEc(ec);
    }
    operand.addFirst(rpn.poll());
  }
  return operand;
}

Fixed version (ground truth):
/** 
 * 转换成操作树
 */
private LinkedList<Object> OperatorTree(Queue<Object> rpn){
  LinkedList<Object> operand=new LinkedList<Object>();
  while (!rpn.isEmpty()) {
    if (rpn.peek() instanceof Operator) {
      Operator opt=(Operator)rpn.poll();
      opt.wrap(operand);
      operand.addFirst(opt);
      continue;
    }
    if (rpn.peek() instanceof IdentifierObj) {
      ((IdentifierObj)rpn.peek()).setEc(ec);
    }
    operand.addFirst(rpn.poll());
  }
  return operand;
}
Program: 43350
Project: 43350
Buggy source:
/** 
 * 计算
 */
private Object calculate(Deque<Object> el2){
  if (el2.peek() instanceof Operator) {
    Operator obj=(Operator)el2.peek();
    return obj.calculate();
  }
  if (el2.peek() instanceof IdentifierObj) {
    return ((IdentifierObj)el2.peek()).fetchVal();
  }
  return el2.peek();
}

Fixed version (ground truth):
/** 
 * 计算
 */
private Object calculate(LinkedList<Object> el2){
  if (el2.peek() instanceof Operator) {
    Operator obj=(Operator)el2.peek();
    return obj.calculate();
  }
  if (el2.peek() instanceof IdentifierObj) {
    return ((IdentifierObj)el2.peek()).fetchVal();
  }
  return el2.peek();
}
Program: 43351
Project: 43351
Buggy source:
@Override public Response send() throws HttpException {
  try {
    openConnection();
    Map<String,?> params=request.getParams();
    String data=null;
    if (null != params && params.size() > 0) {
      data=request.getURLEncodedParams();
    }
    setupRequestHeader();
    setupDoInputOutputFlag();
    if (data != null) {
      Writer w=new BufferedWriter(Streams.utf8w(conn.getOutputStream()));
      w.write(data);
      Streams.safeFlush(w);
      Streams.safeClose(w);
    }
    return createResponse(getResponseHeader());
  }
 catch (  Exception e) {
    throw new HttpException(request.getUrl().toString(),e);
  }
}

Fixed version (ground truth):
@Override public Response send() throws HttpException {
  try {
    openConnection();
    setupRequestHeader();
    setupDoInputOutputFlag();
    InputStream ins=request.getInputStream();
    if (null != ins) {
      OutputStream ops=Streams.buff(conn.getOutputStream());
      Streams.write(ops,ins,8192);
      Streams.safeClose(ins);
      Streams.safeFlush(ops);
      Streams.safeClose(ops);
    }
    return createResponse(getResponseHeader());
  }
 catch (  Exception e) {
    throw new HttpException(request.getUrl().toString(),e);
  }
}
Program: 43352
Project: 43352
Buggy source:
/** 
 * 子类应该覆盖这个方法或者evalInjector(Type,Param)方法.
 */
protected ParamInjector evalInjector(Class<?> type,Param param){
  return null;
}

Fixed version (ground truth):
protected ParamInjector evalInjector(Type type,Param param){
  Class<?> clazz=Lang.getTypeClass(type);
  Type[] paramTypes=null;
  if (type instanceof ParameterizedType)   paramTypes=((ParameterizedType)type).getActualTypeArguments();
  if (clazz == null) {
    if (log.isWarnEnabled())     log.warnf("String_Node_Str",type,param);
    return null;
  }
  return evalInjectorBy(clazz,param,paramTypes);
}
Program: 43353
Project: 43353
Buggy source:
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    return Json.fromJson(Streams.utf8r(request.getInputStream()));
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
public Object getReferObject(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,String[] pathArgs){
  try {
    String str=Streams.readAndClose(Streams.utf8r(req.getInputStream()));
    return Json.fromJson(str);
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 43354
Project: 43354
Buggy source:
public ArrayInjector(String name,Class<?> type){
  super(name,type);
}

Fixed version (ground truth):
public ArrayInjector(String name,Class<?> type,Type[] paramTypes){
  super(name,type,paramTypes);
}
Program: 43355
Project: 43355
Buggy source:
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isNotNull() || mf.isPk())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(mf.getDefaultValue(null)).append('\'');
      if (mf.isAutoIncreasement())       sb.append("String_Node_Str");
      if (mf.isPk() && en.getPks().size() == 1) {
        sb.append("String_Node_Str");
      }
    }
    sb.append(',');
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  if (en.getPks().size() > 1) {
    sb=new StringBuilder();
    sb.append("String_Node_Str").append(en.getTableName()).append("String_Node_Str");
    for (    MappingField mf : en.getPks()) {
      sb.append(mf.getName()).append("String_Node_Str");
    }
    sb.setCharAt(sb.length() - 1,')');
    dao.execute(Sqls.create(sb.toString()));
  }
  createRelation(dao,en);
  return true;
}

Fixed version (ground truth):
public boolean createEntity(Dao dao,Entity<?> en){
  StringBuilder sb=new StringBuilder("String_Node_Str" + en.getTableName() + "String_Node_Str");
  for (  MappingField mf : en.getMappingFields()) {
    sb.append('\n').append(mf.getColumnName());
    sb.append(' ').append(evalFieldType(mf));
    if (mf.isName() && en.getPkType() != PkType.NAME) {
      sb.append("String_Node_Str");
    }
 else {
      if (mf.isNotNull() || mf.isPk())       sb.append("String_Node_Str");
      if (mf.hasDefaultValue())       sb.append("String_Node_Str").append(mf.getDefaultValue(null)).append('\'');
      if (mf.isAutoIncreasement())       sb.append("String_Node_Str");
      if (mf.isPk() && en.getPks().size() == 1) {
        sb.append("String_Node_Str");
      }
    }
    sb.append(',');
  }
  sb.setCharAt(sb.length() - 1,')');
  dao.execute(Sqls.create(sb.toString()));
  if (en.getPks().size() > 1) {
    sb=new StringBuilder();
    sb.append("String_Node_Str").append(en.getTableName()).append("String_Node_Str");
    for (    MappingField mf : en.getPks()) {
      sb.append("String_Node_Str").append(mf.getColumnName());
    }
    sb.append("String_Node_Str");
    for (    MappingField mf : en.getPks()) {
      sb.append(mf.getColumnName()).append("String_Node_Str");
    }
    sb.setCharAt(sb.length() - 1,')');
    dao.execute(Sqls.create(sb.toString()));
  }
  createRelation(dao,en);
  return true;
}
Program: 43356
Project: 43356
Buggy source:
@Test public void test_var_in_prev(){
  dao.create(Pet2.class,true);
  if (pojos.dao().meta().isOracle() || pojos.dao().meta().isHsql())   return;
  pojos.initPet();
  Pet2 pet=new Pet2();
  pet.setName("String_Node_Str").setAge(10);
  dao.insert(pet);
  assertEquals("String_Node_Str",pet.getNickName());
}

Fixed version (ground truth):
@Test public void test_var_in_prev(){
  dao.create(Pet2.class,true);
  if (dao.meta().isOracle() || dao.meta().isHsql() || dao.meta().isDB2())   return;
  pojos.initPet();
  Pet2 pet=new Pet2();
  pet.setName("String_Node_Str").setAge(10);
  dao.insert(pet);
  assertEquals("String_Node_Str",pet.getNickName());
}
Program: 43357
Project: 43357
Buggy source:
@Test public void check_if_support_all_normal_types() throws FailToCastObjectException {
  String d="String_Node_Str";
  String t="String_Node_Str";
  String dt=d + "String_Node_Str" + t;
  Date date=Castors.me().castTo(d,Date.class);
  Time time=Castors.me().castTo(t,Time.class);
  Timestamp ts=Castors.me().castTo(dt,Timestamp.class);
  EntityTypes exp=new EntityTypes();
  exp.name="String_Node_Str";
  exp.enum_s=TT.B;
  exp.enum_i=TT.A;
  exp.char_p='G';
  exp.char_obj='O';
  exp.int_p=23;
  exp.int_obj=23;
  exp.float_p=34.67f;
  exp.float_obj=34.68f;
  exp.short_p=6;
  exp.short_obj=6;
  exp.byte_p=2;
  exp.byte_obj=4;
  exp.long_p=56787;
  exp.long_obj=5678L;
  exp.double_p=2.4325243;
  exp.double_obj=3.4325243;
  exp.sqlDate=date;
  exp.sqlTime=time;
  exp.sqlDT=ts;
  dao.insert(exp);
  EntityTypes et=dao.fetch(EntityTypes.class);
  assertEquals(exp.id,et.id);
  Mirror<EntityTypes> me=Mirror.me(EntityTypes.class);
  for (  Field f : me.getFields()) {
    Object expValue;
    Object ttValue;
    if (f.getName().equals("String_Node_Str") && dao.meta().isMySql()) {
      expValue=me.getValue(exp,f).toString();
      ttValue=me.getValue(et,f).toString();
    }
 else {
      expValue=me.getValue(exp,f);
      ttValue=me.getValue(et,f);
      if (null == expValue)       continue;
    }
    if (!expValue.equals(ttValue))     throw Lang.makeThrow("String_Node_Str",f.getName(),expValue,ttValue);
  }
  assertTrue(true);
}

Fixed version (ground truth):
@Test public void check_if_support_all_normal_types() throws FailToCastObjectException {
  String d="String_Node_Str";
  String t="String_Node_Str";
  String dt=d + "String_Node_Str" + t;
  Date date=Castors.me().castTo(d,Date.class);
  Time time=Castors.me().castTo(t,Time.class);
  Timestamp ts=Castors.me().castTo(dt,Timestamp.class);
  EntityTypes exp=new EntityTypes();
  exp.name="String_Node_Str";
  exp.enum_s=TT.B;
  exp.enum_i=TT.A;
  exp.char_p='G';
  exp.char_obj='O';
  exp.int_p=23;
  exp.int_obj=23;
  exp.float_p=34.67f;
  exp.float_obj=34.68f;
  exp.short_p=6;
  exp.short_obj=6;
  exp.byte_p=2;
  exp.byte_obj=4;
  exp.long_p=56787;
  exp.long_obj=5678L;
  exp.double_p=2.4325243;
  exp.double_obj=3.4325243;
  exp.sqlDate=date;
  exp.sqlTime=time;
  exp.sqlDT=ts;
  dao.insert(exp);
  EntityTypes et=dao.fetch(EntityTypes.class);
  assertEquals(exp.id,et.id);
  Mirror<EntityTypes> me=Mirror.me(EntityTypes.class);
  for (  Field f : me.getFields()) {
    Object expValue;
    Object ttValue;
    if (f.getName().equals("String_Node_Str") && dao.meta().isMySql()) {
      expValue=me.getValue(exp,f).toString();
      ttValue=me.getValue(et,f).toString();
    }
 else {
      expValue=me.getValue(exp,f);
      ttValue=me.getValue(et,f);
      if (null == expValue)       continue;
    }
    if (!expValue.equals(ttValue) && !dao.meta().isDB2())     throw Lang.makeThrow("String_Node_Str",f.getName(),expValue,ttValue);
  }
  assertTrue(true);
}
Program: 43358
Project: 43358
Buggy source:
public static PItem cndAuto(Entity<?> en,Object obj){
switch (en.getPkType()) {
case ID:
    Number id=null != obj ? ((Number)en.getIdField().getValue(obj)) : null;
  return cndId(en,id);
case NAME:
String name=null != obj ? en.getNameField().getValue(obj).toString() : null;
return cndName(en,name);
case COMPOSITE:
Object[] pks=null;
if (null != obj) {
pks=new Object[en.getCompositePKFields().size()];
int i=0;
for (EntityField ef : en.getCompositePKFields()) pks[i++]=ef.getValue(obj);
}
return cndPk(en,pks);
default :
throw Lang.makeThrow("String_Node_Str",en.getType().getName(),obj);
}
}

Fixed version (ground truth):
public static PItem cndAuto(Entity<?> en,Object obj){
  obj=Lang.first(obj);
switch (en.getPkType()) {
case ID:
    Number id=null != obj ? ((Number)en.getIdField().getValue(obj)) : null;
  return cndId(en,id);
case NAME:
String name=null != obj ? en.getNameField().getValue(obj).toString() : null;
return cndName(en,name);
case COMPOSITE:
Object[] pks=null;
if (null != obj) {
pks=new Object[en.getCompositePKFields().size()];
int i=0;
for (EntityField ef : en.getCompositePKFields()) pks[i++]=ef.getValue(obj);
}
return cndPk(en,pks);
default :
throw Lang.makeThrow("String_Node_Str",en.getType().getName(),obj);
}
}
Program: 43359
Project: 43359
Buggy source:
/** 
 * 获得所有的属性，包括私有属性。不包括 Object 的属性
 */
public Field[] getFields(){
  Class<?> cc=klass;
  Map<String,Field> map=new LinkedHashMap<String,Field>();
  while (null != cc && cc != Object.class) {
    Field[] fs=cc.getDeclaredFields();
    for (int i=0; i < fs.length; i++) {
      if (!isIgnoredField(fs[i]) && !map.containsKey(fs[i].getName()))       map.put(fs[i].getName(),fs[i]);
    }
    cc=cc.getSuperclass();
  }
  return map.values().toArray(new Field[map.size()]);
}

Fixed version (ground truth):
/** 
 * 获得所有的属性，包括私有属性。不包括 Object 的属性
 * @return 字段列表
 */
public Field[] getFields(){
  return _getFields(true,false,true,true);
}
Program: 43360
Project: 43360
Buggy source:
protected ParamInjector evalInjector(Type type,Param param){
  return new JsonInjector(type,null == param ? null : param.value());
}

Fixed version (ground truth):
@Override protected ParamInjector evalInjector(Type type,Param param){
  if (param == null)   return new JsonInjector(type,null);
  return super.evalInjector(type,param);
}
Program: 43361
Project: 43361
Buggy source:
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    return Streams.readAndClose(Streams.utf8r(request.getInputStream()));
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}

Fixed version (ground truth):
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    return Json.fromJson(Streams.utf8r(request.getInputStream()));
  }
 catch (  Exception e) {
    throw Lang.wrapThrow(e);
  }
}
Program: 43362
Project: 43362
Buggy source:
@Override public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null != refer)   return Castors.me().castTo(refer,type);
  String[] values=req.getParameterValues(name);
  if (null == values || values.length == 0)   return null;
  if (values.length == 1) {
    try {
      return Castors.me().castTo(values[0],type);
    }
 catch (    Exception e) {
      Object re=Array.newInstance(type.getComponentType(),1);
      Object v=Castors.me().castTo(values[0],type.getComponentType());
      Array.set(re,0,v);
      return re;
    }
  }
  return Lang.array2array(values,type.getComponentType());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  Object value=null;
  if (null != refer) {
    if (refer instanceof Map) {
      value=((Map<String,Object>)refer).get(name);
      if (value != null && value.getClass().isArray())       return Lang.array2array(value,type.getComponentType());
    }
    if (value != null)     return convertMe(value);
  }
  String[] values=req.getParameterValues(name);
  if (null == values || values.length == 0)   return null;
  if (values.length == 1) {
    return convertMe(values[0]);
  }
  return Lang.array2array(values,type.getComponentType());
}
Program: 43363
Project: 43363
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=Lang.getTypeClass(type);
  return Castors.me().castTo(theObj,clazz);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Object get(ServletContext sc,HttpServletRequest req,HttpServletResponse resp,Object refer){
  if (null == name)   return Castors.me().castTo(refer,Lang.getTypeClass(type));
  Map<String,Object> map=(Map<String,Object>)refer;
  Object theObj=map.get(name);
  if (null == theObj)   return null;
  Class<?> clazz=Lang.getTypeClass(type);
  return Castors.me().castTo(theObj,clazz);
}
Program: 43364
Project: 43364
Buggy source:
public void process(ActionContext ac) throws Throwable {
  Object module=ac.getModule();
  Method method=ac.getMethod();
  Object[] args=ac.getMethodArgs();
  try {
    Object re=method.invoke(module,args);
    ac.setMethodReturn(re);
    doNext(ac);
  }
 catch (  IllegalAccessException e) {
    throw e.getCause();
  }
catch (  IllegalArgumentException e) {
    throw e.getCause();
  }
catch (  InvocationTargetException e) {
    throw e.getTargetException();
  }
}

Fixed version (ground truth):
public void process(ActionContext ac) throws Throwable {
  Object module=ac.getModule();
  Method method=ac.getMethod();
  Object[] args=ac.getMethodArgs();
  try {
    Object re=method.invoke(module,args);
    ac.setMethodReturn(re);
    doNext(ac);
  }
 catch (  IllegalAccessException e) {
    throw Lang.unwrapThrow(e);
  }
catch (  IllegalArgumentException e) {
    throw Lang.unwrapThrow(e);
  }
catch (  InvocationTargetException e) {
    throw Lang.unwrapThrow(e);
  }
}
Program: 43365
Project: 43365
Buggy source:
public Object getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    Uploading ing=new FastUploading();
    return ing.parse(request,context);
  }
 catch (  UploadException e) {
    throw Lang.wrapThrow(e);
  }
 finally {
    Uploads.removeInfo(request);
  }
}

Fixed version (ground truth):
public Map<String,Object> getReferObject(ServletContext sc,HttpServletRequest request,HttpServletResponse response,String[] pathArgs){
  try {
    Uploading ing=new FastUploading();
    return ing.parse(request,context);
  }
 catch (  UploadException e) {
    throw Lang.wrapThrow(e);
  }
 finally {
    Uploads.removeInfo(request);
  }
}
Program: 43366
Project: 43366
Buggy source:
@Test public void testPersonObject() throws Exception {
  Person p=Json.fromJson(Person.class,getFileAsInputStreamReader("String_Node_Str"));
  StringBuilder sb=new StringBuilder();
  Writer w=new OutputStreamWriter(new StringOutputStream(sb));
  w.write(p.dump());
  w.write("String_Node_Str");
  w.write(p.getFather().dump());
  w.write("String_Node_Str");
  w.write(p.getCompany().getName());
  w.write("String_Node_Str");
  w.write(p.getCompany().getCreator().dump());
  w.flush();
  w.close();
  assertTrue(Streams.equals(new StringInputStream(sb),getClass().getResourceAsStream("String_Node_Str")));
}

Fixed version (ground truth):
@Ignore @Test public void testPersonObject() throws Exception {
  Person p=Json.fromJson(Person.class,getFileAsInputStreamReader("String_Node_Str"));
  StringBuilder sb=new StringBuilder();
  Writer w=new OutputStreamWriter(new StringOutputStream(sb));
  w.write(p.dump());
  w.write("String_Node_Str");
  w.write(p.getFather().dump());
  w.write("String_Node_Str");
  w.write(p.getCompany().getName());
  w.write("String_Node_Str");
  w.write(p.getCompany().getCreator().dump());
  w.flush();
  w.close();
  assertTrue(Streams.equals(new StringInputStream(sb),getClass().getResourceAsStream("String_Node_Str")));
}
Program: 43367
Project: 43367
Buggy source:
@Test public void test_array() throws ServletException, IOException {
  String path="String_Node_Str";
  String json="String_Node_Str";
  initreq(path,json);
  servlet.service(request,response);
  assertEquals(3,response.getAsInt());
}

Fixed version (ground truth):
@Test public void test_array() throws ServletException, IOException {
  String path="String_Node_Str";
  String json="String_Node_Str";
  initreq(path,json);
  servlet.service(request,response);
  System.out.println(response.getAsString());
  assertEquals(3,response.getAsInt());
}
Program: 43368
Project: 43368
Buggy source:
public void visit(final Object obj,final LinkField lnk){
  Object value=lnk.getValue(obj);
  if (Lang.length(value) == 0)   return;
  lnk.updateLinkedField(obj,value);
  final Entity<?> en=lnk.getLinkedEntity();
  Lang.each(value,new Each<Object>(){
    public void invoke(    int i,    Object ele,    int length) throws ExitLoop, LoopException {
      opt.addInsert(en,ele);
      opt.add(Pojos.createRun(new PojoCallback(){
        public Object invoke(        Connection conn,        ResultSet rs,        Pojo pojo) throws SQLException {
          lnk.saveLinkedField(obj,pojo.getOperatingObject());
          return pojo.getOperatingObject();
        }
      }
).setOperatingObject(ele));
    }
  }
);
}

Fixed version (ground truth):
public void visit(final Object obj,final LinkField lnk){
  final Object value=lnk.getValue(obj);
  if (Lang.length(value) == 0)   return;
  opt.add(Pojos.createRun(new PojoCallback(){
    public Object invoke(    Connection conn,    ResultSet rs,    Pojo pojo) throws SQLException {
      lnk.updateLinkedField(obj,value);
      return pojo.getOperatingObject();
    }
  }
).setOperatingObject(obj));
  final Entity<?> en=lnk.getLinkedEntity();
  Lang.each(value,new Each<Object>(){
    public void invoke(    int i,    Object ele,    int length) throws ExitLoop, LoopException {
      opt.addInsert(en,ele);
      opt.add(Pojos.createRun(new PojoCallback(){
        public Object invoke(        Connection conn,        ResultSet rs,        Pojo pojo) throws SQLException {
          lnk.saveLinkedField(obj,pojo.getOperatingObject());
          return pojo.getOperatingObject();
        }
      }
).setOperatingObject(ele));
    }
  }
);
}
Program: 43369
Project: 43369
Buggy source:
@Test public void fetch_record(){
  Record re=dao.fetch("String_Node_Str",Cnd.where("String_Node_Str","String_Node_Str","String_Node_Str"));
  Pet pet=re.toPojo(Pet.class);
  assertEquals(4,re.getColumnCount());
  assertEquals(4,pet.getId());
  assertEquals("String_Node_Str",pet.getName());
}

Fixed version (ground truth):
@Test public void fetch_record(){
  Record re=dao.fetch("String_Node_Str",Cnd.where("String_Node_Str","String_Node_Str","String_Node_Str"));
  Pet pet=re.toPojo(Pet.class);
  assertEquals(5,re.getColumnCount());
  assertEquals(4,pet.getId());
  assertEquals("String_Node_Str",pet.getName());
}
Program: 43370
Project: 43370
Buggy source:
private void parseSp(StringBuilder sb) throws IOException {
  nextChar();
switch (cursor) {
case 'n':
    sb.append('\n');
  break;
case 'r':
sb.append('\r');
break;
case 't':
sb.append('\t');
break;
case '\\':
sb.append('\\');
break;
case '\'':
sb.append('\'');
break;
case '\"':
sb.append('\"');
break;
case 'u':
char[] hex=new char[4];
for (int i=0; i < 4; i++) hex[i]=(char)nextChar();
sb.append((char)Integer.valueOf(new String(hex),16).intValue());
break;
case 'b':
sb.append(' ');
break;
case 'f':
sb.append('\f');
break;
default :
throw unexpectedChar();
}
}

Fixed version (ground truth):
private void parseSp(StringBuilder sb) throws IOException {
  nextChar();
switch (cursor) {
case 'n':
    sb.append('\n');
  break;
case 'r':
sb.append('\r');
break;
case 't':
sb.append('\t');
break;
case '\\':
sb.append('\\');
break;
case '\'':
sb.append('\'');
break;
case '\"':
sb.append('\"');
break;
case '/':
sb.append('/');
break;
case 'u':
char[] hex=new char[4];
for (int i=0; i < 4; i++) hex[i]=(char)nextChar();
sb.append((char)Integer.valueOf(new String(hex),16).intValue());
break;
case 'b':
sb.append(' ');
break;
case 'f':
sb.append('\f');
break;
default :
throw unexpectedChar();
}
}