auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected String checkModifyWhitelist(final CatalogType suspect, final CatalogType prevType, final String field) { if (suspect instanceof Cluster || suspect instanceof PlanFragment || suspect instanceof MaterializedViewInfo) { return null; } else if (suspect instanceof Table) { if ("isdred".equalsIgnoreCase(field)) { assert ((Boolean)suspect.getField("isDRed")); return "Table " + suspect.getTypeName() + " has DR enabled on the master but not the replica"; } if ("estimatedtuplecount".equals(field)) { return null; } if ("tuplelimit".equals(field)) { return null; } } else if (suspect instanceof Database) { if ("isActiveActiveDRed".equalsIgnoreCase(field)) { return "Incompatible DR modes between two clusters"; } if ("schema".equalsIgnoreCase(field) || "securityprovider".equalsIgnoreCase(field)) { return null; } } else if (suspect instanceof Column) { if ("defaultvalue".equals(field) || "defaulttype".equals(field) || "matview".equals(field) || "aggregatetype".equals(field) || "matviewsource".equals(field)) { return null; } } else if (isTableLimitDeleteStmt(suspect)) { return null; } else if ((suspect instanceof Index && isUniqueIndex(suspect) == isUniqueIndex(prevType)) || (suspect instanceof ColumnRef && !isUniqueIndexColumn(suspect))) { return null; } else if (suspect instanceof TableRef) { <START> return null; <END> } return "Incompatible schema between master and replica: field " + field + " in schema object " + suspect; }</code><technical_language>Curious needed add this above</technical_language>

Target:
protected String checkModifyWhitelist(final CatalogType suspect, final CatalogType prevType, final String field) { if (suspect instanceof Cluster || suspect instanceof PlanFragment || suspect instanceof MaterializedViewInfo) { return null; } else if (suspect instanceof Table) { if ("isdred".equalsIgnoreCase(field)) { assert ((Boolean)suspect.getField("isDRed")); return "Table " + suspect.getTypeName() + " has DR enabled on the master but not the replica"; } if ("estimatedtuplecount".equals(field)) { return null; } if ("tuplelimit".equals(field)) { return null; } } else if (suspect instanceof Database) { if ("isActiveActiveDRed".equalsIgnoreCase(field)) { return "Incompatible DR modes between two clusters"; } if ("schema".equalsIgnoreCase(field) || "securityprovider".equalsIgnoreCase(field)) { return null; } } else if (suspect instanceof Column) { if ("defaultvalue".equals(field) || "defaulttype".equals(field) || "matview".equals(field) || "aggregatetype".equals(field) || "matviewsource".equals(field)) { return null; } } else if (isTableLimitDeleteStmt(suspect)) { return null; } else if ((suspect instanceof Index && isUniqueIndex(suspect) == isUniqueIndex(prevType)) || (suspect instanceof ColumnRef && !isUniqueIndexColumn(suspect))) { return null; } return "Incompatible schema between master and replica: field " + field + " in schema object " + suspect; }
Source:
<code>public CTFClock parse(CommonTree clock, ICommonTreeParserParameter unused) throws ParseException { List<CommonTree> children = clock.getChildren(); CTFClock ctfClock = new CTFClock(); for (CommonTree child : children) { final String key = child.getChild(0).getChild(0).getChild(0).getText(); final CommonTree value = (CommonTree) child.getChild(1).getChild(0).getChild(0); final int type = value.getType(); final String text = value.getText(); switch (type) { case CTFParser.INTEGER: case CTFParser.DECIMAL_LITERAL: Long numValue; try { numValue = Long.parseLong(text); } catch (NumberFormatException e) { <START> Activator.log("Number conversion issue with " + text + ". Assigning " + key + " = 0."); END> numValue = Long.valueOf(0L); } ctfClock.addAttribute(key, numValue); break; default: ctfClock.addAttribute(key, text); } } return ctfClock; }</code><technical_language>this a log warning? metadata is malformed</technical_language>

Target:
public CTFClock parse(CommonTree clock, ICommonTreeParserParameter unused) throws ParseException { List<CommonTree> children = clock.getChildren(); CTFClock ctfClock = new CTFClock(); for (CommonTree child : children) { final String key = child.getChild(0).getChild(0).getChild(0).getText(); final CommonTree value = (CommonTree) child.getChild(1).getChild(0).getChild(0); final int type = value.getType(); final String text = value.getText(); switch (type) { case CTFParser.INTEGER: case CTFParser.DECIMAL_LITERAL: Long numValue; try { numValue = Long.parseLong(text); } catch (NumberFormatException e) { Activator.log(IStatus.WARNING, "Number conversion issue with " + text + ". Assigning " + key + " = 0."); numValue = Long.valueOf(0L); } ctfClock.addAttribute(key, numValue); break; default: ctfClock.addAttribute(key, text); } } return ctfClock; }
Source:
<code>private Collection<String> upstreamPaths(Map<String, Collection<String>> serviceToUpstreams) { Collection<String> allUpstreamPaths = new ArrayList<>(); for (Entry<String, Collection<String>> entry : serviceToUpstreams.entrySet()) { String servicePath = ZKPaths.makePath(SERVICES_FORMAT, entry.getKey()); for (String upstream : entry.getValue()) { String upstreamPath = ZKPaths.makePath(servicePath, upstream); <START> allUpstreamPaths.add(upstreamPath); <END> } } return allUpstreamPaths; }</code><technical_language>simpler String.format(UPSTREAM_FORMAT, entry.getKey(), upstream)</technical_language>

