nus-yam/ex-repair huggingface dataset:
Program: 44292
Project: 44292
Buggy source:
private void parseTagLib(File dir,String uri,Library lib) throws IOException {
  getLog().info("String_Node_Str" + dir);
  List markerFile=FileUtils.readLines(new File(dir,"String_Node_Str"));
  if (markerFile.size() == 0)   markerFile.add(uri);
  lib.name(markerFile.get(0).toString());
  lib.prefix(uri.substring(uri.lastIndexOf('/') + 1)).uri(uri);
  lib.doc()._pcdata(join(markerFile.subList(1,markerFile.size())));
  File[] tagFiles=dir.listFiles(new FileFilter(){
    public boolean accept(    File f){
      return f.getName().endsWith("String_Node_Str");
    }
  }
);
  if (tagFiles == null)   return;
  for (  File tagFile : tagFiles)   parseTagFile(tagFile,lib.tag());
}

Fixed version (ground truth):
private void parseTagLib(File dir,String uri,Library lib) throws IOException {
  getLog().info("String_Node_Str" + dir);
  List markerFile=FileUtils.readLines(new File(dir,"String_Node_Str"));
  if (markerFile.size() == 0)   markerFile.add(uri);
  lib.name(markerFile.get(0).toString());
  lib.prefix(uri.substring(uri.lastIndexOf('/') + 1)).uri(uri);
  lib.doc()._pcdata(join(markerFile));
  File[] tagFiles=dir.listFiles(new FileFilter(){
    public boolean accept(    File f){
      return f.getName().endsWith("String_Node_Str");
    }
  }
);
  if (tagFiles == null)   return;
  for (  File tagFile : tagFiles)   parseTagFile(tagFile,lib.tag());
}
Program: 44293
Project: 44293
Buggy source:
public void execute() throws MojoExecutionException, MojoFailureException {
  writeTaglibXml();
  JellydocMojo jellydoc=new JellydocMojo();
  jellydoc.factory=factory;
  jellydoc.helper=helper;
  jellydoc.localRepository=localRepository;
  jellydoc.project=project;
  jellydoc.resolver=resolver;
  jellydoc.generateSchema();
}

Fixed version (ground truth):
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  TaglibDocMojo.this.execute();
}
Program: 44295
Project: 44295
Buggy source:
/** 
 * Find property references of the form "${%xxx(...)}" from   {@link #buf}and list up property names.
 */
private void findExpressions() throws SAXParseException {
  int idx=0;
  do {
    idx=buf.indexOf("String_Node_Str",idx);
    if (idx < 0)     break;
    int end=buf.indexOf("String_Node_Str",idx);
    if (end == -1)     throw new SAXParseException("String_Node_Str",locator);
    String exp=buf.substring(idx + 3,end);
    getLog().debug("String_Node_Str" + exp);
    int op=exp.indexOf('(');
    if (op >= 0)     exp=exp.substring(0,op);
    properties.add(exp);
  }
 while (true);
  buf.setLength(0);
}

Fixed version (ground truth):
/** 
 * Find property references of the form "${%xxx(...)}" from   {@link #buf}and list up property names.
 */
private void findExpressions() throws SAXParseException {
  int idx=-1;
  do {
    idx=buf.indexOf("String_Node_Str",idx + 1);
    if (idx < 0)     break;
    int end=buf.indexOf("String_Node_Str",idx);
    if (end == -1)     throw new SAXParseException("String_Node_Str",locator);
    String exp=buf.substring(idx + 3,end);
    getLog().debug("String_Node_Str" + exp);
    int op=exp.indexOf('(');
    if (op >= 0)     exp=exp.substring(0,op);
    properties.add(exp);
  }
 while (true);
  buf.setLength(0);
}
Program: 44297
Project: 44297
Buggy source:
public void visitFieldDeclaration(FieldDeclaration f){
  javadocs.put(f.getSimpleName(),f.getDocComment());
}

Fixed version (ground truth):
public void visitFieldDeclaration(FieldDeclaration f){
  String javadoc=f.getDocComment();
  if (javadoc != null)   javadocs.put(f.getSimpleName(),javadoc);
}
Program: 44298
Project: 44298
Buggy source:
public void visitMethodDeclaration(MethodDeclaration m){
  javadocs.put(m.getSimpleName() + "String_Node_Str",m.getDocComment());
}

Fixed version (ground truth):
public void visitMethodDeclaration(MethodDeclaration m){
  String javadoc=m.getDocComment();
  if (javadoc != null)   javadocs.put(m.getSimpleName() + "String_Node_Str",javadoc);
}
Program: 44299
Project: 44299
Buggy source:
public void execute() throws MojoExecutionException, MojoFailureException {
  try {
    SAXParserFactory spf=SAXParserFactory.newInstance();
    spf.setNamespaceAware(true);
    parser=spf.newSAXParser();
  }
 catch (  SAXException e) {
    throw new Error(e);
  }
catch (  ParserConfigurationException e) {
    throw new Error(e);
  }
  for (  String path : (List<String>)project.getCompileSourceRoots()) {
    File dir=new File(path);
    processDirectory(dir);
  }
}

Fixed version (ground truth):
public void execute() throws MojoExecutionException, MojoFailureException {
  try {
    SAXParserFactory spf=SAXParserFactory.newInstance();
    spf.setNamespaceAware(true);
    parser=spf.newSAXParser();
  }
 catch (  SAXException e) {
    throw new Error(e);
  }
catch (  ParserConfigurationException e) {
    throw new Error(e);
  }
  for (  Resource res : (List<Resource>)project.getResources()) {
    File dir=new File(res.getDirectory());
    processDirectory(dir);
  }
}
Program: 44301
Project: 44301
Buggy source:
/** 
 * Find property references of the form "${#xxx(...)}" from   {@link #buf}and list up property names.
 */
