auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> private Path relativize(Path path) { <END> List<Path> fileDirectories = getFileDirectoriesAsPaths(); if (!path.isAbsolute()) { return path; } for (Path directory : fileDirectories) { if (path.startsWith(directory)) { return directory.relativize(path); } } return path; }</code><technical_language>reuse method in FileUtil List<Path> fileDirectories = database.getFileDirectoriesAsPaths(preferences.getFilePreferences()); return FileUtil.relativize(filePath, fileDirectories).toString();</technical_language>

Target:
private Path relativize(Path path) { List<Path> fileDirectories = getFileDirectoriesAsPaths(); return FileHelper.relativize(path, fileDirectories); }
Source:
<code>private static Object[][] vcfFileAndWrapperCombinations(){ return new Object[][] { {VCF, VCF_INDEX, null, null}, {MANGLED_VCF, MANGLED_VCF_INDEX, WRAPPER, WRAPPER}, {VCF, MANGLED_VCF_INDEX, null, WRAPPER}, {MANGLED_VCF, VCF_INDEX, WRAPPER, null}, {MANGLED_VCF_TABIX, MANGLED_VCF_TABIX_INDEX, WRAPPER, WRAPPER}, {VCF_TABIX, MANGLED_VCF_TABIX_INDEX, null, WRAPPER}, <START> {MANGLED_VCF_TABIX, VCF_TABIX_INDEX, WRAPPER, null}, <END> {VCF_TABIX, VCF_TABIX_INDEX, null, null}, }; }</code><technical_language>confirmed test cases a wrapper throw if wrapper is provided</technical_language>

Target:
private static Object[][] vcfFileAndWrapperCombinations(){ return new Object[][] { {VCF, VCF_INDEX, null, null}, {MANGLED_VCF, MANGLED_VCF_INDEX, WRAPPER, WRAPPER}, {VCF, MANGLED_VCF_INDEX, null, WRAPPER}, {MANGLED_VCF, VCF_INDEX, WRAPPER, null}, {MANGLED_VCF_TABIX_BLOCK_GZIPPED, MANGLED_VCF_TABIX_INDEX, WRAPPER, WRAPPER}, {VCF_TABIX_BLOCK_GZIPPED, MANGLED_VCF_TABIX_INDEX, null, WRAPPER}, {MANGLED_VCF_TABIX_BLOCK_GZIPPED, VCF_TABIX_INDEX, WRAPPER, null}, {VCF_TABIX_BLOCK_GZIPPED, VCF_TABIX_INDEX, null, null}, }; }
Source:
<code>public boolean hasModeType(String modeType) { if(!hasModes()) { return false; } <START> List<EquipmentMode> threadSafeModes = Collections.synchronizedList(modes); <END> synchronized(threadSafeModes) { for(EquipmentMode mode : threadSafeModes) { if(mode.getName().equals(modeType)) { return true; } } } return false; }</code><technical_language>Collections.synchronizedList protects methods List concurrent access, however, do protect iteration. need synchronized. threadSafeModes want modes. Except, threadSafeModes for of mutable of modes (add, remove). stands, served simply wrapping usage of modes in a synchronized block modes itself</technical_language>

Target:
public boolean hasModeType(String modeType) { if(!hasModes()) { return false; } for(EquipmentMode mode : modes) { if(mode.getName().equals(modeType)) { return true; } } return false; }
Source:
<code>public static @CheckForNull Fingerprint of(@Nonnull String id) throws IOException { <START> final Jenkins jenkins = Jenkins.getInstance(); END> return jenkins != null ? jenkins.getFingerprintMap().get(getFingerprintHash(id)) : null; }</code><technical_language>getInstanceOrNull</technical_language>

Target:
public static @CheckForNull Fingerprint of(@Nonnull String id) throws IOException { return Jenkins.getInstance().getFingerprintMap().get(getFingerprintHash(id)); }
Source:
<code>public void testMd5DigestSecretGeneration03() { Map<String, Object> conf = new HashMap<>(); conf.put(Config.STORM_ZOOKEEPER_AUTH_SCHEME, "anything"); Map<String, Object> result = StormSubmitter.prepareZookeeperAuthentication(conf); Object actualPayload = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); Object actualScheme = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_SCHEME); <START> assertThat(Strings.isNullOrEmpty((String)actualPayload), is(false)); <END> assertThat(actualScheme, is("digest")); }</code><technical_language>This StringUtils.isBlank. assertFalse (or assertTrue)</technical_language>

Target:
public void testMd5DigestSecretGeneration03() { Map<String, Object> conf = new HashMap<>(); conf.put(Config.STORM_ZOOKEEPER_AUTH_SCHEME, "anything"); Map<String, Object> result = StormSubmitter.prepareZookeeperAuthentication(conf); Object actualPayload = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); Object actualScheme = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_SCHEME); assertFalse(StringUtils.isBlank((String)actualPayload)); assertEquals("digest", actualScheme); }
Source:
<code>public Set<User> getUsersById(Set<String> userIds) { Set<User> result = new HashSet<User>(); if (userIds != null) { for (String userId : userIds) { User user = getCache().get(userId); if (user != null) { result.add(user); } else { result.add(new User(userId)); } <START> if (this.eventService != null) { this.eventService.fireEvent(new EventUserUpdate(user)); } <END> } } return result; }</code><technical_language>This in getCache(): private synchronized Map<String, User> getCache() { if (cache == null) { cache = new HashMap<String, User>(); for (User user: getAll()) { cache.put(user.getUserId(), user); if (eventService != null) { eventService.fireEvent(new EventUserUpdate(user)); } } } return cache; }</technical_language>

Target:
public Set<User> getUsersById(Set<String> userIds) { Set<User> result = new HashSet<User>(); if (userIds != null) { for (String userId : userIds) { User user = getCache().get(userId); if (user != null) { result.add(user); } else { result.add(new User(userId)); } } } return result; }
Source:
<code>public Manifest getManifest(MavenArtifact artifact) throws IOException { Manifest manifest; File f = artifact.resolve(); try { JarFile jar = new JarFile(f); <START> ZipEntry e = jar.getEntry("META-INF/MANIFEST.MF"); <END> manifest = jar.getManifest(); jar.close(); } catch (IOException x) { throw new IOException("Failed to open "+f, x); } return manifest; }</code><technical_language>unused</technical_language>