Target:
private Collection<String> upstreamPaths(Map<String, Collection<String>> serviceToUpstreams) { Collection<String> allUpstreamPaths = new ArrayList<>(); for (Entry<String, Collection<String>> entry : serviceToUpstreams.entrySet()) { for (String upstream : entry.getValue()) { allUpstreamPaths.add(String.format(UPSTREAM_FORMAT, entry.getKey(), upstream)); } } return allUpstreamPaths; }
Source:
<code>public void testPartialResults() throws Exception { byte[] key1 = randomBytes(8); byte[] key2 = randomBytes(8); FlatRow response1 = FlatRow .newBuilder().withRowKey(ByteString.copyFrom(key1)).addCell(new Cell("cf", ByteString.EMPTY, 10, ByteString.copyFromUtf8("hi!"), new ArrayList<String>())) .build(); RuntimeException exception = new RuntimeException("Something bad happened"); when(mockBulkRead.add(any(ReadRowsRequest.class))) .thenReturn(Futures.immediateFuture(response1)) .thenReturn(Futures.<FlatRow> immediateFailedFuture(exception)); List<Get> gets = Arrays.asList(new Get(key1), new Get(key2)); Object[] results = new Object[2]; try { <START> final BigtableOptions options = BigtableOptions.builder() <END> .setProjectId("projectId") .setInstanceId("instanceId") .build(); createExecutor(options).batch(gets, results); } catch(RetriesExhaustedWithDetailsException ignored) { } Assert.assertTrue("first result is a result", results[0] instanceof Result); Assert.assertTrue(Bytes.equals(((Result)results[0]).getRow(), key1)); Assert.assertEquals(exception, results[1]); }</code><technical_language>Do need this variable, member variable added</technical_language>

Target:
public void testPartialResults() throws Exception { byte[] key1 = randomBytes(8); byte[] key2 = randomBytes(8); FlatRow response1 = FlatRow .newBuilder().withRowKey(ByteString.copyFrom(key1)).addCell(new Cell("cf", ByteString.EMPTY, 10, ByteString.copyFromUtf8("hi!"), new ArrayList<String>())) .build(); RuntimeException exception = new RuntimeException("Something bad happened"); when(mockBulkRead.add(any(ReadRowsRequest.class))) .thenReturn(Futures.immediateFuture(response1)) .thenReturn(Futures.<FlatRow> immediateFailedFuture(exception)); List<Get> gets = Arrays.asList(new Get(key1), new Get(key2)); Object[] results = new Object[2]; try { createExecutor(options).batch(gets, results); } catch(RetriesExhaustedWithDetailsException ignored) { } Assert.assertTrue("first result is a result", results[0] instanceof Result); Assert.assertTrue(Bytes.equals(((Result)results[0]).getRow(), key1)); Assert.assertEquals(exception, results[1]); }
Source:
<code>public String[] getPropertyNames(Object object) { Assert.isLegal(object instanceof EObject); EClass eClass = ((EObject) object).eClass(); <START> String[] propNames = eClass.getEStructuralFeatures().stream().map(f -> f.getName()).toArray(String[]::new); <END> return propNames; }</code><technical_language>this getAllEStructuralFeatures</technical_language>

Target:
public String[] getPropertyNames(Object object) { Assert.isLegal(object instanceof EObject); EClass eClass = ((EObject) object).eClass(); String[] propNames = eClass.getEAllStructuralFeatures().stream().map(f -> f.getName()).toArray(String[]::new); return propNames; }
Source:
<code>public void onClick(DialogInterface dialog, int which) { <START> selectItem(which); <END> dialog.dismiss(); }</code><technical_language>This is out of scope of this pull request, I this custom widget instead of standard Spinner implementation provided framework? This a combination of TextView AlertDialog, I provides existing widget. I guess fine for now, if redesigning sign-up screen, consider refactoring this well</technical_language>

Target:
public void onClick(DialogInterface dialog, int which) { checkedItemIndex = which; selectedItem = items.get(which); select(selectedItem); dialog.dismiss(); }
Source:
<code>public void clickViewPhotoLink(int panelBodyIndex, String urlRegex) throws Exception { String idOfPanelBody = "panelBodyCollapse-" + panelBodyIndex; WebElement photoCell = browser.driver.findElement(By.id(idOfPanelBody)) .findElements(By.cssSelector(".profile-pic-icon-click")) .get(0); JavascriptExecutor jsExecutor = (JavascriptExecutor) browser.driver; jsExecutor.executeScript("document.getElementById('" + idOfPanelBody + "')" + ".getElementsByClassName('profile-pic-icon-click')[0]" + ".getElementsByTagName('a')[0].click();"); Actions actions = new Actions(browser.driver); actions.moveToElement(photoCell).build().perform(); waitForElementToAppear(By.cssSelector(".popover-content > img")); AssertHelper.assertContainsRegex(urlRegex, browser.driver.findElements(By.cssSelector(".popover-content > img")) .get(browser.driver.findElements(By.cssSelector(".popover-content > img")) .size() - 1) <START> .getAttribute("src")); <END> actions.moveByOffset(100, 100).click().build().perform(); }</code><technical_language>new is more readable original. if is a alternative</technical_language>

Target:
public void clickViewPhotoLink(int panelBodyIndex, String urlRegex) throws Exception { String idOfPanelBody = "panelBodyCollapse-" + panelBodyIndex; WebElement photoCell = browser.driver.findElement(By.id(idOfPanelBody)) .findElements(By.cssSelector(".profile-pic-icon-click")) .get(0); JavascriptExecutor jsExecutor = (JavascriptExecutor) browser.driver; jsExecutor.executeScript("document.getElementById('" + idOfPanelBody + "')" + ".getElementsByClassName('profile-pic-icon-click')[0]" + ".getElementsByTagName('a')[0].click();"); Actions actions = new Actions(browser.driver); actions.moveToElement(photoCell).build().perform(); waitForElementToAppear(By.cssSelector(".popover-content > img")); List<WebElement> photos = browser.driver.findElements(By.cssSelector(".popover-content > img")); AssertHelper.assertContainsRegex(urlRegex, photos.get(photos.size() - 1).getAttribute("src")); actions.moveByOffset(100, 100).click().build().perform(); }
Source:
<code>public ZoomLevelSelectorPresenter show() { cancelHide(); floatingView.show(); <START> if(zoomLevelInit){ <END> zoomLevelInit = false; scheduleHide(); } return this; }</code><technical_language>@handreyrc appply KIE style formatting</technical_language>

Target:
public ZoomLevelSelectorPresenter show() { if (zoomLevelInit) { zoomLevelInit = false; } else { cancelHide(); floatingView.show(); } return this; }
Source:
<code>private void enableHook() { if (getEntity() == null || getSelectedItems() == null || getSelectedItems().size() == 0) { return; } <START> ArrayList<VdcActionParametersBase> list = new java.util.ArrayList<VdcActionParametersBase>(); <END> for (Object item : getSelectedItems()) { GlusterHookEntity hook = (GlusterHookEntity) item; list.add(new GlusterHookParameters(getEntity().getId(), hook.getId())); } Frontend.RunMultipleAction(VdcActionType.EnableGlusterHook, list); }</code><technical_language>qualified name</technical_language>

