auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static Identifiers extractPersonIdentifiers(PRPAMT201306UV02ParameterList params) { LOG.trace("Entering HL7Parser201305.ExtractPersonIdentifiers method..."); Identifiers ids = new Identifiers(); Identifier id = new Identifier(); if (CollectionUtils.isNotEmpty(params.getLivingSubjectId()) && params.getLivingSubjectId().get(0) != null) { PRPAMT201306UV02LivingSubjectId livingSubjectId = params.getLivingSubjectId().get(0); if (CollectionUtils.isNotEmpty(livingSubjectId.getValue()) && livingSubjectId.getValue().get(0) != null) { II subjectId = livingSubjectId.getValue().get(0); if (subjectId.getExtension() != null && subjectId.getExtension().length() > 0 && subjectId.getRoot() != null && subjectId.getRoot().length() > 0) { id.setId(subjectId.getExtension()); id.setOrganizationId(subjectId.getRoot()); LOG.info("Created id from patient identifier [organization{}", id.getOrganizationId() + "][id=" <START> + id.getId() + "]"); <END> ids.add(id); } else { LOG.info("message does not contain an id"); } } else { LOG.info("message does not contain an id"); } } else { LOG.info("message does not contain an id"); } LOG.trace("Exiting HL7Parser201305.ExtractPersonIdentifiers method..."); return ids; }</code><technical_language>multiple log's parameters</technical_language>

Target:
public static Identifiers extractPersonIdentifiers(PRPAMT201306UV02ParameterList params) { LOG.trace("Entering HL7Parser201305.ExtractPersonIdentifiers method..."); Identifiers ids = new Identifiers(); Identifier id = new Identifier(); if (CollectionUtils.isNotEmpty(params.getLivingSubjectId()) && params.getLivingSubjectId().get(0) != null) { PRPAMT201306UV02LivingSubjectId livingSubjectId = params.getLivingSubjectId().get(0); if (CollectionUtils.isNotEmpty(livingSubjectId.getValue()) && livingSubjectId.getValue().get(0) != null) { II subjectId = livingSubjectId.getValue().get(0); if (StringUtils.isNotEmpty(subjectId.getExtension()) && StringUtils.isNotEmpty(subjectId.getRoot())) { id.setId(subjectId.getExtension()); id.setOrganizationId(subjectId.getRoot()); LOG.info("Created id from patient identifier [organization : {}][id : {}] ", id.getOrganizationId() , id.getId()); ids.add(id); } else { LOG.info("message does not contain an id"); } } else { LOG.info("message does not contain an id"); } } else { LOG.info("message does not contain an id"); } LOG.trace("Exiting HL7Parser201305.ExtractPersonIdentifiers method..."); return ids; }
Source:
<code>private SearchRequest getScrollRequestBuilder(Query parameter) { SearchRequest searchRequest = new SearchRequest(ElasticsearchUtils.getIndices(parameter.getTable(), parameter)) .indicesOptions(Utils.indicesOptions()) .types(ElasticsearchUtils.DOCUMENT_TYPE_NAME) .searchType(SearchType.QUERY_THEN_FETCH) .source(new SearchSourceBuilder() .timeout(new TimeValue(getGetQueryTimeout(), TimeUnit.MILLISECONDS)) .size(parameter.getLimit()) .query(new ElasticSearchQueryGenerator().genFilter(parameter.getFilters())) .sort(Utils.storedFieldName(parameter.getSort().getField()), ResultSort.Order.desc == parameter.getSort().getOrder() <START> ? SortOrder.DESC : SortOrder.ASC)); <END> searchRequest.scroll(TimeValue.timeValueSeconds(elasticsearchTuningConfig.getScrollTimeInSeconds())); return searchRequest; }</code><technical_language>Refactor generate SearchSourceBuilder in place</technical_language>

Target:
private SearchRequest getScrollRequestBuilder(Query parameter) { SearchRequest searchRequest = getSearchRequest(parameter); searchRequest.scroll(TimeValue.timeValueSeconds(elasticsearchTuningConfig.getScrollTimeInSeconds())); return searchRequest; }
Source:
<code>public void commitWithMessageShouldReturnTheTransaction() throws Exception{ String responseString = "{ \"id\": \"foobar\" }"; MockRestAdapter<Transaction> adapter = new MockRestAdapter<>("foobar", responseString, null); adapter.request(new RepromiseFunction<BitreserveRestAdapter, Transaction>() { @Override public Promise<Transaction> call(BitreserveRestAdapter adapter) { Transaction transaction = Fixtures.loadTransaction(new HashMap<String, String>() {{ put("transactionStatus", "pending"); put("originCardId", "foo"); put("transactionId", "bar"); }}); transaction.setBitreserveRestAdapter(adapter); return transaction.commit(new TransactionMessageRequest("foobar")); } }); Request request = adapter.getRequest(); Transaction transaction = adapter.getResult(); Assert.assertEquals(request.getUrl(), "<LINK_0>"); Assert.assertEquals(request.getMethod(), "POST"); <START> Assert.assertEquals(transaction.getId(), "foobar"); <END> }</code><technical_language>assert message in request</technical_language>

Target:
public void commitWithMessageShouldReturnTheTransaction() throws Exception { ByteArrayOutputStream bodyOutput = new ByteArrayOutputStream(); String responseString = "{ \"id\": \"foobar\" }"; MockRestAdapter<Transaction> adapter = new MockRestAdapter<>("foobar", responseString, null); adapter.request(new RepromiseFunction<BitreserveRestAdapter, Transaction>() { @Override public Promise<Transaction> call(BitreserveRestAdapter adapter) { Transaction transaction = Fixtures.loadTransaction(new HashMap<String, String>() {{ put("transactionStatus", "pending"); put("originCardId", "foo"); put("transactionId", "bar"); }}); transaction.setBitreserveRestAdapter(adapter); return transaction.commit(new TransactionCommitRequest("foobar")); } }); Request request = adapter.getRequest(); Transaction transaction = adapter.getResult(); request.getBody().writeTo(bodyOutput); Assert.assertEquals(request.getUrl(), "<LINK_0>"); Assert.assertEquals(request.getMethod(), "POST"); Assert.assertEquals(transaction.getId(), "foobar"); Assert.assertEquals(bodyOutput.toString(), "{\"message\":\"foobar\"}"); }
Source:
<code>public void testProcessEapMessageResponse() throws Exception { EapCallback eapCallback = new EapCallback() { @Override public void onResponse(byte[] eapMsg) { synchronized (mCallbackLock) { <START> assertArrayEquals(EAP_SIM_RESPONSE_PACKET, <END> eapMsg); assertFalse("Callback has already been fired", mCallbackFired); mCallbackFired = true; mCallbackLock.notifyAll(); } } }; EapResponse eapResponse = new EapResponse(EAP_SIM_RESPONSE_PACKET); when(mMockEapStateMachine.process(eq(EAP_REQUEST_SIM_START_PACKET))) .thenReturn(eapResponse); synchronized (mCallbackLock) { getEapAuthenticatorWithCallback(eapCallback) .processEapMessage(EAP_REQUEST_SIM_START_PACKET); mCallbackLock.wait(TEST_TIMEOUT_MILLIS); } assertTrue(mCallbackFired); verify(mMockEapStateMachine).process(eq(EAP_REQUEST_SIM_START_PACKET)); verifyNoMoreInteractions(mMockEapStateMachine); }</code><technical_language>This can/should lock In general, done locked sections be. Putting critical section implies is thread-unsafe</technical_language>

