auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void unzipToTempDirectory(final GraphContext context, final Path tempFolder, final File inputZipFile, final ArchiveModel archiveModel) { final FileModelService fileService = new FileModelService(context); String appArchiveName = archiveModel.getArchiveName(); final Path appArchiveFolder = getAppArchiveFolder(tempFolder, appArchiveName); try { Files.createDirectories(appArchiveFolder); } catch (IOException e) { throw new WindupException("Could not create a temporary directory for application \"" + appArchiveName + "\" at \"" + appArchiveFolder.toString() + "\" due to: " + e.getMessage(), e); } LOG.info("Unzipping " + inputZipFile.getPath() + " to " + appArchiveFolder.toString()); try { ZipUtil.unzipToFolder(inputZipFile, appArchiveFolder.toFile()); } catch (Throwable e) { ClassificationService classificationService = new ClassificationService(context); classificationService.attachClassification(archiveModel, ArchiveModel.MALFORMED_ARCHIVEMODEL, "Cannot unzip the file"); <START> return; <END> } FileModel newFileModel = fileService.createByFilePath(appArchiveFolder.toString()); archiveModel.setUnzippedDirectory(newFileModel); newFileModel.setParentArchive(archiveModel); recurseAndAddFiles(context, tempFolder, fileService, archiveModel, newFileModel); }</code><technical_language>IMO print a warning. This is important info, visible running in CLI</technical_language>

Target:
private void unzipToTempDirectory(final GraphContext context, final Path tempFolder, final File inputZipFile, final ArchiveModel archiveModel) { final FileModelService fileService = new FileModelService(context); String appArchiveName = archiveModel.getArchiveName(); final Path appArchiveFolder = getAppArchiveFolder(tempFolder, appArchiveName); try { Files.createDirectories(appArchiveFolder); } catch (IOException e) { throw new WindupException("Could not create a temporary directory for application \"" + appArchiveName + "\" at \"" + appArchiveFolder.toString() + "\" due to: " + e.getMessage(), e); } LOG.info("Unzipping " + inputZipFile.getPath() + " to " + appArchiveFolder.toString()); try { ZipUtil.unzipToFolder(inputZipFile, appArchiveFolder.toFile()); } catch (Throwable e) { ClassificationService classificationService = new ClassificationService(context); classificationService.attachClassification(archiveModel, ArchiveModel.MALFORMED_ARCHIVE, "Cannot unzip the file"); LOG.warning("Cannot unzip the file " + inputZipFile.getPath() + " to " + appArchiveFolder.toString() + ". The ArchiveModel was classified as malformed."); return; } FileModel newFileModel = fileService.createByFilePath(appArchiveFolder.toString()); archiveModel.setUnzippedDirectory(newFileModel); newFileModel.setParentArchive(archiveModel); recurseAndAddFiles(context, tempFolder, fileService, archiveModel, newFileModel); }
Source:
<code><START> public void testStateAdvancedChange_startFails() throws InterruptedException { <END> this.agent.stop(); this.agent = new Agent() { @Override public PluginInterface findPlugin( Instance instance ) { return new PluginMock() { @Override public void start( Instance instance ) throws PluginException { throw new PluginException( "For tests..." ); } }; } }; this.agent.setMessagingType(MessagingConstants.FACTORY_TEST); this.agent.start(); AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); TestApplicationTemplate app = new TestApplicationTemplate(); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcatVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); Assert.assertEquals( InstanceStatus.DEPLOYED_STARTED, processor.scopedInstance.getStatus()); Assert.assertEquals( InstanceStatus.NOT_DEPLOYED, app.getTomcat().getStatus()); processor.processMessage( new MsgCmdChangeInstanceState( app.getTomcat(), InstanceStatus.DEPLOYED_STARTED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, app.getTomcat().getStatus()); processor.processMessage( new MsgCmdChangeInstanceState( app.getTomcat(), InstanceStatus.DEPLOYED_STOPPED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, app.getTomcat().getStatus()); processor.processMessage( new MsgCmdChangeInstanceState( app.getTomcat(), InstanceStatus.NOT_DEPLOYED )); Assert.assertEquals( InstanceStatus.NOT_DEPLOYED, app.getTomcat().getStatus()); }</code><technical_language>No, this method throw interrupted exceptions</technical_language>

Target:
public void testStateAdvancedChange_startFails() { this.agent.stop(); this.agent = new Agent() { @Override public PluginInterface findPlugin( Instance instance ) { return new PluginMock() { @Override public void start( Instance instance ) throws PluginException { throw new PluginException( "For tests..." ); } }; } }; this.agent.setMessagingType(MessagingConstants.FACTORY_TEST); this.agent.start(); AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); TestApplicationTemplate app = new TestApplicationTemplate(); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcatVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); Assert.assertEquals( InstanceStatus.DEPLOYED_STARTED, processor.scopedInstance.getStatus()); Assert.assertEquals( InstanceStatus.NOT_DEPLOYED, app.getTomcat().getStatus()); processor.processMessage( new MsgCmdChangeInstanceState( app.getTomcat(), InstanceStatus.DEPLOYED_STARTED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, app.getTomcat().getStatus()); processor.processMessage( new MsgCmdChangeInstanceState( app.getTomcat(), InstanceStatus.DEPLOYED_STOPPED )); Assert.assertEquals( InstanceStatus.DEPLOYED_STOPPED, app.getTomcat().getStatus()); processor.processMessage( new MsgCmdChangeInstanceState( app.getTomcat(), InstanceStatus.NOT_DEPLOYED )); Assert.assertEquals( InstanceStatus.NOT_DEPLOYED, app.getTomcat().getStatus()); }
Source:
<code>public CoapServer(final NetworkConfig config, final int... ports) { if (config != null) { this.config = config; } else { this.config = NetworkConfig.getStandard(); } <START> this.root = new RootResource(); <END> this.deliverer = new ServerMessageDeliverer(root); CoapResource wellKnown = new CoapResource(".well-known"); wellKnown.setVisible(false); wellKnown.add(new DiscoveryResource(root)); root.add(wellKnown); this.endpoints = new ArrayList<>(); if(null != config) { this.executor = Executors.newScheduledThreadPool( config.getInt(NetworkConfig.Keys.PROTOCOL_STAGE_THREAD_COUNT), new Utils.NamedThreadFactory("CoapServer#")); } if(null != this.config) { for (int port : ports) { addEndpoint(new CoapEndpoint(port, this.config)); } } }</code><technical_language>This effectively removes possibility another root resource extending CoapServer</technical_language>