Target:
private void enableHook() { if (getEntity() == null || getSelectedItems() == null || getSelectedItems().size() == 0) { return; } ArrayList<VdcActionParametersBase> list = new ArrayList<VdcActionParametersBase>(); for (Object item : getSelectedItems()) { GlusterHookEntity hook = (GlusterHookEntity) item; list.add(new GlusterHookParameters(getEntity().getId(), hook.getId())); } Frontend.RunMultipleAction(VdcActionType.EnableGlusterHook, list); }
Source:
<code>public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { try { String sampleParam = (String) workItem.getParameter("SampleParam"); String sampleParamTwo = (String) workItem.getParameter("SampleParamTwo"); manager.completeWorkItem(workItem.getId(), null); <START> } catch(Throwable cause) { <END> handleException(cause); } }</code><technical_language>a mismatch names in annotations - is upper case</technical_language>

Target:
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { try { String sampleParam = (String) workItem.getParameter("SampleParam"); String sampleParamTwo = (String) workItem.getParameter("SampleParamTwo"); String sampleResult = "sample result"; Map<String, Object> results = new HashMap<String, Object>(); results.put("SampleResult", sampleResult); manager.completeWorkItem(workItem.getId(), results); } catch(Throwable cause) { handleException(cause); } }
Source:
<code>public boolean equals(Object o) { if (o instanceof ColumnFamilyAndQuantifier) { ColumnFamilyAndQuantifier other = (ColumnFamilyAndQuantifier) o; if (family.length != other.family.length || qualifier.length != other.qualifier.length) return false; <START> for (int i = 0; i < family.length; i++) <END> if (family[i] != other.family[i]) return false; for (int i = 0; i < qualifier.length; i++) if (qualifier[i] != other.qualifier[i]) return false; return true; } return false; }</code><technical_language>Arrays.equals()</technical_language>

Target:
public boolean equals(Object o) { if (o instanceof ColumnFamilyAndQuantifier) { ColumnFamilyAndQuantifier other = (ColumnFamilyAndQuantifier) o; if (family.length != other.family.length || qualifier.length != other.qualifier.length) return false; return (Arrays.equals(family, other.family) && Arrays.equals(qualifier, other.qualifier)); } return false; }
Source:
<code>protected void loadBanner(Context context, CustomEventBannerListener listener, Map<String, Object> localExtras, Map<String, String> serverExtras) { if (context == null) { Log.e(LOG_TAG, "Context cannot be null."); listener.onBannerFailed(ADAPTER_CONFIGURATION_ERROR); return; } if (listener == null) { Log.e(LOG_TAG, "CustomEventBannerListener cannot be null."); return; } if (!(context instanceof Activity)) { Log.e(LOG_TAG, "Ad can be rendered only in Activity context."); listener.onBannerFailed(ADAPTER_CONFIGURATION_ERROR); return; } if (!extrasAreValid(serverExtras)) { listener.onBannerFailed(ADAPTER_CONFIGURATION_ERROR); return; } mContext = context; mListener = listener; mLayout = new FrameLayout(context); String apiKey = serverExtras.get(FlurryAgentWrapper.PARAM_API_KEY); mAdSpaceName = serverExtras.get(FlurryAgentWrapper.PARAM_AD_SPACE_NAME); FlurryAgentWrapper.getInstance().startSession(context, apiKey, null); <START> Log.d(LOG_TAG, "fetch Flurry Ad (" + mAdSpaceName + ") -- " + mLayout.toString()); <END> mBanner = new FlurryAdBanner(mContext, mLayout, mAdSpaceName); mBanner.setListener(new FlurryMopubBannerListener()); mBanner.fetchAd(); }</code><technical_language>printing frame layout? btw, this: android.widget.FrameLayout{b3fe67c V.E...... ......I. 0,0-0,0}</technical_language>

Target:
protected void loadBanner(Context context, CustomEventBannerListener listener, Map<String, Object> localExtras, Map<String, String> serverExtras) { if (context == null) { Log.e(LOG_TAG, "Context cannot be null."); listener.onBannerFailed(ADAPTER_CONFIGURATION_ERROR); return; } if (listener == null) { Log.e(LOG_TAG, "CustomEventBannerListener cannot be null."); return; } if (!(context instanceof Activity)) { Log.e(LOG_TAG, "Ad can be rendered only in Activity context."); listener.onBannerFailed(ADAPTER_CONFIGURATION_ERROR); return; } if (!validateExtras(serverExtras)) { Log.e(LOG_TAG, "Failed banner ad fetch: Missing required server extras" + " [FLURRY_APIKEY and/or FLURRY_ADSPACE]."); listener.onBannerFailed(ADAPTER_CONFIGURATION_ERROR); return; } mContext = context; mListener = listener; mLayout = new FrameLayout(context); String apiKey = serverExtras.get(FlurryAgentWrapper.PARAM_API_KEY); mAdSpaceName = serverExtras.get(FlurryAgentWrapper.PARAM_AD_SPACE_NAME); FlurryAgentWrapper.getInstance().startSession(context, apiKey, null); Log.d(LOG_TAG, "Fetching Flurry ad, ad unit name:" + mAdSpaceName); mBanner = new FlurryAdBanner(mContext, mLayout, mAdSpaceName); mBanner.setListener(new FlurryMopubBannerListener()); mBanner.fetchAd(); }
Source:
<code>private LinkedList<IncludedStructuralElement> determineIncludedStructuralElementPathToChildRecursive( IncludedStructuralElement includedStructuralElement, int number) { if (!Objects.isNull(includedStructuralElement.getLink())) { try { if (ServiceManager.getProcessService() .processIdFromUri(includedStructuralElement.getLink().getUri()) == number) { LinkedList<IncludedStructuralElement> linkedIncludedStructuralElements = new LinkedList<>(); linkedIncludedStructuralElements.add(includedStructuralElement); return linkedIncludedStructuralElements; } } catch (IllegalArgumentException | ClassCastException | SecurityException e) { logger.catching(Level.TRACE, e); } } for (IncludedStructuralElement includedStructuralElementChild : includedStructuralElement.getChildren()) { LinkedList<IncludedStructuralElement> includedStructuralElementList = determineIncludedStructuralElementPathToChildRecursive( includedStructuralElementChild, number); if (Objects.nonNull(includedStructuralElementList)) { includedStructuralElementList.addFirst(includedStructuralElementChild); return includedStructuralElementList; } } <START> return null; <END> }</code><technical_language>Empty collection returned instead of null</technical_language>