Target:
public void testProcessEapMessageResponse() throws Exception { EapCallback eapCallback = new EapCallback() { @Override public void onResponse(byte[] eapMsg) { assertArrayEquals(EAP_SIM_RESPONSE_PACKET, eapMsg); synchronized (mCallbackLock) { assertFalse("Callback has already been fired", mCallbackFired); mCallbackFired = true; mCallbackLock.notifyAll(); } } }; EapResponse eapResponse = new EapResponse(EAP_SIM_RESPONSE_PACKET); when(mMockEapStateMachine.process(eq(EAP_REQUEST_SIM_START_PACKET))) .thenReturn(eapResponse); synchronized (mCallbackLock) { getEapAuthenticatorWithCallback(eapCallback) .processEapMessage(EAP_REQUEST_SIM_START_PACKET); mCallbackLock.wait(TEST_TIMEOUT_MILLIS); assertTrue(mCallbackFired); } verify(mMockEapStateMachine).process(eq(EAP_REQUEST_SIM_START_PACKET)); verifyNoMoreInteractions(mMockEapStateMachine); }
Source:
<code>private boolean validate() { controlResult = executeQueryControl(); if (controlResult.getState() == State.TOO_MANY_ROWS) { testResult = new QueryResult(State.INVALID, null, null, null, null, ImmutableList.of()); return false; } if (controlResult.getState() != State.SUCCESS) { testResult = new QueryResult(State.INVALID, null, null, null, null, ImmutableList.of()); return true; } testResult = executeQueryTest(); if (controlResult.getState() != State.SUCCESS || testResult.getState() != State.SUCCESS) { return false; } if (!checkCorrectness) { return true; } boolean matches = resultsMatch(controlResult, testResult, precision); if (!matches && checkDeterministic) { matches = checkForDeterministicAndRerunTestQueriesIfNeeded(); } <START> if (matches && skipDroppingTemporaryTables) { <END> QueryResult controlTearDownResult = tearDownQueryControl(); QueryResult testTearDownResult = tearDownQueryTest(); controlResult = controlTearDownResult.getState() == State.SUCCESS ? controlResult : controlTearDownResult; testResult = testTearDownResult.getState() == State.SUCCESS ? testResult : testTearDownResult; return controlResult.getState() == State.SUCCESS && testResult.getState() == State.SUCCESS; } return matches; }</code><technical_language>This logic inverted</technical_language>

Target:
private boolean validate() { boolean tearDownControl = true; boolean tearDownTest = false; try { controlResult = executePreAndMainForControl(); if (controlResult.getState() == State.TOO_MANY_ROWS) { testResult = new QueryResult(State.INVALID, null, null, null, null, ImmutableList.of()); return false; } if (controlResult.getState() != State.SUCCESS) { testResult = new QueryResult(State.INVALID, null, null, null, null, ImmutableList.of()); return true; } testResult = executePreAndMainForTest(); tearDownTest = true; if (controlResult.getState() != State.SUCCESS || testResult.getState() != State.SUCCESS) { return false; } if (!checkCorrectness) { return true; } boolean matches = resultsMatch(controlResult, testResult, precision); if (!matches && checkDeterministic) { matches = checkForDeterministicAndRerunTestQueriesIfNeeded(); } if (!matches && !runTearDownOnResultMismatch) { tearDownControl = false; tearDownTest = false; } return matches; } finally { if (tearDownControl) { tearDownControl(); } if (tearDownTest) { tearDownTest(); } } }
Source:
<code>static NetworkConnectionType getNetworkType(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE); NetworkInfo networkInfo = getNetworkInfo(context); <START> NetworkConnectionType networkConnectionType; <END> if (networkInfo == null) { networkConnectionType = NetworkConnectionType.UNKNOWN; } else { int network = networkInfo.getType(); if (network == ConnectivityManager.TYPE_WIFI) { networkConnectionType = NetworkConnectionType.WIFI; } else { int mobileNetwork = telephonyManager.getNetworkType(); switch (mobileNetwork) { case TelephonyManager.NETWORK_TYPE_GPRS: case TelephonyManager.NETWORK_TYPE_EDGE: case TelephonyManager.NETWORK_TYPE_CDMA: case TelephonyManager.NETWORK_TYPE_1xRTT: networkConnectionType = NetworkConnectionType.TWO_G; break; case TelephonyManager.NETWORK_TYPE_HSDPA: case TelephonyManager.NETWORK_TYPE_UMTS: case TelephonyManager.NETWORK_TYPE_HSUPA: case TelephonyManager.NETWORK_TYPE_HSPA: case TelephonyManager.NETWORK_TYPE_EHRPD: case TelephonyManager.NETWORK_TYPE_EVDO_0: case TelephonyManager.NETWORK_TYPE_EVDO_A: case TelephonyManager.NETWORK_TYPE_EVDO_B: networkConnectionType = NetworkConnectionType.THREE_G; break; case TelephonyManager.NETWORK_TYPE_LTE: case TelephonyManager.NETWORK_TYPE_HSPAP: networkConnectionType = NetworkConnectionType.FOUR_G; break; default: networkConnectionType = NetworkConnectionType.UNKNOWN; break; } } } return networkConnectionType; }</code><technical_language>return early instead of nested conditionals? suggestion</technical_language>