Target:
public CoapServer(final NetworkConfig config, final int... ports) { if (config != null) { this.config = config; } else { this.config = NetworkConfig.getStandard(); } this.root = createRoot(); this.deliverer = new ServerMessageDeliverer(root); CoapResource wellKnown = new CoapResource(".well-known"); wellKnown.setVisible(false); wellKnown.add(new DiscoveryResource(root)); root.add(wellKnown); this.endpoints = new ArrayList<>(); this.executor = Executors.newScheduledThreadPool( this.config.getInt(NetworkConfig.Keys.PROTOCOL_STAGE_THREAD_COUNT), new Utils.NamedThreadFactory("CoapServer#")); for (int port : ports) { addEndpoint(new CoapEndpoint(port, this.config)); } }
Source:
<code><START> public IsMergeablePredicate(Provider<ReviewDb> <END> dbProvider) { super(ChangeField.MERGEABLE, "1"); this.dbProvider = dbProvider; }</code><technical_language>default access</technical_language>

Target:
IsMergeablePredicate(Provider<ReviewDb> dbProvider) { super(ChangeField.MERGEABLE, "1"); this.dbProvider = dbProvider; }
Source:
<code>public IDescriptionPreprocessor caseCategory(Category object) { <START> Collection<EStructuralFeature> featuresToIgnore = Lists.newArrayList(); Collection<EStructuralFeature> featuresToCopy = Lists.newArrayList(); <END> return new DefaultDescriptionPreprocessorWithFiltering<Category>(Category.class, featuresToIgnore, featuresToCopy); }</code><technical_language>remove, new ArrayList<>() in constructor, line</technical_language>

Target:
public Optional<IDescriptionPreprocessor> caseCategory(Category object) { return Optional.of(new DefaultDescriptionPreprocessorWithFiltering<Category>(Category.class, new ArrayList<>(), new ArrayList<>())); }
Source:
<code>public Object getResult(VarianceData data) { <START> return new Double(data.squaredSum / data.count); <END> }</code><technical_language>new Double() is redundant</technical_language>

Target:
public Double getResult(VarianceData data) { return data.squaredSum / data.count; }
Source:
<code>public static Tuple generateTestTuple(final String source, final String index, final String type, final String id) { TopologyBuilder builder = new TopologyBuilder(); GeneralTopologyContext topologyContext = new GeneralTopologyContext( builder.createTopology(), new Config(), <START> new CustomIndexArray<String>(0,1), <END> new HashMap<>(), new HashMap<>(), "") { @Override public Fields getComponentOutputFields(final String componentId, final String streamId) { return new Fields("source", "index", "type", "id"); } }; return new TupleImpl(topologyContext, new Values(source, index, type, id), source, 1, ""); }</code><technical_language>Nit: java able figure out is a String required type for GeneralTopologyContext</technical_language>

Target:
public static Tuple generateTestTuple(final String source, final String index, final String type, final String id) { TopologyBuilder builder = new TopologyBuilder(); GeneralTopologyContext topologyContext = new GeneralTopologyContext( builder.createTopology(), new Config(), new CustomIndexArray<String>(0,0), new HashMap<>(), new HashMap<>(), "") { @Override public Fields getComponentOutputFields(final String componentId, final String streamId) { return new Fields("source", "index", "type", "id"); } }; return new TupleImpl(topologyContext, new Values(source, index, type, id), source, 1, ""); }
Source:
<code>public Uri getQueryUri(Query query) { <START> return null; <END> }</code><technical_language>return null</technical_language>

Target:
public Uri getQueryUri(Query query) { return Data.CONTENT_URI; }
Source:
<code>static <T> Iterator<Optional<T>> yieldingIteratorFrom(WorkProcessor<T> processor) { return new AbstractIterator<Optional<T>>() { @Override protected Optional<T> computeNext() { while (true) { if (processor.process()) { if (processor.isFinished()) { return endOfData(); } return Optional.of(processor.getResult()); } else if (processor.isBlocked()) { <START> try { <END> processor.getBlockedFuture().get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } catch (ExecutionException e) { throw new RuntimeException(e); } } else { return Optional.empty(); } } } }; }</code><technical_language>throw: blocking work processor (safely) iterated (add this a commit) need while(true) in yieldingIteratorFrom()</technical_language>

Target:
static <T> Iterator<Optional<T>> yieldingIteratorFrom(WorkProcessor<T> processor) { return new YieldingIterator<>(processor); }
Source:
<code>private Set<Object> getNonExistingDecorators() { <START> Set<Object> decorators = dataService.findAll(DYNAMIC_DECORATOR).map(Entity::getIdValue).collect(toSet()); <END> decorators.removeAll(registry.getFactoryIds().collect(toSet())); return decorators; }</code><technical_language>Better: dataService.findAll(DYNAMIC_DECORATOR, DynamicDecorator.class).map(DynamicDecorator::getId)</technical_language>

Target:
private Set<String> getNonExistingDecorators() { Set<String> decorators = dataService.findAll(DYNAMIC_DECORATOR, DynamicDecorator.class) .map(DynamicDecorator::getId) .collect(toSet()); decorators.removeAll(registry.getFactoryIds().collect(toSet())); return decorators; }
Source:
<code>public static Algorithm RSA256(RSAKey key) throws IllegalArgumentException { <START> RSAPublicKey publicKey = key instanceof PublicKey ? (RSAPublicKey) key : null; <END> RSAPrivateKey privateKey = key instanceof PrivateKey ? (RSAPrivateKey) key : null; return RSA256(publicKey, privateKey); }</code><technical_language>force casting type for instanceof</technical_language>