Target:
public Manifest getManifest(MavenArtifact artifact) throws IOException { try (InputStream is = getZipFileEntry(artifact, "META-INF/MANIFEST.MF")) { return new Manifest(is); } catch (IOException x) { throw new IOException("Failed to read manifest from "+artifact, x); } }
Source:
<code>private static Map<String, String> readProperties() { try { File file = new File(AndroidLocation.getFolder(), PATH_FIRST_RUN_PROPERTIES); if (file.isFile()) { Map<String, String> properties = Maps.newHashMap(); try { final List<String> lines = Files.readLines(file, Charsets.UTF_16LE); for (String line : lines) { int keyValueSeparator = line.indexOf('='); if (keyValueSeparator < 0) { continue; } final String key = line.substring(0, keyValueSeparator).trim(); final String value = line.substring(keyValueSeparator + 1).trim(); if <START> (key == "") { <END> continue; } properties.put(key, value); } } catch (IOException e) { Logger.getInstance(InstallerData.class).error(e); } return properties; } } catch (AndroidLocation.AndroidLocationException e) { Logger.getInstance(InstallerData.class).error(e); } return null; }</code><technical_language>"".equals StringUtil.isEmpty</technical_language>

Target:
private static Map<String, String> readProperties() { try { File file = new File(AndroidLocation.getFolder(), PATH_FIRST_RUN_PROPERTIES); if (file.isFile()) { Map<String, String> properties = Maps.newHashMap(); try { final List<String> lines = Files.readLines(file, Charsets.UTF_16LE); for (String line : lines) { int keyValueSeparator = line.indexOf('='); if (keyValueSeparator < 0) { continue; } final String key = line.substring(0, keyValueSeparator).trim(); final String value = line.substring(keyValueSeparator + 1).trim(); if (key.isEmpty()) { continue; } properties.put(key, value); } } catch (IOException e) { Logger.getInstance(InstallerData.class).error(e); } return properties; } } catch (AndroidLocation.AndroidLocationException e) { Logger.getInstance(InstallerData.class).error(e); } return null; }
Source:
<code>@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final BlockBuilder builder = new BlockBuilder(); final EnumerableRel child = (EnumerableRel) this.getInput(); final Result result = implementor.visitChild(this, 0, child, pref); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), this.getRowType(), result.format); <START> Expression childExp = builder.append("child", result.block); <END> PhysType inputPhysType = result.physType; final Pair<Expression, Expression> pair = inputPhysType.generateCollationKey(this.collation.getFieldCollations()); Expression fetchVal; if (this.fetch == null) { fetchVal = Expressions.constant(Integer.valueOf(Integer.MAX_VALUE)); } else { fetchVal = getExpression(this.fetch); } Expression offsetVal = this.offset == null ? Expressions.constant(Integer.valueOf(0)) : getExpression(this.offset); builder.add( Expressions.return_( null, Expressions.call( BuiltInMethod.ORDER_BY_WITH_FETCH_AND_OFFSET.method, Expressions.list( childExp, builder.append("keySelector", pair.left)) .appendIfNotNull(builder.appendIfNotNull("comparator", pair.right)) .appendIfNotNull( builder.appendIfNotNull("offset", Expressions.constant(offsetVal))) .appendIfNotNull( builder.appendIfNotNull("fetch", Expressions.constant(fetchVal))) ))); return implementor.result(physType, builder.toBlock()); }</code><technical_language>minor: for consistency reasons this method, please declare variables "final" (if effectively final)</technical_language>

Target:
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final BlockBuilder builder = new BlockBuilder(); final EnumerableRel child = (EnumerableRel) this.getInput(); final Result result = implementor.visitChild(this, 0, child, pref); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), this.getRowType(), result.format); final Expression childExp = builder.append("child", result.block); final PhysType inputPhysType = result.physType; final Pair<Expression, Expression> pair = inputPhysType.generateCollationKey(this.collation.getFieldCollations()); final Expression fetchVal; if (this.fetch == null) { fetchVal = Expressions.constant(Integer.valueOf(Integer.MAX_VALUE)); } else { fetchVal = getExpression(this.fetch); } final Expression offsetVal = this.offset == null ? Expressions.constant(Integer.valueOf(0)) : getExpression(this.offset); builder.add( Expressions.return_( null, Expressions.call( BuiltInMethod.ORDER_BY_WITH_FETCH_AND_OFFSET.method, Expressions.list( childExp, builder.append("keySelector", pair.left)) .appendIfNotNull(builder.appendIfNotNull("comparator", pair.right)) .appendIfNotNull( builder.appendIfNotNull("offset", Expressions.constant(offsetVal))) .appendIfNotNull( builder.appendIfNotNull("fetch", Expressions.constant(fetchVal))) ))); return implementor.result(physType, builder.toBlock()); }
Source:
<code>public void start() { log.info("Starting KafkaConfigBackingStore"); configLog.start(); int partitionCount = configLog.getPartitionCount(); if (partitionCount > 1) { <START> throw new ConfigException("KafkaConfigBackingStore must have exactly 1 partition but found " + partitionCount + ", check topic set by " + <END> DistributedConfig.CONFIG_TOPIC_CONFIG); } started = true; log.info("Started KafkaConfigBackingStore"); }</code><technical_language>topic name member variable topic. if well. a suggestion, checking <LINK_0> String msg = String.format("Topic '%s' supplied '%s' property is required " + "to a single partition in order guarantee consistency of " + "connector configurations %d partitions.", topic, DistributedConfig.CONFIG_TOPIC_CONFIG, partitionCount); throw new ConfigException(msg);</technical_language>