Target:
static NetworkConnectionType getNetworkType(Context context) { TelephonyManager telephonyManager = (TelephonyManager) context.getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager == null) { return NetworkConnectionType.UNKNOWN; } NetworkInfo networkInfo = getNetworkInfo(context); if (networkInfo == null) { return NetworkConnectionType.UNKNOWN; } int network = networkInfo.getType(); if (network == ConnectivityManager.TYPE_WIFI) { return NetworkConnectionType.WIFI; } int mobileNetwork = telephonyManager.getNetworkType(); switch (mobileNetwork) { case TelephonyManager.NETWORK_TYPE_GPRS: case TelephonyManager.NETWORK_TYPE_EDGE: case TelephonyManager.NETWORK_TYPE_CDMA: case TelephonyManager.NETWORK_TYPE_1xRTT: return NetworkConnectionType.TWO_G; case TelephonyManager.NETWORK_TYPE_HSDPA: case TelephonyManager.NETWORK_TYPE_UMTS: case TelephonyManager.NETWORK_TYPE_HSUPA: case TelephonyManager.NETWORK_TYPE_HSPA: case TelephonyManager.NETWORK_TYPE_EHRPD: case TelephonyManager.NETWORK_TYPE_EVDO_0: case TelephonyManager.NETWORK_TYPE_EVDO_A: case TelephonyManager.NETWORK_TYPE_EVDO_B: return NetworkConnectionType.THREE_G; case TelephonyManager.NETWORK_TYPE_LTE: case TelephonyManager.NETWORK_TYPE_HSPAP: return NetworkConnectionType.FOUR_G; default: return NetworkConnectionType.UNKNOWN; } }
Source:
<code>public static synchronized ClientPrefs getInstance() { if (AppGlobals.isDebug && sInstance != null) { assert (sInstance.getClass().isInstance(ClientPrefs.class)); <START> } <END> return (ClientPrefs)sInstance; }</code><technical_language>asserts work debug builds, put in a check</technical_language>

Target:
public static synchronized ClientPrefs getInstance() { if (sInstance != null && sInstance.getClass().isInstance(ClientPrefs.class)) { throw new IllegalArgumentException("sInstance is improperly initialized"); } return (ClientPrefs)sInstance; }
Source:
<code>private List<AccountInfo> suggestAccountFullTextSearch( VisibilityControl visibilityControl) throws OrmException { <START> int maxMatches = cfg.getInt("suggest", "fulltextsearchmaxmatches", DEFAULT_MAX_MATCHES); <END> String str = query.toLowerCase(); LinkedHashMap<Account.Id, AccountInfo> accountMap = Maps.newLinkedHashMap(); List<Account> fullNameMatches = Lists.newArrayList(); List<Account> emailMatches = Lists.newArrayList(); for (Account a : dbProvider.get().accounts().all()) { if (a.getFullName() != null && a.getFullName().toLowerCase().contains(str)) { fullNameMatches.add(a); } else if (a.getPreferredEmail() != null && emailMatches.size() < maxMatches && a.getPreferredEmail().toLowerCase().contains(str)) { emailMatches.add(a); } if (fullNameMatches.size() >= maxMatches) { break; } } for (Account a : fullNameMatches) { addSuggestion(accountMap, a, new AccountInfo(a.getId()), visibilityControl); if (accountMap.size() >= limit) { break; } } if (accountMap.size() < limit) { for (Account a : emailMatches) { addSuggestion(accountMap, a, new AccountInfo(a.getId()), visibilityControl); if (accountMap.size() >= limit) { break; } } } return Lists.newArrayList(accountMap.values()); }</code><technical_language>This done in ctor time search</technical_language>

Target:
private List<AccountInfo> suggestAccountFullTextSearch( VisibilityControl visibilityControl) throws OrmException { String str = query.toLowerCase(); LinkedHashMap<Account.Id, AccountInfo> accountMap = Maps.newLinkedHashMap(); List<Account> fullNameMatches = Lists.newArrayList(); List<Account> emailMatches = Lists.newArrayList(); for (Account a : dbProvider.get().accounts().all()) { if (a.getFullName() != null && a.getFullName().toLowerCase().contains(str)) { fullNameMatches.add(a); } else if (a.getPreferredEmail() != null && emailMatches.size() < fullTextMaxMatches && a.getPreferredEmail().toLowerCase().contains(str)) { emailMatches.add(a); } if (fullNameMatches.size() >= fullTextMaxMatches) { break; } } for (Account a : fullNameMatches) { addSuggestion(accountMap, a, new AccountInfo(a.getId()), visibilityControl); if (accountMap.size() >= limit) { break; } } if (accountMap.size() < limit) { for (Account a : emailMatches) { addSuggestion(accountMap, a, new AccountInfo(a.getId()), visibilityControl); if (accountMap.size() >= limit) { break; } } } return Lists.newArrayList(accountMap.values()); }
Source:
<code>public Map<UUID, T> results() { if (results == null) <START> results = new HashMap<>(); <END> return results; }</code><technical_language>return results == null ? Collections.emptyMap() : results;? for exceptions()</technical_language>

Target:
public Map<UUID, T> results() { return results == null ? Collections.emptyMap() : results; }
Source:
<code><START> public void setJavaClass(Class<?> clazz) { <END> this.clazz = clazz; }</code><technical_language>set this this.urn = "java:" + clazz.getName() dont need transient java type</technical_language>

Target:
public void setJavaClass(Class<?> clazz) { this.urn = "java:" + clazz.getName(); }
Source:
<code>public void onAllRequiredCapabilitiesAvailable() { DataHolder.getInstance().getBundleContext().registerService(WebSocketServerSC.class, this, null); <START> log.info("All required capabilities are available of WebSocket service component is available."); <END> }</code><technical_language>meaning of this info log clear, please review grammar</technical_language>

Target:
public void onAllRequiredCapabilitiesAvailable() { DataHolder.getInstance().getBundleContext().registerService(WebSocketServerSC.class, this, null); log.info("All WebSocketEndpoints are available."); }
Source:
<code>private void setupViewPager() { viewPager = (ViewPager) findViewById(R.id.viewpager); <START> viewPager.setOffscreenPageLimit(3); <END> viewPager.setOnPageChangeListener( new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { getActionBar().setSelectedNavigationItem(position); } } ); viewPager.setAdapter(viewPagerAdapter); }</code><technical_language>Magic number</technical_language>