private void findExpressions() throws SAXParseException {
  int idx=0;
  do {
    idx=buf.indexOf("String_Node_Str",idx);
    if (idx < 0)     break;
    int end=buf.indexOf("String_Node_Str",idx);
    if (end == -1)     throw new SAXParseException("String_Node_Str",locator);
    String exp=buf.substring(idx + 3,end);
    getLog().debug("String_Node_Str" + exp);
    int op=exp.indexOf('(');
    if (op >= 0)     exp=exp.substring(0,op);
    properties.add(exp);
  }
 while (true);
  buf.setLength(0);
}

Fixed version (ground truth):
/** 
 * Find property references of the form "${%xxx(...)}" from   {@link #buf}and list up property names.
 */
private void findExpressions() throws SAXParseException {
  int idx=0;
  do {
    idx=buf.indexOf("String_Node_Str",idx);
    if (idx < 0)     break;
    int end=buf.indexOf("String_Node_Str",idx);
    if (end == -1)     throw new SAXParseException("String_Node_Str",locator);
    String exp=buf.substring(idx + 3,end);
    getLog().debug("String_Node_Str" + exp);
    int op=exp.indexOf('(');
    if (op >= 0)     exp=exp.substring(0,op);
    properties.add(exp);
  }
 while (true);
  buf.setLength(0);
}
Program: 44303
Project: 44303
Buggy source:
public static String stripMetadata(final String contents){
  final String[] lines=splitPreserveAllTokens(contents,"String_Node_Str");
  final List<String> code=new ArrayList<String>();
  boolean started=false;
  boolean finished=false;
  for (  final String line : lines) {
    if (strip(line).startsWith("String_Node_Str")) {
      started=true;
      continue;
    }
    if (strip(line).endsWith("String_Node_Str")) {
      finished=true;
      continue;
    }
    if (started && !finished)     continue;
    code.add(line);
  }
  return join(code.toArray(new String[0]),"String_Node_Str");
}

Fixed version (ground truth):
public static String stripMetadata(final String contents){
  final String[] lines=splitPreserveAllTokens(contents,"String_Node_Str");
  final List<String> code=new ArrayList<String>();
  boolean started=false;
  boolean finished=false;
  for (  final String line : lines) {
    if (!finished && strip(line).startsWith("String_Node_Str")) {
      started=true;
      continue;
    }
    if (!finished && strip(line).endsWith("String_Node_Str")) {
      finished=true;
      continue;
    }
    if (started && !finished)     continue;
    code.add(line);
  }
  return join(code.toArray(new String[0]),"String_Node_Str");
}
Program: 44304
Project: 44304
Buggy source:
private void flatView(final List<Object> elements){
  final List<VarDescriptor> set=new TreeList<VarDescriptor>();
  for (  final DOMDescriptor dom : doms)   for (  final VarDescriptor child : (VarDescriptor[])getChildren(dom))   set.add(child);
  elements.addAll(set);
  elements.addAll(includes);
  for (  final BundleDescriptor bundle : bundles)   for (  final Object child : getChildren(bundle))   elements.add(child);
}

Fixed version (ground truth):
private void flatView(final List<Object> elements){
  final List<VarDescriptor> set=new TreeList<VarDescriptor>();
  for (  final DOMDescriptor dom : doms)   for (  final VarDescriptor child : (VarDescriptor[])getChildren(dom))   set.add(child);
  elements.addAll(set);
  elements.addAll(includes);
  final Set<Object> exportedPackages=SetUtil.treeSet();
  for (  final BundleDescriptor bundle : bundles)   for (  final Object child : getChildren(bundle))   exportedPackages.add(child);
  elements.addAll(exportedPackages);
}
Program: 44306
Project: 44306
Buggy source:
public static String stripMetadata(final String contents){
  final String[] lines=split(contents,"String_Node_Str");
  final List<String> code=new ArrayList<String>();
  boolean started=false;
  boolean finished=false;
  for (  final String line : lines) {
    if (strip(line).startsWith("String_Node_Str")) {
      started=true;
      continue;
    }
    if (strip(line).endsWith("String_Node_Str")) {
      finished=true;
      continue;
    }
    if (started && !finished)     continue;
    code.add(line);
  }
  return join(code.toArray(new String[0]),"String_Node_Str");
}

Fixed version (ground truth):
public static String stripMetadata(final String contents){
  final String[] lines=splitPreserveAllTokens(contents,"String_Node_Str");
  final List<String> code=new ArrayList<String>();
  boolean started=false;
  boolean finished=false;
  for (  final String line : lines) {
    if (strip(line).startsWith("String_Node_Str")) {
      started=true;
      continue;
    }
    if (strip(line).endsWith("String_Node_Str")) {
      finished=true;
      continue;
    }
    if (started && !finished)     continue;
    code.add(line);
  }
  return join(code.toArray(new String[0]),"String_Node_Str");
}
Program: 44307
Project: 44307
Buggy source:
/** 
 * set the properties
 * @param bean
 * @param properties
 */