Target:
public void start() { log.info("Starting KafkaConfigBackingStore"); configLog.start(); int partitionCount = configLog.partitionCount(); if (partitionCount > 1) { String msg = String.format("Topic '%s' supplied via the '%s' property is required " + "to have a single partition in order to guarantee consistency of " + "connector configurations, but found %d partitions.", topic, DistributedConfig.CONFIG_TOPIC_CONFIG, partitionCount); throw new ConfigException(msg); } started = true; log.info("Started KafkaConfigBackingStore"); }
Source:
<code>public java.io.File toLocalFile(int options, IProgressMonitor monitor) throws CoreException { SubMonitor <START> subMonitor = <END> SubMonitor.convert(monitor); if (options != EFS.CACHE) return null; return FileCache.getCache().cache(this, subMonitor); }</code><technical_language>submonitor is needed in this method. original monitor passed a single method call is</technical_language>

Target:
public java.io.File toLocalFile(int options, IProgressMonitor monitor) throws CoreException { if (options != EFS.CACHE) return null; return FileCache.getCache().cache(this, monitor); }
Source:
<code>protected ItemRest put(Context context, HttpServletRequest request, String apiCategory, String model, UUID uuid, JsonNode jsonNode) throws RepositoryMethodNotImplementedException, SQLException, AuthorizeException { HttpServletRequest req = getRequestService().getCurrentRequest().getHttpServletRequest(); ObjectMapper mapper = new ObjectMapper(); ItemRest itemRest = null; try { itemRest = mapper.readValue(jsonNode.toString(), ItemRest.class); } catch (IOException e1) { <START> throw new UnprocessableEntityException("Error parsing request body: " + e1.toString()); <END> } Item item = itemService.find(context, uuid); if (item == null) { throw new ResourceNotFoundException(apiCategory + "." + model + " with id: " + uuid + " not found"); } if (StringUtils.equals(uuid.toString(), itemRest.getId())) { List<MetadataEntryRest> metadataEntryRestList = itemRest.getMetadata(); item = (Item) dspaceObjectUtils.replaceMetadataValues(context, item, metadataEntryRestList); } else { throw new IllegalArgumentException("The UUID in the Json and the UUID in the url do not match: " + uuid + ", " + itemRest.getId()); } return converter.fromModel(item); }</code><technical_language>Another stacktrace swallowed. be: throw new UnprocessableEntityException("Error parsing request body", e1);</technical_language>

Target:
protected ItemRest put(Context context, HttpServletRequest request, String apiCategory, String model, UUID uuid, JsonNode jsonNode) throws RepositoryMethodNotImplementedException, SQLException, AuthorizeException { HttpServletRequest req = getRequestService().getCurrentRequest().getHttpServletRequest(); ObjectMapper mapper = new ObjectMapper(); ItemRest itemRest = null; try { itemRest = mapper.readValue(jsonNode.toString(), ItemRest.class); } catch (IOException e1) { throw new UnprocessableEntityException("Error parsing request body", e1); } Item item = itemService.find(context, uuid); if (item == null) { throw new ResourceNotFoundException(apiCategory + "." + model + " with id: " + uuid + " not found"); } if (StringUtils.equals(uuid.toString(), itemRest.getId())) { List<MetadataEntryRest> metadataEntryRestList = itemRest.getMetadata(); item = (Item) dspaceObjectUtils.replaceMetadataValues(context, item, metadataEntryRestList); } else { throw new IllegalArgumentException("The UUID in the Json and the UUID in the url do not match: " + uuid + ", " + itemRest.getId()); } return converter.fromModel(item); }
Source:
<code>} catch (URISyntaxException e) { <START> throw new RuntimeException(e); <END> }</code><technical_language>throw IllegalArgumentException instead</technical_language>

Target:
} catch (URISyntaxException e) { throw new IllegalArgumentException(e); }
Source:
<code>public BuilderInterceptorInstance create(CreationalContext<BuilderInterceptorInstance> creationalContext) { BuilderInterceptorInstance interceptorInstance; if (this.interceptorMetadataFunction != null) { WeldCreationalContext<?> interceptorContext = getParentCreationalContext(creationalContext); Contextual<?> interceptedContextual = interceptorContext.getContextual(); if (interceptedContextual instanceof Bean<?>) { Bean<?> bean = (Bean<?>) interceptedContextual; interceptorInstance = new BuilderInterceptorInstance(bean); return interceptorInstance; } else { <START> return null; <END> } } else { interceptorInstance = new BuilderInterceptorInstance(); return interceptorInstance; } }</code><technical_language>I throw exception here... WDYT</technical_language>

Target:
public BuilderInterceptorInstance create(CreationalContext<BuilderInterceptorInstance> creationalContext) { BuilderInterceptorInstance interceptorInstance; if (this.interceptorMetadataFunction != null) { WeldCreationalContext<?> interceptorContext = getParentCreationalContext(creationalContext); Contextual<?> interceptedContextual = interceptorContext.getContextual(); if (interceptedContextual instanceof Bean<?>) { Bean<?> bean = (Bean<?>) interceptedContextual; interceptorInstance = new BuilderInterceptorInstance(bean, beanManager.getContextId()); return interceptorInstance; } else { throw BeanLogger.LOG.cannotCreateContextualInstanceOfBuilderInterceptor(this); } } else { interceptorInstance = new BuilderInterceptorInstance(); return interceptorInstance; } }
Source:
<code>public String getContentAsString() { <START> String content; <END> try { final InputStream contentStream = Samples.class.getResourceAsStream(filePath); content = StreamUtils.readToString(contentStream, StreamUtils.UTF_8); } catch (Throwable e) { e.printStackTrace(); throw new RuntimeException("Could not read file " + filePath + ": " + e.getMessage()); } return content; }</code><technical_language>please dont remove explicit initialization</technical_language>

Target:
public String getContentAsString() { String content = null; try { final InputStream contentStream = Samples.class.getResourceAsStream(filePath); content = StreamUtils.readToString(contentStream, StreamUtils.UTF_8); } catch (Throwable e) { e.printStackTrace(); throw new RuntimeException("Could not read file " + filePath + ": " + e.getMessage()); } return content; }
Source:
<code>public void handshakeTest() throws URISyntaxException, SSLException { try { assertTrue(primaryClient.handhshake()); logger.info("Handshake test completed."); } catch (InterruptedException e) { logger.error("Handshake interruption."); <START> assertTrue(false); <END> } }</code><technical_language>fail() throw test case fail</technical_language>