Target:
private void setupViewPager() { viewPager = (ViewPager) findViewById(R.id.viewpager); viewPager.setOffscreenPageLimit(viewPagerAdapter.getCount()); viewPager.setOnPageChangeListener( new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { getActionBar().setSelectedNavigationItem(position); } } ); viewPager.setAdapter(viewPagerAdapter); }
Source:
<code>public void run() { LOG.info("Starting QuerySubmitter thread"); while (!stopped && !querySubmitter.isInterrupted()) { try { QueryContext ctx = acceptedQueries.take(); synchronized (ctx) { if (ctx.getStatus().getStatus().equals(Status.QUEUED)) { LOG.info("Launching query:" + ctx.getDriverQuery()); try { <START> acquire(ctx.getGrillSessionIdentifier()); <END> rewriteAndSelect(ctx); ctx.getSelectedDriver().executeAsync(ctx); } catch (GrillException e) { LOG.error("Error launching query ", e); String reason = e.getCause() != null ? e.getCause().getMessage() : e.getMessage(); setFailedStatus(ctx, "Launching query failed", reason); continue; } setLaunchedStatus(ctx); LOG.info("Launched query " + ctx.getQueryHandle()); } } } catch (InterruptedException e) { LOG.info("Query Submitter has been interrupted, exiting"); return; } catch (Exception e) { LOG.error("Error in query submitter", e); } } }</code><technical_language>Is release</technical_language>

Target:
public void run() { LOG.info("Starting QuerySubmitter thread"); while (!stopped && !querySubmitter.isInterrupted()) { try { QueryContext ctx = acceptedQueries.take(); synchronized (ctx) { if (ctx.getStatus().getStatus().equals(Status.QUEUED)) { LOG.info("Launching query:" + ctx.getDriverQuery()); try { acquire(ctx.getGrillSessionIdentifier()); rewriteAndSelect(ctx); ctx.getSelectedDriver().executeAsync(ctx); } catch (GrillException e) { LOG.error("Error launching query ", e); String reason = e.getCause() != null ? e.getCause().getMessage() : e.getMessage(); setFailedStatus(ctx, "Launching query failed", reason); continue; } finally { release(ctx.getGrillSessionIdentifier()); } setLaunchedStatus(ctx); LOG.info("Launched query " + ctx.getQueryHandle()); } } } catch (InterruptedException e) { LOG.info("Query Submitter has been interrupted, exiting"); return; } catch (Exception e) { LOG.error("Error in query submitter", e); } } }
Source:
<code>private String[] parseCredentials(String credentialsString) { if (credentialsString == null) throw new BadCredentialsException("Authorization required"); String[] credentials = credentialsString.split(":"); if (credentials.length != 2) throw new BadCredentialsException("Authorization required"); <START> return credentials; <END> }</code><technical_language>Do want .trim() 2 parts avoid problems if Authorization header <key> : <signature></technical_language>

Target:
private String[] parseCredentials(String credentialsString) { if (credentialsString == null) throw new BadCredentialsException("Authorization required"); String[] credentials = credentialsString.split(":"); if (credentials.length != 2) { throw new BadCredentialsException("Authorization required"); } credentials[0] = credentials[0].trim(); credentials[1] = credentials[1].trim(); return credentials; }
Source:
<code>CompletableFuture<Boolean> actualRemoveMaxIdleExpireEntry(K key, V value, long maxIdle, boolean skipLocking) { CompletableFuture<Boolean> completableFuture = new CompletableFuture<>(); Object expiringObject = expiring.putIfAbsent(key, completableFuture); if (expiringObject == null) { if (trace) { log.tracef("Submitting expiration removal for key %s which had maxIdle of %s", toStr(key), maxIdle); } completableFuture.whenComplete((b, t) -> expiring.remove(key, completableFuture)); try { AdvancedCache<K, V> cacheToUse = skipLocking ? cache.withFlags(Flag.SKIP_LOCKING) : cache; CompletableFuture<Boolean> future = removeMaxIdle(cacheToUse, key, value); future.whenComplete((b, t) -> { <START> if (t != null) { <END> completableFuture.completeExceptionally(t); } else { completableFuture.complete(b); } }); return completableFuture; } catch (Throwable t) { completableFuture.completeExceptionally(t); throw t; } } else if (expiringObject instanceof CompletableFuture) { return (CompletableFuture<Boolean>) expiringObject; } else { return CompletableFutures.completedTrue(); } }</code><technical_language>AFAICT need declare a future variable, need return future, return future.whenComplete(...)</technical_language>

Target:
CompletableFuture<Boolean> actualRemoveMaxIdleExpireEntry(K key, V value, long maxIdle, boolean skipLocking) { CompletableFuture<Boolean> completableFuture = new CompletableFuture<>(); Object expiringObject = expiring.putIfAbsent(key, completableFuture); if (expiringObject == null) { if (trace) { log.tracef("Submitting expiration removal for key %s which had maxIdle of %s", toStr(key), maxIdle); } completableFuture.whenComplete((b, t) -> expiring.remove(key, completableFuture)); try { AdvancedCache<K, V> cacheToUse = skipLocking ? cache.withFlags(Flag.SKIP_LOCKING) : cache; CompletableFuture<Boolean> future = removeMaxIdle(cacheToUse, key, value); return future.whenComplete((b, t) -> { if (t != null) { completableFuture.completeExceptionally(t); } else { completableFuture.complete(b); } }); } catch (Throwable t) { completableFuture.completeExceptionally(t); throw t; } } else if (expiringObject instanceof CompletableFuture) { return (CompletableFuture<Boolean>) expiringObject; } else { return CompletableFutures.completedTrue(); } }
Source:
<code><START> public void remove(int id) { <END> locations.remove(id); }</code><technical_language>return boolean if id (similar semantics Set.remove)</technical_language>

Target:
public boolean remove(int id) { return locations.remove(id) != null; }
Source:
<code>public void performApply(ILaunchConfigurationWorkingCopy configuration) { <START> SDBGLaunchConfigWrapper dartLauncher = new SDBGLaunchConfigWrapper(configuration); <END> dartLauncher.setApplicationName(fileText.getText()); dartLauncher.setArguments(argumentText.getText().trim()); dartLauncher.setEnvironmentString(envText.getText().trim()); }</code><technical_language>change name sdbgLauncher</technical_language>

