nus-yam/ex-repair huggingface dataset:
Program: 168986
Project: 168986
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public FinalSetOperationCTECriteriaBuilder<T> endSet(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (FinalSetOperationCTECriteriaBuilder<T>)finalSetOperationBuilder;
}

Fixed version (ground truth):
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public FinalSetOperationCTECriteriaBuilder<T> endSet(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (FinalSetOperationCTECriteriaBuilder<T>)(FinalSetOperationCTECriteriaBuilder)finalSetOperationBuilder;
}
Program: 168987
Project: 168987
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public FinalSetOperationCriteriaBuilder<T> endSet(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (FinalSetOperationCriteriaBuilder<T>)finalSetOperationBuilder;
}

Fixed version (ground truth):
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public FinalSetOperationCriteriaBuilder<T> endSet(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (FinalSetOperationCriteriaBuilder<T>)(FinalSetOperationCriteriaBuilder)finalSetOperationBuilder;
}
Program: 168988
Project: 168988
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public FinalSetOperationSubqueryBuilder<T> endSet(){
  subListener.verifySubqueryBuilderEnded();
  listener.onBuilderEnded(this);
  return (FinalSetOperationSubqueryBuilder<T>)finalSetOperationBuilder;
}

Fixed version (ground truth):
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public FinalSetOperationSubqueryBuilder<T> endSet(){
  subListener.verifySubqueryBuilderEnded();
  listener.onBuilderEnded(this);
  return (FinalSetOperationSubqueryBuilder<T>)(FinalSetOperationSubqueryBuilder)finalSetOperationBuilder;
}
Program: 168989
Project: 168989
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public OngoingFinalSetOperationCTECriteriaBuilder<Z> endSetWith(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (OngoingFinalSetOperationCTECriteriaBuilder<Z>)finalSetOperationBuilder;
}

Fixed version (ground truth):
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public OngoingFinalSetOperationCTECriteriaBuilder<Z> endSetWith(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (OngoingFinalSetOperationCTECriteriaBuilder<Z>)(OngoingFinalSetOperationCTECriteriaBuilder)finalSetOperationBuilder;
}
Program: 168990
Project: 168990
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public OngoingFinalSetOperationCriteriaBuilder<Z> endSetWith(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (OngoingFinalSetOperationCriteriaBuilder<Z>)finalSetOperationBuilder;
}

Fixed version (ground truth):
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public OngoingFinalSetOperationCriteriaBuilder<Z> endSetWith(){
  subListener.verifyBuilderEnded();
  listener.onBuilderEnded(this);
  return (OngoingFinalSetOperationCriteriaBuilder<Z>)(OngoingFinalSetOperationCriteriaBuilder)finalSetOperationBuilder;
}
Program: 168991
Project: 168991
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public OngoingFinalSetOperationSubqueryBuilder<Z> endSetWith(){
  subListener.verifySubqueryBuilderEnded();
  listener.onBuilderEnded(this);
  return (OngoingFinalSetOperationSubqueryBuilder<Z>)finalSetOperationBuilder;
}

Fixed version (ground truth):
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public OngoingFinalSetOperationSubqueryBuilder<Z> endSetWith(){
  subListener.verifySubqueryBuilderEnded();
  listener.onBuilderEnded(this);
  return (OngoingFinalSetOperationSubqueryBuilder<Z>)(OngoingFinalSetOperationSubqueryBuilder)finalSetOperationBuilder;
}
Program: 168992
Project: 168992
Buggy source:
/** 
 * Adds the given attribute filters to the attribute filters of this setting.
 * @param attributeFilters The attribute filters to add
 */
public void addAttributeFilters(Map<String,String> attributeFilters){
  this.attributeFilters.putAll(attributeFilters);
}

Fixed version (ground truth):
/** 
 * Adds the given attribute filters to the attribute filters of this setting.
 * @param attributeFilters The attribute filters to add
 */
public void addAttributeFilters(Map<String,Object> attributeFilters){
  this.attributeFilters.putAll(attributeFilters);
}
Program: 168993
Project: 168993
Buggy source:
/** 
 * Adds the given attribute filter to the attribute filters of this setting.
 * @param attributeName The name of the attribute filter
 * @param filterValue   The filter value for the attribute filter
 */
public void addAttributeFilter(String attributeName,String filterValue){
  this.attributeFilters.put(attributeName,filterValue);
}

Fixed version (ground truth):
/** 
 * Adds the given attribute filter to the attribute filters of this setting.
 * @param attributeName The name of the attribute filter
 * @param filterValue   The filter value for the attribute filter
 */
public void addAttributeFilter(String attributeName,Object filterValue){
  this.attributeFilters.put(attributeName,filterValue);
}
Program: 168994
Project: 168994
Buggy source:
private void createGettersAndSetters(MethodAttribute<?,?> attribute,Class<?> clazz,CtClass cc,Method getter,Method setter,CtField initialStateField,CtField dirtyStateField,int initialStateIndex,int dirtyStateIndex,CtField attributeField) throws CannotCompileException, NotFoundException {
  String genericSignature=attributeField.getGenericSignature();
  List<Method> bridgeGetters=getBridgeGetters(clazz,attribute,getter);
  CtMethod attributeGetter=addGetter(cc,attributeField,getter.getName());
  if (genericSignature != null) {
    String getterGenericSignature="String_Node_Str" + genericSignature;
    setGenericSignature(attributeGetter,getterGenericSignature);
  }
  for (  Method m : bridgeGetters) {
    CtMethod getterBridge=createGetterBridge(cc,m,attributeGetter);
    cc.addMethod(getterBridge);
  }
  if (setter != null) {
    CtMethod attributeSetter=addSetter(attribute,setter,initialStateField,dirtyStateField,initialStateIndex,dirtyStateIndex,attributeField);
    List<Method> bridgeSetters=getBridgeSetters(clazz,attribute,setter);
    if (genericSignature != null) {
      String setterGenericSignature="String_Node_Str" + genericSignature + "String_Node_Str";
      setGenericSignature(attributeSetter,setterGenericSignature);
    }
    for (    Method m : bridgeSetters) {
      CtMethod setterBridge=createSetterBridge(cc,m,attributeSetter);
      cc.addMethod(setterBridge);
    }
  }
}