Target:
private static List<IncludedStructuralElement> determineIncludedStructuralElementPathToChildRecursive( IncludedStructuralElement includedStructuralElement, int number) { if (Objects.nonNull(includedStructuralElement.getLink())) { try { if (ServiceManager.getProcessService() .processIdFromUri(includedStructuralElement.getLink().getUri()) == number) { LinkedList<IncludedStructuralElement> linkedIncludedStructuralElements = new LinkedList<>(); linkedIncludedStructuralElements.add(includedStructuralElement); return linkedIncludedStructuralElements; } } catch (IllegalArgumentException | ClassCastException | SecurityException e) { logger.catching(Level.TRACE, e); } } for (IncludedStructuralElement includedStructuralElementChild : includedStructuralElement.getChildren()) { List<IncludedStructuralElement> includedStructuralElementList = determineIncludedStructuralElementPathToChildRecursive( includedStructuralElementChild, number); if (!includedStructuralElementList.isEmpty()) { includedStructuralElementList.add(0, includedStructuralElement); return includedStructuralElementList; } } return Collections.emptyList(); }
Source:
<code><START> public Optional<ResistanceCalculator> getResistanceCalculator() { <END> return Optional.of(((ExplosionBridge) this).bridge$getResistanceCalculator()); }</code><technical_language>is a ResistanceCalculator, this optional</technical_language>

Target:
public Optional<ResistanceCalculator> getResistanceCalculator() { return Optional.ofNullable(((ExplosionBridge) this).bridge$getResistanceCalculator()); }
Source:
<code>public RtuDevice(final String deviceIdentification) { super(deviceIdentification); <START> this.lastCommunicationTime = new GregorianCalendar(2001, 0, 1).getTime(); <END> }</code><technical_language>this override database value? if is another date? Remove this defaults database used</technical_language>

