auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testExecute_notInRecycleBin_shouldPass() throws Exception { InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); String instructorId = instructor1OfCourse1.googleId; String courseId = instructor1OfCourse1.courseId; ______TS("Error case, delete a course not in Recycle Bin"); String[] submissionParams = new String[] { Const.ParamsNames.INSTRUCTOR_ID, instructorId, Const.ParamsNames.COURSE_ID, courseId, }; loginAsInstructor(instructorId); DeleteCourseAction action = getAction(submissionParams); <START> action.checkSpecificAccessControl(); <END> JsonResult result = getJsonResult(action); MessageOutput message = (MessageOutput) result.getOutput(); assertEquals(HttpStatus.SC_OK, result.getStatusCode()); assertEquals("The course " + courseId + " has been permanently deleted.", message.getMessage()); }</code><technical_language>call this method in testExecute() test case</technical_language>

Target:
public void testExecute_notInRecycleBin_shouldPass() throws Exception { InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); String instructorId = instructor1OfCourse1.googleId; String courseId = instructor1OfCourse1.courseId; ______TS("delete a course not in Recycle Bin"); String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, courseId, }; CourseAttributes courseToBeDeleted = logic.getCourse(instructor1OfCourse1.courseId); assertNull(courseToBeDeleted.deletedAt); loginAsInstructor(instructorId); DeleteCourseAction deleteCourseAction = getAction(submissionParams); JsonResult result = getJsonResult(deleteCourseAction); MessageOutput messageOutput = (MessageOutput) result.getOutput(); assertEquals(HttpStatus.SC_OK, result.getStatusCode()); assertEquals("OK", messageOutput.getMessage()); assertNull(logic.getCourse(instructor1OfCourse1.courseId)); }
Source:
<code>private boolean isTypeGuvnorEnum() { return conditionColumn != null && conditionColumn.getValueList() != null && <START> conditionColumn.getValueList().split(",").length > 1; <END> }</code><technical_language>handle case single enum is specified? java private boolean isTypeGuvnorEnum() { if (conditionColumn != null && conditionColumn.getValueList() != null) { if (conditionColumn.getValueList().split(",").length > 1) { return true; } else { return conditionColumn.getValueList().trim().length() > 0; } } else { return false; } }</technical_language>

Target:
private boolean isTypeGuvnorEnum() { return conditionColumn != null && conditionColumn.getValueList() != null && !conditionColumn.getValueList().trim().isEmpty(); }
Source:
<code>abstract void prepare() throws IOException; <START> <END> abstract boolean ready(); abstract long read() throws IOException; abstract boolean write() throws IOException; public abstract void close() throws IOException; String getConnectionId() { return connectionId; }</code><technical_language>need good docs</technical_language>

Target:
public abstract void prepare() throws IOException; public abstract boolean ready(); public abstract boolean read() throws IOException; public abstract boolean write() throws IOException; public boolean isReadComplete(){ if(networkReceive!= null){ return networkReceive.getReceivedBytes().isReadComplete(); } return false; }
Source:
<code>public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { String sql; sql = "SELECT NULL AS FUNCTION_CAT, n.nspname AS FUNCTION_SCHEM, p.proname AS FUNCTION_NAME, " + "d.description AS REMARKS, " <START> + DatabaseMetaData.procedureReturnsResult + " AS FUNCTION_TYPE, " <END> + " p.proname || '_' || p.oid AS SPECIFIC_NAME " + " FROM pg_catalog.pg_namespace n, pg_catalog.pg_proc p " + " LEFT JOIN pg_catalog.pg_description d ON (p.oid=d.objoid) " + " LEFT JOIN pg_catalog.pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc') " + " LEFT JOIN pg_catalog.pg_namespace pn ON (c.relnamespace=pn.oid AND pn.nspname='pg_catalog') " + " WHERE p.pronamespace=n.oid "; if (schemaPattern != null && !schemaPattern.isEmpty()) { sql += " AND n.nspname LIKE " + escapeQuotes(schemaPattern); } if (functionNamePattern != null && !functionNamePattern.isEmpty()) { sql += " AND p.proname LIKE " + escapeQuotes(functionNamePattern); } sql += " ORDER BY FUNCTION_SCHEM, FUNCTION_NAME, p.oid::text "; return createMetaDataStatement().executeQuery(sql); }</code><technical_language>FUNCTION_TYPE correct DatabaseMetaData.functionResultUnknown</technical_language>

Target:
public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { boolean pgFuncResultExists = connection.haveMinimumServerVersion(ServerVersion.v8_4); String funcTypeSql = DatabaseMetaData.functionResultUnknown + " "; if (pgFuncResultExists) { funcTypeSql = " CASE " + " WHEN (format_type(p.prorettype, null) = 'unknown') THEN " + DatabaseMetaData.functionResultUnknown + " WHEN " + " (substring(pg_get_function_result(p.oid) from 0 for 6) = 'TABLE') OR " + " (substring(pg_get_function_result(p.oid) from 0 for 6) = 'SETOF') THEN " + DatabaseMetaData.functionReturnsTable + " ELSE " + DatabaseMetaData.functionNoTable + " END "; } String sql; sql = "SELECT current_database() AS FUNCTION_CAT, n.nspname AS FUNCTION_SCHEM, p.proname AS FUNCTION_NAME, " + " d.description AS REMARKS, " + funcTypeSql + " AS FUNCTION_TYPE, " + " p.proname || '_' || p.oid AS SPECIFIC_NAME " + "FROM pg_catalog.pg_proc p " + "INNER JOIN pg_catalog.pg_namespace n ON p.pronamespace=n.oid " + "LEFT JOIN pg_catalog.pg_description d ON p.oid=d.objoid " + "WHERE pg_function_is_visible(p.oid) "; if (schemaPattern != null && !schemaPattern.isEmpty()) { sql += " AND n.nspname LIKE " + escapeQuotes(schemaPattern); } if (functionNamePattern != null && !functionNamePattern.isEmpty()) { sql += " AND p.proname LIKE " + escapeQuotes(functionNamePattern); } sql += " ORDER BY FUNCTION_SCHEM, FUNCTION_NAME, p.oid::text "; return createMetaDataStatement().executeQuery(sql); }
Source:
<code>private static boolean isArrayAggregateApplicable( GroupByQueryConfig config, GroupByQuery query, GroupByColumnSelectorPlus[] dims, StorageAdapter storageAdapter, ByteBuffer buffer ) { <START> if (!config.isForceHashAggregation()) { <END> final ColumnCapabilities columnCapabilities; final int cardinality; if (dims.length == 0) { columnCapabilities = null; cardinality = 1; } else if (dims.length == 1) { columnCapabilities = storageAdapter.getColumnCapabilities(dims[0].getName()); cardinality = storageAdapter.getDimensionCardinality(dims[0].getName()); } else { columnCapabilities = null; cardinality = -1; } if ((columnCapabilities == null || columnCapabilities.getType().equals(ValueType.STRING)) && cardinality > 0) { final AggregatorFactory[] aggregatorFactories = query .getAggregatorSpecs() .toArray(new AggregatorFactory[query.getAggregatorSpecs().size()]); final int requiredBufferCapacity = BufferArrayGrouper.requiredBufferCapacity( cardinality, aggregatorFactories ); if (requiredBufferCapacity <= buffer.capacity()) { return true; } } } return false; }</code><technical_language>Suggested invert: if (config.isForceHashAggregation()) { return false; } reduce level of nesting in rest of method</technical_language>

