nus-yam/ex-repair huggingface dataset:
Program: 28460
Project: 28460
Buggy source:
/** 
 * For internal use; subject to change/removal.
 * @deprecated exclude from javadocs
 */
protected List<Path> resolve0(Object x){
  _ct=unsafe(getCallTarget(Capsule.class));
  final String target=(_ct != null ? _ct.getClass().getName() : Capsule.class.getName());
  log(LOG_DEBUG,"String_Node_Str" + target + "String_Node_Str"+ x);
  final List<Path> res=_ct != null ? _ct.resolve0(x) : resolve00(x);
  log(LOG_DEBUG,"String_Node_Str" + target + "String_Node_Str"+ x+ "String_Node_Str"+ res);
  return res;
}

Fixed version (ground truth):
/** 
 * For internal use; subject to change/removal.
 * @deprecated exclude from javadocs
 */
protected List<Path> resolve0(Object x){
  _ct=unsafe(getCallTarget(Capsule.class));
  final String target=(_ct != null ? _ct.getClass().getName() : Capsule.class.getName()) + '@' + Integer.toHexString(System.identityHashCode(_ct));
  log(LOG_DEBUG,"String_Node_Str" + target + "String_Node_Str"+ x);
  final List<Path> res=_ct != null ? _ct.resolve0(x) : resolve00(x);
  log(LOG_DEBUG,"String_Node_Str" + target + "String_Node_Str"+ x+ "String_Node_Str"+ res);
  return res;
}
Program: 28461
Project: 28461
Buggy source:
/** 
 * For internal use; subject to change/removal.
 * @deprecated exclude from javadocs
 */
protected Object lookup0(Object x,String type,Entry<String,?> attrContext,Object context){
  return (_ct=unsafe(getCallTarget(Capsule.class))) != null ? _ct.lookup0(x,type,attrContext,context) : lookup00(x,type,attrContext,context);
}

Fixed version (ground truth):
/** 
 * For internal use; subject to change/removal.
 * @deprecated exclude from javadocs
 */
protected Object lookup0(Object x,String type,Entry<String,?> attrContext,Object context){
  _ct=unsafe(getCallTarget(Capsule.class));
  final String target=(_ct != null ? _ct.getClass().getName() : Capsule.class.getName()) + '@' + Integer.toHexString(System.identityHashCode(_ct));
  log(LOG_DEBUG,"String_Node_Str" + target + "String_Node_Str"+ x);
  final Object res=_ct != null ? _ct.lookup0(x,type,attrContext,context) : lookup00(x,type,attrContext,context);
  log(LOG_DEBUG,"String_Node_Str" + target + "String_Node_Str"+ x+ "String_Node_Str"+ res);
  return res;
}
Program: 28462
Project: 28462
Buggy source:
private static Capsule newCapsule(String capsuleClass,Capsule pred){
  try {
    final Class<? extends Capsule> clazz=loadCapsule(Thread.currentThread().getContextClassLoader(),capsuleClass,capsuleClass);
    return accessible(clazz.getDeclaredConstructor(Capsule.class)).newInstance(pred);
  }
 catch (  IncompatibleClassChangeError e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass + "String_Node_Str"+ VERSION+ "String_Node_Str");
  }
catch (  InvocationTargetException e) {
    throw rethrow(e.getTargetException());
  }
catch (  ReflectiveOperationException e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass,e);
  }
}

Fixed version (ground truth):
private static Capsule newCapsule(String capsuleClass,Capsule pred){
}
Program: 28463
Project: 28463
Buggy source:
@SuppressWarnings("String_Node_Str") private static Class<? extends Capsule> loadCapsule(ClassLoader cl,String capsuleClass,String name){
  try {
    log(LOG_DEBUG,"String_Node_Str" + capsuleClass + "String_Node_Str"+ toString(cl));
    final Class<?> clazz=cl.loadClass(capsuleClass);
    if (!isCapsuleClass(clazz))     throw new RuntimeException(name + "String_Node_Str");
    Class<?> c=clazz;
    while (!Capsule.class.getName().equals(c.getName()))     c=c.getSuperclass();
    if (c != Capsule.class)     accessible(c.getDeclaredField("String_Node_Str")).set(null,new Properties(PROPERTIES));
    return (Class<? extends Capsule>)clazz;
  }
 catch (  ClassNotFoundException e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass + "String_Node_Str",e);
  }
catch (  NoSuchFieldException e) {
    throw new RuntimeException(name + "String_Node_Str");
  }
catch (  IncompatibleClassChangeError|ClassCastException e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass + "String_Node_Str"+ VERSION+ "String_Node_Str");
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static Class<? extends Capsule> loadCapsule(ClassLoader cl,String capsuleClass,String name){
  try {
    log(LOG_DEBUG,"String_Node_Str" + capsuleClass + "String_Node_Str"+ toString(cl));
    final Class<?> clazz=cl.loadClass(capsuleClass);
    final Class<Capsule> c=getActualCapsuleClass(clazz);
    if (c == null)     throw new RuntimeException(name + "String_Node_Str");
    if (c != Capsule.class)     accessible(c.getDeclaredField("String_Node_Str")).set(null,new Properties(PROPERTIES));
    return (Class<? extends Capsule>)clazz;
  }
 catch (  ClassNotFoundException e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass + "String_Node_Str",e);
  }
catch (  NoSuchFieldException e) {
    throw new RuntimeException(name + "String_Node_Str");
  }
catch (  IncompatibleClassChangeError|ClassCastException e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass + "String_Node_Str"+ VERSION+ "String_Node_Str");
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(e);
  }
}
Program: 28464
Project: 28464
Buggy source:
final static Capsule myCapsule(List<String> args){
  if (CAPSULE == null) {
    final Capsule capsule=newCapsule(MY_CLASSLOADER,findOwnJarFile());
    clearContext();
    if (capsule.isEmptyCapsule() && !args.isEmpty()) {
      processCmdLineOptions(args,ManagementFactory.getRuntimeMXBean().getInputArguments());
      if (!args.isEmpty())       capsule.setTarget(args.remove(0));
    }
    CAPSULE=capsule.oc;
  }
  return CAPSULE;
}

