nus-yam/ex-repair huggingface dataset:
Program: 44656
Project: 44656
Buggy source:
private Node populateTopicJcrNode(Topic topic,Session session,Node topicJcrNode,boolean useProvidedId,Context context) throws RepositoryException {
  updateSystemBuiltin(topic,topicJcrNode);
  updateOwner(topic.getOwner(),topicJcrNode,session,context);
  updateLocalizedLabels(topic,topicJcrNode);
  updateOrder(topic,topicJcrNode);
  updateName(session,topic,topicJcrNode,context);
  updateAllowsReferrerContentObject(topic,topicJcrNode);
  saveOrUpdateChildren(topic,session,topicJcrNode,context);
  return topicJcrNode;
}

Fixed version (ground truth):
private Node populateTopicJcrNode(Topic topic,Session session,Node topicJcrNode,boolean useProvidedId,Context context) throws RepositoryException {
  updateSystemBuiltin(topic,topicJcrNode);
  updateOwner(topic,topicJcrNode,session,context);
  updateLocalizedLabels(topic,topicJcrNode);
  updateOrder(topic,topicJcrNode);
  updateName(session,topic,topicJcrNode,context);
  updateAllowsReferrerContentObject(topic,topicJcrNode);
  saveOrUpdateChildren(topic,session,topicJcrNode,context);
  return topicJcrNode;
}
Program: 44658
Project: 44658
Buggy source:
private void updateAllowsReferrerContentObject(Topic topic,Node topicJcrNode) throws RepositoryException {
  topicJcrNode.setProperty(CmsBuiltInItem.AllowsReferrerContentObjects.getJcrName(),topic.isAllowsReferrerContentObjects());
}

Fixed version (ground truth):
private void updateAllowsReferrerContentObject(Topic topic,Node topicJcrNode) throws RepositoryException {
  if (((TopicImpl)topic).allowsReferrerContentObjectsHasBeenSet() || !topicJcrNode.hasProperty(CmsBuiltInItem.AllowsReferrerContentObjects.getJcrName())) {
    topicJcrNode.setProperty(CmsBuiltInItem.AllowsReferrerContentObjects.getJcrName(),topic.isAllowsReferrerContentObjects());
  }
 else {
    topic.setAllowsReferrerContentObjects(topicJcrNode.getProperty(CmsBuiltInItem.AllowsReferrerContentObjects.getJcrName()).getBoolean());
  }
}
Program: 44659
Project: 44659
Buggy source:
public void updateOwner(RepositoryUser topicOwner,Node topicJcrNode,Session session,Context context) throws RepositoryException {
  if (topicOwner == null || StringUtils.isBlank(topicOwner.getId())) {
    throw new CmsException("String_Node_Str");
  }
  String newOwnerId=topicOwner.getId();
  if (!topicJcrNode.hasProperty(CmsBuiltInItem.OwnerCmsIdentifier.getJcrName()) || !topicJcrNode.getProperty(CmsBuiltInItem.OwnerCmsIdentifier.getJcrName()).getString().equals(newOwnerId)) {
    if (cmsRepositoryEntityUtils.retrieveUniqueNodeForRepositoryUser(session,newOwnerId) == null) {
      throw new CmsException("String_Node_Str" + newOwnerId + "String_Node_Str"+ topicOwner.getExternalId()+ "String_Node_Str"+ topicOwner.getLabel());
    }
    EntityAssociationUpdateHelper<RepositoryUser> repositoryUserAssociationUpdateHelper=new EntityAssociationUpdateHelper<RepositoryUser>(session,cmsRepositoryEntityAssociationDao,context);
    repositoryUserAssociationUpdateHelper.setReferrerCmsRepositoryEntityNode(topicJcrNode);
    repositoryUserAssociationUpdateHelper.setReferrerPropertyName(CmsBuiltInItem.OwnerCmsIdentifier);
    repositoryUserAssociationUpdateHelper.setValuesToBeAdded(Arrays.asList(topicOwner));
    repositoryUserAssociationUpdateHelper.update();
  }
}

Fixed version (ground truth):
public void updateOwner(Topic topic,Node topicJcrNode,Session session,Context context) throws RepositoryException {
  RepositoryUser topicOwner=retrieveOwnerForTopic(topic,topicJcrNode);
  if (topicOwner == null) {
    setSystemUserAsTopicOwner(topic,repositoryUserDao.getSystemRepositoryUser());
  }
 else {
    if (!usersAreTheSame(topic.getOwner(),topicOwner)) {
      logger.info("String_Node_Str",topic.toString(),topicOwner);
      topic.setOwner(topicOwner);
    }
  }
  String newOwnerId=topicOwner.getId();
  if (!topicJcrNode.hasProperty(CmsBuiltInItem.OwnerCmsIdentifier.getJcrName()) || !topicJcrNode.getProperty(CmsBuiltInItem.OwnerCmsIdentifier.getJcrName()).getString().equals(newOwnerId)) {
    EntityAssociationUpdateHelper<RepositoryUser> repositoryUserAssociationUpdateHelper=new EntityAssociationUpdateHelper<RepositoryUser>(session,cmsRepositoryEntityAssociationDao,context);
    repositoryUserAssociationUpdateHelper.setReferrerCmsRepositoryEntityNode(topicJcrNode);
    repositoryUserAssociationUpdateHelper.setReferrerPropertyName(CmsBuiltInItem.OwnerCmsIdentifier);
    repositoryUserAssociationUpdateHelper.setValuesToBeAdded(Arrays.asList(topicOwner));
    repositoryUserAssociationUpdateHelper.update();
  }
}
Program: 44660
Project: 44660
Buggy source:
public Node insertTopicNode(Session session,Topic topic,Context context) throws RepositoryException {
  Node parentTopicNode=topicUtils.retrieveParentTopicNode(session,topic);
  return topicUtils.addNewTopicJcrNode(parentTopicNode,topic,session,false,context);
}