Target:
private static boolean isArrayAggregateApplicable( GroupByQueryConfig config, GroupByQuery query, GroupByColumnSelectorPlus[] dims, StorageAdapter storageAdapter, ByteBuffer buffer ) { if (config.isForceHashAggregation()) { return false; } final ColumnCapabilities columnCapabilities; final int cardinality; if (dims.length == 0) { columnCapabilities = null; cardinality = 1; } else if (dims.length == 1) { columnCapabilities = storageAdapter.getColumnCapabilities(dims[0].getName()); cardinality = storageAdapter.getDimensionCardinality(dims[0].getName()); } else { columnCapabilities = null; cardinality = -1; } if ((columnCapabilities == null || columnCapabilities.getType().equals(ValueType.STRING)) && cardinality > 0) { final AggregatorFactory[] aggregatorFactories = query .getAggregatorSpecs() .toArray(new AggregatorFactory[query.getAggregatorSpecs().size()]); final int requiredBufferCapacity = BufferArrayGrouper.requiredBufferCapacity( cardinality, aggregatorFactories ); if (requiredBufferCapacity <= buffer.capacity()) { return true; } } return false; }
Source:
<code>public boolean bridge$affectsSpawning() { <START> return this.affectsSpawning && !this.isSpectator() && !this.bridge$isVanished(); <END> }</code><technical_language>[If a player is targetable becuase VANISH_PREVENTS_TARGETING is false](<LINK_0>, spawning unaffected</technical_language>

Target:
public boolean bridge$affectsSpawning() { return this.affectsSpawning && !this.isSpectator() && !this.bridge$isUntargetable(); }
Source:
<code>private void onPhysicalRadioButtonChange(Object sender) { <START> if (sender == getPhysicalNetworkDatacenterRB()) { <END> getNeutronPhysicalNetwork().setIsChangeable(false); getDatacenterPhysicalNetwork().setIsChangeable(true); getPhysicalNetworkDatacenter().setEntity(true); } else if (sender == getPhysicalNetworkCustomRB()) { getNeutronPhysicalNetwork().setIsChangeable(true); getDatacenterPhysicalNetwork().setIsChangeable(false); getPhysicalNetworkDatacenter().setEntity(false); } else if (sender == getPhysicalNetworkDatacenter()) { boolean datacenter = getPhysicalNetworkDatacenter().getEntity(); getPhysicalNetworkCustomRB().setEntity(!datacenter, false); getPhysicalNetworkDatacenterRB().setEntity(datacenter, false); } }</code><technical_language>fire event is changed true</technical_language>

Target:
private void onPhysicalRadioButtonChange(Object sender) { boolean datacenter = true; if (sender == getUsePhysicalNetworkFromDatacenter()) { getCustomPhysicalNetwork().setIsChangeable(false); getDatacenterPhysicalNetwork().setIsChangeable(true); datacenter = true; } else if (sender == getUsePhysicalNetworkFromCustom()) { getCustomPhysicalNetwork().setIsChangeable(true); getDatacenterPhysicalNetwork().setIsChangeable(false); datacenter = false; } getUsePhysicalNetworkFromCustom().setEntity(!datacenter, false); getUsePhysicalNetworkFromDatacenter().setEntity(datacenter, false); }
Source:
<code>public ThemeInfo getTheme() { ThemeInfo theme = this.theme; if (theme == null) { synchronized (this) { <START> if (this.theme == null) { <END> theme = loadTheme(); this.theme = theme; } } } if (theme == ThemeInfo.INHERIT) { ProjectState parent = Iterables.getFirst(parents(), null); return parent != null ? parent.getTheme() : null; } return theme; }</code><technical_language>Bad double checked locking idiom. ThemeInfo theme = this.theme; if (theme == null) { synchronized (this) { theme = this.theme; // this is missed if (theme == null) { theme = loadTheme(); this.theme = theme; } } }</technical_language>

Target:
public ThemeInfo getTheme() { ThemeInfo theme = this.theme; if (theme == null) { synchronized (this) { theme = this.theme; if (theme == null) { theme = loadTheme(); this.theme = theme; } } } if (theme == ThemeInfo.INHERIT) { ProjectState parent = Iterables.getFirst(parents(), null); return parent != null ? parent.getTheme() : null; } return theme; }
Source:
<code>private Map<Integer, Map<Integer, File>> sortCbcls(List<File> cbcls) { Map<Integer, Map<Integer, File>> sortedMap = new TreeMap<>(); <START> Pattern pattern = Pattern.compile("^.+C(\\d{1,4}).+L(\\d{1,3})_(\\d).cbcl$"); <END> for (File cbcl : cbcls) { Matcher matcher = pattern.matcher(cbcl.getAbsolutePath()); if (!matcher.matches()) { throw new PicardException("CBCL File " + cbcl.getAbsolutePath() + " does not match expected pattern."); } Integer surface = Integer.valueOf(matcher.group(3)); Integer cycle = Integer.valueOf(matcher.group(1)); if (sortedMap.containsKey(surface)) { sortedMap.get(surface).put(cycle, cbcl); } else { Map<Integer, File> cycleMap = new HashMap<>(); cycleMap.put(cycle, cbcl); sortedMap.put(surface, cycleMap); } } return sortedMap; }</code><technical_language>result of Pattern.compile() is thread safe stored in a static final field avoid more once</technical_language>

Target:
private Map<Integer, Map<Integer, File>> sortCbcls(List<File> cbcls) { Map<Integer, Map<Integer, File>> sortedMap = new TreeMap<>(); for (File cbcl : cbcls) { Matcher matcher = PATTERN.matcher(cbcl.getAbsolutePath()); if (!matcher.matches()) { throw new PicardException("CBCL File " + cbcl.getAbsolutePath() + " does not match expected pattern."); } Integer surface = Integer.valueOf(matcher.group(3)); Integer cycle = Integer.valueOf(matcher.group(1)); if (sortedMap.containsKey(surface)) { sortedMap.get(surface).put(cycle, cbcl); } else { Map<Integer, File> cycleMap = new HashMap<>(); cycleMap.put(cycle, cbcl); sortedMap.put(surface, cycleMap); } } return sortedMap; }
Source:
<code>long value(long time) { long sum = 0L; long lastTime = time; long minTime = lastTime - windowTimeSize; int pos = nextPos - 1; boolean firstRound = true; <START> while (firstRound || pos != nextPos - 1) { <END> if (pos < 0) { pos = windowDataSize - 1; } if (data[pos].nanoTime < minTime) { sum += (lastTime - minTime) * data[pos].value; break; } sum += (lastTime - data[pos].nanoTime) * data[pos].value; lastTime = data[pos].nanoTime; firstRound = false; pos--; } if (!firstRound && pos == nextPos - 1) { sum += (lastTime - minTime) * data[nextPos].value; } return Math.round((double)sum / (double)windowTimeSize); }</code><technical_language>change this a do-while loop instead of firstRound</technical_language>

Target:
long value(long time) { long sum = 0L; long lastTime = time; long minTime = lastTime - windowTimeSize; int pos = nextPos - 1; do { if (pos < 0) { pos = windowDataSize - 1; } if (data[pos].nanoTime < minTime) { sum += (lastTime - minTime) * data[pos].value; break; } sum += (lastTime - data[pos].nanoTime) * data[pos].value; lastTime = data[pos].nanoTime; pos--; } while (pos != nextPos - 1); if (pos == nextPos - 1 && data[nextPos].nanoTime > minTime) { sum += (lastTime - minTime) * data[nextPos].value; } return Math.round((double)sum / (double)windowTimeSize); }
Source:
<code>protected boolean isValidConnection(StorageServerConnections conn) { StorageType storageType = conn.getStorageType(); if (storageType == StorageType.NFS && !new NfsMountPointConstraint().isValid(conn.getConnection(), null)) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_INVALID); } if (storageType == StorageType.POSIXFS && StringUtils.isEmpty(conn.getVfsType())) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_VFSTYPE); } if ((storageType == StorageType.POSIXFS || storageType == StorageType.NFS) && !validate(validateMountOptions())) { return false; } if (storageType == StorageType.ISCSI) { if (StringUtils.isEmpty(conn.getIqn())) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_IQN); } if (!isValidStorageConnectionPort(conn.getPort())) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_INVALID_PORT); } } if (storageType == StorageType.GLUSTERFS) { StorageConnectionValidator validator = new StorageConnectionValidator(conn); if <START> (!validate(updatePathFromGlusterVolume(conn)) && <END> !validate(validator.canVDSConnectToGlusterfs(getVds()))) { return false; } } if (checkIsConnectionFieldEmpty(conn)) { return false; } return true; }</code><technical_language>This function is validating. Validation in next function. SO, I need call validate()</technical_language>