Target:
public static Algorithm RSA256(RSAKey key) throws IllegalArgumentException { RSAPublicKey publicKey = key instanceof RSAPublicKey ? (RSAPublicKey) key : null; RSAPrivateKey privateKey = key instanceof RSAPrivateKey ? (RSAPrivateKey) key : null; return RSA256(publicKey, privateKey); }
Source:
<code>protected AsyncService getAsyncService(String executionId) { try { String serviceClass = (String) getTransientStore().getParameter(executionId, TRANSIENT_STORE_SERVICE); return (AsyncService) Framework.getService(Class.forName(serviceClass)); } catch (ClassNotFoundException e) { <START> return null; <END> } }</code><technical_language>This is worth logging error</technical_language>

Target:
protected AsyncService getAsyncService(String executionId) { String serviceClass = (String) getTransientStore().getParameter(executionId, TRANSIENT_STORE_SERVICE); try { return (AsyncService) Framework.getService(Class.forName(serviceClass)); } catch (ClassNotFoundException e) { log.error("AsyncService class not found", serviceClass); return null; } }
Source:
<code>private long getTransferSize() { DiskImage image = getDiskImage(); Guid domainId = image.getStorageIds().get(0); if (getParameters().getTransferType() == TransferType.Download) { if (image.getVolumeFormat() == VolumeFormat.COW) { DiskImage imageInfoFromVdsm = imagesHandler.getVolumeInfoFromVdsm( image.getStoragePoolId(), domainId, image.getId(), image.getImageId()); return imageInfoFromVdsm.getApparentSizeInBytes(); } else { <START> return image.getSize(); <END> } } if (getParameters().getTransferSize() != 0) { return getParameters().getTransferSize(); } boolean isBlockDomain = image.getStorageTypes().get(0).isBlockDomain(); return isBlockDomain ? image.getActualSizeInBytes() : image.getSize(); }</code><technical_language>I guess this is virtual size</technical_language>

Target:
private long getTransferSize() { DiskImage image = getDiskImage(); Guid domainId = image.getStorageIds().get(0); if (getParameters().getTransferType() == TransferType.Download) { if (image.getVolumeFormat() == VolumeFormat.COW) { DiskImage imageInfoFromVdsm = imagesHandler.getVolumeInfoFromVdsm( image.getStoragePoolId(), domainId, image.getId(), image.getImageId()); return imageInfoFromVdsm.getApparentSizeInBytes(); } else { return image.getSize(); } } if (getParameters().getTransferSize() != 0) { return getParameters().getTransferSize(); } boolean isBlockDomain = getDiskImage().getStorageTypes().get(0).isBlockDomain(); return isBlockDomain ? getDiskImage().getActualSizeInBytes() : image.getSize(); }
Source:
<code>protected String replace(String in) { reporter.trace("Replace: %s", in); if (in == null) { <START> reporter.error("null??"); <END> in = "<<???>>"; } Matcher matcher = MACRO.matcher(in); int last = 0; StringBuilder sb = new StringBuilder(); while (matcher.find()) { int n = matcher.start(); sb.append(in, last, n); String replacement = get(matcher.group(2)); if (replacement == null) sb.append(matcher.group(1)); else sb.append(replacement); last = matcher.end(); } if (last == 0) return in; sb.append(in, last, in.length()); return sb.toString(); }</code><technical_language>I guess a more helpful message useful. This message a debug "how I get here?" message useful</technical_language>

Target:
protected String replace(String in) { reporter.trace("Replace: %s", in); if (in == null) { reporter.error("No input to replace. Setting it to <<???>>"); in = "<<???>>"; } Matcher matcher = MACRO.matcher(in); int last = 0; StringBuilder sb = new StringBuilder(); while (matcher.find()) { int n = matcher.start(); sb.append(in, last, n); String replacement = get(matcher.group(2)); if (replacement == null) sb.append(matcher.group(1)); else sb.append(replacement); last = matcher.end(); } if (last == 0) return in; sb.append(in, last, in.length()); return sb.toString(); }
Source:
<code>public List<String> getListTypes() { if (null == exTypes) { exTypes = new ArrayList<>(); <START> exTypes.add("FHIR"); <END> exTypes.add("UDDI"); } return exTypes; }</code><technical_language>gov.hhs.fha.nhinc.nhinclib.NhincConstants.EXCHANGE_TYPE class</technical_language>

Target:
public EXCHANGE_TYPE[] getListTypes() { return EXCHANGE_TYPE.values(); }
Source:
<code>private void setUpHomeMenuIcon() { <START> editOptionIndicatorDot.setVisibility(Prefs.showActionFeedIndicator() ? <END> VISIBLE : GONE); }</code><technical_language>Please add a feature flag show this for pre-beta builds. (&& ReleaseUtil.isPreBetaRelease())</technical_language>

Target:
void setUpHomeMenuIcon() { drawerIconDot.setVisibility(AccountUtil.isLoggedIn() && Prefs.showActionFeedIndicator() && ReleaseUtil.isPreBetaRelease() ? VISIBLE : GONE); }
Source:
<code>public List<JobConfig> prepareJobs() { String appId = new ApplicationConfig(appDesc.getConfig()).getGlobalAppId(); return ApplicationDescriptors.forType( taskAppDesc -> { try { <START> return Collections.singletonList(JobPlanner.this.prepareTaskJob(taskAppDesc)); <END> } catch (Exception e) { throw new SamzaException("Failed to generate JobConfig for TaskApplication " + appId, e); } }, streamAppDesc -> { try { return JobPlanner.this.prepareStreamJobs(streamAppDesc); } catch (Exception e) { throw new SamzaException("Failed to generate JobConfig for StreamApplication " + appId, e); } }, appDesc); }</code><technical_language>Minor (here line 80): remove "JobPlanner.this"</technical_language>

