auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void checkCacheReload() { if (nextLoadTime > System.currentTimeMillis()) { return; } <START> if (nextLoadTime > 0) { <END> LOG.info("Lookup join cache has expired after minute(s), reloading", getCacheTTL().toMinutes()); } cache.clear(); try { T[] inputSplits = inputFormat.createInputSplits(1); GenericRowData reuse = new GenericRowData(producedNames.length); long count = 0; for (T split : inputSplits) { inputFormat.open(split); while (!inputFormat.reachedEnd()) { RowData row = inputFormat.nextRecord(reuse); count++; Row key = extractKey(row); List<RowData> rows = cache.computeIfAbsent(key, k -> new ArrayList<>()); rows.add(serializer.copy(row)); } inputFormat.close(); } nextLoadTime = System.currentTimeMillis() + getCacheTTL().toMillis(); LOG.info("Loaded row(s) into lookup join cache", count); } catch (IOException e) { throw new FlinkRuntimeException("Failed to load table into cache", e); } }</code><technical_language>log initial loading</technical_language>

Target:
private void checkCacheReload() { if (nextLoadTime > System.currentTimeMillis()) { return; } if (nextLoadTime > 0) { LOG.info("Lookup join cache has expired after minute(s), reloading", getCacheTTL().toMinutes()); } else { LOG.info("Populating lookup join cache"); } cache.clear(); try { T[] inputSplits = inputFormat.createInputSplits(1); GenericRowData reuse = new GenericRowData(producedNames.length); long count = 0; for (T split : inputSplits) { inputFormat.open(split); while (!inputFormat.reachedEnd()) { RowData row = inputFormat.nextRecord(reuse); count++; Row key = extractKey(row); List<RowData> rows = cache.computeIfAbsent(key, k -> new ArrayList<>()); rows.add(serializer.copy(row)); } inputFormat.close(); } nextLoadTime = System.currentTimeMillis() + getCacheTTL().toMillis(); LOG.info("Loaded row(s) into lookup join cache", count); } catch (IOException e) { throw new FlinkRuntimeException("Failed to load table into cache", e); } }
Source:
<code>public void waitUntilReady(long interval) throws IOException, IndicoException { String status; while (true) { status = this.client.info(this.collectionName).get("status").toString(); if (Objects.equals(status, "ready")) return; if (!Objects.equals(status, "training")) <START> Logger.getLogger("indico").log(Level.WARNING, "Collection training has failed with status " + status); <END> try { Thread.sleep(interval); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } } }</code><technical_language>Exception instead of warning</technical_language>

Target:
public void waitUntilReady(long interval) throws IOException, IndicoException { String status; while (true) { status = this.client.info(this.collectionName).get("status").toString(); if (Objects.equals(status, "ready")) return; if (!Objects.equals(status, "training")) throw new IndicoException("Collection training has failed with status " + status); try { Thread.sleep(interval); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } } }
Source:
<code>private String getSauceLabsRestApi(String urlString) { <START> URL url; <END> HttpURLConnection conn = null; StringBuilder result = new StringBuilder(); int numRetriesOnFailure = 0; int sauceTimeOut = getSauceTimeout(); do { try { url = new URL(urlString); conn = (HttpURLConnection) url.openConnection(); conn.setConnectTimeout(sauceTimeOut); conn.setReadTimeout(sauceTimeOut); conn.setRequestMethod("GET"); conn.setRequestProperty("Accept", "application/json"); conn.setRequestProperty("Authorization", "Basic " + SauceConfigReader.getInstance().getAuthenticationKey()); if (conn.getResponseCode() != HttpStatus.SC_OK) { throw new IOException("Failed : HTTP error code : " + conn.getResponseCode()); } BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream()))); String input; while ((input = br.readLine()) != null) { result.append(input); } br.close(); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } finally { if (conn != null) { conn.disconnect(); } } } while (StringUtils.isEmpty(result.toString()) && numRetriesOnFailure++ < getSauceRetryCount()); return result.toString(); }</code><technical_language>URL declaration moved try block</technical_language>

Target:
private String getSauceLabsRestApi(String urlString) { HttpURLConnection conn = null; StringBuilder result = new StringBuilder(); int numRetriesOnFailure = 0; int sauceTimeOut = getSauceTimeout(); do { try { URL url = new URL(urlString); conn = (HttpURLConnection) url.openConnection(); conn.setConnectTimeout(sauceTimeOut); conn.setReadTimeout(sauceTimeOut); conn.setRequestMethod("GET"); conn.setRequestProperty("Accept", "application/json"); conn.setRequestProperty("Authorization", "Basic " + SauceConfigReader.getInstance().getAuthenticationKey()); if (conn.getResponseCode() != HttpStatus.SC_OK) { throw new IOException("Failed: HTTP error code: " + conn.getResponseCode()); } BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream()))); String input; while ((input = br.readLine()) != null) { result.append(input); } br.close(); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } finally { if (conn != null) { conn.disconnect(); } } } while (StringUtils.isEmpty(result.toString()) && numRetriesOnFailure++ < getSauceRetryCount()); return result.toString(); }
Source:
<code>protected boolean canDoAction() { GlusterVolumeGeoRepCreateParameters parameter = getParameters(); if(parameter == null || parameter.getSlaveHost() == null || parameter.getSlaveVolumeName() == null || parameter.getUserName() == null || parameter.getSlaveUserPassword() == null) { return false; } masterVolume = getGlusterVolume(); if (!masterVolume.isOnline()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN); addCanDoActionMessageVariable("volumeName", masterVolume.getName()); return false; } List<GlusterGeoRepSession> sessions = getGlusterGeoRepDao().getGeoRepSessions(parameter.getVolumeId()); if (sessions != null) { for (GlusterGeoRepSession session : sessions) { <START> if (session.getMasterVolumeId() == parameter.getVolumeId() <END> && session.getSlaveHostName() == parameter.getSlaveHost() && session.getSlaveVolumeName() == parameter.getSlaveVolumeName()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GEOREP_SESSION_CREATED); return false; } } } return true; }</code><technical_language>care of FindBugs -- equals(parameter.getVolumeId())</technical_language>