Target:
protected boolean isValidConnection(StorageServerConnections conn) { StorageType storageType = conn.getStorageType(); if (storageType == StorageType.NFS && !new NfsMountPointConstraint().isValid(conn.getConnection(), null)) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_INVALID); } if (storageType == StorageType.POSIXFS && StringUtils.isEmpty(conn.getVfsType())) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_VFSTYPE); } if ((storageType == StorageType.POSIXFS || storageType == StorageType.NFS) && !validate(validateMountOptions())) { return false; } if (storageType == StorageType.ISCSI) { if (StringUtils.isEmpty(conn.getIqn())) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_EMPTY_IQN); } if (!isValidStorageConnectionPort(conn.getPort())) { return failValidation(EngineMessage.VALIDATION_STORAGE_CONNECTION_INVALID_PORT); } } if (storageType == StorageType.GLUSTERFS) { StorageConnectionValidator validator = new StorageConnectionValidator(conn); if (!validate(validateVolumeIdAndupdatePath(conn)) && !validate(validator.canVDSConnectToGlusterfs(getVds()))) { return false; } } if (checkIsConnectionFieldEmpty(conn)) { return false; } return true; }
Source:
<code>public ServiceInfo(@JsonProperty("name") String name, @JsonProperty("id") String id, @JsonProperty("contactEmail") String contactEmail, @JsonProperty("route") String route, @JsonProperty("extraConfigs") List<String> extraConfigs, @JsonProperty("healthCheck") String healthCheck, @JsonProperty("lbs") List<String> lbs, @JsonProperty("rewriteAppRootTo") String rewriteAppRootTo) { this.name = name; this.id = id; this.contactEmail = contactEmail; this.route = route; this.extraConfigs = Objects.firstNonNull(extraConfigs, Collections.<String>emptyList()); this.healthCheck = healthCheck; this.lbs = lbs; if (rewriteAppRootTo != null) { <START> if (route.substring(route.length() - 1) == "/" && rewriteAppRootTo.substring(rewriteAppRootTo.length() - 1) != "/") { <END> LOG.error(String.format("Provided appRoot %s is absolute, and rewriteAppRootTo %s is not. This will result in a rewrite of %sresource to %sresource", route, rewriteAppRootTo, route, rewriteAppRootTo)); } else if (route.substring(route.length() - 1) != "/" && rewriteAppRootTo.substring(rewriteAppRootTo.length() - 1) == "/") { LOG.error(String.format("Provided appRoot %s is not absolute, and rewriteAppRootTo %s is. This will result in a rewrite of %sresource to %s resource", route, rewriteAppRootTo, route, rewriteAppRootTo)); } else { this.rewriteAppRootTo = rewriteAppRootTo; } } }</code><technical_language>i refactor x.substring(x.length() - 1) == "/' isAbsoluteUrl() method somewhere, if guava apache commons</technical_language>