Target:
public List<JobConfig> prepareJobs() { String appId = new ApplicationConfig(appDesc.getConfig()).getGlobalAppId(); if (appDesc instanceof TaskApplicationDescriptorImpl) { return Collections.singletonList(prepareTaskJob((TaskApplicationDescriptorImpl) appDesc)); } else if (appDesc instanceof StreamApplicationDescriptorImpl) { try { return prepareStreamJobs((StreamApplicationDescriptorImpl) appDesc); } catch (Exception e) { throw new SamzaException("Failed to generate JobConfig for StreamApplication " + appId, e); } } throw new IllegalArgumentException(String.format("ApplicationDescriptorImpl has to be either TaskApplicationDescriptorImpl or " + "StreamApplicationDescriptorImpl. class %s is not supported", appDesc.getClass().getName())); }
Source:
<code>private static boolean rewriteURIQueryParameters(Node node, List<String> queryParameters) { boolean processed = false; if (!queryParameters.isEmpty() && node.hasProperty(Constants.PROP_HTTP_QUERY)) { StringTokenizer st = new StringTokenizer(node.getProperties(Constants.PROP_HTTP_QUERY).iterator().next().getValue(), "&"); while (st.hasMoreTokens()) { String token = st.nextToken(); String[] namevalue = token.split("="); if (namevalue.length == 2) { if (queryParameters.contains(namevalue[0])) { try { <START> node.getProperties().add(new Property(namevalue[0], <END> URLDecoder.decode(namevalue[1], "UTF-8"))); processed = true; } catch (UnsupportedEncodingException e) { if (log.isLoggable(Level.FINEST)) { log.finest("Failed to decode value '" + namevalue[1] + "': " + e); } } } else if (log.isLoggable(Level.FINEST)) { log.finest("Ignoring query parameter '" + namevalue[0] + "'"); } } else if (log.isLoggable(Level.FINEST)) { log.finest("Query string part does not include name/value pair: " + token); } } } return processed; }</code><technical_language>decode namevalue[0] well</technical_language>

Target:
private static boolean rewriteURIQueryParameters(Node node, List<String> queryParameters) { boolean processed = false; if (!queryParameters.isEmpty() && node.hasProperty(Constants.PROP_HTTP_QUERY)) { StringTokenizer st = new StringTokenizer(node.getProperties(Constants.PROP_HTTP_QUERY).iterator().next().getValue(), "&"); while (st.hasMoreTokens()) { String token = st.nextToken(); String[] namevalue = token.split("="); if (namevalue.length == 2) { if (queryParameters.contains(namevalue[0])) { try { node.getProperties().add(new Property(URLDecoder.decode(namevalue[0], "UTF-8"), URLDecoder.decode(namevalue[1], "UTF-8"))); processed = true; } catch (UnsupportedEncodingException e) { if (log.isLoggable(Level.FINEST)) { log.finest("Failed to decode value '" + namevalue[1] + "': " + e); } } } else if (log.isLoggable(Level.FINEST)) { log.finest("Ignoring query parameter '" + namevalue[0] + "'"); } } else if (log.isLoggable(Level.FINEST)) { log.finest("Query string part does not include name/value pair: " + token); } } } return processed; }
Source:
<code>private boolean isAuthenticated() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); <START> if (authentication == null || authentication instanceof AnonymousAuthenticationToken) { <END> return false; } return authentication.isAuthenticated(); }</code><technical_language>safer isAssignableFrom</technical_language>

Target:
private boolean isAuthenticated() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication == null || AnonymousAuthenticationToken.class.isAssignableFrom(authentication.getClass())) { return false; } return authentication.isAuthenticated(); }
Source:
<code>private void testResponseForServerErrorUtil(ServerErrorCode serverErrorCode, RouterErrorCode expectedRouterErrorCode) throws Exception { ServerErrorCode[] serverErrorCodes = new ServerErrorCode[9]; Arrays.fill(serverErrorCodes, serverErrorCode); presetServerErrorCode(serverErrorCodes); future = router.deleteBlob(blobIdString, new ClientCallback()); try { future.get(); fail("Deletion should be unsuccessful. Error is expected."); } catch (Exception e) { <START> assertEquals("RouterErrorCode should be BlobDoesNotExist", expectedRouterErrorCode, <END> ((RouterException) e.getCause()).getErrorCode()); } }</code><technical_language>"RouterErrorCode mistmatch" suffice. If fails, automatically print values</technical_language>

Target:
private void testResponseForServerErrorUtil(ServerErrorCode serverErrorCode, RouterErrorCode expectedRouterErrorCode) throws Exception { ServerErrorCode[] serverErrorCodes = new ServerErrorCode[9]; Arrays.fill(serverErrorCodes, serverErrorCode); presetServerErrorCode(serverErrorCodes); future = router.deleteBlob(blobIdString, new ClientCallback()); try { future.get(); fail("Deletion should be unsuccessful. Error is expected."); } catch (Exception e) { assertEquals("RouterErrorCodes mistmatch.", expectedRouterErrorCode, ((RouterException) e.getCause()).getErrorCode()); } }
Source:
<code>protected Collection<P> orphanedItems(Collection<P> orphaned, TaskListener listener) throws IOException, InterruptedException { BranchProjectFactory<P, R> _factory = getProjectFactory(); for (P project : orphaned) { if (!_factory.isProject(project)) { listener.getLogger().println("Detected unsupported subitem " + project + ", skipping"); continue; } Branch b = _factory.getBranch(project); if (!(b instanceof Branch.Dead)) { _factory.decorate( <START> _factory.setBranch(project, new Branch.Dead(b.getHead(), b.getProperties(), b.getActions()))); <END> } } return super.orphanedItems(orphaned, listener); }</code><technical_language>Gratuitous reindentation a reviewer's life easier</technical_language>

Target:
protected Collection<P> orphanedItems(Collection<P> orphaned, TaskListener listener) throws IOException, InterruptedException { BranchProjectFactory<P, R> _factory = getProjectFactory(); for (P project : orphaned) { if (!_factory.isProject(project)) { listener.getLogger().println("Detected unsupported subitem " + project + ", skipping"); continue; } Branch b = _factory.getBranch(project); if (!(b instanceof Branch.Dead)) { _factory.decorate( _factory.setBranch(project, new Branch.Dead(b))); } } return super.orphanedItems(orphaned, listener); }
Source:
<code>void doNotAllowCreationOfQueueWithRandomCapacity() { <START> assertThrows( AssertionError.class, () -> new PrimitiveLongArrayQueue( 7 ) ); <END> }</code><technical_language>eliminate assert statement in ctor replace IAE</technical_language>

