nus-yam/ex-repair huggingface dataset:
Program: 40740
Project: 40740
Buggy source:
public void readFields(DataInput in) throws IOException {
  writer.readFields(in);
  double[] zUpdated=writer.get();
  DoubleWritable rho=new DoubleWritable();
  rho.readFields(in);
  DoubleWritable lambda=new DoubleWritable();
  lambda.readFields(in);
  DoubleWritable primalObjectiveValue=new DoubleWritable();
  primalObjectiveValue.readFields(in);
  LongWritable count=new LongWritable();
  count.readFields(in);
  context=new AdmmReducerContext(null,null,null,zUpdated,primalObjectiveValue.get(),rho.get(),lambda.get(),count.get());
}

Fixed version (ground truth):
public void readFields(DataInput in) throws IOException {
  BooleanWritable flag=new BooleanWritable(false);
  flag.readFields(in);
  double[] xUpdated=null;
  if (flag.get()) {
    DoubleArrayWritable reader=new DoubleArrayWritable();
    reader.readFields(in);
    xUpdated=reader.get();
  }
  flag.set(false);
  double[] uInitial=null;
  flag.readFields(in);
  if (flag.get()) {
    DoubleArrayWritable reader=new DoubleArrayWritable();
    reader.readFields(in);
    uInitial=reader.get();
  }
  flag.set(false);
  double[] zUpdated=null;
  flag.readFields(in);
  if (flag.get()) {
    DoubleArrayWritable reader=new DoubleArrayWritable();
    reader.readFields(in);
    zUpdated=reader.get();
  }
  flag.set(false);
  DoubleWritable rho=new DoubleWritable();
  rho.readFields(in);
  DoubleWritable lambda=new DoubleWritable();
  lambda.readFields(in);
  DoubleWritable primalObjectiveValue=new DoubleWritable();
  primalObjectiveValue.readFields(in);
  LongWritable count=new LongWritable();
  count.readFields(in);
  context=new AdmmReducerContext(null,uInitial,xUpdated,zUpdated,primalObjectiveValue.get(),rho.get(),lambda.get(),count.get());
}
Program: 40741
Project: 40741
Buggy source:
public void write(DataOutput out) throws IOException {
  writer.set(context.getZUpdated());
  writer.write(out);
  new DoubleWritable(context.getRho()).write(out);
  new DoubleWritable(context.getLambdaValue()).write(out);
  new DoubleWritable(context.getPrimalObjectiveValue()).write(out);
  new LongWritable(context.getCount()).write(out);
}

Fixed version (ground truth):
public void write(DataOutput out) throws IOException {
  new BooleanWritable(null != context.getXUpdated()).write(out);
  if (null != context.getXUpdated()) {
    writer.set(context.getXUpdated());
    writer.write(out);
  }
  new BooleanWritable(null != context.getUInitial()).write(out);
  if (null != context.getUInitial()) {
    writer.set(context.getUInitial());
    writer.write(out);
  }
  new BooleanWritable(null != context.getZUpdated()).write(out);
  if (null != context.getZUpdated()) {
    writer.set(context.getZUpdated());
    writer.write(out);
  }
  new DoubleWritable(context.getRho()).write(out);
  new DoubleWritable(context.getLambdaValue()).write(out);
  new DoubleWritable(context.getPrimalObjectiveValue()).write(out);
  new LongWritable(context.getCount()).write(out);
}
Program: 40742
Project: 40742
Buggy source:
public LogisticL2DiffFunction(Vector[] a,double[] b,double rho,double[] u,double[] z){
  LOG.info("String_Node_Str");
  this.a=a;
  this.b=b;
  this.rho=rho;
  this.m=a.length;
  if (this.m > 0) {
    this.n=this.a[0].size() - 1;
  }
 else {
    this.n=0;
  }
  Long bytes=(long)0;
  for (int row=0; row < this.m; row++) {
    Vector v=this.a[row];
    double ax=0.0;
    for (    Element e : v.nonZeroes()) {
      bytes+=Integer.SIZE + Double.SIZE;
    }
  }
  LOG.info("String_Node_Str",bytes);
  this.u=u;
  this.z=z;
  LOG.info("String_Node_Str");
}

Fixed version (ground truth):
public LogisticL2DiffFunction(Vector[] a,double[] b,double rho,double[] u,double[] z){
  LOG.info("String_Node_Str");
  this.a=a;
  this.b=b;
  this.rho=rho;
  this.m=a.length;
  if (this.m > 0) {
    this.n=this.a[0].size() - 1;
  }
 else {
    this.n=0;
  }
  this.u=u;
  this.z=z;
  LOG.info("String_Node_Str");
}
Program: 40743
Project: 40743
Buggy source:
public static int run(Path input,Path output,Configuration baseConf) throws IOException, ClassNotFoundException, InterruptedException {
  LOG.info("String_Node_Str");
  Configuration conf=new Configuration(baseConf);
  Job job=Job.getInstance(conf);
  job.setJarByClass(OfflineFeatureDriver.class);
  job.setJobName("String_Node_Str");
  FileInputFormat.setInputPaths(job,input);
  FileOutputFormat.setOutputPath(job,output);
  job.setInputFormatClass(SequenceFileInputFormat.class);
  job.setOutputFormatClass(SequenceFileOutputFormat.class);
  job.setOutputKeyClass(Text.class);
  job.setOutputValueClass(VectorWritable.class);
  job.setMapperClass(OfflineFeatureMapper.class);
  job.setReducerClass(Reducer.class);
  job.setNumReduceTasks(10);
  HadoopUtil.delete(conf,output);
  boolean succeeded=job.waitForCompletion(true);
  if (!succeeded) {
    throw new IllegalStateException("String_Node_Str");
  }
  LOG.info("String_Node_Str",input);
  HDFSHelper.deleteFiles(input.getParent(),input.getName(),input.getFileSystem(conf));
  return 0;
}

