nus-yam/ex-repair huggingface dataset:
Program: 29480
Project: 29480
Buggy source:
/** 
 * @return an unchecked method permission. Methods associated with such a method permission can be invoked by anyone
 */
public static MethodPermission getUncheckedMethodPermission(){
  if (unchecked == null) {
    unchecked=new MethodPermission();
    unchecked.isUnchecked=true;
  }
  return unchecked;
}

Fixed version (ground truth):
/** 
 * @return an unchecked method permission. Methods associated with such a method permission can be invoked by anyone
 */
public static synchronized MethodPermission getUncheckedMethodPermission(){
  if (unchecked == null) {
    unchecked=new MethodPermission();
    unchecked.isUnchecked=true;
  }
  return unchecked;
}
Program: 29481
Project: 29481
Buggy source:
public static NamedReferencePair createEjbPair(EjbDescriptor referant,EjbDescriptor referee){
  return new NamedReferencePair((Descriptor)referant,referee,EJB);
}

Fixed version (ground truth):
public static NamedReferencePair createEjbPair(EjbDescriptor referant,EjbDescriptor referee){
  if (referant instanceof Descriptor)   return new NamedReferencePair((Descriptor)referant,referee,EJB);
 else   return null;
}
Program: 29482
Project: 29482
Buggy source:
/** 
 * @return the default version of the deployment descriptorloaded by this descriptor
 */