Target:
public void handshakeTest() throws URISyntaxException, SSLException, InterruptedException { assertTrue(primaryClient.handhshake()); logger.info("Handshake test completed."); }
Source:
<code>public void onCustomizedViewChange(List<CustomizedView> customizedViewList, NotificationContext changeContext) { <START> _routerUpdater.queueEvent(changeContext, ClusterEventType.CustomizedViewChange, <END> HelixConstants.ChangeType.CUSTOMIZED_VIEW); }</code><technical_language>Safer add source type check for other listeners</technical_language>

Target:
public void onCustomizedViewChange(List<CustomizedView> customizedViewList, NotificationContext changeContext) { if (_sourceDataTypeMap.containsKey(PropertyType.CUSTOMIZEDVIEW)) { _routerUpdater.queueEvent(changeContext, ClusterEventType.CustomizedViewChange, HelixConstants.ChangeType.CUSTOMIZED_VIEW); } else { logger.warn( "RoutingTableProvider does not use CurrentStates as source, ignore CurrentState changes!"); } }
Source:
<code>private static LogDelegateFactory loadClass(String className, ClassLoader classLoader) { try { Class<?> clz = classLoader.loadClass(className); return (LogDelegateFactory) clz.newInstance(); } catch (Exception e) { <START> throw new IllegalArgumentException("Error instantiating transformer class \"" + className + "\"", e); <END> } }</code><technical_language>_transformer_</technical_language>

Target:
private static LogDelegateFactory loadClass(String className, ClassLoader classLoader) { try { Class<?> clz = classLoader.loadClass(className); return (LogDelegateFactory) clz.newInstance(); } catch (Exception e) { throw new IllegalArgumentException("Error instantiating LogDelegateFactory implemention: \"" + className + "\"", e); } }
Source:
<code>public static boolean updateWrenchStatus() { EntityPlayer player = Minecraft.getMinecraft().thePlayer; Item equipped = player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null; if (equipped != null) { return (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IPipeWrench && ((IPipeWrench) equipped).canWrench(player, (int) player.posX, (int) player.posY, (int) player.posZ) && !player.isSneaking()); } <START> return false; <END> }</code><technical_language>This simplified return equipped != null && player.getHeldItem() != null && player.getHeldItem() instanceof IPipeWrench && ((IPipeWrench) equipped).canWrench(player, (int) player.posX, (int) player.posY, (int) player.posZ) && !player.isSneaking(); simplified java Item held = player.getHeldItem() return equipped != null && held != null && held instanceof IPipeWrench && ((IPipeWrench) equipped).canWrench(player, (int) player.posX, (int) player.posY, (int) player.posZ) && !player.isSneaking();</technical_language>

Target:
public static boolean updateWrenchStatus() { EntityPlayer player = Minecraft.getMinecraft().thePlayer; Item equipped = player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null; Item held = player.getHeldItem().getItem(); return equipped != null && held != null && held instanceof IPipeWrench && ((IPipeWrench) equipped).canWrench(player, (int) player.posX, (int) player.posY, (int) player.posZ) && !player.isSneaking(); }
Source:
<code>public Set<String> getSplitComment() { Set<String> splitComment = new HashSet<>(); <START> for (String part : ParseUtils.splitCommaDelimitedString(this.comment)) { <END> splitComment.add(part.replaceAll("\\s", "").toLowerCase()); } return splitComment; }</code><technical_language>Redundant 'this'</technical_language>

Target:
public Set<String> getSplitComment() { Set<String> splitComment = new HashSet<>(); for (String part : ParseUtils.splitCommaDelimitedString(comment)) { splitComment.add(part.replaceAll("\\s", "").toLowerCase()); } return splitComment; }
Source:
<code>public GroupDetail call() throws Exception { final AccountGroup.Id a = findGroup(groupName); final GroupMemberResult result = addGroupIncludeFactory.create(groupId, Collections.singleton(a)).call(); if (!result.getErrors().isEmpty()) { final GroupMemberResult.Error error = result.getErrors().get(0); <START> switch (error.getType()) { <END> case ADD_NOT_PERMITTED: throw new NoSuchEntityException(); default: throw new IllegalStateException(); } } return result.getGroup(); }</code><technical_language>Nit: 2 lines woulde nice one</technical_language>

Target:
public GroupDetail call() throws Exception { final AccountGroup.Id a = findGroup(groupName); final GroupMemberResult result = addGroupIncludeFactory.create(groupId, Collections.singleton(a)).call(); if (!result.getErrors().isEmpty()) { switch (result.getErrors().get(0).getType()) { case ADD_NOT_PERMITTED: throw new NoSuchEntityException(); default: throw new IllegalStateException(); } } return result.getGroup(); }
Source:
<code>protected void handleUpstream1(ChannelHandlerContext ctx, ChannelEvent evt) throws Exception { ChannelEventKind eventAsKind = asEventKind(evt); ChannelFuture handlerFuture = getHandlerFuture(); assert handlerFuture != null; if (handlerFuture.isDone() || !interestEvents.contains(eventAsKind)) { ctx.sendUpstream(evt); } else if (!expectedEvents.contains(eventAsKind)) { handleUnexpectedEvent(ctx, evt); } else { <START> ChannelFuture pipelineFuture = getPipelineFuture(); <END> super.handleUpstream1(ctx, evt); } }</code><technical_language>remove pipelineFuture local variable</technical_language>

Target:
protected void handleUpstream1(ChannelHandlerContext ctx, ChannelEvent evt) throws Exception { ChannelEventKind eventAsKind = asEventKind(evt); ChannelFuture handlerFuture = getHandlerFuture(); assert handlerFuture != null; if (handlerFuture.isDone() || !interestEvents.contains(eventAsKind)) { ctx.sendUpstream(evt); } else if (!expectedEvents.contains(eventAsKind)) { handleUnexpectedEvent(ctx, evt); } else { super.handleUpstream1(ctx, evt); } }
Source:
<code>public void initialize() { <START> move.initialize(); <END> initialAngle = imu.getYaw(); try { motionController.resetSafely(); } catch (final InvalidSensorException e) { move.cancel(); cancel(); if (fallbackCommand != null) { fallbackCommand.initialize(); } return; } }</code><technical_language>schedule()</technical_language>