Target:
protected boolean canDoAction() { GlusterVolumeGeoRepCreateParameters parameter = getParameters(); if(parameter == null || parameter.getSlaveHost() == null || parameter.getSlaveVolumeName() == null || parameter.getUserName() == null || parameter.getSlaveUserPassword() == null) { return false; } masterVolume = getGlusterVolume(); if (!masterVolume.isOnline()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN); addCanDoActionMessageVariable("volumeName", masterVolume.getName()); return false; } List<GlusterGeoRepSession> sessions = getGlusterGeoRepDao().getGeoRepSessions(parameter.getVolumeId()); if (sessions != null) { for (GlusterGeoRepSession session : sessions) { if (session.getMasterVolumeId().equals(parameter.getVolumeId()) && session.getSlaveHostName().equals(parameter.getSlaveHost()) && session.getSlaveVolumeName().equals(parameter.getSlaveVolumeName())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GEOREP_SESSION_CREATED); return false; } } } return true; }
Source:
<code>protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { CoreNamespaceUtils.autoregisterBeansForNamespace(parserContext, parserContext.extractSource(element)); JsrNamespaceUtils.autoregisterJsrBeansForNamespace(parserContext); String jobName = element.getAttribute(ID_ATTRIBUTE); if(PropertyParser.hasPath()) { <START> LOG.error("Job parsing started for job name: " + jobName + " and property parser path already populated, clearing path.."); <END> PropertyParser.clearPath(); } PropertyParser.pushPath(jobName); builder.addConstructorArgValue(jobName); String restartableAttribute = element.getAttribute(RESTARTABLE_ATTRIBUTE); if (StringUtils.hasText(restartableAttribute)) { builder.addPropertyValue("restartable", restartableAttribute); } BeanDefinition flowDef = new FlowParser(jobName, jobName).parse(element, parserContext); builder.addPropertyValue("flow", flowDef); AbstractBeanDefinition stepContextBeanDefinition = BeanDefinitionBuilder.genericBeanDefinition(StepContextFactoryBean.class) .getBeanDefinition(); stepContextBeanDefinition.setScope("step"); parserContext.getRegistry().registerBeanDefinition("stepContextFactory", stepContextBeanDefinition); new ListnerParser(JobListenerFactoryBean.class, "jobExecutionListeners").parseListeners(element, parserContext, builder); new PropertyParser(PropertyParser.JOB_ARTIFACT_PROPERTY_PREFIX + jobName, parserContext).parseProperties(element); PropertyParser.popPath(); }</code><technical_language>a warn level throw exception of some kind..</technical_language>

Target:
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { CoreNamespaceUtils.autoregisterBeansForNamespace(parserContext, parserContext.extractSource(element)); JsrNamespaceUtils.autoregisterJsrBeansForNamespace(parserContext); String jobName = element.getAttribute(ID_ATTRIBUTE); if(PropertyParser.hasPath()) { PropertyParser.clearPath(); throw new IllegalArgumentException("Job parsing started for job name: " + jobName + " and property parser path already populated."); } PropertyParser.pushPath(jobName); builder.addConstructorArgValue(jobName); String restartableAttribute = element.getAttribute(RESTARTABLE_ATTRIBUTE); if (StringUtils.hasText(restartableAttribute)) { builder.addPropertyValue("restartable", restartableAttribute); } BeanDefinition flowDef = new FlowParser(jobName, jobName).parse(element, parserContext); builder.addPropertyValue("flow", flowDef); AbstractBeanDefinition stepContextBeanDefinition = BeanDefinitionBuilder.genericBeanDefinition(StepContextFactoryBean.class) .getBeanDefinition(); stepContextBeanDefinition.setScope("step"); parserContext.getRegistry().registerBeanDefinition("stepContextFactory", stepContextBeanDefinition); new ListnerParser(JobListenerFactoryBean.class, "jobExecutionListeners").parseListeners(element, parserContext, builder); new PropertyParser(PropertyParser.JOB_ARTIFACT_PROPERTY_PREFIX + jobName, parserContext).parseProperties(element); PropertyParser.popPath(); }
Source:
<code>public Object toJson(AggregateCall node) { final Map<String, Object> map = jsonBuilder.map(); Map<String, Object> aggMap = new HashMap(toJson(node.getAggregation())); <START> aggMap.put("class", node.getAggregation().getClass().getName()); <END> map.put("agg", aggMap); map.put("type", toJson(node.getType())); map.put("distinct", node.isDistinct()); map.put("operands", node.getArgList()); map.put("name", node.getName()); return map; }</code><technical_language>new a map here, is OK do this? final Map<String, Object> aggMap = toJson(node.getAggregation()); aggMap.put("class", node.getAggregation().getClass().getName()); need add class info for UDAF, for system aggregate function, do need add class info in map</technical_language>

Target:
public Object toJson(AggregateCall node) { final Map<String, Object> map = jsonBuilder.map(); final Map<String, Object> aggMap = toJson(node.getAggregation()); if (node.getAggregation().getFunctionType().isUserDefined()) { aggMap.put("class", node.getAggregation().getClass().getName()); } map.put("agg", aggMap); map.put("type", toJson(node.getType())); map.put("distinct", node.isDistinct()); map.put("operands", node.getArgList()); map.put("name", node.getName()); return map; }
Source:
<code>public void render(Context context, ImageResource value, SafeHtmlBuilder sb) { if (value != null) { sb.append(template.imageContainerWithStyleClass( styleClass.equals("") ? style : "", <START> styleClass, <END> SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(value).getHTML()))); } }</code><technical_language>I this is correct. This class style. is both. style takes precedent class</technical_language>