Fixed version (ground truth):
private void createGettersAndSetters(MethodAttribute<?,?> attribute,Class<?> clazz,CtClass cc,Method getter,Method setter,CtField initialStateField,CtField dirtyStateField,int initialStateIndex,int dirtyStateIndex,CtField attributeField) throws CannotCompileException, NotFoundException {
  SignatureAttribute sa=(SignatureAttribute)attributeField.getFieldInfo2().getAttribute(SignatureAttribute.tag);
  String genericSignature=sa == null ? null : sa.getSignature();
  List<Method> bridgeGetters=getBridgeGetters(clazz,attribute,getter);
  CtMethod attributeGetter=addGetter(cc,attributeField,getter.getName());
  if (genericSignature != null) {
    String getterGenericSignature="String_Node_Str" + genericSignature;
    setGenericSignature(attributeGetter,getterGenericSignature);
  }
  for (  Method m : bridgeGetters) {
    CtMethod getterBridge=createGetterBridge(cc,m,attributeGetter);
    cc.addMethod(getterBridge);
  }
  if (setter != null) {
    CtMethod attributeSetter=addSetter(attribute,setter,initialStateField,dirtyStateField,initialStateIndex,dirtyStateIndex,attributeField);
    List<Method> bridgeSetters=getBridgeSetters(clazz,attribute,setter);
    if (genericSignature != null) {
      String setterGenericSignature="String_Node_Str" + genericSignature + "String_Node_Str";
      setGenericSignature(attributeSetter,setterGenericSignature);
    }
    for (    Method m : bridgeSetters) {
      CtMethod setterBridge=createSetterBridge(cc,m,attributeSetter);
      cc.addMethod(setterBridge);
    }
  }
}
Program: 168995
Project: 168995
Buggy source:
protected void renderLimitOnly(FunctionRenderContext functionRenderContext){
  StringBuilder sqlSb=getSql(functionRenderContext);
  dbmsDialect.appendLimit(sqlSb,functionRenderContext.getArgument(1),null);
  functionRenderContext.addChunk(sqlSb.toString());
}

Fixed version (ground truth):
protected void renderLimitOnly(FunctionRenderContext functionRenderContext){
  StringBuilder sqlSb=getSql(functionRenderContext);
  dbmsDialect.appendLimit(sqlSb,functionRenderContext.getArgument(1),null);
  sqlSb.insert(0,'(');
  sqlSb.append(')');
  functionRenderContext.addChunk(sqlSb.toString());
}
Program: 168996
Project: 168996
Buggy source:
protected void renderLimitOffset(FunctionRenderContext functionRenderContext){
  StringBuilder sqlSb=getSql(functionRenderContext);
  dbmsDialect.appendLimit(sqlSb,functionRenderContext.getArgument(1),functionRenderContext.getArgument(2));
  functionRenderContext.addChunk(sqlSb.toString());
}

Fixed version (ground truth):
protected void renderLimitOffset(FunctionRenderContext functionRenderContext){
  StringBuilder sqlSb=getSql(functionRenderContext);
  dbmsDialect.appendLimit(sqlSb,functionRenderContext.getArgument(1),functionRenderContext.getArgument(2));
  sqlSb.insert(0,'(');
  sqlSb.append(')');
  functionRenderContext.addChunk(sqlSb.toString());
}
Program: 168997
Project: 168997
Buggy source:
private SessionImplementor wrapSession(SessionImplementor session,boolean generatedKeys,String[][] columns,HibernateReturningResult<?> returningResult){
  TransactionCoordinator transactionCoordinator=session.getTransactionCoordinator();
  JdbcCoordinator jdbcCoordinator=transactionCoordinator.getJdbcCoordinator();
  Object jdbcCoordinatorProxy=Proxy.newProxyInstance(jdbcCoordinator.getClass().getClassLoader(),new Class[]{JdbcCoordinator.class},new JdbcCoordinatorInvocationHandler(jdbcCoordinator,session.getFactory(),generatedKeys,columns,returningResult));
  Object transactionCoordinatorProxy=Proxy.newProxyInstance(transactionCoordinator.getClass().getClassLoader(),new Class[]{TransactionCoordinator.class},new TransactionCoordinatorInvocationHandler(transactionCoordinator,jdbcCoordinatorProxy));
  Object sessionProxy=Proxy.newProxyInstance(session.getClass().getClassLoader(),new Class[]{SessionImplementor.class,EventSource.class},new SessionInvocationHandler(session,transactionCoordinatorProxy));
  return (SessionImplementor)sessionProxy;
}

Fixed version (ground truth):
private SessionImplementor wrapSession(SessionImplementor session,boolean generatedKeys,String[][] columns,HibernateReturningResult<?> returningResult){
  Object transactionCoordinator=hibernateAccess.getTransactionCoordinator(session);
  JdbcCoordinator jdbcCoordinator=(JdbcCoordinator)ExpressionUtils.getValue(transactionCoordinator,"String_Node_Str");
  Object jdbcCoordinatorProxy=Proxy.newProxyInstance(jdbcCoordinator.getClass().getClassLoader(),new Class[]{JdbcCoordinator.class},new JdbcCoordinatorInvocationHandler(jdbcCoordinator,session.getFactory(),generatedKeys,columns,returningResult));
  Object transactionCoordinatorProxy=Proxy.newProxyInstance(transactionCoordinator.getClass().getClassLoader(),new Class[]{TransactionCoordinator.class},new TransactionCoordinatorInvocationHandler(transactionCoordinator,jdbcCoordinatorProxy));
  Object sessionProxy=Proxy.newProxyInstance(session.getClass().getClassLoader(),new Class[]{SessionImplementor.class,EventSource.class},new SessionInvocationHandler(session,transactionCoordinatorProxy));
  return (SessionImplementor)sessionProxy;
}
Program: 168998
Project: 168998
Buggy source:
public PreparedStatementInvocationHandler(PreparedStatement delegate,boolean generated,String[][] columns,HibernateReturningResult<?> returningResult){
  this.delegate=delegate;
  this.generated=generated;
  this.aliasIndex=new HashMap<String,Integer>(columns.length);
  this.returningResult=returningResult;
  for (int i=0; i < columns.length; i++) {
    aliasIndex.put(columns[i][1],i + 1);
  }
}