Fixed version (ground truth):
final static Capsule myCapsule(List<String> args){
  if (CAPSULE == null) {
    final ClassLoader ccl=Thread.currentThread().getContextClassLoader();
    try {
      Thread.currentThread().setContextClassLoader(MY_CLASSLOADER);
      final Capsule capsule=newCapsule(MY_CLASSLOADER,findOwnJarFile());
      clearContext();
      if (capsule.isEmptyCapsule() && !args.isEmpty()) {
        processCmdLineOptions(args,ManagementFactory.getRuntimeMXBean().getInputArguments());
        if (!args.isEmpty())         capsule.setTarget(args.remove(0));
      }
      CAPSULE=capsule.oc;
    }
  finally {
      Thread.currentThread().setContextClassLoader(ccl);
    }
  }
  return CAPSULE;
}
Program: 28465
Project: 28465
Buggy source:
final <T extends Capsule>T getCallTarget(Class<T> clazz){
  Capsule target=null;
  if ((sup == null || sup.sup(clazz) == null) && cc != this) {
    final StackTraceElement[] st=new Throwable().getStackTrace();
    if (st == null || st.length < 3)     throw new AssertionError("String_Node_Str");
    final int c1=1;
    if (!st[c1].getClassName().equals(clazz.getName()))     throw new RuntimeException("String_Node_Str" + clazz.getName() + "String_Node_Str");
    int c2=2;
    while (isStream(st[c2].getClassName()))     c2++;
    if (st[c1].getLineNumber() <= 0 || st[c2].getLineNumber() <= 0)     throw new AssertionError("String_Node_Str");
    if (!st[c2].getMethodName().equals(st[c1].getMethodName()) || (st[c2].getClassName().equals(clazz.getName()) && Math.abs(st[c2].getLineNumber() - st[c1].getLineNumber()) > 3))     target=cc;
  }
  if (target == null)   target=sup;
  return target != null ? target.sup(clazz) : null;
}

Fixed version (ground truth):
final <T extends Capsule>T getCallTarget(Class<T> clazz){
  Capsule target=null;
  if ((sup == null || sup.sup(clazz) == null || this.jarFile != ((Capsule)sup.sup(clazz)).jarFile) && cc != this) {
    final StackTraceElement[] st=new Throwable().getStackTrace();
    if (st == null || st.length < 3)     throw new AssertionError("String_Node_Str");
    final int c1=1;
    if (!st[c1].getClassName().equals(clazz.getName()))     throw new RuntimeException("String_Node_Str" + clazz.getName() + "String_Node_Str");
    int c2=2;
    while (isStream(st[c2].getClassName()))     c2++;
    if (st[c1].getLineNumber() <= 0 || st[c2].getLineNumber() <= 0)     throw new AssertionError("String_Node_Str");
    if (!st[c2].getMethodName().equals(st[c1].getMethodName()) || (st[c2].getClassName().equals(clazz.getName()) && Math.abs(st[c2].getLineNumber() - st[c1].getLineNumber()) > 3))     target=cc;
  }
  if (target == null)   target=sup;
  return target != null ? target.sup(clazz) : null;
}
Program: 28466
Project: 28466
Buggy source:
final Capsule setTarget(Path jar){
  verifyCanCallSetTarget();
  jar=toAbsolutePath(jar);
  if (jar.equals(getJarFile()))   throw new RuntimeException("String_Node_Str" + getJarFile());
  if (isFactoryCapsule()) {
    this.jarFile=jar;
    return this;
  }
  final Manifest man;
  boolean isCapsule=false;
  final long start=clock();
  try (JarInputStream jis=openJarInputStream(jar)){
    man=jis.getManifest();
    if (man == null || man.getMainAttributes().getValue(ATTR_MAIN_CLASS) == null)     throw new IllegalArgumentException(jar + "String_Node_Str");
    for (JarEntry entry; (entry=jis.getNextJarEntry()) != null; ) {
      if (entry.getName().equals(Capsule.class.getName() + "String_Node_Str")) {
        isCapsule=true;
        break;
      }
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + jar,e);
  }
  time("String_Node_Str",start);
  if (!isCapsule)   manifest.getMainAttributes().putValue(ATTR_APP_ARTIFACT.getKey(),jar.toString());
 else {
    log(LOG_VERBOSE,"String_Node_Str" + jar);
    insertAfter(loadTargetCapsule(cc.getClass().getClassLoader(),jar));
  }
  finalizeCapsule();
  return this;
}

Fixed version (ground truth):
final Capsule setTarget(Path jar){
  verifyCanCallSetTarget();
  jar=toAbsolutePath(jar);
  if (jar.equals(getJarFile()))   throw new RuntimeException("String_Node_Str" + getJarFile());
  if (isFactoryCapsule()) {
    this.jarFile=jar;
    return this;
  }
  final Manifest man;
  boolean isCapsule=false;
  final long start=clock();
  try (JarInputStream jis=openJarInputStream(jar)){
    man=jis.getManifest();
    if (man == null || man.getMainAttributes().getValue(ATTR_MAIN_CLASS) == null)     throw new IllegalArgumentException(jar + "String_Node_Str");
    for (JarEntry entry; (entry=jis.getNextJarEntry()) != null; ) {
      if (entry.getName().equals(Capsule.class.getName() + "String_Node_Str")) {
        isCapsule=true;
        break;
      }
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + jar,e);
  }
  time("String_Node_Str",start);
  if (!isCapsule)   manifest.getMainAttributes().putValue(ATTR_APP_ARTIFACT.getKey(),jar.toString());
 else {
    log(LOG_VERBOSE,"String_Node_Str" + jar);
    insertAfter(loadTargetCapsule(cc.getClass().getClassLoader(),jar).cc);
  }
  finalizeCapsule();
  return this;
}
Program: 28467
Project: 28467
Buggy source:
private static Capsule newCapsule(String capsuleClass,Capsule pred){
  try {
    final Class<? extends Capsule> clazz=loadCapsule(MY_CLASSLOADER,capsuleClass,capsuleClass);
    return accessible(clazz.getDeclaredConstructor(Capsule.class)).newInstance(pred);
  }
 catch (  IncompatibleClassChangeError e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass + "String_Node_Str"+ VERSION+ "String_Node_Str");
  }
catch (  InvocationTargetException e) {
    throw rethrow(e.getTargetException());
  }
catch (  ReflectiveOperationException e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass,e);
  }
}