Target:
public void render(Context context, ImageResource value, SafeHtmlBuilder sb) { if (value != null) { sb.append(template.imageContainerWithStyleClass( style, styleClass, SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(value).getHTML()))); } }
Source:
<code>private void applyEdits(ServiceFeatureTable featureTable) { final ListenableFuture<List<FeatureEditResult>> editResult = featureTable.applyEditsAsync(); editResult.addDoneListener(() -> { try { <START> List<FeatureEditResult> edits = editResult.get(); <END> if (edits != null && edits.size() > 0) { if (!edits.get(0).hasCompletedWithErrors()) { runOnUiThread(() -> logToUser(getString(R.string.feature_added))); } else { throw edits.get(0).getError(); } } } catch (InterruptedException | ExecutionException e) { runOnUiThread(() -> logToUser(getString(R.string.error_applying_edits, e.getCause().getMessage()))); } }); }</code><technical_language>editResults</technical_language>

Target:
private void applyEdits(ServiceFeatureTable featureTable) { final ListenableFuture<List<FeatureEditResult>> editResult = featureTable.applyEditsAsync(); editResult.addDoneListener(() -> { try { List<FeatureEditResult> editResults = editResult.get(); if (editResults != null && !editResults.isEmpty()) { if (!editResults.get(0).hasCompletedWithErrors()) { runOnUiThread(() -> logToUser(false, getString(R.string.feature_added))); } else { throw editResults.get(0).getError(); } } } catch (InterruptedException | ExecutionException e) { runOnUiThread(() -> logToUser(true, getString(R.string.error_applying_edits, e.getCause().getMessage()))); } }); }
Source:
<code>public ImmutableBitmap getBitmapIndex(BitmapIndexSelector selector) { if (filters.size() == 1) { return filters.get(0).getBitmapIndex(selector); } <START> final List<ImmutableBitmap> bitmaps = Lists.newArrayList(); <END> for (final Filter filter : filters) { final ImmutableBitmap bitmapIndex = filter.getBitmapIndex(selector); if (bitmapIndex.isEmpty()) { return Filters.allFalse(selector); } bitmaps.add(bitmapIndex); } return selector.getBitmapFactory().intersection(bitmaps); }</code><technical_language>give list capacity for filters.size construction</technical_language>

Target:
public ImmutableBitmap getBitmapIndex(BitmapIndexSelector selector) { return getBitmapIndex(selector, filters); }
Source:
<code>public void Facebook_002_noEmailPerms() { WikiBasePageObject base = new WikiBasePageObject(driver); FacebookMainPageObject fbLogin = base.openFacebookMainPage(); FacebookUserPageObject userFB; userFB = fbLogin.login(credentials.emailFB, credentials.passwordFB); userFB.verifyPageLogo(); SignUpPageObject signUp = userFB.openSpecialSignUpPage(wikiURL); FacebookSignupModalComponentObject fbModal = signUp.clickFacebookSignUp(); fbModal.acceptWikiaAppPolicyNoEmail(); String userName = "QA" + signUp.getTimeStamp(); String password = "Pass" + signUp.getTimeStamp(); String email = credentials.emailQaart2; String emailPassword = credentials.emailPasswordQaart2; MailFunctions.deleteAllEmails(email, emailPassword); fbModal.typeUserName(userName); fbModal.typePassword(password); fbModal.typeEmail(email); fbModal.createAccount(); signUp.verifyUserLoggedIn(userName); signUp.verifyEmailNotConfirmed(); try { <START> Thread.sleep(5000); <END> } catch (InterruptedException e) { PageObjectLogging.log("noEmailPerms", e.getMessage(), false); } AlmostTherePageObject almostThere = new AlmostTherePageObject(driver); ConfirmationPageObject confirmation = almostThere.enterActivationLink(email, emailPassword, wikiURL); confirmation.typeInUserName(userName); confirmation.typeInPassword(password); UserProfilePageObject userProfile = confirmation.clickSubmitButton(email, emailPassword); userProfile.verifyUserLoggedIn(userName); userProfile.logOut(driver); SpecialUserLoginPageObject login = base.openSpecialUserLogin(wikiURL); login.login(userName, password); login.logOut(driver); SignUpPageObject signUp2 = userFB.openSpecialSignUpPage(wikiURL); FacebookSignupModalComponentObject fbModal2 = signUp2.clickFacebookSignUp(); signUp2.verifyUserLoggedIn(userName); }</code><technical_language>is reason for arbitrary sleep, is wait method aplicable</technical_language>

Target:
public void Facebook_002_noEmailPerms() { WikiBasePageObject base = new WikiBasePageObject(driver); FacebookMainPageObject fbLogin = base.openFacebookMainPage(); FacebookUserPageObject userFB = fbLogin.login(credentials.emailFB, credentials.passwordFB); userFB.verifyPageLogo(); SignUpPageObject signUp = userFB.openSpecialSignUpPage(wikiURL); FacebookSignupModalComponentObject fbModal = signUp.clickFacebookSignUp(); String userName = "QA" + signUp.getTimeStamp(); String password = "Pass" + signUp.getTimeStamp(); String email = credentials.emailQaart2; String emailPassword = credentials.emailPasswordQaart2; fbModal.createAccountNoEmail(email, emailPassword, userName, password); signUp.verifyUserLoggedIn(userName); AlmostTherePageObject almostThere = new AlmostTherePageObject(driver); almostThere.confirmAccountAndLogin(email, emailPassword, userName, password, wikiURL); almostThere.logOut(wikiURL); SignUpPageObject signUp2 = userFB.openSpecialSignUpPage(wikiURL); signUp2.clickFacebookSignUp(); signUp2.verifyUserLoggedIn(userName); }
Source:
<code>public void shouldDeleteAllSpecifiedUsersSuccessfully() { <START> List<String> usernames = new ArrayList<String>() {{ <END> add("john"); add("joan"); }}; List<User> users = new ArrayList<User>() {{ add(new User(usernames.get(0))); add(new User(usernames.get(1))); }}; HttpLocalizedOperationResult result = new HttpLocalizedOperationResult(); userService.deleteUsers(usernames, result); verify(userDao).deleteUsers(usernames); assertThat(result.isSuccessful(), is(true)); assertThat(result.toString(), containsString("RESOURCE_DELETE_SUCCESSFUL")); assertThat(result.toString(), containsString("[john, joan]")); }</code><technical_language>Arrays.asList</technical_language>