Target:
public void performApply(ILaunchConfigurationWorkingCopy configuration) { SDBGLaunchConfigWrapper chromeLauncher = new SDBGLaunchConfigWrapper(configuration); chromeLauncher.setApplicationName(fileText.getText()); chromeLauncher.setArguments(argumentText.getText().trim()); chromeLauncher.setEnvironmentString(envText.getText().trim()); }
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate(R.layout.fragment_subscriptions, container, false); ((AppCompatActivity) getActivity()).setSupportActionBar(root.findViewById(R.id.toolbar)); subscriptionGridLayout = root.findViewById(R.id.subscriptions_grid); subscriptionGridLayout.setNumColumns(prefs.getInt(PREF_NUM_COLUMNS, getDefaultNumOfColumns())); registerForContextMenu(subscriptionGridLayout); subscriptionAddButton = root.findViewById(R.id.subscriptions_add); progressBar = root.findViewById(R.id.progLoading); feedsFilteredMsg = root.findViewById(R.id.feeds_filtered_message); feedsFilteredMsg.setOnClickListener((l) -> FeedFilterDialog.showDialog(requireContext())); SwipeRefreshLayout swipeRefreshLayout = root.findViewById(R.id.swiperefresh); swipeRefreshLayout.setOnRefreshListener(() -> { AutoUpdateManager.runImmediate(requireContext()); new Thread(() -> { try { Thread.sleep(800); } catch (Exception ignore) { } getActivity().runOnUiThread(() -> { swipeRefreshLayout.setRefreshing(false); <START> }); <END> }).start(); }); return root; }</code><technical_language>I this easier new Handler().postDelayed(() -> ..., 800)</technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate(R.layout.fragment_subscriptions, container, false); ((AppCompatActivity) getActivity()).setSupportActionBar(root.findViewById(R.id.toolbar)); subscriptionGridLayout = root.findViewById(R.id.subscriptions_grid); subscriptionGridLayout.setNumColumns(prefs.getInt(PREF_NUM_COLUMNS, getDefaultNumOfColumns())); registerForContextMenu(subscriptionGridLayout); subscriptionAddButton = root.findViewById(R.id.subscriptions_add); progressBar = root.findViewById(R.id.progLoading); feedsFilteredMsg = root.findViewById(R.id.feeds_filtered_message); feedsFilteredMsg.setOnClickListener((l) -> FeedFilterDialog.showDialog(requireContext())); SwipeRefreshLayout swipeRefreshLayout = root.findViewById(R.id.swipeRefresh); swipeRefreshLayout.setOnRefreshListener(() -> { AutoUpdateManager.runImmediate(requireContext()); new Handler().postDelayed(() -> swipeRefreshLayout.setRefreshing(false), getResources().getInteger(R.integer.swipe_to_refresh_duration_in_ms)); }); return root; }
Source:
<code>public void onDestroy() { super.onDestroy(); if (activity.isFinishing() && player != null && player.videoPlayerSelected()) stopService(); else unbind(); PreferenceManager.getDefaultSharedPreferences(activity) .unregisterOnSharedPreferenceChangeListener(this); activity.unregisterReceiver(broadcastReceiver); <START> activity.getContentResolver().unregisterContentObserver(settingsContentObserver); <END> if (positionSubscriber != null) positionSubscriber.dispose(); if (currentWorker != null) currentWorker.dispose(); if (disposables != null) disposables.clear(); positionSubscriber = null; currentWorker = null; disposables = null; bottomSheetBehavior.setBottomSheetCallback(null); }</code><technical_language>set broadcastReceiver settingsContentObserver null, prevent memory leaks</technical_language>

Target:
public void onDestroy() { super.onDestroy(); if (activity.isFinishing() && player != null && player.videoPlayerSelected()) { stopService(requireContext()); } else { unbind(requireContext()); } PreferenceManager.getDefaultSharedPreferences(activity) .unregisterOnSharedPreferenceChangeListener(this); activity.unregisterReceiver(broadcastReceiver); activity.getContentResolver().unregisterContentObserver(settingsContentObserver); if (positionSubscriber != null) { positionSubscriber.dispose(); } if (currentWorker != null) { currentWorker.dispose(); } disposables.clear(); positionSubscriber = null; currentWorker = null; bottomSheetBehavior.setBottomSheetCallback(null); }
Source:
<code>public boolean canContinue(CruiseConfig cruiseConfig) { return isUserAuthorized() && doesTemplateExist(cruiseConfig); <START> } <END></code><technical_language>do need check doesTemplateExist(cruiseConfig) controller a load_template destroy check</technical_language>

Target:
public boolean canContinue(CruiseConfig cruiseConfig) { return super.canContinue(cruiseConfig) && doesTemplateExist(cruiseConfig); }
Source:
<code><START> public ArrayInterface setNumber(int index, Number value) { <END> return setObject(index, value); }</code><technical_language>I return Array here</technical_language>

Target:
public Array setNumber(int index, Number value) { return setObject(index, value); }
Source:
<code>protected Type build(String name) { Preconditions.checkState(logicalTypeAnnotation == null, "LIST is already the logical type and can't be changed"); <START> Objects.requireNonNull(elementType, "List element type"); <END> GroupBuilder<GroupType> builder = buildGroup(repetition).as(OriginalType.LIST); if (id != null) { builder.id(id.intValue()); } return builder .repeatedGroup().addFields(elementType).named("list") .named(name); }</code><technical_language>suggestion Objects.requireNonNull(elementType, "List element type null");</technical_language>

Target:
protected Type build(String name) { Preconditions.checkState(logicalTypeAnnotation == null, "LIST is already the logical type and can't be changed"); Objects.requireNonNull(elementType, "List element type cannot be null"); GroupBuilder<GroupType> builder = buildGroup(repetition).as(OriginalType.LIST); if (id != null) { builder.id(id.intValue()); } return builder .repeatedGroup().addFields(elementType).named("list") .named(name); }
Source:
<code>private IMergeContext prepareContext(IFile workspaceFile, String srcRev, String dstRev) throws Exception { GitSynchronizeData gsd = new GitSynchronizeData(repo, srcRev, dstRev, true, Collections.<IResource> singleton(workspaceFile)); GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd); GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber( gsds); subscriber.init(new NullProgressMonitor()); ResourceMapping mapping = AdapterUtils.adapt(workspaceFile, ResourceMapping.class); SubscriberScopeManager manager = new SubscriberScopeManager( subscriber.getName(), new ResourceMapping[] { mapping, }, subscriber, true); try { manager.initialize(new NullProgressMonitor()); } catch (CoreException e) { <START> fail("Couldn't expand the subscriber scope"); <END> } GitSubscriberMergeContext mergeContext = new GitSubscriberMergeContext( subscriber, manager, gsds); Job.getJobManager().join(mergeContext, new NullProgressMonitor()); return mergeContext; }</code><technical_language>exceptions fail test escape test give some more information, stack traces original error message. drop original exception</technical_language>