Fixed version (ground truth):
public static int run(Path input,Path output,Configuration baseConf) throws IOException, ClassNotFoundException, InterruptedException {
  LOG.info("String_Node_Str");
  Configuration conf=new Configuration(baseConf);
  Job job=Job.getInstance(conf);
  job.setJarByClass(OfflineFeatureDriver.class);
  job.setJobName("String_Node_Str");
  FileInputFormat.setInputPaths(job,input);
  FileOutputFormat.setOutputPath(job,output);
  job.setInputFormatClass(SequenceFileInputFormat.class);
  job.setOutputFormatClass(SequenceFileOutputFormat.class);
  job.setOutputKeyClass(Text.class);
  job.setOutputValueClass(VectorWritable.class);
  job.setMapperClass(OfflineFeatureMapper.class);
  job.setReducerClass(Reducer.class);
  job.setNumReduceTasks(10);
  HadoopUtil.delete(conf,output);
  boolean succeeded=job.waitForCompletion(true);
  if (!succeeded) {
    throw new IllegalStateException("String_Node_Str");
  }
  return 0;
}
Program: 40745
Project: 40745
Buggy source:
private AdmmReducerContext localMapperOptimization(AdmmMapperContext context){
  LogisticL2DiffFunction myFunction=new LogisticL2DiffFunction(context.getA(),context.getB(),context.getRho(),context.getUInitial(),context.getZInitial());
  Ctx optimizationContext=new Ctx(context.getXInitial());
  LOG.info("String_Node_Str");
  double[] optimum=lbfgs.minimize((DiffFunction)myFunction,1e-10,context.getXInitial());
  for (int d=0; d < optimum.length; ++d) {
    optimizationContext.m_optimumX[d]=optimum[d];
  }
  double primalObjectiveValue=myFunction.evaluatePrimalObjective(optimizationContext.m_optimumX);
  return new AdmmReducerContext(context.getSplitId(),context.getUInitial(),optimizationContext.m_optimumX,null,primalObjectiveValue,context.getRho(),regularizationFactor,1);
}

Fixed version (ground truth):
private AdmmReducerContext localMapperOptimization(AdmmMapperContext context){
  LogisticL2DiffFunction myFunction=new LogisticL2DiffFunction(context.getA(),context.getB(),context.getRho(),context.getUInitial(),context.getZInitial());
  LOG.info("String_Node_Str");
  double[] optimum=lbfgs.minimize((DiffFunction)myFunction,1e-10,context.getXInitial());
  double primalObjectiveValue=myFunction.evaluatePrimalObjective(optimum);
  return new AdmmReducerContext(context.getSplitId(),context.getUInitial(),optimum,null,primalObjectiveValue,context.getRho(),regularizationFactor,1);
}
Program: 40748
Project: 40748
Buggy source:
public LogisticL2DiffFunction(Vector[] a,double[] b,double rho,double[] u,double[] z){
  LOG.info("String_Node_Str");
  this.a=a;
  this.b=b;
  this.rho=rho;
  this.m=a.length;
  if (this.m > 0) {
    this.n=this.a[0].size() - 1;
  }
 else {
    this.n=0;
  }
  this.u=u;
  this.z=z;
  LOG.info("String_Node_Str");
}

Fixed version (ground truth):
public LogisticL2DiffFunction(Vector[] a,double[] b,double rho,double[] u,double[] z){
  LOG.info("String_Node_Str");
  this.a=a;
  this.b=b;
  this.rho=rho;
  this.m=a.length;
  if (this.m > 0) {
    this.n=this.a[0].size() - 1;
  }
 else {
    this.n=0;
  }
  Long bytes=(long)0;
  for (int row=0; row < this.m; row++) {
    Vector v=this.a[row];
    double ax=0.0;
    for (    Element e : v.nonZeroes()) {
      bytes+=Integer.SIZE + Double.SIZE;
    }
  }
  LOG.info("String_Node_Str",bytes);
  this.u=u;
  this.z=z;
  LOG.info("String_Node_Str");
}
Program: 40749
Project: 40749
Buggy source:
public LaserFeatureListenser(String url,String bucket,String passwd,Path output,FileSystem fs,Configuration conf,int itemDimension,int userDimension) throws IOException, URISyntaxException {
  this.output=output;
  this.fs=fs;
  this.conf=conf;
  this.itemDimension=itemDimension;
  this.userDimension=userDimension;
  Path serializePath=com.b5m.conf.Configuration.getInstance().getUserFeatureSerializePath();
  if (fs.exists(serializePath)) {
    DataInputStream in=fs.open(serializePath);
    try {
      this.helper=UserProfileHelper.read(in);
    }
 catch (    ClassNotFoundException e) {
      e.printStackTrace();
      this.helper=UserProfileHelper.getInstance();
    }
    in.close();
  }
 else {
    this.helper=UserProfileHelper.getInstance();
  }
  initSequenceWriter();
  List<URI> hosts=Arrays.asList(new URI(url));
  couchbaseClient=new CouchbaseClient(hosts,bucket,passwd);
}

Fixed version (ground truth):
public LaserFeatureListenser(String url,String bucket,String passwd,Path output,FileSystem fs,Configuration conf,int itemDimension,int userDimension) throws IOException, URISyntaxException {
  this.output=output;
  this.fs=fs;
  this.conf=conf;
  this.itemDimension=itemDimension;
  this.userDimension=userDimension;
  Path serializePath=com.b5m.conf.Configuration.getInstance().getUserFeatureSerializePath();
  if (fs.exists(serializePath)) {
    DataInputStream in=fs.open(serializePath);
    try {
      this.helper=UserProfileHelper.read(in);
      LOG.debug("String_Node_Str",this.helper.size());
    }
 catch (    ClassNotFoundException e) {
      e.printStackTrace();
      this.helper=UserProfileHelper.getInstance();
    }
    in.close();
  }
 else {
    this.helper=UserProfileHelper.getInstance();
  }
  initSequenceWriter();
  List<URI> hosts=Arrays.asList(new URI(url));
  couchbaseClient=new CouchbaseClient(hosts,bucket,passwd);
}
Program: 40750
Project: 40750
Buggy source:
public void setUserFeature(Vector userFeature,final UserProfileHelper helper,Boolean add){
  Set<Map.Entry<String,Double>> entrySet=page_categories.entrySet();
  Iterator<Map.Entry<String,Double>> iterator=entrySet.iterator();
  while (iterator.hasNext()) {
    Map.Entry<String,Double> entry=iterator.next();
    String key="String_Node_Str" + entry.getKey();
    Integer id=helper.map(key,add);
    if (null != id) {
      userFeature.set(id,entry.getValue());
    }
  }
  entrySet=product_categories.entrySet();
  iterator=entrySet.iterator();
  while (iterator.hasNext()) {
    Map.Entry<String,Double> entry=iterator.next();
    String key="String_Node_Str" + entry.getKey();
    Integer id=helper.map(key,add);
    if (null != id) {
      userFeature.set(id,entry.getValue());
    }
  }
  entrySet=product_price.entrySet();
  iterator=entrySet.iterator();
  while (iterator.hasNext()) {
    Map.Entry<String,Double> entry=iterator.next();
    String key="String_Node_Str" + entry.getKey();
    Integer id=helper.map(key,add);
    if (null != id) {
      userFeature.set(id,entry.getValue());
    }
  }
  entrySet=product_source.entrySet();
  iterator=entrySet.iterator();
  while (iterator.hasNext()) {
    Map.Entry<String,Double> entry=iterator.next();
    String key="String_Node_Str" + entry.getKey();
    Integer id=helper.map(key,add);
    if (null != id) {
      userFeature.set(id,entry.getValue());
    }
  }
}