Target:
public void shouldDeleteAllSpecifiedUsersSuccessfully() { List<String> usernames = Arrays.asList("john", "joan"); User john = new User("john"); john.disable(); User joan = new User("joan"); joan.disable(); HttpLocalizedOperationResult result = new HttpLocalizedOperationResult(); when(userDao.findUser("john")).thenReturn(john); when(userDao.findUser("joan")).thenReturn(joan); userService.deleteUsers(usernames, result); verify(userDao).deleteUsers(usernames); assertThat(result.isSuccessful(), is(true)); assertThat(result.toString(), containsString("RESOURCES_DELETE_SUCCESSFUL")); assertThat(result.toString(), containsString("[john, joan]")); }
Source:
<code>public Intent getIntent(GraphData data) throws InvalidStateException { render(data); String title = mRenderer.getChartTitle(); if (mData.getType().equals(Graph.TYPE_BUBBLE)) { return ChartFactory.getBubbleChartIntent(mContext, mDataset, mRenderer, title); } if (mData.getType().equals(Graph.TYPE_TIME)) { return ChartFactory.getTimeChartIntent(mContext, mDataset, mRenderer, title, getTimeFormat()); } <START> if (mData.getType().equals(Graph.TYPE_BAR)) { <END> return ChartFactory.getBarChartIntent(mContext, mDataset, mRenderer, BarChart.Type.DEFAULT, title); } return ChartFactory.getLineChartIntent(mContext, mDataset, mRenderer, title); }</code><technical_language>a good idea flip this Graph.TYPE_BAR.equals(mData.getType()) in order avoid null pointer exceptions</technical_language>

Target:
public Intent getIntent(GraphData data) throws InvalidStateException { render(data); String title = mRenderer.getChartTitle(); if (Graph.TYPE_BUBBLE.equals(mData.getType())) { return ChartFactory.getBubbleChartIntent(mContext, mDataset, mRenderer, title); } if (Graph.TYPE_TIME.equals(mData.getType())) { return ChartFactory.getTimeChartIntent(mContext, mDataset, mRenderer, title, getTimeFormat()); } if (Graph.TYPE_BAR.equals(mData.getType())) { return ChartFactory.getBarChartIntent(mContext, mDataset, mRenderer, BarChart.Type.DEFAULT, title); } return ChartFactory.getLineChartIntent(mContext, mDataset, mRenderer, title); }
Source:
<code>public List<String> processArgs() { <START> final List<String> processArgument = VertxCommandLauncher.getProcessArguments(); <END> return processArgument != null ? processArgument : Starter.PROCESS_ARGS; }</code><technical_language>final</technical_language>

Target:
public List<String> processArgs() { List<String> processArgument = VertxCommandLauncher.getProcessArguments(); return processArgument != null ? processArgument : Starter.PROCESS_ARGS; }
Source:
<code>public void setRegistrationUrl(String registrationUrl) { <START> $("#registerHeader").attr("href", "<LINK_0>" + registrationUrl); <END> $("#registerHeaderHome").attr("href", "<LINK_0>" + registrationUrl); }</code><technical_language>extract string a constant field in class</technical_language>

Target:
public void setRegistrationUrl(String registrationUrl) { setSelectorRegistrationUrl("#registerHeader", registrationUrl); setSelectorRegistrationUrl("#registerHome", registrationUrl); }
Source:
<code>public static void assertMvccWriteConflict(Exception e) { IgniteSQLException sqlEx = X.cause(e, IgniteSQLException.class); <START> assertNotNull("Unexpected exception:" + X.getFullStackTrace(e), sqlEx); <END> assertEquals("Unexpected exception:" + X.getFullStackTrace(e),TRANSACTION_SERIALIZATION_ERROR, sqlEx.statusCode()); }</code><technical_language>simplyfy this with: if (sqlEx == null || sqlEx.statusCode != TRANSACTION_SERIALIZATION_ERROR) throw e;</technical_language>

Target:
public static void assertMvccWriteConflict(Exception e) { IgniteSQLException sqlEx = X.cause(e, IgniteSQLException.class); if (sqlEx == null || sqlEx.statusCode() != TRANSACTION_SERIALIZATION_ERROR) fail("Unexpected exception: " + X.getFullStackTrace(e)); }
Source:
<code>public void saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal) { Assert.notNull(authorizedClient, "authorizedClient cannot be null"); Assert.notNull(principal, "principal cannot be null"); OAuth2AuthorizedClientData authorizedClientData = mapData(authorizedClient, principal); Object[] args = { authorizedClientData.clientRegistrationId, authorizedClientData.principalName, authorizedClientData.accessTokenType, <START> authorizedClientData.accessTokenValue, END> authorizedClientData.accessTokenIssuedAt, authorizedClientData.accessTokenExpiresAt, authorizedClientData.accessTokenScopes, authorizedClientData.refreshTokenValue, authorizedClientData.refreshTokenIssuedAt }; int[] argTypes = { Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.VARCHAR, Types.TIMESTAMP }; PreparedStatementSetter pss = new ArgumentTypePreparedStatementSetter(args, argTypes); this.jdbcTemplate.update(SAVE_AUTHORIZED_CLIENT_SQL, pss); }</code><technical_language>I externalize mapping (reading/writing) of data of Spring's strategies. user's inject strategies</technical_language>

Target:
public void saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal) { Assert.notNull(authorizedClient, "authorizedClient cannot be null"); Assert.notNull(principal, "principal cannot be null"); List<SqlParameterValue> parameters = this.authorizedClientParametersMapper.apply( new OAuth2AuthorizedClientHolder(authorizedClient, principal)); PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters.toArray()); this.jdbcOperations.update(SAVE_AUTHORIZED_CLIENT_SQL, pss); }
Source:
<code>public void beforeEach() { initialized = Objects.nonNull(_spark); if (!initialized) { SparkConf conf = new SparkConf(); conf.setMaster("local"); conf.set("spark.driver.host", "localhost"); <START> conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); <END> _spark = SparkSession.builder().config(conf).getOrCreate(); } }</code><technical_language>this is crucial refactor tests missing line: conf.setAppName(this.getClass().getSimpleName());</technical_language>