Fixed version (ground truth):
private static Capsule newCapsule(String capsuleClass,Capsule pred){
  try {
    final Class<? extends Capsule> clazz=loadCapsule(Thread.currentThread().getContextClassLoader(),capsuleClass,capsuleClass);
    return accessible(clazz.getDeclaredConstructor(Capsule.class)).newInstance(pred);
  }
 catch (  IncompatibleClassChangeError e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass + "String_Node_Str"+ VERSION+ "String_Node_Str");
  }
catch (  InvocationTargetException e) {
    throw rethrow(e.getTargetException());
  }
catch (  ReflectiveOperationException e) {
    throw new RuntimeException("String_Node_Str" + capsuleClass,e);
  }
}
Program: 28468
Project: 28468
Buggy source:
final static String join(Map<?,?> map,char kvSeparator,String separator){
  if (map == null)   return null;
  if (map.isEmpty())   return "String_Node_Str";
  StringBuilder sb=new StringBuilder();
  for (  Map.Entry<?,?> entry : map.entrySet())   sb.append(entry.getKey()).append(kvSeparator).append(entry.getValue()).append(separator);
  sb.delete(sb.length() - separator.length(),sb.length());
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * @deprecated marked deprecated to exclude from javadoc
 */
protected static String join(Map<?,?> map,char kvSeparator,String separator){
  if (map == null)   return null;
  if (map.isEmpty())   return "String_Node_Str";
  StringBuilder sb=new StringBuilder();
  for (  Map.Entry<?,?> entry : map.entrySet())   sb.append(entry.getKey()).append(kvSeparator).append(entry.getValue()).append(separator);
  sb.delete(sb.length() - separator.length(),sb.length());
  return sb.toString();
}
Program: 28469
Project: 28469
Buggy source:
static Map<String,String> split(String map,char kvSeparator,String separator,String defaultValue){
  if (map == null)   return null;
  Map<String,String> m=new LinkedHashMap<>();
  for (  String entry : Capsule.split(map,separator)) {
    final String key=getBefore(entry,kvSeparator);
    String value=getAfter(entry,kvSeparator);
    if (value == null) {
      if (defaultValue != null)       value=defaultValue;
 else       throw new IllegalArgumentException("String_Node_Str" + entry + "String_Node_Str"+ map+ "String_Node_Str"+ kvSeparator+ "String_Node_Str");
    }
    m.put(key.trim(),value.trim());
  }
  return m;
}

Fixed version (ground truth):
/** 
 * @deprecated marked deprecated to exclude from javadoc
 */
protected static Map<String,String> split(String map,char kvSeparator,String separator,String defaultValue){
  if (map == null)   return null;
  Map<String,String> m=new LinkedHashMap<>();
  for (  String entry : Capsule.split(map,separator)) {
    final String key=getBefore(entry,kvSeparator);
    String value=getAfter(entry,kvSeparator);
    if (value == null) {
      if (defaultValue != null)       value=defaultValue;
 else       throw new IllegalArgumentException("String_Node_Str" + entry + "String_Node_Str"+ map+ "String_Node_Str"+ kvSeparator+ "String_Node_Str");
    }
    m.put(key.trim(),value.trim());
  }
  return m;
}
Program: 28470
Project: 28470
Buggy source:
/** 
 * @deprecated marked deprecated to exclude from javadoc. Visible for testing
 */
static Path createPathingJar(Path dir,List<Path> cp){
  try {
    dir=dir.toAbsolutePath();
    final List<Path> paths=new ArrayList<>(cp.size());
    for (    Path p : cp)     paths.add(dir.relativize(p));
    final Path pathingJar=Files.createTempFile(dir,"String_Node_Str","String_Node_Str");
    final Manifest man=new Manifest();
    man.getMainAttributes().putValue(ATTR_MANIFEST_VERSION,"String_Node_Str");
    man.getMainAttributes().putValue(ATTR_CLASS_PATH,join(paths,"String_Node_Str"));
    new JarOutputStream(Files.newOutputStream(pathingJar),man).close();
    return pathingJar;
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * @deprecated marked deprecated to exclude from javadoc. Visible for testing
 */
static Path createPathingJar(Path dir,List<Path> cp){
  try {
    dir=dir.toAbsolutePath();
    final List<String> paths=createClassPath(dir,cp);
    final Path pathingJar=Files.createTempFile(dir,"String_Node_Str","String_Node_Str");
    final Manifest man=new Manifest();
    man.getMainAttributes().putValue(ATTR_MANIFEST_VERSION,"String_Node_Str");
    man.getMainAttributes().putValue(ATTR_CLASS_PATH,join(paths,"String_Node_Str"));
    new JarOutputStream(Files.newOutputStream(pathingJar),man).close();
    return pathingJar;
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 28471
Project: 28471
Buggy source:
private void launch(List<String> args) throws IOException, InterruptedException {
  final ProcessBuilder pb;
  try {
    final List<String> jvmArgs=ManagementFactory.getRuntimeMXBean().getInputArguments();
    pb=prepareForLaunch(jvmArgs,args);
  }
 catch (  Throwable t) {
    cleanup();
    throw t;
  }
  clearContext();
  log(LOG_VERBOSE,join(pb.command(),"String_Node_Str"));
  if (isTrampoline()) {
    if (hasAttribute(ATTR_ENV))     throw new RuntimeException("String_Node_Str" + ATTR_ENV + "String_Node_Str");
    pb.command().remove("String_Node_Str" + PROP_TRAMPOLINE);
    System.out.println(join(pb.command(),"String_Node_Str"));
  }
 else {
    Runtime.getRuntime().addShutdownHook(new Thread(this));
    if (!isInheritIoBug())     pb.inheritIO();
    this.child=pb.start();
    if (isInheritIoBug())     pipeIoStreams();
    final int pid=getPid(child);
    if (pid > 0)     System.setProperty(PROP_CAPSULE_APP_PID,Integer.toString(pid));
    child.waitFor();
  }
  System.exit(child != null ? child.exitValue() : 0);
}

Fixed version (ground truth):
private int launch(List<String> args) throws IOException, InterruptedException {
  final ProcessBuilder pb;
  try {
    final List<String> jvmArgs=ManagementFactory.getRuntimeMXBean().getInputArguments();
    pb=prepareForLaunch(jvmArgs,args);
  }
 catch (  Throwable t) {
    cleanup();
    throw t;
  }
  clearContext();
  log(LOG_VERBOSE,join(pb.command(),"String_Node_Str"));
  if (isTrampoline()) {
    if (hasAttribute(ATTR_ENV))     throw new RuntimeException("String_Node_Str" + ATTR_ENV + "String_Node_Str");
    pb.command().remove("String_Node_Str" + PROP_TRAMPOLINE);
    System.out.println(join(pb.command(),"String_Node_Str"));
  }
 else {
    Runtime.getRuntime().addShutdownHook(new Thread(this));
    if (!isInheritIoBug())     pb.inheritIO();
    this.child=pb.start();
    if (isInheritIoBug())     pipeIoStreams();
    final int pid=getPid(child);
    if (pid > 0)     System.setProperty(PROP_CAPSULE_APP_PID,Integer.toString(pid));
    child.waitFor();
  }
  return child != null ? child.exitValue() : 0;
}
Program: 28472
Project: 28472
Buggy source:
private static String getJvmArgKey(String a){
  if (a.equals("String_Node_Str") || a.equals("String_Node_Str"))   return "String_Node_Str";
  if (a.equals("String_Node_Str") || a.equals("String_Node_Str") || a.equals("String_Node_Str")|| a.equals("String_Node_Str"))   return "String_Node_Str";
  if (a.equals("String_Node_Str") || a.equals("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str") || a.startsWith("String_Node_Str"))   return "String_Node_Str" + a.substring("String_Node_Str".length());
  if (a.contains("String_Node_Str"))   return a.substring(0,a.indexOf("String_Node_Str"));
  return a;
}

Fixed version (ground truth):
private static String getJvmArgKey(String a){
  if (a.equals("String_Node_Str") || a.equals("String_Node_Str"))   return "String_Node_Str";
  if (a.equals("String_Node_Str") || a.equals("String_Node_Str") || a.equals("String_Node_Str")|| a.equals("String_Node_Str"))   return "String_Node_Str";
  if (a.equals("String_Node_Str") || a.equals("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str"))   return "String_Node_Str";
  if (a.startsWith("String_Node_Str") || a.startsWith("String_Node_Str"))   return "String_Node_Str" + a.substring("String_Node_Str".length());
  if (a.contains("String_Node_Str"))   return a.substring(0,a.indexOf('='));
  return a;
}
Program: 28473
Project: 28473
Buggy source:
private void splitDepsAndRename(List<String> depsAndRename,List<String> deps,List<String> renames){
  for (  String depAndRename : depsAndRename) {
    String[] dna=depAndRename.split("String_Node_Str");
    deps.add(dna[0]);
    renames.add(dna.length > 1 ? dna[1] : null);
  }
}

Fixed version (ground truth):
private void splitDepsAndRename(List<String> depsAndRename,List<String> deps,List<String> renames){
  for (  String depAndRename : depsAndRename) {
    String[] dna=depAndRename.split("String_Node_Str");
    deps.add(dna[0]);
    if (renames != null)     renames.add(dna.length > 1 ? dna[1] : null);
  }
}
Program: 28475
Project: 28475
Buggy source:
/** 
 * Executes a command and returns its output as a list of lines. If the number of lines read is less than   {@code numLines}, or if   {@code numLines < 0}, then the method will wait for the child process to terminate, and throw an exception if the command returns an exit value   {@code != 0}.
 * @param numLines the maximum number of lines to read, or {@code -1} for an unbounded number
 * @param pb       the {@link ProcessBuilder} that will be used to launch the command
 * @return the lines output by the command
 */
protected static List<String> exec(int numLines,ProcessBuilder pb) throws IOException {
  final List<String> lines=new ArrayList<>();
  final Process p=pb.start();
  try (BufferedReader reader=new BufferedReader(new InputStreamReader(p.getErrorStream()))){
    for (int i=0; numLines < 0 || i < numLines; i++) {
      final String line=reader.readLine();
      if (line == null)       break;
      lines.add(line);
    }
  }
   try {
    if (numLines < 0 || lines.size() < numLines) {
      final int exitValue=p.waitFor();
      if (exitValue != 0)       throw new RuntimeException("String_Node_Str" + join(pb.command(),"String_Node_Str") + "String_Node_Str"+ exitValue);
    }
    return lines;
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Executes a command and returns its output as a list of lines. If the number of lines read is less than   {@code numLines}, or if   {@code numLines < 0}, then the method will wait for the child process to terminate, and throw an exception if the command returns an exit value   {@code != 0}.
 * @param numLines the maximum number of lines to read, or {@code -1} for an unbounded number
 * @param pb       the {@link ProcessBuilder} that will be used to launch the command
 * @return the lines output by the command
 */
protected static List<String> exec(int numLines,ProcessBuilder pb) throws IOException {
  final List<String> lines=new ArrayList<>();
  final Process p=pb.start();
  try (BufferedReader reader=new BufferedReader(new InputStreamReader(p.getErrorStream(),Charset.defaultCharset()))){
    for (int i=0; numLines < 0 || i < numLines; i++) {
      final String line=reader.readLine();
      if (line == null)       break;
      lines.add(line);
    }
  }
   try {
    if (numLines < 0 || lines.size() < numLines) {
      final int exitValue=p.waitFor();
      if (exitValue != 0)       throw new RuntimeException("String_Node_Str" + join(pb.command(),"String_Node_Str") + "String_Node_Str"+ exitValue);
    }
    return lines;
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
}
Program: 28476
Project: 28476
Buggy source:
private static long getStringsLength(Collection<?> coll){
  if (coll == null)   return 0;
  long len=0;
  for (  Object o : coll)   len+=coll.toString().length();
  return len;
}

Fixed version (ground truth):
private static long getStringsLength(Collection<?> coll){
  if (coll == null)   return 0;
  long len=0;
  for (  Object o : coll)   len+=o.toString().length();
  return len;
}
Program: 28477
Project: 28477
Buggy source:
public DependencyManagerImpl(Path localRepoPath,boolean forceRefresh,int logLevel){
  this.logLevel=logLevel;
  this.forceRefresh=forceRefresh;
  this.offline=isPropertySet(PROP_OFFLINE,false);
  if (localRepoPath == null)   localRepoPath=DEFAULT_LOCAL_MAVEN.resolve("String_Node_Str");
  log(LOG_DEBUG,"String_Node_Str" + offline);
  log(LOG_DEBUG,"String_Node_Str" + localRepoPath);
  log(LOG_DEBUG,"String_Node_Str" + allowSnapshots);
  final LocalRepository localRepo=new LocalRepository(localRepoPath.toFile());
  this.settings=UserSettings.getInstance();
  this.system=newRepositorySystem();
  this.session=newRepositorySession(system,localRepo);
  setRepos(null,false);
}

Fixed version (ground truth):
public DependencyManagerImpl(Path localRepoPath,boolean forceRefresh,int logLevel){
  this.logLevel=logLevel;
  this.forceRefresh=forceRefresh;
  this.offline=isPropertySet(PROP_OFFLINE,false);
  if (localRepoPath == null)   localRepoPath=DEFAULT_LOCAL_MAVEN.resolve("String_Node_Str");
  log(LOG_DEBUG,"String_Node_Str" + offline);
  log(LOG_DEBUG,"String_Node_Str" + localRepoPath);
  final LocalRepository localRepo=new LocalRepository(localRepoPath.toFile());
  this.settings=UserSettings.getInstance();
  this.system=newRepositorySystem();
  this.session=newRepositorySession(system,localRepo);
  setRepos(null,false);
}
Program: 28478
Project: 28478
Buggy source:
private static Dependency toDependency(Artifact artifact){
  return new Dependency(artifact,JavaScopes.RUNTIME,false,null);
}

Fixed version (ground truth):
static Dependency toDependency(String coords,String type){
  return new Dependency(coordsToArtifact(coords,type),JavaScopes.RUNTIME,false,getExclusions(coords));
}
Program: 28479
Project: 28479
Buggy source:
private String getAppId(String[] args){
  String appName=System.getProperty(PROP_APP_ID);
  if (appName == null)   appName=getAttribute(ATTR_APP_NAME);
  if (appName == null) {
    appName=getApplicationArtifactId(getAppArtifact(args));
    if (appName != null)     return getAppArtifactLatestVersion(appName);
  }
  if (appName == null) {
    if (pom != null)     return getPomAppName();
    appName=getAttribute(ATTR_APP_CLASS);
  }
  if (appName == null) {
    if (isEmptyCapsule())     return null;
    throw new RuntimeException("String_Node_Str" + jarFile + "String_Node_Str"+ ATTR_APP_NAME+ "String_Node_Str"+ "String_Node_Str"+ ATTR_APP_CLASS+ "String_Node_Str"+ POM_FILE+ "String_Node_Str");
  }
  final String version=hasAttribute(ATTR_APP_VERSION) ? getAttribute(ATTR_APP_VERSION) : getAttribute(ATTR_IMPLEMENTATION_VERSION);
  return appName + (version != null ? "String_Node_Str" + version : "String_Node_Str");
}

Fixed version (ground truth):
private String getAppId(String[] args){
  String appName=System.getProperty(PROP_APP_ID);
  if (appName == null)   appName=getAttribute(ATTR_APP_NAME);
  if (appName == null) {
    appName=getAppArtifact(args);
    if (appName != null)     return getAppArtifactLatestVersion(appName);
  }
  if (appName == null) {
    if (pom != null)     return getPomAppName();
    appName=getAttribute(ATTR_APP_CLASS);
  }
  if (appName == null) {
    if (isEmptyCapsule())     return null;
    throw new RuntimeException("String_Node_Str" + jarFile + "String_Node_Str"+ ATTR_APP_NAME+ "String_Node_Str"+ "String_Node_Str"+ ATTR_APP_CLASS+ "String_Node_Str"+ POM_FILE+ "String_Node_Str");
  }
  final String version=hasAttribute(ATTR_APP_VERSION) ? getAttribute(ATTR_APP_VERSION) : getAttribute(ATTR_IMPLEMENTATION_VERSION);
  return appName + (version != null ? "String_Node_Str" + version : "String_Node_Str");
}
Program: 28480
Project: 28480
Buggy source:
/** 
 * Returns a list of JVM arguments.
 * @param cmdLine the list of JVM arguments passed to the capsule at launch
 */
protected List<String> buildJVMArgs(List<String> cmdLine){
  final Map<String,String> jvmArgs=new LinkedHashMap<String,String>();
  for (  String a : nullToEmpty(getListAttribute(ATTR_JVM_ARGS))) {
    if (!a.startsWith("String_Node_Str") && !a.startsWith("String_Node_Str"))     addJvmArg(expand(a),jvmArgs);
  }
  for (  String option : cmdLine) {
    if (!option.startsWith("String_Node_Str") && !option.startsWith("String_Node_Str"))     addJvmArg(option,jvmArgs);
  }
  return new ArrayList<String>(jvmArgs.values());
}

Fixed version (ground truth):
/** 
 * Returns a list of JVM arguments.
 * @param cmdLine the list of JVM arguments passed to the capsule at launch
 */
protected List<String> buildJVMArgs(List<String> cmdLine){
  final Map<String,String> jvmArgs=new LinkedHashMap<String,String>();
  for (  String a : nullToEmpty(getListAttribute(ATTR_JVM_ARGS))) {
    a=a.trim();
    if (!a.isEmpty() && !a.startsWith("String_Node_Str") && !a.startsWith("String_Node_Str"))     addJvmArg(expand(a),jvmArgs);
  }
  for (  String option : cmdLine) {
    if (!option.startsWith("String_Node_Str") && !option.startsWith("String_Node_Str"))     addJvmArg(option,jvmArgs);
  }
  return new ArrayList<String>(jvmArgs.values());
}
Program: 28481
Project: 28481
Buggy source:
@Override public void logout(){
}

Fixed version (ground truth):
@Override public void logout(){
  final Session openSession=mSessionTracker.getOpenSession();
  if (openSession != null) {
    openSession.closeAndClearTokenInformation();
  }
}
Program: 28482
Project: 28482
Buggy source:
@Override public boolean isConnected(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isConnected(){
  Session session=Session.getActiveSession();
  return (session != null && session.isOpened());
}
Program: 28483
Project: 28483
Buggy source:
@Override public int getID(){
  return 0;
}

Fixed version (ground truth):
@Override public int getID(){
  return ID;
}
Program: 28484
Project: 28484
Buggy source:
@Override public void logout(){
}

Fixed version (ground truth):
@Override public void logout(){
  mConnectRequested=false;
  if (mPlusClient.isConnected()) {
    mPlusClient.clearDefaultAccount();
    mPlusClient.disconnect();
    mPlusClient.connect();
  }
}
Program: 28485
Project: 28485
Buggy source:
@Override public boolean isConnected(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isConnected(){
  return mPlusClient.isConnected();
}
Program: 28486
Project: 28486
Buggy source:
@Override public int getID(){
  return 0;
}

Fixed version (ground truth):
@Override public int getID(){
  return ID;
}
Program: 28487
Project: 28487
Buggy source:
@MemberGetter public static native @Const AuxillaryParseTableField aux();

Fixed version (ground truth):
@MemberGetter public native @Const AuxillaryParseTableField aux();
Program: 28490
Project: 28490
Buggy source:
@Override public void getBitmap(ProteusView view,String url,final DrawableValue.AsyncCallback callback){
  GlideApp.with(ProteusActivity.this).load(url).into(new ImageLoaderTarget(callback));
}

Fixed version (ground truth):
@Override public void getBitmap(ProteusView view,String url,final DrawableValue.AsyncCallback callback){
  GlideApp.with(ProteusActivity.this).load(url).placeholder(R.drawable.placeholder).error(R.drawable.image_broken).into(new ImageLoaderTarget(callback));
}
Program: 28491
Project: 28491
Buggy source:
public static <V extends View>void register(ProteusBuilder builder){
  Map<String,AttributeProcessor> processors=new LinkedHashMap<>(4);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      AppBarLayoutParamsHelper.setLayoutScrollFlags(view,value);
    }
  }
);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      CollapsingToolbarLayoutParamsHelper.setCollapseMode(view,value);
    }
  }
);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      CollapsingToolbarLayoutParamsHelper.setParallaxMultiplier(view,value);
    }
  }
);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      CoordinatorLayoutParamsHelper.setLayoutBehavior(view,value);
    }
  }
);
  builder.register("String_Node_Str",processors);
}