Target:
public ServiceInfo(@JsonProperty("name") String name, @JsonProperty("id") String id, @JsonProperty("contactEmail") String contactEmail, @JsonProperty("route") String route, @JsonProperty("extraConfigs") List<String> extraConfigs, @JsonProperty("healthCheck") String healthCheck, @JsonProperty("lbs") List<String> lbs, @JsonProperty("rewriteAppRootTo") String rewriteAppRootTo) { this.name = name; this.id = id; this.contactEmail = contactEmail; this.route = route; this.extraConfigs = Objects.firstNonNull(extraConfigs, Collections.<String>emptyList()); this.healthCheck = healthCheck; this.lbs = lbs; if (rewriteAppRootTo != null) { if (isAbsoluteURI(route) && ! isAbsoluteURI(rewriteAppRootTo)) { LOG.error(String.format("Provided appRoot %s is absolute, and rewriteAppRootTo %s is not. This will result in a rewrite of %sresource to %sresource", route, rewriteAppRootTo, route, rewriteAppRootTo)); } else if (! isAbsoluteURI(route) && isAbsoluteURI(rewriteAppRootTo)) { LOG.error(String.format("Provided appRoot %s is not absolute, and rewriteAppRootTo %s is. This will result in a rewrite of %sresource to %s resource", route, rewriteAppRootTo, route, rewriteAppRootTo)); } else { this.rewriteAppRootTo = rewriteAppRootTo; } } }
Source:
<code>protected void handleMessage(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessage responseMessage, final OsgpException osgpException) { if (responseMessage.getDataObject() instanceof ArrayList) { final List<FirmwareVersionDto> firmwareVersionList = (List<FirmwareVersionDto>) responseMessage .getDataObject(); this.configurationService.handleGetFirmwareVersionResponse(deviceMessageMetadata, responseMessage.getResult(), osgpException, firmwareVersionList); <START> } <END> }</code><technical_language>throw exception is ArrayList, fail silently hasRegularResponseObject called first</technical_language>

Target:
protected void handleMessage(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessage responseMessage, final OsgpException osgpException) throws FunctionalException { if (responseMessage.getDataObject() instanceof ArrayList) { final List<FirmwareVersionDto> firmwareVersionList = (List<FirmwareVersionDto>) responseMessage .getDataObject(); this.configurationService.handleGetFirmwareVersionResponse(deviceMessageMetadata, responseMessage.getResult(), osgpException, firmwareVersionList); } else { throw new FunctionalException(FunctionalExceptionType.VALIDATION_ERROR, ComponentType.DOMAIN_SMART_METERING, new OsgpException(ComponentType.DOMAIN_SMART_METERING, "DataObject for response message should be of type ArrayList")); } }
Source:
<code>private boolean roughlyEveryTenthTime() { <START> return currentTimeMillis() % 10 == 0; <END> }</code><technical_language>threadlocal random</technical_language>

Target:
private boolean roughlyEveryTenthTime() { return rnd.nextInt(10) == 0; }
Source:
<code>private void showSpeedDialIfAnyChecked() { if (checkedIds.size() > 0) { <START> mSpeedDialView.show(); <END> } else { mSpeedDialView.hide(); } }</code><technical_language>I show() called if is shown. function some strange reflection stuff internally, a performance problem. <LINK_0></technical_language>

Target:
private void showSpeedDialIfAnyChecked() { if (checkedIds.size() > 0) { if (!mSpeedDialView.isShown()) { mSpeedDialView.show(); } } else { mSpeedDialView.hide(); } }
Source:
<code>protected void executeCommand() { <START> ScanDiskAlignmentVDSCommandParameters parameters; <END> final VM vm = getVms().get(0); final Guid storagePoolId = vm.getStoragePoolId(); acquireDiskLocks(); if (getDiskType() == DiskStorageType.IMAGE) { DiskImage diskImage = (DiskImage) getDisk(); ScanDiskImageAlignmentVDSCommandParameters imageParameters = new ScanDiskImageAlignmentVDSCommandParameters( getVdsInPool(storagePoolId), vm.getId()); imageParameters.setPoolId(storagePoolId); imageParameters.setDomainId(diskImage.getStorageIds().get(0)); imageParameters.setImageGroupId(diskImage.getimage_group_id()); imageParameters.setImageId(diskImage.getImageId()); parameters = imageParameters; } else if (getDiskType() == DiskStorageType.LUN) { LunDisk lunDisk = (LunDisk) getDisk(); ScanDiskLunAlignmentVDSCommandParameters lunParameters = new ScanDiskLunAlignmentVDSCommandParameters( getVdsInPool(storagePoolId), vm.getId()); lunParameters.setLunGuid(lunDisk.getLun().getLUN_id()); parameters = lunParameters; } else { throw new RuntimeException("Unknown DiskStorageType " + getDiskType().toString()); } Boolean isDiskAligned = (Boolean) getBackend().getResourceManager() .RunVdsCommand(VDSCommandType.ScanDiskAlignment, parameters).getReturnValue(); getDisk().setAlignment(isDiskAligned ? DiskAlignment.Aligned : DiskAlignment.Misaligned); getDisk().setLastAlignmentScan(new Date()); getBaseDiskDao().update(getDisk()); setSucceeded(true); releaseDiskLocks(); }</code><technical_language>is this here</technical_language>