Target:
public RtuDevice(final String deviceIdentification) { super(deviceIdentification); }
Source:
<code>private void postProcessClean() throws IOException { unregisterOp(OP_WRITE); for (; ; ) { State state = scheduled.get(); if (state == State.RESCHEDULE) { if (!scheduled.compareAndSet(State.RESCHEDULE, State.SCHEDULED)) { continue; } owner().addTaskAndWakeup(this); return; } <START> <END> if (!scheduled.compareAndSet(state, State.UNSCHEDULED)) { continue; } if (writeQueue.isEmpty() && priorityWriteQueue.isEmpty()) { return; } if (scheduled.compareAndSet(State.UNSCHEDULED, State.SCHEDULED)) { if (Thread.currentThread().getClass() == NioThread.class) { owner().addTask(this); } else { owner().addTaskAndWakeup(this); } } return; } }</code><technical_language>A couple of questions this method: - I guess called concurrently (otherwise need for this CAS loop. Is this right? - reason check for state == State.BLOCKED do scheduled.compareAndSet(state, State.BLOCKED)? - If called concurrently, happen that: ThreadA detects priorityWriteQueue is empty changes state SCHEDULED ThreadB enters CAS loop changes state BLOCKED ThreadA calls owner().addTaskAndWakeup(this); In this case, I guess ThreadB eventually call owner().addTaskAndWakeup(this); again. call addTaskAndWakeup a BLOCKED pipeline. I guess this is a problem. confirm</technical_language>

Target:
private void postProcessClean() throws IOException { unregisterOp(OP_WRITE); for (; ; ) { State state = scheduled.get(); if (state == State.RESCHEDULE) { scheduled.set(State.SCHEDULED); owner().addTaskAndWakeup(this); return; } if (!scheduled.compareAndSet(state, State.UNSCHEDULED)) { continue; } if (writeQueue.isEmpty() && priorityWriteQueue.isEmpty()) { return; } if (scheduled.compareAndSet(State.UNSCHEDULED, State.SCHEDULED)) { if (Thread.currentThread().getClass() == NioThread.class) { owner().addTask(this); } else { owner().addTaskAndWakeup(this); } } return; } }
Source:
<code>public JsonPattern(JsonPattern other) { <START> pattern = new ArrayList<Integer>(other.pattern); <END> }</code><technical_language>this(new ArrayList<Integer>(other.pattern));</technical_language>

Target:
public JsonPattern(JsonPattern other) { this(new ArrayList<Integer>(other.pattern)); }
Source:
<code>public void testConnectionException() throws Exception { ImapMailReceiver mailReceiver = new ImapMailReceiver("imap:foo"); ImapIdleChannelAdapter adapter = new ImapIdleChannelAdapter(mailReceiver); <START> final List<ImapIdleExceptionEvent> events = new ArrayList<ImapIdleExceptionEvent>(); <END> final CountDownLatch latch = new CountDownLatch(1); adapter.setApplicationEventPublisher(new ApplicationEventPublisher() { @Override public void publishEvent(ApplicationEvent event) { events.add((ImapIdleExceptionEvent) event); latch.countDown(); } }); ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler(); taskScheduler.initialize(); adapter.setTaskScheduler(taskScheduler); adapter.start(); assertTrue(latch.await(10, TimeUnit.SECONDS)); assertEquals(1, events.size()); assertEquals("ImapIdleExceptionEvent [exception=Failure in 'idle' task. Will resubmit.]", events.get(0).toString()); }</code><technical_language>sense? enough AtomicReference</technical_language>

Target:
public void testConnectionException() throws Exception { ImapMailReceiver mailReceiver = new ImapMailReceiver("imap:foo"); ImapIdleChannelAdapter adapter = new ImapIdleChannelAdapter(mailReceiver); final AtomicReference<ImapIdleExceptionEvent> theEvent = new AtomicReference<ImapIdleExceptionEvent>(); final CountDownLatch latch = new CountDownLatch(1); adapter.setApplicationEventPublisher(new ApplicationEventPublisher() { @Override public void publishEvent(ApplicationEvent event) { assertNull("only one event expected", theEvent.get()); theEvent.set((ImapIdleExceptionEvent) event); latch.countDown(); } }); ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler(); taskScheduler.initialize(); adapter.setTaskScheduler(taskScheduler); adapter.start(); assertTrue(latch.await(10, TimeUnit.SECONDS)); assertTrue(theEvent.get().toString().endsWith("cause=java.lang.IllegalStateException: Failure in 'idle' task. Will resubmit.]")); }
Source:
<code>private static File getAndroidStudioLocalMavenRepoPath() { <START> return null; <END> }</code><technical_language>I thought place in SDK folder? $SDKS/gradle/m2repository ? If find installer's help, right</technical_language>

Target:
private static File getAndroidStudioLocalMavenRepoPath() { File androidHomePath = DefaultSdks.getDefaultAndroidHome(); if (androidHomePath != null) { File repoPath = new File(androidHomePath, FileUtil.join("gradle", "m2repository")); if (repoPath.isDirectory()) { return repoPath; } } return null; }
Source:
<code>public Thread newThread(Runnable r) { <START> Thread t = new Thread(this.group, r, "cucumber-runner-thread-" + this.threadNumber.getAndIncrement(), 0L); <END> if (t.isDaemon()) { t.setDaemon(false); } if (t.getPriority() != 5) { t.setPriority(5); } return t; }</code><technical_language>Thread(String name) constructor safest, confusing option here</technical_language>

Target:
public Thread newThread(Runnable r) { return new Thread(r, namePrefix + this.threadNumber.getAndIncrement()); }
Source:
<code>default float getHeightFactor(ITimeEvent event) { StateItem stateItem = null; if (event instanceof TimeEvent) { int status = ((TimeEvent) event).getValue(); <START> StateItem[] stateTable = getStateTable(); <END> if (status >= 0 && status < stateTable.length) { stateItem = stateTable[status]; } } return stateItem != null ? stateItem.getHeightFactor() : 1.0f; }</code><technical_language>1- I getStateTable() need cached called twice, called for event... 2- status is index in state Table. heights OK. bad need do this, I rest of patch is cleaner now, sense put height factor in style, if means this here... while style in getStateTableIndex(), redundant. time graph control save styles (pairs of RGB heights) instead of array of rgbs</technical_language>

Target:
default float getHeightFactor(ITimeEvent event) { StateItem stateItem = null; if (event instanceof TimeEvent) { int index = getStateTableIndex(event); StateItem[] stateTable = getStateTable(); if (index >= 0 && index < stateTable.length) { stateItem = stateTable[index]; } } return stateItem != null ? (float) stateItem.getStyleMap().getOrDefault(ITimeEventStyle.HEIGHT_FACTOR(), 1.0f) : 1.0f; }
Source:
<code>public void visit(NodeList n, Void arg) { if (configuration.isOrderImports() && n.size() > 0 && n.get(0) instanceof ImportDeclaration) { NodeList<ImportDeclaration> modifiableList = new NodeList<>(n); modifiableList.sort( <START> comparingInt((ImportDeclaration left) -> left.isStatic() ? 0 : 1) <END> .thenComparing(NodeWithName::getNameAsString)); for (Object node : modifiableList) { ((Node) node).accept(this, arg); } } else { for (Object node : n) { ((Node) node).accept(this, arg); } } }</code><technical_language>called left anymore</technical_language>

Target:
public void visit(NodeList n, Void arg) { if (configuration.isOrderImports() && n.size() > 0 && n.get(0) instanceof ImportDeclaration) { NodeList<ImportDeclaration> modifiableList = new NodeList<>(n); modifiableList.sort( comparingInt((ImportDeclaration i) -> i.isStatic() ? 0 : 1) .thenComparing(NodeWithName::getNameAsString)); for (Object node : modifiableList) { ((Node) node).accept(this, arg); } } else { for (Object node : n) { ((Node) node).accept(this, arg); } } }
Source:
<code>IExtension getExtension() { <START> return !element.isValid() ? null : element.getDeclaringExtension(); <END> }</code><technical_language>I avoid negation here. I understand cond?null:something is a pattern avoid negation in "x != null ? ..."</technical_language>

Target:
IExtension getExtension() { return declaringExtension; }
Source:
<code>public boolean updateRigidBody(EntityRef entity) { LocationComponent location = entity.getComponent(LocationComponent.class); BulletRigidBody rigidBody = entityRigidBodies.get(entity); if (location == null) { logger.warn("Updating rigid body of entity that has no " + "LocationComponent?! Nothing is done, except log this" + " warning instead."); return false; } else if (rigidBody != null) { float scale = location.getWorldScale(); if (Math.abs(rigidBody.rb.getCollisionShape().getLocalScaling(new Vector3f()).x - scale) > BulletGlobals.SIMD_EPSILON) { removeRigidBody(rigidBody); newRigidBody(entity); } updateKinematicSettings(entity.getComponent(RigidBodyComponent.class), rigidBody); return true; } else { <START> logger.warn("Updating a non-existing rigid body. Creating a new one " <END> + "instead, also logging this warning since it should not " + "happen. Entity: " + entity); newRigidBody(entity); return false; } }</code><technical_language>concat strings in log statements, param support logger.info ("I a eat.", object);</technical_language>

Target:
public boolean updateRigidBody(EntityRef entity) { LocationComponent location = entity.getComponent(LocationComponent.class); BulletRigidBody rigidBody = entityRigidBodies.get(entity); if (location == null) { logger.warn("Updating rigid body of entity that has no " + "LocationComponent?! Nothing is done, except log this" + " warning instead. Entity: {}", entity); return false; } else if (rigidBody != null) { float scale = location.getWorldScale(); if (Math.abs(rigidBody.rb.getCollisionShape().getLocalScaling(new Vector3f()).x - scale) > BulletGlobals.SIMD_EPSILON) { removeRigidBody(rigidBody); newRigidBody(entity); } updateKinematicSettings(entity.getComponent(RigidBodyComponent.class), rigidBody); return true; } else { newRigidBody(entity); return false; } }
Source:
<code>private static boolean isAssignmentEqualsSized(@NotNull GoAssignmentStatement assignment) { List<GoExpression> expressions = assignment.getExpressionList(); return assignment.getLeftHandExprList().getExpressionList().size() == expressions.size() && <START> expressions.stream().allMatch(e -> GoInspectionUtil.getExpressionResultCount(e) == 1); <END> }</code><technical_language>I give user ability intention if GoInspectionUtil.getExpressionResultCount(e) != 1 does't broke code move error another place @zolotov do think</technical_language>

Target:
private static boolean isAssignmentEqualsSized(@NotNull GoAssignmentStatement assignment) { return getLeftHandElements(assignment).size() == assignment.getExpressionList().size(); }
Source:
<code>public void leaveCritical() { final long now = System.nanoTime(); <START> assert TIME_ENTER_UPDATER.get(this) <= now : "Must call enterCritical first"; <END> TIME_LEFT_UPDATER.lazySet(this, now); }</code><technical_language>adding a risky semantic check for reason.. do previous version please</technical_language>

Target:
public void leaveCritical() { TIME_LEFT_UPDATER.lazySet(this, System.nanoTime()); }
Source:
<code>private static boolean isValidSnappyStream(File f) throws IOException { FileInputStream fis = null; byte[] byteArray = new byte[SnappyCodec.MAGIC_LEN]; try { fis = new FileInputStream(f); <START> fis.read(byteArray, 0, SnappyCodec.MAGIC_LEN); <END> ByteBuffer bb = ByteBuffer.wrap(byteArray); byte[] magicHeader = new byte[SnappyCodec.MAGIC_LEN]; bb.get(magicHeader, 0, SnappyCodec.MAGIC_LEN); return Arrays.equals(magicHeader, SnappyCodec.getMagicHeader()); } catch (FileNotFoundException e) { LOG.error("Unable to open file " + f.getName() + " : ", e); return false; } finally { if (fis != null) { fis.close(); } } }</code><technical_language>Again, findBugs it. above</technical_language>

Target:
private static boolean isValidSnappyStream(File f) throws IOException { byte[] byteArray = new byte[SnappyCodec.MAGIC_LEN]; try (FileInputStream fis = new FileInputStream(f)) { if (SnappyCodec.MAGIC_LEN != fis.read(byteArray, 0, SnappyCodec.MAGIC_LEN)) { LOG.error("Read incorrect number of bytes from " + f.getName()); return false; } ByteBuffer bb = ByteBuffer.wrap(byteArray); byte[] magicHeader = new byte[SnappyCodec.MAGIC_LEN]; bb.get(magicHeader, 0, SnappyCodec.MAGIC_LEN); return Arrays.equals(magicHeader, SnappyCodec.getMagicHeader()); } catch (FileNotFoundException e) { LOG.error("Unable to open file " + f.getName() + " : ", e); return false; } }
Source:
<code>public static Policy policy(SqlKind kind) { <START> return getPolicy(kind); <END> }</code><technical_language>Is strong reason deprecate this interface ? If add interface SqlFunction#getStrongPolicy, exception is SqlKind.OTHER_FUNCTION, encounter that, a SqlFunction instance passed in. For other SqlKind policy mapping, is great if mapping configurable pluggable, do SqlTypeMappingRule</technical_language>

Target:
public static Policy policy(SqlKind kind) { return MAP.getOrDefault(kind, Policy.AS_IS); }
Source:
<code>public void executeCommand() { cmd = spy(createTestCommand(volumeWithRebalanceTask)); prepareMocks(cmd); mockBackend(true, null); assertTrue(cmd.canDoAction()); cmd.executeCommand(); verify(cmd).endStepJob(); <START> verify(cmd).clearVolumeTaskAndReleaseLock(); <END> }</code><technical_language>Please verify succeeded message</technical_language>

Target:
public void executeCommand() { cmd = spy(createTestCommand(volumeWithRebalanceTask)); prepareMocks(cmd); mockBackend(true, null); assertTrue(cmd.canDoAction()); cmd.executeCommand(); verify(cmd).endStepJob(); verify(cmd).clearVolumeTaskAndReleaseLock(); assertEquals(cmd.getAuditLogTypeValue(), AuditLogType.GLUSTER_VOLUME_REBALANCE_STOP); }
Source:
<code>public void sendBroadCast() throws Exception { byte[] data = discoveryRequest.getBytes(StandardCharsets.UTF_8); DatagramPacket packet = new DatagramPacket(data, data.length, InetAddress.getByName("255.255.255.255"), 8002); getSendSocket().send(packet); logger.info("Discovery package sent!" + packet.getAddress() + ":" + packet.getPort()); byte[] response = new byte[discoveryResponse.length()]; DatagramPacket responsePacket = new DatagramPacket(response, response.length); <START> getSendSocket().receive(responsePacket); <END> logger.info("Discovery response received!" + responsePacket.getAddress() + ":" + responsePacket.getPort()); String responseData = new String(responsePacket.getData()).trim(); if (responseData.equals(discoveryResponse)) { logger.info("Found server!" + responsePacket.getAddress() + ":" + responsePacket.getPort()); } }</code><technical_language>one-time. handle response. detect server</technical_language>

Target:
public void sendBroadCast() throws Exception { byte[] data = discoveryRequest.getBytes(StandardCharsets.UTF_8); DatagramPacket packet = new DatagramPacket(data, data.length, InetAddress.getByName("255.255.255.255"), 8002); getSendSocket().send(packet); logger.info("Discovery package sent!" + packet.getAddress() + ":" + packet.getPort()); byte[] response = new byte[discoveryResponse.length()]; DatagramPacket responsePacket = new DatagramPacket(response, response.length); getSendSocket().receive(responsePacket); logger.info("Discovery response received!" + responsePacket.getAddress() + ":" + responsePacket.getPort()); String responseData = new String(responsePacket.getData(), StandardCharsets.UTF_8); if (responseData.equals(discoveryResponse)) { logger.info("Found server!" + responsePacket.getAddress() + ":" + responsePacket.getPort()); } }
Source:
<code>public void shouldDecorateFutureAndReturnSuccess() throws Exception { CircuitBreaker circuitBreaker = CircuitBreaker.ofDefaults("testName"); <START> final Future<String> future = executor.submit(() -> "Hello World"); <END> CircuitBreakerFuture<String> decoratedFuture = new CircuitBreakerFuture<>(circuitBreaker, future); String value = decoratedFuture.get(); assertThat(value).isEqualTo("Hello World"); assertThat(circuitBreaker.getMetrics().getNumberOfBufferedCalls()).isEqualTo(1); assertThat(circuitBreaker.getMetrics().getNumberOfFailedCalls()).isEqualTo(0); assertThat(circuitBreaker.getMetrics().getNumberOfSuccessfulCalls()).isEqualTo(1); assertThat(circuitBreaker.getMetrics().getNumberOfNotPermittedCalls()).isEqualTo(0); assertThat(circuitBreaker.getState()).isEqualTo(CircuitBreaker.State.CLOSED); }</code><technical_language>please mock Future</technical_language>

Target:
public void shouldDecorateFutureAndReturnSuccess() throws Exception { CircuitBreaker circuitBreaker = CircuitBreaker.ofDefaults("testName"); final Future<String> future = mock(Future.class); when(future.get()).thenReturn("Hello World"); CircuitBreakerFuture<String> decoratedFuture = new CircuitBreakerFuture<>(circuitBreaker, future); String value = decoratedFuture.get(); assertThat(value).isEqualTo("Hello World"); assertThat(circuitBreaker.getMetrics().getNumberOfBufferedCalls()).isEqualTo(1); assertThat(circuitBreaker.getMetrics().getNumberOfFailedCalls()).isEqualTo(0); assertThat(circuitBreaker.getMetrics().getNumberOfSuccessfulCalls()).isEqualTo(1); assertThat(circuitBreaker.getMetrics().getNumberOfNotPermittedCalls()).isEqualTo(0); assertThat(circuitBreaker.getState()).isEqualTo(CircuitBreaker.State.CLOSED); then(future).should().get(); }
Source:
<code>public void testAcceptWhenIsNotExpectedClass() { when(rule.getId()).thenReturn("SomeOtherClass"); <START> boolean actual = check.accepts(rule, context); <END> assertFalse(actual); }</code><technical_language>for consistency, please final boolean actual</technical_language>

Target:
public void testAcceptWhenIsNotExpectedClass() { when(rule.getId()).thenReturn("SomeOtherClass"); final boolean actual = check.accepts(rule, context); assertFalse(actual); }
Source:
<code>@Override public void lockInterruptibly() throws IgniteException { ctx.kernalContext().gateway().readLock(); try { <START> try { <END> sync.acquireInterruptibly(); } catch (InterruptedException e) { throw new IgniteInterruptedException(e); } } finally { ctx.kernalContext().gateway().readUnlock(); } }</code><technical_language>"we put try try try catch everything"</technical_language>

Target:
@Override public void lockInterruptibly() throws IgniteException { ctx.kernalContext().gateway().readLock(); try { sync.acquireInterruptibly(); } catch (InterruptedException e) { throw new IgniteInterruptedException(e); } finally { ctx.kernalContext().gateway().readUnlock(); } }
Source:
<code>private ConfigurationImpl() { this.validationBootstrapParameters = new ValidationBootstrapParameters(); TypeResolutionHelper typeResolutionHelper = new TypeResolutionHelper(); <START> ClassLoader classLoader = getClass().getClassLoader(); <END> if ( isJavaFxInClasspath( classLoader ) ) { JavaFXPropertyValueUnwrapper jfxUnwrapper = createJavaFXUnwrapperClass( typeResolutionHelper, classLoader ); validatedValueHandlers.add( jfxUnwrapper ); } if ( Version.getJavaRelease() >= 8 ) { validatedValueHandlers.add( new OptionalValueUnwrapper( typeResolutionHelper ) ); } this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES ); this.defaultTraversableResolver = new DefaultTraversableResolver(); this.defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl(); this.defaultParameterNameProvider = new DefaultParameterNameProvider(); this.defaultMessageInterpolator = new ResourceBundleMessageInterpolator( defaultResourceBundleLocator ); this.defaultConstraintDefinitionContributor = new ServiceLoaderBasedConstraintDefinitionContributor( typeResolutionHelper ); this.addConstraintDefinitionContributor( defaultConstraintDefinitionContributor ); }</code><technical_language>I intention change isJavaFxInClasspath in classpath. In world e is. Then, if returns true, LoadClass privileged action (which is hood for isJavaFxInClasspath) load JavaFXPropertyValueUnwrapper</technical_language>