Fixed version (ground truth):
public PreparedStatementInvocationHandler(PreparedStatement delegate,String[][] columns,HibernateReturningResult<?> returningResult){
  this.delegate=delegate;
  this.aliasIndex=new HashMap<String,Integer>(columns.length);
  this.returningResult=returningResult;
  for (int i=0; i < columns.length; i++) {
    aliasIndex.put(columns[i][1],i + 1);
  }
}
Program: 168999
Project: 168999
Buggy source:
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  if ("String_Node_Str".equals(method.getName()) && method.getParameterTypes().length == 0) {
    returningResult.setUpdateCount(delegate.executeUpdate());
    ResultSet rs=delegate.getGeneratedKeys();
    if (generated) {
      return Proxy.newProxyInstance(rs.getClass().getClassLoader(),new Class[]{ResultSet.class},new ResultSetInvocationHandler(rs,aliasIndex));
    }
    return rs;
  }
  return method.invoke(delegate,args);
}

Fixed version (ground truth):
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  if ("String_Node_Str".equals(method.getName()) && method.getParameterTypes().length == 0) {
    returningResult.setUpdateCount(delegate.executeUpdate());
    ResultSet rs=delegate.getGeneratedKeys();
    return Proxy.newProxyInstance(rs.getClass().getClassLoader(),new Class[]{ResultSet.class},new ResultSetInvocationHandler(rs,aliasIndex));
  }
  return method.invoke(delegate,args);
}
Program: 169000
Project: 169000
Buggy source:
@Override public PreparedStatement prepareQueryStatement(String sql,final boolean isCallable,final ScrollMode scrollMode){
  checkAutoGeneratedKeysSupportEnabled();
  jdbcCoordinator.executeBatch();
  PreparedStatement ps=new QueryStatementPreparationTemplate(sql){
    public PreparedStatement doPrepare() throws SQLException {
      if (generated) {
        return connection().prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
      }
 else {
        String[] columnNames=new String[columns.length];
        for (int i=0; i < columns.length; i++) {
          columnNames[i]=columns[i][0];
        }
        return connection().prepareStatement(sql,columnNames);
      }
    }
  }
.prepareStatement();
  ps=(PreparedStatement)Proxy.newProxyInstance(ps.getClass().getClassLoader(),new Class[]{PreparedStatement.class},new PreparedStatementInvocationHandler(ps,generated,columns,returningResult));
  jdbcCoordinator.registerLastQuery(ps);
  return ps;
}

Fixed version (ground truth):
@Override public PreparedStatement prepareQueryStatement(String sql,final boolean isCallable,final ScrollMode scrollMode){
  checkAutoGeneratedKeysSupportEnabled();
  jdbcCoordinator.executeBatch();
  PreparedStatement ps=new QueryStatementPreparationTemplate(sql){
    public PreparedStatement doPrepare() throws SQLException {
      if (generated) {
        return connection().prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
      }
 else {
        String[] columnNames=new String[columns.length];
        for (int i=0; i < columns.length; i++) {
          columnNames[i]=columns[i][0];
        }
        return connection().prepareStatement(sql,columnNames);
      }
    }
  }
.prepareStatement();
  ps=(PreparedStatement)Proxy.newProxyInstance(ps.getClass().getClassLoader(),new Class[]{PreparedStatement.class},new PreparedStatementInvocationHandler(ps,columns,returningResult));
  jdbcCoordinator.registerLastQuery(ps);
  return ps;
}
Program: 169001
Project: 169001
Buggy source:
public TransactionCoordinatorInvocationHandler(TransactionCoordinator delegate,Object jdbcCoordinatorProxy){
  this.delegate=delegate;
  this.jdbcCoordinatorProxy=jdbcCoordinatorProxy;
}

Fixed version (ground truth):
public TransactionCoordinatorInvocationHandler(Object delegate,Object jdbcCoordinatorProxy){
  this.delegate=delegate;
  this.jdbcCoordinatorProxy=jdbcCoordinatorProxy;
}
Program: 169002
Project: 169002
Buggy source:
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  if ("String_Node_Str".equals(method.getName()) && method.getParameterCount() == 0) {
    returningResult.setUpdateCount(delegate.executeUpdate());
    ResultSet rs=delegate.getGeneratedKeys();
    if (generated) {
      return Proxy.newProxyInstance(rs.getClass().getClassLoader(),new Class[]{ResultSet.class},new ResultSetInvocationHandler(rs,aliasIndex));
    }
    return rs;
  }
  return method.invoke(delegate,args);
}