Fixed version (ground truth):
public static <V extends View>void register(ProteusBuilder builder){
  Map<String,AttributeProcessor> processors=new LinkedHashMap<>(4);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      AppBarLayoutParamsHelper.setLayoutScrollFlags(view,value);
    }
  }
);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      CollapsingToolbarLayoutParamsHelper.setCollapseMode(view,value);
    }
  }
);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      CollapsingToolbarLayoutParamsHelper.setParallaxMultiplier(view,value);
    }
  }
);
  processors.put("String_Node_Str",new StringAttributeProcessor<V>(){
    @Override public void setString(    V view,    String value){
      CoordinatorLayoutParamsHelper.setLayoutBehavior(view,value);
    }
  }
);
  processors.put(Attributes.View.LayoutGravity,new GravityAttributeProcessor<V>(){
    @Override public void setGravity(    V view,    @Gravity int gravity){
      ViewGroup.LayoutParams layoutParams=view.getLayoutParams();
      if (layoutParams instanceof LinearLayout.LayoutParams) {
        LinearLayout.LayoutParams params=(LinearLayout.LayoutParams)layoutParams;
        params.gravity=gravity;
        view.setLayoutParams(layoutParams);
      }
 else       if (layoutParams instanceof FrameLayout.LayoutParams) {
        FrameLayout.LayoutParams params=(FrameLayout.LayoutParams)layoutParams;
        params.gravity=gravity;
        view.setLayoutParams(layoutParams);
      }
 else       if (layoutParams instanceof CoordinatorLayout.LayoutParams) {
        CoordinatorLayout.LayoutParams params=(CoordinatorLayout.LayoutParams)layoutParams;
        params.gravity=gravity;
        view.setLayoutParams(layoutParams);
      }
    }
  }
);
  builder.register("String_Node_Str",processors);
}
Program: 28492
Project: 28492
Buggy source:
@Override public void register(ProteusTypeAdapterFactory factory){
  factory.register(AttributeResource.class,ATTRIBUTE_RESOURCE);
  factory.register(Binding.class,BINDING);
  factory.register(Color.Int.class,COLOR_INT);
  factory.register(Color.StateList.class,COLOR_STATE_LIST);
  factory.register(Dimension.class,DIMENSION);
  factory.register(DrawableValue.ColorValue.class,DRAWABLE_COLOR);
  factory.register(DrawableValue.LayerListValue.class,DRAWABLE_LAYER_LIST);
  factory.register(DrawableValue.LevelListValue.class,DRAWABLE_LEVEL_LIST);
  factory.register(DrawableValue.RippleValue.class,DRAWABLE_RIPPLE);
  factory.register(DrawableValue.ShapeValue.class,DRAWABLE_VALUE);
  factory.register(DrawableValue.StateListValue.class,DRAWABLE_STATE_LIST);
  factory.register(DrawableValue.UrlValue.class,DRAWABLE_URL);
  factory.register(Layout.class,LAYOUT);
  factory.register(NestedBinding.class,NESTED_BINDING);
  factory.register(Resource.class,RESOURCE);
  factory.register(StyleResource.class,STYLE_RESOURCE);
}

