Program: 79689
Project: 79689
Buggy source:
/** 
 * arguments to pass to the JVM; this is the config options (e.g. -Xmx1024; only the contents of   {@link #getCustomJavaConfigOptions()} by default) and java system properties (-Dk=v; add custom properties in  {@link #getCustomJavaSystemProperties()}) <p> See   {@link #getShellEnvironment()} for discussion of quoting/escaping strategy.
 */
public List<String> getJavaOpts(){
  Iterable<String> sysprops=Iterables.transform(getJavaSystemProperties().entrySet(),new Function<Map.Entry,String>(){
    public String apply(    Map.Entry entry){
      Object k=entry.getKey();
      Object v=entry.getValue();
      try {
        if (v != null && Primitives.isWrapperType(v.getClass())) {
          v="String_Node_Str" + v;
        }
 else {
          v=BasicConfigKey.resolveValue(v,Object.class,entity.getExecutionContext());
          if (v == null) {
          }
 else           if (v instanceof CharSequence) {
          }
 else           if (TypeCoercions.isPrimitiveOrBoxer(v.getClass())) {
            v="String_Node_Str" + v;
          }
 else {
            throw new IllegalArgumentException("String_Node_Str" + v + "String_Node_Str"+ v.getClass()+ "String_Node_Str");
          }
        }
        return "String_Node_Str" + k + (v != null ? "String_Node_Str" + v : "String_Node_Str");
      }
 catch (      Exception e) {
        log.warn("String_Node_Str",k,e);
        throw Throwables.propagate(e);
      }
    }
  }
);
  List<String> result=Lists.newArrayList(getCustomJavaConfigOptions());
  result.addAll(Lists.newArrayList(sysprops));
  return result;
}

Fixed version (ground truth):
/** 
 * arguments to pass to the JVM; this is the config options (e.g. -Xmx1024; only the contents of  {@link #getCustomJavaConfigOptions()} by default) and java system properties (-Dk=v; add customproperties in  {@link #getCustomJavaSystemProperties()}) <p> See   {@link #getShellEnvironment()} for discussion of quoting/escaping strategy.
 */
public List<String> getJavaOpts(){
  Iterable<String> sysprops=Iterables.transform(getJavaSystemProperties().entrySet(),new Function<Map.Entry<String,?>,String>(){
    public String apply(    Map.Entry<String,?> entry){
      String k=entry.getKey();
      Object v=entry.getValue();
      try {
        if (v != null && Primitives.isWrapperType(v.getClass())) {
          v="String_Node_Str" + v;
        }
 else {
          v=BasicConfigKey.resolveValue(v,Object.class,entity.getExecutionContext());
          if (v == null) {
          }
 else           if (v instanceof CharSequence) {
          }
 else           if (TypeCoercions.isPrimitiveOrBoxer(v.getClass())) {
            v="String_Node_Str" + v;
          }
 else {
            throw new IllegalArgumentException("String_Node_Str" + v + "String_Node_Str"+ v.getClass()+ "String_Node_Str");
          }
        }
        return "String_Node_Str" + k + (v != null ? "String_Node_Str" + v : "String_Node_Str");
      }
 catch (      Exception e) {
        log.warn("String_Node_Str",k,e);
        throw Throwables.propagate(e);
      }
    }
  }
);
  Set<String> result=MutableSet.<String>builder().addAll(getCustomJavaConfigOptions()).addAll(sysprops).build();
  for (  String customOpt : entity.getConfig(UsesJava.JAVA_OPTS)) {
    for (    List<String> mutuallyExclusiveOpt : MUTUALLY_EXCLUSIVE_OPTS) {
      if (mutuallyExclusiveOpt.contains(customOpt)) {
        result.removeAll(mutuallyExclusiveOpt);
      }
    }
    for (    String keyValOptPrefix : KEY_VAL_OPT_PREFIXES) {
      if (customOpt.startsWith(keyValOptPrefix)) {
        for (Iterator<String> iter=result.iterator(); iter.hasNext(); ) {
          String existingOpt=(String)iter.next();
          if (existingOpt.startsWith(keyValOptPrefix)) {
            iter.remove();
          }
        }
      }
    }
    if (customOpt.indexOf("String_Node_Str") != -1) {
      String customOptPrefix=customOpt.substring(0,customOpt.indexOf("String_Node_Str"));
      for (Iterator<String> iter=result.iterator(); iter.hasNext(); ) {
        String existingOpt=(String)iter.next();
        if (existingOpt.startsWith(customOptPrefix)) {
          iter.remove();
        }
      }
    }
    result.add(customOpt);
  }
  return ImmutableList.copyOf(result);
}