protected void setBeanProperties(Object bean,Map<?,?> properties){
  if (bean instanceof Control) {
    Control control=(Control)bean;
    Object size=properties.remove("String_Node_Str");
    if (size != null) {
      setSize(control,size);
    }
    Object colorValue=properties.remove("String_Node_Str");
    if (colorValue != null) {
      Color background=getColor(control,colorValue);
      control.setBackground(background);
    }
    colorValue=properties.remove("String_Node_Str");
    if (colorValue != null) {
      Color foreground=getColor(control,colorValue);
      control.setForeground(foreground);
    }
  }
  for (Iterator<?> iter=properties.entrySet().iterator(); iter.hasNext(); ) {
    Map.Entry<?,?> entry=(Map.Entry<?,?>)iter.next();
    String property=entry.getKey().toString();
    Object value=entry.getValue();
    Field field=null;
    try {
      field=bean.getClass().getDeclaredField(property);
      if (value instanceof Boolean) {
        field.setBoolean(bean,((Boolean)value).booleanValue());
      }
 else       if (value instanceof Integer) {
        field.setInt(bean,((Integer)value).intValue());
      }
 else       if (value instanceof Double) {
        field.setDouble(bean,((Double)value).doubleValue());
      }
 else       if (value instanceof Float) {
        field.setFloat(bean,((Float)value).floatValue());
      }
 else {
        InvokerHelper.setProperty(bean,property,value);
      }
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
    if (field == null) {
      InvokerHelper.setProperty(bean,property,value);
    }
  }
}

Fixed version (ground truth):
/** 
 * set the properties
 * @param bean
 * @param properties
 */
protected void setBeanProperties(Object bean,Map<?,?> properties){
  if (bean instanceof Control) {
    Control control=(Control)bean;
    Object size=properties.remove("String_Node_Str");
    if (size != null) {
      setSize(control,size);
    }
    Object colorValue=properties.remove("String_Node_Str");
    if (colorValue != null) {
      Color background=getColor(control,colorValue);
      control.setBackground(background);
    }
    colorValue=properties.remove("String_Node_Str");
    if (colorValue != null) {
      Color foreground=getColor(control,colorValue);
      control.setForeground(foreground);
    }
  }
  for (final Iterator<?> iter=properties.entrySet().iterator(); iter.hasNext(); ) {
    final Map.Entry<?,?> entry=(Map.Entry<?,?>)iter.next();
    final String property=entry.getKey().toString();
    final Object value=entry.getValue();
    try {
      InvokerHelper.setProperty(bean,property,value);
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
  }
}
Program: 44308
Project: 44308
Buggy source:
/** 
 * Put the details of the status of the error onto the stream.
 * @param buildingStatus
 * @param buffer
 * @param nesting
 */
private void populateCopyBuffer(IStatus buildingStatus,StringBuffer buffer,int nesting){
  if (!buildingStatus.matches(displayMask)) {
    return;
  }
  for (int i=0; i < nesting; i++) {
    buffer.append(NESTING_INDENT);
  }
  buffer.append(buildingStatus.getMessage());
  buffer.append("String_Node_Str");
  Throwable t=buildingStatus.getException();
  if (t instanceof CoreException) {
    CoreException ce=(CoreException)t;
    populateCopyBuffer(ce.getStatus(),buffer,nesting + 1);
  }
  IStatus[] children=buildingStatus.getChildren();
  for (int i=0; i < children.length; i++) {
    populateCopyBuffer(children[i],buffer,nesting + 1);
  }
}

Fixed version (ground truth):
/** 
 * Put the details of the status of the error onto the stream.
 * @param buildingStatus
 * @param buffer
 * @param nesting
 */
private void populateCopyBuffer(IStatus buildingStatus,StringBuffer buffer,int nesting){
  if (!buildingStatus.matches(displayMask)) {
    return;
  }
  for (int i=0; i < nesting; i++) {
    buffer.append(NESTING_INDENT);
  }
  buffer.append(buildingStatus.getMessage());
  buffer.append("String_Node_Str");
  if (buildingStatus.getException() != null) {
    buffer.append(getFullStackTrace(buildingStatus.getException()));
    buffer.append("String_Node_Str");
  }
  Throwable t=buildingStatus.getException();
  if (t instanceof CoreException) {
    CoreException ce=(CoreException)t;
    populateCopyBuffer(ce.getStatus(),buffer,nesting + 1);
  }
  IStatus[] children=buildingStatus.getChildren();
  for (int i=0; i < children.length; i++) {
    populateCopyBuffer(children[i],buffer,nesting + 1);
  }
}
Program: 44309
Project: 44309
Buggy source:
@Override public final synchronized void notifySuccess(final T object){
  Validate.notNull(object,"String_Node_Str");
  Validate.isTrue(getRemainingNotificationsCount() == 0,"String_Node_Str");
  succededObjects.add(object);
  onSuccessNotification(object);
  notificationHandler();
}

Fixed version (ground truth):
@Override public final synchronized void notifySuccess(final T object){
  Validate.notNull(object,"String_Node_Str");
  if (getRemainingNotificationsCount() == 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  succededObjects.add(object);
  onSuccessNotification(object);
  notificationHandler();
}
Program: 44310
Project: 44310
Buggy source:
@Override public final synchronized void notifyFailure(final F failedTask,final Throwable t){
  Validate.notNull(t,"String_Node_Str");
  Validate.isTrue(getRemainingNotificationsCount() == 0,"String_Node_Str");
  failedTasks.add(new DefaultFailedTask<F>(failedTask,t));
  ++failureNotifications;
  onFailureNotification(failedTask,t);
  notificationHandler();
}

Fixed version (ground truth):
@Override public final synchronized void notifyFailure(final F failedTask,final Throwable t){
  Validate.notNull(t,"String_Node_Str");
  if (getRemainingNotificationsCount() == 0) {
    throw new IllegalStateException("String_Node_Str");
  }
  failedTasks.add(new DefaultFailedTask<F>(failedTask,t));
  ++failureNotifications;
  onFailureNotification(failedTask,t);
  notificationHandler();
}
Program: 44312
Project: 44312
Buggy source:
/** 
 * dado paths jndi retorna archivos de propiedades 
 */
public static Resource[] getJndiLocations(final String[] filePathJndiNames){
  final ResourceLoader resourceLoader=new DefaultResourceLoader();
  try {
    final InitialContext initCtx=new InitialContext();
    final Context envCtx=(Context)initCtx.lookup("String_Node_Str");
    final Resource[] locations=new Resource[filePathJndiNames.length];
    for (int i=0; i < filePathJndiNames.length; i++) {
      locations[i]=resourceLoader.getResource((String)envCtx.lookup(filePathJndiNames[i]));
    }
    return locations;
  }
 catch (  final NamingException e) {
    LOGGER.warn("String_Node_Str" + "String_Node_Str" + e.getExplanation());
    return null;
  }
}

Fixed version (ground truth):
/** 
 * dado paths jndi retorna archivos de propiedades 
 */
public static Resource[] getJndiLocations(final String[] filePathJndiNames){
  final ResourceLoader resourceLoader=new DefaultResourceLoader();
  try {
    final InitialContext initCtx=new InitialContext();
    final Resource[] locations=new Resource[filePathJndiNames.length];
    boolean found=false;
    try {
      final Context envCtx=(Context)initCtx.lookup("String_Node_Str");
      for (int i=0; i < filePathJndiNames.length; i++) {
        locations[i]=resourceLoader.getResource((String)envCtx.lookup(filePathJndiNames[i]));
      }
      found=true;
    }
 catch (    final NamingException e) {
      LOGGER.warn("String_Node_Str" + e.getExplanation());
    }
    if (!found) {
      try {
        for (int i=0; i < filePathJndiNames.length; i++) {
          locations[i]=resourceLoader.getResource((String)initCtx.lookup(filePathJndiNames[i]));
        }
      }
 catch (      final NamingException e) {
        LOGGER.warn("String_Node_Str" + "String_Node_Str" + e.getExplanation());
        return null;
      }
    }
    return locations;
  }
 catch (  final NamingException e) {
    LOGGER.warn("String_Node_Str" + "String_Node_Str" + e.getExplanation());
    return null;
  }
}
Program: 44313
Project: 44313
Buggy source:
/** 
 * Construye un uri 
 */
public static String buildVarArgs(final PageContext ctx,final String uriKey,final Object... params){
  Validate.notNull(uriKey);
  Validate.notNull(ctx);
  WebApplicationContext appCtx=RequestContextUtils.getWebApplicationContext(ctx.getRequest());
  UriFactory uriFactory=appCtx.getBean(SpringBeans.ASSET_URIFACTORY_KEY,UriFactory.class);
  return uriFactory.buildUri(uriKey,params);
}

Fixed version (ground truth):
/** 
 * Construye un uri 
 */
public static String buildVarArgs(final PageContext ctx,final String uriKey,final Object... params){
  Validate.notNull(uriKey);
  Validate.notNull(ctx);
  WebApplicationContext appCtx=RequestContextUtils.getWebApplicationContext(ctx.getRequest());
  UriFactory uriFactory=appCtx.getBean(SpringBeans.LINK_URIFACTORY_KEY,UriFactory.class);
  return uriFactory.buildUri(uriKey,params);
}
Program: 44314
Project: 44314
Buggy source:
/** 
 * @see Persistible#getReference() 
 */
@SuppressWarnings("String_Node_Str") public <T>Reference<? extends Persistible> generateReference(){
  return new Reference(getClass(),getId());
}

Fixed version (ground truth):
/** 
 * @see Persistible#getReference() 
 */
@SuppressWarnings("String_Node_Str") public <T>Reference<? extends Persistible> generateReference(){
  if (getId() == null) {
    return new Reference(getClass());
  }
  return new Reference(getClass(),getId().longValue());
}
Program: 44315
Project: 44315
Buggy source:
/** 
 * @see Persistible#getReference() 
 */
public final <T>Reference<? extends Persistible> generateReference(){
  return new Reference(this.getClass(),getId(),getVersion());
}

Fixed version (ground truth):
/** 
 * @see Persistible#getReference() 
 */
@SuppressWarnings("String_Node_Str") public final <T>Reference<? extends Persistible> generateReference(){
  Reference<? extends Persistible> ret;
  if (getId() == null) {
    ret=new Reference(this.getClass());
  }
 else {
    if (version == null) {
      ret=new Reference(this.getClass(),getId().longValue());
    }
 else {
      ret=new Reference(this.getClass(),getId().longValue(),getVersion().longValue());
    }
  }
  return ret;
}
Program: 44316
Project: 44316
Buggy source:
/** 
 * @see Repository#aggregate(Query,Class) 
 */
@SuppressWarnings("String_Node_Str") public final <R,T extends Persistible>R aggregate(final Query<T> query,final AggregateFunction aggregateFunction,final Class<R> retClazz){
  Validate.notNull(query);
  Validate.notNull(aggregateFunction);
  Validate.notNull(retClazz);
  final DetachedCriteria criteria=(DetachedCriteria)getCriteriaSpecification(null,query,true);
  final ProjectionAggregateFunctionVisitor visitor=new ProjectionAggregateFunctionVisitor();
  aggregateFunction.accept(visitor);
  criteria.setProjection(visitor.getProjection());
  return (R)getHibernateTemplate().execute(new HibernateCallback(){
    public Object doInHibernate(    final Session session) throws HibernateException, SQLException {
      criteria.getExecutableCriteria(session).setCacheable(query.getCacheable());
      final List l=criteria.getExecutableCriteria(session).list();
      return l.size() == 0 ? null : l.size() == 1 ? l.get(0) : l;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @see Repository#aggregate(Query,Class) 
 */
@SuppressWarnings("String_Node_Str") public final <R,T extends Persistible>R aggregate(final Query<T> query,final AggregateFunction aggregateFunction,final Class<R> retClazz){
  Validate.notNull(query);
  Validate.notNull(aggregateFunction);
  Validate.notNull(retClazz);
  boolean ignoreOrder=true;
  if (aggregateFunction instanceof CompositeAggregateFunction) {
    List<AggregateFunction> list=((CompositeAggregateFunction)aggregateFunction).getFunctions();
    for (    AggregateFunction a : list) {
      if (a instanceof GroupPropertyAggregateFilter) {
        ignoreOrder=false;
      }
    }
  }
 else   if (aggregateFunction instanceof GroupPropertyAggregateFilter) {
    ignoreOrder=false;
  }
  final DetachedCriteria criteria=(DetachedCriteria)getCriteriaSpecification(null,query,ignoreOrder);
  final ProjectionAggregateFunctionVisitor visitor=new ProjectionAggregateFunctionVisitor();
  aggregateFunction.accept(visitor);
  criteria.setProjection(visitor.getProjection());
  return (R)getHibernateTemplate().execute(new HibernateCallback(){
    public Object doInHibernate(    final Session session) throws HibernateException, SQLException {
      criteria.getExecutableCriteria(session).setCacheable(query.getCacheable());
      final List l=criteria.getExecutableCriteria(session).list();
      return l.size() == 0 ? null : l.size() == 1 ? l.get(0) : l;
    }
  }
);
}
Program: 44317
Project: 44317
Buggy source:
/** 
 * @see ContentProvider#getContent(URL) 
 */
public final InputStream getContent(final URL url){
  final String destURL=map.get(url);
  if (destURL == null) {
    throw new NoSuchEntityException(url);
  }
  return getClass().getClassLoader().getResourceAsStream(destURL);
}

Fixed version (ground truth):
/** 
 * @see ContentProvider#getContent(URL) 
 */
public final InputStream getContent(final URL url){
  final String destURL=map.get(url);
  if (destURL == null) {
    throw new NoSuchEntityException(url);
  }
  final InputStream is=getClass().getClassLoader().getResourceAsStream(destURL);
  if (is == null) {
    throw new NoSuchEntityException(url);
  }
  return is;
}
Program: 44318
Project: 44318
Buggy source:
/** 
 * copia los atributos a otro 
 */
protected final void copyTo(final XMPPMessageAttributes other,final Map<String,Object> model){
  other.setMessageType(getMessageType());
  other.setMessageType(getMessageType());
  other.setLangBodies(translateLangBodies());
  if (getHtmlStringMessage() != null) {
    other.setHtmlMessage(new StringResource(renderString(getHtmlStringMessage(),model)));
  }
  final List<PacketExtension> packetExtensions=new LinkedList<PacketExtension>(getExtensions());
  for (  final XMPPMessagePacketExtensionTemplate template : packetExtensionTemplates) {
    packetExtensions.add(template.render(model));
  }
  other.setExtensions(packetExtensions);
  other.setConnection(getConnection());
}

Fixed version (ground truth):
/** 
 * copia los atributos a otro 
 */
protected final void copyTo(final XMPPMessageAttributes other,final Map<String,Object> model){
  other.setMessageType(getMessageType());
  other.setMessageType(getMessageType());
  other.setLangBodies(translateLangBodies());
  if (getHtmlStringMessage() != null) {
    other.setHtmlMessage(new StringResource(renderString(getHtmlStringMessage(),model)));
  }
  final List<PacketExtension> packetExtensions=new LinkedList<PacketExtension>(getExtensions());
  for (  final XMPPMessagePacketExtensionTemplate template : packetExtensionTemplates) {
    packetExtensions.add(template.render(model));
  }
  if (packetExtensions != null) {
    other.setExtensions(packetExtensions);
  }
  other.setConnection(getConnection());
}
Program: 44319
Project: 44319
Buggy source:
/** 
 * @param persistibleClasses persistible classes that may requiere dependencyinjection
 */
public SpringInjectionInterceptor(final List<Class> persistibleClasses){
  Validate.noNullElements(persistibleClasses);
  for (  final Class clazz : persistibleClasses) {
    final List<Entry<Field,String>> fields=new LinkedList<Entry<Field,String>>();
    for (    final Annotation annotation : clazz.getAnnotations()) {
      if (annotation instanceof Configurable) {
        for (        final Field field : clazz.getDeclaredFields()) {
          for (          final Annotation a : field.getAnnotations()) {
            if (a instanceof Qualifier) {
              String n=((Qualifier)a).value();
              if (StringUtils.isBlank(n)) {
                n=field.getName();
              }
              final String name=n;
              fields.add(new Entry<Field,String>(){
                public Field getKey(){
                  return field;
                }
                public String getValue(){
                  return name;
                }
                public String setValue(                final String value){
                  return null;
                }
              }
);
            }
          }
        }
      }
    }
    if (fields.size() > 0) {
      dependencyCache.put(clazz,new DependencyInjection(fields,InitializingBean.class.isAssignableFrom(clazz)));
    }
  }
}

Fixed version (ground truth):
/** 
 * @param persistibleClasses persistible classes that may requiere dependencyinjection
 */
public SpringInjectionInterceptor(final List<Class> persistibleClasses){
  Validate.noNullElements(persistibleClasses);
  for (  final Class clazz : persistibleClasses) {
    final List<Entry<Field,String>> fields=new LinkedList<Entry<Field,String>>();
    for (    final Annotation annotation : clazz.getAnnotations()) {
      if (annotation instanceof Configurable) {
        final List<Field> clazzFields=new LinkedList<Field>();
        Class c=clazz;
        while (c != null) {
          clazzFields.addAll(Arrays.asList(c.getDeclaredFields()));
          c=c.getSuperclass();
        }
        for (        final Field field : clazzFields) {
          for (          final Annotation a : field.getAnnotations()) {
            if (a instanceof Qualifier) {
              String n=((Qualifier)a).value();
              if (StringUtils.isBlank(n)) {
                n=field.getName();
              }
              final String name=n;
              fields.add(new Entry<Field,String>(){
                public Field getKey(){
                  return field;
                }
                public String getValue(){
                  return name;
                }
                public String setValue(                final String value){
                  return null;
                }
              }
);
            }
          }
        }
      }
    }
    if (fields.size() > 0) {
      dependencyCache.put(clazz,new DependencyInjection(fields,InitializingBean.class.isAssignableFrom(clazz)));
    }
  }
}
Program: 44320
Project: 44320
Buggy source:
/** 
 * @return the context path  
 */
public final String getCtx(final HttpServletRequest request){
  final String ret;
  if (prefix == null) {
    try {
      String encoding=request.getCharacterEncoding();
      if (StringUtils.isBlank(encoding)) {
        encoding=this.defaultEncoding;
      }
      String uri=(String)request.getAttribute("String_Node_Str");
      if (uri == null) {
        uri=request.getRequestURI();
      }
      uri=URLDecoder.decode(uri,encoding);
      uri=uri.substring(URLDecoder.decode(request.getContextPath(),encoding).length());
      if (uri.startsWith("String_Node_Str")) {
        uri=uri.substring(1);
      }
      int slashses=0;
      for (int i=0; i < uri.length(); i++) {
        if (uri.charAt(i) == '/') {
          slashses++;
        }
      }
      final StringBuilder sb=new StringBuilder();
      for (int i=0; i < slashses; i++) {
        sb.append("String_Node_Str");
        if (i + 1 < slashses) {
          sb.append('/');
        }
      }
      ret=sb.toString();
    }
 catch (    UnsupportedEncodingException e) {
      throw new UnhandledException(e);
    }
  }
 else {
    ret=prefix;
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * @return the context path  
 */
public final String getCtx(final HttpServletRequest request){
  final String ret;
  if (prefix == null) {
    try {
      String encoding=request.getCharacterEncoding();
      if (StringUtils.isBlank(encoding)) {
        encoding=this.defaultEncoding;
      }
      String uri=(String)request.getAttribute("String_Node_Str");
      if (uri == null) {
        uri=request.getRequestURI();
      }
      uri=URLDecoder.decode(uri,encoding);
      uri=uri.substring(URLDecoder.decode(request.getContextPath(),encoding).length());
      if (uri.startsWith("String_Node_Str")) {
        uri=uri.substring(1);
      }
      int slashses=0;
      for (int i=0; i < uri.length(); i++) {
        if (uri.charAt(i) == '/') {
          slashses++;
        }
      }
      final StringBuilder sb=new StringBuilder();
      for (int i=0; i < slashses; i++) {
        sb.append("String_Node_Str");
        if (i + 1 < slashses) {
          sb.append('/');
        }
      }
      if (sb.toString().length() == 0) {
        ret="String_Node_Str";
      }
 else {
        ret=sb.toString();
      }
    }
 catch (    UnsupportedEncodingException e) {
      throw new UnhandledException(e);
    }
  }
 else {
    ret=prefix;
  }
  return ret;
}
Program: 44321
Project: 44321
Buggy source:
/** 
 * @see URLRequestMapperDAO#save(URLRequestMapper) 
 */
public final void save(final URLRequestMapper urlRequestMapper){
  final Properties result=new Properties();
  long i=0;
  if (urlRequestMapper instanceof ChainedURLRequestMapper) {
    final ChainedURLRequestMapper c=(ChainedURLRequestMapper)urlRequestMapper;
    final URLRequestMapper[] mappers=c.getChain();
    for (    final URLRequestMapper mapper : mappers) {
      result.put(i++,mapper.toString());
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + urlRequestMapper.getClass().getName());
  }
  persister.save(result);
}

Fixed version (ground truth):
/** 
 * @see URLRequestMapperDAO#save(URLRequestMapper) 
 */
public final void save(final URLRequestMapper urlRequestMapper){
  final Properties result=new Properties();
  long i=0;
  if (urlRequestMapper instanceof ChainedURLRequestMapper) {
    final ChainedURLRequestMapper c=(ChainedURLRequestMapper)urlRequestMapper;
    final URLRequestMapper[] mappers=c.getChain();
    for (    final URLRequestMapper mapper : mappers) {
      result.put(Long.toString(i++),mapper.toString());
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + urlRequestMapper.getClass().getName());
  }
  persister.save(result);
}
Program: 44322
Project: 44322
Buggy source:
/** 
 * constructor
 * @param encoders
 */
AcegiLdapUserPasswordEncoder(final Map<String,PasswordEncoder> encoders){
  Validate.notNull(encoders);
  this.encoders=encoders;
}

Fixed version (ground truth):
/** 
 * constructor
 * @param encoders
 */
public AcegiLdapUserPasswordEncoder(final Map<String,PasswordEncoder> encoders){
  Validate.notNull(encoders);
  this.encoders=encoders;
}
Program: 44323
Project: 44323
Buggy source:
/** 
 * @see ApplicationContextAware#setApplicationContext(ApplicationContext) 
 */
public final void setApplicationContext(final ApplicationContext ctx) throws BeansException {
  this.ctx=(WebApplicationContext)ctx;
}

Fixed version (ground truth):
/** 
 * @see ApplicationContextAware#setApplicationContext(ApplicationContext) 
 */
public final void setApplicationContext(final ApplicationContext ctx) throws BeansException {
  if (ctx instanceof WebApplicationContext) {
    this.ctx=(WebApplicationContext)ctx;
  }
}
Program: 44324
Project: 44324
Buggy source:
/** 
 * @see CaseBlock#evaluate() 
 */
public final boolean evaluate(){
  return regex.matcher(ctx.getServletContext().getRealPath("String_Node_Str")).lookingAt();
}

Fixed version (ground truth):
/** 
 * @see CaseBlock#evaluate() 
 */
public final boolean evaluate(){
  return ctx == null ? false : regex.matcher(ctx.getServletContext().getRealPath("String_Node_Str")).lookingAt();
}
Program: 44327
Project: 44327
Buggy source:
/** 
 * @see AbstractUrlHandlerMapping#registerHandler(String) 
 */
@Override protected final void registerController(String beanName) throws BeansException, IllegalStateException {
  final Class controllerClass=getApplicationContext().getType(beanName);
  if (Controller.class.isAssignableFrom(controllerClass) && beanName.endsWith(CONTROLLER_SUFFIX)) {
    final StringBuffer pathMapping=new StringBuffer("String_Node_Str");
    final String path=getCompoundPath(beanName.substring(0,beanName.length() - CONTROLLER_SUFFIX.length()));
    pathMapping.append(path);
    pathMapping.append("String_Node_Str");
    super.registerHandler(pathMapping.toString(),beanName);
  }
 else {
    super.registerController(beanName);
  }
}

Fixed version (ground truth):
/** 
 * @see AbstractUrlHandlerMapping#registerHandler(String) 
 */
@Override protected final void registerController(String beanName) throws BeansException, IllegalStateException {
  final Class controllerClass=getApplicationContext().getType(beanName);
  if (Controller.class.isAssignableFrom(controllerClass) && beanName.endsWith(CONTROLLER_SUFFIX) && !beanName.equals(controllerClass.getName())) {
    final StringBuffer pathMapping=new StringBuffer("String_Node_Str");
    final String path=getCompoundPath(beanName.substring(0,beanName.length() - CONTROLLER_SUFFIX.length()));
    pathMapping.append(path);
    pathMapping.append("String_Node_Str");
    super.registerHandler(pathMapping.toString(),beanName);
  }
 else {
    super.registerController(beanName);
  }
}
Program: 44328
Project: 44328
Buggy source:
/** 
 * @see MessageFactory#createMessage(String,String,Map,NotificationAddress) 
 */
public final Message createMessage(final String stringMessage,final String subject,final Map<String,Object> model,final NotificationAddress address){
  Validate.notNull(stringMessage);
  Validate.notNull(model);
  return new StringMessage(renderString(stringMessage,model),subject,address);
}

Fixed version (ground truth):
/** 
 * @see MessageFactory#createMessage(String,String,Map,NotificationAddress) 
 */
public final Message createMessage(final String stringMessage,final String subject,final Map<String,Object> model,final NotificationAddress address){
  Validate.notNull(stringMessage);
  Validate.notNull(model);
  return new StringMessage(renderString(stringMessage,model),renderString(subject,model),address);
}
Program: 44329
Project: 44329
Buggy source:
AbstractViewTestCase(Set<String> absolutePaths,Set<String> recursivePaths,Set<String> configPaths,StreamProvider streamProvider){
  if (streamProvider == null)   throw new IllegalArgumentException("String_Node_Str");
  if (absolutePaths == null && recursivePaths == null)   throw new IllegalArgumentException("String_Node_Str" + AbstractViewTestCase.class.getName() + "String_Node_Str");
  if (configPaths == null)   throw new IllegalArgumentException("String_Node_Str");
  if (configPaths.size() == 0)   throw new IllegalArgumentException("String_Node_Str");
  Set<String> allPaths=new HashSet<String>(absolutePaths);
  for (  String path : recursivePaths) {
    explode(new File(path),allPaths,"String_Node_Str");
    explode(new File(path),allPaths,"String_Node_Str");
  }
  if (allPaths.size() == 0)   throw new IllegalArgumentException("String_Node_Str");
  parseResources(allPaths,streamProvider,viewsByPath);
  parseResources(configPaths,streamProvider,configByPath);
  parser=new ViewParser();
  Iterator<String> paths=configByPath.keySet().iterator();
  for (; paths.hasNext(); ) {
    String path=paths.next();
    parser.parse(configByPath.get(path),path);
  }
}

Fixed version (ground truth):
AbstractViewTestCase(Set<String> absolutePaths,Set<String> recursivePaths,Set<String> configPaths,StreamProvider streamProvider){
  if (streamProvider == null)   throw new IllegalArgumentException("String_Node_Str");
  if (absolutePaths == null && recursivePaths == null)   throw new IllegalArgumentException("String_Node_Str" + AbstractViewTestCase.class.getName() + "String_Node_Str");
  if (absolutePaths == null)   absolutePaths=new HashSet<String>();
  if (recursivePaths == null)   recursivePaths=new HashSet<String>();
  if (configPaths == null)   throw new IllegalArgumentException("String_Node_Str");
  if (configPaths.size() == 0)   throw new IllegalArgumentException("String_Node_Str");
  Set<String> allPaths=new HashSet<String>(absolutePaths);
  for (  String path : recursivePaths) {
    explode(new File(path),allPaths,"String_Node_Str");
    explode(new File(path),allPaths,"String_Node_Str");
  }
  if (allPaths.size() == 0)   throw new IllegalArgumentException("String_Node_Str");
  viewsByPath=new HashMap<String,Document>();
  configByPath=new HashMap<String,Document>();
  parser=new ViewParser();
  parseResources(allPaths,streamProvider,viewsByPath);
  parseResources(configPaths,streamProvider,configByPath);
  Iterator<String> paths=viewsByPath.keySet().iterator();
  for (; paths.hasNext(); ) {
    String path=paths.next();
    parser.parse(viewsByPath.get(path),path);
  }
}
Program: 44330
Project: 44330
Buggy source:
private void classDefinitions(Node node,String faceConfigPath){
  String nodeName=node.getNodeName();
  if (CLASS_CONSTRAINTS.keySet().contains(nodeName)) {
    Class clazz=new ClassUtils().loadClass(node.getNodeValue(),nodeName);
    Class[] constraints=CLASS_CONSTRAINTS.get(nodeName);
    if (constraints.length > 0 && !new ClassUtils().isAssignableFrom(constraints,clazz))     throw new RuntimeException(faceConfigPath + "String_Node_Str" + clazz.getName()+ "String_Node_Str"+ nodeName+ "String_Node_Str"+ new ClassUtils().getConstraintsList(constraints));
  }
 else {
    NodeList children=node.getChildNodes();
    for (int i=0; i < children.getLength(); i++)     classDefinitions(children.item(i),faceConfigPath);
  }
}

Fixed version (ground truth):
private void classDefinitions(Node node,String faceConfigPath){
  String nodeName=node.getNodeName();
  if (CLASS_CONSTRAINTS.keySet().contains(nodeName)) {
    Class clazz=new ClassUtils().loadClass(node.getTextContent(),nodeName);
    Class[] constraints=CLASS_CONSTRAINTS.get(nodeName);
    if (constraints.length > 0 && !new ClassUtils().isAssignableFrom(constraints,clazz))     throw new RuntimeException(faceConfigPath + "String_Node_Str" + clazz.getName()+ "String_Node_Str"+ nodeName+ "String_Node_Str"+ new ClassUtils().getConstraintsList(constraints));
  }
 else {
    NodeList children=node.getChildNodes();
    for (int i=0; i < children.getLength(); i++)     classDefinitions(children.item(i),faceConfigPath);
  }
}
Program: 44331
Project: 44331
Buggy source:
public Class loadClass(String clazzName,String elementName){
  try {
    return getClass().getClassLoader().loadClass(clazzName.trim());
  }
 catch (  ClassNotFoundException e) {
    try {
      return Thread.currentThread().getContextClassLoader().loadClass(clazzName.trim());
    }
 catch (    ClassNotFoundException e2) {
      throw new RuntimeException("String_Node_Str" + clazzName + "String_Node_Str"+ elementName);
    }
  }
}

Fixed version (ground truth):
public Class loadClass(String clazzName,String elementName){
  if (clazzName == null)   throw new RuntimeException("String_Node_Str" + elementName);
  try {
    return getClass().getClassLoader().loadClass(clazzName.trim());
  }
 catch (  ClassNotFoundException e) {
    try {
      return Thread.currentThread().getContextClassLoader().loadClass(clazzName.trim());
    }
 catch (    ClassNotFoundException e2) {
      throw new RuntimeException("String_Node_Str" + clazzName + "String_Node_Str"+ elementName);
    }
  }
}
Program: 44332
Project: 44332
Buggy source:
public void testFacesConfigHappyPath(){
  new AbstractFacesConfigTestCase(TestUtils.STUBBED_RESOURCEPATH,new StringStreamProvider(TestUtils.getFacesConfig(CORRECT))){
  }
;
}

Fixed version (ground truth):
public void testFacesConfigHappyPath(){
  StreamProvider streamProvider=new StringStreamProvider(TestUtils.getFacesConfig(CORRECT));
  new AbstractFacesConfigTestCase(TestUtils.STUBBED_RESOURCEPATH,streamProvider){
  }
.testClassDefinitions();
}
Program: 44333
Project: 44333
Buggy source:
public void testClassDefinitions(){
  for (  String elementName : handler.getClassNamesByElement().keySet()) {
    List<String> classNames=handler.getClassNamesByElement().get(elementName);
    for (    String className : classNames) {
      Class clazz=new ClassUtils().loadClass(className,elementName);
      Class[] constraints=CLASS_CONSTRAINTS.get(elementName);
      if (!isAssignableFrom(constraints,clazz))       throw new RuntimeException(clazz.getName() + "String_Node_Str" + elementName+ "String_Node_Str"+ getConstraintsList(constraints));
    }
  }
}

Fixed version (ground truth):
public void testClassDefinitions(){
  for (  String elementName : handler.getClassNamesByElement().keySet()) {
    List<String> classNames=handler.getClassNamesByElement().get(elementName);
    for (    String className : classNames) {
      Class clazz=new ClassUtils().loadClass(className,elementName);
      Class[] constraints=CLASS_CONSTRAINTS.get(elementName);
      if (constraints.length > 0 && !isAssignableFrom(constraints,clazz))       throw new RuntimeException(clazz.getName() + "String_Node_Str" + elementName+ "String_Node_Str"+ getConstraintsList(constraints));
    }
  }
}
Program: 44336
Project: 44336
Buggy source:
public viewEvent(){
  User user=ReEventSession.get().getUserSignedIn();
  add(myEventList=new ListView<Event>("String_Node_Str",events.getByUser(user)){
    @Override protected void populateItem(    ListItem<Event> item){
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")));
      item.add(detailEvent=new Link("String_Node_Str"){
        public void onClick(){
          Event obj=(Event)getModelObject();
          setResponsePage(new detailEvent(obj));
        }
      }
);
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")){
        @Override public <C>IConverter<C> getConverter(        Class<C> type){
          if (!Date.class.isAssignableFrom(type)) {
            throw new IllegalArgumentException("String_Node_Str");
          }
          return (IConverter<C>)DateTimeConverter.both(DateFormat.SHORT,DateFormat.SHORT);
        }
      }
);
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")));
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")));
    }
  }
);
}

Fixed version (ground truth):
public viewEvent(){
  User user=ReEventSession.get().getModUserSignedIn().getObject();
  add(myEventList=new ListView<Event>("String_Node_Str",events.getByUser(user)){
    @Override protected void populateItem(    ListItem<Event> item){
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")));
      item.add(detailEvent=new Link("String_Node_Str"){
        public void onClick(){
          Event obj=(Event)getModelObject();
          setResponsePage(new detailEvent(obj));
        }
      }
);
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")){
        @Override public <C>IConverter<C> getConverter(        Class<C> type){
          if (!Date.class.isAssignableFrom(type)) {
            throw new IllegalArgumentException("String_Node_Str");
          }
          return (IConverter<C>)DateTimeConverter.both(DateFormat.SHORT,DateFormat.SHORT);
        }
      }
);
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")));
      item.add(new Label("String_Node_Str",new PropertyModel(item.getModel(),"String_Node_Str")));
    }
  }
);
}
Program: 44337
Project: 44337
Buggy source:
public String getLanguageCode(Player player){
  boolean isin=util.PlayerDatabase("String_Node_Str",player,null,null);
  Language lang;
  if (isin) {
    lang=translation.GetPlayerLanguageHash(player);
  }
 else {
    lang=translation.GetLanguage(player,"String_Node_Str");
  }
  return util.LanguageCode("String_Node_Str" + lang).toLowerCase();
}

Fixed version (ground truth):
public String getLanguageCode(Player player){
  return translation.languageCode(playerManager.getLanguageString(player));
}
Program: 44338
Project: 44338
Buggy source:
public String getCountryCode(Player player){
  boolean isin=util.PlayerDatabase("String_Node_Str",player,null,null);
  String CountryCode;
  if (isin) {
    CountryCode=translation.GetPlayerCountryHash(player);
  }
 else {
    CountryCode=translation.GetCountryCode(playerManager.getIP(player));
  }
  return CountryCode.toLowerCase();
}

Fixed version (ground truth):
public String getCountryCode(Player player){
  return playerManager.getCountryCode(player);
}
Program: 44339
Project: 44339
Buggy source:
public String getLanguage(Player player){
  boolean isin=util.PlayerDatabase("String_Node_Str",player,null,null);
  Language lang;
  if (isin) {
    lang=translation.GetPlayerLanguageHash(player);
  }
 else {
    lang=translation.GetLanguage(player,"String_Node_Str");
  }
  return util.LanguageName("String_Node_Str" + lang).toLowerCase();
}

Fixed version (ground truth):
public String getLanguage(Player player){
  return playerManager.getLanguageString(player);
}
Program: 44340
Project: 44340
Buggy source:
public String getCountry(Player player){
  String CountryName=translation.GetCountryName(playerManager.getIP(player));
  return CountryName.toLowerCase();
}

Fixed version (ground truth):
public String getCountry(Player player){
  return translation.getCountryName(playerManager.getIP(player));
}