Target:
private ConfigurationImpl() { this.validationBootstrapParameters = new ValidationBootstrapParameters(); TypeResolutionHelper typeResolutionHelper = new TypeResolutionHelper(); if ( isJavaFxInClasspath() ) { validatedValueHandlers.add( createJavaFXUnwrapperClass( typeResolutionHelper ) ); } if ( Version.getJavaRelease() >= 8 ) { validatedValueHandlers.add( new OptionalValueUnwrapper( typeResolutionHelper ) ); } this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( ResourceBundleMessageInterpolator.USER_VALIDATION_MESSAGES ); this.defaultTraversableResolver = new DefaultTraversableResolver(); this.defaultConstraintValidatorFactory = new ConstraintValidatorFactoryImpl(); this.defaultParameterNameProvider = new DefaultParameterNameProvider(); this.defaultMessageInterpolator = new ResourceBundleMessageInterpolator( defaultResourceBundleLocator ); this.defaultConstraintDefinitionContributor = new ServiceLoaderBasedConstraintDefinitionContributor( typeResolutionHelper ); this.addConstraintDefinitionContributor( defaultConstraintDefinitionContributor ); }
Source:
<code>public void shouldNotBlockInCloseForZeroDuration() throws InterruptedException { try (final KafkaStreams streams = new KafkaStreams(new StreamsBuilder().build(), props, supplier, time)) { final Thread th = new Thread(() -> streams.close(Duration.ofMillis(0L))); th.start(); <START> th.join(30_000L); <END> assertFalse(th.isAlive()); } }</code><technical_language>I follow logic of this test... want show block, assert call longer 30 seconds. this test is sensitive timing, is ideal. I guess wanted test is close method calls Thread.sleep()/Thread.join() calls a specific list of blocking methods clients. mocks above, this assertion directly</technical_language>