Fixed version (ground truth):
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  if ("String_Node_Str".equals(method.getName()) && method.getParameterTypes().length == 0) {
    returningResult.setUpdateCount(delegate.executeUpdate());
    ResultSet rs=delegate.getGeneratedKeys();
    if (generated) {
      return Proxy.newProxyInstance(rs.getClass().getClassLoader(),new Class[]{ResultSet.class},new ResultSetInvocationHandler(rs,aliasIndex));
    }
    return rs;
  }
  return method.invoke(delegate,args);
}
Program: 169003
Project: 169003
Buggy source:
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  Method indexMethod;
  if (method.getParameterCount() == 1 && (indexMethod=methods.get(method.getName())) != null) {
    return indexMethod.invoke(delegate,aliasIndex.get(args[0]));
  }
 else   if (method.getParameterCount() > 1) {
    if ((indexMethod=methods.get(method.getName() + method.getParameterCount())) != null) {
      Object[] newArgs=new Object[args.length];
      System.arraycopy(args,0,newArgs,0,args.length);
      newArgs[0]=aliasIndex.get(args[0]);
      return indexMethod.invoke(delegate,newArgs);
    }
 else     if ("String_Node_Str".equals(method.getName())) {
      Object[] newArgs=new Object[args.length];
      System.arraycopy(args,0,newArgs,0,args.length);
      newArgs[0]=aliasIndex.get(args[0]);
      if (method.getParameterTypes()[1].equals(Class.class)) {
        return getObjectForClassMethod.invoke(delegate,newArgs);
      }
 else {
        return getObjectForMapMethod.invoke(delegate,newArgs);
      }
    }
  }
  return method.invoke(delegate,args);
}

Fixed version (ground truth):
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  Method indexMethod;
  int parameterCount=method.getParameterTypes().length;
  if (parameterCount == 1 && (indexMethod=methods.get(method.getName())) != null) {
    return indexMethod.invoke(delegate,aliasIndex.get(args[0]));
  }
 else   if (parameterCount > 1) {
    if ((indexMethod=methods.get(method.getName() + parameterCount)) != null) {
      Object[] newArgs=new Object[args.length];
      System.arraycopy(args,0,newArgs,0,args.length);
      newArgs[0]=aliasIndex.get(args[0]);
      return indexMethod.invoke(delegate,newArgs);
    }
 else     if ("String_Node_Str".equals(method.getName())) {
      Object[] newArgs=new Object[args.length];
      System.arraycopy(args,0,newArgs,0,args.length);
      newArgs[0]=aliasIndex.get(args[0]);
      if (method.getParameterTypes()[1].equals(Class.class)) {
        return getObjectForClassMethod.invoke(delegate,newArgs);
      }
 else {
        return getObjectForMapMethod.invoke(delegate,newArgs);
      }
    }
  }
  return method.invoke(delegate,args);
}
Program: 169004
Project: 169004
Buggy source:
@Test @Category({NoDatanucleus.class}) public void testModifyAndUpdateRollbacked(){
  CriteriaBuilder<Document> criteria=cbf.create(em,Document.class,"String_Node_Str").orderByAsc("String_Node_Str");
  CriteriaBuilder<T> cb=evm.applySetting(EntityViewSetting.create(viewType),criteria);
  List<T> results=cb.getResultList();
  T docView=results.get(0);
  EntityTransaction tx=em.getTransaction();
  try {
    tx.begin();
    docView.setName("String_Node_Str");
    evm.update(em,docView);
    em.flush();
    tx.rollback();
    docView.setName("String_Node_Str");
    docView.setLastModified(new Date());
    tx.begin();
    evm.update(em,docView);
    em.flush();
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    throw new RuntimeException(e);
  }
  em.clear();
  doc=em.find(Document.class,doc.getId());
  assertEquals(doc.getName(),docView.getName());
  assertEquals(doc.getLastModified().getTime(),docView.getLastModified().getTime());
}