Fixed version (ground truth):
@Override public void register(ProteusTypeAdapterFactory factory){
  factory.register(AttributeResource.class,ATTRIBUTE_RESOURCE);
  factory.register(Binding.class,BINDING);
  factory.register(Color.Int.class,COLOR_INT);
  factory.register(Color.StateList.class,COLOR_STATE_LIST);
  factory.register(Dimension.class,DIMENSION);
  factory.register(DrawableValue.ColorValue.class,DRAWABLE_COLOR);
  factory.register(DrawableValue.LayerListValue.class,DRAWABLE_LAYER_LIST);
  factory.register(DrawableValue.LevelListValue.class,DRAWABLE_LEVEL_LIST);
  factory.register(DrawableValue.RippleValue.class,DRAWABLE_RIPPLE);
  factory.register(DrawableValue.ShapeValue.class,DRAWABLE_SHAPE);
  factory.register(DrawableValue.StateListValue.class,DRAWABLE_STATE_LIST);
  factory.register(DrawableValue.UrlValue.class,DRAWABLE_URL);
  factory.register(Layout.class,LAYOUT);
  factory.register(NestedBinding.class,NESTED_BINDING);
  factory.register(Resource.class,RESOURCE);
  factory.register(StyleResource.class,STYLE_RESOURCE);
}
Program: 28493
Project: 28493
Buggy source:
private ShapeValue(ObjectValue value,Context context){
  this.shape=getShape(value.getAsString(SHAPE));
  Gradient gradient=null;
  Array children=value.getAsArray(CHILDREN);
  Iterator<Value> iterator=children.iterator();
  if (children.size() > 0) {
    this.elements=new DrawableElement[children.size()];
    int index=0;
    while (iterator.hasNext()) {
      ObjectValue child=iterator.next().getAsObject();
      String typeKey=child.getAsString(TYPE);
      DrawableElement element=null;
switch (typeKey) {
case TYPE_CORNERS:
        element=Corners.valueOf(child,context);
      break;
case TYPE_PADDING:
    break;
case TYPE_SIZE:
  element=Size.valueOf(child,context);
break;
case TYPE_SOLID:
element=Solid.valueOf(child,context);
break;
case TYPE_STROKE:
element=Stroke.valueOf(child,context);
break;
case TYPE_GRADIENT:
gradient=Gradient.valueOf(child,context);
element=gradient;
break;
}
if (null != element) {
this.elements[index]=element;
index++;
}
}
this.gradient=gradient;
}
 else {
this.elements=null;
this.gradient=null;
}
}