Target:
public void shouldNotBlockInCloseForZeroDuration() { try (final KafkaStreams streams = new KafkaStreams(new StreamsBuilder().build(), props, supplier, time)) { assertFalse(streams.close(Duration.ZERO)); } }
Source:
<code>public MapCanvas build() { if (this.canvas == null) { return SpongeEmptyCanvas.INSTANCE; } <START> return this.canvas; <END> }</code><technical_language>This is problematic. Imagine I create a canvas this builder, build it. return backing canvas here. I change this builder - change built canvas. **The builder provided object relationship object is built**. canvas currently paint methods, this builder, a deep copy of final data canvas. provided canvas immutable. Please separate canvas builder, creating immutable cavas build</technical_language>

Target:
public MapCanvas build() { if (this.canvas == null) { return SpongeEmptyCanvas.INSTANCE; } return new SpongeMapByteCanvas(canvas.clone()); }
Source:
<code>private boolean isRequiredToUploadAtTime(TopicPartition topicPartition) throws Exception{ final String topic = topicPartition.getTopic(); <START> final String topicFilter = mConfig.getKafkaTopicUploadAtMinuteMarkFilter(); <END> if (topicFilter == null || topicFilter.isEmpty()){ return false; } if (topic.matches(topicFilter)){ if (DateTime.now().minuteOfHour().get() == mConfig.getUploadMinuteMark()){ return true; } } return false; }</code><technical_language>topicFilter initialization done in constructor of class</technical_language>