Target:
public void beforeEach() { initialized = Objects.nonNull(_spark); if (!initialized) { SparkConf conf = new SparkConf(); conf.setAppName(getClass().getSimpleName()); conf.setMaster("local"); conf.set("spark.driver.host", "localhost"); conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); _spark = SparkSession.builder().config(conf).getOrCreate(); } }
Source:
<code>static void writeAccountMapToFile(Path filepath, Map<String, String> accountMap) throws IOException { try (FileChannel channel = FileChannel.open(filepath, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE)) { ByteBuffer buffer = serializeAccountMap(accountMap); channel.write(buffer); } catch (IOException e) { <START> logger.error("Failed to persist state to file " + filepath, e); <END> throw e; } }</code><technical_language>change message Failed persist account map file</technical_language>

Target:
static void writeAccountMapToFile(Path filepath, Map<String, String> accountMap) throws IOException { try (FileChannel channel = FileChannel.open(filepath, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE)) { ByteBuffer buffer = serializeAccountMap(accountMap); channel.write(buffer); } catch (IOException e) { logger.error("Failed to persist account map to file " + filepath, e); throw e; } }
Source:
<code>private Boolean shouldHandleEvent(BundleEvent event) { if (event.getType() != BundleEvent.STARTED && event.getType() != BundleEvent.STOPPED) { return false; } String symbolicName = event.getBundle().getSymbolicName(); <START> if (symbolicName.equals("org.apache.servicemix.bundles.xmlbeans")) { <END> return false; } if (symbolicName.equals("org.ops4j.pax.wicket.service")) { return false; } return true; }</code><technical_language>whats special/the problem bundles</technical_language>

Target:
private Boolean shouldHandleEvent(BundleEvent event) { if (event.getType() != BundleEvent.STARTED && event.getType() != BundleEvent.STOPPED) { return false; } return true; }
Source:
<code>public void initialize(ConstraintDescriptor<AgeMin> constraintDescriptor, HibernateConstraintValidatorInitializationContext initializationContext) { try { <START> super.referenceClock = Clock.offset( <END> initializationContext.getClockProvider().getClock(), getEffectiveTemporalValidationTolerance( initializationContext.getTemporalValidationTolerance() ) ); super.referenceAge = constraintDescriptor.getAnnotation().value(); super.inclusive = constraintDescriptor.getAnnotation().inclusive(); super.unit = constraintDescriptor.getAnnotation().unit(); } catch (Exception e) { throw LOG.getUnableToGetCurrentTimeFromClockProvider( e ); } }</code><technical_language>done parent initialize method</technical_language>

Target:
public void initialize( ConstraintDescriptor<AgeMin> constraintDescriptor, HibernateConstraintValidatorInitializationContext initializationContext) { super.initialize( constraintDescriptor.getAnnotation().value(), constraintDescriptor.getAnnotation().unit().getChronoUnit(), constraintDescriptor.getAnnotation().inclusive(), initializationContext ); }
Source:
<code>public static Scheduler from(Looper looper, boolean async) { if (looper == null) throw new NullPointerException("looper == null"); boolean useAsync = async && Build.VERSION.SDK_INT >= 16; Handler handler = new Handler(looper); if (useAsync) { Message message = Message.obtain(handler); try { message.setAsynchronous(true); } catch (NoSuchMethodError e) { useAsync = false; } } <START> return new HandlerScheduler(new Handler(looper), useAsync); <END> }</code><technical_language>created Handler above. pass here</technical_language>

Target:
public static Scheduler from(Looper looper, boolean async) { if (looper == null) throw new NullPointerException("looper == null"); boolean useAsync = async && Build.VERSION.SDK_INT >= 16; Handler handler = new Handler(looper); if (useAsync && Build.VERSION.SDK_INT < 22) { Message message = Message.obtain(handler); try { message.setAsynchronous(true); } catch (NoSuchMethodError e) { useAsync = false; } finally { message.recycle(); } } return new HandlerScheduler(handler, useAsync); }
Source:
<code>public KafkaRecordSupplier( Map<String, Object> consumerProperties, ObjectMapper sortingMapper ) { this.consumerProperties = consumerProperties; this.sortingMapper = sortingMapper; this.consumer = getKafkaConsumer(); <START> this.closed = false; <END> this.records = new LinkedBlockingQueue<>(); }</code><technical_language>Technically setting closed = false needed this is default for a boolean</technical_language>

Target:
public KafkaRecordSupplier( Map<String, Object> consumerProperties, ObjectMapper sortingMapper ) { this.consumerProperties = consumerProperties; this.sortingMapper = sortingMapper; this.consumer = getKafkaConsumer(); }
Source:
<code>public void authenticateWhenAccountExpiredThenException() { this.manager.setPasswordEncoder(this.encoder); UserDetails expiredUser = User.withUsername("user") .password("password") .roles("USER") .accountExpired(true) .build(); when(this.userDetailsService.findByUsername(any())).thenReturn(Mono.just(expiredUser)); <START> UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken( <END> this.user, this.user.getPassword()); this.manager.authenticate(token).block(); }</code><technical_language>expiredUser create token instead of this.user? mimic a more realistic scenario. Similarly for lockedUser disabledUser in other tests</technical_language>

Target:
public void authenticateWhenAccountExpiredThenException() { this.manager.setPasswordEncoder(this.encoder); UserDetails expiredUser = User.withUsername("user") .password("password") .roles("USER") .accountExpired(true) .build(); when(this.userDetailsService.findByUsername(any())).thenReturn(Mono.just(expiredUser)); UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken( expiredUser, expiredUser.getPassword()); this.manager.authenticate(token).block(); }
Source:
<code>public ValidationResult supportedFirewallTypeForClusterVersion() { return ValidationResult .failWith(EngineMessage.UNSUPPORTED_FIREWALL_TYPE_FOR_CLUSTER_VERSION) .when(cluster.getCompatibilityVersion().equals(Version.v3_6) && <START> (cluster.getFirewallType() != null && cluster.getFirewallType() == FirewallType.FIREWALLD)); <END> }</code><technical_language>get firewallType null, set for cluster add/update. If null, proper error raised</technical_language>

