nus-yam/ex-repair huggingface dataset:
Program: 109531
Project: 109531
Buggy source:
public void init(CompilationUnit cu,FileModel fileModel){
  this.cu=cu;
  this.fileModel=fileModel;
  this.wildcardImports.clear();
  this.classNameLookedUp.clear();
  this.classNameToFQCN.clear();
  this.names.clear();
  this.nameInstance.clear();
  PackageDeclaration packageDeclaration=cu.getPackage();
  String packageName=packageDeclaration == null ? "String_Node_Str" : packageDeclaration.getName().getFullyQualifiedName();
  @SuppressWarnings("String_Node_Str") List<TypeDeclaration> types=cu.types();
  if (!types.isEmpty()) {
    TypeDeclaration typeDeclaration=(TypeDeclaration)types.get(0);
    String className=typeDeclaration.getName().getFullyQualifiedName();
    String fqcn=packageName + "String_Node_Str" + className;
    this.names.add("String_Node_Str");
    this.nameInstance.put("String_Node_Str",fqcn);
  }
}

Fixed version (ground truth):
public void init(CompilationUnit cu,FileModel fileModel){
  this.cu=cu;
  this.fileModel=fileModel;
  this.wildcardImports.clear();
  this.classNameLookedUp.clear();
  this.classNameToFQCN.clear();
  this.names.clear();
  this.nameInstance.clear();
  PackageDeclaration packageDeclaration=cu.getPackage();
  String packageName=packageDeclaration == null ? "String_Node_Str" : packageDeclaration.getName().getFullyQualifiedName();
  @SuppressWarnings("String_Node_Str") List<TypeDeclaration> types=cu.types();
  if (!types.isEmpty()) {
    TypeDeclaration typeDeclaration=(TypeDeclaration)types.get(0);
    String className=typeDeclaration.getName().getFullyQualifiedName();
    if (packageName.equals("String_Node_Str")) {
      this.fqcn=className;
    }
 else {
      this.fqcn=packageName + "String_Node_Str" + className;
    }
    if (windupJavaCfgService.shouldScanPackage(packageName)) {
      typeRefService.createTypeReference(fileModel,TypeReferenceLocation.TYPE,cu.getLineNumber(typeDeclaration.getStartPosition()),cu.getColumnNumber(cu.getStartPosition()),cu.getLength(),this.fqcn);
    }
    this.names.add("String_Node_Str");
    this.nameInstance.put("String_Node_Str",fqcn);
  }
}
Program: 109532
Project: 109532
Buggy source:
public VariableResolvingASTVisitor(GraphContext context){
  this.javaClassService=new JavaClassService(context);
  this.typeRefService=new TypeReferenceService(context);
}

Fixed version (ground truth):
public VariableResolvingASTVisitor(GraphContext context){
  this.javaClassService=new JavaClassService(context);
  this.typeRefService=new TypeReferenceService(context);
  this.windupJavaCfgService=new WindupJavaConfigurationService(context);
}
Program: 109534
Project: 109534
Buggy source:
@Override public RulePhase getPhase(){
  return RulePhase.POST_DISCOVERY;
}

Fixed version (ground truth):
@Override public RulePhase getPhase(){
  return RulePhase.INITIAL_ANALYSIS;
}
Program: 109535
Project: 109535
Buggy source:
/** 
 * Serializes the timing data to a "~" delimited file at outputPath.
 */