Fixed version (ground truth):
public void setUserFeature(Vector userFeature,final UserProfileHelper helper,Boolean add){
  Set<Map.Entry<String,Double>> entrySet=page_categories.entrySet();
  Iterator<Map.Entry<String,Double>> iterator=entrySet.iterator();
  while (iterator.hasNext()) {
    Map.Entry<String,Double> entry=iterator.next();
    String key="String_Node_Str" + entry.getKey();
    Integer id=helper.map(key,add);
    if (null != id) {
      userFeature.set(id,entry.getValue());
    }
  }
  entrySet=product_categories.entrySet();
  iterator=entrySet.iterator();
  while (iterator.hasNext()) {
    Map.Entry<String,Double> entry=iterator.next();
    String key="String_Node_Str" + entry.getKey();
    Integer id=helper.map(key,add);
    if (null != id) {
      userFeature.set(id,entry.getValue());
    }
  }
  entrySet=product_source.entrySet();
  iterator=entrySet.iterator();
  while (iterator.hasNext()) {
    Map.Entry<String,Double> entry=iterator.next();
    String key="String_Node_Str" + entry.getKey();
    Integer id=helper.map(key,add);
    if (null != id) {
      userFeature.set(id,entry.getValue());
    }
  }
}
Program: 40751
Project: 40751
Buggy source:
protected void map(Text key,RequestWritable value,Context context) throws IOException, InterruptedException {
  Vector userFeature=value.getUserFeature();
  Vector itemFeature=value.getItemFeature();
  double firstOrder=userFeature.dot(alpha) + itemFeature.dot(beta);
  for (int row=0; row < A.numRows(); row++) {
    ACj.set(row,A.viewRow(row).dot(itemFeature));
  }
  double secondOrder=userFeature.dot(ACj);
  Vector onlineFeature=new SequentialAccessSparseVector(userFeature.size() + 2);
  for (  Element e : userFeature.nonZeroes()) {
    onlineFeature.set(e.index() + 2,e.get());
  }
  onlineFeature.set(0,firstOrder + secondOrder);
  onlineFeature.set(1,1.0);
  LOG.info("String_Node_Str");
  context.write(key,new VectorWritable(onlineFeature));
}

Fixed version (ground truth):
protected void map(Text key,RequestWritable value,Context context) throws IOException, InterruptedException {
  Vector userFeature=value.getUserFeature();
  Vector itemFeature=value.getItemFeature();
  double firstOrder=userFeature.dot(alpha) + itemFeature.dot(beta);
  for (int row=0; row < A.numRows(); row++) {
    ACj.set(row,A.viewRow(row).dot(itemFeature));
  }
  double secondOrder=userFeature.dot(ACj);
  Vector onlineFeature=new SequentialAccessSparseVector(userFeature.size() + 2);
  for (  Element e : userFeature.nonZeroes()) {
    onlineFeature.set(e.index() + 2,e.get());
  }
  onlineFeature.set(0,firstOrder + secondOrder);
  onlineFeature.set(1,1.0);
  context.write(key,new VectorWritable(onlineFeature));
}
Program: 40752
Project: 40752
Buggy source:
private void write(B5MEvent b5mEvent) throws IOException {
  LOG.debug(b5mEvent.toString());
  Map<CharSequence,CharSequence> args=b5mEvent.getArgs();
  CharSequence logType=args.get(LOG_TYPE_LABEL);
  if (null == logType) {
    return;
  }
  CharSequence actionId=args.get(ACTION_ID_LABEL);
  if (null == actionId) {
    return;
  }
  CharSequence uuid=args.get(UUID_LABEL);
  if (null == uuid) {
    return;
  }
  String user=uuid.toString();
  String item=null;
  CharSequence title=args.get(ITEM_LABEL);
  if (null == title) {
    return;
  }
 else {
    item=title.toString();
  }
  Integer action=1;
  if (108 == Integer.valueOf(actionId.toString())) {
    action=-1;
  }
 else   if (103 == Integer.valueOf(actionId.toString())) {
    action=1;
  }
 else {
    return;
  }
  Vector userFeature=new SequentialAccessSparseVector(userDimension);
  setUserFeature(user,userFeature);
  Vector itemFeature=new SequentialAccessSparseVector(itemDimension);
  setItemFeature(item,itemFeature);
  writer.append(new Text(user),new RequestWritable(userFeature,itemFeature,action));
}

Fixed version (ground truth):
private void write(B5MEvent b5mEvent) throws IOException {
  LOG.debug(b5mEvent.toString());
  Map<CharSequence,CharSequence> args=b5mEvent.getArgs();
  CharSequence logType=args.get(LOG_TYPE_LABEL);
  if (null == logType) {
    return;
  }
  CharSequence actionId=args.get(ACTION_ID_LABEL);
  if (null == actionId) {
    return;
  }
  CharSequence uuid=args.get(UUID_LABEL);
  if (null == uuid) {
    return;
  }
  String user=uuid.toString();
  String item=null;
  CharSequence title=args.get(ITEM_LABEL);
  if (null == title) {
    return;
  }
 else {
    item=title.toString();
  }
  Integer action=1;
  if (108 == Integer.valueOf(actionId.toString())) {
    action=-1;
  }
 else   if (103 == Integer.valueOf(actionId.toString())) {
    action=1;
  }
 else {
    return;
  }
  Vector userFeature=new SequentialAccessSparseVector(userDimension);
  setUserFeature(user,userFeature);
  Vector itemFeature=new SequentialAccessSparseVector(itemDimension);
  setItemFeature(item,itemFeature);
  if (itemFeature.norm(2) < 1e-6) {
    return;
  }
  writer.append(new Text(user),new RequestWritable(userFeature,itemFeature,action));
}
Program: 40753
Project: 40753
Buggy source:
protected void map(Text key,RequestWritable value,Context context) throws IOException, InterruptedException {
  Vector itemFeature=value.getItemFeature();
  Vector onlineFeature=new SequentialAccessSparseVector(itemFeature.size() + 1);
  for (  Element e : itemFeature.nonZeroes()) {
    onlineFeature.set(e.index() + 1,e.get());
  }
  onlineFeature.set(0,1);
  context.write(key,new VectorWritable(onlineFeature));
}