Target:
public ValidationResult supportedFirewallTypeForClusterVersion() { return ValidationResult .failWith( EngineMessage.UNSUPPORTED_FIREWALL_TYPE_FOR_CLUSTER_VERSION, String.format("$clusterVersion %s", cluster.getCompatibilityVersion()), String.format("$firewallType %s", cluster.getFirewallType()) ) .when(cluster.getCompatibilityVersion().equals(Version.v3_6) && (cluster.getFirewallType() != null && cluster.getFirewallType() == FirewallType.FIREWALLD)); }
Source:
<code>public boolean matches(String pattern, String str, EnvVars envVars) { <START> String expandedPattern = envVars.expand(pattern); <END> return str.matches(expandedPattern); }</code><technical_language>needs null check envVars</technical_language>

Target:
public boolean matches(String pattern, String str, EnvVars envVars) { String expandedPattern = expandWithEnvVarsIfPossible(pattern, envVars); return str.matches(expandedPattern); }
Source:
<code>public Query createQuery(String queryString) { try { <START> return MethodHack.createQuery.invoke(session, queryString); <END> } catch (InvocationTargetException ex) { throw new RuntimeException(ex); } catch (IllegalAccessException ex) { throw new RuntimeException(ex); } }</code><technical_language>forgive ignorance, this solve issue? org.hibernate.Query org.hibernate.query.Query issue in source code</technical_language>

Target:
public Query createQuery(String queryString) { return session.createQuery(queryString); }
Source:
<code>public Image loadSmallPreview(String mapName) { String url = getMapUrl(mapName, environment.getProperty("vault.mapPreviewUrl.small")); logger.debug("Fetching small preview for map from {}", mapName, url); Image image = new Image(url, true); if (image.isError()) { logger.warn("Error fetching small preview for map from {}", mapName, url); String theme = preferencesService.getPreferences().getTheme(); return new Image(ThemeUtil.themeFile(theme, "images/map_background.png")); } else { return image; <START> } <END> }</code><technical_language>This reliably work; new Image(url, true) loads image in background (that's true stands for) time of if(image.isError()) get false</technical_language>

Target:
public Image loadSmallPreview(String mapName) { String url = getMapUrl(mapName, environment.getProperty("vault.mapPreviewUrl.small")); logger.debug("Fetching small preview for map from {}", mapName, url); return new Image(url, true); }
Source:
<code>public String toString() { switch (this) { case COMPUTER_FILE: return "Software/Multimedia"; case DATABASE_A_Z: return "Database"; case JOURNAL_PERIODICAL: return "Journal/Periodical"; case MANUSCRIPT_ARCHIVE: return "Archive/Manuscript"; case MUSIC_RECORDING: return "Music recording"; case MUSIC_SCORE: return "Music score"; <START> case OBJECT: <END> return "Object"; case SOUND_RECORDING: return "Sound recording"; default: String lc = super.toString().toLowerCase(); String firstchar = lc.substring(0, 1).toUpperCase(); return lc.replaceFirst(".{1}", firstchar); } }</code><technical_language>Note Format.toString() case statement needs explicit cases for formats a single word; defaults enum string letter upper case. Please remove 2 lines, rebase pull request is ready</technical_language>

Target:
public String toString() { switch (this) { case COMPUTER_FILE: return "Software/Multimedia"; case DATABASE_A_Z: return "Database"; case JOURNAL_PERIODICAL: return "Journal/Periodical"; case MANUSCRIPT_ARCHIVE: return "Archive/Manuscript"; case MUSIC_RECORDING: return "Music recording"; case MUSIC_SCORE: return "Music score"; case SOUND_RECORDING: return "Sound recording"; default: String lc = super.toString().toLowerCase(); String firstchar = lc.substring(0, 1).toUpperCase(); return lc.replaceFirst(".{1}", firstchar); } }
Source:
<code>public void testGetAllTicketsForTransport_User() { SessionData login = login("user", userCleartextPassword); <START> <END> given() .filter(sessionFilter) .header(login.getCsrfHeader()) .when() .get("/tickets/transport") .then() .statusCode(HttpStatus.SC_FORBIDDEN); }</code><technical_language>Useless white line. Also, user.getUsername() consistent</technical_language>

Target:
public void testGetAllTicketsForTransport_User() { SessionData login = login(user.getUsername(), userCleartextPassword); given() .filter(sessionFilter) .header(login.getCsrfHeader()) .when() .get("/tickets/transport") .then() .statusCode(HttpStatus.SC_FORBIDDEN); }
Source:
<code>private String parseActualValue(final String value) { <START> if (value != null && value.indexOf("=") > 1) { <END> return value.substring(0, value.indexOf("=")); } else { return value; } }</code><technical_language>I this > 0 a list item of 1=One work</technical_language>

Target:
private String parseActualValue(final String value) { if (value != null && value.indexOf("=") > 0) { return value.substring(0, value.indexOf("=")); } else { return value; } }
Source:
<code><START> public boolean hasSpouse(){ <END> if(null == campaign.getPerson(spouse)) setSpouseID(null); return (getSpouseID() != null); }</code><technical_language>A design this is side effect free desirable</technical_language>

Target:
public boolean hasSpouse(){ return (getSpouseID() != null); }
Source:
<code>public void setToken(String token) { if (token != null && !token.isEmpty()) { <START> if (validateToken(token)) { <END> this.token = token; } else { throw new IllegalArgumentException("Bad token"); } } else { this.token = null; } }</code><technical_language>I suggest validation in setter for now. this: java if (token != null && !token.isEmpty()) { if (!token.matches("^[a-zA-Z0-9]{16,}$")) { throw new IllegalArgumentException("Illegal token"); } this.token = token; }</technical_language>

Target:
public void setToken(String token) { if (token != null && !token.isEmpty()) { if (!token.matches("^[a-zA-Z0-9]{16,}$")) { throw new IllegalArgumentException("Illegal token"); } this.token = token; } }
Source:
<code>public boolean extractQuestionDetails(Map<String, String[]> requestParameters, FeedbackQuestionType questionType) { super.extractQuestionDetails(requestParameters, questionType); String minRecipientsToBeRanked = HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RANKMINRECIPIENTSTOBERANKED); String maxRecipientsToBeRanked = HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RANKMAXRECIPIENTSTOBERANKED); <START> String isMinRecipientsToBeRankedEnabled = HttpRequestHelper.getValueFromParamMap( <END> requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RANKISMINRECIPIENTSTOBERANKEDENABLED); String isMaxRecipientsToBeRankedEnabled = HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RANKISMAXRECIPIENTSTOBERANKEDENABLED); this.minOptionsToBeRankedEnabled = "on".equals(isMinRecipientsToBeRankedEnabled); this.maxOptionsToBeRankedEnabled = "on".equals(isMaxRecipientsToBeRankedEnabled); if (minRecipientsToBeRanked != null && !"".equals(minRecipientsToBeRanked)) { this.minOptionsToBeRanked = Integer.parseInt(minRecipientsToBeRanked); } if (maxRecipientsToBeRanked != null && !"".equals(maxRecipientsToBeRanked)) { this.maxOptionsToBeRanked = Integer.parseInt(maxRecipientsToBeRanked); } return true; }</code><technical_language>this a String? is prefixed is</technical_language>