public void serializeTimingData(Path outputPath){
  try (FileWriter fw=new FileWriter(outputPath.toFile())){
    for (    Map.Entry<String,TimingData> timing : executionInfo.entrySet()) {
      TimingData data=timing.getValue();
      long totalMillis=(data.totalNanos / 1000000);
      double millisPerExecution=(double)totalMillis / (double)data.numberOfExecutions;
      fw.write(timing.getKey() + "String_Node_Str" + data.numberOfExecutions+ "String_Node_Str"+ totalMillis+ "String_Node_Str"+ millisPerExecution);
      fw.write("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Serializes the timing data to a "~" delimited file at outputPath.
 */
public void serializeTimingData(Path outputPath){
  try (FileWriter fw=new FileWriter(outputPath.toFile())){
    fw.write("String_Node_Str");
    for (    Map.Entry<String,TimingData> timing : executionInfo.entrySet()) {
      TimingData data=timing.getValue();
      long totalMillis=(data.totalNanos / 1000000);
      double millisPerExecution=(double)totalMillis / (double)data.numberOfExecutions;
      fw.write(timing.getKey() + "String_Node_Str" + data.numberOfExecutions+ "String_Node_Str"+ totalMillis+ "String_Node_Str"+ millisPerExecution);
      fw.write("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 109536
Project: 109536
Buggy source:
@Override public JavaClassBuilderAt processElement(ParserContext handlerManager,Element element) throws ConfigurationException {
  String type=$(element).attr("String_Node_Str");
  String as=$(element).attr("String_Node_Str");
  if (as == null) {
    as=Iteration.DEFAULT_VARIABLE_LIST_STRING;
  }
  if (StringUtils.isBlank(type)) {
    throw new WindupException("String_Node_Str");
  }
  List<TypeReferenceLocation> locations=new ArrayList<TypeReferenceLocation>();
  List<Element> children=$(element).children("String_Node_Str").get();
  for (  Element child : children) {
    TypeReferenceLocation location=handlerManager.processElement(child);
    locations.add(location);
  }
  JavaClassBuilder javaClassReferences=JavaClass.references(type);
  String namePattern=$(element).attr("String_Node_Str");
  if (!StringUtils.isBlank(namePattern)) {
    javaClassReferences.inType(namePattern);
  }
  JavaClassBuilderAt javaClass=javaClassReferences.at(locations.toArray(new TypeReferenceLocation[locations.size()]));
  javaClass.as(as);
  return javaClass;
}

Fixed version (ground truth):
@Override public JavaClassBuilderAt processElement(ParserContext handlerManager,Element element) throws ConfigurationException {
  String type=$(element).attr(ATTR_REFERENCES);
  String as=$(element).attr("String_Node_Str");
  if (as == null) {
    as=Iteration.DEFAULT_VARIABLE_LIST_STRING;
  }
  if (StringUtils.isBlank(type)) {
    throw new WindupException("String_Node_Str" + ELEM_NAME + "String_Node_Str"+ ATTR_REFERENCES+ "String_Node_Str");
  }
  List<TypeReferenceLocation> locations=new ArrayList<TypeReferenceLocation>();
  List<Element> children=$(element).children("String_Node_Str").get();
  for (  Element child : children) {
    TypeReferenceLocation location=handlerManager.processElement(child);
    locations.add(location);
  }
  JavaClassBuilder javaClassReferences=JavaClass.references(type);
  String namePattern=$(element).attr("String_Node_Str");
  if (!StringUtils.isBlank(namePattern)) {
    javaClassReferences.inType(namePattern);
  }
  JavaClassBuilderAt javaClass=javaClassReferences.at(locations.toArray(new TypeReferenceLocation[locations.size()]));
  javaClass.as(as);
  return javaClass;
}
Program: 109538
Project: 109538
Buggy source:
@Override public XSLTTransformation processElement(ParserContext handlerManager,Element element) throws ConfigurationException {
  String description=$(element).attr("String_Node_Str");
  String extension=$(element).attr("String_Node_Str");
  String xsltFile=$(element).attr("String_Node_Str");
  Path pathContainingXml=handlerManager.getXmlInputPath();
  if (pathContainingXml != null) {
    String fullPath;
    if (xsltFile.startsWith("String_Node_Str") || xsltFile.startsWith("String_Node_Str")) {
      fullPath=xsltFile;
    }
 else {
      fullPath=pathContainingXml.resolve(xsltFile).toAbsolutePath().toString();
    }
    return XSLTTransformation.usingFilesystem(fullPath).withDescription(description).withExtension(extension);
  }
 else {
    ClassLoader xmlFileAddonClassLoader=handlerManager.getAddonContainingInputXML().getClassLoader();
    return XSLTTransformation.using(xsltFile,xmlFileAddonClassLoader).withDescription(description).withExtension(extension);
  }
}

Fixed version (ground truth):
@Override public XSLTTransformation processElement(ParserContext handlerManager,Element element) throws ConfigurationException {
  String description=$(element).attr("String_Node_Str");
  String extension=$(element).attr("String_Node_Str");
  String template=$(element).attr("String_Node_Str");
  if (StringUtils.isBlank(description)) {
    throw new WindupException("String_Node_Str");
  }
  if (StringUtils.isBlank(template)) {
    throw new WindupException("String_Node_Str");
  }
  if (StringUtils.isBlank(extension)) {
    throw new WindupException("String_Node_Str");
  }
  Path pathContainingXml=handlerManager.getXmlInputPath();
  if (pathContainingXml != null) {
    String fullPath;
    if (template.startsWith("String_Node_Str") || template.startsWith("String_Node_Str")) {
      fullPath=template;
    }
 else {
      fullPath=pathContainingXml.resolve(template).toAbsolutePath().toString();
    }
    return XSLTTransformation.usingFilesystem(fullPath).withDescription(description).withExtension(extension);
  }
 else {
    ClassLoader xmlFileAddonClassLoader=handlerManager.getAddonContainingInputXML().getClassLoader();
    return XSLTTransformation.using(template,xmlFileAddonClassLoader).withDescription(description).withExtension(extension);
  }
}
Program: 109539
Project: 109539
Buggy source:
@Override public XmlFile processElement(ParserContext handlerManager,Element element) throws ConfigurationException {
  String xpath=$(element).attr("String_Node_Str");
  String publicId=$(element).attr("String_Node_Str");
  Map<String,String> namespaceMappings=new HashMap<>();
  List<Element> children=$(element).children().get();
  for (  Element child : children) {
    NamespaceEntry namespaceEntry=handlerManager.processElement(child);
    namespaceMappings.put(namespaceEntry.getPrefix(),namespaceEntry.getNamespaceURI());
  }
  XmlFile xmlFile=XmlFile.matchesXpath(xpath);
  xmlFile.setPublicId(publicId);
  for (  Map.Entry<String,String> nsMapping : namespaceMappings.entrySet()) {
    xmlFile.namespace(nsMapping.getKey(),nsMapping.getValue());
  }
  return xmlFile;
}

Fixed version (ground truth):
@Override public XmlFile processElement(ParserContext handlerManager,Element element) throws ConfigurationException {
  String xpath=$(element).attr("String_Node_Str");
  if (StringUtils.isBlank(xpath)) {
    throw new WindupException("String_Node_Str");
  }
  String publicId=$(element).attr("String_Node_Str");
  Map<String,String> namespaceMappings=new HashMap<>();
  List<Element> children=$(element).children().get();
  for (  Element child : children) {
    NamespaceEntry namespaceEntry=handlerManager.processElement(child);
    namespaceMappings.put(namespaceEntry.getPrefix(),namespaceEntry.getNamespaceURI());
  }
  XmlFile xmlFile=XmlFile.matchesXpath(xpath);
  xmlFile.setPublicId(publicId);
  for (  Map.Entry<String,String> nsMapping : namespaceMappings.entrySet()) {
    xmlFile.namespace(nsMapping.getKey(),nsMapping.getValue());
  }
  return xmlFile;
}
Program: 109540
Project: 109540
Buggy source:
private Collection<URL> getScripts(FileModel userRulesFileModel){
  String userRulesPath=userRulesFileModel == null ? null : userRulesFileModel.getFilePath();
  List<URL> scripts=scanner.scan(GROOVY_RULES_EXTENSION);
  if (userRulesPath == null) {
    return scripts;
  }
  final List<URL> results=new ArrayList<>(scripts);
  try {
    Files.walkFileTree(Paths.get(userRulesPath),new SimpleFileVisitor<Path>(){
      @Override public FileVisitResult visitFile(      Path file,      BasicFileAttributes attrs) throws IOException {
        if (file.getFileName().toString().endsWith(GROOVY_RULES_EXTENSION)) {
          results.add(file.toUri().toURL());
        }
        return FileVisitResult.CONTINUE;
      }
    }
);
  }
 catch (  IOException e) {
    throw new WindupException("String_Node_Str" + userRulesPath + "String_Node_Str"+ e.getMessage(),e);
  }
  return results;
}

Fixed version (ground truth):
private Collection<URL> getScripts(FileModel userRulesFileModel){
  String userRulesDirectory=userRulesFileModel == null ? null : userRulesFileModel.getFilePath();
  List<URL> scripts=scanner.scan(GROOVY_RULES_EXTENSION);
  if (userRulesDirectory == null) {
    return scripts;
  }
  Path userRulesPath=Paths.get(userRulesDirectory);
  if (!Files.isDirectory(userRulesPath)) {
    LOG.warning("String_Node_Str" + userRulesPath.normalize().toString() + "String_Node_Str");
    return Collections.emptyList();
  }
  if (!Files.isDirectory(userRulesPath)) {
    LOG.warning("String_Node_Str" + userRulesPath.normalize().toString() + "String_Node_Str");
    return Collections.emptyList();
  }
  final List<URL> results=new ArrayList<>(scripts);
  try {
    Files.walkFileTree(userRulesPath,new SimpleFileVisitor<Path>(){
      @Override public FileVisitResult visitFile(      Path file,      BasicFileAttributes attrs) throws IOException {
        if (file.getFileName().toString().endsWith(GROOVY_RULES_EXTENSION)) {
          results.add(file.toUri().toURL());
        }
        return FileVisitResult.CONTINUE;
      }
    }
);
  }
 catch (  IOException e) {
    throw new WindupException("String_Node_Str" + userRulesPath + "String_Node_Str"+ e.getMessage(),e);
  }
  return results;
}
Program: 109541
Project: 109541
Buggy source:
private Collection<URL> getWindupUserDirectoryXmlFiles(FileModel userRulesFileModel){
  String userRulesPath=userRulesFileModel == null ? null : userRulesFileModel.getFilePath();
  if (userRulesPath == null) {
    return Collections.emptyList();
  }
  final List<URL> results=new ArrayList<>();
  try {
    Files.walkFileTree(Paths.get(userRulesPath),new SimpleFileVisitor<Path>(){
      @Override public FileVisitResult visitFile(      Path file,      BasicFileAttributes attrs) throws IOException {
        if (file.getFileName().toString().toLowerCase().endsWith("String_Node_Str" + XML_RULES_EXTENSION)) {
          results.add(file.toUri().toURL());
        }
        return FileVisitResult.CONTINUE;
      }
    }
);
  }
 catch (  IOException e) {
    throw new WindupException("String_Node_Str" + userRulesPath + "String_Node_Str"+ e.getMessage(),e);
  }
  return results;
}

Fixed version (ground truth):
private Collection<URL> getWindupUserDirectoryXmlFiles(FileModel userRulesFileModel){
  String userRulesDirectory=userRulesFileModel == null ? null : userRulesFileModel.getFilePath();
  if (userRulesDirectory == null) {
    return Collections.emptyList();
  }
  Path userRulesPath=Paths.get(userRulesDirectory);
  if (!Files.isDirectory(userRulesPath)) {
    LOG.warning("String_Node_Str" + userRulesPath.normalize().toString() + "String_Node_Str");
    return Collections.emptyList();
  }
  if (!Files.isDirectory(userRulesPath)) {
    LOG.warning("String_Node_Str" + userRulesPath.normalize().toString() + "String_Node_Str");
    return Collections.emptyList();
  }
  final List<URL> results=new ArrayList<>();
  try {
    Files.walkFileTree(userRulesPath,new SimpleFileVisitor<Path>(){
      @Override public FileVisitResult visitFile(      Path file,      BasicFileAttributes attrs) throws IOException {
        if (file.getFileName().toString().toLowerCase().endsWith("String_Node_Str" + XML_RULES_EXTENSION)) {
          results.add(file.toUri().toURL());
        }
        return FileVisitResult.CONTINUE;
      }
    }
);
  }
 catch (  IOException e) {
    throw new WindupException("String_Node_Str" + userRulesDirectory + "String_Node_Str"+ e.getMessage(),e);
  }
  return results;
}
Program: 109542
Project: 109542
Buggy source:
@Override public void execute(WindupConfiguration windupConfiguration){
  validateConfig(windupConfiguration);
  GraphContext context=windupConfiguration.getGraphContext();
  context.setOptions(windupConfiguration.getOptionMap());
  WindupConfigurationModel configModel=WindupConfigurationService.getConfigurationModel(context);
  configModel.setInputPath(getFileModel(context,windupConfiguration.getInputPath()));
  configModel.setOutputPath(getFileModel(context,windupConfiguration.getOutputDirectory()));
  configModel.setOfflineMode(windupConfiguration.isOffline());
  for (  Path path : windupConfiguration.getUserRulesDirectories()) {
    configModel.addUserRulesPath(getFileModel(context,path));
  }
  GraphRewrite event=new GraphRewrite(context);
  WindupRuleMetadata ruleMetadata=windupConfigurationLoader.loadConfiguration(context,windupConfiguration.getRuleProviderFilter());
  event.getRewriteContext().put(WindupRuleMetadata.class,ruleMetadata);
  Configuration rules=ruleMetadata.getConfiguration();
  RuleSubset ruleSubset=RuleSubset.create(rules);
  if (windupConfiguration.getProgressMonitor() != null)   ruleSubset.addLifecycleListener(new DefaultRuleLifecycleListener(windupConfiguration.getProgressMonitor(),rules));
  for (  RuleLifecycleListener listener : listeners) {
    ruleSubset.addLifecycleListener(listener);
  }
  ruleSubset.perform(event,createEvaluationContext());
}

Fixed version (ground truth):
@Override public void execute(WindupConfiguration windupConfiguration){
  validateConfig(windupConfiguration);
  GraphContext context=windupConfiguration.getGraphContext();
  context.setOptions(windupConfiguration.getOptionMap());
  WindupConfigurationModel configModel=WindupConfigurationService.getConfigurationModel(context);
  configModel.setInputPath(getFileModel(context,windupConfiguration.getInputPath()));
  configModel.setOutputPath(getFileModel(context,windupConfiguration.getOutputDirectory()));
  configModel.setOfflineMode(windupConfiguration.isOffline());
  for (  Path path : windupConfiguration.getAllUserRulesDirectories()) {
    configModel.addUserRulesPath(getFileModel(context,path));
  }
  GraphRewrite event=new GraphRewrite(context);
  WindupRuleMetadata ruleMetadata=windupConfigurationLoader.loadConfiguration(context,windupConfiguration.getRuleProviderFilter());
  event.getRewriteContext().put(WindupRuleMetadata.class,ruleMetadata);
  Configuration rules=ruleMetadata.getConfiguration();
  RuleSubset ruleSubset=RuleSubset.create(rules);
  if (windupConfiguration.getProgressMonitor() != null)   ruleSubset.addLifecycleListener(new DefaultRuleLifecycleListener(windupConfiguration.getProgressMonitor(),rules));
  for (  RuleLifecycleListener listener : listeners) {
    ruleSubset.addLifecycleListener(listener);
  }
  ruleSubset.perform(event,createEvaluationContext());
}
Program: 109543
Project: 109543
Buggy source:
@Test public void testRunWindupSourceMode() throws Exception {
  Path userPath=FileUtils.getTempDirectory().toPath().resolve("String_Node_Str").resolve("String_Node_Str" + RandomStringUtils.randomAlphanumeric(6));
  try {
    Files.createDirectories(userPath);
    try (InputStream is=getClass().getResourceAsStream(EXAMPLE_USERSCRIPT_INPUT);OutputStream os=new FileOutputStream(userPath.resolve(EXAMPLE_USERSCRIPT_OUTPUT).toFile())){
      IOUtils.copy(is,os);
    }
     try (InputStream is=getClass().getResourceAsStream("String_Node_Str");OutputStream os=new FileOutputStream(userPath.resolve(XSLT_OUTPUT_NAME).toFile())){
      IOUtils.copy(is,os);
    }
     try (GraphContext context=createGraphContext()){
      List<String> includeList=Collections.emptyList();
      List<String> excludeList=Collections.emptyList();
      super.runTest(context,"String_Node_Str",Collections.singletonList(userPath),true,includeList,excludeList);
      validateWebXmlReferences(context);
      validatePropertiesModels(context);
      validateReports(context);
    }
   }
  finally {
    FileUtils.deleteDirectory(userPath.toFile());
  }
}

Fixed version (ground truth):
@Test public void testRunWindupSourceMode() throws Exception {
  Path userPath=FileUtils.getTempDirectory().toPath().resolve("String_Node_Str").resolve("String_Node_Str" + RandomStringUtils.randomAlphanumeric(6));
  try {
    Files.createDirectories(userPath);
    try (InputStream is=getClass().getResourceAsStream(EXAMPLE_USERSCRIPT_INPUT);OutputStream os=new FileOutputStream(userPath.resolve(EXAMPLE_USERSCRIPT_OUTPUT).toFile())){
      IOUtils.copy(is,os);
    }
     try (InputStream is=getClass().getResourceAsStream("String_Node_Str");OutputStream os=new FileOutputStream(userPath.resolve(XSLT_OUTPUT_NAME).toFile())){
      IOUtils.copy(is,os);
    }
     try (GraphContext context=createGraphContext()){
      List<String> includeList=Collections.emptyList();
      List<String> excludeList=Collections.emptyList();
      super.runTest(context,"String_Node_Str",userPath.toFile(),true,includeList,excludeList);
      validateWebXmlReferences(context);
      validatePropertiesModels(context);
      validateReports(context);
    }
   }
  finally {
    FileUtils.deleteDirectory(userPath.toFile());
  }
}
Program: 109544
Project: 109544
Buggy source:
void runTest(final GraphContext graphContext,final String inputPath,final List<Path> userRulesDirs,final boolean sourceMode,final List<String> includePackages,final List<String> excludePackages) throws Exception {
  WindupConfiguration wpc=new WindupConfiguration().setGraphContext(graphContext);
  wpc.setInputPath(Paths.get(inputPath));
  wpc.setOutputDirectory(graphContext.getGraphDirectory());
  if (userRulesDirs != null) {
    wpc.setUserRulesDirectories(userRulesDirs);
  }
  wpc.setOptionValue(SourceModeOption.NAME,sourceMode);
  wpc.setOptionValue(ScanPackagesOption.NAME,includePackages);
  wpc.setOptionValue(ExcludePackagesOption.NAME,excludePackages);
  RecordingWindupProgressMonitor progressMonitor=new RecordingWindupProgressMonitor();
  wpc.setProgressMonitor(progressMonitor);
  processor.execute(wpc);
  Assert.assertFalse(progressMonitor.isCancelled());
  Assert.assertTrue(progressMonitor.isDone());
  Assert.assertFalse(progressMonitor.getSubTaskNames().isEmpty());
  Assert.assertTrue(progressMonitor.getTotalWork() > 0);
  Assert.assertTrue(progressMonitor.getCompletedWork() > 0);
  Assert.assertEquals(progressMonitor.getTotalWork(),progressMonitor.getCompletedWork());
}

Fixed version (ground truth):
void runTest(final GraphContext graphContext,final String inputPath,final File userRulesDir,final boolean sourceMode,final List<String> includePackages,final List<String> excludePackages) throws Exception {
  WindupConfiguration wpc=new WindupConfiguration().setGraphContext(graphContext);
  wpc.setInputPath(Paths.get(inputPath));
  wpc.setOutputDirectory(graphContext.getGraphDirectory());
  if (userRulesDir != null) {
    wpc.setOptionValue(UserRulesDirectoryOption.NAME,userRulesDir);
  }
  wpc.setOptionValue(SourceModeOption.NAME,sourceMode);
  wpc.setOptionValue(ScanPackagesOption.NAME,includePackages);
  wpc.setOptionValue(ExcludePackagesOption.NAME,excludePackages);
  RecordingWindupProgressMonitor progressMonitor=new RecordingWindupProgressMonitor();
  wpc.setProgressMonitor(progressMonitor);
  processor.execute(wpc);
  Assert.assertFalse(progressMonitor.isCancelled());
  Assert.assertTrue(progressMonitor.isDone());
  Assert.assertFalse(progressMonitor.getSubTaskNames().isEmpty());
  Assert.assertTrue(progressMonitor.getTotalWork() > 0);
  Assert.assertTrue(progressMonitor.getCompletedWork() > 0);
  Assert.assertEquals(progressMonitor.getTotalWork(),progressMonitor.getCompletedWork());
}
Program: 109546
Project: 109546
Buggy source:
/** 
 * Called internally to actually process the Iteration. Loops over the frames to iterate, and performs their .perform( ... ) or .otherwise( ... ) parts.
 */
public void perform(GraphRewrite event,EvaluationContext context){
  Variables variables=Variables.instance(event);
  Iterable<WindupVertexFrame> frames=getSelectionManager().getFrames(event,context);
  for (  WindupVertexFrame frame : frames) {
    variables.push();
    getPayloadManager().setCurrentPayload(variables,frame);
    boolean conditionResult=true;
    if (condition != null) {
      if (condition instanceof GraphCondition) {
        ((GraphCondition)condition).setInputVariablesName(getPayloadVariableName(event,context));
      }
      conditionResult=condition.evaluate(event,context);
      variables.push();
      getPayloadManager().setCurrentPayload(variables,frame);
    }
    if (conditionResult) {
      if (operationPerform != null) {
        operationPerform.perform(event,context);
      }
    }
 else     if (condition != null) {
      if (operationOtherwise != null) {
        operationOtherwise.perform(event,context);
      }
    }
    getPayloadManager().removeCurrentPayload(variables);
    variables.pop();
    if (condition != null) {
      variables.pop();
    }
  }
}

Fixed version (ground truth):
/** 
 * Called internally to actually process the Iteration. Loops over the frames to iterate, and performs their .perform( ... ) or .otherwise( ... ) parts.
 */
public void perform(GraphRewrite event,EvaluationContext context){
  Variables variables=Variables.instance(event);
  Iterable<WindupVertexFrame> frames=getSelectionManager().getFrames(event,context);
  event.getRewriteContext().put(DEFAULT_VARIABLE_LIST_STRING,frames);
  for (  WindupVertexFrame frame : frames) {
    variables.push();
    getPayloadManager().setCurrentPayload(variables,frame);
    boolean conditionResult=true;
    if (condition != null) {
      if (condition instanceof GraphCondition) {
        ((GraphCondition)condition).setInputVariablesName(getPayloadVariableName(event,context));
      }
      conditionResult=condition.evaluate(event,context);
      variables.push();
      getPayloadManager().setCurrentPayload(variables,frame);
    }
    if (conditionResult) {
      if (operationPerform != null) {
        operationPerform.perform(event,context);
      }
    }
 else     if (condition != null) {
      if (operationOtherwise != null) {
        operationOtherwise.perform(event,context);
      }
    }
    getPayloadManager().removeCurrentPayload(variables);
    variables.pop();
    if (condition != null) {
      variables.pop();
    }
  }
}
Program: 109548
Project: 109548
Buggy source:
@Override public Configuration getConfiguration(GraphContext context){
  QueryGremlinCriterion shouldDecompileCriterion=new ShouldDecompileCriterion();
  return ConfigurationBuilder.begin().addRule().when(Query.find(ArchiveModel.class).piped(shouldDecompileCriterion)).perform(new ProcyonDecompilerOperation()).otherwise(Log.message(Level.WARN,"String_Node_Str"));
}

Fixed version (ground truth):
@Override public Configuration getConfiguration(GraphContext context){
  QueryGremlinCriterion shouldDecompileCriterion=new ShouldDecompileCriterion();
  return ConfigurationBuilder.begin().addRule().when(Query.find(ArchiveModel.class).piped(shouldDecompileCriterion)).perform(new ProcyonDecompilerOperation().and(IterationProgress.monitoring("String_Node_Str",1))).otherwise(Log.message(Level.WARN,"String_Node_Str"));
}
Program: 109549
Project: 109549
Buggy source:
@Override public Configuration getConfiguration(GraphContext context){
  ConditionBuilder javaSourceAvailable=Query.find(JavaSourceFileModel.class);
  return ConfigurationBuilder.begin().addRule().when(javaSourceAvailable).perform(new ParseSourceOperation());
}

Fixed version (ground truth):
@Override public Configuration getConfiguration(GraphContext context){
  ConditionBuilder javaSourceAvailable=Query.find(JavaSourceFileModel.class);
  return ConfigurationBuilder.begin().addRule().when(javaSourceAvailable).perform(new ParseSourceOperation().and(IterationProgress.monitoring("String_Node_Str",250)));
}
Program: 109551
Project: 109551
Buggy source:
@Override public ConditionBuilder when(){
  return Query.find(FileModel.class).withProperty(FileModel.FILE_NAME,QueryPropertyComparisonType.REGEX,"String_Node_Str");
}

Fixed version (ground truth):
@Override public ConditionBuilder when(){
  return Query.find(FileModel.class).withProperty(FileModel.FILE_NAME,QueryPropertyComparisonType.REGEX,"String_Node_Str").withProperty(FileModel.IS_DIRECTORY,false);
}
Program: 109552
Project: 109552
Buggy source:
@Override public FileVisitResult visitFile(Path file,BasicFileAttributes attrs) throws IOException {
  String relativePath=StringUtils.substringAfter(file.toString(),path.toString());
  relativePath=StringUtils.removeStart(relativePath,File.separator);
  Path resultFile=resultPath.resolve(relativePath);
  FileUtils.forceMkdir(resultFile.getParent().toFile());
  Files.copy(file,resultFile,StandardCopyOption.REPLACE_EXISTING);
  return FileVisitResult.CONTINUE;
}

Fixed version (ground truth):
@Override public FileVisitResult visitFile(Path file,BasicFileAttributes attrs) throws IOException {
  String relativePath=StringUtils.substringAfter(file.toString(),path.toString());
  relativePath=FilenameUtils.separatorsToSystem(relativePath);
  relativePath=StringUtils.removeStart(relativePath,File.separator);
  Path resultFile=resultPath.resolve(relativePath);
  FileUtils.forceMkdir(resultFile.getParent().toFile());
  Files.copy(file,resultFile,StandardCopyOption.REPLACE_EXISTING);
  return FileVisitResult.CONTINUE;
}
Program: 109553
Project: 109553
Buggy source:
private void recursePath(final Path path,final Path resultPath) throws IOException {
  Files.walkFileTree(path,new SimpleFileVisitor<Path>(){
    @Override public FileVisitResult visitFile(    Path file,    BasicFileAttributes attrs) throws IOException {
      String relativePath=StringUtils.substringAfter(file.toString(),path.toString());
      relativePath=StringUtils.removeStart(relativePath,File.separator);
      Path resultFile=resultPath.resolve(relativePath);
      FileUtils.forceMkdir(resultFile.getParent().toFile());
      Files.copy(file,resultFile,StandardCopyOption.REPLACE_EXISTING);
      return FileVisitResult.CONTINUE;
    }
  }
);
}

Fixed version (ground truth):
private void recursePath(final Path path,final Path resultPath) throws IOException {
  Files.walkFileTree(path,new SimpleFileVisitor<Path>(){
    @Override public FileVisitResult visitFile(    Path file,    BasicFileAttributes attrs) throws IOException {
      String relativePath=StringUtils.substringAfter(file.toString(),path.toString());
      relativePath=FilenameUtils.separatorsToSystem(relativePath);
      relativePath=StringUtils.removeStart(relativePath,File.separator);
      Path resultFile=resultPath.resolve(relativePath);
      FileUtils.forceMkdir(resultFile.getParent().toFile());
      Files.copy(file,resultFile,StandardCopyOption.REPLACE_EXISTING);
      return FileVisitResult.CONTINUE;
    }
  }
);
}
Program: 109555
Project: 109555
Buggy source:
/** 
 * Default settings set type loader to ClasspathTypeLoader if not set before.
 */
private DecompilerSettings getDefaultSettings(File outputDir){
  DecompilerSettings settings=this.procyonConf.getDecompilerSettings();
  if (settings == null) {
    settings=new DecompilerSettings();
    configuration.setDecompilerSettings(settings);
  }
  settings.setOutputDirectory(outputDir.getPath());
  settings.setShowSyntheticMembers(false);
  settings.setForceExplicitImports(true);
  if (settings.getTypeLoader() == null)   settings.setTypeLoader(new ClasspathTypeLoader());
  return settings;
}

Fixed version (ground truth):
/** 
 * Default settings set type loader to ClasspathTypeLoader if not set before.
 */
private DecompilerSettings getDefaultSettings(File outputDir){
  DecompilerSettings settings=this.procyonConf.getDecompilerSettings();
  if (settings == null) {
    settings=new DecompilerSettings();
    procyonConf.setDecompilerSettings(settings);
  }
  settings.setOutputDirectory(outputDir.getPath());
  settings.setShowSyntheticMembers(false);
  settings.setForceExplicitImports(true);
  if (settings.getTypeLoader() == null)   settings.setTypeLoader(new ClasspathTypeLoader());
  return settings;
}
Program: 109556
Project: 109556
Buggy source:
/** 
 * Specify the name of the variables to base this query on.
 * @param fromVariables
 * @return
 */
public static XmlFileBeing from(String fromVariables){
  return new XmlFileBeing(fromVariables);
}

Fixed version (ground truth):
/** 
 * Specify the name of the variables to base this query on.
 * @param fromVariable
 * @return
 */
public static XmlFileFrom from(String fromVariable){
  return new XmlFileFrom(fromVariable);
}
Program: 109559
Project: 109559
Buggy source:
public void addDecompiled(String path){
  this.decompiled.add(path);
}

Fixed version (ground truth):
public void addDecompiled(String inputPath,String path){
  this.decompiledFiles.put(inputPath,path);
}
Program: 109560
Project: 109560
Buggy source:
@Test public void testDecompileWicketJar() throws DecompilationException {
  File archive=new File("String_Node_Str");
  File outputFolder=new File(testTempDir,"String_Node_Str");
  final Decompiler dec=this.getDecompiler();
  final DecompilationResult res=dec.decompileArchive(archive,outputFolder);
  Assert.assertNotNull("String_Node_Str",res);
  if (!res.getFailures().isEmpty()) {
    final StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str" + res.getFailures().size() + "String_Node_Str");
    for (    final DecompilationFailure dex : res.getFailures()) {
      sb.append("String_Node_Str").append(dex.getMessage());
    }
    if (!this.isResultValid(res))     Assert.fail(sb.toString());
 else     log.error(sb.toString());
  }
  log.info("String_Node_Str",res.getDecompiled().size(),res.getFailures().size());
  final File sampleFile=new File(outputFolder,"String_Node_Str");
  Assert.assertTrue("String_Node_Str" + sampleFile.getAbsolutePath(),sampleFile.exists());
}

Fixed version (ground truth):
@Test public void testDecompileWicketJar() throws DecompilationException {
  File archive=new File("String_Node_Str");
  File outputFolder=new File(testTempDir,"String_Node_Str");
  final Decompiler dec=this.getDecompiler();
  final DecompilationResult res=dec.decompileArchive(archive,outputFolder);
  Assert.assertNotNull("String_Node_Str",res);
  if (!res.getFailures().isEmpty()) {
    final StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str" + res.getFailures().size() + "String_Node_Str");
    for (    final DecompilationFailure dex : res.getFailures()) {
      sb.append("String_Node_Str").append(dex.getMessage());
    }
    if (!this.isResultValid(res))     Assert.fail(sb.toString());
 else     log.error(sb.toString());
  }
  log.info("String_Node_Str",res.getDecompiledFiles().size(),res.getFailures().size());
  final File sampleFile=new File(outputFolder,"String_Node_Str");
  Assert.assertTrue("String_Node_Str" + sampleFile.getAbsolutePath(),sampleFile.exists());
}
Program: 109561
Project: 109561
Buggy source:
@Test @Ignore("String_Node_Str") public void testDecompileWicketJarDirectory() throws DecompilationException, IOException {
  final Decompiler dec=this.getDecompiler();
  File archive=new File("String_Node_Str");
  File outputFolder=new File(testTempDir,"String_Node_Str");
  File unzippedDir=new File(outputFolder,"String_Node_Str");
  ZipUtil.unzip(archive,unzippedDir);
  final DecompilationResult res=dec.decompileDirectory(unzippedDir,outputFolder);
  Assert.assertNotNull("String_Node_Str",res);
  if (!res.getFailures().isEmpty()) {
    final StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str" + res.getFailures().size() + "String_Node_Str");
    for (    final DecompilationFailure dex : res.getFailures()) {
      sb.append("String_Node_Str").append(dex.getMessage());
    }
    if (!this.isResultValid(res))     Assert.fail(sb.toString());
 else     log.error(sb.toString());
  }
  log.info("String_Node_Str",res.getDecompiled().size(),res.getFailures().size());
  final File sampleFile=new File(outputFolder,"String_Node_Str");
  Assert.assertTrue("String_Node_Str" + sampleFile.getAbsolutePath(),sampleFile.exists());
}

Fixed version (ground truth):
@Test @Ignore("String_Node_Str") public void testDecompileWicketJarDirectory() throws DecompilationException, IOException {
  final Decompiler dec=this.getDecompiler();
  File archive=new File("String_Node_Str");
  File outputFolder=new File(testTempDir,"String_Node_Str");
  File unzippedDir=new File(outputFolder,"String_Node_Str");
  ZipUtil.unzip(archive,unzippedDir);
  final DecompilationResult res=dec.decompileDirectory(unzippedDir,outputFolder);
  Assert.assertNotNull("String_Node_Str",res);
  if (!res.getFailures().isEmpty()) {
    final StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str" + res.getFailures().size() + "String_Node_Str");
    for (    final DecompilationFailure dex : res.getFailures()) {
      sb.append("String_Node_Str").append(dex.getMessage());
    }
    if (!this.isResultValid(res))     Assert.fail(sb.toString());
 else     log.error(sb.toString());
  }
  log.info("String_Node_Str",res.getDecompiledFiles().size(),res.getFailures().size());
  final File sampleFile=new File(outputFolder,"String_Node_Str");
  Assert.assertTrue("String_Node_Str" + sampleFile.getAbsolutePath(),sampleFile.exists());
}
Program: 109564
Project: 109564
Buggy source:
@Override public DecompilationResult decompileClassFile(File classFile,File outputDir) throws DecompilationException {
  if (classFile == null)   throw new IllegalArgumentException("String_Node_Str");
  if (!classFile.exists())   throw new IllegalArgumentException("String_Node_Str" + classFile.getAbsolutePath());
  if (outputDir == null)   throw new IllegalArgumentException("String_Node_Str");
  if (outputDir.exists() && !outputDir.isDirectory())   throw new IllegalArgumentException("String_Node_Str" + outputDir.getAbsolutePath());
  log.info("String_Node_Str" + classFile.getAbsolutePath() + "String_Node_Str"+ outputDir.getAbsolutePath());
  String name=classFile.getName();
  final String typeName=StringUtils.removeEnd(name,"String_Node_Str");
  DecompilationResult res=new DecompilationResult();
  try {
    DecompilerSettings settings=getDefaultSettings(outputDir);
    MetadataSystem metadataSystem=new NoRetryMetadataSystem(settings.getTypeLoader());
    this.decompileType(metadataSystem,typeName);
    res.addDecompiled(name);
  }
 catch (  Throwable e) {
    DecompilationFailure failure=new DecompilationFailure("String_Node_Str" + classFile.getAbsolutePath() + "String_Node_Str"+ e.getMessage(),name,e);
    log.error(failure.getMessage());
    res.addFailure(failure);
  }
  return res;
}

Fixed version (ground truth):
@Override public DecompilationResult decompileClassFile(File classFile,File outputDir) throws DecompilationException {
  if (classFile == null)   throw new IllegalArgumentException("String_Node_Str");
  if (!classFile.exists())   throw new IllegalArgumentException("String_Node_Str" + classFile.getAbsolutePath());
  if (outputDir == null)   throw new IllegalArgumentException("String_Node_Str");
  if (outputDir.exists() && !outputDir.isDirectory())   throw new IllegalArgumentException("String_Node_Str" + outputDir.getAbsolutePath());
  log.info("String_Node_Str" + classFile.getAbsolutePath() + "String_Node_Str"+ outputDir.getAbsolutePath());
  String name=classFile.getName();
  final String typeName=StringUtils.removeEnd(name,"String_Node_Str");
  DecompilationResult res=new DecompilationResult();
  try {
    DecompilerSettings settings=getDefaultSettings(outputDir);
    MetadataSystem metadataSystem=new NoRetryMetadataSystem(settings.getTypeLoader());
    File outputFile=this.decompileType(metadataSystem,typeName);
    res.addDecompiled(classFile.getAbsolutePath(),outputFile.getAbsolutePath());
  }
 catch (  Throwable e) {
    DecompilationFailure failure=new DecompilationFailure("String_Node_Str" + classFile.getAbsolutePath() + "String_Node_Str"+ e.getMessage(),name,e);
    log.error(failure.getMessage());
    res.addFailure(failure);
  }
  return res;
}
Program: 109568
Project: 109568
Buggy source:
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClasses(FooModel.class,FooSubModel.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClasses(TestFooModel.class,TestFooSubModel.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}
Program: 109569
Project: 109569
Buggy source:
@Test public void testEventGraph() throws Exception {
  Assert.assertNotNull(context);
  StubGraphChangedListener stubGraphListener=new StubGraphChangedListener();
  context.getGraph().addListener(stubGraphListener);
  FooModel initialModelType=context.getFramed().addVertex(null,FooModel.class);
  Assert.assertEquals(1,stubGraphListener.addVertexEventRecorded());
  stubGraphListener.reset();
  GraphService.addTypeToModel(context,initialModelType,FooSubModel.class);
  Assert.assertEquals(1,stubGraphListener.vertexPropertyChangedEventRecorded());
}

Fixed version (ground truth):
@Test public void testEventGraph() throws Exception {
  Assert.assertNotNull(context);
  StubGraphChangedListener stubGraphListener=new StubGraphChangedListener();
  context.getGraph().addListener(stubGraphListener);
  TestFooModel initialModelType=context.getFramed().addVertex(null,TestFooModel.class);
  Assert.assertEquals(1,stubGraphListener.addVertexEventRecorded());
  stubGraphListener.reset();
  GraphService.addTypeToModel(context,initialModelType,TestFooSubModel.class);
  Assert.assertEquals(1,stubGraphListener.vertexPropertyChangedEventRecorded());
}
Program: 109570
Project: 109570
Buggy source:
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClasses(FooModel.class,FooSubModel.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClasses(TestFooModel.class,TestFooSubModel.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}
Program: 109571
Project: 109571
Buggy source:
@Test public void testInMemoryFrame() throws Exception {
  Assert.assertNotNull(context);
  GraphService<FooModel> fooModelService=context.getService(FooModel.class);
  FooModel inMemoryModel=fooModelService.createInMemory();
  inMemoryModel.setProp1("String_Node_Str");
  inMemoryModel.setProp2("String_Node_Str");
  inMemoryModel.setProp3("String_Node_Str");
  Iterable<Vertex> vertices=context.getFramed().query().has("String_Node_Str",Text.CONTAINS,FooModel.class.getAnnotation(TypeValue.class).value()).vertices();
  Assert.assertFalse(vertices.iterator().hasNext());
  InMemoryVertexFrame inMemoryFrame=(InMemoryVertexFrame)inMemoryModel;
  inMemoryFrame.attachToGraph();
  vertices=context.getFramed().query().has("String_Node_Str",Text.CONTAINS,FooModel.class.getAnnotation(TypeValue.class).value()).vertices();
  int numberFound=0;
  for (  Vertex v : vertices) {
    numberFound++;
    FooModel framed=(FooModel)context.getFramed().frame(v,WindupVertexFrame.class);
    Assert.assertTrue(framed instanceof FooModel);
    Assert.assertEquals("String_Node_Str",framed.getProp1());
    Assert.assertEquals("String_Node_Str",framed.getProp2());
    Assert.assertEquals("String_Node_Str",framed.getProp3());
  }
  Assert.assertEquals(1,numberFound);
}

Fixed version (ground truth):
@Test public void testInMemoryFrame() throws Exception {
  Assert.assertNotNull(context);
  GraphService<TestFooModel> fooModelService=context.getService(TestFooModel.class);
  TestFooModel inMemoryModel=fooModelService.createInMemory();
  inMemoryModel.setProp1("String_Node_Str");
  inMemoryModel.setProp2("String_Node_Str");
  inMemoryModel.setProp3("String_Node_Str");
  Iterable<Vertex> vertices=context.getFramed().query().has("String_Node_Str",Text.CONTAINS,TestFooModel.class.getAnnotation(TypeValue.class).value()).vertices();
  Assert.assertFalse(vertices.iterator().hasNext());
  InMemoryVertexFrame inMemoryFrame=(InMemoryVertexFrame)inMemoryModel;
  inMemoryFrame.attachToGraph();
  vertices=context.getFramed().query().has("String_Node_Str",Text.CONTAINS,TestFooModel.class.getAnnotation(TypeValue.class).value()).vertices();
  int numberFound=0;
  for (  Vertex v : vertices) {
    numberFound++;
    TestFooModel framed=(TestFooModel)context.getFramed().frame(v,WindupVertexFrame.class);
    Assert.assertTrue(framed instanceof TestFooModel);
    Assert.assertEquals("String_Node_Str",framed.getProp1());
    Assert.assertEquals("String_Node_Str",framed.getProp2());
    Assert.assertEquals("String_Node_Str",framed.getProp3());
  }
  Assert.assertEquals(1,numberFound);
}
Program: 109572
Project: 109572
Buggy source:
@Property("String_Node_Str") public FooModel setProp3(String prop);

Fixed version (ground truth):
@Property("String_Node_Str") public TestFooModel setProp3(String prop);
Program: 109573
Project: 109573
Buggy source:
@Property("String_Node_Str") public FooModel setProp2(String prop);

Fixed version (ground truth):
@Property("String_Node_Str") public TestFooModel setProp2(String prop);
Program: 109574
Project: 109574
Buggy source:
@Property("String_Node_Str") public FooModel setProp1(String prop);

Fixed version (ground truth):
@Property("String_Node_Str") public TestFooModel setProp1(String prop);
Program: 109575
Project: 109575
Buggy source:
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClasses(FooModel.class,FooSubModel.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}

Fixed version (ground truth):
@Deployment @Dependencies({@AddonDependency(name="String_Node_Str"),@AddonDependency(name="String_Node_Str")}) public static ForgeArchive getDeployment(){
  ForgeArchive archive=ShrinkWrap.create(ForgeArchive.class).addBeansXML().addClasses(TestFooModel.class,TestFooSubModel.class).addAsAddonDependencies(AddonDependencyEntry.create("String_Node_Str"),AddonDependencyEntry.create("String_Node_Str"));
  return archive;
}
Program: 109576
Project: 109576
Buggy source:
@Test public void testInMemoryFrame() throws Exception {
  Assert.assertNotNull(context);
  GraphService<FooModel> fooModelService=context.getService(FooModel.class);
  FooModel inMemoryModel=fooModelService.create();
  inMemoryModel.setProp1("String_Node_Str").setProp2("String_Node_Str").setProp3("String_Node_Str");
  Iterable<Vertex> vertices=context.getFramed().query().has("String_Node_Str",Text.CONTAINS,FooModel.class.getAnnotation(TypeValue.class).value()).vertices();
  int numberFound=0;
  for (  Vertex v : vertices) {
    numberFound++;
    FooModel framed=(FooModel)context.getFramed().frame(v,WindupVertexFrame.class);
    Assert.assertTrue(framed instanceof FooModel);
    Assert.assertEquals("String_Node_Str",framed.getProp1());
    Assert.assertEquals("String_Node_Str",framed.getProp2());
    Assert.assertEquals("String_Node_Str",framed.getProp3());
  }
  Assert.assertEquals(1,numberFound);
}

Fixed version (ground truth):
@Test public void testInMemoryFrame() throws Exception {
  Assert.assertNotNull(context);
  GraphService<TestFooModel> fooModelService=context.getService(TestFooModel.class);
  TestFooModel inMemoryModel=fooModelService.create();
  inMemoryModel.setProp1("String_Node_Str").setProp2("String_Node_Str").setProp3("String_Node_Str");
  Iterable<Vertex> vertices=context.getFramed().query().has("String_Node_Str",Text.CONTAINS,TestFooModel.class.getAnnotation(TypeValue.class).value()).vertices();
  int numberFound=0;
  for (  Vertex v : vertices) {
    numberFound++;
    TestFooModel framed=(TestFooModel)context.getFramed().frame(v,WindupVertexFrame.class);
    Assert.assertTrue(framed instanceof TestFooModel);
    Assert.assertEquals("String_Node_Str",framed.getProp1());
    Assert.assertEquals("String_Node_Str",framed.getProp2());
    Assert.assertEquals("String_Node_Str",framed.getProp3());
  }
  Assert.assertEquals(1,numberFound);
}