Target:
void doNotAllowCreationOfQueueWithRandomCapacity() { assertThrows( IllegalArgumentException.class, () -> new PrimitiveLongArrayQueue( 7 ) ); }
Source:
<code>public void invoke(Object receiver, String methodName, String argument) { Util.throwIfNull(receiver, methodName, argument); <START> for (TypedMethodInvoker<?> invoker : invokers) { <END> if (invoker.invoke(receiver, methodName, argument)) { return; } } }</code><technical_language>int size = invokers.size(); for (int i = 0; i < size; ++i) { final TypedMethodInvoker<?> invoker = invokers.get(i); ..</technical_language>

Target:
public void invoke(Object receiver, String methodName, String argument) { Util.throwIfNull(receiver, methodName, argument); int size = invokers.size(); for (int i = 0; i < size; ++i) { final TypedMethodInvoker<?> invoker = invokers.get(i); if (invoker.invoke(receiver, methodName, argument)) { return; } } LogUtil.w("Method with name " + methodName + " not found for any of the MethodInvoker supported argument types."); }
Source:
<code>public void onFailure(Throwable t) { runningProcessors.remove(processor); <START> throwable.compareAndSet(null, t); <END> latch.countDown(); }</code><technical_language>need stop remaining runningProcessors somewhere, right</technical_language>

Target:
public void onFailure(Throwable t) { processors.remove(processor); processor = null; if (failure.compareAndSet(null, t)) { processors.forEach(StreamProcessor::stop); } if (processors.isEmpty()) { shutdownAndNotify(); } }
Source:
<code>public static Row createRow(final Map<String, Object> sourceMap, final String documentId, final DataSetHeader header) { if (sourceMap == null) { <START> return null; <END> } final Object[] values = new Object[header.size()]; for (int i = 0; i < values.length; i++) { final SelectItem selectItem = header.getSelectItem(i); final Column column = selectItem.getColumn(); assert column != null; assert selectItem.getAggregateFunction() == null; assert selectItem.getScalarFunction() == null; if (column.isPrimaryKey()) { values[i] = documentId; } else { Object value = sourceMap.get(column.getName()); if (column.getType() == ColumnType.DATE) { Date valueToDate = ElasticSearchDateConverter.tryToConvert((String) value); if (valueToDate == null) { values[i] = value; } else { values[i] = valueToDate; } } else { values[i] = value; } } } return new DefaultRow(header, values); }</code><technical_language>This added of a NPE; fixes problem. However, changed functionality a bit. Previous version returned a Row null values. This returns null immediately. In extension_elasticsearch (our internal project) I added a null check work fine this, I if this problem else not</technical_language>

Target:
public static Row createRow(final Map<String, Object> sourceMap, final String documentId, final DataSetHeader header) { final Object[] values = new Object[header.size()]; for (int i = 0; i < values.length; i++) { final SelectItem selectItem = header.getSelectItem(i); final Column column = selectItem.getColumn(); assert column != null; assert selectItem.getAggregateFunction() == null; assert selectItem.getScalarFunction() == null; if (column.isPrimaryKey()) { values[i] = documentId; } else { if (sourceMap != null) { final Object value = sourceMap.get(column.getName()); if (column.getType() == ColumnType.DATE) { final Date valueToDate = ElasticSearchDateConverter.tryToConvert((String) value); if (valueToDate == null) { values[i] = value; } else { values[i] = valueToDate; } } else { values[i] = value; } } } } return new DefaultRow(header, values); }
Source:
<code>private void createUpdateDeleteTest(String systemScope) { final ManagedCredentials c = new ManagedCredentials(jenkins); c.open(); UserPwdCredential upc = c.add(UserPwdCredential.class); upc.username.set(CRED_USER); upc.password.set(CRED_PWD); upc.description.set("Credential description"); upc.scope.select(systemScope); upc.setId(CRED_ID); c.save(); verifyInputValue(CRED_ID, USERNAME_INPUT, CRED_USER); c.open(); <START> upc = c.get(UserPwdCredential.class, CRED_ID); <END> final String usernameModified = CRED_USER + "-Modified"; upc.username.set(usernameModified); c.save(); verifyInputValue(CRED_ID, USERNAME_INPUT, usernameModified); c.open(); upc = c.get(UserPwdCredential.class, CRED_ID); upc.delete.click(); c.save(); verifyCredentialNotPresent(CRED_ID); }</code><technical_language>Is needed PageArea (the implementation of getmethods sound fragile me)? reuse instance have? fact navigated matter</technical_language>

Target:
private void createUpdateDeleteTest(String systemScope) { final ManagedCredentials c = new ManagedCredentials(jenkins); c.open(); final UserPwdCredential upc = createUserPwdCredential(c.add(UserPwdCredential.class), CRED_USER, CRED_PWD, "Descr", systemScope); c.save(); verifyValueForElement(upc.username, CRED_USER); c.open(); final String usernameModified = CRED_USER + "-Modified"; upc.username.set(usernameModified); c.save(); verifyValueForElement(upc.username, usernameModified); c.open(); upc.delete(); c.save(); verifyElementNotPresent(upc.username); }
Source:
<code>private void updateNextRunConfiguration() { final VmStatic nextRunConfigurationStatic = runInternalQuery( VdcQueryType.GetVmNextRunConfiguration, new IdQueryParameters(getVmId())) .<VM>getReturnValue() .getStaticData(); final int newMemorySize = nextRunConfigurationStatic.getMemSizeMb() - getParameters().getMemorySizeMb(); if (newMemorySize <= 0) { return; } nextRunConfigurationStatic.setMemSizeMb(newMemorySize); if (newMemorySize < nextRunConfigurationStatic.getMinAllocatedMem()) { nextRunConfigurationStatic.setMinAllocatedMem(newMemorySize); } vmHandler.createNextRunSnapshot( <START> getVm(), nextRunConfigurationStatic, null, getCompensationContext()); <END> }</code><technical_language>I logic extended "if memory size next-run configuration is this in vm_static, do anything" handle case: 1. VM runs 8G 2. User updates 4G asks this change postponed next-restart 3. unplug 2G => this logic VM change 6G next restart user expect reduced 4G</technical_language>

Target:
private void updateNextRunConfiguration() { final VmStatic nextRunConfigurationStatic = runInternalQuery( VdcQueryType.GetVmNextRunConfiguration, new IdQueryParameters(getVmId())) .<VM>getReturnValue() .getStaticData(); final int newMemorySize = nextRunConfigurationStatic.getMemSizeMb() - getParameters().getMemorySizeMb(); if (newMemorySize <= 0) { return; } if (getVm().getMemSizeMb() != nextRunConfigurationStatic.getMemSizeMb()) { return; } nextRunConfigurationStatic.setMemSizeMb(newMemorySize); if (newMemorySize < nextRunConfigurationStatic.getMinAllocatedMem()) { nextRunConfigurationStatic.setMinAllocatedMem(newMemorySize); } vmHandler.createNextRunSnapshot( getVm(), nextRunConfigurationStatic, null, getCompensationContext()); }
Source:
<code>protected void executeCommand() { log.info("Power-Management: of host '{}' initiated.", getAction(), getVdsName()); audit(AuditLogType.FENCE_OPERATION_STARTED); VDSStatus lastStatus = getVds().getStatus(); FenceOperationResult result = null; try { setup(); result = createHostFenceActionExecutor( getVds(), getParameters().getFencingPolicy() ).fence(getAction()); handleResult(result); if (getSucceeded()) { log.info("Power-Management: host '{}' succeeded.", getAction(), getVdsName()); audit(AuditLogType.FENCE_OPERATION_SUCCEEDED); } else { log.info("Power-Management: host '{}' failed.", getAction(), getVdsName()); audit(AuditLogType.FENCE_OPERATION_FAILED); } } finally { if (!getSucceeded()) { setStatus(lastStatus); if (result != null && result.getStatus() != Status.SKIPPED_DUE_TO_POLICY) { alertIfPowerManagementOperationFailed(); } throw new EngineException(EngineError.VDS_FENCE_OPERATION_FAILED); } else { teardown(); <START> runSleepOnReboot(); <END> } } }</code><technical_language>This perform sleep for StopVdsCommand, want. Please move this execution StartVdsCommand.teardown() method</technical_language>

Target:
protected void executeCommand() { log.info("Power-Management: of host '{}' initiated.", getAction(), getVdsName()); audit(AuditLogType.FENCE_OPERATION_STARTED); VDSStatus lastStatus = getVds().getStatus(); FenceOperationResult result = null; try { setup(); result = createHostFenceActionExecutor( getVds(), getParameters().getFencingPolicy() ).fence(getAction()); handleResult(result); if (getSucceeded()) { log.info("Power-Management: host '{}' succeeded.", getAction(), getVdsName()); audit(AuditLogType.FENCE_OPERATION_SUCCEEDED); } else { log.info("Power-Management: host '{}' failed.", getAction(), getVdsName()); audit(AuditLogType.FENCE_OPERATION_FAILED); } } finally { if (!getSucceeded()) { setStatus(lastStatus); if (result != null && result.getStatus() != Status.SKIPPED_DUE_TO_POLICY) { alertIfPowerManagementOperationFailed(); } throw new EngineException(EngineError.VDS_FENCE_OPERATION_FAILED); } else { teardown(); } } }
Source:
<code>public Map<String, Object> execute(Map<String, ?> context) { final ServiceReference<RuleRegistry> reference = (ServiceReference<RuleRegistry>) bundleContext .getServiceReference(RuleRegistry.class.getName()); if (reference != null) { RuleRegistry registry = bundleContext.getService(reference); if (registry != null) { for (int i = 0; i < UIDs.length; i++) { registry.setEnabled(UIDs[i], enable); } } else { for (int i = 0; i < UIDs.length; i++) { <START> logger.warn("Action is not applyed to because RuleRegistry is not available", UIDs[i]); <END> } } } else { logger.warn( "Action can not be applyed because a reference to the 'RuleRegistry' service is not available."); } return null; }</code><technical_language>typo: applied</technical_language>

Target:
public Map<String, Object> execute(Map<String, ?> context) { for (String uid : UIDs) { if (ruleRegistry != null) { ruleRegistry.setEnabled(uid, enable); } else { logger.warn("Action is not applyed to because RuleRegistry is not available.", uid); } } return null; }
Source:
<code>public void shouldCreateEncounter() throws HttpException, ParseException, InterruptedException { assertTrue(mrsListener.created); assertFalse(mrsListener.deleted); assertEquals(encounter.getUuid(), mrsListener.eventParameters.get(EventKeys.ENCOUNTER_ID)); assertEquals(encounter.getProvider().getUuid(), mrsListener.eventParameters.get(EventKeys.PROVIDER_ID)); assertEquals(encounter.getLocation().getUuid(), mrsListener.eventParameters.get(EventKeys.LOCATION_ID)); assertEquals(encounter.getEncounterDatetime(), mrsListener.eventParameters.get(EventKeys.ENCOUNTER_DATE)); assertEquals(encounter.getEncounterType().getUuid(), mrsListener.eventParameters.get(EventKeys.ENCOUNTER_TYPE)); <START> Encounter fetchedEncounter = encounterAdapter.getEncounterByUuid(DEFAULT_CONFIG_NAME, encounter.getUuid()); <END> Observation fetchedObservation = obsAdapter.getObservationByUuid(DEFAULT_CONFIG_NAME, fetchedEncounter.getObs().get(0).getUuid()); assertEquals(observation.getValue(), fetchedObservation.getValue()); assertEquals(observation.getConcept(), fetchedObservation.getConcept()); assertEquals(observation.getObsDatetime(), fetchedObservation.getObsDatetime()); }</code><technical_language>do need fetch encounter server, done</technical_language>

Target:
public void shouldCreateEncounter() throws HttpException, ParseException, InterruptedException { assertTrue(mrsListener.created); assertFalse(mrsListener.deleted); assertEquals(encounter.getUuid(), mrsListener.eventParameters.get(EventKeys.ENCOUNTER_ID)); assertEquals(encounter.getProvider().getUuid(), mrsListener.eventParameters.get(EventKeys.PROVIDER_ID)); assertEquals(encounter.getLocation().getUuid(), mrsListener.eventParameters.get(EventKeys.LOCATION_ID)); assertEquals(encounter.getEncounterDatetime(), mrsListener.eventParameters.get(EventKeys.ENCOUNTER_DATE)); assertEquals(encounter.getEncounterType().getUuid(), mrsListener.eventParameters.get(EventKeys.ENCOUNTER_TYPE)); Observation fetchedObservation = obsAdapter.getObservationByUuid(DEFAULT_CONFIG_NAME, encounter.getObs().get(0).getUuid()); assertEquals(observation.getValue(), fetchedObservation.getValue()); assertEquals(observation.getConcept(), fetchedObservation.getConcept()); assertEquals(observation.getObsDatetime(), fetchedObservation.getObsDatetime()); }
Source:
<code>public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationContext context) { ConditionCohortDefinition cd = (ConditionCohortDefinition) cohortDefinition; HqlQueryBuilder query = new HqlQueryBuilder(); query.select("c.patient.patientId") .from(Condition.class, "c") .wherePatientIn("c.patient.patientId", context) .whereEqual("c.condition.coded", cd.getConditionCoded()) .whereEqual("c.condition.nonCoded", cd.getConditionNonCoded()) .whereGreaterOrEqualTo("c.dateCreated", cd.getOnOrAfter()) <START> .whereLessOrEqualTo("c.dateCreated", cd.getOnOrBefore()); <END> List<Integer> patientIds = evaluationService.evaluateToList(query, Integer.class, context); Cohort cohort = new Cohort(patientIds); return new EvaluatedCohort(cohort, cd, context); }</code><technical_language>This wrong me, ambiguous unclear lead problems. Condition class "onsetDate", "endDate", "dateCreated" property. I dateCreated is useful of in cases, if systems point of care backentry of data is common. need a lot more explicit here. vote for "onsetDateOnOrBefore", "onsetDateOnOrAfter", "endDateOnOrBefore", "endDateOnOrAfter", "createdOnOrBefore", "createdOnOrAfter", etc. handle of cases explicitly. want "activeOnDate", onsetDate endDate ensures passed date falls dates (or null)</technical_language>