Target:
public void initialize() { move.schedule(); initialAngle = imu.getYaw(); try { motionController.resetSafely(); } catch (final InvalidSensorException e) { move.cancel(); cancel(); if (fallbackCommand != null) { fallbackCommand.schedule(); } return; } }
Source:
<code>public void testXMLConfiguration() throws Exception { Set<String> shortcutsName = publisherService.getShortcutsName(); int size = shortcutsName.size(); <START> deployTestContrib(OSGI_BUNDLE_NAME, "management-tests-service.xml"); <END> deployTestContrib(OSGI_BUNDLE_NAME, "management-tests-contrib.xml"); applyInlineDeployments(); postSetUp(); publisherService.bindResources(); String qualifiedName = ObjectNameFactory.formatTypeQuery("service"); Set<ObjectName> registeredNames = doQuery(qualifiedName); assertNotNull(registeredNames); assertEquals(4, registeredNames.size()); shortcutsName = publisherService.getShortcutsName(); assertNotNull(shortcutsName); assertEquals(size + 4, shortcutsName.size()); assertTrue(shortcutsName.contains("dummy")); }</code><technical_language>postSetUp called applyInlineDeployments, especially postSetUp belongs super class</technical_language>

Target:
public void testXMLConfiguration() throws Exception { Set<String> shortcutsName = publisherService.getShortcutsName(); int size = shortcutsName.size(); pushInlineDeployments("org.nuxeo.runtime.test.tests:management-tests-service.xml", "org.nuxeo.runtime.test.tests:management-tests-contrib.xml"); publisherService.bindResources(); String qualifiedName = ObjectNameFactory.formatTypeQuery("service"); Set<ObjectName> registeredNames = doQuery(qualifiedName); assertNotNull(registeredNames); assertEquals(4, registeredNames.size()); shortcutsName = publisherService.getShortcutsName(); assertNotNull(shortcutsName); assertEquals(size + 4, shortcutsName.size()); assertTrue(shortcutsName.contains("dummy")); }
Source:
<code>public <T> T executeReadWriteTransaction(SessionWork<T> sessionWork, boolean readOnlyEntities) { Exception lastException = null; int dampingFactor = PASchedulerProperties.SCHEDULER_DB_TRANSACTION_DAMPING_FACTOR.getValueAsInt(); int delay = PASchedulerProperties.SCHEDULER_DB_TRANSACTION_SLEEP_DELAY.getValueAsInt(); int maximumNumberOfRetries = Math.max(PASchedulerProperties.SCHEDULER_DB_TRANSACTION_MAXIMUM_RETRIES.getValueAsInt(), 1); <START> <END> for (int i = 1; i <= maximumNumberOfRetries; i++) { try { return tryExecuteTransaction(sessionWork, true, readOnlyEntities); } catch (LockAcquisitionException exception) { lastException = exception; logger.warn( String.format( "Database operation failed. Automatic retry in %d ms (attempt %d)", delay, i), exception); new Sleeper(delay, logger).sleep(); delay *= dampingFactor; } catch (Throwable throwable) { logger.warn("Database operation failed", throwable); throw new DatabaseManagerException(throwable); } } logger.warn( "Maximum number of transaction retries exceeded, giving up. Last exception is: ", lastException); return null; }</code><technical_language>incoherence of maximum retries. I understand 1, if is equal 1 1 transaction run (i.e. retry). => contradiction</technical_language>

Target:
public <T> T executeReadWriteTransaction(SessionWork<T> sessionWork, boolean readOnlyEntities) { return tryExecuteTransactionLoop(sessionWork, true, readOnlyEntities); }
Source:
<code>protected Optional<ManagementClient> getOrchestrator(){ <START> return Optional.of(runtime.getLayoutView() <END> .getRuntimeLayout().getManagementClient(nodeForWorkflow)); }</code><technical_language>in this case attempt ping node</technical_language>

Target:
protected Optional<ManagementClient> getOrchestrator() { runtime.invalidateLayout(); Layout layout = new Layout(runtime.getLayoutView().getLayout()); BaseClient baseClient = runtime.getLayoutView().getRuntimeLayout(layout).getBaseClient(nodeForWorkflow); for (int i = 0; i < pingRetries; i++) { if (baseClient.pingSync()) { log.info("getOrchestrator: orchestrator selected {}", nodeForWorkflow); return Optional.of(runtime.getLayoutView() .getRuntimeLayout(layout).getManagementClient(nodeForWorkflow)); } Sleep.sleepUninterruptibly(pingInterval); log.info("Retrying to ping a current base server times.", i); } log.warn("getOrchestrator: a server is not responding to pings", nodeForWorkflow); return Optional.empty(); }
Source:
<code>private boolean isRunVmSucceeded() { RunVmParams runVmParams = getChildRunVmParameters(); return runVmParams == null || <START> getCommandCoordinatorUtil().getCommandEntity(runVmParams.getCommandId()).getReturnValue().getSucceeded(); <END> }</code><technical_language>is of instance this way</technical_language>

Target:
private boolean isRunVmSucceeded() { RunVmParams runVmParams = getChildRunVmParameters(); return runVmParams == null || commandCoordinatorUtil.getCommandEntity(runVmParams.getCommandId()).getReturnValue().getSucceeded(); }
Source:
<code>public void start() { SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(OpenSshConfig.Host hc, Session session) { } }); WindowCacheConfig cfg = new WindowCacheConfig(); cfg.fromConfig(serverConfig); <START> if (serverConfig.getString("core", null, "streamFileThreshold") == null) { <END> long limit = Math.min( Runtime.getRuntime().maxMemory() / 4, Integer.MAX_VALUE); log.info(String.format( "Defaulting core.streamFileThreshold to %d", limit)); cfg.setStreamFileThreshold((int) limit); } cfg.install(); }</code><technical_language>reading of WindowCacheConfig is default is 50MiB, 1/4 heap size. I missing</technical_language>

