nus-yam/ex-repair huggingface dataset:
Program: 14031
Project: 14031
Buggy source:
public Object getValueOfProperty(String propertyName,Object object){
  String name=this.caseSensitive ? propertyName : propertyName.toLowerCase();
  Field field=this.fields.get(propertyName);
  try {
    return field.get(object);
  }
 catch (  IllegalAccessException e) {
    throw new Sql2oException("String_Node_Str" + field.getName() + "String_Node_Str"+ object.getClass().toString(),e);
  }
}

Fixed version (ground truth):
public Object getValueOfProperty(String propertyName,Object object){
  String name=this.caseSensitive ? propertyName : propertyName.toLowerCase();
  Field field=this.fields.get(name);
  try {
    return field.get(object);
  }
 catch (  IllegalAccessException e) {
    throw new Sql2oException("String_Node_Str" + field.getName() + "String_Node_Str"+ object.getClass().toString(),e);
  }
}
Program: 14032
Project: 14032
Buggy source:
private void setField(Object obj,String fieldName,Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
  Class objClass=obj.getClass();
  if (!this.isCaseSensitive()) {
    fieldName=fieldName.toLowerCase();
  }
  fieldName=columnMappings.containsKey(fieldName) ? columnMappings.get(fieldName) : fieldName;
  try {
    Field field=objClass.getField(fieldName);
    value=setterConverter(field.getType(),value);
    field.set(obj,value);
  }
 catch (  NoSuchFieldException nsfe) {
    String methodName=getSetterName(fieldName);
    Method method;
    try {
      method=objClass.getMethod(methodName,value.getClass());
    }
 catch (    NoSuchMethodException ex) {
      if (java.util.Date.class.isAssignableFrom(value.getClass())) {
        method=objClass.getMethod(methodName,DateTime.class);
      }
 else {
        throw ex;
      }
    }
    value=setterConverter(method.getParameterTypes()[0],value);
    method.invoke(obj,value);
  }
}