Fixed version (ground truth):
protected void map(Text key,RequestWritable value,Context context) throws IOException, InterruptedException {
  Vector itemFeature=value.getItemFeature();
  Vector onlineFeature=new SequentialAccessSparseVector(itemFeature.size() + 1);
  for (  Element e : itemFeature.nonZeroes()) {
    onlineFeature.set(e.index() + 1,e.get());
  }
  onlineFeature.set(0,1);
  onlineFeature.set(itemFeature.size(),value.getAction());
  context.write(key,new VectorWritable(onlineFeature));
}
Program: 40754
Project: 40754
Buggy source:
/** 
 * An expectation for checking that an element is either invisible or not present on the DOM.
 * @param locator used to find the element
 */
public static ExpectedCondition<Boolean> invisibilityOfElementLocated(final By locator){
  return new ExpectedCondition<Boolean>(){
    public Boolean apply(    @Nonnull WebDriver driver){
      try {
        return driver.findElements(locator).isEmpty();
      }
 catch (      NoSuchElementException e) {
        LOGGER.error(e);
        return true;
      }
catch (      StaleElementReferenceException e) {
        LOGGER.error(e);
        return true;
      }
    }
    @Override public String toString(){
      return "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * An expectation for checking that an element is either invisible or not present on the DOM.
 * @param locator used to find the element
 * @return boolean
 */
public static ExpectedCondition<Boolean> invisibilityOfElementLocated(final By locator){
  return new ExpectedCondition<Boolean>(){
    public Boolean apply(    @Nonnull WebDriver driver){
      try {
        return driver.findElements(locator).isEmpty();
      }
 catch (      NoSuchElementException e) {
        LOGGER.error(e);
        return true;
      }
catch (      StaleElementReferenceException e) {
        LOGGER.error(e);
        return true;
      }
    }
    @Override public String toString(){
      return "String_Node_Str";
    }
  }
;
}
Program: 40755
Project: 40755
Buggy source:
/** 
 * Check clikability for the list of WebElement
 * @param elements
 * @return
 */
public static ExpectedCondition<Boolean> elementToBeClickable(final List<WebElement> elements){
  final List<Boolean> statusList=new ArrayList<Boolean>();
  return new ExpectedCondition<Boolean>(){
    public Boolean apply(    WebDriver driver){
      if (elements.isEmpty()) {
        return false;
      }
      statusList.clear();
      for (      WebElement w : elements) {
        try {
          if (w != null && w.isEnabled() && w.isDisplayed()) {
            statusList.add(true);
          }
 else {
            return false;
          }
        }
 catch (        StaleElementReferenceException e) {
          LOGGER.error(e);
          return false;
        }
      }
      LOGGER.debug("String_Node_Str" + elements.size() + "String_Node_Str"+ statusList.size());
      return statusList.size() == elements.size();
    }
    @Override public String toString(){
      return "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Check clikability for the list of WebElement
 * @param elements list of WebElements
 * @return boolean
 */
public static ExpectedCondition<Boolean> elementToBeClickable(final List<WebElement> elements){
  final List<Boolean> statusList=new ArrayList<Boolean>();
  return new ExpectedCondition<Boolean>(){
    public Boolean apply(    WebDriver driver){
      if (elements.isEmpty()) {
        return false;
      }
      statusList.clear();
      for (      WebElement w : elements) {
        try {
          if (w != null && w.isEnabled() && w.isDisplayed()) {
            statusList.add(true);
          }
 else {
            return false;
          }
        }
 catch (        StaleElementReferenceException e) {
          LOGGER.error(e);
          return false;
        }
      }
      LOGGER.debug("String_Node_Str" + elements.size() + "String_Node_Str"+ statusList.size());
      return statusList.size() == elements.size();
    }
    @Override public String toString(){
      return "String_Node_Str";
    }
  }
;
}
Program: 40756
Project: 40756
Buggy source:
/** 
 * wait for the Element to be Disabled
 * @param element
 * @return
 */
public static ExpectedCondition<Boolean> elementToBeDisabled(final WebElement element){
  return new ExpectedCondition<Boolean>(){
    public ExpectedCondition<WebElement> visibilityOfElement=ExpectedConditions.visibilityOf(element);
    public Boolean apply(    WebDriver driver){
      boolean isDisabled=false;
      WebElement element=visibilityOfElement.apply(driver);
      try {
        if (element != null && !(element.isEnabled())) {
          isDisabled=true;
        }
        return isDisabled;
      }
 catch (      StaleElementReferenceException e) {
        LOGGER.warn("String_Node_Str" + element.toString());
        return isDisabled;
      }
    }
    @Override public String toString(){
      return "String_Node_Str" + element;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * wait for the Element to be Disabled
 * @param element : WebElement
 * @return boolean
 */
public static ExpectedCondition<Boolean> elementToBeDisabled(final WebElement element){
  return new ExpectedCondition<Boolean>(){
    public ExpectedCondition<WebElement> visibilityOfElement=ExpectedConditions.visibilityOf(element);
    public Boolean apply(    WebDriver driver){
      boolean isDisabled=false;
      WebElement element=visibilityOfElement.apply(driver);
      try {
        if (element != null && !(element.isEnabled())) {
          isDisabled=true;
        }
        return isDisabled;
      }
 catch (      StaleElementReferenceException e) {
        LOGGER.warn("String_Node_Str" + element.toString());
        return isDisabled;
      }
    }
    @Override public String toString(){
      return "String_Node_Str" + element;
    }
  }
;
}
Program: 40757
Project: 40757
Buggy source:
/** 
 * This method accepts n number of WebElements and check for click ability if any of the WebElement is not click able will return false
 * @param elements
 * @return
 */
public static ExpectedCondition<Boolean> elementsToBeClickable(final WebElement... elements){
  final List<Boolean> statusList=new ArrayList<Boolean>();
  return new ExpectedCondition<Boolean>(){
    final StringBuilder sb=new StringBuilder();
    public Boolean apply(    WebDriver driver){
      for (      WebElement w : elements) {
        try {
          if (w.isDisplayed() && w.isEnabled()) {
            statusList.add(true);
          }
 else {
            statusList.add(false);
          }
        }
 catch (        StaleElementReferenceException e) {
          LOGGER.error(e);
          statusList.add(false);
        }
      }
      if (statusList.contains(false)) {
        statusList.clear();
        return false;
      }
      return true;
    }
    @Override public String toString(){
      return "String_Node_Str" + sb;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * This method accepts n number of WebElements and check for click ability if any of the WebElement is not click able will return false
 * @param elements list of WebElements
 * @return boolean
 */
public static ExpectedCondition<Boolean> elementsToBeClickable(final WebElement... elements){
  final List<Boolean> statusList=new ArrayList<Boolean>();
  return new ExpectedCondition<Boolean>(){
    final StringBuilder sb=new StringBuilder();
    public Boolean apply(    WebDriver driver){
      for (      WebElement w : elements) {
        try {
          if (w.isDisplayed() && w.isEnabled()) {
            statusList.add(true);
          }
 else {
            statusList.add(false);
          }
        }
 catch (        StaleElementReferenceException e) {
          LOGGER.error(e);
          statusList.add(false);
        }
      }
      if (statusList.contains(false)) {
        statusList.clear();
        return false;
      }
      return true;
    }
    @Override public String toString(){
      return "String_Node_Str" + sb;
    }
  }
;
}
Program: 40758
Project: 40758
Buggy source:
/** 
 * Check if all the element in the List are displayed
 * @param elements
 * @return
 */
public static ExpectedCondition<Boolean> elementToBeDisplayed(final List<WebElement> elements){
  final List<Boolean> statusList=new ArrayList<Boolean>();
  return new ExpectedCondition<Boolean>(){
    public Boolean apply(    WebDriver driver){
      for (      WebElement w : elements) {
        try {
          if (w != null && w.isDisplayed()) {
            statusList.add(true);
          }
 else {
            return null;
          }
        }
 catch (        StaleElementReferenceException e) {
          LOGGER.error(e);
          return null;
        }
      }
      return statusList.size() == elements.size();
    }
    @Override public String toString(){
      return "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Check if all the element in the List are displayed
 * @param elements list of WebElements
 * @return boolean
 */
public static ExpectedCondition<Boolean> elementToBeDisplayed(final List<WebElement> elements){
  final List<Boolean> statusList=new ArrayList<Boolean>();
  return new ExpectedCondition<Boolean>(){
    public Boolean apply(    WebDriver driver){
      for (      WebElement w : elements) {
        try {
          if (w != null && w.isDisplayed()) {
            statusList.add(true);
          }
 else {
            return null;
          }
        }
 catch (        StaleElementReferenceException e) {
          LOGGER.error(e);
          return null;
        }
      }
      return statusList.size() == elements.size();
    }
    @Override public String toString(){
      return "String_Node_Str";
    }
  }
;
}
Program: 40759
Project: 40759
Buggy source:
/** 
 * Return   {@link IBrowserConf} depending on if {@link CustomBrowserConf} isused or Default values set configured
 * @param browserConf
 */
public static IBrowserConf get(){
  if (browserConf == null) {
synchronized (DefaultBrowserConf.class) {
      if (browserConf == null) {
        setEscapePropertyForReportNG();
        if (customProp == null) {
          browserConf=new PrepareDriverConf().refineBrowserValues().checkForRules().get();
        }
 else {
          browserConf=new PrepareDriverConf(getKeyValue()).refineBrowserValues().checkForRules().get();
        }
      }
    }
  }
  return browserConf;
}

Fixed version (ground truth):
/** 
 * Return   {@link IBrowserConf} depending on if {@link CustomBrowserConf} isused or Default values set configured
 */
public static IBrowserConf get(){
  if (browserConf == null) {
synchronized (DefaultBrowserConf.class) {
      if (browserConf == null) {
        setEscapePropertyForReportNG();
        if (customProp == null) {
          browserConf=new PrepareDriverConf().refineBrowserValues().checkForRules().get();
        }
 else {
          browserConf=new PrepareDriverConf(getKeyValue()).refineBrowserValues().checkForRules().get();
        }
      }
    }
  }
  return browserConf;
}
Program: 40760
Project: 40760
Buggy source:
/** 
 * Check if custom properties file present or not if, present initialize customProp to prop file
 * @return : true or false
 */
protected static void loadCustomPropertiesFile(IProperty prop){
  browserConf=null;
  customProp=prop;
}

Fixed version (ground truth):
/** 
 * Check if custom properties file present or not if, present initialize customProp to prop file
 */
protected static void loadCustomPropertiesFile(IProperty prop){
  browserConf=null;
  customProp=prop;
}
Program: 40761
Project: 40761
Buggy source:
@org.testng.annotations.DataProvider(name="String_Node_Str",parallel=true) public static Object[][] googleSheetDataProvider(Method m){
  String testMethodName=Utils.getFullMethodName(m);
  return getData(testMethodName);
}

Fixed version (ground truth):
/** 
 * @param m method
 * @return list of objects
 */
@org.testng.annotations.DataProvider(name="String_Node_Str",parallel=true) public static Object[][] googleSheetDataProvider(Method m){
  String testMethodName=Utils.getFullMethodName(m);
  return getData(testMethodName);
}
Program: 40762
Project: 40762
Buggy source:
@org.testng.annotations.DataProvider(name="String_Node_Str",parallel=true) public static Object[][] xmlDataProvider(Method m){
  String methodName=Utils.getFullMethodName(m);
  return getData(methodName);
}

Fixed version (ground truth):
/** 
 * @param m method
 * @return list of objects
 */
@org.testng.annotations.DataProvider(name="String_Node_Str",parallel=true) public static Object[][] xmlDataProvider(Method m){
  String methodName=Utils.getFullMethodName(m);
  return getData(methodName);
}
Program: 40763
Project: 40763
Buggy source:
/** 
 * get the map with key as methodName and List of   {@link IProperty}
 * @param environment : which should be System.getProperty() it can be null or empty as well
 * @param data
 * @return
 * @throws IOException
 * @throws ServiceException
 */
public List<IProperty> getMethodData(String environment,IMappingData data){
  if (!dataBucket.containsKey(data.getTestData())) {
    URL testDataSheetURL;
    ListFeed testDataFeed=null;
    LOGGER.debug("String_Node_Str" + data.getTestData());
    try {
      testDataSheetURL=getWorkSheet(data.getTestData()).getListFeedUrl();
      testDataFeed=service.getFeed(testDataSheetURL,ListFeed.class);
    }
 catch (    IOException e) {
      LOGGER.error(e);
    }
catch (    ServiceException e) {
      LOGGER.error(e);
    }
    dataBucket.put(data.getTestData(),getSingleMethodtData(environment,testDataFeed));
  }
  return dataBucket.get(data.getTestData());
}

Fixed version (ground truth):
/** 
 * get the map with key as methodName and List of   {@link IProperty}
 * @param environment : which should be System.getProperty() it can be null or empty as well
 * @param data
 * @return list
 */
public List<IProperty> getMethodData(String environment,IMappingData data){
  if (!dataBucket.containsKey(data.getTestData())) {
    URL testDataSheetURL;
    ListFeed testDataFeed=null;
    LOGGER.debug("String_Node_Str" + data.getTestData());
    try {
      testDataSheetURL=getWorkSheet(data.getTestData()).getListFeedUrl();
      testDataFeed=service.getFeed(testDataSheetURL,ListFeed.class);
    }
 catch (    IOException e) {
      LOGGER.error(e);
    }
catch (    ServiceException e) {
      LOGGER.error(e);
    }
    dataBucket.put(data.getTestData(),getSingleMethodtData(environment,testDataFeed));
  }
  return dataBucket.get(data.getTestData());
}
Program: 40764
Project: 40764
Buggy source:
/** 
 * Get the map having key as methodName of   {@link IBrowserConf} for therefined data
 * @param data
 * @return
 * @throws IOException
 * @throws ServiceException
 */
public List<IBrowserConf> getBrowserListForSheet(IMappingData data){
  List<IBrowserConf> returnList=new ArrayList<IBrowserConf>();
  URL browserSheetURL;
  String sheetNameHolder;
  ListFeed browserFeed;
  for (  String browserSheet : data.getClientEnvironment()) {
    sheetNameHolder=browserSheet;
    if (!browserBucket.containsKey(browserSheet)) {
      try {
        List<IBrowserConf> browserConfLForSingleSheet=new ArrayList<IBrowserConf>();
        browserSheetURL=getWorkSheet(browserSheet).getListFeedUrl();
        browserFeed=service.getFeed(browserSheetURL,ListFeed.class);
        for (        ListEntry row : browserFeed.getEntries()) {
          browserConfLForSingleSheet.add(getBrowserConfFromRow(row));
        }
        browserBucket.put(browserSheet,browserConfLForSingleSheet);
      }
 catch (      NullPointerException ex) {
        LOGGER.error("String_Node_Str" + sheetNameHolder);
        LOGGER.error(ex);
      }
catch (      IOException e) {
        LOGGER.error(e);
      }
catch (      ServiceException e) {
        LOGGER.error(e);
      }
    }
    returnList.addAll(browserBucket.get(browserSheet));
  }
  return returnList;
}

Fixed version (ground truth):
/** 
 * Get the map having key as methodName of   {@link IBrowserConf} for therefined data
 * @param data IMappingData
 * @return list
 */
public List<IBrowserConf> getBrowserListForSheet(IMappingData data){
  List<IBrowserConf> returnList=new ArrayList<IBrowserConf>();
  URL browserSheetURL;
  String sheetNameHolder;
  ListFeed browserFeed;
  for (  String browserSheet : data.getClientEnvironment()) {
    sheetNameHolder=browserSheet;
    if (!browserBucket.containsKey(browserSheet)) {
      try {
        List<IBrowserConf> browserConfLForSingleSheet=new ArrayList<IBrowserConf>();
        browserSheetURL=getWorkSheet(browserSheet).getListFeedUrl();
        browserFeed=service.getFeed(browserSheetURL,ListFeed.class);
        for (        ListEntry row : browserFeed.getEntries()) {
          browserConfLForSingleSheet.add(getBrowserConfFromRow(row));
        }
        browserBucket.put(browserSheet,browserConfLForSingleSheet);
      }
 catch (      NullPointerException ex) {
        LOGGER.error("String_Node_Str" + sheetNameHolder);
        LOGGER.error(ex);
      }
catch (      IOException e) {
        LOGGER.error(e);
      }
catch (      ServiceException e) {
        LOGGER.error(e);
      }
    }
    returnList.addAll(browserBucket.get(browserSheet));
  }
  return returnList;
}
Program: 40765
Project: 40765
Buggy source:
/** 
 * This method checks if driver present yes then quit else ignore
 */
public static void tearDown(){
  if (driver.get() != null) {
    driver.get().quit();
    driver.remove();
  }
  if (null != browserConf.get()) {
    browserConf.remove();
  }
}

Fixed version (ground truth):
/** 
 * This method checks if driver present yes then quit else ignore
 */
public static void tearDown(){
  if (driver.get() != null) {
    driver.get().quit();
  }
  if (null != browserConf.get()) {
    browserConf.set(null);
  }
}
Program: 40766
Project: 40766
Buggy source:
/** 
 * Forcefully check/uncheck checkbox irrespective of the state(Element should be visible)
 * @param webElement :Check box element
 * @param CHECK_UNCHECK enum
 */
public static void checkUncheckCheckBox(WebElement webElement,CHECK_UNCHECK checkUnCheck){
  boolean checked=webElement.isSelected();
  if (checked) {
    if (checkUnCheck.toString().equalsIgnoreCase("String_Node_Str")) {
      webElement.click();
    }
  }
 else {
    if (checkUnCheck.toString().equalsIgnoreCase("String_Node_Str")) {
      webElement.click();
    }
  }
}

Fixed version (ground truth):
/** 
 * Forcefully check/uncheck checkbox irrespective of the state(Element should be visible)
 * @param webElement :Check box element
 * @param checkUnCheck enum
 */
public static void checkUncheckCheckBox(WebElement webElement,CHECK_UNCHECK checkUnCheck){
  boolean checked=webElement.isSelected();
  if (checked) {
    if (checkUnCheck.toString().equalsIgnoreCase("String_Node_Str")) {
      webElement.click();
    }
  }
 else {
    if (checkUnCheck.toString().equalsIgnoreCase("String_Node_Str")) {
      webElement.click();
    }
  }
}
Program: 40767
Project: 40767
Buggy source:
/** 
 * Generic waitFor Function which waits for condition to be successful else return null
 * @param expectedCondition :ExpectedCondition<T>
 * @param driver :WebDriver
 * @param timeout in seconds
 * @return <T> or null
 */
public static <T>T waitFor(ExpectedCondition<T> expectedCondition,WebDriver driver,int timeOutInSeconds){
  Stopwatch stopwatch=new Stopwatch();
  stopwatch.start();
  driver.manage().timeouts().implicitlyWait(0,TimeUnit.SECONDS);
  try {
    return new WebDriverWait(driver,timeOutInSeconds).pollingEvery(500,TimeUnit.MILLISECONDS).until(expectedCondition);
  }
 catch (  TimeoutException e) {
    LOGGER.error(e);
    return null;
  }
 finally {
    driver.manage().timeouts().implicitlyWait(Driver.getBrowserConf().getDriverTimeOut(),TimeUnit.SECONDS);
    stopwatch.stop();
    LOGGER.debug("String_Node_Str" + stopwatch.elapsedTime(TimeUnit.SECONDS));
  }
}

Fixed version (ground truth):
/** 
 * Generic waitFor Function which waits for condition to be successful else return null
 * @param expectedCondition :ExpectedCondition
 * @param driver :WebDriver
 * @param timeOutInSeconds in seconds
 * @return T or null
 */
public static <T>T waitFor(ExpectedCondition<T> expectedCondition,WebDriver driver,int timeOutInSeconds){
  Stopwatch stopwatch=new Stopwatch();
  stopwatch.start();
  driver.manage().timeouts().implicitlyWait(0,TimeUnit.SECONDS);
  try {
    return new WebDriverWait(driver,timeOutInSeconds).pollingEvery(500,TimeUnit.MILLISECONDS).until(expectedCondition);
  }
 catch (  TimeoutException e) {
    LOGGER.error(e);
    return null;
  }
 finally {
    driver.manage().timeouts().implicitlyWait(Driver.getBrowserConf().getDriverTimeOut(),TimeUnit.SECONDS);
    stopwatch.stop();
    LOGGER.debug("String_Node_Str" + stopwatch.elapsedTime(TimeUnit.SECONDS));
  }
}
Program: 40768
Project: 40768
Buggy source:
void LocalEnvironmentConfig(String defaultValue){
  if (defaultValue.contains("String_Node_Str")) {
    if (OSName.get().equals(OSN.WIN)) {
      this.defaultValue=defaultValue.replace("String_Node_Str","String_Node_Str");
    }
 else {
      this.defaultValue=defaultValue;
    }
  }
  this.defaultValue=defaultValue;
}

Fixed version (ground truth):
void LocalEnvironmentConfig(String defaultValue){
  if (defaultValue.contains("String_Node_Str")) {
    if (OSName.get().equals(OSN.WIN)) {
      this.defaultValue=defaultValue.replace("String_Node_Str","String_Node_Str");
    }
 else {
      this.defaultValue=defaultValue;
    }
  }
 else {
    this.defaultValue=defaultValue;
  }
}
Program: 40769
Project: 40769
Buggy source:
@Test(description="String_Node_Str",enabled=true,dataProvider="String_Node_Str") public void verifySeleniumTitleXML(IBrowserConf browserConf,IProperty prop){
  System.out.println(browserConf.getCapabilities().getPlatform());
  GooglePage gp=new GooglePage(Driver.getDriver(browserConf),prop);
  gp.loadFromProperty().isLoaded().search("String_Node_Str").clickOnLink("String_Node_Str");
  SeleniumPage sp=new SeleniumPage(Driver.getDriver());
  sassert.assertEquals(sp.isLoaded().getTitle(),prop.getValue("String_Node_Str"),"String_Node_Str");
  sassert.assertAll();
}

Fixed version (ground truth):
public void verifySeleniumTitleXML(IBrowserConf browserConf,IProperty prop){
  System.out.println(browserConf.getCapabilities().getPlatform());
  GooglePage gp=new GooglePage(Driver.getDriver(browserConf),prop);
  gp.loadFromProperty().isLoaded().search("String_Node_Str").clickOnLink("String_Node_Str");
  SeleniumPage sp=new SeleniumPage(Driver.getDriver());
  sassert.assertEquals(sp.isLoaded().getTitle(),prop.getValue("String_Node_Str"),"String_Node_Str");
  sassert.assertAll();
}
Program: 40770
Project: 40770
Buggy source:
private String getRefinedTestData(Method method){
  IMappingData methodVal=primaryDataMap.get(Utils.getFullMethodName(method));
  IMappingData classVal=primaryDataMap.get(method.getDeclaringClass().getName().toString());
  IMappingData packageVal=primaryDataMap.get(method.getDeclaringClass().getPackage().getName().toString());
  if (methodVal != null && StringUtils.isNotBlank(methodVal.getTestData())) {
    return methodVal.getTestData();
  }
 else   if (classVal != null && StringUtils.isNotBlank(classVal.getTestData())) {
    return classVal.getTestData();
  }
 else   if (packageVal != null && StringUtils.isNotBlank(packageVal.getTestData())) {
    return packageVal.getTestData();
  }
  LOGGER.error("String_Node_Str");
  throw new FrameworkException("String_Node_Str");
}

Fixed version (ground truth):
private String getRefinedTestData(Method method){
  IMappingData methodVal=primaryDataMap.get(Utils.getFullMethodName(method));
  IMappingData classVal=primaryDataMap.get(method.getDeclaringClass().getName().toString());
  IMappingData packageVal=primaryDataMap.get(method.getDeclaringClass().getPackage().getName().toString());
  if (methodVal != null && StringUtils.isNotBlank(methodVal.getTestData())) {
    return methodVal.getTestData();
  }
 else   if (classVal != null && StringUtils.isNotBlank(classVal.getTestData())) {
    return classVal.getTestData();
  }
 else   if (packageVal != null && StringUtils.isNotBlank(packageVal.getTestData())) {
    return packageVal.getTestData();
  }
  LOGGER.error("String_Node_Str" + method.getName() + "String_Node_Str");
  throw new FrameworkException("String_Node_Str" + method.getName() + "String_Node_Str");
}
Program: 40771
Project: 40771
Buggy source:
private List<String> getRefinedClientEnvironment(Method method){
  IMappingData methodClientData=primaryDataMap.get(Utils.getFullMethodName(method));
  IMappingData classClientData=primaryDataMap.get(method.getDeclaringClass().getName().toString());
  IMappingData packageClientData=primaryDataMap.get(method.getDeclaringClass().getPackage().getName().toString());
  if (methodClientData != null && !methodClientData.getClientEnvironment().isEmpty() && StringUtils.isNotBlank(methodClientData.getClientEnvironment().get(0))) {
    return methodClientData.getClientEnvironment();
  }
 else   if (classClientData != null && !classClientData.getClientEnvironment().isEmpty() && StringUtils.isNotBlank(classClientData.getClientEnvironment().get(0))) {
    return classClientData.getClientEnvironment();
  }
 else   if (packageClientData != null && !packageClientData.getClientEnvironment().isEmpty() && StringUtils.isNotBlank(packageClientData.getClientEnvironment().get(0))) {
    return packageClientData.getClientEnvironment();
  }
  LOGGER.error("String_Node_Str");
  throw new FrameworkException("String_Node_Str");
}

Fixed version (ground truth):
private List<String> getRefinedClientEnvironment(Method method){
  IMappingData methodClientData=primaryDataMap.get(Utils.getFullMethodName(method));
  IMappingData classClientData=primaryDataMap.get(method.getDeclaringClass().getName().toString());
  IMappingData packageClientData=primaryDataMap.get(method.getDeclaringClass().getPackage().getName().toString());
  if (methodClientData != null && !methodClientData.getClientEnvironment().isEmpty() && StringUtils.isNotBlank(methodClientData.getClientEnvironment().get(0))) {
    return methodClientData.getClientEnvironment();
  }
 else   if (classClientData != null && !classClientData.getClientEnvironment().isEmpty() && StringUtils.isNotBlank(classClientData.getClientEnvironment().get(0))) {
    return classClientData.getClientEnvironment();
  }
 else   if (packageClientData != null && !packageClientData.getClientEnvironment().isEmpty() && StringUtils.isNotBlank(packageClientData.getClientEnvironment().get(0))) {
    return packageClientData.getClientEnvironment();
  }
  LOGGER.error("String_Node_Str" + method.getName() + "String_Node_Str");
  throw new FrameworkException("String_Node_Str" + method.getName() + "String_Node_Str");
}
Program: 40772
Project: 40772
Buggy source:
/** 
 * get the map with key as methodName and List of   {@link IProperty}
 * @param environment : which should be System.getProperty() it can be null or empty as well
 * @param data
 * @return
 * @throws IOException
 * @throws ServiceException
 */
public List<IProperty> getMethodData(String environment,IMappingData data){
  IMappingData mData=data;
  URL testDataSheetURL;
  ListFeed testDataFeed=null;
  try {
    testDataSheetURL=getWorkSheet(mData.getTestData()).getListFeedUrl();
    testDataFeed=service.getFeed(testDataSheetURL,ListFeed.class);
  }
 catch (  IOException e) {
    LOGGER.error(e);
  }
catch (  ServiceException e) {
    LOGGER.error(e);
  }
  return getSingleMethodtData(environment,testDataFeed);
}

Fixed version (ground truth):
/** 
 * get the map with key as methodName and List of   {@link IProperty}
 * @param environment : which should be System.getProperty() it can be null or empty as well
 * @param data
 * @return
 * @throws IOException
 * @throws ServiceException
 */
public List<IProperty> getMethodData(String environment,IMappingData data){
  IMappingData mData=data;
  URL testDataSheetURL;
  ListFeed testDataFeed=null;
  LOGGER.debug("String_Node_Str" + mData.getTestData());
  try {
    testDataSheetURL=getWorkSheet(mData.getTestData()).getListFeedUrl();
    testDataFeed=service.getFeed(testDataSheetURL,ListFeed.class);
  }
 catch (  IOException e) {
    LOGGER.error(e);
  }
catch (  ServiceException e) {
    LOGGER.error(e);
  }
  return getSingleMethodtData(environment,testDataFeed);
}
Program: 40773
Project: 40773
Buggy source:
public DataPerEnvironment(String environmentName){
  this.environmentName=environmentName;
}

Fixed version (ground truth):
public DataPerEnvironment(String environmentName){
  LOGGER.debug("String_Node_Str" + environmentName);
  LOGGER.debug("String_Node_Str" + prop.getValue("String_Node_Str"));
  this.environmentName=environmentName;
}
Program: 40774
Project: 40774
Buggy source:
/** 
 * return the property list for single methods
 * @param env
 * @param rows
 * @return
 */
private List<IProperty> getSingleMethodtData(String env,ListFeed rows){
  List<DataPerEnvironment> testEnvironmentMap=new ArrayList<ReadGoogle.DataPerEnvironment>();
  Map<String,String> keyValuePair=new HashMap<String,String>();
  DataPerEnvironment testEnvHolder=null;
  for (  ListEntry row : rows.getEntries()) {
    if (row.getCustomElements().getValue("String_Node_Str").contains("String_Node_Str")) {
      if (testEnvHolder != null) {
        testEnvironmentMap.add(testEnvHolder);
      }
      testEnvHolder=new DataPerEnvironment(row.getCustomElements().getValue("String_Node_Str"));
    }
 else {
      testEnvHolder.setTestData(row.getCustomElements().getValue("String_Node_Str"),row.getCustomElements().getValue("String_Node_Str"));
      keyValuePair.put(row.getCustomElements().getValue("String_Node_Str"),row.getCustomElements().getValue("String_Node_Str"));
    }
  }
  testEnvironmentMap.add(testEnvHolder);
  if (StringUtils.isNotBlank(env)) {
    return getConcatentedDataList(env,testEnvironmentMap);
  }
 else {
    return getConcatentedDataList(testEnvironmentMap);
  }
}

Fixed version (ground truth):
/** 
 * return the property list for single methods
 * @param env
 * @param rows
 * @return
 */
private List<IProperty> getSingleMethodtData(String env,ListFeed rows){
  List<DataPerEnvironment> testEnvironmentMap=new ArrayList<ReadGoogle.DataPerEnvironment>();
  Map<String,String> keyValuePair=new HashMap<String,String>();
  DataPerEnvironment testEnvHolder=null;
  for (  ListEntry row : rows.getEntries()) {
    LOGGER.debug("String_Node_Str" + row.getCustomElements().getValue("String_Node_Str") + "String_Node_Str"+ row.getCustomElements().getValue("String_Node_Str"));
    if (row.getCustomElements().getValue("String_Node_Str").contains("String_Node_Str")) {
      if (testEnvHolder != null) {
        testEnvironmentMap.add(testEnvHolder);
      }
      testEnvHolder=new DataPerEnvironment(row.getCustomElements().getValue("String_Node_Str"));
    }
 else {
      testEnvHolder.setTestData(row.getCustomElements().getValue("String_Node_Str"),row.getCustomElements().getValue("String_Node_Str"));
      keyValuePair.put(row.getCustomElements().getValue("String_Node_Str"),row.getCustomElements().getValue("String_Node_Str"));
    }
  }
  testEnvironmentMap.add(testEnvHolder);
  if (StringUtils.isNotBlank(env)) {
    return getConcatentedDataList(env,testEnvironmentMap);
  }
 else {
    return getConcatentedDataList(testEnvironmentMap);
  }
}