Target:
protected void executeCommand() { ScanDiskAlignmentVDSCommandParameters parameters; acquireDiskLocks(); if (getDiskType() == DiskStorageType.IMAGE) { DiskImage diskImage = (DiskImage) getDisk(); ScanDiskImageAlignmentVDSCommandParameters imageParameters = new ScanDiskImageAlignmentVDSCommandParameters(getVdsIdInPool(), getVm().getId()); imageParameters.setPoolId(getStoragePoolId()); imageParameters.setDomainId(diskImage.getStorageIds().get(0)); imageParameters.setImageGroupId(diskImage.getimage_group_id()); imageParameters.setImageId(diskImage.getImageId()); parameters = imageParameters; } else if (getDiskType() == DiskStorageType.LUN) { LunDisk lunDisk = (LunDisk) getDisk(); ScanDiskLunAlignmentVDSCommandParameters lunParameters = new ScanDiskLunAlignmentVDSCommandParameters(getVdsIdInPool(), getVm().getId()); lunParameters.setLunGuid(lunDisk.getLun().getLUN_id()); parameters = lunParameters; } else { throw new RuntimeException("Unknown DiskStorageType " + getDiskType().toString()); } Boolean isDiskAligned = (Boolean) runVdsCommand( VDSCommandType.ScanDiskAlignment, parameters).getReturnValue(); getDisk().setAlignment(isDiskAligned ? DiskAlignment.Aligned : DiskAlignment.Misaligned); getDisk().setLastAlignmentScan(new Date()); getBaseDiskDao().update(getDisk()); setSucceeded(true); releaseDiskLocks(); }
Source:
<code>protected CompletableFuture<Void> respondToRequest(ChannelHandlerContext ctx, HttpRequest httpRequest, HandlerRequest<EmptyRequestBody, M> handlerRequest, RestfulGateway gateway) { File file = getFile(handlerRequest); if (file != null && file.exists()) { <START> return CompletableFuture.completedFuture(file).thenAcceptAsync(logFile -> { <END> try { HandlerUtils.transferFile( ctx, logFile, httpRequest); } catch (FlinkException e) { throw new CompletionException(new FlinkException("Could not transfer file to client.", e)); } }); } else { throw new CompletionException(new RestHandlerException( "This file is not exist in JobManager log dir.", HttpResponseStatus.NOT_FOUND)); } }</code><technical_language>thenAcceptAsync() is wrong; task (likely) run in ForkJoinPool.commonPool() lead unpredictable performance issues. I this block rewritten transferFile(...); return CompletableFuture.completedFuture(null);</technical_language>

Target:
protected CompletableFuture<Void> respondToRequest(ChannelHandlerContext ctx, HttpRequest httpRequest, HandlerRequest<EmptyRequestBody, M> handlerRequest, RestfulGateway gateway) { File file = getFile(handlerRequest); if (file != null && file.exists()) { try { HandlerUtils.transferFile( ctx, file, httpRequest); } catch (FlinkException e) { throw new CompletionException(new FlinkException("Could not transfer file to client.", e)); } return CompletableFuture.completedFuture(null); } else { return HandlerUtils.sendErrorResponse( ctx, httpRequest, new ErrorResponseBody("This file does not exist in JobManager log dir."), HttpResponseStatus.NOT_FOUND, Collections.emptyMap()); } }
Source:
<code>public HttpRequest(HttpMethod httpMethod, String url) { this.httpMethod = httpMethod; try { this.url = new URL(url); } catch (MalformedURLException e) { <START> throw logger.logExceptionAsWarning(new IllegalArgumentException("'url' must be a valid URL")); <END> } this.headers = new HttpHeaders(); }</code><technical_language>swallowing MalformedURLException - include e object well, instead of IllegalArgumentException, argument exception if constructor</technical_language>

Target:
public HttpRequest(HttpMethod httpMethod, String url) { this.httpMethod = httpMethod; try { this.url = new URL(url); } catch (MalformedURLException ex) { throw logger.logExceptionAsWarning(new IllegalArgumentException("'url' must be a valid URL", ex)); } this.headers = new HttpHeaders(); }
Source:
<code>public void execute( Runnable runnable ) { if ( latch.compareAndSet( false, true ) ) { jobScheduler.schedule( group, () -> { <START> runnable.run(); <END> latch.set( false ); } ); } }</code><technical_language>latch set in a finally</technical_language>

Target:
public void execute( Runnable runnable ) { if ( latch.compareAndSet( false, true ) ) { jobScheduler.schedule( group, () -> { try { runnable.run(); } finally { latch.set( false ); } } ); } }
Source:
<code>public void isReachableFalse() { <START> target = new SocketUrlDetection(9999); <END> boolean actual = target.isReachable(); assertFalse(actual); }</code><technical_language>put magic port number of 9999 a class-level constant</technical_language>

Target:
public void isReachableFalse() { target = new SocketUrlDetection(HOPEFULLY_UNUSED_PORT); boolean actual = target.isReachable(); assertFalse(actual); }
Source:
<code>public void execute(final MapActivity activity) { final GpxSelectionHelper selectedGpxHelper = activity.getMyApplication() .getSelectedGpxHelper(); if (selectedGpxHelper.isShowingAnyGpxFiles()) { selectedGpxHelper.clearAllGpxFileToShow(); } else { selectedGpxHelper.restoreSelectedGpxFiles(); final File dir = activity.getMyApplication().getAppPath(IndexConstants.GPX_INDEX_DIR); CallbackWithObject<GPXFile[]> callbackWithObject = new CallbackWithObject<GPXFile[]>() { @Override public boolean processResult(GPXFile[] result) { return true; } }; <START> selectedGpxHelper.restoreSelectedGpxFiles(); <END> List<GpxSelectionHelper.SelectedGpxFile> selectedGpxFiles = selectedGpxHelper .getSelectedGPXFiles(); List<String> files = new ArrayList<>(); for (GpxSelectionHelper.SelectedGpxFile file : selectedGpxFiles) { files.add(file.getGpxFile().path.substring(file.getGpxFile().path.lastIndexOf("/"))); } GpxUiHelper.loadFileInDifferentThread(activity, callbackWithObject, dir, files.toArray(new String[files.size()])); } }</code><technical_language>call 2nd time</technical_language>