Target:
private IMergeContext prepareContext(IFile workspaceFile, String srcRev, String dstRev) throws Exception { GitSynchronizeData gsd = new GitSynchronizeData(repo, srcRev, dstRev, true, Collections.<IResource> singleton(workspaceFile)); GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd); GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber( gsds); subscriber.init(new NullProgressMonitor()); ResourceMapping mapping = AdapterUtils.adapt(workspaceFile, ResourceMapping.class); SubscriberScopeManager manager = new SubscriberScopeManager( subscriber.getName(), new ResourceMapping[] { mapping, }, subscriber, true); manager.initialize(new NullProgressMonitor()); GitSubscriberMergeContext mergeContext = new GitSubscriberMergeContext( subscriber, manager, gsds); Job.getJobManager().join(mergeContext, new NullProgressMonitor()); return mergeContext; }
Source:
<code>protected boolean checkIfCpusExist(Cluster group) { if (group.getCompatibilityVersion() != getParameters().getCluster().getCompatibilityVersion() && cpuFlagsManagerHandler.checkIfCpusExist(group.getCpuName(), group.getCompatibilityVersion()) && !cpuFlagsManagerHandler.checkIfCpusExist(group.getCpuName(), <START> getParameters().getCluster().getCompatibilityVersion())) { <END> return true; } return cpuFlagsManagerHandler.checkIfCpusExist(getCluster().getCpuName(), getCluster().getCompatibilityVersion()); }</code><technical_language>please create a function for this condition, instead of copy-pasting it</technical_language>

Target:
protected boolean checkIfCpusExist(Cluster group) { if (!group.getCompatibilityVersion().equals(getParameters().getCluster().getCompatibilityVersion()) && ((cpuFlagsManagerHandler.checkIfCpusExist(group.getCpuName(), group.getCompatibilityVersion()) && !cpuFlagsManagerHandler.checkIfCpusExist(group.getCpuName(), getParameters().getCluster().getCompatibilityVersion())) || !cpuFlagsManagerHandler.checkIfCpusExist(getCluster().getCpuName(), getParameters().getCluster().getCompatibilityVersion()))) { return true; } return cpuFlagsManagerHandler.checkIfCpusExist(getCluster().getCpuName(), getCluster().getCompatibilityVersion()); }
Source:
<code>private String resolveAdditionalJoinCondition( Join join, String rhsTableAlias, String withClause, Joinable joinable, AssociationType associationType) { final String filter; <START> if ( associationType.isEntityType() && <END> join.getLeftHandSide().getDisposition() != QuerySpace.Disposition.COLLECTION ) { filter = joinable.filterFragment( rhsTableAlias, queryInfluencers.getEnabledFilters() ); } else if ( associationType != null ) { filter = associationType.getOnCondition( rhsTableAlias, factory, queryInfluencers.getEnabledFilters() ); } else { filter = joinable.filterFragment( rhsTableAlias, queryInfluencers.getEnabledFilters() ); } if ( StringHelper.isEmpty( withClause ) && StringHelper.isEmpty( filter ) ) { return ""; } else if ( StringHelper.isNotEmpty( withClause ) && StringHelper.isNotEmpty( filter ) ) { return filter + " and " + withClause; } else { return StringHelper.isNotEmpty( filter ) ? filter : withClause; } }</code><technical_language>a NPE if associationType is null code support a null associationType</technical_language>

Target:
private String resolveAdditionalJoinCondition( Join join, String rhsTableAlias, String withClause, Joinable joinable, AssociationType associationType) { final String filter; if ( associationType != null ) { if ( associationType.isEntityType() && join.getLeftHandSide().getDisposition() != QuerySpace.Disposition.COLLECTION ) { filter = joinable.filterFragment( rhsTableAlias, queryInfluencers.getEnabledFilters() ); } else { filter = associationType.getOnCondition( rhsTableAlias, factory, queryInfluencers.getEnabledFilters() ); } } else { filter = joinable.filterFragment( rhsTableAlias, queryInfluencers.getEnabledFilters() ); } if ( StringHelper.isEmpty( withClause ) && StringHelper.isEmpty( filter ) ) { return ""; } else if ( StringHelper.isNotEmpty( withClause ) && StringHelper.isNotEmpty( filter ) ) { return filter + " and " + withClause; } else { return StringHelper.isNotEmpty( filter ) ? filter : withClause; } }
Source:
<code><START> protected List<String[]> getHeaders(final String mapping) { <END> List<String[]> corsHeaders = headerMap.get(mapping); if (null == corsHeaders) { synchronized (this.getClass()) { corsHeaders = headerMap.get(mapping); if (null == corsHeaders) { final List<String[]> newHeaders = new ArrayList<>(); Config.subset(CORS_PREFIX + "." + mapping).forEachRemaining(key -> { newHeaders.add(new String[] { fixHeaderCase(key.replace(CORS_PREFIX, "")), Config.getStringProperty(CORS_PREFIX + "." + mapping + "." + key, null) }); }); corsHeaders = ImmutableList.copyOf(newHeaders); headerMap.put(mapping, corsHeaders); } } } if (corsHeaders.isEmpty() && !CORS_DEFAULT.equals(mapping)) { return getHeaders(CORS_DEFAULT); } return corsHeaders; }</code><technical_language>headers coming config inmutable, load headerMap immutable Map a static block class started return it, instead of a lazy loading strategy, in case need concurrentMap syncro block a eager strategy :)</technical_language>

Target:
protected List<String[]> getHeaders(final String mapping) { List<String[]> corsHeaders = headerMap.containsKey(mapping) ? headerMap.get(mapping) : headerMap.get(CORS_DEFAULT); return corsHeaders != null ? corsHeaders : ImmutableList.of() ; }
Source:
<code>public void setupOnce() { cacheManagerMock = new CacheManagerMock(); cacheManagerMock.addCache(CACHE_NAME); cacheManager = new JCacheCacheManager(cacheManagerMock.getCacheManager()); cacheManager.afterPropertiesSet(); <START> transactionalCacheManager = new JCacheCacheManager(true, cacheManagerMock.getCacheManager()); <END> transactionalCacheManager.afterPropertiesSet(); }</code><technical_language>compile anymore</technical_language>