Target:
public boolean extractQuestionDetails(Map<String, String[]> requestParameters, FeedbackQuestionType questionType) { super.extractQuestionDetails(requestParameters, questionType); String minRecipientsToBeRanked = Strings.nullToEmpty(HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RANK_MIN_RECIPIENTS_TO_BE_RANKED)); String maxRecipientsToBeRanked = Strings.nullToEmpty(HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_RANK_MAX_RECIPIENTS_TO_BE_RANKED)); minOptionsToBeRanked = MoreObjects.firstNonNull(Ints.tryParse(minRecipientsToBeRanked), NO_VALUE); maxOptionsToBeRanked = MoreObjects.firstNonNull(Ints.tryParse(maxRecipientsToBeRanked), NO_VALUE); return true; }
Source:
<code>private static List<String> extend(final Response res, final Iterable<? extends CharSequence> headers) throws IOException { Response resp = res; for (final CharSequence hdr: headers) { resp = new RsWithHeader(resp, hdr); } <START> final List<String> ret = new ArrayList<String>(1); <END> for (final String hdr: resp.head()) { ret.add(hdr); } return ret; }</code><technical_language>I get this... do return resp.head()</technical_language>

Target:
private static Iterable<String> extend(final Response res, final Iterable<? extends CharSequence> headers) throws IOException { Response resp = res; for (final CharSequence hdr: headers) { resp = new RsWithHeader(resp, hdr); } return resp.head(); }
Source:
<code>public Operator createOperator(DriverContext driverContext) { checkState(!closed, "LookupOuterOperatorFactory is closed"); <START> if (createdDriverGroups.contains(driverContext.getDriverLifeCycle())) { <END> throw new IllegalStateException("Only one outer operator can be created per DriverGroup"); } ListenableFuture<OuterPositionIterator> outerPositionsFuture = this.outerPositionsFuture.apply(driverContext.getDriverLifeCycle()); ReferenceCount referenceCount = this.referenceCount.apply(driverContext.getDriverLifeCycle()); OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, planNodeId, LookupOuterOperator.class.getSimpleName()); referenceCount.retain(); return new LookupOuterOperator(operatorContext, outerPositionsFuture, probeOutputTypes, buildOutputTypes, referenceCount::release); }</code><technical_language>I lifecycle is added set</technical_language>

Target:
public Operator createOperator(DriverContext driverContext) { checkState(!closed, "LookupOuterOperatorFactory is closed"); if (createdLifespans.contains(driverContext.getLifespan())) { throw new IllegalStateException("Only one outer operator can be created per Lifespan"); } createdLifespans.add(driverContext.getLifespan()); ListenableFuture<OuterPositionIterator> outerPositionsFuture = this.outerPositionsFuture.apply(driverContext.getLifespan()); ReferenceCount referenceCount = this.referenceCount.apply(driverContext.getLifespan()); OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, planNodeId, LookupOuterOperator.class.getSimpleName()); referenceCount.retain(); return new LookupOuterOperator(operatorContext, outerPositionsFuture, probeOutputTypes, buildOutputTypes, referenceCount::release); }
Source:
<code>public void setAlwaysEdible(IItemDefinition item) { <START> if (item instanceof ItemFood) ((ItemFood)getInternal(item)).setAlwaysEdible(); <END> }</code><technical_language>instanceof check work. need compare getInternal ^^</technical_language>

Target:
public void setAlwaysEdible(IItemDefinition item) { Item food = getInternal(item); if (food instanceof ItemFood) ((ItemFood)food).setAlwaysEdible(); }
Source:
<code>public String toString() { <START> return "VDS[" + (mVdsStatic == null ? "null" : mVdsStatic.gethost_name()) + "]"; <END> }</code><technical_language>host_name ugly fqdn ip i nice print vds_name</technical_language>

Target:
public String toString() { return "Host[" + (mVdsStatic == null ? "null" : mVdsStatic.getvds_name()) + "]"; }
Source:
<code>public boolean click(Vector2 clickPosition) { if(clickPosition.x > rectangle.x && clickPosition.x < rectangle.x + rectangle.width && clickPosition.y > rectangle.y && clickPosition.y < rectangle.y + rectangle.height) { float relativePos = clickPosition.x - rectangle.x; <START> setValue((relativePos/rectangle.width)); <END> return true; } return false; }</code><technical_language>suggestion setValue(relativePos / rectangle.width);</technical_language>

Target:
public boolean click(Vector2 clickPosition) { if (clickPosition.x > rectangle.x && clickPosition.x < rectangle.x + rectangle.width && clickPosition.y > rectangle.y && clickPosition.y < rectangle.y + rectangle.height) { float relativePos = clickPosition.x - rectangle.x; setValue(relativePos / rectangle.width); return true; } return false; }
Source:
<code>public void onDestroy() { super.onDestroy(); if (getService() != null) { <START> getService().unregisterOnServiceStateChangeListener(this); <END> } mLabelView.removeTextChangedListener(mTextWatcher); mIdView.removeTextChangedListener(mTextWatcher); mPathView.removeTextChangedListener(mTextWatcher); }</code><technical_language>Ditto call</technical_language>

