test_class.declarator: FAST_SERVER_PORT = 8024
test_class.modifier: private static final
test_class.original_string: private static final int FAST_SERVER_PORT = 8024;
test_class.type: int
test_class.var_name: FAST_SERVER_PORT
test_class.declarator: service
test_class.modifier: private final
test_class.original_string: private final String service;
test_class.type: String
test_class.var_name: service
test_class.declarator: fastServerContainer
test_class.modifier: private static
test_class.original_string: private static ServerMock fastServerContainer;
test_class.type: ServerMock
test_class.var_name: fastServerContainer
test_class.declarator: fastServer
test_class.modifier: private static
test_class.original_string: private static ContainerServer fastServer;
test_class.type: ContainerServer
test_class.var_name: fastServer
test_class.declarator: fastConnection
test_class.modifier: private static
test_class.original_string: private static SocketConnection fastConnection;
test_class.type: SocketConnection
test_class.var_name: fastConnection
test_class.declarator: queryStr
test_class.modifier: private final
test_class.original_string: private final String queryStr;
test_class.type: String
test_class.var_name: queryStr
test_class.declarator: expectedConversionQuery
test_class.modifier: private final
test_class.original_string: private final Query expectedConversionQuery;
test_class.type: Query
test_class.var_name: expectedConversionQuery
test_class.declarator: vars
test_class.modifier: private final
test_class.original_string: private final String[] vars;
test_class.type: String[]
test_class.var_name: vars
test_class.declarator: expectedReplacedQuery
test_class.modifier: private final
test_class.original_string: private final String expectedReplacedQuery;
test_class.type: String
test_class.var_name: expectedReplacedQuery
test_class.declarator: expectedInstances
test_class.modifier: private final
test_class.original_string: private final List<String> expectedInstances;
test_class.type: List<String>
test_class.var_name: expectedInstances
test_class.declarator: dir = UUID.randomUUID().toString()
test_class.modifier: private
test_class.original_string: private String dir = UUID.randomUUID().toString();
test_class.type: String
test_class.var_name: dir
test_class.file: iguana.corecontroller/src/test/java/org/aksw/iguana/cc/query/impl/PatternQueryHandlerTest.java
test_class.identifier: PatternQueryHandlerTest
test_case.body: @Test
      public void testReplacement(){
          Set<String> varNames = new HashSet<String>();
          String replacedQuery = getHandler().replaceVars(this.queryStr, varNames);
          assertEquals(expectedReplacedQuery, replacedQuery);
          assertEquals(Sets.newHashSet(vars), varNames);
      }