Fixed version (ground truth):
private void setField(Object obj,String fieldName,Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
  Class objClass=obj.getClass();
  if (!this.isCaseSensitive()) {
    fieldName=fieldName.toLowerCase();
  }
  fieldName=columnMappings.containsKey(fieldName) ? columnMappings.get(fieldName) : fieldName;
  try {
    Field field=objClass.getField(fieldName);
    value=setterConverter(field.getType(),value);
    field.set(obj,value);
  }
 catch (  NoSuchFieldException nsfe) {
    String methodName=getSetterName(fieldName);
    Method method;
    Class valueClass=getValueClass(value);
    try {
      method=objClass.getMethod(methodName,valueClass);
    }
 catch (    NoSuchMethodException ex) {
      if (java.util.Date.class.equals(valueClass)) {
        method=objClass.getMethod(methodName,DateTime.class);
      }
 else {
        throw ex;
      }
    }
    value=setterConverter(method.getParameterTypes()[0],value);
    method.invoke(obj,value);
  }
}
Program: 14033
Project: 14033
Buggy source:
public <T>List<T> executeAndFetch(Class returnType){
  List list=new ArrayList();
  try {
    prepareColumnMappings(returnType);
    java.util.Date st=new java.util.Date();
    ResultSet rs=statement.executeQuery();
    System.out.println(String.format("String_Node_Str",new java.util.Date().getTime() - st.getTime()));
    ResultSetMetaData meta=rs.getMetaData();
    while (rs.next()) {
      Object obj=returnType.newInstance();
      for (int colIdx=1; colIdx <= meta.getColumnCount(); colIdx++) {
        String colName=meta.getColumnName(colIdx);
        String[] fieldPath=colName.split("String_Node_Str");
        if (fieldPath.length == 0) {
          fieldPath=new String[]{colName};
        }
        Object value=rs.getObject(colName);
        Object pathObject=obj;
        for (int pathIdx=0; pathIdx < fieldPath.length; pathIdx++) {
          if (pathIdx == fieldPath.length - 1) {
            setField(pathObject,fieldPath[pathIdx],value);
            break;
          }
          pathObject=instantiateIfNecessary(pathObject,fieldPath[pathIdx]);
        }
      }
      list.add(obj);
    }
    rs.close();
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
 finally {
    closeConnectionIfNecessary();
  }
  return list;
}

Fixed version (ground truth):
public <T>List<T> executeAndFetch(Class returnType){
  List list=new ArrayList();
  try {
    prepareColumnMappings(returnType);
    java.util.Date st=new java.util.Date();
    ResultSet rs=statement.executeQuery();
    System.out.println(String.format("String_Node_Str",new java.util.Date().getTime() - st.getTime()));
    ResultSetMetaData meta=rs.getMetaData();
    while (rs.next()) {
      Object obj=returnType.newInstance();
      for (int colIdx=1; colIdx <= meta.getColumnCount(); colIdx++) {
        String colName=meta.getColumnName(colIdx);
        String[] fieldPath=colName.split("String_Node_Str");
        if (fieldPath.length == 0) {
          fieldPath=new String[]{colName};
        }
        Object value=rs.getObject(colName);
        Object pathObject=obj;
        for (int pathIdx=0; pathIdx < fieldPath.length; pathIdx++) {
          if (pathIdx == fieldPath.length - 1) {
            setField(pathObject,fieldPath[pathIdx],value);
            break;
          }
          pathObject=instantiateIfNecessary(pathObject,fieldPath[pathIdx]);
          prepareColumnMappingsIfNecessary(pathObject.getClass());
        }
      }
      list.add(obj);
    }
    rs.close();
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
 finally {
    closeConnectionIfNecessary();
  }
  return list;
}
Program: 14034
Project: 14034
Buggy source:
public Sql2o executeUpdate(){
  int result;
  try {
    result=statement.executeUpdate();
  }
 catch (  Exception ex) {
    this.sql2O.rollback();
    throw new RuntimeException(ex);
  }
 finally {
    try {
      if (this.sql2O.getConnection().getAutoCommit() && statement != null) {
        try {
          this.sql2O.getConnection().close();
          statement.close();
        }
 catch (        SQLException ex) {
          throw new RuntimeException(ex);
        }
      }
    }
 catch (    SQLException e) {
      throw new RuntimeException(e);
    }
  }
  return this.sql2O;
}

Fixed version (ground truth):
public Sql2o executeUpdate(){
  int result;
  try {
    result=statement.executeUpdate();
    if (this.sql2O.getConnection().getAutoCommit()) {
      this.sql2O.getConnection().close();
      statement.close();
    }
  }
 catch (  Exception ex) {
    this.sql2O.rollback();
    throw new RuntimeException(ex);
  }
  return this.sql2O;
}
Program: 14035
Project: 14035
Buggy source:
public void setUp() throws Exception {
  this.sql2o=new Sql2o(this.url,this.user,this.pass);
  HashMap<String,String> defaultColumnMap=new HashMap<String,String>();
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  sql2o.setDefaultColumnMappings(defaultColumnMap);
}

Fixed version (ground truth):
public void setUp() throws Exception {
  this.sql2o=new Sql2o(this.url,this.user,this.pass);
  HashMap<String,String> defaultColumnMap=new HashMap<String,String>();
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  defaultColumnMap.put("String_Node_Str","String_Node_Str");
  sql2o.setDefaultColumnMappings(defaultColumnMap);
}
Program: 14036
Project: 14036
Buggy source:
public Query(Sql2o sql2O,String queryText){
  this.sql2O=sql2O;
  try {
    statement=new NamedParameterStatement(sql2O.getConnection(),queryText);
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
  this.columnMappings=sql2O.getDefaultColumnMappings() == null ? new HashMap<String,String>() : sql2O.getDefaultColumnMappings();
  this.caseSensitive=sql2O.isDefaultCaseSensitive();
  this.methodsMap=new HashMap<String,Method>();
}

Fixed version (ground truth):
public Query(Connection connection,String queryText){
  this.connection=connection;
  try {
    statement=new NamedParameterStatement(connection.getJdbcConnection(),queryText);
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
  this.columnMappings=connection.getSql2o().getDefaultColumnMappings() == null ? new HashMap<String,String>() : connection.getSql2o().getDefaultColumnMappings();
  this.caseSensitive=connection.getSql2o().isDefaultCaseSensitive();
  this.methodsMap=new HashMap<String,Method>();
}
Program: 14037
Project: 14037
Buggy source:
public Sql2o executeBatch(){
  try {
    statement.executeBatch();
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    closeConnectionIfNecessary();
  }
  return this.sql2O;
}

Fixed version (ground truth):
public Connection executeBatch(){
  try {
    statement.executeBatch();
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    closeConnectionIfNecessary();
  }
  return this.connection;
}
Program: 14038
Project: 14038
Buggy source:
/** 
 * private stuff 
 */
private void closeConnectionIfNecessary(){
  try {
    if (this.sql2O.getConnection().getAutoCommit() && statement != null) {
      sql2O.getConnection().close();
      statement.close();
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
/** 
 * private stuff 
 */
private void closeConnectionIfNecessary(){
  try {
    if (this.connection.getJdbcConnection().getAutoCommit() && statement != null) {
      this.connection.getJdbcConnection().close();
      statement.close();
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}
Program: 14039
Project: 14039
Buggy source:
public Sql2o executeUpdate(){
  int result;
  try {
    result=statement.executeUpdate();
  }
 catch (  Exception ex) {
    this.sql2O.rollback();
    throw new RuntimeException(ex);
  }
 finally {
    closeConnectionIfNecessary();
  }
  return this.sql2O;
}

Fixed version (ground truth):
public Connection executeUpdate(){
  int result;
  try {
    result=statement.executeUpdate();
  }
 catch (  Exception ex) {
    this.connection.rollback();
    throw new RuntimeException(ex);
  }
 finally {
    closeConnectionIfNecessary();
  }
  return this.connection;
}
Program: 14040
Project: 14040
Buggy source:
public Query createQuery(String query){
  try {
    if (this.getConnection().isClosed()) {
      this.createConnection();
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
  Query q=new Query(this,query);
  return q;
}

Fixed version (ground truth):
public Query createQuery(String query){
  Connection connection=new Connection(this);
  return connection.createQuery(query);
}
Program: 14041
Project: 14041
Buggy source:
public Sql2o(String url,String user,String pass){
  this.url=url;
  this.user=user;
  this.pass=pass;
  this.defaultColumnMappings=new HashMap<String,String>();
  this.createConnection();
}

Fixed version (ground truth):
public Sql2o(String url,String user,String pass){
  this.url=url;
  this.user=user;
  this.pass=pass;
  this.defaultColumnMappings=new HashMap<String,String>();
}
Program: 14042
Project: 14042
Buggy source:
public Sql2o beginTransaction(){
  return this.beginTransaction(Connection.TRANSACTION_READ_COMMITTED);
}

Fixed version (ground truth):
public Connection beginTransaction(){
  return this.beginTransaction(java.sql.Connection.TRANSACTION_READ_COMMITTED);
}
Program: 14043
Project: 14043
Buggy source:
public void testExecuteAndFetchWithNulls(){
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  sql2o.createQuery(sql).executeUpdate();
  Query insQuery=sql2o.beginTransaction().createQuery("String_Node_Str");
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",2).addParameter("String_Node_Str",10L).executeUpdate();
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",(Integer)null).addParameter("String_Node_Str",10L).executeUpdate();
  insQuery.addParameter("String_Node_Str",(String)null).addParameter("String_Node_Str",21).addParameter("String_Node_Str",(Long)null).executeUpdate();
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",1221).addParameter("String_Node_Str",10).executeUpdate();
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",2311).addParameter("String_Node_Str",12).executeUpdate();
  sql2o.commit();
  List<TestEntity> fetched=sql2o.createQuery("String_Node_Str").executeAndFetch(TestEntity.class);
  assertTrue(fetched.size() == 5);
  assertNull(fetched.get(2).text);
  assertNotNull(fetched.get(3).text);
  assertNull(fetched.get(1).aNumber);
  assertNotNull(fetched.get(2).aNumber);
  assertNull(fetched.get(2).aLongNumber);
  assertNotNull(fetched.get(3).aLongNumber);
}

Fixed version (ground truth):
public void testExecuteAndFetchWithNulls(){
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  sql2o.createQuery(sql).executeUpdate();
  Connection connection=sql2o.beginTransaction();
  Query insQuery=connection.createQuery("String_Node_Str");
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",2).addParameter("String_Node_Str",10L).executeUpdate();
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",(Integer)null).addParameter("String_Node_Str",10L).executeUpdate();
  insQuery.addParameter("String_Node_Str",(String)null).addParameter("String_Node_Str",21).addParameter("String_Node_Str",(Long)null).executeUpdate();
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",1221).addParameter("String_Node_Str",10).executeUpdate();
  insQuery.addParameter("String_Node_Str","String_Node_Str").addParameter("String_Node_Str",2311).addParameter("String_Node_Str",12).executeUpdate();
  connection.commit();
  List<TestEntity> fetched=sql2o.createQuery("String_Node_Str").executeAndFetch(TestEntity.class);
  assertTrue(fetched.size() == 5);
  assertNull(fetched.get(2).text);
  assertNotNull(fetched.get(3).text);
  assertNull(fetched.get(1).aNumber);
  assertNotNull(fetched.get(2).aNumber);
  assertNull(fetched.get(2).aLongNumber);
  assertNotNull(fetched.get(3).aLongNumber);
}
Program: 14044
Project: 14044
Buggy source:
public List fetch(){
  List list=new ArrayList();
  try {
    ResultSet rs=statement.executeQuery();
    ResultSetMetaData meta=rs.getMetaData();
    while (rs.next()) {
      Object obj=this.destinationClass.newInstance();
      for (int colIdx=1; colIdx <= meta.getColumnCount(); colIdx++) {
        String colName=meta.getColumnName(colIdx);
        int colType=meta.getColumnType(colIdx);
        Object value=rs.getObject(colName);
        try {
          Field field=destinationClass.getField(colName);
          field.set(obj,value);
        }
 catch (        NoSuchFieldException nsfe) {
          String methodName="String_Node_Str" + colName.substring(0,1).toUpperCase() + colName.substring(1);
          Method method=destinationClass.getMethod(methodName,value.getClass());
          method.invoke(obj,value);
        }
      }
      list.add(obj);
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
 finally {
    if (statement != null) {
      try {
        statement.close();
      }
 catch (      Exception ex) {
        throw new RuntimeException(ex);
      }
    }
  }
  return list;
}

Fixed version (ground truth):
public <T>List<T> fetch(){
  List list=new ArrayList();
  try {
    ResultSet rs=statement.executeQuery();
    ResultSetMetaData meta=rs.getMetaData();
    while (rs.next()) {
      Object obj=this.destinationClass.newInstance();
      for (int colIdx=1; colIdx <= meta.getColumnCount(); colIdx++) {
        String colName=meta.getColumnName(colIdx);
        int colType=meta.getColumnType(colIdx);
        Object value=rs.getObject(colName);
        try {
          Field field=destinationClass.getField(colName);
          field.set(obj,value);
        }
 catch (        NoSuchFieldException nsfe) {
          String methodName="String_Node_Str" + colName.substring(0,1).toUpperCase() + colName.substring(1);
          Method method=destinationClass.getMethod(methodName,value.getClass());
          method.invoke(obj,value);
        }
      }
      list.add(obj);
    }
    rs.close();
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
 finally {
    if (statement != null) {
      try {
        statement.getStatement().getConnection().close();
        statement.close();
      }
 catch (      Exception ex) {
        throw new RuntimeException(ex);
      }
    }
  }
  return list;
}
Program: 14045
Project: 14045
Buggy source:
public static Connection createConnection(Sql2o sql2o){
  Properties conProps=new Properties();
  conProps.put("String_Node_Str",sql2o.getUser());
  conProps.put("String_Node_Str",sql2o.getPass());
  Connection con;
  try {
    con=DriverManager.getConnection("String_Node_Str" + sql2o.getUrl(),conProps);
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
  return con;
}

Fixed version (ground truth):
public static Connection createConnection(Sql2o sql2o){
  Properties conProps=new Properties();
  conProps.put("String_Node_Str",sql2o.getUser());
  conProps.put("String_Node_Str",sql2o.getPass());
  Connection con;
  try {
    if (!sql2o.getUrl().startsWith("String_Node_Str")) {
      sql2o.setUrl("String_Node_Str" + sql2o.getUrl());
    }
    con=DriverManager.getConnection(sql2o.getUrl(),conProps);
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
  return con;
}
Program: 14046
Project: 14046
Buggy source:
private boolean isMultipart(MultiValueMap<String,?> map,MediaType contentType){
  if (contentType != null) {
    return MediaType.MULTIPART_FORM_DATA.equals(contentType);
  }
  for (  String name : map.keySet()) {
    for (    Object value : map.get(name)) {
      if (value != null && !(value instanceof String)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isMultipart(MultiValueMap<String,?> map,MediaType contentType){
  if (contentType != null) {
    return MediaType.MULTIPART_FORM_DATA.includes(contentType);
  }
  for (  String name : map.keySet()) {
    for (    Object value : map.get(name)) {
      if (value != null && !(value instanceof String)) {
        return true;
      }
    }
  }
  return false;
}
Program: 14047
Project: 14047
Buggy source:
/** 
 * Opens and returns a connection to the given URL. <p> The default implementation uses the given   {@linkplain #setProxy(java.net.Proxy) proxy} - if any - to open aconnection.
 * @param url the URL to open a connection to
 * @param proxy the proxy to use, may be {@code null}
 * @return the opened connection
 * @throws IOException in case of I/O errors
 */
protected HttpURLConnection openConnection(URL url,Proxy proxy) throws IOException {
  URLConnection urlConnection=(proxy != null ? url.openConnection(proxy) : url.openConnection());
  Assert.isInstanceOf(HttpURLConnection.class,urlConnection);
  return (HttpURLConnection)urlConnection;
}

Fixed version (ground truth):
/** 
 * Opens and returns a connection to the given URL. <p> The default implementation uses the given   {@linkplain #setProxy(java.net.Proxy) proxy} - if any - to open aconnection.
 * @param url the URL to open a connection to
 * @param proxy the proxy to use, may be {@code null}
 * @return the opened connection
 * @throws IOException in case of I/O errors
 */
protected HttpURLConnection openConnection(URL url,Proxy proxy) throws IOException {
  if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.FROYO) {
    System.setProperty("String_Node_Str","String_Node_Str");
  }
  URLConnection urlConnection=(proxy != null ? url.openConnection(proxy) : url.openConnection());
  Assert.isInstanceOf(HttpURLConnection.class,urlConnection);
  return (HttpURLConnection)urlConnection;
}
Program: 14048
Project: 14048
Buggy source:
SimpleStreamingClientHttpRequest(HttpURLConnection connection,int chunkSize){
  this.connection=connection;
  this.chunkSize=chunkSize;
  if (olderThanFroyo) {
    System.setProperty("String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
SimpleStreamingClientHttpRequest(HttpURLConnection connection,int chunkSize){
  this.connection=connection;
  this.chunkSize=chunkSize;
}
Program: 14049
Project: 14049
Buggy source:
/** 
 * Returns the response body as a string.
 */
public String getResponseBodyAsString(){
  try {
    return new String(responseBody,responseCharset.name());
  }
 catch (  UnsupportedEncodingException ex) {
    throw new InternalError(ex.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Returns the response body as a string.
 */
public String getResponseBodyAsString(){
  try {
    return new String(responseBody,responseCharset);
  }
 catch (  UnsupportedEncodingException ex) {
    throw new InternalError(ex.getMessage());
  }
}
Program: 14050
Project: 14050
Buggy source:
/** 
 * Construct a new instance of   {@code HttpStatusCodeException} based on a {@link HttpStatus}, status text, and response body content.
 * @param statusCode	  the status code
 * @param statusText	  the status text
 * @param responseBody	the response body content, may be {@code null}
 * @param responseCharset the response body charset, may be {@code null}
 */
protected HttpStatusCodeException(HttpStatus statusCode,String statusText,byte[] responseBody,Charset responseCharset){
  super(statusCode.value() + "String_Node_Str" + statusText);
  this.statusCode=statusCode;
  this.statusText=statusText;
  this.responseBody=responseBody != null ? responseBody : new byte[0];
  this.responseCharset=responseCharset != null ? responseCharset : DEFAULT_CHARSET;
}

Fixed version (ground truth):
/** 
 * Construct a new instance of   {@code HttpStatusCodeException} based on a {@link HttpStatus}, status text, and response body content.
 * @param statusCode	  the status code
 * @param statusText	  the status text
 * @param responseBody	the response body content, may be {@code null}
 * @param responseCharset the response body charset, may be {@code null}
 */
protected HttpStatusCodeException(HttpStatus statusCode,String statusText,byte[] responseBody,Charset responseCharset){
  super(statusCode.value() + "String_Node_Str" + statusText);
  this.statusCode=statusCode;
  this.statusText=statusText;
  this.responseBody=responseBody != null ? responseBody : new byte[0];
  this.responseCharset=responseCharset != null ? responseCharset.name() : DEFAULT_CHARSET;
}
Program: 14051
Project: 14051
Buggy source:
@Override protected void doPost(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  byte[] body="String_Node_Str".getBytes("String_Node_Str");
  resp.setStatus(HttpServletResponse.SC_OK);
  if (containsHeader(req,"String_Node_Str","String_Node_Str")) {
    GZIPInputStream gzipInputStream=new GZIPInputStream(req.getInputStream());
    byte[] decompressedBody=FileCopyUtils.copyToByteArray(gzipInputStream);
    gzipInputStream.close();
    assertTrue("String_Node_Str",Arrays.equals(decompressedBody,body));
  }
 else {
    byte[] decompressedBody=FileCopyUtils.copyToByteArray(req.getInputStream());
    assertTrue("String_Node_Str",Arrays.equals(decompressedBody,body));
  }
}

Fixed version (ground truth):
@Override protected void doPost(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  byte[] body="String_Node_Str".getBytes("String_Node_Str");
  resp.setStatus(HttpServletResponse.SC_OK);
  if (containsHeader(req,"String_Node_Str","String_Node_Str")) {
    GZIPInputStream gzipInputStream=new GZIPInputStream(req.getInputStream());
    ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
    int byteCount=0;
    byte[] buffer=new byte[4096];
    int bytesRead=-1;
    while ((bytesRead=gzipInputStream.read(buffer)) != -1) {
      byteArrayOutputStream.write(buffer,0,bytesRead);
      byteCount+=bytesRead;
    }
    byteArrayOutputStream.flush();
    gzipInputStream.close();
    assertEquals("String_Node_Str",body.length,byteCount);
    assertTrue("String_Node_Str",Arrays.equals(byteArrayOutputStream.toByteArray(),body));
  }
 else {
    byte[] decompressedBody=FileCopyUtils.copyToByteArray(req.getInputStream());
    assertTrue("String_Node_Str",Arrays.equals(decompressedBody,body));
  }
}
Program: 14052
Project: 14052
Buggy source:
@Override protected ClientHttpResponse executeInternal(HttpHeaders headers,byte[] bufferedOutput) throws IOException {
  this.request.getHeaders().putAll(headers);
  OutputStream body=this.request.getBody();
  FileCopyUtils.copy(bufferedOutput,body);
  ClientHttpResponse response=this.request.execute();
  return new BufferingClientHttpResponseWrapper(response);
}

Fixed version (ground truth):
@Override protected ClientHttpResponse executeInternal(HttpHeaders headers,byte[] bufferedOutput) throws IOException {
  OutputStream body=this.request.getBody();
  this.request.getHeaders().putAll(headers);
  FileCopyUtils.copy(bufferedOutput,body);
  ClientHttpResponse response=this.request.execute();
  return new BufferingClientHttpResponseWrapper(response);
}
Program: 14053
Project: 14053
Buggy source:
/** 
 * Template method that allows for manipulating the   {@link HttpUriRequest}before it is returned as part of a   {@link HttpComponentsClientHttpRequest}. <p>The default implementation is empty.
 * @param httpRequest the HTTP request object to process
 */
protected void postProcessHttpRequest(HttpUriRequest httpRequest){
}

Fixed version (ground truth):
/** 
 * Template method that allows for manipulating the   {@link HttpUriRequest}before it is returned as part of a   {@link HttpComponentsClientHttpRequest}. <p>The default implementation is empty.
 * @param httpRequest the HTTP request object to process
 */
protected void postProcessHttpRequest(HttpUriRequest httpRequest){
  HttpParams params=httpRequest.getParams();
  HttpProtocolParams.setUseExpectContinue(params,false);
}
Program: 14054
Project: 14054
Buggy source:
@PostLoad private void onLoad(){
  immutableTags=ImmutableList.copyOf(tags != null ? tags.stream().map(t -> new InstanceTag(){
    private String key=t.getKey();
    private String value=t.getValue();
    @Override public String getKey(){
      return this.key;
    }
    @Override public void setKey(    String key){
      this.key=key;
    }
    @Override public String getValue(){
      return this.value;
    }
    @Override public void setValue(    String value){
      this.value=value;
    }
  }
).collect(Collectors.toList()) : Lists.newArrayList());
}

Fixed version (ground truth):
@PostLoad private void onLoad(){
  immutableTags=ImmutableList.<InstanceTag>copyOf(tags != null ? tags.stream().<InstanceTag>map(t -> new InstanceTag(){
    private String key=t.getKey();
    private String value=t.getValue();
    @Override public String getKey(){
      return this.key;
    }
    @Override public void setKey(    String key){
      this.key=key;
    }
    @Override public String getValue(){
      return this.value;
    }
    @Override public void setValue(    String value){
      this.value=value;
    }
  }
).collect(Collectors.<InstanceTag>toList()) : Lists.<InstanceTag>newArrayList());
}
Program: 14056
Project: 14056
Buggy source:
private static <T>Iterable<List<T>> shufflePartitions(final List<T> pending){
  return Iterables.transform(Iterables.partition(pending,40),segment -> {
    List<T> copy=Lists.newArrayList(segment);
    Collections.shuffle(copy);
    return copy;
  }
);
}

Fixed version (ground truth):
private static <T>Iterable<List<T>> shufflePartitions(final List<T> pending){
  return (Iterable<List<T>>)Iterables.transform(Iterables.partition(pending,40),segment -> {
    List<T> copy=Lists.newArrayList(segment);
    Collections.shuffle(copy);
    return copy;
  }
);
}
Program: 14057
Project: 14057
Buggy source:
@Override protected SwfMetadataException notFoundException(final String message,final Throwable cause){
  return new SwfMetadataNotFoundException(message,cause);
}

Fixed version (ground truth):
@Override protected SwfMetadataException notFoundException(final String message,final Throwable cause){
  final SwfMetadataNotFoundException existingException=Exceptions.findCause(cause,SwfMetadataNotFoundException.class);
  if (existingException != null) {
    return existingException;
  }
 else {
    return new SwfMetadataNotFoundException(message,cause);
  }
}
Program: 14058
Project: 14058
Buggy source:
@Override protected SwfMetadataException metadataException(final String message,final Throwable cause){
  return new SwfMetadataException(message,cause);
}

Fixed version (ground truth):
@Override protected SwfMetadataException metadataException(final String message,final Throwable cause){
  final SwfMetadataException existingException=Exceptions.findCause(cause,SwfMetadataException.class);
  if (existingException != null) {
    return existingException;
  }
 else {
    return new SwfMetadataException(message,cause);
  }
}
Program: 14060
Project: 14060
Buggy source:
@Override public String createSnapshotPoint(String parentVolumeId,String snapshotId,String parentVolumeIqn) throws EucalyptusCloudException {
  LOG.info("String_Node_Str" + parentVolumeId + "String_Node_Str"+ snapshotId+ "String_Node_Str"+ parentVolumeIqn);
  CanonicalRbdObject parent=CanonicalRbdObject.parse(parentVolumeIqn);
  if (parent != null && !Strings.isNullOrEmpty(parent.getPool())) {
    String snapshotPoint=CephRbdInfo.SNAPSHOT_FOR_PREFIX + snapshotId;
    String snapshotPointId=null;
    EucaSemaphore semaphore=EucaSemaphoreDirectory.getSolitarySemaphore(SEMAPHORE_PREFIX + parentVolumeId);
    try {
      try {
        semaphore.acquire();
      }
 catch (      InterruptedException ex) {
        throw new EucalyptusCloudException("String_Node_Str" + snapshotId + "String_Node_Str"+ parentVolumeId+ "String_Node_Str");
      }
      snapshotPointId=rbdService.createSnapshot(parentVolumeId,snapshotPoint,parent.getPool());
    }
  finally {
      semaphore.release();
    }
    LOG.info("String_Node_Str" + parentVolumeId + "String_Node_Str"+ snapshotId+ "String_Node_Str"+ parentVolumeIqn);
    return snapshotPointId;
  }
 else {
    LOG.warn("String_Node_Str" + parentVolumeIqn);
    throw new EucalyptusCloudException("String_Node_Str" + snapshotId + "String_Node_Str"+ parentVolumeIqn);
  }
}

Fixed version (ground truth):
@Override public String createSnapshotPoint(String parentVolumeId,String snapshotId,String parentVolumeIqn) throws EucalyptusCloudException {
  LOG.info("String_Node_Str" + parentVolumeId + "String_Node_Str"+ snapshotId+ "String_Node_Str"+ parentVolumeIqn);
  CanonicalRbdObject parent=CanonicalRbdObject.parse(parentVolumeIqn);
  if (parent != null && !Strings.isNullOrEmpty(parent.getPool())) {
    String snapshotPoint=CephRbdInfo.SNAPSHOT_FOR_PREFIX + snapshotId;
    String snapshotPointId=null;
    EucaSemaphore semaphore=EucaSemaphoreDirectory.getSolitarySemaphore(SEMAPHORE_PREFIX + parentVolumeId);
    try {
      semaphore.acquire();
      LOG.trace("String_Node_Str" + parentVolumeId);
    }
 catch (    InterruptedException ex) {
      throw new EucalyptusCloudException("String_Node_Str" + snapshotId + "String_Node_Str"+ parentVolumeId+ "String_Node_Str");
    }
    try {
      snapshotPointId=rbdService.createSnapshot(parentVolumeId,snapshotPoint,parent.getPool());
    }
  finally {
      LOG.trace("String_Node_Str" + parentVolumeId);
      semaphore.release();
    }
    LOG.info("String_Node_Str" + parentVolumeId + "String_Node_Str"+ snapshotId+ "String_Node_Str"+ parentVolumeIqn);
    return snapshotPointId;
  }
 else {
    LOG.warn("String_Node_Str" + parentVolumeIqn);
    throw new EucalyptusCloudException("String_Node_Str" + snapshotId + "String_Node_Str"+ parentVolumeIqn);
  }
}
Program: 14062
Project: 14062
Buggy source:
/** 
 * Check the output for the given lun
 * @param output
 * @param lun
 * @param tid the target to look in
 * @return
 */
private static boolean hasLun(@Nonnull String output,int tid,int lun){
  Matcher targetMatcher=null;
  Matcher lunMatcher=null;
  String target=null;
  for (  String line : LINE_SPLITTER.split(output)) {
    targetMatcher=TARGET_PATTERN.matcher(line);
    if (targetMatcher.matches()) {
      target=targetMatcher.group(1);
      if (Integer.parseInt(targetMatcher.group(1)) != tid) {
        target=null;
        continue;
      }
    }
 else {
      if (target != null) {
        lunMatcher=LUN_PATTERN.matcher(line);
        if (lunMatcher.matches() && lunMatcher.group(1).equals(String.valueOf(lun))) {
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Check the output for the given lun
 * @param output
 * @param lun
 * @param tid the target to look in
 * @return
 */
private static boolean hasLun(@Nonnull String output,int tid,int lun){
  Matcher targetMatcher=null;
  Matcher lunMatcher=null;
  String target=null;
  for (  String line : LINE_SPLITTER.split(output)) {
    targetMatcher=TARGET_PATTERN.matcher(line);
    if (targetMatcher.matches()) {
      if (target == null) {
        if (Integer.parseInt(targetMatcher.group(1)) == tid) {
          target=targetMatcher.group(1);
        }
      }
 else {
        break;
      }
      continue;
    }
    if (target == null) {
      continue;
    }
    lunMatcher=LUN_PATTERN.matcher(line);
    if (lunMatcher.matches() && lunMatcher.group(1).equals(String.valueOf(lun))) {
      return true;
    }
  }
  return false;
}
Program: 14063
Project: 14063
Buggy source:
/** 
 * Is ObjectSTorage domainname a subdomain of the host header host. If so, then it is likely a bucket prefix. Includes checksd for Walrus domain (walrus.myserver.com) for legacy support But, since S3 buckets can include '.' can't just parse on '.'s
 * @param fullHostHeader
 * @return
 */
private boolean maybeBucketHostedStyle(String fullHostHeader){
  final String host=Iterables.getFirst(hostSplitter.split(fullHostHeader),fullHostHeader);
  try {
    final Name hostDnsName=Name.fromString(host,Name.root);
    return DomainNames.systemDomainFor(ObjectStorage.class,hostDnsName).isPresent();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + fullHostHeader,e);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Is ObjectSTorage domainname a subdomain of the host header host. If so, then it is likely a bucket prefix. Includes checksd for Walrus domain (walrus.myserver.com) for legacy support But, since S3 buckets can include '.' can't just parse on '.'s
 * @param fullHostHeader
 * @return
 */
private boolean maybeBucketHostedStyle(String fullHostHeader){
  if (!Strings.isNullOrEmpty(fullHostHeader))   try {
    final String host=Iterables.getFirst(hostSplitter.split(fullHostHeader),fullHostHeader);
    final Name hostDnsName=Name.fromString(host,Name.root);
    return DomainNames.systemDomainFor(ObjectStorage.class,hostDnsName).isPresent();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + fullHostHeader,e);
  }
  return false;
}
Program: 14064
Project: 14064
Buggy source:
@Asynchronous private void doPutMetric(final int count,final Promise<List<String>> servoInstances){
  final Map<String,Promise<String>> metrics=Maps.newHashMap();
  final List<String> instances=servoInstances.get();
  for (  final String instanceId : instances) {
    final ActivitySchedulingOptions scheduler=new ActivitySchedulingOptions();
    scheduler.setTaskList(instanceId);
    scheduler.setScheduleToCloseTimeoutSeconds(10L);
    metrics.put(instanceId,vmClient.getCloudWatchMetrics(scheduler));
  }
  final Promise<Map<String,String>> metricMap=Promises.mapOfPromisesToPromise(metrics);
  client.putCloudWatchMetrics(Promise.asPromise(this.accountId),Promise.asPromise(this.loadbalancer),metricMap);
  client.putCloudWatchInstanceHealth(this.accountId,this.loadbalancer);
  final WorkflowClock clock=contextProvider.getDecisionContext().getWorkflowClock();
  final Promise<Void> timer=clock.createTimer(PUT_PERIOD_SEC);
  putCloudWatchMetricPeriodic(count + 1,timer);
}

Fixed version (ground truth):
@Asynchronous private void doPutMetric(final int count,final Promise<List<String>> servoInstances){
  final Map<String,Promise<String>> metrics=Maps.newHashMap();
  final List<String> instances=servoInstances.get();
  for (  final String instanceId : instances) {
    final ActivitySchedulingOptions scheduler=new ActivitySchedulingOptions();
    scheduler.setTaskList(instanceId);
    scheduler.setScheduleToCloseTimeoutSeconds(120L);
    scheduler.setStartToCloseTimeoutSeconds(10L);
    metrics.put(instanceId,vmClient.getCloudWatchMetrics(scheduler));
  }
  final Promise<Map<String,String>> metricMap=Promises.mapOfPromisesToPromise(metrics);
  final List<Promise<Void>> activities=Lists.newArrayList();
  activities.add(client.putCloudWatchMetrics(Promise.asPromise(this.accountId),Promise.asPromise(this.loadbalancer),metricMap));
  activities.add(client.putCloudWatchInstanceHealth(this.accountId,this.loadbalancer));
  final Promise<Void> timer=startDaemonTimer(PUT_PERIOD_SEC);
  putCloudWatchMetricPeriodic(count + 1,new AndPromise(timer,Promises.listOfPromisesToPromise(activities)));
}
Program: 14065
Project: 14065
Buggy source:
@Asynchronous private void doPollStatus(final int count,final Promise<List<String>> servoInstances){
  final List<String> instances=servoInstances.get();
  final List<Promise<Void>> activities=Lists.newArrayList();
  for (  final String instanceId : instances) {
    final ActivitySchedulingOptions scheduler=new ActivitySchedulingOptions();
    scheduler.setTaskList(instanceId);
    scheduler.setScheduleToCloseTimeoutSeconds(10L);
    activities.add(client.updateInstanceStatus(Promise.asPromise(accountId),Promise.asPromise(loadbalancer),client.filterInstanceStatus(Promise.asPromise(accountId),Promise.asPromise(loadbalancer),Promise.asPromise(instanceId),vmClient.getInstanceStatus(scheduler))));
  }
  final Promise<Void> timer=startDaemonTimer(this.pollingPeriodSec);
  final OrPromise waitOrSignal=new OrPromise(timer,signalReceived);
  pollInstanceStatusPeriodic(count + 1,new AndPromise(Promises.listOfPromisesToPromise(activities),waitOrSignal));
}

Fixed version (ground truth):
@Asynchronous private void doPollStatus(final int count,final Promise<List<String>> servoInstances){
  final List<String> instances=servoInstances.get();
  final List<Promise<Void>> activities=Lists.newArrayList();
  for (  final String instanceId : instances) {
    final ActivitySchedulingOptions scheduler=new ActivitySchedulingOptions();
    scheduler.setTaskList(instanceId);
    scheduler.setScheduleToCloseTimeoutSeconds(120L);
    scheduler.setStartToCloseTimeoutSeconds(10L);
    activities.add(client.updateInstanceStatus(Promise.asPromise(accountId),Promise.asPromise(loadbalancer),client.filterInstanceStatus(Promise.asPromise(accountId),Promise.asPromise(loadbalancer),Promise.asPromise(instanceId),vmClient.getInstanceStatus(scheduler))));
  }
  final Promise<Void> timer=startDaemonTimer(this.pollingPeriodSec);
  final OrPromise waitOrSignal=new OrPromise(timer,signalReceived);
  pollInstanceStatusPeriodic(count + 1,new AndPromise(Promises.listOfPromisesToPromise(activities),waitOrSignal));
}
Program: 14067
Project: 14067
Buggy source:
/** 
 * Method always throws, signature allows use of "throw handleException ..."
 */
private IdentityServiceException handleException(final Exception e) throws IdentityServiceException {
  final IdentityServiceException cause=Exceptions.findCause(e,IdentityServiceException.class);
  if (cause != null) {
    throw cause;
  }
  logger.error(e,e);
  final IdentityServiceException exception=new IdentityServiceReceiverException("String_Node_Str",String.valueOf(e.getMessage()));
  if (Contexts.lookup().hasAdministrativePrivileges()) {
    exception.initCause(e);
  }
  throw exception;
}

Fixed version (ground truth):
/** 
 * Method always throws, signature allows use of "throw handleException ..."
 */
private static IdentityServiceException handleException(final Exception e) throws IdentityServiceException {
  final IdentityServiceException cause=Exceptions.findCause(e,IdentityServiceException.class);
  if (cause != null) {
    throw cause;
  }
  AuthException auth=Exceptions.findCause(e,AuthException.class);
  if (auth == null || !isNotFoundError(auth)) {
    logger.error(e,e);
  }
  final IdentityServiceException exception=new IdentityServiceReceiverException("String_Node_Str",String.valueOf(e.getMessage()));
  if (Contexts.lookup().hasAdministrativePrivileges()) {
    exception.initCause(e);
  }
  throw exception;
}
Program: 14068
Project: 14068
Buggy source:
public SignCertificateResponseType signCertificate(final SignCertificateType request) throws IdentityServiceException {
  final SignCertificateResponseType response=request.getReply();
  final SignCertificateResult result=new SignCertificateResult();
  final String pubkey=request.getKey();
  final String principal=request.getPrincipal();
  final Integer expirationDays=request.getExpirationDays();
  if (Strings.isNullOrEmpty(pubkey))   throw new IdentityServiceSenderException("String_Node_Str","String_Node_Str");
  if (Strings.isNullOrEmpty(principal))   throw new IdentityServiceSenderException("String_Node_Str","String_Node_Str");
  try {
    final KeyFactory keyFactory=KeyFactory.getInstance("String_Node_Str","String_Node_Str");
    final X509EncodedKeySpec publicKeySpec=new X509EncodedKeySpec(B64.standard.dec(pubkey));
    final PublicKey publicKey=keyFactory.generatePublic(publicKeySpec);
    final X509Certificate vmCert=EuareServerCertificateUtil.generateVMCertificate((RSAPublicKey)publicKey,principal,Objects.firstNonNull(expirationDays,180));
    final String certPem=new String(PEMFiles.getBytes(vmCert));
    result.setPem(certPem);
  }
 catch (  final Exception ex) {
    throw new IdentityServiceReceiverException("String_Node_Str",String.valueOf(ex.getMessage()));
  }
  response.setSignCertificateResult(result);
  return response;
}

Fixed version (ground truth):
public SignCertificateResponseType signCertificate(final SignCertificateType request) throws IdentityServiceException {
  final SignCertificateResponseType response=request.getReply();
  final SignCertificateResult result=new SignCertificateResult();
  final String pubkey=request.getKey();
  final String principal=request.getPrincipal();
  final Integer expirationDays=request.getExpirationDays();
  if (Strings.isNullOrEmpty(pubkey))   throw new IdentityServiceSenderException("String_Node_Str","String_Node_Str");
  if (Strings.isNullOrEmpty(principal))   throw new IdentityServiceSenderException("String_Node_Str","String_Node_Str");
  try {
    final KeyFactory keyFactory=KeyFactory.getInstance("String_Node_Str","String_Node_Str");
    final X509EncodedKeySpec publicKeySpec=new X509EncodedKeySpec(B64.standard.dec(pubkey));
    final PublicKey publicKey=keyFactory.generatePublic(publicKeySpec);
    final X509Certificate vmCert=EuareServerCertificateUtil.generateVMCertificate((RSAPublicKey)publicKey,principal,MoreObjects.firstNonNull(expirationDays,180));
    final String certPem=new String(PEMFiles.getBytes(vmCert));
    result.setPem(certPem);
  }
 catch (  final Exception ex) {
    throw new IdentityServiceReceiverException("String_Node_Str",String.valueOf(ex.getMessage()));
  }
  response.setSignCertificateResult(result);
  return response;
}
Program: 14071
Project: 14071
Buggy source:
private void validateAndUpdateParameters(List<Parameter> previousParameters,List<Parameter> nextParameters) throws ValidationErrorException {
  Map<String,String> previousParameterMap=Maps.newHashMap();
  for (  Parameter previousParameter : previousParameters) {
    previousParameterMap.put(previousParameter.getParameterKey(),previousParameter.getParameterValue());
  }
  if (nextParameters != null) {
    for (    Parameter nextParameter : nextParameters) {
      if (nextParameter.getUsePreviousValue() == Boolean.TRUE) {
        if (Strings.isNullOrEmpty(nextParameter.getParameterValue())) {
          throw new ValidationErrorException("String_Node_Str" + nextParameter.getParameterKey() + "String_Node_Str");
        }
        if (!previousParameterMap.containsKey(nextParameter.getParameterKey())) {
          throw new ValidationErrorException("String_Node_Str" + nextParameter.getParameterKey() + "String_Node_Str");
        }
        nextParameter.setParameterValue(previousParameterMap.get(nextParameter.getParameterKey()));
      }
    }
  }
}

Fixed version (ground truth):
private void validateAndUpdateParameters(List<Parameter> previousParameters,List<Parameter> nextParameters) throws ValidationErrorException {
  Map<String,String> previousParameterMap=Maps.newHashMap();
  for (  Parameter previousParameter : previousParameters) {
    previousParameterMap.put(previousParameter.getParameterKey(),previousParameter.getParameterValue());
  }
  if (nextParameters != null) {
    for (    Parameter nextParameter : nextParameters) {
      if (Boolean.TRUE.equals(nextParameter.getUsePreviousValue())) {
        if (Strings.isNullOrEmpty(nextParameter.getParameterValue())) {
          throw new ValidationErrorException("String_Node_Str" + nextParameter.getParameterKey() + "String_Node_Str");
        }
        if (!previousParameterMap.containsKey(nextParameter.getParameterKey())) {
          throw new ValidationErrorException("String_Node_Str" + nextParameter.getParameterKey() + "String_Node_Str");
        }
        nextParameter.setParameterValue(previousParameterMap.get(nextParameter.getParameterKey()));
      }
    }
  }
}
Program: 14074
Project: 14074
Buggy source:
private boolean stackPolicyIsDifferent(String previousStackPolicy,String nextStackPolicy) throws ValidationErrorException {
  if (nextStackPolicy == null)   return false;
  if (previousStackPolicy == null && previousStackPolicy != null)   return true;
  ObjectMapper objectMapper=new ObjectMapper();
  JsonNode previousStackPolicyNode=null;
  try {
    previousStackPolicyNode=objectMapper.readTree(previousStackPolicy);
  }
 catch (  IOException ex) {
    throw new ValidationErrorException("String_Node_Str");
  }
  if (!previousStackPolicyNode.isObject()) {
    throw new ValidationErrorException("String_Node_Str");
  }
  JsonNode nextStackPolicyNode=null;
  try {
    nextStackPolicyNode=objectMapper.readTree(nextStackPolicy);
  }
 catch (  IOException ex) {
    throw new ValidationErrorException("String_Node_Str");
  }
  if (!nextStackPolicyNode.isObject()) {
    throw new ValidationErrorException("String_Node_Str");
  }
  return equalsJsonUnorderedLists(previousStackPolicyNode,nextStackPolicyNode);
}

Fixed version (ground truth):
private boolean stackPolicyIsDifferent(String previousStackPolicy,String nextStackPolicy) throws ValidationErrorException {
  if (nextStackPolicy == null)   return false;
  if (previousStackPolicy == null && nextStackPolicy != null)   return true;
  ObjectMapper objectMapper=new ObjectMapper();
  JsonNode previousStackPolicyNode=null;
  try {
    previousStackPolicyNode=objectMapper.readTree(previousStackPolicy);
  }
 catch (  IOException ex) {
    throw new ValidationErrorException("String_Node_Str");
  }
  if (!previousStackPolicyNode.isObject()) {
    throw new ValidationErrorException("String_Node_Str");
  }
  JsonNode nextStackPolicyNode=null;
  try {
    nextStackPolicyNode=objectMapper.readTree(nextStackPolicy);
  }
 catch (  IOException ex) {
    throw new ValidationErrorException("String_Node_Str");
  }
  if (!nextStackPolicyNode.isObject()) {
    throw new ValidationErrorException("String_Node_Str");
  }
  return equalsJsonUnorderedLists(previousStackPolicyNode,nextStackPolicyNode);
}