Target:
public void onDestroy() { super.onDestroy(); SyncthingService syncthingService = getService(); if (syncthingService != null) { syncthingService.unregisterOnServiceStateChangeListener(this::onServiceStateChange); } mLabelView.removeTextChangedListener(mTextWatcher); mIdView.removeTextChangedListener(mTextWatcher); mPathView.removeTextChangedListener(mTextWatcher); }
Source:
<code><START> private int getPluginsLoadTimeout(final Config cfg) { <END> long cfgValue = ConfigUtil.getTimeUnit(cfg, "plugins", null, "jsLoadTimeout", DEFAULT_JS_LOAD_TIMEOUT, TimeUnit.MILLISECONDS); if (cfgValue < 0) { return 0; } return (int) cfgValue; }</code><technical_language>method static</technical_language>

Target:
private static int getPluginsLoadTimeout(final Config cfg) { long cfgValue = ConfigUtil.getTimeUnit(cfg, "plugins", null, "jsLoadTimeout", DEFAULT_JS_LOAD_TIMEOUT, TimeUnit.MILLISECONDS); if (cfgValue < 0) { return 0; } return (int) cfgValue; }
Source:
<code>private static ChangeType detectChangeType(Project project, @NotNull VirtualFile file) { ProjectRootManager rootManager = ProjectRootManager.getInstance(project); if (rootManager.getFileIndex().getContentRootForFile(file) != null) { boolean isBuildFile = PantsUtil.isBUILDFileName(file.getName()); boolean isUnderPantsRepo = PantsUtil.isFileUnderPantsRepo(file); <START> boolean isNotInPantsD = !file.getPath().contains("/.pants.d/"); <END> if (isUnderPantsRepo && isBuildFile && isNotInPantsD) { return ChangeType.BUILD; } return ChangeType.OTHER; } return ChangeType.UNRELATED; }</code><technical_language>pants_workdir PantsOptions, instead of harcoding /.pants.d/ workdir (default '.pants.d/') configured? nit: isInPantsD !isInPantsD in if statement</technical_language>

Target:
private static ChangeType detectChangeType(Project project, @NotNull VirtualFile file) { ProjectRootManager rootManager = ProjectRootManager.getInstance(project); if (rootManager.getFileIndex().getContentRootForFile(file) != null) { boolean isBuildFile = PantsUtil.isBUILDFileName(file.getName()); boolean isUnderPantsRepo = PantsUtil.isFileUnderPantsRepo(file); Path filePath = Paths.get(file.getPath()); boolean shouldBeIgnored = PantsOptions.getPantsOptions(project) .flatMap(options -> options.get(PantsConstants.PANTS_OPTION_PANTS_WORKDIR)) .map(workdir -> filePath.startsWith(Paths.get(workdir).toAbsolutePath())) .orElse(filePath.toUri().toString().contains("/.pants.d/")); if (isUnderPantsRepo && isBuildFile && !shouldBeIgnored) { return ChangeType.BUILD; } return ChangeType.OTHER; } return ChangeType.UNRELATED; }
Source:
<code>public void setTabHeader(BaseComponent header, BaseComponent footer) { <START> header = ChatComponentTransformer.getInstance().transform( getServerSentScoreboard(), this, header )[0]; <END> footer = ChatComponentTransformer.getInstance().transform( getServerSentScoreboard(), this, footer )[0]; unsafe().sendPacket( new PlayerListHeaderFooter( ComponentSerializer.toString( header ), ComponentSerializer.toString( footer ) ) ); }</code><technical_language>mutation</technical_language>

Target:
public void setTabHeader(BaseComponent header, BaseComponent footer) { header = ChatComponentTransformer.getInstance().transform( this, header )[0]; footer = ChatComponentTransformer.getInstance().transform( this, footer )[0]; unsafe().sendPacket( new PlayerListHeaderFooter( ComponentSerializer.toString( header ), ComponentSerializer.toString( footer ) ) ); }
Source:
<code>public byte[] getEntry() { <START> if (data == null) { <END> throw new IllegalStateException("entry content can be accessed only once"); } byte[] entry = new byte[data.readableBytes()]; data.readBytes(entry); data.release(); data = null; return entry; }</code><technical_language>I understand here: do need this change here? necessary</technical_language>

Target:
public byte[] getEntry() { Preconditions.checkNotNull(data, "entry content can be accessed only once"); byte[] entry = new byte[data.readableBytes()]; data.readBytes(entry); data.release(); data = null; return entry; }
Source:
<code>public void consume(ParsableByteArray data) { if (writingSample) { <START> totalBytesWritten += data.bytesLeft(); <END> output.sampleData(data, data.bytesLeft()); } }</code><technical_language>nit: clearer do: int bytesAvailable = data.bytesLeft(); output.sampleData(data, bytesAvailable); sampleBytesWritten += bytesAvailable;</technical_language>

Target:
public void consume(ParsableByteArray data) { if (writingSample) { int bytesAvailable = data.bytesLeft(); TrackOutput output; int dataPosition = data.getPosition(); for (int i = 0; i < outputTracks.size(); i++) { data.setPosition(dataPosition); output = outputTracks.get(i); output.sampleData(data, bytesAvailable); } sampleBytesWritten += bytesAvailable; } }
Source:
<code>protected boolean checkStoragePool() { if (!super.checkStoragePool()) return false; <START> if (getStoragePool().getstatus() == StoragePoolStatus.Uninitialized) { <END> return true; } if (getStoragePool().getstatus() != StoragePoolStatus.Up) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_ACTIVE); return false; } return true; }</code><technical_language>This conflicts commit message - Uninitiazlied is OK, in case commit message reflect it, isn't, in case check removed</technical_language>

Target:
protected boolean checkStoragePool() { if (!super.checkStoragePool()) return false; StoragePoolStatus status = getStoragePool().getstatus(); if (status == StoragePoolStatus.Uninitialized) { return true; } if (status != StoragePoolStatus.Up) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_ACTIVE); return false; } return true; }