Fixed version (ground truth):
private ShapeValue(int shape,@Nullable Gradient gradient,@Nullable DrawableElement[] elements){
  this.shape=shape;
  this.gradient=gradient;
  this.elements=elements;
}
Program: 28494
Project: 28494
Buggy source:
@Override public String toString(){
  final String value;
  if (this.value % 1 == 0) {
    value=String.valueOf((int)this.value);
  }
 else {
    value=String.valueOf(this.value);
  }
  final String unit;
  if (this.unit == DIMENSION_UNIT_ENUM) {
    return sDimensionsMap.getKey(this.unit);
  }
 else {
    unit=sDimensionsUnitsMap.getKey(this.unit);
    return value + unit;
  }
}

Fixed version (ground truth):
@Override public String toString(){
  final String value;
  if (this.value % 1 == 0) {
    value=String.valueOf((int)this.value);
  }
 else {
    value=String.valueOf(this.value);
  }
  final String unit;
  if (this.unit == DIMENSION_UNIT_ENUM) {
    return sDimensionsMap.getKey((int)this.value);
  }
 else {
    unit=sDimensionsUnitsMap.getKey(this.unit);
    return value + unit;
  }
}
Program: 28495
Project: 28495
Buggy source:
public static GradientDrawable.Orientation getOrientation(Integer angle){
  GradientDrawable.Orientation orientation=GradientDrawable.Orientation.LEFT_RIGHT;
  if (null != angle) {
    angle%=360;
    if (angle % 45 == 0) {
switch (angle) {
case 0:
        orientation=GradientDrawable.Orientation.LEFT_RIGHT;
      break;
case 45:
    orientation=GradientDrawable.Orientation.BL_TR;
  break;
case 90:
orientation=GradientDrawable.Orientation.BOTTOM_TOP;
break;
case 135:
orientation=GradientDrawable.Orientation.BR_TL;
break;
case 180:
orientation=GradientDrawable.Orientation.RIGHT_LEFT;
break;
case 225:
orientation=GradientDrawable.Orientation.TR_BL;
break;
case 270:
orientation=GradientDrawable.Orientation.TOP_BOTTOM;
break;
case 315:
orientation=GradientDrawable.Orientation.TL_BR;
break;
}
}
}
return orientation;
}