test_case.class_method_signature: PatternQueryHandlerTest.testReplacement()
test_case.full_signature: @Test public void testReplacement()
test_case.identifier: testReplacement
test_case.invocations: replaceVars getHandler assertEquals assertEquals newHashSet
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReplacement()
focal_class.declarator: LOGGER = LoggerFactory
  			.getLogger(PatternQueryHandler.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory
  			.getLogger(PatternQueryHandler.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: service
focal_class.modifier: private
focal_class.original_string: private String service;
focal_class.type: String
focal_class.var_name: service
focal_class.declarator: limit = 2000l
focal_class.modifier: private
focal_class.original_string: private Long limit = 2000l;
focal_class.type: Long
focal_class.var_name: limit
focal_class.file: iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/impl/PatternQueryHandler.java
focal_class.identifier: PatternQueryHandler
focal_class.class_method_signature: PatternQueryHandler.PatternQueryHandler(List<Worker> workers, String endpoint)
focal_class.full_signature: public  PatternQueryHandler(List<Worker> workers, String endpoint)
focal_class.identifier: PatternQueryHandler
focal_class.modifiers: public
focal_class.parameters: (List<Worker> workers, String endpoint)
focal_class.signature:  PatternQueryHandler(List<Worker> workers, String endpoint)
focal_class.class_method_signature: PatternQueryHandler.PatternQueryHandler(LinkedList<Worker> workers, String endpoint, String limit)
focal_class.full_signature: public  PatternQueryHandler(LinkedList<Worker> workers, String endpoint, String limit)
focal_class.identifier: PatternQueryHandler
focal_class.modifiers: public
focal_class.parameters: (LinkedList<Worker> workers, String endpoint, String limit)
focal_class.signature:  PatternQueryHandler(LinkedList<Worker> workers, String endpoint, String limit)
focal_class.class_method_signature: PatternQueryHandler.PatternQueryHandler(LinkedList<Worker> workers, String endpoint, Long limit)
focal_class.full_signature: public  PatternQueryHandler(LinkedList<Worker> workers, String endpoint, Long limit)
focal_class.identifier: PatternQueryHandler
focal_class.modifiers: public
focal_class.parameters: (LinkedList<Worker> workers, String endpoint, Long limit)
focal_class.signature:  PatternQueryHandler(LinkedList<Worker> workers, String endpoint, Long limit)
focal_class.class_method_signature: PatternQueryHandler.replaceVars(String queryStr, Set<String> varNames)
focal_class.full_signature: protected String replaceVars(String queryStr, Set<String> varNames)
focal_class.identifier: replaceVars
focal_class.modifiers: protected
focal_class.parameters: (String queryStr, Set<String> varNames)
focal_class.return: String
focal_class.signature: String replaceVars(String queryStr, Set<String> varNames)
focal_class.class_method_signature: PatternQueryHandler.getInstances(String queryStr)
focal_class.full_signature: @Override protected List<String> getInstances(String queryStr)
focal_class.identifier: getInstances
focal_class.modifiers: @Override protected
focal_class.parameters: (String queryStr)
focal_class.return: List<String>
focal_class.signature: List<String> getInstances(String queryStr)
focal_class.class_method_signature: PatternQueryHandler.getInstanceVars(ParameterizedSparqlString pss, Set<String> varNames)
focal_class.full_signature: protected ResultSet getInstanceVars(ParameterizedSparqlString pss, Set<String> varNames)
focal_class.identifier: getInstanceVars
focal_class.modifiers: protected
focal_class.parameters: (ParameterizedSparqlString pss, Set<String> varNames)
focal_class.return: ResultSet
focal_class.signature: ResultSet getInstanceVars(ParameterizedSparqlString pss, Set<String> varNames)
focal_class.class_method_signature: PatternQueryHandler.convertToSelect(ParameterizedSparqlString pss, Set<String> varNames)
focal_class.full_signature: protected Query convertToSelect(ParameterizedSparqlString pss, Set<String> varNames)
focal_class.identifier: convertToSelect
focal_class.modifiers: protected
focal_class.parameters: (ParameterizedSparqlString pss, Set<String> varNames)
focal_class.return: Query
focal_class.signature: Query convertToSelect(ParameterizedSparqlString pss, Set<String> varNames)
focal_class.superclass: extends InstancesQueryHandler
focal_method.body: protected String replaceVars(String queryStr, Set<String> varNames) {
  		String command = queryStr;
  		Pattern pattern = Pattern.compile("%%var[0-9]+%%");
  		Matcher m = pattern.matcher(queryStr);
  		while(m.find()) {
  			String eVar = m.group();
  			String var = eVar.replace("%", "");
  			command = command.replace(eVar, "?"+var);
  			varNames.add(var);
  		}
  		return command;
  	}
focal_method.class_method_signature: PatternQueryHandler.replaceVars(String queryStr, Set<String> varNames)
focal_method.full_signature: protected String replaceVars(String queryStr, Set<String> varNames)
focal_method.identifier: replaceVars
focal_method.invocations: compile matcher find group replace replace add
focal_method.modifiers: protected
focal_method.parameters: (String queryStr, Set<String> varNames)
focal_method.return: String
focal_method.signature: String replaceVars(String queryStr, Set<String> varNames)