Target:
public EvaluatedCohort evaluate(CohortDefinition cohortDefinition, EvaluationContext context) { ConditionCohortDefinition cd = (ConditionCohortDefinition) cohortDefinition; HqlQueryBuilder query = new HqlQueryBuilder(); query.select("c.patient.patientId") .from(Condition.class, "c") .wherePatientIn("c.patient.patientId", context) .whereEqual("c.condition.coded", cd.getConditionCoded()) .whereEqual("c.condition.nonCoded", cd.getConditionNonCoded()) .whereGreaterOrEqualTo("c.dateCreated", cd.getCreatedOnOrAfter()) .whereLessOrEqualTo("c.dateCreated", cd.getCreatedOnOrBefore()) .whereGreaterOrEqualTo("c.onsetDate", cd.getOnsetDateOnOrAfter()) .whereLessOrEqualTo("c.onsetDate", cd.getOnsetDateOnOrBefore()) .whereGreaterOrEqualTo("c.endDate", cd.getEndDateOnOrAfter()) .whereLessOrEqualTo("c.endDate", cd.getEndDateOnOrBefore()) .whereGreater("c.endDate", cd.getActiveOnDate()) .whereLess("c.onsetDate", cd.getActiveOnDate()); List<Integer> patientIds = evaluationService.evaluateToList(query, Integer.class, context); Cohort cohort = new Cohort(patientIds); return new EvaluatedCohort(cohort, cd, context); }
Source:
<code>private void downloadJsonFile(HttpServletRequest request, HttpServletResponse response) { try { response.setContentType("application/json"); String jsonContent = extractJsonStringFromRequest(request); String nodeSourceName = extractNodeSourceName(jsonContent); response.setHeader("Content-disposition", "attachment; filename=" + nodeSourceName + NODE_SOURCE_FILE_NAME_SUFFIX); response.setHeader("Location", nodeSourceName + NODE_SOURCE_FILE_NAME_SUFFIX); response.getWriter().write(jsonContent); <START> } catch (Throwable t) { <END> try { LOGGER.warn("Export node source failed", t); response.getWriter().write(t.getMessage()); } catch (IOException e) { LOGGER.warn("Failed to return node source export error to client, error was:" + t.getMessage(), e); } } }</code><technical_language>is overkill Throwable instead of Exception</technical_language>