Target:
public void setupOnce() { cacheManagerMock = new CacheManagerMock(); cacheManagerMock.addCache(CACHE_NAME); cacheManager = new JCacheCacheManager(cacheManagerMock.getCacheManager()); cacheManager.setTransactionAware(false); cacheManager.afterPropertiesSet(); transactionalCacheManager = new JCacheCacheManager(cacheManagerMock.getCacheManager()); transactionalCacheManager.setTransactionAware(true); transactionalCacheManager.afterPropertiesSet(); }
Source:
<code>public String getKieDeploymentDescriptorText(final String path) { <START> return loadKieTextFromJar(path, META_INF, "kie-deployment-descriptor.xml"); <END> }</code><technical_language>consistent introduce constant for kie-deployment-descriptor.xml possibly in tests</technical_language>

Target:
public String getKieDeploymentDescriptorText(final String path) { return loadKieTextFromJar(path, META_INF, KIE_DEPLOYMENT_DESCRIPTOR_XML); }
Source:
<code>protected boolean validateFields() { try { String trimmedRegex = getRegexTextField().getText().trim(); <START> if (trimmedRegex.trim().isEmpty()) return false; END> if (regexes != null && regexes.contains(trimmedRegex)) { throw new IllegalArgumentException(TEXT_ALREADY_EXIST_INVALID_REGEX_DIALOG); } Pattern.compile(trimmedRegex, Pattern.CASE_INSENSITIVE); } catch (IllegalArgumentException e) { JOptionPane.showMessageDialog( this, MessageFormat.format(TEXT_INVALID_REGEX_DIALOG, e.getLocalizedMessage()), TITLE_INVALID_REGEX_DIALOG, JOptionPane.INFORMATION_MESSAGE); getRegexTextField().requestFocusInWindow(); return false; } return true; }</code><technical_language>This is syntactically correct curly braces for consistency</technical_language>

Target:
protected boolean validateFields() { String trimmedRegex = getRegexTextField().getText().trim(); if (regexes != null && regexes.contains(trimmedRegex)) { JOptionPane.showMessageDialog( this, TEXT_ALREADY_EXIST_INVALID_REGEX_DIALOG, TITLE_ALREADY_EXIST_INVALID_REGEX_DIALOG, JOptionPane.INFORMATION_MESSAGE); getRegexTextField().requestFocusInWindow(); return false; } try { Pattern.compile(trimmedRegex, Pattern.CASE_INSENSITIVE); } catch (PatternSyntaxException e) { JOptionPane.showMessageDialog( this, MessageFormat.format(TEXT_INVALID_REGEX_DIALOG, e.getLocalizedMessage()), TITLE_INVALID_REGEX_DIALOG, JOptionPane.INFORMATION_MESSAGE); getRegexTextField().requestFocusInWindow(); return false; } return true; }
Source:
<code>public CalculationRequirements requirements() { <START> return CalculationRequirements.EMPTY; <END> }</code><technical_language>empty() instead of EMPTY for consistency</technical_language>

Target:
public CalculationRequirements requirements() { return CalculationRequirements.empty(); }
Source:
<code>public void testGoodHBaseName() { BigtableClusterName bigtableClusterName = new BigtableClusterName("some-project", "some-zone", "some-cluster"); String bigtableTableName = bigtableClusterName.toTableNameStr("some-table"); <START> String hbaseName = bigtableClusterName.toTableId(bigtableTableName); <END> Assert.assertEquals("some-table", hbaseName); }</code><technical_language>String tableId</technical_language>

Target:
public void testGoodHBaseName() { BigtableClusterName bigtableClusterName = new BigtableClusterName("some-project", "some-zone", "some-cluster"); String bigtableTableName = bigtableClusterName.toTableNameStr("some-table"); String tableId = bigtableClusterName.toTableId(bigtableTableName); Assert.assertEquals("some-table", tableId); }
Source:
<code><START> public Result visit(TDataType node, Parameter parameter) { <END> if (Objects.nonNull(node.getDerivedFrom()) && !validateTypeIsDefined(node.getDerivedFrom(), typeVisitor.getDataTypes())) { String msg = "The parent type \"" + node.getDerivedFrom() + "\" is undefined! \n" + print(parameter.getContext()); setException(new InvalidParentType(msg)); } if (Objects.nonNull(node.getDerivedFrom()) && (Defaults.YAML_TYPES.contains(node.getDerivedFrom().getLocalPart()) || Defaults.TOSCA_TYPES.contains(node.getDerivedFrom().getLocalPart()) ) && !node.getProperties().isEmpty()) { String msg = "The native data type \"" + parameter.getKey() + "\" cannot be extended with properties! \n" + print(parameter.getContext()); setException(new InvalidNativeTypeExtend(msg)); } super.visit(node, parameter); return null; }</code><technical_language>improvement, if extract code clones a private method illustrated in following? private Result visitElement(TInterfaceType node, P parameter) { if (node.getDerivedFrom() != null && !validateTypeIsDefined(node.getDerivedFrom(), typeVisitor.getInterfaceTypes())) { String msg = "The parent type \"" + node.getDerivedFrom() + "\" is undefined! \n" + print(parameter.getContext()); setException(new InvalidParentType(msg)); } super.visit(node, parameter); return null; }</technical_language>

Target:
public Result visit(TDataType node, Parameter parameter) { validateEntityType(node, parameter, typeVisitor.getDataTypes()); if (Objects.nonNull(node.getDerivedFrom()) && (Defaults.YAML_TYPES.contains(node.getDerivedFrom().getLocalPart()) || Defaults.TOSCA_TYPES.contains(node.getDerivedFrom().getLocalPart()) ) && !node.getProperties().isEmpty()) { String msg = "The native data type \"" + parameter.getKey() + "\" cannot be extended with properties! \n" + print(parameter.getContext()); setException(new InvalidNativeTypeExtend(msg)); } super.visit(node, parameter); return null; }
Source:
<code>protected void setActionMessageParameters() { <START> addCanDoActionMessage(VdcBllMessages.VAR__ACTION__VM_SLA_POLICY); <END> addCanDoActionMessage(VdcBllMessages.VAR__ACTION__UPDATE_VM_SLA_POLICY); }</code><technical_language>entity VM (VAR__TYPE__VM)</technical_language>