Fixed version (ground truth):
public static GradientDrawable.Orientation getOrientation(@Nullable Integer angle){
  GradientDrawable.Orientation orientation=GradientDrawable.Orientation.LEFT_RIGHT;
  if (null != angle) {
    angle%=360;
    if (angle % 45 == 0) {
switch (angle) {
case 0:
        orientation=GradientDrawable.Orientation.LEFT_RIGHT;
      break;
case 45:
    orientation=GradientDrawable.Orientation.BL_TR;
  break;
case 90:
orientation=GradientDrawable.Orientation.BOTTOM_TOP;
break;
case 135:
orientation=GradientDrawable.Orientation.BR_TL;
break;
case 180:
orientation=GradientDrawable.Orientation.RIGHT_LEFT;
break;
case 225:
orientation=GradientDrawable.Orientation.TR_BL;
break;
case 270:
orientation=GradientDrawable.Orientation.TOP_BOTTOM;
break;
case 315:
orientation=GradientDrawable.Orientation.TL_BR;
break;
}
}
}
return orientation;
}
Program: 28496
Project: 28496
Buggy source:
private Gradient(ObjectValue gradient,Context context){
  angle=gradient.getAsInteger(ANGLE);
  centerX=gradient.getAsFloat(CENTER_X);
  centerY=gradient.getAsFloat(CENTER_Y);
  centerColor=ColorResourceProcessor.staticCompile(gradient.get(CENTER_COLOR),context);
  endColor=ColorResourceProcessor.staticCompile(gradient.get(END_COLOR),context);
  gradientRadius=DimensionAttributeProcessor.staticCompile(gradient.get(GRADIENT_RADIUS),context);
  startColor=ColorResourceProcessor.staticCompile(gradient.get(START_COLOR),context);
  gradientType=getGradientType(gradient.getAsString(GRADIENT_TYPE));
  useLevel=gradient.getAsBoolean(USE_LEVEL);
}

Fixed version (ground truth):
private Gradient(ObjectValue gradient,Context context){
  angle=gradient.getAsInteger(ANGLE);
  centerX=gradient.getAsFloat(CENTER_X);
  centerY=gradient.getAsFloat(CENTER_Y);
  Value value;
  value=gradient.get(START_COLOR);
  if (value != null) {
    startColor=ColorResourceProcessor.staticCompile(value,context);
  }
 else {
    startColor=null;
  }
  value=gradient.get(CENTER_COLOR);
  if (value != null) {
    centerColor=ColorResourceProcessor.staticCompile(value,context);
  }
 else {
    centerColor=null;
  }
  value=gradient.get(END_COLOR);
  if (value != null) {
    endColor=ColorResourceProcessor.staticCompile(value,context);
  }
 else {
    endColor=null;
  }
  value=gradient.get(GRADIENT_RADIUS);
  if (value != null) {
    gradientRadius=DimensionAttributeProcessor.staticCompile(value,context);
  }
 else {
    gradientRadius=null;
  }
  gradientType=getGradientType(gradient.getAsString(GRADIENT_TYPE));
  useLevel=gradient.getAsBoolean(USE_LEVEL);
}
Program: 28497
Project: 28497
Buggy source:
/** 
 * @param context
 */