Target:
public void start() { SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(OpenSshConfig.Host hc, Session session) { } }); WindowCacheConfig cfg = new WindowCacheConfig(); cfg.fromConfig(serverConfig); if (serverConfig.getString("core", null, "streamFileThreshold") == null) { long mx = Runtime.getRuntime().maxMemory(); int limit = (int) Math.min( mx / 4, 2047 << 20); if ((5 << 20) < limit && limit % (1 << 20) != 0) { limit = ((limit / (1 << 20)) + 1) << 20; } String desc; if (limit % (1 << 20) == 0) { desc = String.format("%dm", limit / (1 << 20)); } else if (limit % (1 << 10) == 0) { desc = String.format("%dk", limit / (1 << 10)); } else { desc = String.format("%d", limit); } log.info(String.format( "Defaulting core.streamFileThreshold to %s", desc)); cfg.setStreamFileThreshold(limit); } cfg.install(); }
Source:
<code>public boolean onTouch(ImageView imageView, MotionEvent event, CoordinateInterface coordinateInterface) { if (event.getPointerId(0) == 0) { float currentX = event.getRawX(); float currentY = event.getRawY(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: setMode(Mode.TAP); previousX = currentX; previousY = currentY; startX = currentX; startY = currentY; break; case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: if (Math.abs(currentX - startX) < 10 && Math.abs(currentY - startY) < 10) { long delayTime = SystemClock.elapsedRealtime() - lastTimeMove; <START> switch (mode) { <END> case TAP: imageView.setX(event.getX() - (float) imageView.getWidth() / 2); imageView.setY(event.getY() - (float) imageView.getHeight() / 2); break; case MOVE: if (delayTime > 100) { imageView.setX(event.getX() - (float) imageView.getWidth() / 2); imageView.setY(event.getY() - (float) imageView.getHeight() / 2); } break; } } else { lastTimeMove = SystemClock.elapsedRealtime(); } break; case MotionEvent.ACTION_MOVE: setMode(Mode.MOVE); float dX = currentX - previousX; float dY = currentY - previousY; imageView.setX(imageView.getX() + dX); imageView.setY(imageView.getY() + dY); previousX = currentX; previousY = currentY; break; } coordinateInterface.setXCoordinate(imageView.getX()); coordinateInterface.setYCoordinate(-imageView.getY()); return true; } else { return false; } }</code><technical_language>Please simplify this switch remove code duplication</technical_language>

Target:
public boolean onTouch(ImageView imageView, MotionEvent event, CoordinateInterface coordinateInterface) { if (event.getPointerId(0) == 0) { float currentX = event.getRawX(); float currentY = event.getRawY(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: setMode(Mode.TAP); previousX = currentX; previousY = currentY; lastTimeMove = SystemClock.elapsedRealtime(); break; case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: if (mode == Mode.TAP) { imageView.setX(event.getX() - (float) imageView.getWidth() / 2); imageView.setY(event.getY() - (float) imageView.getHeight() / 2); } break; case MotionEvent.ACTION_MOVE: long delayTime = SystemClock.elapsedRealtime() - lastTimeMove; if (delayTime > 100) { setMode(Mode.MOVE); float dX = currentX - previousX; float dY = currentY - previousY; imageView.setX(imageView.getX() + dX); imageView.setY(imageView.getY() + dY); previousX = currentX; previousY = currentY; } break; } coordinateInterface.setXCoordinate(imageView.getX()); coordinateInterface.setYCoordinate(-imageView.getY()); return true; } else { return false; } }
Source:
<code>public String getPreferenceKey() { <START> return fId; <END> }</code><technical_language>This is basically a free-form key XML. If is chance another provider free-form keys, is safer append id a fixed key this provider, e.g. super.getPreferenceKey()</technical_language>

Target:
public String getPreferenceKey() { return fId + '.' + super.getPreferenceKey(); }
Source:
<code>private void deleteCleanupFiles(Model m) { List<String> cleanupPaths = new ArrayList<>(); NodeIterator it = m.listObjectsOfProperty(CdrDeposit.cleanupLocation); try { while (it.hasNext()) { RDFNode n = it.nextNode(); URI cleanupUri = URI.create(n.asLiteral().getString()); CleanupPolicy cleanupPolicy = stagingManager.getCleanupPolicy(cleanupUri); switch (cleanupPolicy) { <START> case DELETE_INGESTED_FILES: <END> case DELETE_INGESTED_FILES_EMPTY_FOLDERS: cleanupPaths.add(cleanupUri.getPath()); break; default: break; } } } finally { it.close(); } Collections.sort(cleanupPaths, Collections.reverseOrder()); for (String pathString : cleanupPaths) { File cleanupFile = new File(pathString); try { if (cleanupFile.exists()) { Files.delete(cleanupFile.toPath()); LOG.info("Deleted cleanup file: {}", cleanupFile.getAbsoluteFile()); } } catch (IOException e) { if (cleanupFile.isDirectory()) { LOG.warn("Failed to delete cleanup directory {}, it may not be empty", pathString); } else { LOG.error("Failed to delete cleanup file {}", pathString, e); } } } }</code><technical_language>Is this case simply intended fall DELETE_INGESTED_FILES_EMPTY_FOLDERS case</technical_language>