Target:
private boolean isRequiredToUploadAtTime(TopicPartition topicPartition) throws Exception{ final String topic = topicPartition.getTopic(); if (mTopicFilter == null || mTopicFilter.isEmpty()){ return false; } if (topic.matches(mTopicFilter)){ if (DateTime.now().minuteOfHour().get() == mConfig.getUploadMinuteMark()){ return true; } } return false; }
Source:
<code>public DfsPackDescription(DfsRepositoryDescription repoDesc, String name) { this.repoDesc = repoDesc; int dot = name.lastIndexOf('.'); this.packName = (dot < 0) ? name : name.substring(0, dot); <START> this.sizeMap = new HashMap<String, Long>(); <END> }</code><technical_language>Set table size 5. expect ~4 entries. 5 is a good default size</technical_language>

Target:
public DfsPackDescription(DfsRepositoryDescription repoDesc, String name) { this.repoDesc = repoDesc; int dot = name.lastIndexOf('.'); this.packName = (dot < 0) ? name : name.substring(0, dot); this.sizeMap = new HashMap<String, Long>(5); }
Source:
<code>private void handleCommand(ChannelHandlerContext ctx, String payload, int requestId) throws IOException { if (this.loggedIn) { try { EventFactory.callEvent(new RemoteServerCommandEvent(commandSender, payload)); <START> ; rconServer.getServer().dispatchCommand(commandSender, payload); <END> sendMultiPacketResponse(ctx, requestId, ChatColor.stripColor(commandSender.getLog())); commandSender.clearLog(); } catch (CommandException e) { sendMultiPacketResponse(ctx, requestId, String.format("Error executing: %s (%s)", payload, e.getMessage())); } } else { ByteBuf buf = ctx.alloc().buffer(); createResponse(buf, -1, 2, ""); ctx.write(buf); } }</code><technical_language>erm. padding ; we</technical_language>

Target:
private void handleCommand(ChannelHandlerContext ctx, String payload, int requestId) throws IOException { if (this.loggedIn) { try { EventFactory.callEvent(new RemoteServerCommandEvent(commandSender, payload)); rconServer.getServer().dispatchCommand(commandSender, payload); String message = commandSender.getLog(); if (!rconServer.getServer().useRConColors()) { message = ChatColor.stripColor(message); } sendMultiPacketResponse(ctx, requestId, message); commandSender.clearLog(); } catch (CommandException e) { sendMultiPacketResponse(ctx, requestId, String.format("Error executing: %s (%s)", payload, e.getMessage())); } } else { ByteBuf buf = ctx.alloc().buffer(); createResponse(buf, -1, 2, ""); ctx.write(buf); } }
Source:
<code>public ImmutableMap<String, ProcedureRunner> getPreparedUserProcedures(SiteProcedureConnection site) { long hsId = site.getCorrespondingSiteId(); ImmutableMap<String, ProcedureRunner> userProcs = m_catalogInfo.m_userProcsMap.get(hsId); if (userProcs == null) { hostLog.warn("look for MPI site: " + hsId + " in Map: " + m_catalogInfo.m_userProcsMap.keySet()); long siteId = CoreUtils.getSiteIdFromHSId(hsId); userProcs = m_catalogInfo.m_userProcsMap.get(siteId); if (userProcs == null) { hostLog.error("look for site id : " + siteId + " in Map: " + m_catalogInfo.m_userProcsMap.keySet()); } } <START> for (ProcedureRunner runner: userProcs.values()) { <END> runner.initSiteAndStats(site); } return userProcs; }</code><technical_language>null handled</technical_language>

Target:
public ImmutableMap<String, ProcedureRunner> getPreparedUserProcedures(SiteProcedureConnection site) { long hsId = site.getCorrespondingSiteId(); ImmutableMap<String, ProcedureRunner> userProcs = m_catalogInfo.m_userProcsMap.get(hsId); if (userProcs == null) { hostLog.debug("look for MPI site: " + hsId + " in Map: " + m_catalogInfo.m_userProcsMap.keySet()); long siteId = CoreUtils.getSiteIdFromHSId(hsId); userProcs = m_catalogInfo.m_userProcsMap.get(siteId); if (userProcs == null) { throw new RuntimeException("look for site id : " + siteId + " in Map: " + m_catalogInfo.m_userProcsMap.keySet()); } } for (ProcedureRunner runner: userProcs.values()) { runner.initSiteAndStats(site); } return userProcs; }
Source:
<code><START> public RecoveryDecorator get(Class<?> returnType) { <END> return recoveryDecorator.stream().filter(it -> it.supports(returnType)) .findFirst() .orElse(defaultRecoveryDecorator); }</code><technical_language>this private i guess</technical_language>

Target:
private RecoveryDecorator get(Class<?> returnType) { return recoveryDecorator.stream().filter(it -> it.supports(returnType)) .findFirst() .orElse(defaultRecoveryDecorator); }
Source:
<code>private static boolean sameVisibilityNotPrivate(Symbol s1, Symbol s2) { <START> return !s1.isPrivate() && ((JavaSymbol) s1).flags() == ((JavaSymbol) s2).flags(); <END> }</code><technical_language>This is a buggy flags include final modifier for instance. Please fix it</technical_language>

Target:
private static boolean sameVisibilityNotPrivate(Symbol s1, Symbol s2) { return bothPublic(s1, s2) || bothProtected(s1, s2) || bothPackageVisibility(s1, s2); }