nus-yam/ex-repair huggingface dataset:
Program: 45141
Project: 45141
Buggy source:
/** 
 * This populates the rsaKeyFileId dropdown with a list of 'FileCredentials' that could be used.
 * @return  Returns a list of FileCredential objects that have been configured.
 */
public static ListBoxModel doFillRsaKeyFileIdItems(@AncestorInPath Job<?,?> owner,@QueryParameter String source){
  if (owner == null || !owner.hasPermission(Item.EXTENDED_READ)) {
    return new ListBoxModel();
  }
  return new StandardListBoxModel().withEmptySelection().withAll(availableFileCredentials(owner,new EnvVars().expand(source)));
}

Fixed version (ground truth):
/** 
 * This populates the rsaKeyFileId dropdown with a list of 'FileCredentials' that could be used.
 * @param context - Owner
 * @param remote - Source
 * @return  Returns a list of FileCredential objects that have been configured.
 */
public static ListBoxModel doFillRsaKeyFileIdItems(@AncestorInPath Item context,@QueryParameter String remote){
  return doFillCredentialsItems(context,remote,FileCredentials.class);
}
Program: 45142
Project: 45142
Buggy source:
/** 
 * Used to populate the rsaKeyFilePath field in stapler.
 * @return If using an RSA key file path, returns the path, otherwise returns null.
 */