Target:
private void deleteCleanupFiles(Model m) { List<String> cleanupPaths = new ArrayList<>(); NodeIterator it = m.listObjectsOfProperty(CdrDeposit.cleanupLocation); try { while (it.hasNext()) { RDFNode n = it.nextNode(); URI cleanupUri = URI.create(n.asLiteral().getString()); CleanupPolicy cleanupPolicy = stagingPolicyManager.getCleanupPolicy(cleanupUri); if (cleanupPolicy.equals(DELETE_INGESTED_FILES) || cleanupPolicy.equals(DELETE_INGESTED_FILES_EMPTY_FOLDERS)) { cleanupPaths.add(cleanupUri.getPath()); } } } finally { it.close(); } Collections.sort(cleanupPaths, Collections.reverseOrder()); for (String pathString : cleanupPaths) { File cleanupFile = new File(pathString); try { Files.delete(cleanupFile.toPath()); LOG.info("Deleted cleanup file: {}", cleanupFile.getAbsoluteFile()); } catch (NoSuchFileException e) { LOG.info("Cleanup file does not exist, skipping", pathString); } catch (DirectoryNotEmptyException e) { LOG.warn("Cleanup directory not removed because it was not empty", pathString); } catch (IOException e) { LOG.error("Failed to delete cleanup file {}", pathString, e); } } }
Source:
<code>public List<Quota> getAllQuotaIncludingConsumption() { MapSqlParameterSource parameterSource = new MapSqlParameterSource(); List<Quota> allThinQuota = getCallsHandler().executeReadList("GetAllThinQuota", getQuotaMetaDataFromResultSet(), parameterSource); if (allThinQuota != null && !allThinQuota.isEmpty()){ Map<Guid, Quota> allQuotaMap = new HashMap<Guid, Quota>(); for (Quota quota : allThinQuota) { allQuotaMap.put(quota.getId(), quota); } List<QuotaStorage> quotaStorageList = getAllQuotaStorageIncludingConsumption(); <START> List<QuotaVdsGroup> quotaVdsGroupList = getALLQuotaVdsGroupIncludingConsumption(); <END> if (quotaStorageList != null) { for (QuotaStorage quotaStorage : quotaStorageList) { Quota quota = allQuotaMap.get(quotaStorage.getQuotaId()); if (quota != null) { if (quotaStorage.getStorageId() == null) { quota.setGlobalQuotaStorage(quotaStorage); } else { if (quota.getQuotaStorages() == null) { quota.setQuotaStorages(new ArrayList<QuotaStorage>()); } quota.getQuotaStorages().add(quotaStorage); } } } } if (quotaVdsGroupList != null) { for (QuotaVdsGroup quotaVdsGroup : quotaVdsGroupList) { Quota quota = allQuotaMap.get(quotaVdsGroup.getQuotaId()); if (quota != null) { if (quotaVdsGroup.getVdsGroupId() == null) { quota.setGlobalQuotaVdsGroup(quotaVdsGroup); } else { if (quota.getQuotaVdsGroups() == null) { quota.setQuotaVdsGroups(new ArrayList<QuotaVdsGroup>()); } quota.getQuotaVdsGroups().add(quotaVdsGroup); } } } } } return allThinQuota; }</code><technical_language>ALL/all; consistency (I prefer :))</technical_language>

Target:
public List<Quota> getAllQuotaIncludingConsumption() { MapSqlParameterSource parameterSource = new MapSqlParameterSource(); List<Quota> allThinQuota = getCallsHandler().executeReadList("get_all_thin_quota", getQuotaMetaDataFromResultSet(), parameterSource); if (allThinQuota != null && !allThinQuota.isEmpty()){ Map<Guid, Quota> allQuotaMap = new HashMap<Guid, Quota>(); for (Quota quota : allThinQuota) { allQuotaMap.put(quota.getId(), quota); } List<QuotaStorage> quotaStorageList = getAllQuotaStorageIncludingConsumption(); List<QuotaVdsGroup> quotaVdsGroupList = getAllQuotaVdsGroupIncludingConsumption(); if (quotaStorageList != null) { for (QuotaStorage quotaStorage : quotaStorageList) { Quota quota = allQuotaMap.get(quotaStorage.getQuotaId()); if (quota != null) { if (quotaStorage.getStorageId() == null) { quota.setGlobalQuotaStorage(quotaStorage); } else { if (quota.getQuotaStorages() == null) { quota.setQuotaStorages(new ArrayList<QuotaStorage>()); } quota.getQuotaStorages().add(quotaStorage); } } } } if (quotaVdsGroupList != null) { for (QuotaVdsGroup quotaVdsGroup : quotaVdsGroupList) { Quota quota = allQuotaMap.get(quotaVdsGroup.getQuotaId()); if (quota != null) { if (quotaVdsGroup.getVdsGroupId() == null) { quota.setGlobalQuotaVdsGroup(quotaVdsGroup); } else { if (quota.getQuotaVdsGroups() == null) { quota.setQuotaVdsGroups(new ArrayList<QuotaVdsGroup>()); } quota.getQuotaVdsGroups().add(quotaVdsGroup); } } } } } return allThinQuota; }
Source:
<code>private void openInNewTab(PageTitle title, HistoryEntry entry, int position) { Tab tab = new Tab(); tabList.add(position, tab); tab.getBackStack().add(new PageBackStackItem(title, entry)); <START> if (position == tabList.size() - 1) { <END> pageLoadStrategy.setBackStack(tabList.get(position).getBackStack()); } tabsProvider.showAndHideTabs(); }</code><technical_language>Another bug, thanks. this getBackgroundTabPosition() (which ensure nonnegative)</technical_language>

Target:
private void openInNewTab(PageTitle title, HistoryEntry entry, int position) { Tab tab = new Tab(); if (position == getForegroundTabPosition()) { pageLoadStrategy.setBackStack(tab.getBackStack()); } tabList.add(position, tab); tab.getBackStack().add(new PageBackStackItem(title, entry)); tabsProvider.showAndHideTabs(); }
Source:
<code>void attach(Action action) { if (actions == null) { if (action == null) { this.action = action; return; } actions = new ArrayList<Action>(3); <START> actions.add(action); <END> } }</code><technical_language>if</technical_language>

Target:
void attach(Action action) { if (this.action == null) { this.action = action; return; } if (actions == null) { actions = new ArrayList<Action>(3); } actions.add(action); }
Source:
<code>public CryptographyAsyncClient buildAsyncClient() { Configuration buildConfiguration = (configuration == null) ? ConfigurationManager.getConfiguration().clone() : configuration; if (jsonWebKey == null && Strings.isNullOrEmpty(keyId)) { throw logger.logExceptionAsError(new IllegalStateException("Json Web Key or jsonWebKey identifier are " + "required to create cryptography client")); } if (pipeline != null) { if (jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } } if (credential == null) { <START> throw logger.logExceptionAsError(new IllegalStateException("Key Vault credentials " + "are required to " <END> + "build the Cryptography async client")); } final List<HttpPipelinePolicy> policies = new ArrayList<>(); policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogDetailLevel)); HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); if (jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } }</code><technical_language>This is a weird string concatonation</technical_language>