Target:
protected void setActionMessageParameters() { addCanDoActionMessage(VdcBllMessages.VAR__ACTION__UPDATE_SLA_POLICY); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__VM); }
Source:
<code>protected StringBuilder createCountSelect(SearchCriteria<?> sc, final boolean whereClause) { <START> if (sc == null) <END> return null; StringBuilder sql; Pair<GroupBy<?, ?, ?>, List<Object>> groupBys = sc.getGroupBy(); if (groupBys != null) { final SqlGenerator generator = new SqlGenerator(_entityBeanType); sql = new StringBuilder(generator.buildCountSqlWithGroupBy(groupBys.first())); } else { sql = new StringBuilder(_count); } if (!whereClause) { sql.delete(sql.length() - (_discriminatorClause == null ? 6 : 4), sql.length()); } return sql; }</code><technical_language>This potentially NPE, @anuragaw check users of method potentially ideal return value? createCountSelect indirect users atleast 70 usages codebase-wide, while fixing bug, new regression avoided</technical_language>

Target:
protected StringBuilder createCountSelect(SearchCriteria<?> sc, final boolean whereClause) { StringBuilder sql = new StringBuilder(_count); if (sc != null) { Pair<GroupBy<?, ?, ?>, List<Object>> groupBys = sc.getGroupBy(); if (groupBys != null) { final SqlGenerator generator = new SqlGenerator(_entityBeanType); sql = new StringBuilder(generator.buildCountSqlWithGroupBy(groupBys.first())); } } if (!whereClause) { sql.delete(sql.length() - (_discriminatorClause == null ? 6 : 4), sql.length()); } return sql; }
Source:
<code>public void test_wrong_decision() throws IOException { final DMNRuntime runtime = roundTripUnmarshalMarshalThenUnmarshalDMN(this.getClass().getResourceAsStream("/wrong_decision.dmn")); DMNModel dmnModel = runtime.getModels().get(0); assertTrue(dmnModel.hasErrors()); DMNMessage m0 = dmnModel.getMessages(DMNMessage.Severity.ERROR).get(0); <START> System.out.println(m0); <END> assertTrue("expected a message identifying the problem on a decision named 'my decision'", m0.getMessage().startsWith("No expression defined for name 'my decision'")); DecisionNode d0 = dmnModel.getDecisionById("_cce32679-9395-444d-a4bf-96af8ee727a0"); org.kie.dmn.model.api.Expression d0le = d0.getDecision().getExpression(); assertTrue(d0le instanceof org.kie.dmn.model.api.LiteralExpression); assertNull(((org.kie.dmn.model.api.LiteralExpression) d0le).getText()); DMNMarshaller m = new DMNMarshaller(new XMLEncoderDiagramMetadataMarshaller(), applicationFactoryManager); Graph<?, ?> g = m.unmarshall(null, this.getClass().getResourceAsStream("/wrong_decision.dmn")); Node<?, ?> decisionNode = g.getNode("_cce32679-9395-444d-a4bf-96af8ee727a0"); assertNodeContentDefinitionIs(decisionNode, Decision.class); View<Decision> view = ((View<Decision>) decisionNode.getContent()); Expression expression = view.getDefinition().getExpression(); assertNotNull(expression); assertEquals(LiteralExpression.class, expression.getClass()); LiteralExpression le = (LiteralExpression) expression; assertNull(le.getText()); }</code><technical_language>I logger debug message for this remove assert message text do line bellow</technical_language>

Target:
public void test_wrong_decision() throws IOException { final DMNRuntime runtime = roundTripUnmarshalMarshalThenUnmarshalDMN(this.getClass().getResourceAsStream("/wrong_decision.dmn")); DMNModel dmnModel = runtime.getModels().get(0); assertTrue(dmnModel.hasErrors()); DMNMessage m0 = dmnModel.getMessages(DMNMessage.Severity.ERROR).get(0); assertTrue("expected a message identifying the problem on a decision named 'my decision'", m0.getMessage().startsWith("No expression defined for name 'my decision'")); DecisionNode d0 = dmnModel.getDecisionById("_cce32679-9395-444d-a4bf-96af8ee727a0"); org.kie.dmn.model.api.Expression d0le = d0.getDecision().getExpression(); assertTrue(d0le instanceof org.kie.dmn.model.api.LiteralExpression); assertNull(((org.kie.dmn.model.api.LiteralExpression) d0le).getText()); DMNMarshaller m = new DMNMarshaller(new XMLEncoderDiagramMetadataMarshaller(), applicationFactoryManager); Graph<?, ?> g = m.unmarshall(null, this.getClass().getResourceAsStream("/wrong_decision.dmn")); Node<?, ?> decisionNode = g.getNode("_cce32679-9395-444d-a4bf-96af8ee727a0"); assertNodeContentDefinitionIs(decisionNode, Decision.class); View<Decision> view = ((View<Decision>) decisionNode.getContent()); Expression expression = view.getDefinition().getExpression(); assertNotNull(expression); assertEquals(LiteralExpression.class, expression.getClass()); LiteralExpression le = (LiteralExpression) expression; assertNull(le.getText()); }
Source:
<code>public AddBondParameters(Guid vdsId, String bondName, Network network, String[] nics, int vladId) { this(vdsId, bondName, network, nics); setVlanId(vladId); <START> privateBootProtocol = NetworkBootProtocol.NONE; <END> }</code><technical_language>Redundant, call this(vdsId, bondName, network, nics) handles</technical_language>

Target:
public AddBondParameters(Guid vdsId, String bondName, Network network, String[] nics, int vladId) { this(vdsId, bondName, network, nics); setVlanId(vladId); }
Source:
<code>public void setVisible(boolean visible) { boolean previous = this.visible; <START> if ( previous && !visible ) <END> { sendToAffected( removePacket() ); } else if ( !previous && visible ) { sendToAffected( addPacket() ); } this.visible = visible; }</code><technical_language>shortened if previous != visible</technical_language>

Target:
public void setVisible(boolean visible) { boolean previous = this.visible; if ( previous && !visible ) { sendToAffected( removePacket ); } else if ( !previous && visible ) { sendToAffected( addPacket() ); } this.visible = visible; }
Source:
<code>public ContainerSummaryRequiredException(Item item) { <START> super("Container summary not found so equivalence is being rerun on container with id: " <END> + item.getContainer().getId() + "and then item with id: " + item.getId()); this.item = item; }</code><technical_language>*being* re-run, needs rerun</technical_language>

Target:
public ContainerSummaryRequiredException(Item item) { super("Container summary not found so equivalence needs to be run on container with id: " + item.getContainer().getId() + "and then item with id: " + item.getId()); this.item = item; }