Target:
private void downloadJsonFile(HttpServletRequest request, HttpServletResponse response) { try { response.setContentType("application/json"); String jsonContent = extractJsonStringFromRequest(request); String nodeSourceName = extractNodeSourceName(jsonContent); response.setHeader("Content-disposition", "attachment; filename=" + nodeSourceName + NODE_SOURCE_FILE_NAME_SUFFIX); response.setHeader("Location", nodeSourceName + NODE_SOURCE_FILE_NAME_SUFFIX); response.getWriter().write(jsonContent); } catch (Exception e) { try { LOGGER.warn("Export node source failed", e); response.getWriter().write(e.getMessage()); } catch (IOException ioe) { LOGGER.warn("Failed to return node source export error to client", ioe); } } }
Source:
<code>public EEFTabbedPropertySheetPage(Object contributor, String contributorId) { if (contributor instanceof IEEFTabbedPropertySheetPageContributor) { this.contributor = (IEEFTabbedPropertySheetPageContributor) contributor; } else { this.contributor = new ContributorWrapper(contributor, contributorId); } this.registry = <START> EEFTabbedPropertyRegistry.getDefault(this.contributor.getContributorId()); <END> }</code><technical_language>this.contributor</technical_language>

Target:
public EEFTabbedPropertySheetPage(Object contributor, String contributorId) { if (contributor instanceof IEEFTabbedPropertySheetPageContributor) { this.contributor = (IEEFTabbedPropertySheetPageContributor) contributor; } else { this.contributor = new ContributorWrapper(contributor, contributorId); } this.registry = EEFTabbedPropertyRegistry.getDefault(this.contributor); }
Source:
<code>protected void notifyEvent(CoreSession session, Task task, List<DocumentModel> docs, String event, Map<String, Serializable> eventInfo, String comment, NuxeoPrincipal principal, List<String> actorIds) { Map<String, Serializable> eventProperties = new HashMap<>(); <START> ArrayList<String> notificationRecipients = new ArrayList<>(actorIds); <END> eventProperties.put(NotificationConstants.RECIPIENTS_KEY, notificationRecipients.toArray(new String[notificationRecipients.size()])); if (eventInfo != null) { eventProperties.putAll(eventInfo); } for (DocumentModel doc : docs) { TaskEventNotificationHelper.notifyEvent(session, doc, principal, task, event, eventProperties, comment, null); } }</code><technical_language>cleaning code, change declared type List</technical_language>