Fixed version (ground truth):
@Test @Category({NoDatanucleus.class}) public void testModifyAndUpdateRollbacked(){
  CriteriaBuilder<Document> criteria=cbf.create(em,Document.class,"String_Node_Str").orderByAsc("String_Node_Str");
  CriteriaBuilder<T> cb=evm.applySetting(EntityViewSetting.create(viewType),criteria);
  List<T> results=cb.getResultList();
  T docView=results.get(0);
  EntityTransaction tx=em.getTransaction();
  try {
    tx.begin();
    docView.setName("String_Node_Str");
    evm.update(em,docView);
    em.flush();
    tx.rollback();
    docView.setName("String_Node_Str");
    Date date=new Date();
    date.setTime(1000 * (date.getTime() / 1000));
    docView.setLastModified(date);
    tx.begin();
    evm.update(em,docView);
    em.flush();
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    throw new RuntimeException(e);
  }
  em.clear();
  doc=em.find(Document.class,doc.getId());
  assertEquals(doc.getName(),docView.getName());
  assertEquals(doc.getLastModified().getTime(),docView.getLastModified().getTime());
}
Program: 169005
Project: 169005
Buggy source:
protected Set<String> getRegisteredFunctions(){
  return new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
protected Set<String> getRegisteredFunctions(){
  return new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
}
Program: 169006
Project: 169006
Buggy source:
@Override protected Properties applyProperties(Properties properties){
  properties.put("String_Node_Str",properties.get("String_Node_Str"));
  properties.put("String_Node_Str",properties.get("String_Node_Str"));
  properties.put("String_Node_Str",properties.get("String_Node_Str"));
  properties.put("String_Node_Str",properties.get("String_Node_Str"));
  if (System.getProperty("String_Node_Str") != null) {
    properties.put("String_Node_Str",System.getProperty("String_Node_Str"));
  }
 else   if (properties.get("String_Node_Str").toString().contains("String_Node_Str")) {
    properties.put("String_Node_Str",SaneMySQLDialect.class.getName());
  }
  if (isHibernate42()) {
    properties.put("String_Node_Str","String_Node_Str");
  }
  return properties;
}

Fixed version (ground truth):
@Override protected Properties applyProperties(Properties properties){
  if (System.getProperty("String_Node_Str") != null) {
    properties.put("String_Node_Str",System.getProperty("String_Node_Str"));
  }
 else   if (properties.get("String_Node_Str").toString().contains("String_Node_Str")) {
    properties.put("String_Node_Str",SaneMySQLDialect.class.getName());
  }
  properties.remove("String_Node_Str");
  properties.put("String_Node_Str","String_Node_Str");
  if (isHibernate42()) {
    properties.put("String_Node_Str",properties.get("String_Node_Str"));
    properties.put("String_Node_Str",properties.get("String_Node_Str"));
    properties.put("String_Node_Str",properties.get("String_Node_Str"));
    properties.put("String_Node_Str",properties.get("String_Node_Str"));
    properties.put("String_Node_Str","String_Node_Str");
  }
  return properties;
}
Program: 169007
Project: 169007
Buggy source:
@SuppressWarnings("String_Node_Str") private <T>Class<? extends T> getProxy(ViewType<T> viewType,boolean unsafe){
  Class<T> clazz=viewType.getJavaType();
  ConcurrentMap<Class<?>,Class<?>> classes=unsafe ? unsafeProxyClasses : proxyClasses;
  Class<? extends T> proxyClass=(Class<? extends T>)classes.get(clazz);
  if (proxyClass == null) {
synchronized (proxyLock) {
      proxyClass=(Class<? extends T>)classes.get(clazz);
      if (proxyClass == null) {
        proxyClass=createProxyClass(viewType,unsafe);
        proxyClasses.put(clazz,proxyClass);
      }
    }
  }
  return proxyClass;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private <T>Class<? extends T> getProxy(ViewType<T> viewType,boolean unsafe){
  Class<T> clazz=viewType.getJavaType();
  ConcurrentMap<Class<?>,Class<?>> classes=unsafe ? unsafeProxyClasses : proxyClasses;
  Class<? extends T> proxyClass=(Class<? extends T>)classes.get(clazz);
  if (proxyClass == null) {
synchronized (proxyLock) {
      proxyClass=(Class<? extends T>)classes.get(clazz);
      if (proxyClass == null) {
        proxyClass=createProxyClass(viewType,unsafe);
        classes.put(clazz,proxyClass);
      }
    }
  }
  return proxyClass;
}
Program: 169008
Project: 169008
Buggy source:
public String getKey(){
  return key;
}

Fixed version (ground truth):
@Column(name="String_Node_Str",length=100) public String getKey(){
  return key;
}
Program: 169009
Project: 169009
Buggy source:
public String getKey(){
  return key;
}

Fixed version (ground truth):
@Column(name="String_Node_Str",length=100) public String getKey(){
  return key;
}
Program: 169011
Project: 169011
Buggy source:
private void addFields(CtClass newClass,CtClass cc) throws NotFoundException, CannotCompileException {
  Map<String,String> fieldClassMappings=new HashMap<String,String>();
  CtClass current=cc;
  do {
    for (    CtField field : current.getDeclaredFields()) {
      String oldClassMapping=fieldClassMappings.put(field.getName(),current.getName());
      if (oldClassMapping != null) {
        throw new IllegalArgumentException("String_Node_Str" + field.getName() + "String_Node_Str"+ oldClassMapping+ "String_Node_Str"+ current.getName()+ "String_Node_Str");
      }
      newClass.addField(new CtField(field,newClass));
    }
  }
 while (!"String_Node_Str".equals((current=current.getSuperclass()).getName()));
}

Fixed version (ground truth):
private void addFields(CtClass newClass,CtClass cc) throws NotFoundException, CannotCompileException {
  for (  CtField field : cc.getDeclaredFields()) {
    CtField newField=new CtField(field,newClass);
    int modifier=newField.getModifiers();
    modifier=modifier & ~Modifier.FINAL;
    if ((modifier & Modifier.PRIVATE) != 0) {
      modifier=modifier & ~Modifier.PRIVATE;
      modifier=modifier | Modifier.PROTECTED;
    }
    newField.setModifiers(modifier);
    newClass.addField(newField);
  }
}
Program: 169012
Project: 169012
Buggy source:
private void addMethods(CtClass newClass,CtClass cc) throws NotFoundException, CannotCompileException {
  Map<String,String> methodClassMappings=new HashMap<String,String>();
  CtClass current=cc;
  do {
    for (    CtMethod method : current.getDeclaredMethods()) {
      String name=method.getName() + Descriptor.toString(method.getSignature()) + Descriptor.of(method.getReturnType());
      String oldClassMapping=methodClassMappings.put(name,current.getName());
      if (oldClassMapping != null) {
        throw new IllegalArgumentException("String_Node_Str" + method.getName() + "String_Node_Str"+ oldClassMapping+ "String_Node_Str"+ current.getName()+ "String_Node_Str");
      }
      newClass.addMethod(new CtMethod(method,newClass,null));
    }
  }
 while (!"String_Node_Str".equals((current=current.getSuperclass()).getName()));
}

Fixed version (ground truth):
private void addMethods(CtClass newClass,CtClass cc) throws NotFoundException, CannotCompileException {
  for (  CtMethod method : cc.getDeclaredMethods()) {
    newClass.addMethod(new CtMethod(method,newClass,null));
  }
}
Program: 169014
Project: 169014
Buggy source:
@SuppressWarnings("String_Node_Str") private <T>Class<? extends T> createUnsafeProxyClass(ViewType<T> viewType,Class<?> proxyClass){
  CtClass cc=pool.makeClass(proxyClass.getName() + "String_Node_Str");
  CtClass superCc;
  CtClass proxyCc;
  ClassPath classPath=new ClassClassPath(proxyClass);
  pool.insertClassPath(classPath);
  try {
    proxyCc=pool.get(proxyClass.getName());
    superCc=proxyCc.getSuperclass();
    if ("String_Node_Str".equals(superCc.getName())) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    addFields(cc,proxyCc);
    addMethods(cc,proxyCc);
    addConstructors(cc,proxyCc);
    return cc.toClass();
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
 finally {
    pool.removeClassPath(classPath);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private <T>Class<? extends T> createUnsafeProxyClass(ViewType<T> viewType,Class<?> proxyClass){
  String newCcName;
  Class<?> newClass;
  CtClass newCc;
  CtClass superCc;
  CtClass existingCc;
  if (viewType.getConstructors().isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str" + viewType.getJavaType().getName() + "String_Node_Str");
  }
  ClassPath classPath=new ClassClassPath(proxyClass);
  pool.insertClassPath(classPath);
  Stack<Class<?>> classStack=new Stack<Class<?>>();
  Class<?> current=proxyClass;
  try {
    superCc=pool.get("String_Node_Str");
    do {
      classStack.add(current);
    }
 while ((current=current.getSuperclass()) != Object.class);
    while (classStack.size() > 1) {
      current=classStack.pop();
      newClass=unsafeProxyClasses.get(current);
      if (newClass == null) {
        newCcName=current.getName() + "String_Node_Str" + unsafeClassCounter.getAndIncrement();
        newCc=pool.makeClass(newCcName,superCc);
        existingCc=pool.get(current.getName());
        addFields(newCc,existingCc);
        addMethods(newCc,existingCc);
        newClass=newCc.toClass();
        unsafeProxyClasses.put(current,newClass);
        verifyFieldOffsets(newClass,current);
      }
 else {
        newCc=pool.get(newClass.getName());
      }
      superCc=newCc;
    }
    current=classStack.pop();
    newCcName=current.getName() + "String_Node_Str" + unsafeClassCounter.getAndIncrement();
    newCc=pool.makeClass(newCcName,superCc);
    existingCc=pool.get(current.getName());
    addFields(newCc,existingCc);
    addMethods(newCc,existingCc);
    addConstructors(newCc,existingCc);
    return newCc.toClass();
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
 finally {
    pool.removeClassPath(classPath);
  }
}
Program: 169015
Project: 169015
Buggy source:
public ChainingObjectBuilder(TupleTransformator transformator,ObjectBuilder<T> objectBuilder,QueryBuilder<?,?> queryBuilder,Map<String,Object> optionalParameters,int startIndex){
  this.transformator=transformator;
  this.objectBuilder=objectBuilder;
  transformator.init(queryBuilder,optionalParameters);
}

Fixed version (ground truth):
public ChainingObjectBuilder(TupleTransformatorFactory transformatorFactory,ObjectBuilder<T> objectBuilder,QueryBuilder<?,?> queryBuilder,Map<String,Object> optionalParameters,int startIndex){
  this.transformator=transformatorFactory.create(queryBuilder,optionalParameters);
  this.objectBuilder=objectBuilder;
}
Program: 169016
Project: 169016
Buggy source:
private void applySubviewMapping(Attribute<?,?> attribute,int[] idPositions,Class<?> subviewClass,MappingAttribute<? super T,?> mappingAttribute,List<Object> mappingList,List<String> parameterMappingList){
  ViewType<Object[]> subviewType=(ViewType<Object[]>)evm.getMetamodel().view(subviewClass);
  String subviewAliasPrefix=getAlias(aliasPrefix,attribute);
  List<String> subviewMappingPrefix=createSubviewMappingPrefix(mappingPrefix,mappingAttribute);
  String subviewIdPrefix=getMapping(idPrefix,mappingAttribute);
  int[] subviewIdPositions=new int[idPositions.length + 1];
  System.arraycopy(idPositions,0,subviewIdPositions,0,idPositions.length);
  subviewIdPositions[idPositions.length]=tupleOffset + mappingList.size();
  int startIndex=tupleOffset + mappingList.size();
  ViewTypeObjectBuilderTemplate<Object[]> template=new ViewTypeObjectBuilderTemplate<Object[]>(subviewAliasPrefix,subviewMappingPrefix,subviewIdPrefix,subviewIdPositions,startIndex,metamodel,evm,ef,subviewType,null,proxyFactory);
  Collections.addAll(mappingList,template.mappers);
  for (int i=0; i < template.mappers.length; i++) {
    parameterMappingList.add(null);
  }
  tupleTransformator.add(template.tupleTransformator);
  tupleTransformator.add(new SubviewTupleTransformer(template));
}

Fixed version (ground truth):
private void applySubviewMapping(Attribute<?,?> attribute,int[] idPositions,Class<?> subviewClass,MappingAttribute<? super T,?> mappingAttribute,List<Object> mappingList,List<String> parameterMappingList){
  ViewType<Object[]> subviewType=(ViewType<Object[]>)evm.getMetamodel().view(subviewClass);
  String subviewAliasPrefix=getAlias(aliasPrefix,attribute);
  List<String> subviewMappingPrefix=createSubviewMappingPrefix(mappingPrefix,mappingAttribute);
  String subviewIdPrefix=getMapping(idPrefix,mappingAttribute);
  int[] subviewIdPositions=new int[idPositions.length + 1];
  System.arraycopy(idPositions,0,subviewIdPositions,0,idPositions.length);
  subviewIdPositions[idPositions.length]=tupleOffset + mappingList.size();
  int startIndex=tupleOffset + mappingList.size();
  ViewTypeObjectBuilderTemplate<Object[]> template=new ViewTypeObjectBuilderTemplate<Object[]>(subviewAliasPrefix,subviewMappingPrefix,subviewIdPrefix,subviewIdPositions,startIndex,metamodel,evm,ef,subviewType,null,proxyFactory);
  Collections.addAll(mappingList,template.mappers);
  for (int i=0; i < template.mappers.length; i++) {
    parameterMappingList.add(null);
  }
  tupleTransformatorFactory.add(template.tupleTransformatorFactory);
  tupleTransformatorFactory.add(new SubviewTupleTransformerFactory(template));
}
Program: 169017
Project: 169017
Buggy source:
public ObjectBuilder<T> createObjectBuilder(QueryBuilder<?,?> queryBuilder,Map<String,Object> optionalParameters,boolean isSubview){
  boolean hasOffset=tupleOffset != 0;
  ObjectBuilder<T> result;
  result=new ViewTypeObjectBuilder<T>(this);
  if (hasOffset || isSubview || hasIndexedCollections|| hasSubviews) {
    result=new ReducerViewTypeObjectBuilder<T>(result,tupleOffset,mappers.length);
  }
  if (hasParameters) {
    result=new ParameterViewTypeObjectBuilder(result,this,queryBuilder,optionalParameters,tupleOffset);
  }
  if (tupleTransformator.hasTransformers() && !isSubview) {
    result=new ChainingObjectBuilder<T>(tupleTransformator,result,queryBuilder,optionalParameters,tupleOffset);
  }
  return result;
}

Fixed version (ground truth):
public ObjectBuilder<T> createObjectBuilder(QueryBuilder<?,?> queryBuilder,Map<String,Object> optionalParameters,boolean isSubview){
  boolean hasOffset=tupleOffset != 0;
  ObjectBuilder<T> result;
  result=new ViewTypeObjectBuilder<T>(this);
  if (hasOffset || isSubview || hasIndexedCollections|| hasSubviews) {
    result=new ReducerViewTypeObjectBuilder<T>(result,tupleOffset,mappers.length);
  }
  if (hasParameters) {
    result=new ParameterViewTypeObjectBuilder(result,this,queryBuilder,optionalParameters,tupleOffset);
  }
  if (tupleTransformatorFactory.hasTransformers() && !isSubview) {
    result=new ChainingObjectBuilder<T>(tupleTransformatorFactory,result,queryBuilder,optionalParameters,tupleOffset);
  }
  return result;
}
Program: 169020
Project: 169020
Buggy source:
public Serializable[] getHighest(){
  return KeysetPaginationHelper.extractKey(last,last.length - keysetSize);
}

Fixed version (ground truth):
public Serializable[] getHighest(){
  if (last == null) {
    return null;
  }
  return KeysetPaginationHelper.extractKey(last,last.length - keysetSize);
}
Program: 169021
Project: 169021
Buggy source:
public Serializable[] getLowest(){
  return KeysetPaginationHelper.extractKey(first,first.length - keysetSize);
}

Fixed version (ground truth):
public Serializable[] getLowest(){
  if (first == null) {
    return null;
  }
  return KeysetPaginationHelper.extractKey(first,first.length - keysetSize);
}
Program: 169022
Project: 169022
Buggy source:
Set<String> buildGroupByClauses(){
  if (groupByInfos.isEmpty()) {
    return Collections.EMPTY_SET;
  }
  Set<String> groupByClauses=new HashSet<String>();
  boolean conditionalContext=queryGenerator.setConditionalContext(false);
  for (  NodeInfo info : groupByInfos) {
    StringBuilder sb=StringBuilderProvider.getEmptyStringBuilder();
    queryGenerator.setQueryBuffer(sb);
    info.getExpression().accept(queryGenerator);
    groupByClauses.add(sb.toString());
  }
  queryGenerator.setConditionalContext(conditionalContext);
  return groupByClauses;
}

Fixed version (ground truth):
Set<String> buildGroupByClauses(){
  if (groupByInfos.isEmpty()) {
    return Collections.EMPTY_SET;
  }
  Set<String> groupByClauses=new HashSet<String>();
  boolean conditionalContext=queryGenerator.setConditionalContext(false);
  StringBuilder sb=new StringBuilder();
  for (  NodeInfo info : groupByInfos) {
    sb.setLength(0);
    queryGenerator.setQueryBuffer(sb);
    info.getExpression().accept(queryGenerator);
    groupByClauses.add(sb.toString());
  }
  queryGenerator.setConditionalContext(conditionalContext);
  return groupByClauses;
}
Program: 169023
Project: 169023
Buggy source:
Set<String> buildGroupByClauses(){
  if (orderByInfos.isEmpty()) {
    return Collections.EMPTY_SET;
  }
  Set<String> groupByClauses=new LinkedHashSet<String>();
  Iterator<OrderByInfo> iter=orderByInfos.iterator();
  boolean conditionalContext=queryGenerator.setConditionalContext(false);
  OrderByInfo orderByInfo;
  while (iter.hasNext()) {
    StringBuilder sb=StringBuilderProvider.getEmptyStringBuilder();
    queryGenerator.setQueryBuffer(sb);
    orderByInfo=iter.next();
    String potentialSelectAlias=orderByInfo.getExpression().toString();
    AliasInfo aliasInfo=aliasManager.getAliasInfo(potentialSelectAlias);
    if (aliasInfo != null && aliasInfo instanceof SelectInfo) {
      SelectInfo selectInfo=(SelectInfo)aliasInfo;
      String expressionString=selectInfo.getExpression().toString().toUpperCase();
      if (!expressionString.startsWith("String_Node_Str") && !expressionString.startsWith("String_Node_Str") && !expressionString.startsWith("String_Node_Str")&& !expressionString.startsWith("String_Node_Str")&& !expressionString.startsWith("String_Node_Str")) {
        selectInfo.getExpression().accept(queryGenerator);
        groupByClauses.add(sb.toString());
      }
    }
 else {
      orderByInfo.getExpression().accept(queryGenerator);
      groupByClauses.add(sb.toString());
    }
  }
  queryGenerator.setConditionalContext(conditionalContext);
  return groupByClauses;
}

Fixed version (ground truth):
Set<String> buildGroupByClauses(){
  if (orderByInfos.isEmpty()) {
    return Collections.EMPTY_SET;
  }
  Set<String> groupByClauses=new LinkedHashSet<String>();
  Iterator<OrderByInfo> iter=orderByInfos.iterator();
  boolean conditionalContext=queryGenerator.setConditionalContext(false);
  OrderByInfo orderByInfo;
  StringBuilder sb=new StringBuilder();
  while (iter.hasNext()) {
    sb.setLength(0);
    queryGenerator.setQueryBuffer(sb);
    orderByInfo=iter.next();
    String potentialSelectAlias=orderByInfo.getExpression().toString();
    AliasInfo aliasInfo=aliasManager.getAliasInfo(potentialSelectAlias);
    if (aliasInfo != null && aliasInfo instanceof SelectInfo) {
      SelectInfo selectInfo=(SelectInfo)aliasInfo;
      String expressionString=selectInfo.getExpression().toString().toUpperCase();
      if (!expressionString.startsWith("String_Node_Str") && !expressionString.startsWith("String_Node_Str") && !expressionString.startsWith("String_Node_Str")&& !expressionString.startsWith("String_Node_Str")&& !expressionString.startsWith("String_Node_Str")) {
        selectInfo.getExpression().accept(queryGenerator);
        groupByClauses.add(sb.toString());
      }
    }
 else {
      orderByInfo.getExpression().accept(queryGenerator);
      groupByClauses.add(sb.toString());
    }
  }
  queryGenerator.setConditionalContext(conditionalContext);
  return groupByClauses;
}
Program: 169024
Project: 169024
Buggy source:
Set<String> buildGroupByClauses(final Metamodel m){
  if (selectInfos.isEmpty()) {
    return Collections.EMPTY_SET;
  }
  EntitySelectResolveVisitor resolveVisitor=new EntitySelectResolveVisitor(m);
  for (  SelectInfo selectInfo : selectInfos) {
    selectInfo.getExpression().accept(resolveVisitor);
  }
  Set<String> groupByClauses=new LinkedHashSet<String>();
  boolean conditionalContext=queryGenerator.setConditionalContext(false);
  for (  PathExpression pathExpr : resolveVisitor.getPathExpressions()) {
    StringBuilder sb=StringBuilderProvider.getEmptyStringBuilder();
    queryGenerator.setQueryBuffer(sb);
    pathExpr.accept(queryGenerator);
    groupByClauses.add(sb.toString());
  }
  queryGenerator.setConditionalContext(conditionalContext);
  return groupByClauses;
}

Fixed version (ground truth):
Set<String> buildGroupByClauses(final Metamodel m){
  if (selectInfos.isEmpty()) {
    return Collections.EMPTY_SET;
  }
  EntitySelectResolveVisitor resolveVisitor=new EntitySelectResolveVisitor(m);
  for (  SelectInfo selectInfo : selectInfos) {
    selectInfo.getExpression().accept(resolveVisitor);
  }
  Set<String> groupByClauses=new LinkedHashSet<String>();
  boolean conditionalContext=queryGenerator.setConditionalContext(false);
  StringBuilder sb=new StringBuilder();
  for (  PathExpression pathExpr : resolveVisitor.getPathExpressions()) {
    sb.setLength(0);
    queryGenerator.setQueryBuffer(sb);
    pathExpr.accept(queryGenerator);
    groupByClauses.add(sb.toString());
  }
  queryGenerator.setConditionalContext(conditionalContext);
  return groupByClauses;
}
Program: 169025
Project: 169025
Buggy source:
/** 
 * Adds a entity class to the from clause of the query with the given alias.
 * @param entityClass   The entity class which should be the root entity
 * @param alias         The alias for the root entity
 * @return A new criteria builder
 */
public BaseQueryBuilder<T,?> from(Class<?> entityClass,String alias);

Fixed version (ground truth):
/** 
 * Sets the entity class on which the query should be based on with the given alias.
 * @param entityClass   The entity class which should be the root entity
 * @param alias         The alias for the root entity
 * @return The query builder for chaining calls
 */
public BaseQueryBuilder<T,?> from(Class<?> entityClass,String alias);
Program: 169026
Project: 169026
Buggy source:
/** 
 * Creates a new criteria builder with the given result class.
 * @param entityManager The entity manager to use for the criteria builder
 * @param resultClass   The result class of the query
 * @param < T >           The type of the result class
 * @param alias         The alias that should be used for the result class from clause
 * @return A new criteria builder
 */
public <T>CriteriaBuilder<T> create(EntityManager entityManager,Class<T> resultClass,String alias);

Fixed version (ground truth):
/** 
 * Creates a new criteria builder with the given result class. The result class will be used as default from class. The alias will be used as default alias for the from class. Both can be overridden by invoking   {@link BaseQueryBuilder#from(java.lang.Class,java.lang.String)}.
 * @param entityManager The entity manager to use for the criteria builder
 * @param resultClass   The result class of the query
 * @param < T >           The type of the result class
 * @param alias         The alias that should be used for the result class from clause
 * @return A new criteria builder
 */
public <T>CriteriaBuilder<T> create(EntityManager entityManager,Class<T> resultClass,String alias);
Program: 169027
Project: 169027
Buggy source:
/** 
 * Constructs a between predicate with an expression as upper bound.
 * @param end The upper bound expression
 * @return 
 */
public T andExpression(String end);

Fixed version (ground truth):
/** 
 * Constructs a between predicate with an expression as upper bound.
 * @param end The upper bound expression
 * @return The parent predicate container builder
 */
public T andExpression(String end);
Program: 169028
Project: 169028
Buggy source:
/** 
 * Constructs a between predicate with a parameter as upper bound.
 * @param end The parameter for the upper bound
 * @return 
 */
public T and(Object end);

Fixed version (ground truth):
/** 
 * Constructs a between predicate with a parameter as upper bound.
 * @param end The parameter for the upper bound
 * @return The parent predicate container builder
 */
public T and(Object end);
Program: 169029
Project: 169029
Buggy source:
/** 
 * Starts a   {@link CaseWhenOrThenBuilder} for building a when expression with disjunctively connected predicates. <p> When the builder finishes, the when predicate in conjunction with its then expression are added to the case when builder. <p/>
 * @see CaseWhenStarterBuilder#whenOr() More details about this method
 * @return The or predicate builder for the when expression
 */
public CaseWhenOrThenBuilder<CaseWhenBuilder<T>> caseWhenOr();

Fixed version (ground truth):
/** 
 * Starts a   {@link CaseWhenOrThenBuilder} for building a when expression with disjunctively connected predicates. <p> When the builder finishes, the when predicate in conjunction with its then expression are added to the case when builder. </p>
 * @see CaseWhenStarterBuilder#whenOr() More details about this method
 * @return The or predicate builder for the when expression
 */
public CaseWhenOrThenBuilder<CaseWhenBuilder<T>> caseWhenOr();