before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public static Type getMethodType(final String methodDescriptor) { int len; switch(methodDescriptor.toCharArray()[0]) { case 'V': return VOID_TYPE; case 'Z': return BOOLEAN_TYPE; case 'C': return CHAR_TYPE; case 'B': return BYTE_TYPE; case 'S': return SHORT_TYPE; case 'I': return INT_TYPE; case 'F': return FLOAT_TYPE; c...
public static Type getMethodType(final String methodDescriptor) { <DeepExtract> int len; switch(methodDescriptor.toCharArray()[0]) { case 'V': return VOID_TYPE; case 'Z': return BOOLEAN_TYPE; case 'C': return CHAR_TYPE; case 'B': return BYTE_TYPE; case 'S': return SHORT_TYPE; case 'I': return INT_TYPE; case 'F': return...
bsl
positive
4,481
protected void processBackViewRelease(float xvel, float yvel) { switch(mShowEdge) { case Left: if (xvel == 0) { if (getBackView().getLeft() > (0 - mDragDistance * 0.5f)) { open(); return; } } else if (xvel > 0) { open(); return; } break; case Right: if (xvel == 0) { if (getBackView().getLeft() < (getMeasuredWidth() - m...
protected void processBackViewRelease(float xvel, float yvel) { switch(mShowEdge) { case Left: if (xvel == 0) { if (getBackView().getLeft() > (0 - mDragDistance * 0.5f)) { open(); return; } } else if (xvel > 0) { open(); return; } break; case Right: if (xvel == 0) { if (getBackView().getLeft() < (getMeasuredWidth() - m...
Teameeting-Android
positive
4,482
public void draw(Graphics g) { if (firstDraw) { getCurrentContext().initGraphics(g); firstDraw = false; } if (getCurrentContext().isClearBeforeDraw()) { g.setColor(getCurrentContext().getBackgroundColor()); g.fillRect(0, 0, getCurrentContext().getW(), getCurrentContext().getH()); } g.setFps(fps); getCurrentContext().dr...
public void draw(Graphics g) { if (firstDraw) { getCurrentContext().initGraphics(g); firstDraw = false; } if (getCurrentContext().isClearBeforeDraw()) { g.setColor(getCurrentContext().getBackgroundColor()); g.fillRect(0, 0, getCurrentContext().getW(), getCurrentContext().getH()); } g.setFps(fps); getCurrentContext().dr...
etyl
positive
4,483
@Override protected void notBusy() throws Exception { if ((onIdle != null) && inbox.isIdle()) { flush(true); onIdle.run(); } boolean result = false; final Iterator<Map.Entry<ReactorMtImpl, ArrayDeque<RequestMtImpl<?>>>> iter = outbox.getIterator(); if (iter != null) { while (iter.hasNext()) { result = true; final Map.E...
@Override protected void notBusy() throws Exception { if ((onIdle != null) && inbox.isIdle()) { flush(true); onIdle.run(); } <DeepExtract> boolean result = false; final Iterator<Map.Entry<ReactorMtImpl, ArrayDeque<RequestMtImpl<?>>>> iter = outbox.getIterator(); if (iter != null) { while (iter.hasNext()) { result = tru...
JActor2
positive
4,484
private void onLoadFail(@FwUpgradeCallback.UpgradeErrorType int errorCode) { if (mCallback != null) mCallback.onLoadFwError(FwUpgradeConsoleNucleo2.this, mFile, errorCode); synchronized (this) { mConsole.removeDebugOutputListener(mCurrentListener); mConsole.addDebugOutputListener(null); mCurrentListener = null; } }
private void onLoadFail(@FwUpgradeCallback.UpgradeErrorType int errorCode) { if (mCallback != null) mCallback.onLoadFwError(FwUpgradeConsoleNucleo2.this, mFile, errorCode); <DeepExtract> synchronized (this) { mConsole.removeDebugOutputListener(mCurrentListener); mConsole.addDebugOutputListener(null); mCurrentListener =...
BlueSTSDK_GUI_Android
positive
4,485
@Override public void executeOperation(LdbcUpdate6AddPost operation, DbConnectionState dbConnectionState, ResultReporter resultReporter) throws DbException { try { List<ObjectOutputStream> oStreams = (TorcDb2ClientConnectionState) dbConnectionState.getObjectOutputStreams(); List<ObjectInputStream> iStreams = (TorcDb2Cl...
@Override public void executeOperation(LdbcUpdate6AddPost operation, DbConnectionState dbConnectionState, ResultReporter resultReporter) throws DbException { <DeepExtract> try { List<ObjectOutputStream> oStreams = (TorcDb2ClientConnectionState) dbConnectionState.getObjectOutputStreams(); List<ObjectInputStream> iStream...
ldbc-snb-impls
positive
4,486
private void initWithContext(Context context) { mScroller = new Scroller(context, new DecelerateInterpolator()); mScrollListener = this; mHeaderView = new XListViewHeader(context); mHeaderViewContent = (RelativeLayout) mHeaderView.findViewById(R.id.xlistview_header_content); mHeaderTimeView = (TextView) mHeaderView.fin...
private void initWithContext(Context context) { mScroller = new Scroller(context, new DecelerateInterpolator()); <DeepExtract> mScrollListener = this; </DeepExtract> mHeaderView = new XListViewHeader(context); mHeaderViewContent = (RelativeLayout) mHeaderView.findViewById(R.id.xlistview_header_content); mHeaderTimeView...
LDXY
positive
4,487
private void updateSelectedResourceId(@NonNull String resourceId) { if (resourceId.isEmpty()) { mSelectedResource = null; mOriginalStringTextView.setText(""); mTranslatedStringEditText.setText(""); } else { mSelectedResource = mDefaultResources.getTag(resourceId); mOriginalStringTextView.setText(mSelectedResource.getCo...
private void updateSelectedResourceId(@NonNull String resourceId) { if (resourceId.isEmpty()) { mSelectedResource = null; mOriginalStringTextView.setText(""); mTranslatedStringEditText.setText(""); } else { mSelectedResource = mDefaultResources.getTag(resourceId); mOriginalStringTextView.setText(mSelectedResource.getCo...
Stringlate
positive
4,488
public Criteria andCreatorNotIn(List<String> values) { if (values == null) { throw new RuntimeException("Value for " + "creator" + " cannot be null"); } criteria.add(new Criterion("creator not in", values)); return (Criteria) this; }
public Criteria andCreatorNotIn(List<String> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "creator" + " cannot be null"); } criteria.add(new Criterion("creator not in", values)); </DeepExtract> return (Criteria) this; }
dtsopensource
positive
4,489
@Override public void sendError(int sc) throws IOException { if (sc == SC_UNAUTHORIZED) { StringBuilder v = new StringBuilder(); v.append("Digest"); v.append(" realm=\"" + REALM_NAME + "\""); v.append(", domain=\"" + getDomain() + "\""); v.append(", qop=\"auth\""); if (stale != null) { v.append(", stale=" + stale); } v...
@Override public void sendError(int sc) throws IOException { <DeepExtract> if (sc == SC_UNAUTHORIZED) { StringBuilder v = new StringBuilder(); v.append("Digest"); v.append(" realm=\"" + REALM_NAME + "\""); v.append(", domain=\"" + getDomain() + "\""); v.append(", qop=\"auth\""); if (stale != null) { v.append(", stale="...
mini-git-server
positive
4,490
private final void jjCheckNAddStates(int start) { if (jjrounds[jjnextStates[start]] != jjround) { jjstateSet[jjnewStateCnt++] = jjnextStates[start]; jjrounds[jjnextStates[start]] = jjround; } if (jjrounds[jjnextStates[start + 1]] != jjround) { jjstateSet[jjnewStateCnt++] = jjnextStates[start + 1]; jjrounds[jjnextStates...
private final void jjCheckNAddStates(int start) { if (jjrounds[jjnextStates[start]] != jjround) { jjstateSet[jjnewStateCnt++] = jjnextStates[start]; jjrounds[jjnextStates[start]] = jjround; } <DeepExtract> if (jjrounds[jjnextStates[start + 1]] != jjround) { jjstateSet[jjnewStateCnt++] = jjnextStates[start + 1]; jjround...
dragmath
positive
4,491
public List<WebElement> getOptions() { driver = WebUIDriver.getWebDriver(); element = driver.findElement(this.getBy()); try { select = getNewSelectElement(element); options = select.getOptions(); } catch (UnexpectedTagNameException e) { if (element.getTagName().equalsIgnoreCase("ul")) { options = element.findElements(B...
public List<WebElement> getOptions() { <DeepExtract> driver = WebUIDriver.getWebDriver(); element = driver.findElement(this.getBy()); try { select = getNewSelectElement(element); options = select.getOptions(); } catch (UnexpectedTagNameException e) { if (element.getTagName().equalsIgnoreCase("ul")) { options = element....
seleniumtestsframework
positive
4,492
public void semant(SymbolTable objectTable, SymbolTable methodTable, ClassTable classTable, class_c c) { if (ClassTable.DEBUG) { System.out.println("---Integer: " + token.getString() + ", " + getLineNumber()); } type = TreeConstants.Int; return this; }
public void semant(SymbolTable objectTable, SymbolTable methodTable, ClassTable classTable, class_c c) { if (ClassTable.DEBUG) { System.out.println("---Integer: " + token.getString() + ", " + getLineNumber()); } <DeepExtract> type = TreeConstants.Int; return this; </DeepExtract> }
Cool-Compiler
positive
4,493
@Override CMAApiKey method() { assertNotNull(spaceId, "spaceId"); assertNotNull(key, "key"); return service.create(spaceId, key).blockingFirst(); }
@Override CMAApiKey method() { <DeepExtract> assertNotNull(spaceId, "spaceId"); assertNotNull(key, "key"); return service.create(spaceId, key).blockingFirst(); </DeepExtract> }
contentful-management.java
positive
4,494
@Override public void setImageResource(@DrawableRes int resId) { if (getResources().getDrawable(resId) instanceof BitmapDrawable && mCornerRadius > 0) { Bitmap bitmap = ((BitmapDrawable) getResources().getDrawable(resId)).getBitmap(); if (bitmap != null) { super.setImageDrawable(getRoundedDrawable(getContext(), bitmap,...
@Override public void setImageResource(@DrawableRes int resId) { <DeepExtract> if (getResources().getDrawable(resId) instanceof BitmapDrawable && mCornerRadius > 0) { Bitmap bitmap = ((BitmapDrawable) getResources().getDrawable(resId)).getBitmap(); if (bitmap != null) { super.setImageDrawable(getRoundedDrawable(getCont...
BGAPhotoPicker-Android
positive
4,495
@Override public int delete(@NonNull Uri uri, String selection, String[] selectionArgs) { int count = db.delete(UserDao.TABLENAME, getWhere(uri, selection), selectionArgs); if (getContext() != null) { getContext().getContentResolver().notifyChange(uri, null); } return count; }
@Override public int delete(@NonNull Uri uri, String selection, String[] selectionArgs) { int count = db.delete(UserDao.TABLENAME, getWhere(uri, selection), selectionArgs); <DeepExtract> if (getContext() != null) { getContext().getContentResolver().notifyChange(uri, null); } </DeepExtract> return count; }
AndroidArt
positive
4,496
public static void main(String[] args) { int[] objs = { 1, 2, 3, 4, 5, 6, 7 }; List<DemoTree> list = new ArrayList<>(); for (int i : objs) { list.add(new DemoTree(i)); } tree = list.get(0); for (int i = 0; i < objs.length / 2; i++) { list.get(i).setLeft(list.get(i * 2 + 1)); if (i * 2 + 2 < objs.length) { list.get(i).s...
public static void main(String[] args) { int[] objs = { 1, 2, 3, 4, 5, 6, 7 }; List<DemoTree> list = new ArrayList<>(); for (int i : objs) { list.add(new DemoTree(i)); } tree = list.get(0); for (int i = 0; i < objs.length / 2; i++) { list.get(i).setLeft(list.get(i * 2 + 1)); if (i * 2 + 2 < objs.length) { list.get(i).s...
springboot-technology
positive
4,498
@RestrictTo(LIBRARY_GROUP) public void setChildInsets(Object insets, boolean draw) { mLastInsets = insets; mDrawStatusBarBackground = draw; setWillNotDraw(!draw && getBackground() == null); if (!mInLayout) { super.requestLayout(); } }
@RestrictTo(LIBRARY_GROUP) public void setChildInsets(Object insets, boolean draw) { mLastInsets = insets; mDrawStatusBarBackground = draw; setWillNotDraw(!draw && getBackground() == null); <DeepExtract> if (!mInLayout) { super.requestLayout(); } </DeepExtract> }
FakeVibrato
positive
4,499
@Test public void validateFolderPattern_errorClearedOnChange() { PathPatternDialog dialog = new PathPatternDialog(shell, "src/"); dialog.setBlockOnOpen(false); dialog.open(); getFolderPatternText(dialog).setText("src//"); getFolderPatternText(dialog).setText("src/"); assertNull(dialog.getErrorMessage()); }
@Test public void validateFolderPattern_errorClearedOnChange() { PathPatternDialog dialog = new PathPatternDialog(shell, "src/"); <DeepExtract> dialog.setBlockOnOpen(false); dialog.open(); </DeepExtract> getFolderPatternText(dialog).setText("src//"); getFolderPatternText(dialog).setText("src/"); assertNull(dialog.getEr...
jshint-eclipse
positive
4,500
@Test public final void testPillar() { LocalCall<Boolean> call = Match.pillar("foo", Optional.empty()); assertEquals("match.pillar", call.getPayload().get("fun")); stubFor(any(urlMatching("/")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withHeader("Content-Type", "application/json").withBody(JSON_MATC...
@Test public final void testPillar() { LocalCall<Boolean> call = Match.pillar("foo", Optional.empty()); assertEquals("match.pillar", call.getPayload().get("fun")); <DeepExtract> stubFor(any(urlMatching("/")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withHeader("Content-Type", "application/json").with...
salt-netapi-client
positive
4,502
@NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); View view = View.inflate(getContext(), R.layout.dialog_date_picker, null); dialog.setContentView(view); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSP...
@NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); View view = View.inflate(getContext(), R.layout.dialog_date_picker, null); dialog.setContentView(view); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSP...
Android-development-with-example
positive
4,503
public void setAllcount(TreeMap<String, Integer> allcount) { List<List<Object>> result = new ArrayList<>(); for (Entry<String, Integer> tmp : allcount.entrySet()) { List<Object> list = new ArrayList<>(); list.add(tmp.getKey()); list.add(tmp.getValue()); result.add(list); } return result; }
public void setAllcount(TreeMap<String, Integer> allcount) { <DeepExtract> List<List<Object>> result = new ArrayList<>(); for (Entry<String, Integer> tmp : allcount.entrySet()) { List<Object> list = new ArrayList<>(); list.add(tmp.getKey()); list.add(tmp.getValue()); result.add(list); } return result; </DeepExtract> }
weibo-service
positive
4,504
private void handle401(final YokeRequest request, final Handler<Object> next) { YokeResponse response = request.response(); response.putHeader("WWW-Authenticate", "Basic realm=\"" + getRealm(request) + "\""); response.setStatusCode(401); if ("No authorization token" != null) { request.put("user", user); next.handle(nul...
private void handle401(final YokeRequest request, final Handler<Object> next) { YokeResponse response = request.response(); response.putHeader("WWW-Authenticate", "Basic realm=\"" + getRealm(request) + "\""); response.setStatusCode(401); <DeepExtract> if ("No authorization token" != null) { request.put("user", user); n...
yoke
positive
4,505
public void setReadUncommited(boolean useReadUncommitedIsolationMode) { setPragma(Pragma.READ_UNCOMMITED, Boolean.toString(useReadUncommitedIsolationMode)); }
public void setReadUncommited(boolean useReadUncommitedIsolationMode) { <DeepExtract> setPragma(Pragma.READ_UNCOMMITED, Boolean.toString(useReadUncommitedIsolationMode)); </DeepExtract> }
spatialite4-jdbc
positive
4,506
void setupSetter(Class targetClass) { Method setterOrGetter = null; try { mPropertyMapLock.writeLock().lock(); HashMap<String, Method> propertyMap = sSetterPropertyMap.get(targetClass); if (propertyMap != null) { setterOrGetter = propertyMap.get(mPropertyName); } if (setterOrGetter == null) { setterOrGetter = getProper...
void setupSetter(Class targetClass) { <DeepExtract> Method setterOrGetter = null; try { mPropertyMapLock.writeLock().lock(); HashMap<String, Method> propertyMap = sSetterPropertyMap.get(targetClass); if (propertyMap != null) { setterOrGetter = propertyMap.get(mPropertyName); } if (setterOrGetter == null) { setterOrGett...
AwesomeDrawer
positive
4,507
public void destroyJoint(Joint joint) { DwBody shp = getShape(joint); if (shp != null) { shp.release(); } super.destroyJoint(joint); }
public void destroyJoint(Joint joint) { <DeepExtract> DwBody shp = getShape(joint); if (shp != null) { shp.release(); } </DeepExtract> super.destroyJoint(joint); }
LiquidFunProcessing
positive
4,508
public Criteria andTypeIsNotNull() { if ("type is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("type is not null")); return (Criteria) this; }
public Criteria andTypeIsNotNull() { <DeepExtract> if ("type is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("type is not null")); </DeepExtract> return (Criteria) this; }
Whome
positive
4,509
public static com.conveyal.transitwand.TransitWandProtos.Upload parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point result = buildPartial(); if (!result.isInitialized...
public static com.conveyal.transitwand.TransitWandProtos.Upload parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { <DeepExtract> com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point result = buildPartial(); if (!result...
transit-wand
positive
4,510
public void setProgressRotation(float rotation) { mRotation = rotation; invalidateSelf(); }
public void setProgressRotation(float rotation) { <DeepExtract> mRotation = rotation; invalidateSelf(); </DeepExtract> }
AgentWebX5
positive
4,511
private void launchEmulator() throws IOException { Stage stage = Stages.getPrimaryStage(); stage.setTitle(APP_TITLE + (appConfig.isDeveloperMode() ? " (Developer Mode)" : "")); stage.setIconified(false); stage.setAlwaysOnTop(appConfig.isAlwaysOnTop()); stage.setMinWidth(appConfig.getMinWindowWidth()); stage.setMinHeigh...
private void launchEmulator() throws IOException { Stage stage = Stages.getPrimaryStage(); stage.setTitle(APP_TITLE + (appConfig.isDeveloperMode() ? " (Developer Mode)" : "")); stage.setIconified(false); stage.setAlwaysOnTop(appConfig.isAlwaysOnTop()); stage.setMinWidth(appConfig.getMinWindowWidth()); stage.setMinHeigh...
glcd-emulator
positive
4,512
public static Calendar fromYyyyMmDdHhMmSs(String str) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar cal = Calendar.getInstance(); cal.setTime(sdf.parse(str)); return cal; }
public static Calendar fromYyyyMmDdHhMmSs(String str) throws ParseException { <DeepExtract> SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar cal = Calendar.getInstance(); cal.setTime(sdf.parse(str)); return cal; </DeepExtract> }
hyena
positive
4,513
public Builder indexRepository(final String pIndex) { indexRepository = pIndex; return this; }
public Builder indexRepository(final String pIndex) { <DeepExtract> indexRepository = pIndex; </DeepExtract> return this; }
semantic-repository
positive
4,514
public void widgetSelected(SelectionEvent arg0) { String sGitHubUserName = getGitHubUserName(); if (sGitHubUserName != null) { PopulateListTaskWithProgress task = new PopulateListTaskWithProgress(getTelosysToolsCfgFromFields(), sGitHubUserName, _listGitHubRepositories, _tLogger); ProgressMonitorDialog progressMonitorDi...
public void widgetSelected(SelectionEvent arg0) { <DeepExtract> String sGitHubUserName = getGitHubUserName(); if (sGitHubUserName != null) { PopulateListTaskWithProgress task = new PopulateListTaskWithProgress(getTelosysToolsCfgFromFields(), sGitHubUserName, _listGitHubRepositories, _tLogger); ProgressMonitorDialog pro...
TelosysToolsPlugin
positive
4,515
private AixDetailedWidget initialize() throws AixWidgetDrawException, AixWidgetDataException { mResolver = mContext.getContentResolver(); Calendar calendar = Calendar.getInstance(mUtcTimeZone); mTimeNow = calendar.getTimeInMillis(); truncateHour(calendar); calendar.add(Calendar.HOUR_OF_DAY, 1); calendar.add(Calendar.HO...
private AixDetailedWidget initialize() throws AixWidgetDrawException, AixWidgetDataException { mResolver = mContext.getContentResolver(); Calendar calendar = Calendar.getInstance(mUtcTimeZone); mTimeNow = calendar.getTimeInMillis(); truncateHour(calendar); calendar.add(Calendar.HOUR_OF_DAY, 1); calendar.add(Calendar.HO...
aix-weather-widget
positive
4,516
public void http_lt1(String name) { try { Thread.sleep((long) (Math.random() * 500)); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("测试结果:hi1 " + name); try { Thread.sleep((long) (Math.random() * 500)); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println...
public void http_lt1(String name) { try { Thread.sleep((long) (Math.random() * 500)); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("测试结果:hi1 " + name); <DeepExtract> try { Thread.sleep((long) (Math.random() * 500)); } catch (InterruptedException e) { e.printStackTrace(); } Syst...
distributed-dev-learning
positive
4,517
private void goToNext() { float extra = 0; if (scale != 1) { extra = (getContainerViewWidth() - centerImage.getImageWidth()) / 2 * scale; } switchImageAfterAnimation = 1; animateTo(scale, minX - getContainerViewWidth() - extra - PAGE_SPACING / 2, translationY, false, 250); }
private void goToNext() { float extra = 0; if (scale != 1) { extra = (getContainerViewWidth() - centerImage.getImageWidth()) / 2 * scale; } switchImageAfterAnimation = 1; <DeepExtract> animateTo(scale, minX - getContainerViewWidth() - extra - PAGE_SPACING / 2, translationY, false, 250); </DeepExtract> }
TelegramGallery
positive
4,519
public Map[] bannerZoneStatistics(Integer id, Date startDate) throws XmlRpcException { if (!isValidSessionId()) throw new IllegalArgumentException("Not logined to server"); return bannerService.bannerZoneStatistics(id, startDate); }
public Map[] bannerZoneStatistics(Integer id, Date startDate) throws XmlRpcException { <DeepExtract> if (!isValidSessionId()) throw new IllegalArgumentException("Not logined to server"); </DeepExtract> return bannerService.bannerZoneStatistics(id, startDate); }
openx-2.8.8
positive
4,520
public Criteria andUserAddressLessThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "userAddress" + " cannot be null"); } criteria.add(new Criterion("user_address <", value)); return (Criteria) this; }
public Criteria andUserAddressLessThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "userAddress" + " cannot be null"); } criteria.add(new Criterion("user_address <", value)); </DeepExtract> return (Criteria) this; }
SSM_BookSystem
positive
4,522
public Criteria andPasswordIn(List<String> values) { if (values == null) { throw new RuntimeException("Value for " + "password" + " cannot be null"); } criteria.add(new Criterion("password in", values)); return (Criteria) this; }
public Criteria andPasswordIn(List<String> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "password" + " cannot be null"); } criteria.add(new Criterion("password in", values)); </DeepExtract> return (Criteria) this; }
garbage-collection
positive
4,523
public static long parseDate(String date) { for (int i = 0; i < _dateReceive.length; i++) { if (_dateReceive[i] == null) { _dateReceive[i] = new SimpleDateFormat(__dateReceiveFmt[i], Locale.US); _dateReceive[i].setTimeZone(__GMT); } try { Date date = (Date) _dateReceive[i].parseObject(date); return date.getTime(); } ca...
public static long parseDate(String date) { <DeepExtract> for (int i = 0; i < _dateReceive.length; i++) { if (_dateReceive[i] == null) { _dateReceive[i] = new SimpleDateFormat(__dateReceiveFmt[i], Locale.US); _dateReceive[i].setTimeZone(__GMT); } try { Date date = (Date) _dateReceive[i].parseObject(date); return date.g...
pc5s
positive
4,524
public ChangesetStoreState getChangesetState(int sequenceNumber) throws Exception { HttpGet get = new HttpGet(getChangesetStateURL(sequenceNumber).toString()); setUserAgent(get); HttpResponse httpResponse = getHttpClient().execute(get); if (httpResponse.getStatusLine().getStatusCode() != 200) { log.info("HTTP " + httpR...
public ChangesetStoreState getChangesetState(int sequenceNumber) throws Exception { <DeepExtract> HttpGet get = new HttpGet(getChangesetStateURL(sequenceNumber).toString()); setUserAgent(get); HttpResponse httpResponse = getHttpClient().execute(get); if (httpResponse.getStatusLine().getStatusCode() != 200) { log.info("...
osm-common
positive
4,525
@Override public Tab setTabPadding(int tabPaddingStart, int tabPaddingTop, int tabPaddingEnd, int tabPaddingBottom) { this.tabPaddingStart = tabPaddingStart; this.tabPaddingTop = tabPaddingTop; this.tabPaddingEnd = tabPaddingEnd; this.tabPaddingBottom = tabPaddingBottom; ViewCompat.setPaddingRelative(this, getTabPaddin...
@Override public Tab setTabPadding(int tabPaddingStart, int tabPaddingTop, int tabPaddingEnd, int tabPaddingBottom) { this.tabPaddingStart = tabPaddingStart; this.tabPaddingTop = tabPaddingTop; this.tabPaddingEnd = tabPaddingEnd; this.tabPaddingBottom = tabPaddingBottom; <DeepExtract> ViewCompat.setPaddingRelative(this...
JTabLayout
positive
4,526
public static int getNum1(int n) { if (n < 1) { return 0; } if (1 == n - 1) { return 2; } if (1 == n) { return 1; } return process(1 + 1, n) + process(1 + 2, n); }
public static int getNum1(int n) { if (n < 1) { return 0; } <DeepExtract> if (1 == n - 1) { return 2; } if (1 == n) { return 1; } return process(1 + 1, n) + process(1 + 2, n); </DeepExtract> }
ZuoChengyun
positive
4,527
public void release() { if (pingTask != null) { pingTask.cancel(); } if (timer != null) { timer.cancel(); timer = null; } }
public void release() { <DeepExtract> if (pingTask != null) { pingTask.cancel(); } </DeepExtract> if (timer != null) { timer.cancel(); timer = null; } }
dcs-sdk-java
positive
4,529
public void actionPerformed(java.awt.event.ActionEvent evt) { wpConfigPanel.store(); DialogDescriptor dialogDescriptor = new DialogDescriptor(wpConfigPanel, "wp-config", true, DialogDescriptor.OK_CANCEL_OPTION, null, null); Object result = DialogDisplayer.getDefault().notify(dialogDescriptor); if (result != DialogDescr...
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> wpConfigPanel.store(); DialogDescriptor dialogDescriptor = new DialogDescriptor(wpConfigPanel, "wp-config", true, DialogDescriptor.OK_CANCEL_OPTION, null, null); Object result = DialogDisplayer.getDefault().notify(dialogDescriptor); if (result ...
netbeans-wordpress-plugin
positive
4,530
@Override public <W extends IBaseTabPageAdapter<T, V>> W remove(int position) { list_bean.remove(position); return (W) this; notifyDataSetChanged(); return (W) this; }
@Override public <W extends IBaseTabPageAdapter<T, V>> W remove(int position) { <DeepExtract> list_bean.remove(position); return (W) this; </DeepExtract> notifyDataSetChanged(); return (W) this; }
TabLayoutNiubility
positive
4,531
public boolean hashPath(String path, LinkedHashMap value) { if (tophash != null) return; if (chars == null) return; setTopHash(!cyrus ? readHashMap(true) : readCyrusHash(true)); return setObject(tophash, path, value); }
public boolean hashPath(String path, LinkedHashMap value) { if (tophash != null) return; if (chars == null) return; setTopHash(!cyrus ? readHashMap(true) : readCyrusHash(true)); <DeepExtract> return setObject(tophash, path, value); </DeepExtract> }
NetMash
positive
4,532
public static void removeFromTablist(Player player) { PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, ((CraftPlayer) player).getHandle()); for (Player all : Bukkit.getOnlinePlayers()) { ((CraftPlayer) all).getHandle().playerConnection.sendPacket(packet); } }
public static void removeFromTablist(Player player) { PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, ((CraftPlayer) player).getHandle()); <DeepExtract> for (Player all : Bukkit.getOnlinePlayers()) { ((CraftPlayer) all).getHandle().playerConnection.sendPacket(packet); } ...
BetterNick
positive
4,533
private String updateSQL(SafeAppendable builder) { if (!tables.isEmpty()) { if (!builder.isEmpty()) { builder.append("\n"); } builder.append("UPDATE"); builder.append(" "); builder.append(""); String last = "________"; for (int i = 0, n = tables.size(); i < n; i++) { String part = tables.get(i); if (i > 0 && !part.equa...
private String updateSQL(SafeAppendable builder) { if (!tables.isEmpty()) { if (!builder.isEmpty()) { builder.append("\n"); } builder.append("UPDATE"); builder.append(" "); builder.append(""); String last = "________"; for (int i = 0, n = tables.size(); i < n; i++) { String part = tables.get(i); if (i > 0 && !part.equa...
EasyJdbc
positive
4,534
public void visitTableSwitchInsn(final int min, final int max, final Label dflt, final Label[] labels) { int source = code.length; code.putByte(Opcodes.TABLESWITCH); code.length += (4 - code.length % 4) % 4; dflt.put(this, code, source, true); code.putInt(min).putInt(max); for (int i = 0; i < labels.length; ++i) { labe...
public void visitTableSwitchInsn(final int min, final int max, final Label dflt, final Label[] labels) { int source = code.length; code.putByte(Opcodes.TABLESWITCH); code.length += (4 - code.length % 4) % 4; dflt.put(this, code, source, true); code.putInt(min).putInt(max); for (int i = 0; i < labels.length; ++i) { labe...
xson
positive
4,535
private void expandValidArgumentFile(String fileName, File file, List<String> arguments, Set<String> visited) { return file.getAbsolutePath().isOption() ? addOption((OptionSpec) file.getAbsolutePath()) : addPositional((PositionalParamSpec) file.getAbsolutePath()); List<String> result = new ArrayList<String>(); LineNumb...
private void expandValidArgumentFile(String fileName, File file, List<String> arguments, Set<String> visited) { return file.getAbsolutePath().isOption() ? addOption((OptionSpec) file.getAbsolutePath()) : addPositional((PositionalParamSpec) file.getAbsolutePath()); List<String> result = new ArrayList<String>(); LineNumb...
gitruler
positive
4,536
private void incrementProgressInternal() { m_Progress++; float f = (float) m_Progress / m_Max; log("getDegree -- f is " + f + " progress is " + m_Progress + " max is " + m_Max); return (int) (360.f * f); }
private void incrementProgressInternal() { m_Progress++; <DeepExtract> float f = (float) m_Progress / m_Max; log("getDegree -- f is " + f + " progress is " + m_Progress + " max is " + m_Max); return (int) (360.f * f); </DeepExtract> }
WaveHeartRate
positive
4,537
private void pageChanged(IWorkbenchPage page) { if (page == null) { return; } IWorkbenchWindow workbenchWindow = page.getWorkbenchWindow(); if (workbenchWindow == null) { return; } Shell shell = workbenchWindow.getShell(); runUpdate(shell); }
private void pageChanged(IWorkbenchPage page) { if (page == null) { return; } IWorkbenchWindow workbenchWindow = page.getWorkbenchWindow(); <DeepExtract> if (workbenchWindow == null) { return; } Shell shell = workbenchWindow.getShell(); runUpdate(shell); </DeepExtract> }
ccw
positive
4,538
private TypeSpec createType(int sdk, boolean debuggable) { TypeSpec.Builder result = TypeSpec.classBuilder(bindingClassName.simpleName()).addModifiers(PUBLIC).addOriginatingElement(enclosingElement); if (isFinal) { result.addModifiers(FINAL); } if (parentBinding != null) { result.superclass(parentBinding.getBindingClas...
private TypeSpec createType(int sdk, boolean debuggable) { TypeSpec.Builder result = TypeSpec.classBuilder(bindingClassName.simpleName()).addModifiers(PUBLIC).addOriginatingElement(enclosingElement); if (isFinal) { result.addModifiers(FINAL); } if (parentBinding != null) { result.superclass(parentBinding.getBindingClas...
butterknife
positive
4,539
public static void update(boolean minimize, boolean compress, boolean cache, boolean inMemoryCache) { GreenScriptPlugin.updateMinimizer(minimize, compress, cache, inMemoryCache); flash.success("Setting updated"); flash.keep(); GreenScriptPlugin gs = GreenScriptPlugin.getInstance(); List<String> jsDeps = new ArrayList<S...
public static void update(boolean minimize, boolean compress, boolean cache, boolean inMemoryCache) { GreenScriptPlugin.updateMinimizer(minimize, compress, cache, inMemoryCache); flash.success("Setting updated"); flash.keep(); <DeepExtract> GreenScriptPlugin gs = GreenScriptPlugin.getInstance(); List<String> jsDeps = n...
greenscript
positive
4,540
private static void registerAllBlocks() { int logCount = 0; for (final LogBlock block : logBlocks) { registerLogBlock(block, String.format("logs%d", logCount), block.getSubBlockNames()); logCount++; } int leavesCount = 0; for (final Block block : leavesBlocks) { registerLeavesBlock(block, String.format("leaves%d", leav...
private static void registerAllBlocks() { int logCount = 0; for (final LogBlock block : logBlocks) { registerLogBlock(block, String.format("logs%d", logCount), block.getSubBlockNames()); logCount++; } int leavesCount = 0; for (final Block block : leavesBlocks) { registerLeavesBlock(block, String.format("leaves%d", leav...
ancient-trees
positive
4,541
private void emitLineTo(final double x1, final double y1) { final int outcode0 = this.cOutCode; if (clipRect != null) { final int outcode1 = DHelpers.outcode(x1, y1, clipRect); final int orCode = (outcode0 | outcode1); if (orCode != 0) { final int sideCode = outcode0 & outcode1; if (sideCode == 0) { if (subdivide) { su...
private void emitLineTo(final double x1, final double y1) { <DeepExtract> final int outcode0 = this.cOutCode; if (clipRect != null) { final int outcode1 = DHelpers.outcode(x1, y1, clipRect); final int orCode = (outcode0 | outcode1); if (orCode != 0) { final int sideCode = outcode0 & outcode1; if (sideCode == 0) { if (s...
marlin-fx
positive
4,542
@Override public void run() { ready = true; executorService.execute(onReadyHandler); }
@Override public void run() { <DeepExtract> ready = true; executorService.execute(onReadyHandler); </DeepExtract> }
reactive-grpc
positive
4,543
@Override public Object arrayOfField(int size) { return (T[]) Array.newInstance(type, size); }
@Override public Object arrayOfField(int size) { <DeepExtract> return (T[]) Array.newInstance(type, size); </DeepExtract> }
Collections
positive
4,544
@Override public synchronized void receive(FeedQuote aFeedQuote) { String symbol = aFeedQuote.symbol(); CollatedFeedQuotes collated = this.collatedFeedQuotes.get(symbol); if (collated == null) { collated = new CollatedFeedQuotes(); this.collatedFeedQuotes.put(symbol, collated); } this.feedQuotes.add(aFeedQuote); Map<St...
@Override public synchronized void receive(FeedQuote aFeedQuote) { String symbol = aFeedQuote.symbol(); CollatedFeedQuotes collated = this.collatedFeedQuotes.get(symbol); if (collated == null) { collated = new CollatedFeedQuotes(); this.collatedFeedQuotes.put(symbol, collated); } this.feedQuotes.add(aFeedQuote); <DeepE...
IDDD_NYSE
positive
4,545
@Override public int executeMethod(HostConfiguration hostconfig, HttpMethod method, HttpState state) throws IOException, HttpException { final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); if (!backend.isEmpty() && filterConfiguration.shouldProcessContext(OutgoingRequest)) { final M...
@Override public int executeMethod(HostConfiguration hostconfig, HttpMethod method, HttpState state) throws IOException, HttpException { <DeepExtract> final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); if (!backend.isEmpty() && filterConfiguration.shouldProcessContext(OutgoingReque...
tracee
positive
4,547
@Test public void testTextOnly() { Template template = parser.parse("xyz"); Template expected = CarmlTemplate.build(Arrays.asList(new Text("xyz"))); assertEquals(expected, template); }
@Test public void testTextOnly() { <DeepExtract> Template template = parser.parse("xyz"); Template expected = CarmlTemplate.build(Arrays.asList(new Text("xyz"))); assertEquals(expected, template); </DeepExtract> }
carml
positive
4,548
public Fenix andGreaterThanEqual(String field, Object value, String name) { if (true) { this.source.setPrefix(SymbolConst.AND).setSymbol(SymbolConst.GTE); new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(name) ? StringHelper.fixDot(field) : name, value); this.source.reset(); } return this;...
public Fenix andGreaterThanEqual(String field, Object value, String name) { <DeepExtract> if (true) { this.source.setPrefix(SymbolConst.AND).setSymbol(SymbolConst.GTE); new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(name) ? StringHelper.fixDot(field) : name, value); this.source.reset(); ...
fenix
positive
4,549
@Override public void handleParseResult(Object obj) { data.setSrc(obj.toString()); newsWebView.loadData(obj.toString(), "text/html; charset=utf-8", "utf-8"); new Thread() { @Override public void run() { super.run(); ContentValues values = new ContentValues(); values.put(TableContract.TableNews._ID, data.getId()); value...
@Override public void handleParseResult(Object obj) { data.setSrc(obj.toString()); <DeepExtract> newsWebView.loadData(obj.toString(), "text/html; charset=utf-8", "utf-8"); </DeepExtract> new Thread() { @Override public void run() { super.run(); ContentValues values = new ContentValues(); values.put(TableContract.TableN...
SicauHelper
positive
4,550
private void btnTimKiemActionPerformed(java.awt.event.ActionEvent evt) { txt_TenNKH.setText(""); txt_Ma_NKH.setText(""); txt_Ma_NKH.setEnabled(true); tar_Mota.setText(""); btnThem.setEnabled(true); tab_KhachHang.clearSelection(); lbl_Cus_ID_Hint.setVisible(false); lbl_MaNKH_Search_Hint.setVisible(false); tableModel = n...
private void btnTimKiemActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> txt_TenNKH.setText(""); txt_Ma_NKH.setText(""); txt_Ma_NKH.setEnabled(true); tar_Mota.setText(""); btnThem.setEnabled(true); tab_KhachHang.clearSelection(); lbl_Cus_ID_Hint.setVisible(false); lbl_MaNKH_Search_Hint.setVisible(false); ...
StoreManager
positive
4,551
@Override public void rescan() throws ConfigParseException, IOException, SQLException { logger.info(Log.PROCESS, "Rescan"); Log.setJobContext(agentName); logger.debug(Log.INIT, "scan"); ArrayList<AppJobRunner> joblist = getJobList(); if (joblist.size() > 0) { Database database = profile.getDatabase(); for (AppJobRunner...
@Override public void rescan() throws ConfigParseException, IOException, SQLException { logger.info(Log.PROCESS, "Rescan"); <DeepExtract> Log.setJobContext(agentName); logger.debug(Log.INIT, "scan"); ArrayList<AppJobRunner> joblist = getJobList(); if (joblist.size() > 0) { Database database = profile.getDatabase(); for...
sndml3
positive
4,552
public static <T> List<T> readDataFromFile(File file, Class<T> clazz) throws IOException { List<T> dataList = new ArrayList<>(); List<Map<String, Object>> list = ExcelUtil.getReader(Files.newInputStream(file.toPath())).readAll(); IoUtil.close(Files.newInputStream(file.toPath())); if (CollectionUtils.isEmpty(list)) { re...
public static <T> List<T> readDataFromFile(File file, Class<T> clazz) throws IOException { <DeepExtract> List<T> dataList = new ArrayList<>(); List<Map<String, Object>> list = ExcelUtil.getReader(Files.newInputStream(file.toPath())).readAll(); IoUtil.close(Files.newInputStream(file.toPath())); if (CollectionUtils.isEmp...
minimal-boot
positive
4,553
public static NBTTagCompound getRandomBuffCompound(int lvl) { NBTTagCompound compound = new NBTTagCompound(); compound.setIntArray(NBT_BUFF_ARRAY_NAME, getRandomBuffSet(lvl)); return compound; }
public static NBTTagCompound getRandomBuffCompound(int lvl) { NBTTagCompound compound = new NBTTagCompound(); <DeepExtract> compound.setIntArray(NBT_BUFF_ARRAY_NAME, getRandomBuffSet(lvl)); </DeepExtract> return compound; }
Aura-Cascade
positive
4,554
public PasetoV2 build() { super.fillInDefaults(); if (v2CryptoProvider == null) { v2CryptoProvider = V2CryptoLoader.getProvider(); } if (nonceGenerator == null) { nonceGenerator = v2CryptoProvider.getNonceGenerator(); } return new PasetoV2(base64Provider, encodingProvider, v2CryptoProvider, nonceGenerator); }
public PasetoV2 build() { <DeepExtract> super.fillInDefaults(); if (v2CryptoProvider == null) { v2CryptoProvider = V2CryptoLoader.getProvider(); } if (nonceGenerator == null) { nonceGenerator = v2CryptoProvider.getNonceGenerator(); } </DeepExtract> return new PasetoV2(base64Provider, encodingProvider, v2CryptoProvider,...
paseto
positive
4,555
public void resetOriginals() { mStartingStartTrim = 0; mStartingEndTrim = 0; mStartingRotation = 0; mStartTrim = 0; invalidateSelf(); mEndTrim = 0; invalidateSelf(); mRotation = 0; invalidateSelf(); }
public void resetOriginals() { mStartingStartTrim = 0; mStartingEndTrim = 0; mStartingRotation = 0; mStartTrim = 0; invalidateSelf(); mEndTrim = 0; invalidateSelf(); <DeepExtract> mRotation = 0; invalidateSelf(); </DeepExtract> }
TaobaoUnion
positive
4,556
public void actionPerformed(java.awt.event.ActionEvent evt) { migrationNameTextField.setEnabled(false); migrationTableNameTextField.setEnabled(true); migrationFromTextField.setEnabled(false); migrationToTextField.setEnabled(false); setEnabledMigrationTable(false); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> migrationNameTextField.setEnabled(false); migrationTableNameTextField.setEnabled(true); migrationFromTextField.setEnabled(false); migrationToTextField.setEnabled(false); setEnabledMigrationTable(false); </DeepExtract> }
fuelphp-netbeans
positive
4,557
@Override public V remove(Object key) { WeakReference<V> ref; WeakReference<V> ref = hashMap.get(key); if (ref == null) { remove(key); ref = null; } else ref = ref.get(); if (ref == null) { return null; } else { hashMap.remove(key); return ref.get(); } }
@Override public V remove(Object key) { <DeepExtract> WeakReference<V> ref; WeakReference<V> ref = hashMap.get(key); if (ref == null) { remove(key); ref = null; } else ref = ref.get(); </DeepExtract> if (ref == null) { return null; } else { hashMap.remove(key); return ref.get(); } }
java-baidupcs
positive
4,558
@Override public void enable() { if (find_in_hotbar() == -1) { this.set_disable(); } holes.clear(); for (BlockPos pos : WurstplusBlockInteractHelper.getSphere(WurstplusPlayerUtil.GetLocalPlayerPosFloored(), hole_range.get_value(1), (int) hole_range.get_value(1), false, true, 0)) { if (!mc.world.getBlockState(pos).getBl...
@Override public void enable() { if (find_in_hotbar() == -1) { this.set_disable(); } <DeepExtract> holes.clear(); for (BlockPos pos : WurstplusBlockInteractHelper.getSphere(WurstplusPlayerUtil.GetLocalPlayerPosFloored(), hole_range.get_value(1), (int) hole_range.get_value(1), false, true, 0)) { if (!mc.world.getBlockSt...
wurstplus-two
positive
4,559
@Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { int pos = viewHolder.getAdapterPosition(); if (swipedPos != pos) recoverQueue.add(swipedPos); swipedPos = pos; if (buttonsBuffer.containsKey(swipedPos)) buttons = buttonsBuffer.get(swipedPos); else buttons.clear(); buttonsBuffer.clear()...
@Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { int pos = viewHolder.getAdapterPosition(); if (swipedPos != pos) recoverQueue.add(swipedPos); swipedPos = pos; if (buttonsBuffer.containsKey(swipedPos)) buttons = buttonsBuffer.get(swipedPos); else buttons.clear(); buttonsBuffer.clear()...
micopacks
positive
4,560
public void actionPerformed(java.awt.event.ActionEvent evt) { JFileChooser chooser = new JFileChooser(busDescriptionTextField.getText()); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { busDescriptionTextField.setText(chooser.getSelectedFil...
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> JFileChooser chooser = new JFileChooser(busDescriptionTextField.getText()); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { busDescriptionTextField.setText(chooser....
Kayak
positive
4,561
public static Block registerBlockByFullName(Block block, ItemBlock itemBlock, String name) { block.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(block); itemBlock.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(itemBlock); return block; }
public static Block registerBlockByFullName(Block block, ItemBlock itemBlock, String name) { block.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(block); <DeepExtract> itemBlock.setRegistryName(new ResourceLocation(name)); return GameRegistry.register(itemBlock); </DeepExtract> return block; ...
ImmersivePetroleum
positive
4,562
@Override public void onInitialized() { super.onInitialized(); mGamma = mGamma; setFloat(mGammaLocation, mGamma); }
@Override public void onInitialized() { super.onInitialized(); <DeepExtract> mGamma = mGamma; setFloat(mGammaLocation, mGamma); </DeepExtract> }
KSYStreamer_Android
positive
4,563
private void onUpgradeFailure() { mIcon.setVisibility(View.VISIBLE); mProgressText.setVisibility(View.GONE); mProgressText.setText("0%"); mUpgradeStatus.setText(R.string.main_entry_upgrade); mUpgradeReminder.setVisibility(true ? View.VISIBLE : View.GONE); String currentVersion = SoundBarORM.getSettingValue(this.getActi...
private void onUpgradeFailure() { <DeepExtract> mIcon.setVisibility(View.VISIBLE); mProgressText.setVisibility(View.GONE); mProgressText.setText("0%"); mUpgradeStatus.setText(R.string.main_entry_upgrade); mUpgradeReminder.setVisibility(true ? View.VISIBLE : View.GONE); </DeepExtract> String currentVersion = SoundBarORM...
misound
positive
4,566
private static String getLowerCamelCaseField(FieldDescriptorProto fdp) { StringBuilder sb = new StringBuilder(); if (ACTIONSCRIPT_KEYWORDS.contains(fdp.getName())) { sb.append("__"); } sb.append(Character.toLowerCase(fdp.getName().charAt(0))); boolean upper = false; for (int i = 1; i < fdp.getName().length(); i++) { ch...
private static String getLowerCamelCaseField(FieldDescriptorProto fdp) { <DeepExtract> StringBuilder sb = new StringBuilder(); if (ACTIONSCRIPT_KEYWORDS.contains(fdp.getName())) { sb.append("__"); } sb.append(Character.toLowerCase(fdp.getName().charAt(0))); boolean upper = false; for (int i = 1; i < fdp.getName().lengt...
protohx
positive
4,567
public void openFile(File file, int sheetNo) throws IOException, FileNotFoundException { this.openWorkbook(new File(file)); openSheet = openWorkbook.getSheetAt(sheetNo); }
public void openFile(File file, int sheetNo) throws IOException, FileNotFoundException { <DeepExtract> this.openWorkbook(new File(file)); </DeepExtract> openSheet = openWorkbook.getSheetAt(sheetNo); }
taf
positive
4,568
@Override public JsonGenerator writeNumber(BigInteger value) throws JacksonException { if (value == null) { writeNull(); return this; } if (!_streamWriteContext.writeValue()) { _reportError("Cannot " + "write number" + ", expecting a property name"); } if (_nextName == null) { handleMissingName(); } try { if (_nextIsAt...
@Override public JsonGenerator writeNumber(BigInteger value) throws JacksonException { if (value == null) { writeNull(); return this; } <DeepExtract> if (!_streamWriteContext.writeValue()) { _reportError("Cannot " + "write number" + ", expecting a property name"); } </DeepExtract> if (_nextName == null) { handleMissing...
jackson-dataformat-xml
positive
4,569
public ImageView imageView(final int id) { return (V) wrapper.findViewById(id); }
public ImageView imageView(final int id) { <DeepExtract> return (V) wrapper.findViewById(id); </DeepExtract> }
AndroidUtils
positive
4,570
@Override public void onClick(DialogInterface dialog, int which) { info.setHost(host); info.setPort(port); info.setUsername(username); info.setPassword(password); info.setDbname(dbname); dao.update(info); Toast.makeText(getApplicationContext(), R.string.update_conn_succ, Toast.LENGTH_LONG).show(); setResult(RESULT_CODE...
@Override public void onClick(DialogInterface dialog, int which) { info.setHost(host); info.setPort(port); info.setUsername(username); info.setPassword(password); info.setDbname(dbname); dao.update(info); Toast.makeText(getApplicationContext(), R.string.update_conn_succ, Toast.LENGTH_LONG).show(); <DeepExtract> setResu...
aMysqlClient
positive
4,571
private void setContentTypeText() { if (contentType != null) throw new IllegalStateException("Content type already set to " + contentType); else { contentType = false ? CONTENT_IMAGE : CONTENT_TEXT; response.setContentType(contentType); } }
private void setContentTypeText() { <DeepExtract> if (contentType != null) throw new IllegalStateException("Content type already set to " + contentType); else { contentType = false ? CONTENT_IMAGE : CONTENT_TEXT; response.setContentType(contentType); } </DeepExtract> }
ditaa
positive
4,572
public Builder driveDirection(DriveDirection driveDirection) { if (created) { throw new IllegalStateException("Already created"); } val.driveDirection = driveDirection; return this; }
public Builder driveDirection(DriveDirection driveDirection) { <DeepExtract> if (created) { throw new IllegalStateException("Already created"); } </DeepExtract> val.driveDirection = driveDirection; return this; }
camdenm
positive
4,573
private static void e(@NonNull Object tag, @NonNull ImmutableValue<String> origin, @NonNull String message, @NonNull Throwable t) { AssertUtil.assertTrue(BuildConfig.DEBUG); try { if (Async.TRACE_ASYNC_ORIGIN && Async.WORKER != null) { originAsync().then(ccOrigin -> { origin.then(o -> { if (Async.SHOW_ERROR_STACK_TRACE...
private static void e(@NonNull Object tag, @NonNull ImmutableValue<String> origin, @NonNull String message, @NonNull Throwable t) { AssertUtil.assertTrue(BuildConfig.DEBUG); <DeepExtract> try { if (Async.TRACE_ASYNC_ORIGIN && Async.WORKER != null) { originAsync().then(ccOrigin -> { origin.then(o -> { if (Async.SHOW_ERR...
cascade
positive
4,574
@RequestMapping(value = "/getAllKinds.do") @ResponseBody public List<AllKinds> getAllKind() { return allKindsService.selectAll(); }
@RequestMapping(value = "/getAllKinds.do") @ResponseBody public List<AllKinds> getAllKind() { <DeepExtract> return allKindsService.selectAll(); </DeepExtract> }
Used-Trading-Platform
positive
4,575
@Override public String getEntityTypeName() { return fieldName; }
@Override public String getEntityTypeName() { <DeepExtract> return fieldName; </DeepExtract> }
tmdm-common
positive
4,577
public void removeSessionCallbackParameterI(String key) { if (!Util.isValidParameter(key, "key", "Session Callback")) return; if (sessionParameters.callbackParameters == null) { logger.warn("Session Callback parameters are not set"); return; } String oldValue = sessionParameters.callbackParameters.remove(key); if (oldV...
public void removeSessionCallbackParameterI(String key) { if (!Util.isValidParameter(key, "key", "Session Callback")) return; if (sessionParameters.callbackParameters == null) { logger.warn("Session Callback parameters are not set"); return; } String oldValue = sessionParameters.callbackParameters.remove(key); if (oldV...
adobe_air_sdk
positive
4,578
@Override protected List<String> getClassPaths() { List<String> classPath = super.getClassPaths(); classPath.add(getSourcePathFromClass(Props.class)); classPath.add(getSourcePathFromClass(JavaProcessJob.class)); classPath.add(getSourcePathFromClass(HadoopSecurePigWrapper.class)); classPath.add(getSourcePathFromClass(Ha...
@Override protected List<String> getClassPaths() { List<String> classPath = super.getClassPaths(); classPath.add(getSourcePathFromClass(Props.class)); classPath.add(getSourcePathFromClass(JavaProcessJob.class)); classPath.add(getSourcePathFromClass(HadoopSecurePigWrapper.class)); classPath.add(getSourcePathFromClass(Ha...
hodor
positive
4,581
public static Date endTimeOfFourthQuarter(int year) { return DateTimeConverterUtil.toDate(lastDayOfMonth(LocalDate.of(year, 12, 1)).atTime(endTimeOfDay())); }
public static Date endTimeOfFourthQuarter(int year) { <DeepExtract> return DateTimeConverterUtil.toDate(lastDayOfMonth(LocalDate.of(year, 12, 1)).atTime(endTimeOfDay())); </DeepExtract> }
xk-time
positive
4,582
public String getCupsStdString() { if (ppdRec.stdList == null) { return ""; } String cupsString = ""; boolean isNext = false; for (PpdSectionList group : ppdRec.stdList) { for (PpdItemList section : group) { if (section.defaultValue.equals(section.savedValue)) { continue; } if (isNext) cupsString = cupsString + "#"; el...
public String getCupsStdString() { <DeepExtract> if (ppdRec.stdList == null) { return ""; } String cupsString = ""; boolean isNext = false; for (PpdSectionList group : ppdRec.stdList) { for (PpdItemList section : group) { if (section.defaultValue.equals(section.savedValue)) { continue; } if (isNext) cupsString = cupsSt...
JfCupsPrintService
positive
4,583
public SQL DROP_TABLE() { keywords.add("TABLE"); lastCall = KEYWORD; return this; }
public SQL DROP_TABLE() { <DeepExtract> keywords.add("TABLE"); lastCall = KEYWORD; return this; </DeepExtract> }
java-crud-api
positive
4,584
public static WpanNodeDiscover parse(AtCommandResponse response) { if (!response.getCommand().equals("ND")) { throw new IllegalArgumentException("This method is only applicable for the ND command"); } int[] data = response.getValue(); if (data == null || data.length == 0) { throw new IllegalArgumentException("ND comman...
public static WpanNodeDiscover parse(AtCommandResponse response) { if (!response.getCommand().equals("ND")) { throw new IllegalArgumentException("This method is only applicable for the ND command"); } int[] data = response.getValue(); if (data == null || data.length == 0) { throw new IllegalArgumentException("ND comman...
xbee-api
positive
4,585
public void validateCloudSdk() throws CloudSdkNotFoundException, CloudSdkOutOfDateException, CloudSdkVersionFileException { if (!Files.isDirectory(sdkPath)) { throw new CloudSdkNotFoundException("Validation Error: SDK location '" + sdkPath + "' is not a directory."); } if (!Files.isRegularFile(getGCloudPath())) { throw...
public void validateCloudSdk() throws CloudSdkNotFoundException, CloudSdkOutOfDateException, CloudSdkVersionFileException { if (!Files.isDirectory(sdkPath)) { throw new CloudSdkNotFoundException("Validation Error: SDK location '" + sdkPath + "' is not a directory."); } if (!Files.isRegularFile(getGCloudPath())) { throw...
appengine-plugins-core
positive
4,586
public static <K> void mergeSort(Queue<K> S, Comparator<K> comp) { int n = S.size(); if (n < 2) { return; } int mid = n / 2; Queue<K> S1 = new LinkedQueue<>(); Queue<K> S2 = new LinkedQueue<>(); while (S1.size() < mid) { S1.enqueue(S.dequeue()); } while (!S.isEmpty()) { S2.enqueue(S.dequeue()); } mergeSort(S1, comp); m...
public static <K> void mergeSort(Queue<K> S, Comparator<K> comp) { int n = S.size(); if (n < 2) { return; } int mid = n / 2; Queue<K> S1 = new LinkedQueue<>(); Queue<K> S2 = new LinkedQueue<>(); while (S1.size() < mid) { S1.enqueue(S.dequeue()); } while (!S.isEmpty()) { S2.enqueue(S.dequeue()); } mergeSort(S1, comp); m...
data-structures-and-algorithms
positive
4,589
Symbol addConstantModule(final String moduleName) { int hashCode = hash(Symbol.CONSTANT_MODULE_TAG, moduleName); Entry entry = get(hashCode); while (entry != null) { if (entry.tag == Symbol.CONSTANT_MODULE_TAG && entry.hashCode == hashCode && entry.value.equals(moduleName)) { return entry; } entry = entry.next; } const...
Symbol addConstantModule(final String moduleName) { <DeepExtract> int hashCode = hash(Symbol.CONSTANT_MODULE_TAG, moduleName); Entry entry = get(hashCode); while (entry != null) { if (entry.tag == Symbol.CONSTANT_MODULE_TAG && entry.hashCode == hashCode && entry.value.equals(moduleName)) { return entry; } entry = entry...
LunarClientSpoofer
positive
4,590
public static boolean isAlphanumeric(String str) { return str != null && str.matches(REGEX_ALPHANUMERIC); }
public static boolean isAlphanumeric(String str) { <DeepExtract> return str != null && str.matches(REGEX_ALPHANUMERIC); </DeepExtract> }
simon-java-utils
positive
4,591
public Criteria andOrderStatusIsNull() { if ("order_status is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("order_status is null")); return (Criteria) this; }
public Criteria andOrderStatusIsNull() { <DeepExtract> if ("order_status is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("order_status is null")); </DeepExtract> return (Criteria) this; }
sihai-maven-ssm-alipay
positive
4,592
@Test @Tag("slow") void testMate8() { searchEngine.getBoard().setFen("8/2p5/3k4/1p1p1K2/8/1P1P4/2P5/8 w"); System.out.println("Looking for " + "b3b4"); searchEngine.go(SearchParameters.get(5000)); String bestOperation = Move.toString(searchEngine.getBestMove()); System.out.println(); assertEquals("b3b4", bestOperation)...
@Test @Tag("slow") void testMate8() { <DeepExtract> searchEngine.getBoard().setFen("8/2p5/3k4/1p1p1K2/8/1P1P4/2P5/8 w"); System.out.println("Looking for " + "b3b4"); searchEngine.go(SearchParameters.get(5000)); String bestOperation = Move.toString(searchEngine.getBestMove()); System.out.println(); assertEquals("b3b4", ...
carballo
positive
4,593