Target:
protected void notifyEvent(CoreSession session, Task task, List<DocumentModel> docs, String event, Map<String, Serializable> eventInfo, String comment, NuxeoPrincipal principal, List<String> actorIds) { Map<String, Serializable> eventProperties = new HashMap<>(); List<String> notificationRecipients = new ArrayList<>(actorIds); eventProperties.put(NotificationConstants.RECIPIENTS_KEY, notificationRecipients.toArray(new String[notificationRecipients.size()])); if (eventInfo != null) { eventProperties.putAll(eventInfo); } for (DocumentModel doc : docs) { TaskEventNotificationHelper.notifyEvent(session, doc, principal, task, event, eventProperties, comment, null); } }
Source:
<code>public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xf, float yf, float zf) { TileEntityBoiler tileEntity = (TileEntityBoiler) world.getTileEntity(x, y, z); boolean isClient = !world.isRemote; if (tileEntity != null) { if (!FluidHelper.playerIsHoldingWaterContainer(player) && isClient && tileEntity != null) { player.openGui(Steamcraft.instance, 0, world, x, y, z); } else { FluidHelper.fillTankFromHeldItem(player, tileEntity.myTank); } } <START> <END> return true; }</code><technical_language>spaces removed</technical_language>

Target:
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xf, float yf, float zf) { TileEntityBoiler tileEntity = (TileEntityBoiler) world.getTileEntity(x, y, z); boolean isClient = !world.isRemote; if (tileEntity != null) { if (!FluidHelper.playerIsHoldingWaterContainer(player) && isClient) { player.openGui(Steamcraft.instance, 0, world, x, y, z); } else { FluidHelper.fillTankFromHeldItem(player, tileEntity.myTank); } } return true; }
Source:
<code>public void setActive(String name) { if (StringUtil.isNullOrEmpty(name)) { <START> Debug.logWarning("Active column should be set to the main source window instead of null."); <END> if (activeColumn_ != null) { activeColumn_.setActiveEditor(""); activeColumn_ = null; } return; } SourceColumn column = getByName(name); if (column == null) column = getByName(MAIN_SOURCE_NAME); setActive(column); }</code><technical_language>want leave this in</technical_language>

Target:
public void setActive(String name) { if (StringUtil.isNullOrEmpty(name)) { if (activeColumn_ != null) { activeColumn_.setActiveEditor(""); activeColumn_ = null; } return; } SourceColumn column = getByName(name); if (column == null) column = getByName(MAIN_SOURCE_NAME); setActive(column); }
Source:
<code>public void close() { closed = true; <START> for (Grouper<KeyType> grouper : groupers) { <END> grouper.close(); } }</code><technical_language>forEach</technical_language>

Target:
public void close() { if (!closed) { closed = true; groupers.forEach(Grouper::close); } }
Source:
<code>public void update(DownloadBatchStatus currentDownloadBatchStatus) { if (callback == null) { <START> throw new IllegalStateException("A DownloadBatchStatusCallback must be set before an update is called."); <END> } if (progressHasChanged(currentDownloadBatchStatus)) { currentProgress = currentDownloadBatchStatus.percentageDownloaded(); callback.onUpdate(currentDownloadBatchStatus); } }</code><technical_language>hand I agree, other refactor this callback works: in stopUldates() set callback null, implying forwarding anymore (callback is null) receive update downstream (because crash). This assumption is wrong in opinion..</technical_language>

Target:
public void update(DownloadBatchStatus currentDownloadBatchStatus) { if (callback == null) { Logger.w("A DownloadBatchStatusCallback must be set before an update is called."); return; } if (progressHasChanged(currentDownloadBatchStatus)) { currentProgress = currentDownloadBatchStatus.percentageDownloaded(); callback.onUpdate(currentDownloadBatchStatus); } }
Source:
<code>public void clickOnAllStacksButton() { seleniumWebDriverHelper.waitAndClick(By.xpath(Locators.ALL_STACKS_BUTTON_XPATH)); <START> WaitUtils.sleepQuietly(1); <END> }</code><technical_language>Do need WaitUtils.sleepQuietly(1) here</technical_language>

Target:
public void clickOnAllStacksButton() { seleniumWebDriverHelper.waitAndClick(By.xpath(Locators.ALL_STACKS_BUTTON_XPATH)); }
Source:
<code>public void createWebProject(String name,String runtime, boolean webxml){ WebProjectWizard dw = new WebProjectWizard(); dw.open(); WebProjectFirstPage dfp = new WebProjectFirstPage(dw); dfp.setProjectName(name); if(runtime == null){ dfp.setTargetRuntime("<None>"); } else { dfp.setTargetRuntime(runtime); } if (getJavaVersion().equals("1.8")) { new PushButton("Modify...").click(); Tree tree = new DefaultTree(); tree.getItem("Java").select(); tree.getContextMenu().getItem("Change Version...").select(); new DefaultCombo(0).setSelection("1.8"); new PushButton("OK").click(); <START> new PushButton("OK").click(); <END> } dw.next(); dw.next(); WebProjectThirdPage dtp = new WebProjectThirdPage(dw); dtp.setGenerateWebXmlDeploymentDescriptor(webxml); dw.finish(); waitForAllScheduledJobs(); }</code><technical_language>a bug: new OkButtont()</technical_language>

Target:
public void createWebProject(String name,String runtime, boolean webxml){ WebProjectWizard dw = new WebProjectWizard(); dw.open(); WebProjectFirstPage dfp = new WebProjectFirstPage(dw); dfp.setProjectName(name); if(runtime == null){ dfp.setTargetRuntime("<None>"); } else { dfp.setTargetRuntime(runtime); } if (!JavaVersionHelper.getJavaVersion().equals("1.8")) { new PushButton("Modify...").click(); Tree tree = new DefaultTree(); tree.getItem("Java").select(); tree.getContextMenu().getItem("Change Version...").select(); new DefaultCombo(0).setSelection("1.8"); new OkButton().click(); new OkButton().click(); } dw.next(); dw.next(); WebProjectThirdPage dtp = new WebProjectThirdPage(dw); dtp.setGenerateWebXmlDeploymentDescriptor(webxml); dw.finish(); waitForAllScheduledJobs(); }