Fixed version (ground truth):
public Node insertTopicNode(Session session,Topic topic,Context context) throws RepositoryException {
  if (topic.getTaxonomy() == null) {
    if (topic.getParent() != null && topic.getParent().getTaxonomy() != null) {
      topic.setTaxonomy(topic.getParent().getTaxonomy());
    }
 else {
      Taxonomy defaultTaxonomy=cmsRepositoryEntityFactoryForActiveClient.newTaxonomy();
      defaultTaxonomy.setName(CmsBuiltInItem.SubjectTaxonomy.getJcrName());
      topic.setTaxonomy(defaultTaxonomy);
    }
  }
  Node parentTopicNode=topicUtils.retrieveParentTopicNode(session,topic);
  return topicUtils.addNewTopicJcrNode(parentTopicNode,topic,session,false,context);
}
Program: 44661
Project: 44661
Buggy source:
public Topic saveTopic(Object topicSource,Context context) throws CmsException {
  if (topicSource == null) {
    throw new CmsException("String_Node_Str");
  }
  if (topicSource instanceof String) {
    return importDao.importTopic((String)topicSource,ImportMode.SAVE_ENTITY);
  }
  if (!(topicSource instanceof Topic)) {
    throw new CmsException("String_Node_Str" + topicSource.getClass().getName());
  }
  Topic topic=(Topic)topicSource;
  SaveMode saveMode=null;
  try {
    saveMode=cmsRepositoryEntityUtils.determineSaveMode(topic);
    Session session=getSession();
    if (topic.getTaxonomy() == null) {
      Taxonomy defaultTaxonomy=cmsRepositoryEntityFactoryForActiveClient.newTaxonomy();
      defaultTaxonomy.setName(CmsBuiltInItem.SubjectTaxonomy.getJcrName());
      topic.setTaxonomy(defaultTaxonomy);
    }
    if (!StringUtils.equals(topic.getTaxonomy().getName(),Taxonomy.REPOSITORY_USER_FOLKSONOMY_NAME)) {
      RepositoryUser systemUser=repositoryUserDao.getSystemRepositoryUser();
      topicUtils.setSystemUserAsTopicOwner(topic,systemUser);
    }
    if (context == null) {
      context=new Context(cmsRepositoryEntityUtils,cmsQueryHandler,session);
    }
    Node topicNode=null;
switch (saveMode) {
case UPDATE_ALL:
      topicNode=topicUtils.updateTopic(session,topic,null,context);
    break;
case INSERT:
  topicNode=insertTopicNode(session,topic,context);
break;
default :
break;
}
session.save();
if (topicNode != null) {
context.cacheTopicNode(topicNode,true);
}
return topic;
}
 catch (CmsException e) {
throw e;
}
catch (Exception e) {
throw new CmsException(e);
}
 finally {
if (context != null) {
context.dispose();
context=null;
}
}
}