public ProteusTypeAdapterFactory(Context context){
  this.context=context;
  register(AttributeResource.class,ATTRIBUTE_RESOURCE);
  register(Binding.class,BINDING);
  register(Color.Int.class,COLOR_INT);
  register(Color.StateList.class,COLOR_STATE_LIST);
  register(Dimension.class,DIMENSION);
  register(DrawableValue.class,DRAWABLE_VALUE);
  register(Layout.class,LAYOUT);
  register(NestedBinding.class,NESTED_BINDING);
  register(Resource.class,RESOURCE);
  register(StyleResource.class,STYLE_RESOURCE);
}

Fixed version (ground truth):
/** 
 * @param context
 */
public ProteusTypeAdapterFactory(Context context){
  this.context=context;
  register(AttributeResource.class,ATTRIBUTE_RESOURCE);
  register(Binding.class,BINDING);
  register(Color.Int.class,COLOR_INT);
  register(Color.StateList.class,COLOR_STATE_LIST);
  register(Dimension.class,DIMENSION);
  register(DrawableValue.ColorValue.class,DRAWABLE_VALUE);
  register(DrawableValue.LayerListValue.class,DRAWABLE_VALUE);
  register(DrawableValue.LevelListValue.class,DRAWABLE_VALUE);
  register(DrawableValue.RippleValue.class,DRAWABLE_VALUE);
  register(DrawableValue.ShapeValue.class,DRAWABLE_VALUE);
  register(DrawableValue.StateListValue.class,DRAWABLE_VALUE);
  register(DrawableValue.UrlValue.class,DRAWABLE_VALUE);
  register(Layout.class,LAYOUT);
  register(NestedBinding.class,NESTED_BINDING);
  register(Resource.class,RESOURCE);
  register(StyleResource.class,STYLE_RESOURCE);
}
Program: 28498
Project: 28498
Buggy source:
@Override public String toString(){
  String context="String_Node_Str" + Utils.getStringFromArray(tokens,"String_Node_Str") + "String_Node_Str";
  String functions="String_Node_Str";
  if (null != formatter) {
    functions="String_Node_Str" + formatter.getName() + "String_Node_Str"+ Utils.getStringFromArray(arguments,"String_Node_Str")+ "String_Node_Str";
  }
  return context + functions;
}

Fixed version (ground truth):
@Override public String toString(){
  String context="String_Node_Str" + Utils.getStringFromArray(tokens,"String_Node_Str") + "String_Node_Str";
  String functions="String_Node_Str";
  if (null != formatter) {
    functions="String_Node_Str" + formatter.getName() + "String_Node_Str"+ Utils.getStringFromArray(arguments,"String_Node_Str",Utils.STYLE_SINGLE)+ "String_Node_Str";
  }
  return context + functions;
}
Program: 28499
Project: 28499
Buggy source:
@Override public void update(@Nullable ObjectValue data){
  super.update(data);
  if (view instanceof ViewGroup) {
    ViewGroup parent=(ViewGroup)view;
    int count=parent.getChildCount();
    View child;
    for (int index=0; index < count; index++) {
      child=parent.getChildAt(index);
      if (child instanceof ProteusView) {
        ((ProteusView)child).getViewManager().update(dataContext.getData());
      }
    }
  }
}

Fixed version (ground truth):
@Override public void update(@Nullable ObjectValue data){
  super.update(data);
  if (!hasDataBoundChildren && view instanceof ViewGroup) {
    ViewGroup parent=(ViewGroup)view;
    int count=parent.getChildCount();
    View child;
    for (int index=0; index < count; index++) {
      child=parent.getChildAt(index);
      if (child instanceof ProteusView) {
        ((ProteusView)child).getViewManager().update(dataContext.getData());
      }
    }
  }
}
Program: 28500
Project: 28500
Buggy source:
public ViewGroupManager(@NonNull ProteusContext context,@NonNull ViewTypeParser parser,@NonNull View view,@NonNull Layout layout,@NonNull DataContext dataContext){
  super(context,parser,view,layout,dataContext);
}

Fixed version (ground truth):
public ViewGroupManager(@NonNull ProteusContext context,@NonNull ViewTypeParser parser,@NonNull View view,@NonNull Layout layout,@NonNull DataContext dataContext){
  super(context,parser,view,layout,dataContext);
  hasDataBoundChildren=false;
}
Program: 28501
Project: 28501
Buggy source:
public ProteusView.Manager createViewManager(@NonNull ProteusContext context,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@Nullable ViewGroup parent,int dataIndex){
  DataContext dataContext=createScope(layout,data,parent,dataIndex);
  return new ViewManager(context,this,view.getAsView(),layout,dataContext);
}

Fixed version (ground truth):
public ProteusView.Manager createViewManager(@NonNull ProteusContext context,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@Nullable ViewGroup parent,int dataIndex){
  if (null == this.parent) {
    DataContext dataContext=createScope(layout,data,parent,dataIndex);
    return new ViewManager(context,this,view.getAsView(),layout,dataContext);
  }
 else {
    return this.parent.createViewManager(context,view,layout,data,parent,dataIndex);
  }
}
Program: 28502
Project: 28502
Buggy source:
@Override public void handleBinding(T view,Binding value){
  handleDataDrivenChildren(view,value);
}

Fixed version (ground truth):
@Override public void handleBinding(T view,Binding value){
  handleDataBoundChildren(view,value);
}
Program: 28504
Project: 28504
Buggy source:
protected ProteusView.Manager createViewManager(@NonNull ViewTypeParser parser,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@Nullable ViewGroup parent,int dataIndex){
  return parser.createViewManager(context,view,layout,data,parser.parent,parent,dataIndex);
}

Fixed version (ground truth):
protected ProteusView.Manager createViewManager(@NonNull ViewTypeParser parser,@NonNull ProteusView view,@NonNull Layout layout,@NonNull ObjectValue data,@Nullable ViewGroup parent,int dataIndex){
  return parser.createViewManager(context,view,layout,data,parser,parent,dataIndex);
}