Target:
public void execute(final MapActivity activity) { final GpxSelectionHelper selectedGpxHelper = activity.getMyApplication() .getSelectedGpxHelper(); if (selectedGpxHelper.isShowingAnyGpxFiles()) { selectedGpxHelper.clearAllGpxFileToShow(); } else { selectedGpxHelper.restoreSelectedGpxFiles(); } }
Source:
<code>private void validate() { if ( ! hasAuthenticationHandler ) { if ( authenticateUser ) <START> Fuseki.configLog.warn("Authetication iof users required (e.g. 'allowedUsers' is set) but there is no authentication setup (e.g. password file)"); <END> if ( hasDataAccessControl ) Fuseki.configLog.warn("Data-level access control in the configuration but there is no authentication setup (e.g. password file)"); } }</code><technical_language>Typo - iof</technical_language>

Target:
private void validate() { if ( ! hasAuthenticationHandler ) { if ( authenticateUser ) Fuseki.configLog.warn("Authetication of users required (e.g. 'allowedUsers' is set) but there is no authentication setup (e.g. password file)"); if ( hasDataAccessControl ) Fuseki.configLog.warn("Data-level access control in the configuration but there is no authentication setup (e.g. password file)"); } }
Source:
<code>public boolean equals( final Object o ) { if ( this == o ) { return true; } if ( !( o instanceof DependencyPathSelectedEvent ) ) { return false; } final DependencyPathSelectedEvent that = (DependencyPathSelectedEvent) o; if ( !context.equals( that.context ) ) { return false; } <START> if (!isSelected == that.isSelected) { <END> return false; } return path.equals( that.path ); }</code><technical_language>suggestion if (isSelected != that.isSelected) {</technical_language>

Target:
public boolean equals( final Object o ) { if ( this == o ) { return true; } if ( !( o instanceof DependencyPathSelectedEvent ) ) { return false; } final DependencyPathSelectedEvent that = (DependencyPathSelectedEvent) o; if ( !context.equals( that.context ) ) { return false; } return path.equals( that.path ); }
Source:
<code>public void testConfigureFetchAfterCloneTask() throws Exception { createNoteInOrigin(); URIish uri = new URIish("file:/ + repository1.getRepository().getDirectory().toString()); CloneOperation clop = new CloneOperation(uri, true, null, workdir2, "refs/heads/master", "origin", 0); clop.addPostCloneTask(new ConfigureFetchAfterCloneTask("origin", "refs/notes/review:refs/notes/review")); clop.run(null); Repository clonedRepo = FileRepositoryBuilder.create(new File(workdir2, Constants.DOT_GIT)); assertTrue( clonedRepo.getConfig() .getStringList(ConfigConstants.CONFIG_REMOTE_SECTION, "origin", "fetch")[1].equals("refs/notes/review:refs/notes/review")); Git clonedGit = new Git(clonedRepo); assertEquals(1, clonedGit.notesList().setNotesRef("refs/notes/review").call().size()); <START> clonedGit.getRepository().close(); <END> }</code><technical_language>call clonedGit.close() directly</technical_language>

Target:
public void testConfigureFetchAfterCloneTask() throws Exception { createNoteInOrigin(); URIish uri = new URIish("file:/ + repository1.getRepository().getDirectory().toString()); CloneOperation clop = new CloneOperation(uri, true, null, workdir2, "refs/heads/master", "origin", 0); clop.addPostCloneTask(new ConfigureFetchAfterCloneTask("origin", "refs/notes/review:refs/notes/review")); clop.run(null); Repository clonedRepo = FileRepositoryBuilder.create(new File(workdir2, Constants.DOT_GIT)); assertTrue( clonedRepo.getConfig() .getStringList(ConfigConstants.CONFIG_REMOTE_SECTION, "origin", "fetch")[1].equals("refs/notes/review:refs/notes/review")); Git clonedGit = new Git(clonedRepo); assertEquals(1, clonedGit.notesList().setNotesRef("refs/notes/review").call().size()); clonedGit.close(); }
Source:
<code>private Path getXDGConfigHome(FS fs) { String configHomePath = getenv(Constants.XDG_CONFIG_HOME); if (StringUtils.isEmptyOrNull(configHomePath)) { configHomePath = new File(fs.userHome(), ".config") .getAbsolutePath(); } <START> Path xdgHomePath = null; <END> try { xdgHomePath = Paths.get(configHomePath); Files.createDirectories(xdgHomePath); return xdgHomePath; } catch (IOException | InvalidPathException e) { LOG.error(JGitText.get().createXDGConfigHomeFailed, xdgHomePath, e); } return null; }</code><technical_language>Declaration moved try-catch</technical_language>

Target:
private Path getXDGConfigHome(FS fs) { String configHomePath = getenv(Constants.XDG_CONFIG_HOME); if (StringUtils.isEmptyOrNull(configHomePath)) { configHomePath = new File(fs.userHome(), ".config") .getAbsolutePath(); } try { Path xdgHomePath = Paths.get(configHomePath); Files.createDirectories(xdgHomePath); return xdgHomePath; } catch (IOException | InvalidPathException e) { LOG.error(JGitText.get().createXDGConfigHomeFailed, configHomePath, e); } return null; }
Source:
<code>protected double convertDuration(double duration) { <START> return duration / durationFactor; LOG.error("Exception thrown from {}#report. Exception was suppressed.", ScheduledReporter.this.getClass().getSimpleName(), ex); <END> }</code><technical_language>Accidental copy & paste error</technical_language>

Target:
protected double convertDuration(double duration) { return duration / durationFactor; }
Source:
<code>private void registerOpenWorkspaceVersion(MenuManager menu, final ISelectionProvider selectionProvider) { menu.addMenuListener(new IMenuListener() { @Override public void menuAboutToShow(IMenuManager manager) { if (!(selectionProvider instanceof SourceViewer)) { return; } Action action = new Action(Messages.Compare_OpenFile) { @Override public void run() { Object editorInput = ((SourceViewer) selectionProvider).getInput(); if (!(editorInput instanceof CommentableCompareItem)) { return; } FileInfo fileShown = ((CommentableCompareItem) editorInput).getFileInfo(); if (fileShown == null) { return; } int selectedLine = 0; <START> if (selectionProvider.getSelection() instanceof ITextSelection) { <END> ITextSelection selection = (ITextSelection) selectionProvider.getSelection(); selectedLine = selection.getStartLine(); } boolean openSucceeded = UIUtils.openSingleFile(fileShown, gerritClient, fileShown.getRevision(), selectedLine); if (!openSucceeded) { UIUtils.displayInformation(Messages.UIFilesTable_3, Messages.UIFilesTable_2 + '\n' + fileShown.getPath()); } } }; manager.insertAfter("file", action); } }); }</code><technical_language>return line, review 90218, file RebaseProcess.java patchset, return line 13</technical_language>

Target:
private void registerOpenWorkspaceVersion(MenuManager menu, final ISelectionProvider selectionProvider) { menu.addMenuListener(new IMenuListener() { @Override public void menuAboutToShow(IMenuManager manager) { if (!(selectionProvider instanceof SourceViewer)) { return; } manager.insertAfter("file", new OpenWorkspaceFile((SourceViewer) selectionProvider, gerritClient)); } }); }
Source:
<code>public HttpPostMultipartRequestDecoder offer(HttpContent content) { checkDestroyed(); if (content instanceof LastHttpContent) { isLastChunk = true; } ByteBuf buf = content.content(); if (undecodedChunk == null) { <START> undecodedChunk = isLastChunk ? buf.retain() : buf.copy(); <END> } else { undecodedChunk.writeBytes(buf); } parseBody(); if (undecodedChunk != null && undecodedChunk.writerIndex() > discardThreshold) { undecodedChunk.discardReadBytes(); } return this; }</code><technical_language>@fabienrenaud buf.retainedSlice()</technical_language>

Target:
public HttpPostMultipartRequestDecoder offer(HttpContent content) { checkDestroyed(); if (content instanceof LastHttpContent) { isLastChunk = true; } ByteBuf buf = content.content(); if (undecodedChunk == null) { undecodedChunk = isLastChunk ? buf.retainedSlice() : buf.copy(); } else { undecodedChunk.writeBytes(buf); } parseBody(); if (undecodedChunk != null && undecodedChunk.writerIndex() > discardThreshold) { undecodedChunk.discardReadBytes(); } return this; }
Source:
<code>public <T extends Event> boolean removeListener(EventListener<T> listener) { <START> return eventListenerMap.values().remove(listener); <END> }</code><technical_language>This implementation is bad. eventListenerMap.values() return a Collection<List<EventListener<?>>>, .remove(listener) work expected</technical_language>

Target:
public <T extends Event> boolean removeListener(EventListener<T> listener) { boolean result = false; for (List<EventListener<?>> eventListenerList : eventListenerMap.values()) { result = result || eventListenerList.remove(listener); } return result; }
Source:
<code>@Test public void testPushAggregateThroughtOuterJoin7() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateJoinTransposeRule.EXTENDED) .build(); final String sql = "select e.job\n" + "from (select * from sales.emp where empno = 10) as e\n" <START> + "join sales.dept as d on e.job = d.name\n" <END> + "and e.deptno + e.empno = d.deptno + 5\n" + "group by e.job"; checkPlanning(tester, preProgram, new HepPlanner(program), sql); }</code><technical_language>This outer</technical_language>

Target:
@Test public void testPushAggregateThroughtOuterJoin7() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateJoinTransposeRule.EXTENDED) .build(); final String sql = "select e.job\n" + "from (select * from sales.emp where empno = 10) as e\n" + "left outer join sales.dept as d on e.job = d.name\n" + "and e.deptno + e.empno = d.deptno + 5\n" + "group by e.job"; checkPlanning(tester, preProgram, new HepPlanner(program), sql); }
Source:
<code>public String getStatus() { <START> if (get(POD_DELETION_TIMESTAMP).isDefined()) { <END> return "Terminating"; } ModelNode node = get(POD_STATUS_CONTAINER_STATUSES); if (node.getType() == ModelType.LIST) { for (ModelNode containerStatus : node.asList()) { for (String containerReason: POD_STATUS_CONTAINER_STATES.keySet()) { String status = getContainerStatusIfDefined( containerStatus, containerReason, POD_STATUS_CONTAINER_STATES.get(containerReason)); if (status != null) { return status; } } } } return get(POD_STATUS_REASON).isDefined() ? asString(POD_STATUS_REASON) : asString(POD_STATUS_PHASE); }</code><technical_language>I thought existed in JbossDmrExtentions, is not, has(NODE_PATH) get coupled 'isdefined' creates child node 'has' checks for it. Depending urgency of PR, I suggest adding 'has(String...)' utility class</technical_language>

Target:
public String getStatus() { if (has(POD_DELETION_TIMESTAMP)) { return "Terminating"; } ModelNode node = get(POD_STATUS_CONTAINER_STATUSES); if (node.getType() == ModelType.LIST) { for (ModelNode containerStatus : node.asList()) { String status = getContainerStatusStringIfExist(containerStatus); if (status != null) { return status; } } } return has(POD_STATUS_REASON) ? asString(POD_STATUS_REASON) : asString(POD_STATUS_PHASE); }
Source:
<code>protected void addResourceMetadatasElement(Element attributeElement) { if (null == this.getMetadatas() || this.getMetadatas().isEmpty()) { return; } Element metadatasElement = new Element("metadatas"); this.getMetadatas().keySet().stream().forEach(key -> { <START> if (null != key) { <END> Map<String, String> map = this.getMetadatas().get(key); map.keySet().stream().forEach(langCode -> { Element metadataElement = new Element("metadata"); metadataElement.setAttribute("key", key); metadataElement.setAttribute("lang", langCode); metadataElement.setText(map.get(langCode).trim()); metadatasElement.addContent(metadataElement); }); } }); attributeElement.addContent(metadatasElement); }</code><technical_language>I this is necessary. A key in a map null. If exception getMetadatas() null</technical_language>

Target:
protected void addResourceMetadatasElement(Element attributeElement) { if (null == this.getMetadatas() || this.getMetadatas().isEmpty()) { return; } Element metadatasElement = new Element("metadatas"); this.getMetadatas().keySet().stream().forEach(key -> { Map<String, String> map = this.getMetadatas().get(key); map.keySet().stream().forEach(langCode -> { Element metadataElement = new Element("metadata"); metadataElement.setAttribute("key", key); metadataElement.setAttribute("lang", langCode); metadataElement.setText(map.get(langCode).trim()); metadatasElement.addContent(metadataElement); }); }); attributeElement.addContent(metadatasElement); }
Source:
<code>Element getSelectPicker() { <START> return getElement().querySelector("[data-field=\"time-zone-selector\"]"); <END> }</code><technical_language>replace line this? suggestion return this.timeZoneSelector;</technical_language>

Target:
Element getSelectPicker() { return this.timeZoneSelector; }
Source:
<code>protected MutableBoundedValue<Short> constructValue(Short actualValue) { <START> return SpongeValueFactory.boundedBuilder(Keys.SPAWNER_REQUIRED_PLAYER_RANGE) <END> .minimum((short) 0) .maximum(Short.MAX_VALUE) .defaultValue(DataConstants.DEFAULT_SPAWNER_REQUIRED_PLAYER_RANGE) .actualValue(actualValue) .build(); }</code><technical_language>this.key</technical_language>

Target:
protected MutableBoundedValue<Short> constructValue(Short actualValue) { return SpongeValueFactory.boundedBuilder(this.key) .minimum((short) 0) .maximum(Short.MAX_VALUE) .defaultValue(DataConstants.DEFAULT_SPAWNER_REQUIRED_PLAYER_RANGE) .actualValue(actualValue) .build(); }
Source:
<code>private static String getTagsRecord(Set<String> tags) { if (tags == null || tags.size() == 0) { return "[ ]"; } StringBuilder res = new StringBuilder().append("[ "); int i = 1; for (String tag : tags) { if (i < tags.size()) <START> res.append(tag + ", "); <END> else res.append(tag); i++; } return res.append(" ]").toString(); }</code><technical_language>blocks for one-liners</technical_language>

Target:
private static String getTagsRecord(Set<String> tags) { if (tags == null || tags.size() == 0) { return "[ ]"; } StringBuilder res = new StringBuilder().append("[ "); int i = 1; for (String tag : tags) { if (i < tags.size()) { res.append(tag + ", "); } else { res.append(tag); } i++; } return res.append(" ]").toString(); }
Source:
<code>protected void getDowntime() { <START> try { <END> VDSReturnValue retVal = runVdsCommand(VDSCommandType.MigrateStatus, new MigrateStatusVDSCommandParameters(getDestinationVdsId(), getVmId())); if (retVal != null) { actualDowntime = (Integer) retVal.getReturnValue(); } } catch (VdcBLLException e) { migrationErrorCode = e.getErrorCode(); } }</code><technical_language>call this for hosts support new downtime</technical_language>

Target:
protected void getDowntime() { if (FeatureSupported.migrateDowntime(getVm().getVdsGroupCompatibilityVersion())) { try { VDSReturnValue retVal = runVdsCommand(VDSCommandType.MigrateStatus, new MigrateStatusVDSCommandParameters(getDestinationVdsId(), getVmId())); if (retVal != null) { actualDowntime = (Integer) retVal.getReturnValue(); } } catch (VdcBLLException e) { migrationErrorCode = e.getErrorCode(); } } }
Source:
<code>public String[] getGroupFilters() { <START> String[] result = null; <END> IAnnotation before = m_annotationFinder.findAnnotation(getConstructorOrMethod(), IBeforeMethod.class); if (before != null) { result = ((ConfigurationAnnotation) before).getGroupFilters(); } return result; }</code><technical_language>please this variable initialized empty array avoid a null check done</technical_language>

Target:
public String[] getGroupFilters() { IBeforeMethod before = m_annotationFinder.findAnnotation(getConstructorOrMethod(), IBeforeMethod.class); if (before == null) { return new String[0]; } return before.getGroupFilters(); }
Source:
<code>private void showLoginFields() { AnimationHelper.showView(findViewById(R.id.serverInput), 201); AnimationHelper.hideView(findViewById(R.id.serverFieldLayout), 100); realmNameET = (EditText) findViewById(R.id.realmName); if (getIntent().getBooleanExtra("FROM_ADDREALM", false)) { startedFromAddRealm = true; <START> ((TextView) findViewById(R.id.textView1)).setText(R.string.add_realm); <END> ((Button) findViewById(R.id.zulip_login)).setText(R.string.add_realm_login); } }</code><technical_language>@kunall17 this is possibly a rebasing error, i get version of this compile find textView1 view</technical_language>

Target:
private void showLoginFields() { AnimationHelper.showView(findViewById(R.id.serverInput), 201); AnimationHelper.hideView(findViewById(R.id.serverFieldLayout), 100); realmNameET = (EditText) findViewById(R.id.realmName); if (getIntent().getBooleanExtra("FROM_ADDREALM", false)) { startedFromAddRealm = true; ((TextView) findViewById(R.id.welcome_zulip)).setText(R.string.add_realm); ((Button) findViewById(R.id.zulip_login)).setText(R.string.add_realm_login); } }
Source:
<code>public int scan( int[] offsets, int beginOffset, int numOffsets, int endOffset, ResultsConsumer resultsConsumer) throws IOException { this.offsets = offsets; this.beginOffset = beginOffset; this.numOffsets = numOffsets; this.endOffset = endOffset; this.resultsConsumer = resultsConsumer; this.numResults = 0; this.offsetIdx = beginOffset; if (numLiterals > 0) { scanLiterals(); } while (offsetIdx < beginOffset + numOffsets) { used = 0; numLiterals = 0; scanDone = false; readValues(); <START> if (!scanDone) { <END> scanLiterals(); } } skip(endOffset - offsets[beginOffset + numOffsets - 1] - 1); this.offsets = null; return numResults; }</code><technical_language>I code sets scanDone true. If is false, is needed</technical_language>

Target:
public int scan( int[] offsets, int beginOffset, int numOffsets, int endOffset, ResultsConsumer resultsConsumer) throws IOException { this.offsets = offsets; this.beginOffset = beginOffset; this.numOffsets = numOffsets; this.resultsConsumer = resultsConsumer; this.numResults = 0; this.offsetIdx = beginOffset; if (numLiterals > 0) { scanLiterals(); } while (offsetIdx < beginOffset + numOffsets) { used = 0; numLiterals = 0; readValues(); scanLiterals(); } skip(endOffset - offsets[beginOffset + numOffsets - 1] - 1); this.offsets = null; return numResults; }