Fixed version (ground truth):
public Topic saveTopic(Object topicSource,Context context) throws CmsException {
  if (topicSource == null) {
    throw new CmsException("String_Node_Str");
  }
  if (topicSource instanceof String) {
    return importDao.importTopic((String)topicSource,ImportMode.SAVE_ENTITY);
  }
  if (!(topicSource instanceof Topic)) {
    throw new CmsException("String_Node_Str" + topicSource.getClass().getName());
  }
  Topic topic=(Topic)topicSource;
  SaveMode saveMode=null;
  try {
    saveMode=cmsRepositoryEntityUtils.determineSaveMode(topic);
    Session session=getSession();
    if (context == null) {
      context=new Context(cmsRepositoryEntityUtils,cmsQueryHandler,session);
    }
    Node topicNode=null;
switch (saveMode) {
case UPDATE_ALL:
      topicNode=topicUtils.updateTopic(session,topic,null,context);
    break;
case INSERT:
  topicNode=insertTopicNode(session,topic,context);
break;
default :
break;
}
session.save();
if (topicNode != null) {
context.cacheTopicNode(topicNode,true);
}
return topic;
}
 catch (CmsException e) {
throw e;
}
catch (Exception e) {
throw new CmsException(e);
}
 finally {
if (context != null) {
context.dispose();
context=null;
}
}
}
Program: 44663
Project: 44663
Buggy source:
private static String getOrderByProperty(String property,Order order){
  if (order == null)   order=Order.ascending;
  String propertyXPath=XPathUtils.attributeNotNullCriteria(property);
switch (order) {
case ascending:
case descending:
    boolean propertyNameIsJcrScore=property != null && (StringUtils.equals(property.replaceFirst(CmsConstants.AT_CHAR,"String_Node_Str"),JcrBuiltInItem.JcrScore.getJcrName()));
  if (propertyNameIsJcrScore) {
    return jcrScoreOrderBy(propertyXPath,order);
  }
return propertyXPath + CmsConstants.EMPTY_SPACE + order.toString();
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
private static String getOrderByProperty(String property,Order order){
  if (order == null)   order=Order.ascending;
  String propertyXPath=XPathUtils.generateJcrPathForPropertyPath(property,true);
switch (order) {
case ascending:
case descending:
    boolean propertyNameIsJcrScore=property != null && (StringUtils.equals(property.replaceFirst(CmsConstants.AT_CHAR,"String_Node_Str"),JcrBuiltInItem.JcrScore.getJcrName()));
  if (propertyNameIsJcrScore) {
    return jcrScoreOrderBy(propertyXPath,order);
  }
return propertyXPath + CmsConstants.EMPTY_SPACE + order.toString();
default :
return "String_Node_Str";
}
}
Program: 44665
Project: 44665
Buggy source:
public static String createStringCriteria(String property,QueryOperator operator,String value){
  value=doubleQuotePattern.matcher(value).replaceAll("String_Node_Str");
  value=singleQuotePattern.matcher(value).replaceAll("String_Node_Str");
  return createAttributeCriteria(property,operator,"String_Node_Str" + value + "String_Node_Str");
}

Fixed version (ground truth):
public static String createStringCriteria(String property,QueryOperator operator,String value){
  value=doubleQuotePattern.matcher(value).replaceAll("String_Node_Str");
  value=singleQuotePattern.matcher(value).replaceAll("String_Node_Str");
  return createAttributeCriteria(property,operator,"String_Node_Str" + value + "String_Node_Str",true);
}
Program: 44666
Project: 44666
Buggy source:
public static String createDateCriteria(String property,QueryOperator operator,Calendar calendar){
  return createAttributeCriteria(property,operator,"String_Node_Str" + formatForQuery(calendar) + "String_Node_Str");
}

Fixed version (ground truth):
public static String createDateCriteria(String property,QueryOperator operator,Calendar calendar){
  return createAttributeCriteria(property,operator,"String_Node_Str" + formatForQuery(calendar) + "String_Node_Str",true);
}
Program: 44667
Project: 44667
Buggy source:
public static String createAttributeCriteria(String property,QueryOperator operator,String value){
  return attributeNotNullCriteria(property) + CmsConstants.EMPTY_SPACE + operator.getOp()+ CmsConstants.EMPTY_SPACE+ value;
}

Fixed version (ground truth):
public static String createAttributeCriteria(String property,QueryOperator operator,String value,boolean lastPropertyInPathRepresentsASimpleProperty){
  return generateJcrPathForPropertyPath(property,lastPropertyInPathRepresentsASimpleProperty) + CmsConstants.EMPTY_SPACE + operator.getOp()+ CmsConstants.EMPTY_SPACE+ value;
}
Program: 44668
Project: 44668
Buggy source:
private static String createBooleanCriteria(String property,QueryOperator operator,Boolean booleanValue){
  return createAttributeCriteria(property,operator,"String_Node_Str" + booleanValue.toString() + "String_Node_Str");
}

Fixed version (ground truth):
private static String createBooleanCriteria(String property,QueryOperator operator,Boolean booleanValue){
  return createAttributeCriteria(property,operator,"String_Node_Str" + booleanValue.toString() + "String_Node_Str",true);
}
Program: 44669
Project: 44669
Buggy source:
private static String generateJcrPathForPropertyPath(String propertyPath,boolean lastPropertyInPathRepresentsASimpleProperty){
  if (StringUtils.isNotBlank(propertyPath)) {
    String functionName=getFunctionNameFromProperty(propertyPath);
    String tempPropertyPath=propertyPath;
    if (StringUtils.isNotBlank(functionName)) {
      tempPropertyPath=StringUtils.substringBetween(propertyPath,functionName + CmsConstants.LEFT_PARENTHESIS,CmsConstants.RIGHT_PARENTHESIS);
    }
    if (CmsConstants.ANY_NAME.equals(tempPropertyPath.trim())) {
      return attachFunctionNameToProperty(functionName,tempPropertyPath);
    }
    if (tempPropertyPath.contains(CmsConstants.PERIOD_DELIM)) {
      tempPropertyPath=StringUtils.replace(tempPropertyPath,CmsConstants.PERIOD_DELIM,CmsConstants.FORWARD_SLASH);
    }
    if (!lastPropertyInPathRepresentsASimpleProperty) {
      return attachFunctionNameToProperty(functionName,ISO9075.encodePath(tempPropertyPath));
    }
    if (!tempPropertyPath.contains(CmsConstants.AT_CHAR)) {
      tempPropertyPath=ISO9075.encodePath(tempPropertyPath);
      if (tempPropertyPath.contains(CmsConstants.FORWARD_SLASH)) {
        tempPropertyPath=CmsUtils.replaceLast(CmsConstants.FORWARD_SLASH,CmsConstants.FORWARD_SLASH + CmsConstants.AT_CHAR,tempPropertyPath);
      }
 else       tempPropertyPath=CmsConstants.AT_CHAR + tempPropertyPath;
    }
    return attachFunctionNameToProperty(functionName,tempPropertyPath);
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public static String generateJcrPathForPropertyPath(String propertyPath,boolean lastPropertyInPathRepresentsASimpleProperty){
  if (StringUtils.isNotBlank(propertyPath)) {
    String functionName=getFunctionNameFromProperty(propertyPath);
    String tempPropertyPath=propertyPath;
    if (StringUtils.isNotBlank(functionName)) {
      tempPropertyPath=StringUtils.substringBetween(propertyPath,functionName + CmsConstants.LEFT_PARENTHESIS,CmsConstants.RIGHT_PARENTHESIS);
    }
    if (CmsConstants.ANY_NAME.equals(tempPropertyPath.trim())) {
      return attachFunctionNameToProperty(functionName,tempPropertyPath);
    }
    if (tempPropertyPath.contains(CmsConstants.PERIOD_DELIM)) {
      tempPropertyPath=StringUtils.replace(tempPropertyPath,CmsConstants.PERIOD_DELIM,CmsConstants.FORWARD_SLASH);
    }
    if (!lastPropertyInPathRepresentsASimpleProperty) {
      return attachFunctionNameToProperty(functionName,ISO9075.encodePath(tempPropertyPath));
    }
    if (!tempPropertyPath.contains(CmsConstants.AT_CHAR)) {
      tempPropertyPath=ISO9075.encodePath(tempPropertyPath);
      if (tempPropertyPath.contains(CmsConstants.FORWARD_SLASH)) {
        tempPropertyPath=CmsUtils.replaceLast(CmsConstants.FORWARD_SLASH,CmsConstants.FORWARD_SLASH + CmsConstants.AT_CHAR,tempPropertyPath);
      }
 else       tempPropertyPath=CmsConstants.AT_CHAR + tempPropertyPath;
    }
    return attachFunctionNameToProperty(functionName,tempPropertyPath);
  }
  return "String_Node_Str";
}
Program: 44671
Project: 44671
Buggy source:
public static String addLikeCriteria(String property,String textToFind){
  String attributeName=generateJcrPathForSimpleProperty(property);
  if (StringUtils.isBlank(attributeName))   attributeName=CmsConstants.PERIOD_DELIM;
  return CmsConstants.EMPTY_SPACE + JcrBuiltInItem.JcrLike.getJcrName() + CmsConstants.LEFT_PARENTHESIS+ attributeName+ CmsConstants.COMMA+ "String_Node_Str"+ textToFind+ "String_Node_Str"+ CmsConstants.RIGHT_PARENTHESIS_WITH_LEADING_AND_TRAILING_SPACE;
}

Fixed version (ground truth):
public static String addLikeCriteria(String property,String textToFind){
  String attributeName=generateJcrPathForPropertyPath(property,true);
  if (StringUtils.isBlank(attributeName))   attributeName=CmsConstants.PERIOD_DELIM;
  return CmsConstants.EMPTY_SPACE + JcrBuiltInItem.JcrLike.getJcrName() + CmsConstants.LEFT_PARENTHESIS+ attributeName+ CmsConstants.COMMA+ "String_Node_Str"+ textToFind+ "String_Node_Str"+ CmsConstants.RIGHT_PARENTHESIS_WITH_LEADING_AND_TRAILING_SPACE;
}
Program: 44672
Project: 44672
Buggy source:
public static String createLongCriteria(String property,QueryOperator operator,Long longValue){
  return createAttributeCriteria(property,operator,longValue.toString());
}

Fixed version (ground truth):
public static String createLongCriteria(String property,QueryOperator operator,Long longValue){
  return createAttributeCriteria(property,operator,longValue.toString(),true);
}
Program: 44673
Project: 44673
Buggy source:
private static String createDoubleCriteria(String property,QueryOperator operator,Double doubleValue){
  return createAttributeCriteria(property,operator,doubleValue.toString());
}

Fixed version (ground truth):
private static String createDoubleCriteria(String property,QueryOperator operator,Double doubleValue){
  return createAttributeCriteria(property,operator,doubleValue.toString(),true);
}
Program: 44674
Project: 44674
Buggy source:
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener){
  listener.getLogger().println("String_Node_Str");
  PrintStream logger=listener.getLogger();
  FilePath metricFile=new FilePath(build.getWorkspace(),outputFilePath);
  try {
    if (!metricFile.exists()) {
      listener.getLogger().println(String.format("String_Node_Str",outputFilePath));
      build.setResult(Result.FAILURE);
      return false;
    }
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  InterruptedException ie) {
    ie.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  Throwable t) {
    t.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  PmccabeFileParser parser=new PmccabeFileParser(metricFile);
  try {
    PmccabeReport report=parser.parse();
    build.addAction(new PmccabeAction(build,report));
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  listener.getLogger().println("String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener){
  listener.getLogger().println("String_Node_Str");
  FilePath workspace=build.getWorkspace();
  PrintStream logger=listener.getLogger();
  FilePath metricFile=new FilePath(build.getWorkspace(),outputFilePath);
  try {
    if (!metricFile.exists()) {
      listener.getLogger().println(String.format("String_Node_Str",outputFilePath));
      build.setResult(Result.FAILURE);
      return false;
    }
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  InterruptedException ie) {
    ie.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  Throwable t) {
    t.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  PmccabeFileParser parser=new PmccabeFileParser(metricFile);
  try {
    PmccabeReport report=workspace.act(parser);
    build.addAction(new PmccabeAction(build,report));
  }
 catch (  IOException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
catch (  InterruptedException ioe) {
    ioe.printStackTrace(logger);
    build.setResult(Result.FAILURE);
    return false;
  }
  listener.getLogger().println("String_Node_Str");
  return true;
}
Program: 44675
Project: 44675
Buggy source:
private void loadeggprices(){
  File folder=new File("String_Node_Str");
  File configFile=new File("String_Node_Str");
  if (configFile.exists()) {
    try {
      mobprice.clear();
      Properties theprices=new Properties();
      theprices.load(new FileInputStream(configFile));
      Iterator<Entry<Object,Object>> iprices=theprices.entrySet().iterator();
      while (iprices.hasNext()) {
        Entry<Object,Object> price=iprices.next();
        try {
          mobeggprice.put(price.getKey().toString().toLowerCase(),new Double(price.getValue().toString()));
        }
 catch (        NumberFormatException ex) {
          System.out.println("String_Node_Str" + price.getKey().toString() + "String_Node_Str");
        }
      }
    }
 catch (    IOException e) {
    }
    if (mobprice.size() < CreatureTypes.values().length) {
      System.out.println("String_Node_Str");
      createeggprices();
    }
  }
 else {
    System.out.println("String_Node_Str");
    folder.mkdir();
    System.out.println("String_Node_Str");
    createprices();
  }
}

Fixed version (ground truth):
private void loadeggprices(){
  File folder=new File("String_Node_Str");
  File configFile=new File("String_Node_Str");
  if (configFile.exists()) {
    try {
      mobprice.clear();
      Properties theprices=new Properties();
      theprices.load(new FileInputStream(configFile));
      Iterator<Entry<Object,Object>> iprices=theprices.entrySet().iterator();
      while (iprices.hasNext()) {
        Entry<Object,Object> price=iprices.next();
        try {
          mobeggprice.put(price.getKey().toString().toLowerCase(),new Double(price.getValue().toString()));
        }
 catch (        NumberFormatException ex) {
          System.out.println("String_Node_Str" + price.getKey().toString() + "String_Node_Str");
        }
      }
    }
 catch (    IOException e) {
    }
    if (mobprice.size() < CreatureTypes.values().length) {
      System.out.println("String_Node_Str");
      createeggprices();
    }
  }
 else {
    System.out.println("String_Node_Str");
    folder.mkdir();
    System.out.println("String_Node_Str");
    createeggprices();
  }
}
Program: 44677
Project: 44677
Buggy source:
public void removeDisabledSpawner(Location spawner,EntityType mobname){
  int startx=spawner.getBlockX() - 4;
  int endx=startx + 8;
  int starty=spawner.getBlockY() - 1;
  int endy=starty + 8;
  int startz=spawner.getBlockZ() - 4;
  int endz=startz + 8;
  disabledspawnerlocs.remove(locationBuilder(spawner));
  for (; startx < endx; startx++) {
    for (; starty < endy; starty++) {
      for (; startz < endz; startz++) {
        String location=startx + "String_Node_Str" + starty+ "String_Node_Str"+ startz+ "String_Node_Str"+ spawner.getWorld().getName();
        if (disabledspawners.containsKey(location)) {
          disabledspawners.get(location).remove(mobname);
        }
      }
    }
  }
  saveDisabledSpawners();
}

Fixed version (ground truth):
public void removeDisabledSpawner(Location spawner,EntityType mobname){
  int startx=spawner.getBlockX() - 4;
  int endx=startx + 8;
  int starty=spawner.getBlockY() - 1;
  int endy=starty + 8;
  int startz=spawner.getBlockZ() - 4;
  int endz=startz + 8;
  disabledspawnerlocs.remove(locationBuilder(spawner));
  for (int x=startx; x < endx; x++) {
    for (int y=starty; y < endy; y++) {
      for (int z=startz; z < endz; z++) {
        String location=x + "String_Node_Str" + y+ "String_Node_Str"+ z+ "String_Node_Str"+ spawner.getWorld().getName();
        if (disabledspawners.containsKey(location)) {
          disabledspawners.get(location).remove(mobname);
        }
      }
    }
  }
  saveDisabledSpawners();
}
Program: 44678
Project: 44678
Buggy source:
public void addDisabledSpawner(Location spawner,EntityType mobname){
  int startx=spawner.getBlockX() - 4;
  int endx=startx + 8;
  int starty=spawner.getBlockY() - 1;
  int endy=starty + 8;
  int startz=spawner.getBlockZ() - 4;
  int endz=startz + 8;
  disabledspawnerlocs.put(locationBuilder(spawner),new Integer(mobname.getTypeId()));
  for (; startx < endx; startx++) {
    for (; starty < endy; starty++) {
      for (; startz < endz; startz++) {
        String location=startx + "String_Node_Str" + starty+ "String_Node_Str"+ startz+ "String_Node_Str"+ spawner.getWorld().getName();
        if (disabledspawners.containsKey(location)) {
          disabledspawners.get(location).add(mobname);
        }
 else {
          LinkedList<EntityType> tlist=new LinkedList<EntityType>();
          tlist.add(mobname);
          disabledspawners.put(location,tlist);
        }
      }
    }
  }
  saveDisabledSpawners();
}

Fixed version (ground truth):
public void addDisabledSpawner(Location spawner,EntityType mobname){
  int startx=spawner.getBlockX() - 4;
  int endx=startx + 8;
  int starty=spawner.getBlockY() - 1;
  int endy=starty + 8;
  int startz=spawner.getBlockZ() - 4;
  int endz=startz + 8;
  disabledspawnerlocs.put(locationBuilder(spawner),new Integer(mobname.getTypeId()));
  for (int x=startx; x < endx; x++) {
    for (int y=starty; y < endy; y++) {
      for (int z=startz; z < endz; z++) {
        String location=x + "String_Node_Str" + y+ "String_Node_Str"+ z+ "String_Node_Str"+ spawner.getWorld().getName();
        if (disabledspawners.containsKey(location)) {
          disabledspawners.get(location).add(mobname);
        }
 else {
          LinkedList<EntityType> tlist=new LinkedList<EntityType>();
          tlist.add(mobname);
          disabledspawners.put(location,tlist);
        }
      }
    }
  }
  saveDisabledSpawners();
}
Program: 44681
Project: 44681
Buggy source:
public static void init(String dbmsName,String uri,String username,String password,int reloadDelay) throws Exception {
  if (init) {
    return;
  }
  System.out.println("String_Node_Str");
  try {
    dbms=Dbms.valueOf(dbmsName);
  }
 catch (  IllegalArgumentException e) {
    System.err.println("String_Node_Str");
    dbms=Dbms.SQLITE;
  }
  try {
    Class.forName(dbms.getDriver());
  }
 catch (  ClassNotFoundException e) {
    throw new Exception("String_Node_Str",e);
  }
  dbSource=dbms.getSource(username,password,uri);
  verifyAndCreateTables();
  dbConn=dbSource.getConnection();
  init=true;
  clearWorldCache();
}

Fixed version (ground truth):
public synchronized static void init(String dbmsName,String uri,String username,String password,int reloadDelay) throws Exception {
  if (init) {
    return;
  }
  System.out.println("String_Node_Str");
  try {
    dbms=Dbms.valueOf(dbmsName);
  }
 catch (  IllegalArgumentException e) {
    System.err.println("String_Node_Str");
    dbms=Dbms.SQLITE;
  }
  try {
    Class.forName(dbms.getDriver());
  }
 catch (  ClassNotFoundException e) {
    throw new Exception("String_Node_Str",e);
  }
  dbSource=dbms.getSource(username,password,uri);
  verifyAndCreateTables();
  dbConn=dbSource.getConnection();
  init=true;
  clearWorldCache();
}
Program: 44682
Project: 44682
Buggy source:
@Override public String getString(String name,String path){
  String data=null;
  int uid;
  try {
    uid=getId(name);
  }
 catch (  SQLException e) {
    e.printStackTrace();
    return data;
  }
  List<Map<Integer,Object>> results=SqlStorage.runQuery(dataGetPool,new Object[]{uid,path},true,1,2);
  for (  Map<Integer,Object> row : results) {
    Object o=row.get(1);
    if (o instanceof String) {
      data=(String)o;
    }
  }
  return data;
}

Fixed version (ground truth):
@Override public String getString(String name,String path){
  String data=null;
  int uid;
  try {
    uid=getId(name);
  }
 catch (  SQLException e) {
    e.printStackTrace();
    return data;
  }
  List<Map<Integer,Object>> results=SqlStorage.runQuery(dataGetPool,new Object[]{uid,path},true,1);
  for (  Map<Integer,Object> row : results) {
    Object o=row.get(1);
    if (o instanceof String) {
      data=(String)o;
    }
  }
  return data;
}
Program: 44683
Project: 44683
Buggy source:
/** 
 * This method prepares the environment for loading rdf and handling failures
 * @param _tripleFile the name a file containing the triples to be loaded into the Blueprints managed graph.
 * @param _subRefNodeName the reference node for this collection.
 * @param _context the object of the triple.
 * @see net.justtrade.rest.handlers.graph.ManagementIndexHelper#getCollectionRefVertex(String,IndexableGraph,boolean)
 */
public void injectRDF(String _tripleFile,String _subRefNodeName,RexsterResourceContext _context){
  final String sMETHOD="String_Node_Str";
  String tripleFile=_tripleFile.trim();
  if (tripleFile.startsWith(FILE_SEPARATOR))   tripleFile=tripleFile.substring(1);
  TransactionalGraph tranGraph=(TransactionalGraph)_context.getRexsterApplicationGraph().getGraph();
  try {
    logger.info(sMETHOD + "String_Node_Str" + _tripleFile+ "String_Node_Str");
    writeToGraphStore(_subRefNodeName,_tripleFile,tranGraph);
    logger.info(sMETHOD + "String_Node_Str" + _tripleFile+ "String_Node_Str");
  }
 catch (  MalformedURLException mfuex) {
    logger.error(sMETHOD + "String_Node_Str" + mfuex.getLocalizedMessage()+ "String_Node_Str"+ mfuex.getStackTrace());
  }
catch (  Exception ex) {
    logger.error(sMETHOD + "String_Node_Str" + ex.getLocalizedMessage()+ "String_Node_Str");
  }
  RDF_Analyzer.analyzeModelData();
}

Fixed version (ground truth):
/** 
 * This method prepares the environment for loading rdf and handling failures
 * @param _tripleFile the name a file containing the triples to be loaded into the Blueprints managed graph.
 * @param _subRefNodeName the reference node for this collection.
 * @param _context the object of the triple.
 * @see net.justtrade.rest.handlers.graph.ManagementIndexHelper#getCollectionRefVertex(String,IndexableGraph,boolean)
 */
public void injectRDF(String _tripleFile,String _subRefNodeName,RexsterResourceContext _context){
  final String sMETHOD="String_Node_Str";
  String tripleFile=_tripleFile.trim();
  if (tripleFile.startsWith(FILE_SEPARATOR))   tripleFile=tripleFile.substring(1);
  TransactionalGraph tranGraph=(TransactionalGraph)_context.getRexsterApplicationGraph().getGraph();
  try {
    logger.info(sMETHOD + "String_Node_Str" + tripleFile+ "String_Node_Str");
    writeToGraphStore(_subRefNodeName,tripleFile,tranGraph);
    logger.info(sMETHOD + "String_Node_Str" + tripleFile+ "String_Node_Str");
  }
 catch (  MalformedURLException mfuex) {
    logger.error(sMETHOD + "String_Node_Str" + mfuex.getLocalizedMessage()+ "String_Node_Str"+ mfuex.getStackTrace());
  }
catch (  Exception ex) {
    logger.error(sMETHOD + "String_Node_Str" + ex.getLocalizedMessage()+ "String_Node_Str");
  }
  RDF_Analyzer.analyzeModelData();
}
Program: 44684
Project: 44684
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  AWSCredentialsProvider creds;
  if (StringUtils.isNotBlank(awsAccessKeyId) && StringUtils.isNotBlank(awsSecretKey)) {
    creds=new StaticCredentialsProvider(new BasicAWSCredentials(awsAccessKeyId,awsSecretKey));
  }
 else   if (instanceProfileUsed) {
    creds=new InstanceProfileCredentialsProvider();
  }
 else   if (StringUtils.isNotBlank(server)) {
    Server s=settings.getServer(server);
    creds=new StaticCredentialsProvider(new BasicAWSCredentials(s.getUsername(),s.getPassword()));
  }
 else {
    throw new MojoFailureException("String_Node_Str");
  }
  AmazonS3 s3=new AmazonS3Client(creds);
  FileSetManager fileSetManager=new FileSetManager(getLog());
  for (  FileSet fs : fileSets) {
    String destPath=StringUtils.trimToEmpty(fs.getOutputDirectory());
    if (StringUtils.isNotBlank(destPath) && !destPath.endsWith("String_Node_Str")) {
      destPath+="String_Node_Str";
    }
    for (    String file : fileSetManager.getIncludedFiles(fs)) {
      File source=new File(fs.getDirectory(),file);
      getLog().info("String_Node_Str" + source + "String_Node_Str"+ bucket+ "String_Node_Str"+ destPath+ file);
      s3.putObject(bucket,destPath + file,source);
    }
  }
}

Fixed version (ground truth):
/** 
 * @inheritDoc
 */
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  AWSCredentialsProvider creds;
  if (StringUtils.isNotBlank(awsAccessKeyId) && StringUtils.isNotBlank(awsSecretKey)) {
    creds=new StaticCredentialsProvider(new BasicAWSCredentials(awsAccessKeyId,awsSecretKey));
  }
 else   if (instanceProfileUsed) {
    creds=new InstanceProfileCredentialsProvider();
  }
 else   if (StringUtils.isNotBlank(server)) {
    Server s=settings.getServer(server);
    if (s == null || StringUtils.isBlank(s.getUsername()) || StringUtils.isBlank(s.getPassword())) {
      throw new MojoFailureException("String_Node_Str" + server + "String_Node_Str");
    }
    creds=new StaticCredentialsProvider(new BasicAWSCredentials(s.getUsername(),s.getPassword()));
  }
 else {
    throw new MojoFailureException("String_Node_Str");
  }
  AmazonS3 s3=new AmazonS3Client(creds);
  FileSetManager fileSetManager=new FileSetManager(getLog());
  for (  FileSet fs : fileSets) {
    String destPath=StringUtils.trimToEmpty(fs.getOutputDirectory());
    if (StringUtils.isNotBlank(destPath) && !destPath.endsWith("String_Node_Str")) {
      destPath+="String_Node_Str";
    }
    for (    String file : fileSetManager.getIncludedFiles(fs)) {
      File source=new File(fs.getDirectory(),file);
      getLog().info("String_Node_Str" + source + "String_Node_Str"+ bucket+ "String_Node_Str"+ destPath+ file);
      s3.putObject(bucket,destPath + file,source);
    }
  }
}
Program: 44686
Project: 44686
Buggy source:
/** 
 * Goes through the sequence codon per codon and optimizes based on the organism's codon table. Highest frequency codon should be put in at least in this algorithm
 * @param sequence
 * @param codonTable
 * @return
 */
public static String seqOptimizationAlgorithimSimple(String sequence,OrgCodonTable codonTable){
  String currentCodon;
  String optimalCodon;
  String modifiedSequence="String_Node_Str";
  AminoAcid currentAA;
  for (int seqIndex=0; seqIndex < sequence.length(); seqIndex+=3) {
    currentCodon=sequence.substring(seqIndex,seqIndex + 3);
    currentAA=codonTable.aminoAcids.get(UtilityMethods.findAminoAcidIndex(currentCodon));
    optimalCodon=currentAA.getDesiredCodon(0).sequence;
    modifiedSequence+=optimalCodon;
  }
  return modifiedSequence;
}

Fixed version (ground truth):
/** 
 * Goes through the sequence codon per codon and optimizes based on the organism's codon table. Highest frequency codon should be put in at least in this algorithm
 * @param sequence
 * @param codonTable
 * @return
 */
public static String seqOptimizationAlgorithimSimple(String sequence,OrgCodonTable codonTable){
  String currentCodon;
  String optimalCodon;
  String modifiedSequence="String_Node_Str";
  AminoAcid currentAA;
  for (int seqIndex=0; seqIndex < sequence.length(); seqIndex+=3) {
    currentCodon=sequence.substring(seqIndex,seqIndex + 3);
    currentAA=codonTable.aminoAcids.get(UtilityMethods.findAminoAcidIndex(currentCodon));
    optimalCodon=currentAA.getDesiredCodon(0).sequence;
    modifiedSequence+=optimalCodon;
  }
  modifiedSequence=modifiedSequence.toLowerCase();
  return modifiedSequence;
}
Program: 44687
Project: 44687
Buggy source:
/** 
 * For rank of 1 it determines the most frequent codon, for rank 2 it determines the next most frequent codon etc.
 * @param rank
 * @return The nth most frequent Codon for that particular amino acid
 */
public Codon getDesiredCodon(int rank){
  if (this.codons.size() < rank) {
    return null;
  }
 else {
    return this.codons.get(rank - 1);
  }
}

Fixed version (ground truth):
/** 
 * For rank of 1 it determines the most frequent codon, for rank 2 it determines the next most frequent codon etc.
 * @param rank
 * @return The nth most frequent Codon for that particular amino acid
 */
public Codon getDesiredCodon(int rank){
  if (this.codons.size() < rank) {
    return null;
  }
 else {
    return this.codons.get(rank);
  }
}
Program: 44688
Project: 44688
Buggy source:
public void actionPerformed(ActionEvent e){
  JButton source=(JButton)e.getSource();
  if (source == cancelButton) {
    mainMenu.closeAnalyzeSequenceView();
  }
 else   if (source == submitButton) {
    if (checkInput() == true) {
    }
 else {
    }
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  JButton source=(JButton)e.getSource();
  if (source == cancelButton) {
    mainMenu.closeAnalyzeSequenceView();
  }
 else   if (source == submitButton) {
    testChangeCodons();
    if (checkInput() == true) {
    }
 else {
    }
  }
}
Program: 44689
Project: 44689
Buggy source:
public boolean testChangeCodons(){
  return true;
}

Fixed version (ground truth):
public boolean testChangeCodons(){
  OrgCodonTable organism=mainMenu.myss.getOrganism(this.organismComboBox.getSelectedIndex());
  String unmodifiedSequence=this.sequenceArea.getText();
  String modifiedSequence;
  String changesString="String_Node_Str";
  GeneSequence sequence=new GeneSequence(unmodifiedSequence);
  modifiedSequence=SeqModification.seqOptimizationAlgorithimSimple(unmodifiedSequence,organism);
  sequence.setModifiedSequence(modifiedSequence);
  sequence.findChanges();
  sequence=PrimerDesign.linearPrimerDesignAlgo(sequence);
  System.out.println("String_Node_Str" + unmodifiedSequence);
  System.out.println("String_Node_Str" + modifiedSequence);
  for (int i=0; i < sequence.changes.size(); i++) {
    changesString+=sequence.changes.get(i);
    changesString+="String_Node_Str";
  }
  System.out.println(changesString);
  return true;
}
Program: 44690
Project: 44690
Buggy source:
@Override public boolean onCreateOptionsMenu(Menu menu){
  MenuInflater inflater=getMenuInflater();
  inflater.inflate(R.menu.menu,menu);
  return true;
}

Fixed version (ground truth):
@Override public boolean onCreateOptionsMenu(Menu menu){
  MenuInflater inflater=getMenuInflater();
  inflater.inflate(R.menu.mapmenu,menu);
  return true;
}
Program: 44691
Project: 44691
Buggy source:
@Override protected Void doInBackground(Void... params){
  while (true) {
    if (zoomLevel != map.getZoomLevel()) {
      handler.post(new Runnable(){
        @Override public void run(){
          mapClear();
          zoomLevel=map.getZoomLevel();
        }
      }
);
    }
    if (isMoved() || isTimeChanged()) {
      stablePainter();
    }
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override protected Void doInBackground(Void... params){
  while (true) {
    if (zoomLevel != map.getZoomLevel()) {
      handler.post(new Runnable(){
        @Override public void run(){
          mapClear();
          zoomLevel=map.getZoomLevel();
        }
      }
);
    }
    if (isTimeChanged()) {
      mapClear();
    }
    if (isMoved() || isTimeChanged()) {
      stablePainter();
    }
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}
Program: 44692
Project: 44692
Buggy source:
@Override protected Void doInBackground(Void... params){
  while (true) {
    if (zoomLevel != map.getZoomLevel()) {
      handler.post(new Runnable(){
        @Override public void run(){
          mapClear();
          zoomLevel=map.getZoomLevel();
        }
      }
);
    }
    if (isMoved() || isTimeChanged()) {
      drawRecentLocal();
    }
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override protected Void doInBackground(Void... params){
  while (true) {
    if (zoomLevel != map.getZoomLevel()) {
      handler.post(new Runnable(){
        @Override public void run(){
          mapClear();
          zoomLevel=map.getZoomLevel();
        }
      }
);
    }
    if (isTimeChanged()) {
      mapClear();
    }
    if (isMoved() || isTimeChanged()) {
      drawRecentLocal();
    }
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}
Program: 44694
Project: 44694
Buggy source:
protected ArrayList<HappyBottle> getMyLocalBefore(int minLat,int maxLat,int minLong,int maxLong,int limit,long timebefore){
  SQLiteDatabase db=h.getReadableDatabase();
  String[] args={Integer.toString(minLat),Integer.toString(maxLat),Integer.toString(minLong),Integer.toString(maxLong),Long.toString(timebefore)};
  Cursor cursor=db.query(TABLE_NAME,null,"String_Node_Str",args,null,null,TIME + "String_Node_Str",Integer.toString(limit));
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  while (cursor.moveToNext()) {
    HappyBottle b=createBottle(cursor);
    a.add(b);
  }
  cursor.close();
  db.close();
  return a;
}

Fixed version (ground truth):
protected ArrayList<HappyBottle> getMyLocalBefore(int minLat,int maxLat,int minLong,int maxLong,int limit,long timebefore){
  SQLiteDatabase db=h.getReadableDatabase();
  String[] args={Integer.toString(minLat),Integer.toString(maxLat),Integer.toString(minLong),Integer.toString(maxLong),Long.toString(timebefore),Long.toString(myID)};
  Cursor cursor=db.query(TABLE_NAME,null,"String_Node_Str" + UID + "String_Node_Str",args,null,null,TIME + "String_Node_Str",Integer.toString(limit));
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  while (cursor.moveToNext()) {
    HappyBottle b=createBottle(cursor);
    a.add(b);
  }
  cursor.close();
  db.close();
  return a;
}
Program: 44695
Project: 44695
Buggy source:
protected ArrayList<HappyBottle> getMyLocalRecent(int minLat,int maxLat,int minLong,int maxLong,int limit){
  SQLiteDatabase db=h.getReadableDatabase();
  String[] args={Integer.toString(minLat),Integer.toString(maxLat),Integer.toString(minLong),Integer.toString(maxLong)};
  Cursor cursor=db.query(TABLE_NAME,null,"String_Node_Str",args,null,null,TIME + "String_Node_Str",Integer.toString(limit));
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  while (cursor.moveToNext()) {
    HappyBottle b=createBottle(cursor);
    a.add(b);
  }
  cursor.close();
  db.close();
  return a;
}

Fixed version (ground truth):
protected ArrayList<HappyBottle> getMyLocalRecent(int minLat,int maxLat,int minLong,int maxLong,int limit){
  SQLiteDatabase db=h.getReadableDatabase();
  String[] args={Integer.toString(minLat),Integer.toString(maxLat),Integer.toString(minLong),Integer.toString(maxLong),Long.toString(myID)};
  Cursor cursor=db.query(TABLE_NAME,null,"String_Node_Str" + UID + "String_Node_Str",args,null,null,TIME + "String_Node_Str",Integer.toString(limit));
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  while (cursor.moveToNext()) {
    HappyBottle b=createBottle(cursor);
    a.add(b);
  }
  cursor.close();
  db.close();
  return a;
}
Program: 44696
Project: 44696
Buggy source:
protected ArrayList<HappyBottle> getMyLocalAfter(int minLat,int maxLat,int minLong,int maxLong,int limit,long timeafter){
  SQLiteDatabase db=h.getReadableDatabase();
  String[] args={Integer.toString(minLat),Integer.toString(maxLat),Integer.toString(minLong),Integer.toString(maxLong),Long.toString(timeafter)};
  Cursor cursor=db.query(TABLE_NAME,null,"String_Node_Str",args,null,null,TIME + "String_Node_Str",Integer.toString(limit));
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  while (cursor.moveToNext()) {
    HappyBottle b=createBottle(cursor);
    a.add(b);
  }
  cursor.close();
  db.close();
  return a;
}

Fixed version (ground truth):
protected ArrayList<HappyBottle> getMyLocalAfter(int minLat,int maxLat,int minLong,int maxLong,int limit,long timeafter){
  SQLiteDatabase db=h.getReadableDatabase();
  String[] args={Integer.toString(minLat),Integer.toString(maxLat),Integer.toString(minLong),Integer.toString(maxLong),Long.toString(timeafter),Long.toString(myID)};
  Cursor cursor=db.query(TABLE_NAME,null,"String_Node_Str" + UID + "String_Node_Str",args,null,null,TIME + "String_Node_Str",Integer.toString(limit));
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  while (cursor.moveToNext()) {
    HappyBottle b=createBottle(cursor);
    a.add(b);
  }
  cursor.close();
  db.close();
  return a;
}
Program: 44697
Project: 44697
Buggy source:
@Override protected void onResume(){
  super.onResume();
  timeForView.setToNow();
  userLocationOverlay.enableMyLocation();
  zpl=new ZoomPanListener();
  zpl.execute(null);
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  timeForView.setToNow();
  epochChecker=timeForView.normalize(true);
  userLocationOverlay.enableMyLocation();
  zpl=new ZoomPanListener();
  zpl.execute(null);
}
Program: 44698
Project: 44698
Buggy source:
private ArrayList<HappyBottle> parse(String in){
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  try {
    JSONArray jarray=new JSONArray(in);
    for (int i=0; i < jarray.length(); i++) {
      JSONObject o=jarray.getJSONObject(i);
      HappyBottle b=newparseone(o);
      a.add(b);
    }
  }
 catch (  JSONException e) {
    Log.e(TAG,"String_Node_Str" + e.toString());
    Log.e(TAG,"String_Node_Str" + in);
    a.add(new HappyBottle(myID,1,1,(short)1,"String_Node_Str",1));
    Log.e(TAG,"String_Node_Str");
    Log.e(TAG,in);
    e.printStackTrace();
  }
catch (  Exception e) {
    Log.e(TAG + "String_Node_Str",e.toString());
  }
  return a;
}

Fixed version (ground truth):
private ArrayList<HappyBottle> parse(String in){
  ArrayList<HappyBottle> a=new ArrayList<HappyBottle>();
  try {
    JSONArray jarray=new JSONArray(in);
    for (int i=0; i < jarray.length(); i++) {
      JSONObject o=jarray.getJSONObject(i);
      HappyBottle b=newparseone(o);
      a.add(b);
    }
  }
 catch (  JSONException e) {
    Log.e(TAG,"String_Node_Str" + e.toString());
    Log.e(TAG,"String_Node_Str" + in);
    Log.e(TAG,"String_Node_Str");
    Log.e(TAG,in);
    e.printStackTrace();
  }
catch (  Exception e) {
    Log.e(TAG + "String_Node_Str",e.toString());
  }
  return a;
}
Program: 44699
Project: 44699
Buggy source:
protected ArrayList<HappyBottle> download(Task t){
  String page="String_Node_Str";
  try {
    HttpGet request=new HttpGet();
    request.setURI(new URI("String_Node_Str"));
    if (t.equals(Task.GETMINE)) {
      request.setURI(new URI("String_Node_Str" + myID + "String_Node_Str"));
    }
    BasicHeader declareAuth=new BasicHeader("String_Node_Str","String_Node_Str" + Base64.encodeToString("String_Node_Str".getBytes(),Base64.DEFAULT) + "String_Node_Str");
    request.setHeader(declareAuth);
    page=connectionHelper(request);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return parse(page);
}

Fixed version (ground truth):
protected ArrayList<HappyBottle> download(Task t){
  String page="String_Node_Str";
  try {
    HttpGet request=new HttpGet();
    request.setURI(new URI("String_Node_Str"));
    if (t.equals(Task.GETMINE)) {
      request.setURI(new URI("String_Node_Str" + myID + "String_Node_Str"));
    }
    Log.d(TAG,"String_Node_Str" + request.getURI().toString());
    page=connectionHelper(request);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return parse(page);
}
Program: 44700
Project: 44700
Buggy source:
/** 
 * Initializes activity
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  View happyButton=findViewById(R.id.happy_button);
  happyButton.setOnClickListener(this);
  View sadButton=findViewById(R.id.sad_button);
  sadButton.setOnClickListener(this);
  View submitButton=findViewById(R.id.more_to_map);
  submitButton.setOnClickListener(this);
  UIDh=new UIDhelper();
  myID=UIDh.getSetUID(getSharedPreferences(USER_DATA,-3),this);
}

Fixed version (ground truth):
/** 
 * Initializes activity
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  View happyButton=findViewById(R.id.happy_button);
  happyButton.setOnClickListener(this);
  View sadButton=findViewById(R.id.sad_button);
  sadButton.setOnClickListener(this);
  View submitButton=findViewById(R.id.more_to_map);
  submitButton.setOnClickListener(this);
  UIDh=new UIDhelper();
  myID=UIDh.getSetUID(getSharedPreferences(USER_DATA,-3),this);
  h=new HappyData(this);
}