Target:
public CryptographyAsyncClient buildAsyncClient() { Configuration buildConfiguration = (configuration == null) ? ConfigurationManager.getConfiguration().clone() : configuration; if (jsonWebKey == null && Strings.isNullOrEmpty(keyId)) { throw logger.logExceptionAsError(new IllegalStateException( "Json Web Key or jsonWebKey identifier are required to create cryptography client")); } if (pipeline != null) { if (jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } } if (credential == null) { throw logger.logExceptionAsError(new IllegalStateException( "Key Vault credentials are required to build the Cryptography async client")); } final List<HttpPipelinePolicy> policies = new ArrayList<>(); policies.add(new UserAgentPolicy(AzureKeyVaultConfiguration.SDK_NAME, AzureKeyVaultConfiguration.SDK_VERSION, buildConfiguration)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new KeyVaultCredentialPolicy(credential)); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogDetailLevel)); HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); if (jsonWebKey != null) { return new CryptographyAsyncClient(jsonWebKey, pipeline); } else { return new CryptographyAsyncClient(keyId, pipeline); } }
Source:
<code>private void fireInvitationEvent(WorkgroupInvitation invitation) { <START> for (Iterator<WorkgroupInvitationListener> i = invitationListeners.iterator(); i.hasNext();) { <END> WorkgroupInvitationListener listener = i.next(); listener.invitationReceived(invitation); } }</code><technical_language>for-each loops time iterate listeners</technical_language>

Target:
private void fireInvitationEvent(WorkgroupInvitation invitation) { for (WorkgroupInvitationListener listener : invitationListeners ){ listener.invitationReceived(invitation); } }
Source:
<code>public void runTest() { boolean hasRX = false; for (final String argument : this.getArgs()) { if (argument.startsWith(getTagName())) { hasRX = true; break; } <START> } <END> if (!hasRX) addArg(getTagName() + "=" + getTagValue()); super.runTest(); }</code><technical_language>is a problem adding twice</technical_language>

Target:
public void runTest() { boolean hasRX = false; for (final String argument : this.getArgs()) { if (argument.startsWith(getArgumentName())) { hasRX = true; break; } } if (!hasRX) addArg(getArgumentName() + "=" + getTagValue()); super.runTest(); }
Source:
<code>private static String getPatientId(RegistryPackageType registryPackage) { for (int y = 0; y < registryPackage.getExternalIdentifier().size(); y++) { String test = registryPackage.getExternalIdentifier().get(y).getName().getLocalizedString().get(0) .getValue(); <START> if ("XDSSubmissionSet.patientId".equals(test)) { <END> return registryPackage.getExternalIdentifier().get(y).getValue(); } } return null; }</code><technical_language>move this constant variable</technical_language>

Target:
private static String getPatientId(RegistryPackageType registryPackage) { for (int y = 0; y < registryPackage.getExternalIdentifier().size(); y++) { String test = registryPackage.getExternalIdentifier().get(y).getName().getLocalizedString().get(0) .getValue(); if (XDS_PATIENT_ID.equals(test)) { return registryPackage.getExternalIdentifier().get(y).getValue(); } } return null; }
Source:
<code>protected void executeCommand() { T params = getParameters(); <START> String sessionId = params.getSessionId(); <END> if (SessionDataContainer.getInstance().isSessionExists(sessionId)) { SessionDataContainer.getInstance().setSoftLimitInterval(sessionId, params.getSoftLimit()); setSucceeded(true); } else { setSucceeded(false); } }</code><technical_language>getParameers().getSessionId() real reason for temp var. critical</technical_language>

Target:
protected void executeCommand() { if (SessionDataContainer.getInstance().isSessionExists(getParameters().getSessionId())) { SessionDataContainer.getInstance().setSoftLimitInterval(getParameters().getSessionId(), getParameters().getSoftLimit()); setSucceeded(true); } else { setSucceeded(false); } }
Source:
<code>public void cleanIndex(boolean force) throws IOException, SQLException, SearchServiceException { if (force) { try { getSolr().deleteByQuery( <START> "search.resourcetype:[" + Constants.ITEM + " TO " + Constants.CLAIMEDTASK + "]"); <END> } catch (Exception e) { throw new SearchServiceException(e.getMessage(), e); } } else { cleanIndex(false, Constants.ITEM); cleanIndex(false, Constants.COLLECTION); cleanIndex(false, Constants.COMMUNITY); cleanIndex(false, Constants.WORKSPACEITEM); cleanIndex(false, Constants.POOLTASK); cleanIndex(false, Constants.CLAIMEDTASK); cleanIndex(false, Constants.WORKFLOWITEM); } }</code><technical_language>deleting entries in this entire **range** is safe/correct? I notice previously, this code cleaned Item, Collection Community (range "2 4"). Now, cleaning "2 11", includes Site, Group, EPerson (seemingly accident). Does, this need updated clean "2 4" (like original code) **and** "8 11" (new objects)</technical_language>

Target:
public void cleanIndex(boolean force) throws IOException, SQLException, SearchServiceException { if (force) { try { getSolr().deleteByQuery( "search.resourcetype:[" + Constants.ITEM + " TO " + Constants.COMMUNITY + "]" + " AND " + "search.resourcetype:[" + Constants.WORKSPACEITEM + " TO " + Constants.CLAIMEDTASK + "]"); } catch (Exception e) { throw new SearchServiceException(e.getMessage(), e); } } else { cleanIndex(false, Constants.ITEM); cleanIndex(false, Constants.COLLECTION); cleanIndex(false, Constants.COMMUNITY); cleanIndex(false, Constants.WORKSPACEITEM); cleanIndex(false, Constants.POOLTASK); cleanIndex(false, Constants.CLAIMEDTASK); cleanIndex(false, Constants.WORKFLOWITEM); } }