@SuppressWarnings("String_Node_Str") public String getRsaKeyFilePath(){
  String result=null;
  if (rsaKey != null && rsaKey.getRsaKeyType() == RSAKey.Type.Path) {
    result=rsaKey.getRsaKeyValue();
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Used to populate the rsaKeyFilePath field in stapler.
 * @return If using an RSA key file path, returns the path, otherwise returns null.
 */
@SuppressWarnings("String_Node_Str") public String getRsaKeyFilePath(){
  String result=null;
  if (rsaKey != null && rsaKey.getRsaKeyType() == RSAKey.Type.Path) {
    result=rsaKey.getRsaKeyValue();
  }
 else   if (rsaKeyPath != null && !rsaKeyPath.isEmpty()) {
    result=rsaKeyPath;
  }
  return result;
}
Program: 45143
Project: 45143
Buggy source:
@Exported public boolean isUsingRsaKeyPath(){
  return rsaKey != null && rsaKey.getRsaKeyType() == RSAKey.Type.Path;
}

Fixed version (ground truth):
@Exported public boolean isUsingRsaKeyPath(){
  boolean result=rsaKeyPath != null && !rsaKeyPath.isEmpty();
  return result || (rsaKey != null && rsaKey.getRsaKeyType() == RSAKey.Type.Path);
}
Program: 45144
Project: 45144
Buggy source:
public static ListBoxModel doFillCredentialsItems(@AncestorInPath Item context,@QueryParameter String remote,Class credentialType){
  if (context == null && Jenkins.getInstance() != null && !Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER) || context != null && !context.hasPermission(Item.EXTENDED_READ)) {
    return new StandardListBoxModel();
  }
  List<DomainRequirement> domainRequirements;
  if (remote == null) {
    domainRequirements=Collections.<DomainRequirement>emptyList();
  }
 else {
    domainRequirements=URIRequirementBuilder.fromUri(remote.trim()).build();
  }
  return new StandardListBoxModel().withEmptySelection().withMatching(CredentialsMatchers.instanceOf(credentialType),CredentialsProvider.lookupCredentials(StandardCredentials.class,context,ACL.SYSTEM,domainRequirements));
}

Fixed version (ground truth):
/** 
 * @param context - Context
 * @param remote - Remtoe path
 * @param credentialType - Type of credentials
 * @return - Returns a properly populated listbox based on the current context
 */
public static ListBoxModel doFillCredentialsItems(@AncestorInPath Item context,@QueryParameter String remote,@Nonnull Class credentialType){
  Jenkins j=Jenkins.getInstance();
  if (context == null || j != null && !j.hasPermission(Jenkins.ADMINISTER) || !context.hasPermission(Item.EXTENDED_READ)) {
    return new StandardListBoxModel();
  }
  List<DomainRequirement> domainRequirements;
  if (remote == null) {
    domainRequirements=Collections.<DomainRequirement>emptyList();
  }
 else {
    domainRequirements=URIRequirementBuilder.fromUri(remote.trim()).build();
  }
  return new StandardListBoxModel().withEmptySelection().withMatching(CredentialsMatchers.instanceOf(credentialType),CredentialsProvider.lookupCredentials(StandardCredentials.class,context,ACL.SYSTEM,domainRequirements));
}
Program: 45145
Project: 45145
Buggy source:
/** 
 * Attempt to find a pre-configured 'SurroundTool' with a saved 'sscm_tool_name' Currently this will always fall back to the 'default' tool for the current node and requires some further testing of edge conditions
 */
public SurroundTool resolveSscmTool(TaskListener listener){
  SurroundTool sscm=null;
  if (sscm_tool_name == null || sscm_tool_name.isEmpty()) {
    sscm=SurroundTool.getDefaultInstallation();
  }
 else {
    sscm=Jenkins.getInstance().getDescriptorByType(SurroundTool.DescriptorImpl.class).getInstallation(sscm_tool_name);
    if (sscm == null) {
      listener.getLogger().println(String.format("String_Node_Str",sscm_tool_name));
      sscm=SurroundTool.getDefaultInstallation();
    }
  }
  return sscm;
}

Fixed version (ground truth):
/** 
 * Attempt to find a pre-configured 'SurroundTool' with a saved 'sscm_tool_name' Currently this will always fall back to the 'default' tool for the current node and requires some further testing of edge conditions
 */
public SurroundTool resolveSscmTool(TaskListener listener){
  SurroundTool sscm=null;
  if (sscm_tool_name == null || sscm_tool_name.isEmpty()) {
    sscm=SurroundTool.getDefaultInstallation();
  }
 else {
    SurroundTool.DescriptorImpl sscmToolDesc=Jenkins.getInstance().getDescriptorByType(SurroundTool.DescriptorImpl.class);
    if (sscmToolDesc != null)     sscm=sscmToolDesc.getInstallation(sscm_tool_name);
    if (sscm == null) {
      listener.getLogger().println(String.format("String_Node_Str",sscm_tool_name));
      sscm=SurroundTool.getDefaultInstallation();
    }
  }
  return sscm;
}
Program: 45146
Project: 45146
Buggy source:
@DataBoundConstructor public SurroundStep(String url,String credentialsId){
  url=Util.fixEmptyAndTrim(url);
  try {
    url=URLDecoder.decode(url,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
  }
  this.url=url;
  this.credentialsId=Util.fixEmptyAndTrim(credentialsId);
}

Fixed version (ground truth):
@DataBoundConstructor public SurroundStep(String url,String credentialsId){
  url=Util.fixEmptyAndTrim(url);
  try {
    if (url != null)     url=URLDecoder.decode(url,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
  }
  this.url=url;
  this.credentialsId=Util.fixEmptyAndTrim(credentialsId);
}
Program: 45147
Project: 45147
Buggy source:
/** 
 * This first checks the rsaKeyFileId and then the rsaKeyPath.  If it can find a path to an RSA Key file from either of these items it will return the path to the RSA Key file on the remote machine (or as defined via rsaKeyPath) If no RSA Key file is found, it returns null
 * @param owner     Used to lookup possible fileCredentials
 * @param env       Used as part of the lookup for fileCredentials
 * @param workspace Used as a destination for any RSA Key File retrieved from fileCredentials
 * @return Returns either the path to an RSA Key File, or null indicating no RSA Key File.
 */
private String getRemotePathForRSAKeyFile(Job<?,?> owner,EnvVars env,FilePath workspace){
  String result=null;
  if (rsaKey != null) {
switch (rsaKey.getRsaKeyType()) {
case ID:
      result=populateRSAKeyFile(owner,env,workspace);
    break;
case Path:
  result=rsaKey.getRsaKeyValue();
break;
case NoKey:
default :
result=null;
}
}
return result;
}

Fixed version (ground truth):
/** 
 * This first checks the rsaKeyFileId and then the rsaKeyPath.  If it can find a path to an RSA Key file from either of these items it will return the path to the RSA Key file on the remote machine (or as defined via rsaKeyPath) If no RSA Key file is found, it returns null
 * @param owner     Used to lookup possible fileCredentials
 * @param env       Used as part of the lookup for fileCredentials
 * @param workspace Used as a destination for any RSA Key File retrieved from fileCredentials
 * @return Returns either the path to an RSA Key File, or null indicating no RSA Key File.
 */
private String getRemotePathForRSAKeyFile(Job<?,?> owner,EnvVars env,FilePath workspace){
  String result=null;
  if (rsaKey != null) {
switch (rsaKey.getRsaKeyType()) {
case ID:
      result=populateRSAKeyFile(owner,env,workspace);
    break;
case Path:
  result=rsaKey.getRsaKeyValue();
break;
case NoKey:
default :
result=null;
}
}
 else if (rsaKeyPath != null && !rsaKeyPath.isEmpty()) {
result=rsaKeyPath;
}
return result;
}
Program: 45148
Project: 45148
Buggy source:
/** 
 * @param context - Context
 * @param remote - Remtoe path
 * @param credentialType - Type of credentials
 * @return - Returns a properly populated listbox based on the current context
 */
public static ListBoxModel doFillCredentialsItems(@AncestorInPath Item context,@QueryParameter String remote,@Nonnull Class credentialType){
  Jenkins j=Jenkins.getInstance();
  if (context == null || j != null && !j.hasPermission(Jenkins.ADMINISTER) || !context.hasPermission(Item.EXTENDED_READ)) {
    return new StandardListBoxModel();
  }
  List<DomainRequirement> domainRequirements;
  if (remote == null) {
    domainRequirements=Collections.<DomainRequirement>emptyList();
  }
 else {
    domainRequirements=URIRequirementBuilder.fromUri(remote.trim()).build();
  }
  return new StandardListBoxModel().withEmptySelection().withMatching(CredentialsMatchers.instanceOf(credentialType),CredentialsProvider.lookupCredentials(StandardCredentials.class,context,ACL.SYSTEM,domainRequirements));
}

Fixed version (ground truth):
/** 
 * @param context - Context
 * @param remote - Remote path
 * @param credentialType - Type of credentials
 * @return - Returns a properly populated listbox based on the current context
 */
public static ListBoxModel doFillCredentialsItems(@AncestorInPath Item context,@QueryParameter String remote,@Nonnull Class credentialType){
  Jenkins j=Jenkins.getInstance();
  if (context == null && !j.hasPermission(Jenkins.ADMINISTER) || context != null && !context.hasPermission(Item.EXTENDED_READ)) {
    return new StandardListBoxModel();
  }
  List<DomainRequirement> domainRequirements;
  if (remote == null) {
    domainRequirements=Collections.<DomainRequirement>emptyList();
  }
 else {
    domainRequirements=URIRequirementBuilder.fromUri(remote.trim()).build();
  }
  return new StandardListBoxModel().withEmptySelection().withMatching(CredentialsMatchers.instanceOf(credentialType),CredentialsProvider.lookupCredentials(StandardCredentials.class,context,ACL.SYSTEM,domainRequirements));
}
Program: 45149
Project: 45149
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public PollingResult compareRemoteRevisionWith(@Nonnull Job<?,?> project,@Nullable Launcher launcher,@Nullable FilePath workspace,@Nonnull TaskListener listener,@Nonnull SCMRevisionState baseline) throws IOException, InterruptedException {
  SimpleDateFormat scm_datetime_formatter=new SimpleDateFormat(SURROUND_DATETIME_FORMAT_STR);
  Date lastBuild=((SurroundSCMRevisionState)baseline).getDate();
  int lastBuildNum=((SurroundSCMRevisionState)baseline).getBuildNumber();
  Date now=new Date();
  File temporaryFile=File.createTempFile("String_Node_Str","String_Node_Str");
  listener.getLogger().println("String_Node_Str" + lastBuildNum + "String_Node_Str"+ scm_datetime_formatter.format(lastBuild)+ "String_Node_Str"+ pluginVersion);
  double countChanges=determineChangeCount(project,launcher,listener,lastBuild,now,temporaryFile,workspace);
  if (!temporaryFile.delete()) {
    listener.getLogger().println("String_Node_Str" + temporaryFile.getAbsolutePath() + "String_Node_Str");
    temporaryFile.deleteOnExit();
  }
  if (countChanges == 0)   return PollingResult.NO_CHANGES;
 else   if (countChanges < changesThreshold)   return PollingResult.SIGNIFICANT;
  return PollingResult.BUILD_NOW;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public PollingResult compareRemoteRevisionWith(@Nonnull Job<?,?> project,@Nullable Launcher launcher,@Nullable FilePath workspace,@Nonnull TaskListener listener,@Nonnull SCMRevisionState baseline) throws IOException, InterruptedException {
  SimpleDateFormat scm_datetime_formatter=new SimpleDateFormat(SURROUND_DATETIME_FORMAT_STR);
  Date lastBuild=((SurroundSCMRevisionState)baseline).getDate();
  int lastBuildNum=((SurroundSCMRevisionState)baseline).getBuildNumber();
  Date now=new Date();
  File temporaryFile=File.createTempFile("String_Node_Str","String_Node_Str");
  listener.getLogger().println("String_Node_Str" + lastBuildNum + "String_Node_Str"+ scm_datetime_formatter.format(lastBuild)+ "String_Node_Str"+ pluginVersion);
  double countChanges=0;
  if (launcher != null)   countChanges=determineChangeCount(project,launcher,listener,lastBuild,now,temporaryFile,workspace);
 else   listener.getLogger().println("String_Node_Str");
  if (!temporaryFile.delete()) {
    listener.getLogger().println("String_Node_Str" + temporaryFile.getAbsolutePath() + "String_Node_Str");
    temporaryFile.deleteOnExit();
  }
  if (countChanges == 0)   return PollingResult.NO_CHANGES;
 else   if (countChanges < changesThreshold)   return PollingResult.SIGNIFICANT;
  return PollingResult.BUILD_NOW;
}
Program: 45150
Project: 45150
Buggy source:
/** 
 * Attempt to find a pre-configured 'SurroundTool' with a saved 'sscm_tool_name' Currently this will always fall back to the 'default' tool for the current node and requires some further testing of edge conditions
 */
public SurroundTool resolveSscmTool(TaskListener listener){
  SurroundTool sscm=null;
  if (sscm_tool_name == null || sscm_tool_name.isEmpty()) {
    sscm=SurroundTool.getDefaultInstallation();
  }
 else {
    SurroundTool.DescriptorImpl sscmToolDesc=Jenkins.getInstance().getDescriptorByType(SurroundTool.DescriptorImpl.class);
    if (sscmToolDesc != null)     sscm=sscmToolDesc.getInstallation(sscm_tool_name);
    if (sscm == null) {
      listener.getLogger().println(String.format("String_Node_Str",sscm_tool_name));
      sscm=SurroundTool.getDefaultInstallation();
    }
  }
  return sscm;
}

Fixed version (ground truth):
/** 
 * Attempt to find a pre-configured 'SurroundTool' with a saved 'sscm_tool_name' Currently this will always fall back to the 'default' tool for the current node and requires some further testing of edge conditions
 */
public SurroundTool resolveSscmTool(TaskListener listener){
  SurroundTool sscm=null;
  if (sscm_tool_name == null || sscm_tool_name.isEmpty()) {
    sscm=SurroundTool.getDefaultInstallation();
  }
 else {
    Jenkins jenkinsInstance=Jenkins.getInstance();
    if (jenkinsInstance != null) {
      SurroundTool.DescriptorImpl sscmToolDesc=Jenkins.getInstance().getDescriptorByType(SurroundTool.DescriptorImpl.class);
      if (sscmToolDesc != null)       sscm=sscmToolDesc.getInstallation(sscm_tool_name);
    }
    if (sscm == null) {
      listener.getLogger().println(String.format("String_Node_Str",sscm_tool_name));
      sscm=SurroundTool.getDefaultInstallation();
    }
  }
  return sscm;
}
Program: 45151
Project: 45151
Buggy source:
public static boolean validateSSCMURL(String URL){
  Matcher changeMatcher=URI_PATTERN.matcher(URL);
  boolean result=false;
  if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
    result=true;
  }
  return result;
}

Fixed version (ground truth):
public static boolean validateSSCMURL(String URL){
  if (URL == null)   return false;
  Matcher changeMatcher=URI_PATTERN.matcher(URL);
  boolean result=false;
  if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
    result=true;
  }
  return result;
}
Program: 45152
Project: 45152
Buggy source:
/** 
 * Parses the Surround SCM Server port from the pased in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return returns the port (ex. 4900)
 */
public static String getRepositoryFromURL(String URL){
  Matcher changeMatcher=URI_PATTERN.matcher(URL);
  String result="String_Node_Str";
  if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
    result=changeMatcher.group(4);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Parses the Surround SCM Server port from the pased in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return returns the port (ex. 4900)
 */
public static String getRepositoryFromURL(String URL){
  String result="String_Node_Str";
  if (URL != null) {
    Matcher changeMatcher=URI_PATTERN.matcher(URL);
    if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
      result=changeMatcher.group(4);
    }
  }
  return result;
}
Program: 45153
Project: 45153
Buggy source:
/** 
 * Parses the Surround SCM Server port from the pased in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return returns the port (ex. 4900)
 */
public static String getPortFromURL(String URL){
  Matcher changeMatcher=URI_PATTERN.matcher(URL);
  String result="String_Node_Str";
  if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
    result=changeMatcher.group(2);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Parses the Surround SCM Server port from the pased in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return returns the port (ex. 4900)
 */
public static String getPortFromURL(String URL){
  String result="String_Node_Str";
  if (URL != null) {
    Matcher changeMatcher=URI_PATTERN.matcher(URL);
    if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
      result=changeMatcher.group(2);
    }
  }
  return result;
}
Program: 45154
Project: 45154
Buggy source:
/** 
 * Parses the Surround SCM Server host name from the passed in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return  Returns server
 */
public static String getServerFromURL(String URL){
  Matcher changeMatcher=URI_PATTERN.matcher(URL);
  String result="String_Node_Str";
  if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
    result=changeMatcher.group(1);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Parses the Surround SCM Server host name from the passed in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return  Returns server
 */
public static String getServerFromURL(String URL){
  String result="String_Node_Str";
  if (URL != null) {
    Matcher changeMatcher=URI_PATTERN.matcher(URL);
    if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
      result=changeMatcher.group(1);
    }
  }
  return result;
}
Program: 45155
Project: 45155
Buggy source:
/** 
 * Parses the Surround SCM Server port from the pased in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return returns the port (ex. 4900)
 */
public static String getBranchFromURL(String URL){
  Matcher changeMatcher=URI_PATTERN.matcher(URL);
  String result="String_Node_Str";
  if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
    result=changeMatcher.group(3);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Parses the Surround SCM Server port from the pased in sscm:// url. ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @param URL ex. sscm://server:4900//branch//Mainline/Path/To/Repository
 * @return returns the port (ex. 4900)
 */
public static String getBranchFromURL(String URL){
  String result="String_Node_Str";
  if (URL != null) {
    Matcher changeMatcher=URI_PATTERN.matcher(URL);
    if (changeMatcher.find() && changeMatcher.groupCount() == 4) {
      result=changeMatcher.group(3);
    }
  }
  return result;
}
Program: 45156
Project: 45156
Buggy source:
public void testValidateURL() throws Exception {
  assertTrue(SSCMUtils.validateSSCMURL(URL));
}

Fixed version (ground truth):
public void testValidateURL() throws Exception {
  assertTrue(SSCMUtils.validateSSCMURL(URL));
  assertFalse(SSCMUtils.validateSSCMURL(null));
}
Program: 45157
Project: 45157
Buggy source:
/** 
 * Attempt to find a pre-configured 'SurroundTool' with a saved 'sscm_tool_name' Currently this will always fall back to the 'default' tool for the current node and requires some further testing of edge conditions
 */
public SurroundTool resolveSscmTool(TaskListener listener){
  SurroundTool sscm=null;
  if (sscm_tool_name == null || sscm_tool_name.isEmpty()) {
    sscm=SurroundTool.getDefaultInstallation();
  }
 else {
    Jenkins jenkinsInstance=Jenkins.getInstance();
    if (jenkinsInstance != null) {
      SurroundTool.DescriptorImpl sscmToolDesc=Jenkins.getInstance().getDescriptorByType(SurroundTool.DescriptorImpl.class);
      if (sscmToolDesc != null)       sscm=sscmToolDesc.getInstallation(sscm_tool_name);
    }
    if (sscm == null) {
      listener.getLogger().println(String.format("String_Node_Str",sscm_tool_name));
      sscm=SurroundTool.getDefaultInstallation();
    }
  }
  return sscm;
}

Fixed version (ground truth):
/** 
 * Attempt to find a pre-configured 'SurroundTool' with a saved 'sscm_tool_name' Currently this will always fall back to the 'default' tool for the current node and requires some further testing of edge conditions
 */
public SurroundTool resolveSscmTool(TaskListener listener){
  SurroundTool sscm=null;
  if (sscm_tool_name == null || sscm_tool_name.isEmpty()) {
    sscm=SurroundTool.getDefaultInstallation();
  }
 else {
    Jenkins jenkinsInstance=Jenkins.getInstance();
    if (jenkinsInstance != null) {
      SurroundTool.DescriptorImpl sscmToolDesc=jenkinsInstance.getDescriptorByType(SurroundTool.DescriptorImpl.class);
      if (sscmToolDesc != null)       sscm=sscmToolDesc.getInstallation(sscm_tool_name);
    }
    if (sscm == null) {
      listener.getLogger().println(String.format("String_Node_Str",sscm_tool_name));
      sscm=SurroundTool.getDefaultInstallation();
    }
  }
  return sscm;
}
Program: 45161
Project: 45161
Buggy source:
@Override protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project,Launcher launcher,FilePath workspace,TaskListener listener,SCMRevisionState baseline) throws IOException, InterruptedException {
  SimpleDateFormat scm_datetime_formatter=new SimpleDateFormat(SURROUND_DATETIME_FORMAT_STR);
  Date lastBuild=((SurroundSCMRevisionState)baseline).getDate();
  int lastBuildNum=((SurroundSCMRevisionState)baseline).getBuildNumber();
  Date now=new Date();
  File temporaryFile=File.createTempFile("String_Node_Str","String_Node_Str");
  listener.getLogger().println("String_Node_Str" + lastBuildNum + "String_Node_Str"+ scm_datetime_formatter.format(lastBuild)+ "String_Node_Str"+ pluginVersion);
  double countChanges=determineChangeCount(launcher,workspace,listener,lastBuild,now,temporaryFile);
  if (countChanges == 0)   return PollingResult.NO_CHANGES;
 else   if (countChanges < changesThreshold)   return PollingResult.SIGNIFICANT;
  return PollingResult.BUILD_NOW;
}

Fixed version (ground truth):
@Override protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project,Launcher launcher,FilePath workspace,TaskListener listener,SCMRevisionState baseline) throws IOException, InterruptedException {
  SimpleDateFormat scm_datetime_formatter=new SimpleDateFormat(SURROUND_DATETIME_FORMAT_STR);
  Date lastBuild=((SurroundSCMRevisionState)baseline).getDate();
  int lastBuildNum=((SurroundSCMRevisionState)baseline).getBuildNumber();
  Date now=new Date();
  File temporaryFile=File.createTempFile("String_Node_Str","String_Node_Str");
  temporaryFile.deleteOnExit();
  listener.getLogger().println("String_Node_Str" + lastBuildNum + "String_Node_Str"+ scm_datetime_formatter.format(lastBuild)+ "String_Node_Str"+ pluginVersion);
  temporaryFile.delete();
  double countChanges=determineChangeCount(launcher,workspace,listener,lastBuild,now,temporaryFile);
  if (countChanges == 0)   return PollingResult.NO_CHANGES;
 else   if (countChanges < changesThreshold)   return PollingResult.SIGNIFICANT;
  return PollingResult.BUILD_NOW;
}
Program: 45165
Project: 45165
Buggy source:
/** 
 * Returns a list of avaliable apps
 * @throws URISyntaxException 
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String getAppStoreListForPlatform(@PathVariable int platform,@RequestParam(required=true) int listType,@RequestParam(required=false) String category,@RequestParam(required=true) int count,Model model) throws URISyntaxException {
  logger.info("String_Node_Str" + platform + "String_Node_Str"+ listType+ "String_Node_Str"+ count);
  AppStoreList appStoreList=appStoreService.getAppStoreListForPlatform(count,listType,platform,category);
  model.addAttribute("String_Node_Str",gson.toJson(appStoreList));
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Returns a list of avaliable apps
 * @throws URISyntaxException 
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String getAppStoreListForPlatform(@PathVariable int platform,@RequestParam(required=true) int listType,@RequestParam(required=true) int count,Model model) throws URISyntaxException {
  logger.info("String_Node_Str" + platform + "String_Node_Str"+ listType+ "String_Node_Str"+ count);
  AppStoreList appStoreList=appStoreService.getAppStoreListForPlatform(count,listType,platform);
  model.addAttribute("String_Node_Str",gson.toJson(appStoreList));
  return "String_Node_Str";
}
Program: 45166
Project: 45166
Buggy source:
@Test public void testWithOnlyDateAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date now=new Date();
  service.getUkaProgram(now,null,null,null,null);
  Mockito.verify(mock).getUkaProgram(now);
}

Fixed version (ground truth):
@Test public void testWithOnlyDateAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date now=new Date();
  service.getUkaProgram("String_Node_Str",now,null,null,null,null);
  Mockito.verify(mock).getUkaProgram(now);
}
Program: 45167
Project: 45167
Buggy source:
@Test public void testWithDateFromAndTOAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date from=new Date();
  Date to=new Date(from.getTime() + 8640000);
  service.getUkaProgram(null,from,to,false,null);
  Mockito.verify(mock).getUkaProgram(from,to);
}

Fixed version (ground truth):
@Test public void testWithDateFromAndTOAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date from=new Date();
  Date to=new Date(from.getTime() + 8640000);
  service.getUkaProgram("String_Node_Str",null,from,to,false,null);
  Mockito.verify(mock).getUkaProgram(from,to);
}
Program: 45168
Project: 45168
Buggy source:
@Test public void testWithAllIsTrueAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  service.getUkaProgram(null,null,null,true,null);
  Mockito.verify(mock).getUkaProgram();
}

Fixed version (ground truth):
@Test public void testWithAllIsTrueAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  service.getUkaProgram("String_Node_Str",null,null,null,true,null);
  Mockito.verify(mock).getUkaProgram();
}
Program: 45169
Project: 45169
Buggy source:
@Test public void testWithDateFromAndTOAndDateAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date from=new Date();
  Date to=new Date(from.getTime() + 8640000);
  Date now=new Date();
  service.getUkaProgram(now,from,to,false,null);
  Mockito.verify(mock).getUkaProgram(now);
}

Fixed version (ground truth):
@Test public void testWithDateFromAndTOAndDateAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date from=new Date();
  Date to=new Date(from.getTime() + 8640000);
  Date now=new Date();
  service.getUkaProgram("String_Node_Str",now,from,to,false,null);
  Mockito.verify(mock).getUkaProgram(now);
}
Program: 45170
Project: 45170
Buggy source:
@Test public void testWithOnlyPlaceAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  String place="String_Node_Str";
  service.getUkaProgram(null,null,null,false,place);
  Mockito.verify(mock).getUkaProgram(place);
}

Fixed version (ground truth):
@Test public void testWithOnlyPlaceAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  String place="String_Node_Str";
  service.getUkaProgram("String_Node_Str",null,null,null,false,place);
  Mockito.verify(mock).getUkaProgram(place);
}
Program: 45171
Project: 45171
Buggy source:
@Test public void testWithDateFromAndTOAndPlaceAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date from=new Date();
  Date to=new Date(from.getTime() + 8640000);
  String place="String_Node_Str";
  service.getUkaProgram(null,from,to,false,place);
  Mockito.verify(mock).getUkaProgram(from,to,place);
}

Fixed version (ground truth):
@Test public void testWithDateFromAndTOAndPlaceAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date from=new Date();
  Date to=new Date(from.getTime() + 8640000);
  String place="String_Node_Str";
  service.getUkaProgram("String_Node_Str",null,from,to,false,place);
  Mockito.verify(mock).getUkaProgram(from,to,place);
}
Program: 45172
Project: 45172
Buggy source:
@Test public void testWithDateAndPlaceAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date now=new Date();
  String place="String_Node_Str";
  service.getUkaProgram(now,null,null,false,place);
  Mockito.verify(mock).getUkaProgram(now,place);
}

Fixed version (ground truth):
@Test public void testWithDateAndPlaceAsInput(){
  UkaProgramService service=new UkaProgramService();
  UkaProgramRepository mock=Mockito.mock(UkaProgramRepository.class);
  service.setUkaProgramRepository(mock);
  Date now=new Date();
  String place="String_Node_Str";
  service.getUkaProgram("String_Node_Str",now,null,null,false,place);
  Mockito.verify(mock).getUkaProgram(now,place);
}
Program: 45173
Project: 45173
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ModelAndView getAllFacts(@PathVariable("String_Node_Str") String locationName){
  logger.info("String_Node_Str" + locationName + "String_Node_Str");
  List<Fact> facts=service.getAllFacts(locationName);
  return new ModelAndView("String_Node_Str","String_Node_Str",gson.toJson(facts));
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ModelMap getAllFacts(@PathVariable("String_Node_Str") String locationName){
  logger.info("String_Node_Str" + locationName + "String_Node_Str");
  ModelMap model=new ModelMap();
  List<Fact> facts=service.getAllFacts(locationName);
  model.addAttribute(facts);
  return model;
}
Program: 45174
Project: 45174
Buggy source:
public List<Fact> getAllFacts(String locationName){
  Map<Integer,Fact> facts=new HashMap<Integer,Fact>();
  jdbcTemplate.query("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",new FactRowMapper(facts),locationName);
  return new ArrayList<Fact>(facts.values());
}

Fixed version (ground truth):
public List<Fact> getAllFacts(String locationName){
  List<Fact> facts=jdbcTemplate.query("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",new FactRowMapper(),locationName);
  return facts;
}
Program: 45175
Project: 45175
Buggy source:
@Override public Fact mapRow(ResultSet rs,int rowNum) throws SQLException {
  Fact fact=new Fact();
  fact.setFactId(rs.getInt("String_Node_Str"));
  fact.setLocationId(rs.getInt("String_Node_Str"));
  fact.setText(rs.getString("String_Node_Str"));
  if (!facts.containsKey(fact.getFactId())) {
    facts.put(fact.getFactId(),fact);
  }
  return fact;
}

Fixed version (ground truth):
public Fact mapRow(ResultSet rs,int rowNum) throws SQLException {
  Fact fact=new Fact();
  fact.setFactId(rs.getInt("String_Node_Str"));
  fact.setLocationId(rs.getInt("String_Node_Str"));
  fact.setText(rs.getString("String_Node_Str"));
  return fact;
}
Program: 45176
Project: 45176
Buggy source:
public ModelAndView save(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  UserForm userForm=(UserForm)command;
  User user=null;
  if (userForm.getId() != null) {
    user=userManager.getUser(userForm.getId());
  }
 else {
    user=new User();
  }
  BeanUtils.copyProperties(userForm,user);
  String password=userForm.getPassword1();
  password=User.getPasswordHash(password);
  user.setPassword(password);
  userManager.saveUser(user);
  return new ModelAndView(this.getSuccessView());
}

Fixed version (ground truth):
public ModelAndView save(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  UserForm userForm=(UserForm)command;
  User user=null;
  if (userForm.getId() != null) {
    user=userManager.getUser(userForm.getId());
  }
 else {
    user=new User();
  }
  BeanUtils.copyProperties(userForm,user);
  String password=userForm.getPassword1();
  if (StringUtils.isNotEmpty(password)) {
    password=User.getPasswordHash(password);
    user.setPassword(password);
  }
  userManager.saveUser(user);
  return new ModelAndView(this.getSuccessView());
}
Program: 45177
Project: 45177
Buggy source:
public static void main(String[] args){
  Scanner input=new Scanner(System.in);
  for (int z=1; ; z++) {
    dx=input.nextInt();
    dy=input.nextInt();
    int n=input.nextInt(), q=input.nextInt();
    if ((dx | dy | n| q) == 0)     break;
    System.out.println("String_Node_Str" + z + "String_Node_Str");
    width=2 * (dx + dy);
    cumulative=new int[width + 1][2 * width + 1];
    for (    int[] row : cumulative)     Arrays.fill(row,0);
    for (int i=0; i < n; i++) {
      int x=input.nextInt(), y=input.nextInt();
      set(x + y,x - y,1);
    }
    for (int i=0; i <= width; i++)     for (int j=-width; j <= width; j++)     set(i,j,get(i - 1,j) + get(i,j - 1) - get(i - 1,j - 1) + get(i,j));
    for (int k=0; k < q; k++) {
      int bestCount=-1;
      int bestX=-1;
      int bestY=-1;
      int d=input.nextInt();
      d=Math.min(d,Math.max(dx,dy));
      for (int y=1; y <= dy; y++) {
        for (int x=1; x <= dx; x++) {
          int count=getWithinDist(x,y,d);
          if (count > bestCount) {
            bestCount=count;
            bestX=x;
            bestY=y;
          }
        }
      }
      System.out.println(bestCount + "String_Node_Str" + bestX+ "String_Node_Str"+ bestY+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Scanner input=new Scanner(System.in);
  for (int z=1; ; z++) {
    dx=input.nextInt();
    dy=input.nextInt();
    int n=input.nextInt(), q=input.nextInt();
    if ((dx | dy | n| q) == 0)     break;
    System.out.println("String_Node_Str" + z + "String_Node_Str");
    width=2 * (dx + dy);
    cumulative=new int[width + 1][2 * width + 1];
    for (    int[] row : cumulative)     Arrays.fill(row,0);
    for (int i=0; i < n; i++) {
      int x=input.nextInt(), y=input.nextInt();
      set(x + y,x - y,1);
    }
    for (int i=0; i <= width; i++)     for (int j=-width; j <= width; j++)     set(i,j,get(i - 1,j) + get(i,j - 1) - get(i - 1,j - 1) + get(i,j));
    for (int k=0; k < q; k++) {
      int bestCount=-1;
      int bestX=-1;
      int bestY=-1;
      int d=input.nextInt();
      d=Math.min(d,dx + dy);
      for (int y=1; y <= dy; y++) {
        for (int x=1; x <= dx; x++) {
          int count=getWithinDist(x,y,d);
          if (count > bestCount) {
            bestCount=count;
            bestX=x;
            bestY=y;
          }
        }
      }
      System.out.println(bestCount + "String_Node_Str" + bestX+ "String_Node_Str"+ bestY+ "String_Node_Str");
    }
  }
}
Program: 45178
Project: 45178
Buggy source:
public static void main(String[] args){
  Scanner input=new Scanner(System.in);
  for (int z=1; ; z++) {
    a=input.nextInt();
    m=input.nextInt();
    int p=input.nextInt(), q=input.nextInt(), r=input.nextInt(), s=input.nextInt();
    if ((a | m | p| q| r| s) == 0)     break;
    int mt=1;
    Answer best=null;
    for (int t=0; ; t++, mt*=m) {
      int bMin=(r + a - 1 - p * mt) / a, bMax=(s - q * mt) / a;
      if (bMax < bMin || bMax < 0)       break;
      Answer ans=new Answer(inBetween(digits(bMin,m,t + 1),digits(bMax,m,t + 1)));
      if (ans.apply(p) >= r && ans.apply(q) <= s && (best == null || ans.compareTo(best) < 0))       best=ans;
    }
    System.out.println("String_Node_Str" + z + "String_Node_Str"+ ((best == null) ? "String_Node_Str" : best.toString()));
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Scanner input=new Scanner(System.in);
  for (int z=1; ; z++) {
    a=input.nextInt();
    m=input.nextInt();
    int p=input.nextInt(), q=input.nextInt(), r=input.nextInt(), s=input.nextInt();
    if ((a | m | p| q| r| s) == 0)     break;
    int mt=1;
    Answer best=null;
    for (int t=0; ; t++, mt*=m) {
      int bMin=(r + a - 1 - p * mt) / a, bMax=(s - q * mt) / a;
      if (bMax < bMin || bMax < 0 || (t > 0 && m == 1))       break;
      Answer ans=new Answer(inBetween(digits(bMin,m,t + 1),digits(bMax,m,t + 1)));
      if (ans.apply(p) >= r && ans.apply(q) <= s && (best == null || ans.compareTo(best) < 0))       best=ans;
    }
    System.out.println("String_Node_Str" + z + "String_Node_Str"+ ((best == null) ? "String_Node_Str" : best.toString()));
  }
}
Program: 45179
Project: 45179
Buggy source:
private boolean isSubredditRequest(String path){
  boolean isSubredditRequest=false;
  log("String_Node_Str" + path);
  if (path.equalsIgnoreCase("String_Node_Str")) {
    isSubredditRequest=true;
  }
  return isSubredditRequest;
}

Fixed version (ground truth):
private boolean isSubredditRequest(String path){
  boolean isSubredditRequest=false;
  log("String_Node_Str" + path);
  if (path != null && path.contains("String_Node_Str")) {
    isSubredditRequest=true;
  }
  return isSubredditRequest;
}
Program: 45181
Project: 45181
Buggy source:
public void invalidateRSSFeed(){
  if (_outputFeed == null)   readInCurrentRSSFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.invalidateRSSFeed();
  }
}

Fixed version (ground truth):
public void invalidateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.invalidateRSSFeed();
  }
}
Program: 45182
Project: 45182
Buggy source:
public void updateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.updateRSSFeed();
  }
}

Fixed version (ground truth):
public void updateRSSFeed(){
  if (_outputFeed == null)   readInCurrentRSSFeed();
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.updateRSSFeed();
  }
}
Program: 45183
Project: 45183
Buggy source:
public void invalidateRSSFeed(){
  if (_outputFeed == null)   readInCurrentRSSFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  for (  Category c : getCategories())   c.invalidateRSSFeed();
}

Fixed version (ground truth):
public void invalidateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  for (  Category c : getCategories())   c.invalidateRSSFeed();
}
Program: 45184
Project: 45184
Buggy source:
public void updateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  for (  Category c : getCategories())   c.updateRSSFeed();
}

Fixed version (ground truth):
public void updateRSSFeed(){
  if (_outputFeed == null)   readInCurrentRSSFeed();
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  for (  Category c : getCategories())   c.updateRSSFeed();
}
Program: 45185
Project: 45185
Buggy source:
public void updateRSSFeed(){
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.updateRSSFeed();
  }
}

Fixed version (ground truth):
public void updateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.updateRSSFeed();
  }
}
Program: 45186
Project: 45186
Buggy source:
public void invalidateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.invalidateRSSFeed();
  }
}

Fixed version (ground truth):
public void invalidateRSSFeed(){
  if (_outputFeed == null)   readInCurrentRSSFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  if (!isLeafCategory()) {
    for (    Category c : _children)     c.invalidateRSSFeed();
  }
}
Program: 45187
Project: 45187
Buggy source:
public void invalidateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  for (  Category c : getCategories())   c.invalidateRSSFeed();
}

Fixed version (ground truth):
public void invalidateRSSFeed(){
  if (_outputFeed == null)   readInCurrentRSSFeed();
  _outputFeed.invalidate();
  _numItemsSinceLastDownload=0;
  for (  Category c : getCategories())   c.invalidateRSSFeed();
}
Program: 45188
Project: 45188
Buggy source:
public void updateRSSFeed(){
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  for (  Category c : getCategories())   c.updateRSSFeed();
}

Fixed version (ground truth):
public void updateRSSFeed(){
  if (_outputFeed == null)   initFeed();
  _outputFeed.update();
  _numItemsSinceLastDownload=_outputFeed.getNumItemsSinceLastDownload();
  for (  Category c : getCategories())   c.updateRSSFeed();
}
Program: 45189
Project: 45189
Buggy source:
private int scanNewsItem(PrintWriter pw,Hashtable tokTable) throws Exception {
  int numTokens=0;
  while (true) {
    ConceptToken tok=(ConceptToken)_lexerScanMethod.invoke(_lexer,(java.lang.Object[])null);
    if (tok == null) {
      _lexerCloseMethod.invoke(_lexer,(java.lang.Object[])null);
      break;
    }
    numTokens++;
    if (tok != ConceptToken.CATCHALL_TOKEN) {
      if (tok.isMultiToken()) {
        if (_log.isDebugEnabled())         _log.debug("String_Node_Str" + tok.getToken());
        String[] toks=tok.getTokens();
        for (        String element : toks)         processMatchedConcept(element,tok._text,numTokens,tokTable,pw);
      }
 else {
        processMatchedConcept(tok.getToken(),tok._text,numTokens,tokTable,pw);
      }
    }
  }
  return numTokens;
}

Fixed version (ground truth):
private int scanNewsItem(PrintWriter pw,Hashtable tokTable) throws Exception {
  _scannerInUse=true;
  int numTokens=0;
  while (true) {
    ConceptToken tok=(ConceptToken)_lexerScanMethod.invoke(_lexer,(java.lang.Object[])null);
    if (tok == null) {
      _lexerCloseMethod.invoke(_lexer,(java.lang.Object[])null);
      break;
    }
    numTokens++;
    if (tok != ConceptToken.CATCHALL_TOKEN) {
      if (tok.isMultiToken()) {
        if (_log.isDebugEnabled())         _log.debug("String_Node_Str" + tok.getToken());
        String[] toks=tok.getTokens();
        for (        String element : toks)         processMatchedConcept(element,tok._text,numTokens,tokTable,pw);
      }
 else {
        processMatchedConcept(tok.getToken(),tok._text,numTokens,tokTable,pw);
      }
    }
  }
  _scannerInUse=false;
  return numTokens;
}
Program: 45190
Project: 45190
Buggy source:
public void unloadScanners(){
  _lexerScanMethod=null;
  _lexerResetMethod=null;
  _lexerCloseMethod=null;
  _lexerConstr=null;
  _lexer=null;
}

Fixed version (ground truth):
public void unloadScanners(){
  if (!_scannerInUse) {
    _lexerScanMethod=null;
    _lexerResetMethod=null;
    _lexerCloseMethod=null;
    _lexerConstr=null;
    _lexer=null;
  }
}
Program: 45194
Project: 45194
Buggy source:
private String getNewsItemPath(boolean wantOrig){
  if (getKey() == null) {
    _log.error("String_Node_Str" + getURL() + "String_Node_Str");
    return null;
  }
  String[] dateStr=getDateString().split("String_Node_Str");
  String pathPrefix=getGlobalNewsArchive() + (wantOrig ? "String_Node_Str" : "String_Node_Str") + File.separator+ dateStr[2]+ File.separator+ dateStr[1]+ File.separator+ dateStr[0];
  String localName=getLocalFileName();
  String fullPath=pathPrefix + File.separator + getFeed().getTag()+ File.separator+ localName;
  if (!((new File(fullPath)).isFile())) {
    List<Long> allFeedKeys=(List<Long>)SQL_Stmt.GET_ALL_FEEDS_FOR_NEWS_ITEM.get(getKey());
    fullPath=getValidFilePath(pathPrefix,localName,allFeedKeys);
    if (fullPath == null)     fullPath=getValidFilePath(pathPrefix,(String)SQL_Stmt.GET_NEWS_ITEM_LOCALNAME.get(getKey()),allFeedKeys);
    if (fullPath == null)     fullPath=getValidFilePath(pathPrefix,StringUtils.getBaseFileName(getURL()),allFeedKeys);
  }
  return fullPath;
}

Fixed version (ground truth):
private String getNewsItemPath(boolean wantOrig){
  String[] dateStr=getDateString().split("String_Node_Str");
  String pathPrefix=getGlobalNewsArchive() + (wantOrig ? "String_Node_Str" : "String_Node_Str") + File.separator+ dateStr[2]+ File.separator+ dateStr[1]+ File.separator+ dateStr[0];
  String localName=getLocalFileName();
  String fullPath=pathPrefix + File.separator + getFeed().getTag()+ File.separator+ localName;
  if (!((new File(fullPath)).isFile())) {
    if (getKey() == null) {
      _log.error("String_Node_Str" + getURL() + "String_Node_Str");
      return null;
    }
    List<Long> allFeedKeys=(List<Long>)SQL_Stmt.GET_ALL_FEEDS_FOR_NEWS_ITEM.get(getKey());
    fullPath=getValidFilePath(pathPrefix,localName,allFeedKeys);
    if (fullPath == null)     fullPath=getValidFilePath(pathPrefix,(String)SQL_Stmt.GET_NEWS_ITEM_LOCALNAME.get(getKey()),allFeedKeys);
    if (fullPath == null)     fullPath=getValidFilePath(pathPrefix,StringUtils.getBaseFileName(getURL()),allFeedKeys);
  }
  return fullPath;
}