public String getDefaultSpecVersion(){
  return new String("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @return the default version of the deployment descriptorloaded by this descriptor
 */
public String getDefaultSpecVersion(){
  return "String_Node_Str";
}
Program: 29483
Project: 29483
Buggy source:
public HandlerChainContainer[] getHandlerChainContainers(boolean serviceSideHandlerChain,Class declaringClass){
  if (serviceSideHandlerChain) {
    return null;
  }
 else {
    List<ServiceReferenceDescriptor> result=new ArrayList<ServiceReferenceDescriptor>();
    result.addAll(getDescriptor().getServiceReferenceDescriptors());
    return (result.toArray(new HandlerChainContainer[0]));
  }
}

Fixed version (ground truth):
public HandlerChainContainer[] getHandlerChainContainers(boolean serviceSideHandlerChain,Class declaringClass){
  if (serviceSideHandlerChain) {
    return null;
  }
 else {
    List<ServiceReferenceDescriptor> result=new ArrayList<ServiceReferenceDescriptor>();
    result.addAll(getDescriptor().getServiceReferenceDescriptors());
    return (result.toArray(new HandlerChainContainer[result.size()]));
  }
}
Program: 29484
Project: 29484
Buggy source:
private void processParameters(Method method){
  Type[] paramTypes=method.getGenericParameterTypes();
  Annotation[][] paramAnnos=method.getParameterAnnotations();
  int paramCount=paramTypes.length;
  for (int i=0; i < paramCount; i++) {
    boolean processed=false;
    boolean isPathParam=false;
    Type paramType=paramTypes[i];
    for (    Annotation annotation : paramAnnos[i]) {
      if (PathParam.class.isAssignableFrom(annotation.getClass())) {
        isPathParam=true;
      }
      if (QueryParam.class.isAssignableFrom(annotation.getClass())) {
        queryParameters.add(new ParamMetadata(context,(Class<?>)paramType,((QueryParam)annotation).value(),paramAnnos[i]));
        processed=true;
      }
    }
    if (!processed && !isPathParam) {
      requestPayload=Util.getFirstGenericType(paramType);
    }
  }
}

Fixed version (ground truth):
private void processParameters(Method method){
  Type[] paramTypes=method.getGenericParameterTypes();
  Annotation[][] paramAnnos=method.getParameterAnnotations();
  int paramCount=paramTypes.length;
  for (int i=0; i < paramCount; i++) {
    boolean processed=false;
    boolean isPathParam=false;
    Type paramType=paramTypes[i];
    for (    Annotation annotation : paramAnnos[i]) {
      if (PathParam.class.isAssignableFrom(annotation.getClass())) {
        isPathParam=true;
      }
      if (QueryParam.class.isAssignableFrom(annotation.getClass())) {
        queryParameters.add(new ParamMetadata(context,(Class<?>)paramType,((QueryParam)annotation).value(),paramAnnos[i]));
        processed=true;
      }
    }
    if (!processed && !isPathParam) {
      requestPayload=Util.isGenericType(paramType) ? Util.getFirstGenericType(paramType) : (Class<?>)paramType;
    }
  }
}
Program: 29486
Project: 29486
Buggy source:
private void checkServletFilterMappings(WebBundleDescriptor descriptor,Result result,ComponentNameConstructor compName){
  for (Iterator iter=descriptor.getServletFilterMappings().iterator(); iter.hasNext(); ) {
    ServletFilterMapping filterMapping=(ServletFilterMapping)iter.next();
    if (filterMapping.getURLPatterns().size() > 0) {
      for (      String url : filterMapping.getURLPatterns())       checkUrlPatternAndSetResult(url,descriptor,result,compName);
    }
  }
}

Fixed version (ground truth):
private void checkServletFilterMappings(WebBundleDescriptor descriptor,Result result,ComponentNameConstructor compName){
  for (Iterator iter=descriptor.getServletFilterMappings().iterator(); iter.hasNext(); ) {
    ServletFilterMapping filterMapping=(ServletFilterMapping)iter.next();
    if (filterMapping.getUrlPatterns().size() > 0) {
      for (      String url : filterMapping.getUrlPatterns())       checkUrlPatternAndSetResult(url,descriptor,result,compName);
    }
  }
}
Program: 29487
Project: 29487
Buggy source:
/** 
 * Configures this web module with the filter mappings specified in the deployment descriptor.
 * @param sfm The filter mappings of this web module as specified in thedeployment descriptor
 */
@SuppressWarnings({"String_Node_Str"}) void addFilterMap(ServletFilterMapping sfm){
  FilterMaps filterMaps=new FilterMaps();
  filterMaps.setFilterName(sfm.getName());
  filterMaps.setDispatcherTypes(sfm.getDispatchers());
  List<String> servletNames=sfm.getServletNames();
  if (servletNames != null) {
    for (    String servletName : servletNames) {
      filterMaps.addServletName(servletName);
    }
  }
  List<String> urlPatterns=sfm.getURLPatterns();
  if (urlPatterns != null) {
    for (    String urlPattern : urlPatterns) {
      filterMaps.addURLPattern(urlPattern);
    }
  }
  addFilterMaps(filterMaps);
}

Fixed version (ground truth):
/** 
 * Configures this web module with the filter mappings specified in the deployment descriptor.
 * @param sfm The filter mappings of this web module as specified in thedeployment descriptor
 */
@SuppressWarnings({"String_Node_Str"}) void addFilterMap(ServletFilterMapping sfm){
  FilterMaps filterMaps=new FilterMaps();
  filterMaps.setFilterName(sfm.getName());
  filterMaps.setDispatcherTypes(sfm.getDispatchers());
  List<String> servletNames=sfm.getServletNames();
  if (servletNames != null) {
    for (    String servletName : servletNames) {
      filterMaps.addServletName(servletName);
    }
  }
  List<String> urlPatterns=sfm.getUrlPatterns();
  if (urlPatterns != null) {
    for (    String urlPattern : urlPatterns) {
      filterMaps.addURLPattern(urlPattern);
    }
  }
  addFilterMaps(filterMaps);
}
Program: 29489
Project: 29489
Buggy source:
public int hashCode(){
  int result=17;
  result=37 * result + getName().hashCode();
  result=37 * result + getServletNames().hashCode();
  result=37 * result + getURLPatterns().hashCode();
  return result;
}

Fixed version (ground truth):
public int hashCode(){
  int result=17;
  result=37 * result + getName().hashCode();
  result=37 * result + getServletNames().hashCode();
  result=37 * result + getUrlPatterns().hashCode();
  return result;
}
Program: 29490
Project: 29490
Buggy source:
/** 
 * compare equals 
 */
public boolean equals(Object obj){
  if (obj instanceof ServletFilterMapping) {
    ServletFilterMapping o=(ServletFilterMapping)obj;
    Set<DispatcherType> otherDispatchers=o.getDispatchers();
    boolean sameDispatchers=((dispatchers == null && (otherDispatchers == null || otherDispatchers.size() == 0)) || (dispatchers != null && dispatchers.equals(otherDispatchers)));
    if (this.getName().equals(o.getName()) && this.getServletNames().equals(o.getServletNames()) && this.getURLPatterns().equals(o.getURLPatterns())&& sameDispatchers) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * compare equals 
 */
public boolean equals(Object obj){
  if (obj instanceof ServletFilterMapping) {
    ServletFilterMapping o=(ServletFilterMapping)obj;
    Set<DispatcherType> otherDispatchers=o.getDispatchers();
    boolean sameDispatchers=((dispatchers == null && (otherDispatchers == null || otherDispatchers.size() == 0)) || (dispatchers != null && dispatchers.equals(otherDispatchers)));
    if (this.getName().equals(o.getName()) && this.getServletNames().equals(o.getServletNames()) && this.getUrlPatterns().equals(o.getUrlPatterns())&& sameDispatchers) {
      return true;
    }
  }
  return false;
}
Program: 29491
Project: 29491
Buggy source:
public void addURLPattern(String urlPattern){
  getURLPatterns().add(urlPattern);
}

Fixed version (ground truth):
public void addURLPattern(String urlPattern){
  getUrlPatterns().add(urlPattern);
}
Program: 29492
Project: 29492
Buggy source:
protected void combineServletFilterMappings(WebBundleDescriptor webBundleDescriptor){
  Map<String,ServletFilterMappingInfo> map=new HashMap<String,ServletFilterMappingInfo>();
  for (  ServletFilterMapping sfMapping : getServletFilterMappings()) {
    ServletFilterMappingInfo sfmInfo=map.get(sfMapping.getName());
    if (sfmInfo == null) {
      sfmInfo=new ServletFilterMappingInfo();
      sfmInfo.servletFilterMapping=sfMapping;
      map.put(sfMapping.getName(),sfmInfo);
    }
    if (!sfmInfo.hasMapping) {
      sfmInfo.hasMapping=(sfMapping.getServletNames().size() > 0 || sfMapping.getURLPatterns().size() > 0);
    }
    if (!sfmInfo.hasDispatcher) {
      sfmInfo.hasDispatcher=(sfMapping.getDispatchers().size() > 0);
    }
  }
  for (  ServletFilterMapping sfMapping : webBundleDescriptor.getServletFilterMappings()) {
    ServletFilterMappingInfo sfmInfo=map.get(sfMapping.getName());
    if (sfmInfo != null) {
      if (!sfmInfo.hasMapping) {
        sfmInfo.servletFilterMapping.getServletNames().addAll(sfMapping.getServletNames());
        sfmInfo.servletFilterMapping.getURLPatterns().addAll(sfMapping.getURLPatterns());
      }
      if (!sfmInfo.hasDispatcher) {
        sfmInfo.servletFilterMapping.getDispatchers().addAll(sfMapping.getDispatchers());
      }
    }
 else {
      addServletFilterMapping(sfMapping);
    }
  }
}

Fixed version (ground truth):
protected void combineServletFilterMappings(WebBundleDescriptor webBundleDescriptor){
  Map<String,ServletFilterMappingInfo> map=new HashMap<String,ServletFilterMappingInfo>();
  for (  ServletFilterMapping sfMapping : getServletFilterMappings()) {
    ServletFilterMappingInfo sfmInfo=map.get(sfMapping.getName());
    if (sfmInfo == null) {
      sfmInfo=new ServletFilterMappingInfo();
      sfmInfo.servletFilterMapping=sfMapping;
      map.put(sfMapping.getName(),sfmInfo);
    }
    if (!sfmInfo.hasMapping) {
      sfmInfo.hasMapping=(sfMapping.getServletNames().size() > 0 || sfMapping.getUrlPatterns().size() > 0);
    }
    if (!sfmInfo.hasDispatcher) {
      sfmInfo.hasDispatcher=(sfMapping.getDispatchers().size() > 0);
    }
  }
  for (  ServletFilterMapping sfMapping : webBundleDescriptor.getServletFilterMappings()) {
    ServletFilterMappingInfo sfmInfo=map.get(sfMapping.getName());
    if (sfmInfo != null) {
      if (!sfmInfo.hasMapping) {
        sfmInfo.servletFilterMapping.getServletNames().addAll(sfMapping.getServletNames());
        sfmInfo.servletFilterMapping.getUrlPatterns().addAll(sfMapping.getUrlPatterns());
      }
      if (!sfmInfo.hasDispatcher) {
        sfmInfo.servletFilterMapping.getDispatchers().addAll(sfMapping.getDispatchers());
      }
    }
 else {
      addServletFilterMapping(sfMapping);
    }
  }
}
Program: 29493
Project: 29493
Buggy source:
/** 
 * write the descriptor class to a DOM tree and return it
 * @param parent node in the DOM tree 
 * @param nodeName node name for the root element of this xml fragment
 * @param descriptor the descriptor to write
 * @return the DOM tree top node
 */
@Override public Node writeDescriptor(Node parent,String nodeName,ServletFilterMappingDescriptor descriptor){
  Node myNode=appendChild(parent,nodeName);
  appendTextChild(myNode,WebTagNames.FILTER_NAME,descriptor.getName());
  for (  String servletName : descriptor.getServletNames()) {
    appendTextChild(myNode,WebTagNames.SERVLET_NAME,servletName);
  }
  for (  String urlPattern : descriptor.getURLPatterns()) {
    appendTextChild(myNode,WebTagNames.URL_PATTERN,urlPattern);
  }
  for (  DispatcherType dispatcherType : descriptor.getDispatchers()) {
    appendTextChild(myNode,WebTagNames.DISPATCHER,dispatcherType.name());
  }
  return myNode;
}

Fixed version (ground truth):
/** 
 * write the descriptor class to a DOM tree and return it
 * @param parent node in the DOM tree 
 * @param nodeName node name for the root element of this xml fragment
 * @param descriptor the descriptor to write
 * @return the DOM tree top node
 */
@Override public Node writeDescriptor(Node parent,String nodeName,ServletFilterMappingDescriptor descriptor){
  Node myNode=appendChild(parent,nodeName);
  appendTextChild(myNode,WebTagNames.FILTER_NAME,descriptor.getName());
  for (  String servletName : descriptor.getServletNames()) {
    appendTextChild(myNode,WebTagNames.SERVLET_NAME,servletName);
  }
  for (  String urlPattern : descriptor.getUrlPatterns()) {
    appendTextChild(myNode,WebTagNames.URL_PATTERN,urlPattern);
  }
  for (  DispatcherType dispatcherType : descriptor.getDispatchers()) {
    appendTextChild(myNode,WebTagNames.DISPATCHER,dispatcherType.name());
  }
  return myNode;
}
Program: 29494
Project: 29494
Buggy source:
/** 
 * @return the descriptor instance to associate with this XMLNode
 */
@Override public CookieProperties getDescriptor(){
  if (descriptor == null) {
    descriptor=new CookieProperties();
  }
  return descriptor;
}

Fixed version (ground truth):
/** 
 * @return the descriptor instance to associate with this XMLNode
 */
@Override public CookieProperties getDescriptor(){
  if (descriptor == null) {
    descriptor=new CookieProperties();
  }
  return (CookieProperties)descriptor;
}
Program: 29495
Project: 29495
Buggy source:
public static void compile(File inWebDir,File outWebDir,WebBundleDescriptor wbd,String classpath,ServerContext serverContext) throws DeploymentException {
  JspC jspc=new JspC();
  if (classpath != null && classpath.length() > 0) {
    jspc.setClassPath(classpath);
  }
  String appName=wbd.getApplication().getName();
  String sysClassPath=ASClassLoaderUtil.getModuleClassPath(serverContext.getDefaultServices(),appName,null);
  jspc.setSystemClassPath(sysClassPath);
  verify(inWebDir,outWebDir);
  configureJspc(jspc,wbd);
  jspc.setOutputDir(outWebDir.getAbsolutePath());
  jspc.setUriroot(inWebDir.getAbsolutePath());
  jspc.setCompile(true);
  logger.info(startMessage);
  try {
    jspc.execute();
  }
 catch (  Exception je) {
    throw new DeploymentException("String_Node_Str" + je,je);
  }
 finally {
    String[] files=outWebDir.list();
    if (files == null || files.length <= 0) {
      if (!outWebDir.delete()) {
      }
    }
    logger.info(finishMessage);
  }
}

Fixed version (ground truth):
public static void compile(File inWebDir,File outWebDir,WebBundleDescriptor wbd,String classpath,ServerContext serverContext) throws DeploymentException {
  JspC jspc=new JspC();
  if (classpath != null && classpath.length() > 0) {
    jspc.setClassPath(classpath);
  }
  String appName=wbd.getApplication().getName();
  String sysClassPath=ASClassLoaderUtil.getModuleClassPath(serverContext.getDefaultServices(),appName,null);
  jspc.setSystemClassPath(sysClassPath);
  verify(inWebDir,outWebDir);
  configureJspc(jspc,wbd);
  jspc.setOutputDir(outWebDir.getAbsolutePath());
  jspc.setUriroot(inWebDir.getAbsolutePath());
  jspc.setCompile(true);
  logger.info(startMessage);
  try {
    jspc.execute();
  }
 catch (  Exception je) {
    throw new DeploymentException("String_Node_Str" + je,je);
  }
 finally {
    String[] files=outWebDir.list();
    if (files == null || files.length <= 0) {
      if (!outWebDir.delete()) {
        logger.fine("String_Node_Str" + outWebDir);
      }
    }
    logger.info(finishMessage);
  }
}
Program: 29496
Project: 29496
Buggy source:
private static void verify(File inWebDir,File outWebDir) throws DeploymentException {
  if (!FileUtils.safeIsDirectory(inWebDir)) {
    throw new DeploymentException("String_Node_Str" + inWebDir);
  }
  if (!FileUtils.safeIsDirectory(outWebDir)) {
    if (!outWebDir.mkdirs()) {
    }
    if (!FileUtils.safeIsDirectory(outWebDir)) {
      throw new DeploymentException("String_Node_Str" + outWebDir);
    }
  }
}

Fixed version (ground truth):
private static void verify(File inWebDir,File outWebDir) throws DeploymentException {
  if (!FileUtils.safeIsDirectory(inWebDir)) {
    throw new DeploymentException("String_Node_Str" + inWebDir);
  }
  if (!FileUtils.safeIsDirectory(outWebDir)) {
    if (!outWebDir.mkdirs()) {
      logger.fine("String_Node_Str" + outWebDir);
    }
    if (!FileUtils.safeIsDirectory(outWebDir)) {
      throw new DeploymentException("String_Node_Str" + outWebDir);
    }
  }
}
Program: 29497
Project: 29497
Buggy source:
public RestConfigChangeListener(ServiceLocator habitat,Reloader reload,ResourceConfig rc,ServerContext sc){
  this.r=reload;
  this.rc=rc;
  this.sc=sc;
  this.habitat=habitat;
  RestConfig target=ResourceUtil.getRestConfig(habitat);
  if (target != null) {
    ((ObservableBean)ConfigSupport.getImpl(target)).addListener(this);
  }
}

Fixed version (ground truth):
public RestConfigChangeListener(ServiceLocator habitat,Reloader reload,ResourceConfig rc,ServerContext sc){
  this.r=reload;
  this.sc=sc;
  RestConfig target=ResourceUtil.getRestConfig(habitat);
  if (target != null) {
    ((ObservableBean)ConfigSupport.getImpl(target)).addListener(this);
  }
}
Program: 29498
Project: 29498
Buggy source:
public UnprocessedChangeEvents changed(PropertyChangeEvent[] events){
  ClassLoader originalContextClassLoader=Thread.currentThread().getContextClassLoader();
  try {
    ClassLoader apiClassLoader=sc.getCommonClassLoader();
    Thread.currentThread().setContextClassLoader(apiClassLoader);
    r.reload();
  }
  finally {
    Thread.currentThread().setContextClassLoader(originalContextClassLoader);
  }
  return null;
}

Fixed version (ground truth):
@Override public UnprocessedChangeEvents changed(PropertyChangeEvent[] events){
  ClassLoader originalContextClassLoader=Thread.currentThread().getContextClassLoader();
  try {
    ClassLoader apiClassLoader=sc.getCommonClassLoader();
    Thread.currentThread().setContextClassLoader(apiClassLoader);
    r.reload();
  }
  finally {
    Thread.currentThread().setContextClassLoader(originalContextClassLoader);
  }
  return null;
}
Program: 29499
Project: 29499
Buggy source:
/** 
 * Locate and process all <code>RestModelExtension</code> metadata files
 * @param similarClass
 */
private void loadModelExtensionMetadata(Class<?> similarClass){
  try {
    Enumeration<URL> urls=similarClass.getClassLoader().getResources("String_Node_Str");
    while (urls.hasMoreElements()) {
      URL url=urls.nextElement();
      BufferedReader reader=new BufferedReader(new InputStreamReader(url.openStream()));
      while (reader.ready()) {
        final String line=reader.readLine();
        if ((line == null) || line.isEmpty()) {
          continue;
        }
        if (line.charAt(0) != '#') {
          if (!line.contains("String_Node_Str")) {
            Logger.getLogger(CompositeUtil.class.getName()).log(Level.INFO,"String_Node_Str",new String[]{"String_Node_Str",line});
          }
          String[] entry=line.split("String_Node_Str");
          String base=entry[0];
          String ext=entry[1];
          List<String> list=modelExtensions.get(base);
          if (list == null) {
            list=new ArrayList<String>();
            modelExtensions.put(base,list);
          }
          list.add(ext);
        }
      }
    }
  }
 catch (  IOException ex) {
    Logger.getLogger(CompositeUtil.class.getName()).log(Level.SEVERE,null,ex);
  }
}

Fixed version (ground truth):
/** 
 * Locate and process all <code>RestModelExtension</code> metadata files
 * @param similarClass
 */
private void loadModelExtensionMetadata(Class<?> similarClass){
  BufferedReader reader=null;
  try {
    Enumeration<URL> urls=similarClass.getClassLoader().getResources("String_Node_Str");
    while (urls.hasMoreElements()) {
      URL url=urls.nextElement();
      reader=new BufferedReader(new InputStreamReader(url.openStream()));
      while (reader.ready()) {
        final String line=reader.readLine();
        if ((line == null) || line.isEmpty()) {
          continue;
        }
        if (line.charAt(0) != '#') {
          if (!line.contains("String_Node_Str")) {
            Logger.getLogger(CompositeUtil.class.getName()).log(Level.INFO,"String_Node_Str",new String[]{"String_Node_Str",line});
          }
          String[] entry=line.split("String_Node_Str");
          String base=entry[0];
          String ext=entry[1];
          List<String> list=modelExtensions.get(base);
          if (list == null) {
            list=new ArrayList<String>();
            modelExtensions.put(base,list);
          }
          list.add(ext);
        }
      }
    }
  }
 catch (  IOException ex) {
    Logger.getLogger(CompositeUtil.class.getName()).log(Level.SEVERE,null,ex);
  }
 finally {
    if (reader != null) {
      try {
        reader.close();
      }
 catch (      IOException ex) {
        Logger.getLogger(CompositeUtil.class.getName()).log(Level.SEVERE,null,ex);
      }
    }
  }
}
Program: 29500
Project: 29500
Buggy source:
public ParameterMap addToParameterMap(ParameterMap parameters,String basePath,Class<?> configBean,Object source){
  String name;
  Map<String,String> currentValues=Util.getCurrentValues(basePath,Globals.getDefaultHabitat());
  for (  Method cbMethod : configBean.getMethods()) {
    name=cbMethod.getName();
    if (name.startsWith("String_Node_Str")) {
      String getterName="String_Node_Str" + name.substring(3,4).toUpperCase() + name.substring(4);
      try {
        Method getter=source.getClass().getMethod(getterName);
        final String key=ResourceUtil.convertToXMLName(name.substring(3));
        Object value=null;
        try {
          value=getter.invoke(source);
        }
 catch (        Exception ex) {
          Logger.getLogger(CompositeUtil.class.getName()).log(Level.SEVERE,null,ex);
        }
        if (value != null) {
          String currentValue=currentValues.get(basePath + key);
          if ((currentValue == null) || "String_Node_Str".equals(value) || (!currentValue.equals(value))) {
            parameters.add("String_Node_Str",basePath + "String_Node_Str" + key+ "String_Node_Str"+ value);
          }
        }
      }
 catch (      NoSuchMethodException ex) {
        Logger.getLogger(CompositeUtil.class.getName()).log(Level.FINE,null,ex);
      }
    }
  }
  return parameters;
}

Fixed version (ground truth):
public ParameterMap addToParameterMap(ParameterMap parameters,String basePath,Class<?> configBean,Object source){
  String name;
  Map<String,String> currentValues=Util.getCurrentValues(basePath,Globals.getDefaultHabitat());
  for (  Method cbMethod : configBean.getMethods()) {
    name=cbMethod.getName();
    if (name.startsWith("String_Node_Str")) {
      String getterName="String_Node_Str" + name.substring(3,4).toUpperCase(Locale.getDefault()) + name.substring(4);
      try {
        Method getter=source.getClass().getMethod(getterName);
        final String key=ResourceUtil.convertToXMLName(name.substring(3));
        Object value=null;
        try {
          value=getter.invoke(source);
        }
 catch (        Exception ex) {
          Logger.getLogger(CompositeUtil.class.getName()).log(Level.SEVERE,null,ex);
        }
        if (value != null) {
          String currentValue=currentValues.get(basePath + key);
          if ((currentValue == null) || "String_Node_Str".equals(value) || (!currentValue.equals(value))) {
            parameters.add("String_Node_Str",basePath + "String_Node_Str" + key+ "String_Node_Str"+ value);
          }
        }
      }
 catch (      NoSuchMethodException ex) {
        Logger.getLogger(CompositeUtil.class.getName()).log(Level.FINE,null,ex);
      }
    }
  }
  return parameters;
}
Program: 29501
Project: 29501
Buggy source:
private String getPropertyName(String name){
  return name.substring(0,1).toLowerCase() + name.substring(1);
}

Fixed version (ground truth):
private String getPropertyName(String name){
  return name.substring(0,1).toLowerCase(Locale.getDefault()) + name.substring(1);
}
Program: 29503
Project: 29503
Buggy source:
private Class<?> defineClass(Class<?> similarClass,String className,byte[] classBytes) throws Exception {
  byte[] byteContent=classBytes;
  ProtectionDomain pd=similarClass.getProtectionDomain();
  java.lang.reflect.Method jm=null;
  for (  java.lang.reflect.Method jm2 : ClassLoader.class.getDeclaredMethods()) {
    if (jm2.getName().equals("String_Node_Str") && jm2.getParameterTypes().length == 5) {
      jm=jm2;
      break;
    }
  }
  if (jm == null) {
    throw new RuntimeException("String_Node_Str");
  }
  final java.lang.reflect.Method clM=jm;
  try {
    java.security.AccessController.doPrivileged(new java.security.PrivilegedExceptionAction(){
      public java.lang.Object run() throws Exception {
        if (!clM.isAccessible()) {
          clM.setAccessible(true);
        }
        return null;
      }
    }
);
    Logger.getLogger(CompositeUtil.class.getName()).log(Level.FINE,"String_Node_Str",className);
    final ClassLoader classLoader=similarClass.getClassLoader();
    try {
      Class<?> newClass=(Class<?>)clM.invoke(classLoader,className,byteContent,0,byteContent.length,pd);
    }
 catch (    Exception e) {
    }
    try {
      return classLoader.loadClass(className);
    }
 catch (    ClassNotFoundException cnfEx) {
      throw new RuntimeException(cnfEx);
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
private Class<?> defineClass(Class<?> similarClass,String className,byte[] classBytes) throws Exception {
  byte[] byteContent=classBytes;
  ProtectionDomain pd=similarClass.getProtectionDomain();
  java.lang.reflect.Method jm=null;
  for (  java.lang.reflect.Method jm2 : ClassLoader.class.getDeclaredMethods()) {
    if (jm2.getName().equals("String_Node_Str") && jm2.getParameterTypes().length == 5) {
      jm=jm2;
      break;
    }
  }
  if (jm == null) {
    throw new RuntimeException("String_Node_Str");
  }
  final java.lang.reflect.Method clM=jm;
  try {
    java.security.AccessController.doPrivileged(new java.security.PrivilegedExceptionAction(){
      @Override public java.lang.Object run() throws Exception {
        if (!clM.isAccessible()) {
          clM.setAccessible(true);
        }
        return null;
      }
    }
);
    Logger.getLogger(CompositeUtil.class.getName()).log(Level.FINE,"String_Node_Str",className);
    final ClassLoader classLoader=similarClass.getClassLoader();
    try {
      clM.invoke(classLoader,className,byteContent,0,byteContent.length,pd);
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
    try {
      return classLoader.loadClass(className);
    }
 catch (    ClassNotFoundException cnfEx) {
      throw new RuntimeException(cnfEx);
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}
Program: 29504
Project: 29504
Buggy source:
/** 
 * This method will analyze the getters of the given class to determine its properties.  Currently, for simplicity's sake, only getters are checked.
 * @param clazz
 * @return
 * @throws JSONException
 */
private JSONObject getProperties(Class<?> clazz) throws JSONException {
  Map<String,ParamMetadata> map=new HashMap<String,ParamMetadata>();
  JSONObject props=new JSONObject();
  if (clazz.isInterface()) {
    Object model=CompositeUtil.instance().getModel(clazz);
    clazz=model.getClass();
  }
  for (  Class<?> ifaces : clazz.getInterfaces()) {
    for (    Method m : ifaces.getDeclaredMethods()) {
      String methodName=m.getName();
      if (methodName.startsWith("String_Node_Str")) {
        String propertyName=methodName.substring(3,4).toLowerCase() + methodName.substring(4);
        map.put(propertyName,new ParamMetadata(context,m.getReturnType(),propertyName,m.getAnnotations()));
      }
    }
  }
  for (  Map.Entry<String,ParamMetadata> entry : map.entrySet()) {
    props.put(entry.getKey(),entry.getValue().toJson());
  }
  return props;
}

Fixed version (ground truth):
/** 
 * This method will analyze the getters of the given class to determine its properties.  Currently, for simplicity's sake, only getters are checked.
 * @param clazz
 * @return
 * @throws JSONException
 */
private JSONObject getProperties(Class<?> clazz) throws JSONException {
  Map<String,ParamMetadata> map=new HashMap<String,ParamMetadata>();
  JSONObject props=new JSONObject();
  if (clazz.isInterface()) {
    Object model=CompositeUtil.instance().getModel(clazz);
    clazz=model.getClass();
  }
  for (  Class<?> ifaces : clazz.getInterfaces()) {
    for (    Method m : ifaces.getDeclaredMethods()) {
      String methodName=m.getName();
      if (methodName.startsWith("String_Node_Str")) {
        String propertyName=methodName.substring(3,4).toLowerCase(Locale.getDefault()) + methodName.substring(4);
        map.put(propertyName,new ParamMetadata(context,m.getReturnType(),propertyName,m.getAnnotations()));
      }
    }
  }
  for (  Map.Entry<String,ParamMetadata> entry : map.entrySet()) {
    props.put(entry.getKey(),entry.getValue().toJson());
  }
  return props;
}
Program: 29505
Project: 29505
Buggy source:
/** 
 * @param className Name of class to be generated
 * @param generationDir Absolute location where it needs to be generated
 * @param baseClassName
 * @param resourcePath
 */
public TextClassWriter(ServiceLocator habitat,File generationDir,String className,String baseClassName,String resourcePath) throws IOException {
  this.habitat=habitat;
  File file=new File(generationDir,className + "String_Node_Str");
  boolean success=file.createNewFile();
  if (!success) {
    file=new File(generationDir,className + Long.toString(System.currentTimeMillis()) + "String_Node_Str");
    file.createNewFile();
  }
  FileWriter fstream=new FileWriter(file);
  writer=new BufferedWriter(fstream);
  writeCopyRightHeader();
  writePackageHeader();
  writeImportStatements();
  if (resourcePath != null) {
    writer.write("String_Node_Str" + resourcePath + "String_Node_Str");
  }
  writer.write("String_Node_Str" + className + "String_Node_Str"+ baseClassName+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param className Name of class to be generated
 * @param generationDir Absolute location where it needs to be generated
 * @param baseClassName
 * @param resourcePath
 */
public TextClassWriter(ServiceLocator habitat,File generationDir,String className,String baseClassName,String resourcePath) throws IOException {
  this.habitat=habitat;
  File file=new File(generationDir,className + "String_Node_Str");
  boolean success=file.createNewFile();
  if (!success) {
    file=new File(generationDir,className + Long.toString(System.currentTimeMillis()) + "String_Node_Str");
    if (!file.createNewFile()) {
      throw new IOException("String_Node_Str" + file.getAbsolutePath());
    }
  }
  FileWriter fstream=new FileWriter(file);
  writer=new BufferedWriter(fstream);
  writeCopyRightHeader();
  writePackageHeader();
  writeImportStatements();
  if (resourcePath != null) {
    writer.write("String_Node_Str" + resourcePath + "String_Node_Str");
  }
  writer.write("String_Node_Str" + className + "String_Node_Str"+ baseClassName+ "String_Node_Str");
}
Program: 29506
Project: 29506
Buggy source:
private void createJar(String fileName,String ext){
  JarOutputStream target=null;
  try {
    File jarDir=Util.createTempDirectory();
    File jarFile=new File(jarDir,fileName);
    jarFile.createNewFile();
    jarFile.deleteOnExit();
    target=new JarOutputStream(new FileOutputStream(jarFile));
    addFiles(baseDirectory,target,ext);
    target.close();
    artifacts.put(jarFile.getName(),jarFile.toURI());
  }
 catch (  Exception ex) {
    Logger.getLogger(JavaClientGenerator.class.getName()).log(Level.SEVERE,null,ex);
  }
 finally {
    try {
      if (target != null) {
        target.close();
      }
    }
 catch (    IOException ex) {
      Logger.getLogger(JavaClientGenerator.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}

Fixed version (ground truth):
private void createJar(String fileName,String ext){
  JarOutputStream target=null;
  try {
    File jarDir=Util.createTempDirectory();
    File jarFile=new File(jarDir,fileName);
    if (!jarFile.createNewFile()) {
      throw new RuntimeException("String_Node_Str");
    }
    jarFile.deleteOnExit();
    target=new JarOutputStream(new FileOutputStream(jarFile));
    addFiles(baseDirectory,target,ext);
    target.close();
    artifacts.put(jarFile.getName(),jarFile.toURI());
  }
 catch (  Exception ex) {
    Logger.getLogger(JavaClientGenerator.class.getName()).log(Level.SEVERE,null,ex);
  }
 finally {
    try {
      if (target != null) {
        target.close();
      }
    }
 catch (    IOException ex) {
      Logger.getLogger(JavaClientGenerator.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}
Program: 29507
Project: 29507
Buggy source:
@Override public void done(){
  File classFile=new File(packageDir,className.toLowerCase(Locale.getDefault()) + "String_Node_Str");
  BufferedWriter writer=null;
  try {
    try {
      classFile.createNewFile();
      classFile.deleteOnExit();
      writer=new BufferedWriter(new FileWriter(classFile));
      writer.append(source.toString());
    }
 catch (    IOException ioe) {
      throw new RuntimeException(ioe);
    }
  }
  finally {
    if (writer != null) {
      try {
        writer.close();
      }
 catch (      IOException ex) {
      }
    }
  }
}

Fixed version (ground truth):
@Override public void done(){
  File classFile=new File(packageDir,className.toLowerCase(Locale.getDefault()) + "String_Node_Str");
  BufferedWriter writer=null;
  try {
    try {
      if (!classFile.createNewFile()) {
        throw new RuntimeException("String_Node_Str");
      }
      classFile.deleteOnExit();
      writer=new BufferedWriter(new FileWriter(classFile));
      writer.append(source.toString());
    }
 catch (    IOException ioe) {
      throw new RuntimeException(ioe);
    }
  }
  finally {
    if (writer != null) {
      try {
        writer.close();
      }
 catch (      IOException ex) {
      }
    }
  }
}
Program: 29509
Project: 29509
Buggy source:
protected JSONObject getJsonForRestModel(RestModel model){
  JSONObject result=new JSONObject();
  for (  Method m : model.getClass().getDeclaredMethods()) {
    if (m.getName().startsWith("String_Node_Str")) {
      String propName=m.getName().substring(3);
      propName=propName.substring(0,1).toLowerCase() + propName.substring(1);
      try {
        result.put(propName,getJsonObject(m.invoke(model)));
      }
 catch (      Exception e) {
      }
    }
  }
  return result;
}

Fixed version (ground truth):
protected JSONObject getJsonForRestModel(RestModel model){
  JSONObject result=new JSONObject();
  for (  Method m : model.getClass().getDeclaredMethods()) {
    if (m.getName().startsWith("String_Node_Str")) {
      String propName=m.getName().substring(3);
      propName=propName.substring(0,1).toLowerCase(Locale.getDefault()) + propName.substring(1);
      try {
        result.put(propName,getJsonObject(m.invoke(model)));
      }
 catch (      Exception e) {
      }
    }
  }
  return result;
}
Program: 29510
Project: 29510
Buggy source:
private CommandModel getCommandModel(CommandName commandName) throws WebApplicationException {
  CommandRunner cr=getCommandRunner();
  CommandModel model=cr.getModel(commandName.getScope(),commandName.getName(),logger);
  if (model == null) {
    RestActionReporter ar=new RestActionReporter();
    AdminCommand cmd=cr.getCommand(commandName.getScope(),commandName.getName(),ar,logger);
    if (ar.hasFailures()) {
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).type(MediaType.TEXT_PLAIN).entity(ar.getCombinedMessage()).build());
    }
 else {
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build());
    }
  }
  return model;
}

Fixed version (ground truth):
private CommandModel getCommandModel(CommandName commandName) throws WebApplicationException {
  CommandRunner cr=getCommandRunner();
  CommandModel model=cr.getModel(commandName.getScope(),commandName.getName(),logger);
  if (model == null) {
    RestActionReporter ar=new RestActionReporter();
    if (ar.hasFailures()) {
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).type(MediaType.TEXT_PLAIN).entity(ar.getCombinedMessage()).build());
    }
 else {
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build());
    }
  }
  return model;
}
Program: 29511
Project: 29511
Buggy source:
@POST @Path("String_Node_Str") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(EventChannel.SERVER_SENT_EVENTS) public Response execCommandMultInSseOut(@PathParam("String_Node_Str") String command,@HeaderParam(RemoteAdminCommand.COMMAND_MODEL_MATCH_HEADER) String modelETag,@CookieParam(SESSION_COOKIE_NAME) Cookie jSessionId,FormDataMultiPart mp){
  CommandName commandName=new CommandName(normalizeCommandName(command));
  if (logger.isLoggable(Level.FINEST)) {
    logger.log(Level.FINEST,"String_Node_Str",commandName);
  }
  ParameterMap data=new ParameterMap();
  Payload.Inbound inbound=RestPayloadImpl.Inbound.parseFromFormDataMultipart(mp,data);
  return executeSseCommand(commandName,null,data,modelETag,jSessionId);
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(EventChannel.SERVER_SENT_EVENTS) public Response execCommandMultInSseOut(@PathParam("String_Node_Str") String command,@HeaderParam(RemoteAdminCommand.COMMAND_MODEL_MATCH_HEADER) String modelETag,@CookieParam(SESSION_COOKIE_NAME) Cookie jSessionId,FormDataMultiPart mp){
  CommandName commandName=new CommandName(normalizeCommandName(command));
  if (logger.isLoggable(Level.FINEST)) {
    logger.log(Level.FINEST,"String_Node_Str",commandName);
  }
  ParameterMap data=new ParameterMap();
  return executeSseCommand(commandName,null,data,modelETag,jSessionId);
}
Program: 29512
Project: 29512
Buggy source:
public static File createTempDirectory(){
  File baseTempDir=new File(System.getProperty(JAVA_IO_TMPDIR));
  File tempDir=new File(baseTempDir,Long.toString(System.currentTimeMillis()));
  tempDir.mkdirs();
  tempDir.deleteOnExit();
  return tempDir;
}

Fixed version (ground truth):
public static File createTempDirectory(){
  File baseTempDir=new File(System.getProperty(JAVA_IO_TMPDIR));
  File tempDir=new File(baseTempDir,Long.toString(System.currentTimeMillis()));
  if (!tempDir.mkdirs()) {
    throw new RuntimeException("String_Node_Str");
  }
  tempDir.deleteOnExit();
  return tempDir;
}
Program: 29514
Project: 29514
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=Option[].class)}) public static void convertListToOptionArray(HandlerContext handlerCtx){
  List<String> list=(List)handlerCtx.getInputValue("String_Node_Str");
  if (list == null || list.isEmpty()) {
    handlerCtx.setOutputValue("String_Node_Str",new Option[0]);
    return;
  }
  handlerCtx.setOutputValue("String_Node_Str",SunOptionUtil.getOptionsArray(list.toArray(new String[0])));
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true)},output={@HandlerOutput(name="String_Node_Str",type=Option[].class)}) public static void convertListToOptionArray(HandlerContext handlerCtx){
  List<String> list=(List)handlerCtx.getInputValue("String_Node_Str");
  if (list == null || list.isEmpty()) {
    handlerCtx.setOutputValue("String_Node_Str",new Option[0]);
    return;
  }
  handlerCtx.setOutputValue("String_Node_Str",SunOptionUtil.getOptionsArray(list.toArray(new String[list.size()])));
}
Program: 29516
Project: 29516
Buggy source:
S1ASThreadPoolManager(){
  try {
    _iiopUtils=Globals.getDefaultHabitat().getByType(IIOPUtils.class);
    Collection<org.glassfish.grizzly.config.dom.ThreadPool> tpCol=_iiopUtils.getAllThreadPools();
    org.glassfish.grizzly.config.dom.ThreadPool[] allThreadPools=tpCol.toArray(new org.glassfish.grizzly.config.dom.ThreadPool[tpCol.size()]);
    for (int i=0; i < allThreadPools.length; i++) {
      createThreadPools(allThreadPools[i],i);
    }
    defaultID=(String)indexToIdTable.get(new Integer(0));
  }
 catch (  NullPointerException npe) {
    _logger.log(Level.FINE,"String_Node_Str");
  }
}

Fixed version (ground truth):
S1ASThreadPoolManager(){
  try {
    _iiopUtils=Globals.getDefaultHabitat().getByType(IIOPUtils.class);
    Collection<org.glassfish.grizzly.config.dom.ThreadPool> tpCol=_iiopUtils.getAllThreadPools();
    org.glassfish.grizzly.config.dom.ThreadPool[] allThreadPools=tpCol.toArray(new org.glassfish.grizzly.config.dom.ThreadPool[tpCol.size()]);
    for (int i=0; i < allThreadPools.length; i++) {
      createThreadPools(allThreadPools[i],i);
    }
    defaultID=(String)indexToIdTable.get(Integer.valueOf(0));
  }
 catch (  NullPointerException npe) {
    _logger.log(Level.FINE,"String_Node_Str");
  }
}
Program: 29517
Project: 29517
Buggy source:
private void copyLogFilesForLocalhost(String sourceDir,String targetDir,ActionReport report,String instanceName) throws IOException {
  File logsDir=new File(sourceDir);
  File allLogFileNames[]=logsDir.listFiles();
  if (allLogFileNames == null) {
    throw new IOException("String_Node_Str");
  }
  for (  File logFile : allLogFileNames) {
    if (logFile.isFile()) {
      File toFile=new File(targetDir,logFile.getName());
      FileInputStream from=null;
      FileOutputStream to=null;
      try {
        from=new FileInputStream(logFile);
        to=new FileOutputStream(toFile);
        byte[] buffer=new byte[4096];
        int bytesRead;
        while ((bytesRead=from.read(buffer)) != -1)         to.write(buffer,0,bytesRead);
      }
 catch (      Exception ex) {
        final String errorMsg=localStrings.getLocalString("String_Node_Str","String_Node_Str",instanceName);
        logger.log(Level.SEVERE,errorMsg,ex);
        report.setMessage(errorMsg);
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        return;
      }
 finally {
        from.close();
        to.close();
      }
      if (!toFile.exists()) {
        final String errorMsg=localStrings.getLocalString("String_Node_Str","String_Node_Str",instanceName);
        report.setMessage(errorMsg);
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        return;
      }
    }
  }
}

Fixed version (ground truth):
private void copyLogFilesForLocalhost(String sourceDir,String targetDir,ActionReport report,String instanceName) throws IOException {
  File logsDir=new File(sourceDir);
  File allLogFileNames[]=logsDir.listFiles();
  if (allLogFileNames == null) {
    throw new IOException("String_Node_Str");
  }
  for (  File logFile : allLogFileNames) {
    if (logFile.isFile()) {
      File toFile=new File(targetDir,logFile.getName());
      FileInputStream from=null;
      FileOutputStream to=null;
      try {
        from=new FileInputStream(logFile);
        to=new FileOutputStream(toFile);
        byte[] buffer=new byte[4096];
        int bytesRead;
        while ((bytesRead=from.read(buffer)) != -1)         to.write(buffer,0,bytesRead);
      }
 catch (      Exception ex) {
        final String errorMsg=localStrings.getLocalString("String_Node_Str","String_Node_Str",instanceName);
        logger.log(Level.SEVERE,errorMsg,ex);
        report.setMessage(errorMsg);
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        return;
      }
 finally {
        if (from != null)         try {
          from.close();
        }
 catch (        Exception ex) {
        }
        if (to != null)         try {
          to.close();
        }
 catch (        Exception ex) {
        }
      }
      if (!toFile.exists()) {
        final String errorMsg=localStrings.getLocalString("String_Node_Str","String_Node_Str",instanceName);
        report.setMessage(errorMsg);
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        return;
      }
    }
  }
}
Program: 29519
Project: 29519
Buggy source:
/** 
 * <p> This method creates a HashMap to represent the JSON Object.</p>
 */
private static Map<String,Object> readObject(JsonChars json){
  json.pushContextEnd('}');
  Map<String,Object> map=new HashMap<String,Object>(10);
  Object tmp=null;
  Object key=null;
  Object value=null;
  while (!json.isAtContextEnd()) {
    key=replaceSpecial(jsonToJava(json));
    if (json.isAtContextEnd()) {
      break;
    }
    if (!(key instanceof String)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (jsonToJava(json) != COLON) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    value=replaceSpecial(jsonToJava(json));
    tmp=jsonToJava(json);
    if ((tmp != COMMA) && !json.isAtContextEnd()) {
      throw new IllegalArgumentException("String_Node_Str" + tmp + "String_Node_Str"+ json.getContext(30)+ "String_Node_Str");
    }
    map.put((String)key,value);
  }
  json.popContextEnd();
  return map;
}

Fixed version (ground truth):
/** 
 * <p> This method creates a HashMap to represent the JSON Object.</p>
 */
private static Map<String,Object> readObject(JsonChars json){
  json.pushContextEnd('}');
  Map<String,Object> map=new HashMap<String,Object>(10);
  Object tmp=null;
  Object key=null;
  Object value=null;
  while (!json.isAtContextEnd()) {
    key=replaceSpecial(jsonToJava(json));
    if (json.isAtContextEnd()) {
      break;
    }
    if (!(key instanceof String)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (!(jsonToJava(json).equals(COLON))) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    value=replaceSpecial(jsonToJava(json));
    tmp=jsonToJava(json);
    if ((!(tmp.equals(COMMA))) && !json.isAtContextEnd()) {
      throw new IllegalArgumentException("String_Node_Str" + tmp + "String_Node_Str"+ json.getContext(30)+ "String_Node_Str");
    }
    map.put((String)key,value);
  }
  json.popContextEnd();
  return map;
}
Program: 29520
Project: 29520
Buggy source:
/** 
 * <p> This function will process a JSON string and convert it into an array.</p>
 */
private static List<Object> readArray(JsonChars json){
  json.pushContextEnd(']');
  List<Object> list=new ArrayList<Object>(10);
  Object tmp=null;
  Object value=null;
  while (!json.isAtContextEnd()) {
    value=replaceSpecial(jsonToJava(json));
    if (!json.isAtContextEnd()) {
      tmp=jsonToJava(json);
      if ((tmp != COMMA) && !json.isAtContextEnd()) {
        throw new IllegalArgumentException("String_Node_Str" + tmp + "String_Node_Str");
      }
    }
    if ((value == null) || (value != ABORT_PROCESSING)) {
      list.add(value);
    }
  }
  json.popContextEnd();
  return list;
}

Fixed version (ground truth):
/** 
 * <p> This function will process a JSON string and convert it into an array.</p>
 */
private static List<Object> readArray(JsonChars json){
  json.pushContextEnd(']');
  List<Object> list=new ArrayList<Object>(10);
  Object tmp=null;
  Object value=null;
  while (!json.isAtContextEnd()) {
    value=replaceSpecial(jsonToJava(json));
    if (!json.isAtContextEnd()) {
      tmp=jsonToJava(json);
      if ((!(tmp.equals(COMMA))) && !json.isAtContextEnd()) {
        throw new IllegalArgumentException("String_Node_Str" + tmp + "String_Node_Str");
      }
    }
    if ((value == null) || (!(value.equals(ABORT_PROCESSING)))) {
      list.add(value);
    }
  }
  json.popContextEnd();
  return list;
}