before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Override protected void onCreateDataBinding() { super.onCreateDataBinding(); binding = createContentView(R.layout.activity_chat); String type = getIntent().getStringExtra("type"); String peer = getIntent().getStringExtra("peer"); if (StringUtil.isEmpty(type) || StringUtil.isEmpty(peer)) { finish(); } binding.toolbar.s...
@Override <DeepExtract> </DeepExtract> protected void onCreateDataBinding() { <DeepExtract> </DeepExtract> super.onCreateDataBinding(); <DeepExtract> </DeepExtract> binding = createContentView(R.layout.activity_chat); <DeepExtract> </DeepExtract> String type = getIntent().getStringExtra("type"); <DeepExtract> </DeepExt...
NoWordsChat
positive
5,367
@Override protected void onLayout(boolean flag, int i, int j, int k, int l) { int offset = mPtrIndicator.getCurrentPosY(); int paddingLeft = getPaddingLeft(); int paddingTop = getPaddingTop(); if (mHeaderView != null) { MarginLayoutParams lp = (MarginLayoutParams) mHeaderView.getLayoutParams(); final int left = padding...
@Override protected void onLayout(boolean flag, int i, int j, int k, int l) { <DeepExtract> int offset = mPtrIndicator.getCurrentPosY(); int paddingLeft = getPaddingLeft(); int paddingTop = getPaddingTop(); if (mHeaderView != null) { MarginLayoutParams lp = (MarginLayoutParams) mHeaderView.getLayoutParams(); final int ...
RecyclerViewUtils
positive
5,368
private void initBody(RelativeLayout rlBody, float ratio) { svContent = new ScrollView(activity); rlBody.addView(svContent, new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); LinearLayout llContent = new LinearLayout(activity); llContent.setOrientation(LinearLayout.HORIZONTAL); svCo...
private void initBody(RelativeLayout rlBody, float ratio) { svContent = new ScrollView(activity); rlBody.addView(svContent, new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); LinearLayout llContent = new LinearLayout(activity); llContent.setOrientation(LinearLayout.HORIZONTAL); svCo...
CN5E-shop
positive
5,369
public static XPathException alreadyInstalled(Exception cause) { XPathException ex = new XPathException(cause.getMessage(), cause); StructuredQName qname = new StructuredQName(PREFIX, NS, "already-installed"); ex.setErrorCodeQName(qname); return ex; }
public static XPathException alreadyInstalled(Exception cause) { <DeepExtract> XPathException ex = new XPathException(cause.getMessage(), cause); StructuredQName qname = new StructuredQName(PREFIX, NS, "already-installed"); ex.setErrorCodeQName(qname); return ex; </DeepExtract> }
servlex
positive
5,370
@Override public void onItemRangeChanged(int positionStart, int itemCount, Object payload) { if (mAdapter == null) { return; } if (mAdapter.isEmpty()) { if (hasData) { enableEmptyView(true); hasData = false; } } else { if (!hasData) { enableEmptyView(false); hasData = true; } } }
@Override public void onItemRangeChanged(int positionStart, int itemCount, Object payload) { <DeepExtract> if (mAdapter == null) { return; } if (mAdapter.isEmpty()) { if (hasData) { enableEmptyView(true); hasData = false; } } else { if (!hasData) { enableEmptyView(false); hasData = true; } } </DeepExtract> }
XRefreshView
positive
5,371
public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) { if (mGlSurfaceView != null) { mRenderer.deleteImage(); mRenderer.runOnDraw(new Runnable() { @Override public void run() { synchronized (mFilter) { mFilter.destroy(); mFilter.notify(); } } }); synchronized (mFilter) { requestRender(); try { mFilter.wait(); ...
public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) { if (mGlSurfaceView != null) { mRenderer.deleteImage(); mRenderer.runOnDraw(new Runnable() { @Override public void run() { synchronized (mFilter) { mFilter.destroy(); mFilter.notify(); } } }); synchronized (mFilter) { requestRender(); try { mFilter.wait(); ...
ImageEdit
positive
5,372
public Criteria andEmailBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "email" + " cannot be null"); } criteria.add(new Criterion("email between", value1, value2)); return (Criteria) this; }
public Criteria andEmailBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "email" + " cannot be null"); } criteria.add(new Criterion("email between", value1, value2)); </DeepExtract> return (Criteria) this; }
uccn
positive
5,373
public void setSpinEnabled(boolean spinEnabled) { this.spinEnabled = spinEnabled; if (spinEnabled) { if (indeterminateTransition == null) { indeterminateTransition = new Timeline(); indeterminateTransition.setCycleCount(Timeline.INDEFINITE); indeterminateTransition.setDelay(UNCLIPPED_DELAY); } else { indeterminateTrans...
public void setSpinEnabled(boolean spinEnabled) { this.spinEnabled = spinEnabled; <DeepExtract> if (spinEnabled) { if (indeterminateTransition == null) { indeterminateTransition = new Timeline(); indeterminateTransition.setCycleCount(Timeline.INDEFINITE); indeterminateTransition.setDelay(UNCLIPPED_DELAY); } else { inde...
archivo
positive
5,374
@SuppressWarnings("unchecked") public static <T> T getBean(String name) { if (applicationContext == null) { throw new IllegalStateException("applicaitonContext未注入,请在applicationContext.xml中定义SpringContextHolder"); } return (T) applicationContext.getBean(name); }
@SuppressWarnings("unchecked") public static <T> T getBean(String name) { <DeepExtract> if (applicationContext == null) { throw new IllegalStateException("applicaitonContext未注入,请在applicationContext.xml中定义SpringContextHolder"); } </DeepExtract> return (T) applicationContext.getBean(name); }
springboard-cloud
positive
5,375
public static final GraphicalView getScatterChartView(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer) { if (dataset == null || renderer == null || dataset.getSeriesCount() != renderer.getSeriesRendererCount()) { throw new IllegalArgumentException("Dataset and renderer should be not ...
public static final GraphicalView getScatterChartView(Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer) { <DeepExtract> if (dataset == null || renderer == null || dataset.getSeriesCount() != renderer.getSeriesRendererCount()) { throw new IllegalArgumentException("Dataset and renderer ...
AChartEngine
positive
5,376
public static int getCurrentInc() { return new ObjectID(); }
public static int getCurrentInc() { <DeepExtract> return new ObjectID(); </DeepExtract> }
kettle_support_kettle8.0
positive
5,377
public Criteria andTryCountIn(List<Integer> values) { if (values == null) { throw new RuntimeException("Value for " + "tryCount" + " cannot be null"); } criteria.add(new Criterion("try_count in", values)); return (Criteria) this; }
public Criteria andTryCountIn(List<Integer> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "tryCount" + " cannot be null"); } criteria.add(new Criterion("try_count in", values)); </DeepExtract> return (Criteria) this; }
cloud
positive
5,378
@Override public boolean mouseScrolled(double d, double e, double f) { boolean scrolled = super.mouseScrolled(d, e, f); this.imageScale = MathUtil.clamp(imageScale + f > 0 ? -0.25F : 0.25F, 0.5F, 3F); this.updateScale(); return scrolled; }
@Override public boolean mouseScrolled(double d, double e, double f) { boolean scrolled = super.mouseScrolled(d, e, f); <DeepExtract> this.imageScale = MathUtil.clamp(imageScale + f > 0 ? -0.25F : 0.25F, 0.5F, 3F); this.updateScale(); </DeepExtract> return scrolled; }
JustMap
positive
5,379
public static String registerTemplate(MimeTypeEnum mimeType, String source, String key) { if (!classesInited) { classesInited = true; } else { if (!timeToRefresh()) return; } if (templateRoots == null) return; if (!JapidRenderer.keepJavaFiles) { refreshClassesInMemory(); return; } try { String[] allTemps = DirUtil.getA...
public static String registerTemplate(MimeTypeEnum mimeType, String source, String key) { <DeepExtract> if (!classesInited) { classesInited = true; } else { if (!timeToRefresh()) return; } if (templateRoots == null) return; if (!JapidRenderer.keepJavaFiles) { refreshClassesInMemory(); return; } try { String[] allTemps ...
japid42
positive
5,380
@Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { super.onLoadingComplete(imageUri, view, loadedImage); WallpaperPaletteLoaderTask.with(loadedImage).callback(WallpaperBoardPreviewActivity.this).start(); if (loadedImage != null && mWallpaper.getColor() == 0) { Palette.from(loadedI...
@Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { super.onLoadingComplete(imageUri, view, loadedImage); WallpaperPaletteLoaderTask.with(loadedImage).callback(WallpaperBoardPreviewActivity.this).start(); if (loadedImage != null && mWallpaper.getColor() == 0) { Palette.from(loadedI...
wallpaperboard-enhanced
positive
5,381
public void setBlob(int i, Blob x) throws SQLException { String methodCall = "setBlob(" + i + ", " + x + ")"; String tracedArg; try { tracedArg = rdbmsSpecifics.formatParameterObject(x == null ? null : ("<Blob of size " + x.length() + ">")); } catch (Throwable t) { log.debug("rdbmsSpecifics threw an exception while try...
public void setBlob(int i, Blob x) throws SQLException { String methodCall = "setBlob(" + i + ", " + x + ")"; <DeepExtract> String tracedArg; try { tracedArg = rdbmsSpecifics.formatParameterObject(x == null ? null : ("<Blob of size " + x.length() + ">")); } catch (Throwable t) { log.debug("rdbmsSpecifics threw an excep...
miniprofiler-jvm
positive
5,382
public static int i(Throwable throwable, Object s1, Object... args) { if (config.minimumLogLevel > Log.INFO) return 0; final String s = Strings.toString(s1); final String message = (args.length > 0 ? String.format(s, args) : s) + '\n' + Log.getStackTraceString(throwable); return Log.println(Log.INFO, getScope(5), proce...
public static int i(Throwable throwable, Object s1, Object... args) { if (config.minimumLogLevel > Log.INFO) return 0; final String s = Strings.toString(s1); final String message = (args.length > 0 ? String.format(s, args) : s) + '\n' + Log.getStackTraceString(throwable); <DeepExtract> return Log.println(Log.INFO, getS...
AppKit
positive
5,383
@Override public HotSpot call(HotSpot hotSpot) { if (geocoder != null) { try { List<Address> addresses = geocoder.getFromLocation(hotSpot.getLatitude(), hotSpot.getLongitude(), 1); Address address = addresses.get(0); hotSpot.setAddressLine1(address.getAddressLine(0)); hotSpot.setAddressLine2(address.getAddressLine(1));...
@Override public HotSpot call(HotSpot hotSpot) { <DeepExtract> if (geocoder != null) { try { List<Address> addresses = geocoder.getFromLocation(hotSpot.getLatitude(), hotSpot.getLongitude(), 1); Address address = addresses.get(0); hotSpot.setAddressLine1(address.getAddressLine(0)); hotSpot.setAddressLine2(address.getAd...
IBM-Ready-App-for-Telecommunications
positive
5,384
public static String createURIWithStringValues(final String scheme, final String authority, final String userInfo, final String host, final String port, final String path, final String query, final String fragment, final Map<String, ? extends Object> values, final boolean encode) { StringBuilder sb = new StringBuilder(...
public static String createURIWithStringValues(final String scheme, final String authority, final String userInfo, final String host, final String port, final String path, final String query, final String fragment, final Map<String, ? extends Object> values, final boolean encode) { StringBuilder sb = new StringBuilder(...
webx-restful
positive
5,385
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setDateHeader("Expires", 0); request.set...
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setDateHeader("Expires", 0); request.set...
twitstreet
positive
5,386
public Set<Log> getLogs(Method method) { Set<T> logs = findAnnotationOnMethod(method, Log.class); if (logs.isEmpty()) { Method bridgeMethod = bridgeMethodResolver.findBridgeMethod(method); if (nonNull(bridgeMethod)) { return findAnnotationOnMethod(bridgeMethod, Log.class); } } return logs; }
public Set<Log> getLogs(Method method) { <DeepExtract> Set<T> logs = findAnnotationOnMethod(method, Log.class); if (logs.isEmpty()) { Method bridgeMethod = bridgeMethodResolver.findBridgeMethod(method); if (nonNull(bridgeMethod)) { return findAnnotationOnMethod(bridgeMethod, Log.class); } } return logs; </DeepExtract> ...
eclair
positive
5,387
public Node replace(Node o, Node r) { if (this.equals(o)) return r; Operation clone = this.copy(); this.operands = operands.stream().map(op -> op.replace(o, r)).collect(Collectors.toCollection(ArrayList::new)); isOrdered = false; return this; return clone; }
public Node replace(Node o, Node r) { if (this.equals(o)) return r; Operation clone = this.copy(); <DeepExtract> this.operands = operands.stream().map(op -> op.replace(o, r)).collect(Collectors.toCollection(ArrayList::new)); isOrdered = false; return this; </DeepExtract> return clone; }
java-algebra-system
positive
5,388
public Criteria andGoodsIdGreaterThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "goodsId" + " cannot be null"); } criteria.add(new Criterion("goods_id >=", value)); return (Criteria) this; }
public Criteria andGoodsIdGreaterThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "goodsId" + " cannot be null"); } criteria.add(new Criterion("goods_id >=", value)); </DeepExtract> return (Criteria) this; }
ssmxiaomi
positive
5,389
@Test public void test_add_new_file() throws Exception { crawler = startCrawler(); ESSearchResponse response = countTestHelper(new ESSearchRequest().withIndex(getCrawlerName()), 1L, currentTestResourceDir); for (ESSearchHit hit : response.getHits()) { try { ESSearchHit getHit = documentService.get(hit.getIndex(), hit.g...
@Test public void test_add_new_file() throws Exception { crawler = startCrawler(); ESSearchResponse response = countTestHelper(new ESSearchRequest().withIndex(getCrawlerName()), 1L, currentTestResourceDir); for (ESSearchHit hit : response.getHits()) { try { ESSearchHit getHit = documentService.get(hit.getIndex(), hit.g...
fscrawler
positive
5,390
@Override public void onResult(Collection<Pair<? extends ComparisonItem, ? extends ComparisonItem>> discrepancies) { if (differencesManagementDlg != null && differencesManagementDlg.isShowing()) differencesManagementDlg.setVisible(false); if (discrepancies == null || discrepancies.isEmpty()) { String keyMsg = "Files_ar...
@Override public void onResult(Collection<Pair<? extends ComparisonItem, ? extends ComparisonItem>> discrepancies) { <DeepExtract> if (differencesManagementDlg != null && differencesManagementDlg.isShowing()) differencesManagementDlg.setVisible(false); if (discrepancies == null || discrepancies.isEmpty()) { String keyM...
swift-explorer
positive
5,391
public static Foto fromYmd(int year, int month, int day) { return Foto.fromLunar(Lunar.fromYmdHms(year + DEAD_YEAR - 1, month, day, 0, 0, 0)); }
public static Foto fromYmd(int year, int month, int day) { <DeepExtract> return Foto.fromLunar(Lunar.fromYmdHms(year + DEAD_YEAR - 1, month, day, 0, 0, 0)); </DeepExtract> }
lunar-java
positive
5,393
@Override public void clear() { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, false); this.success = 0; this.ouch = null; }
@Override public void clear() { <DeepExtract> __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, false); </DeepExtract> this.success = 0; this.ouch = null; }
ThriftTutorial
positive
5,394
public TextView getTextView(int viewId) { View view = views.get(viewId); if (view == null) { view = itemView.findViewById(viewId); views.put(viewId, view); } return (T) view; }
public TextView getTextView(int viewId) { <DeepExtract> View view = views.get(viewId); if (view == null) { view = itemView.findViewById(viewId); views.put(viewId, view); } return (T) view; </DeepExtract> }
cniao5-shop
positive
5,395
@Override protected Void doInBackground(Void... voids) { if (!NetworkUtils.isUploadAllowed(context)) { LogFileUtils.logInfo(TAG, "skipped due to missing connection"); syncTask = null; return null; } updated = false; updateDelay = 60 * 60 * 1000; LogFileUtils.logInfo(TAG, "start updating"); synchronized (getLock()) { tr...
@Override protected Void doInBackground(Void... voids) { if (!NetworkUtils.isUploadAllowed(context)) { LogFileUtils.logInfo(TAG, "skipped due to missing connection"); syncTask = null; return null; } updated = false; updateDelay = 60 * 60 * 1000; LogFileUtils.logInfo(TAG, "start updating"); synchronized (getLock()) { tr...
cgm-scanner
positive
5,396
@Override public void registerDelegate(UploadStatusDelegate delegate, String id) throws RemoteException { if (delegate == null) return; uploadDelegates.put(id, new WeakReference<>(delegate)); delegate.onStart(id); }
@Override public void registerDelegate(UploadStatusDelegate delegate, String id) throws RemoteException { <DeepExtract> if (delegate == null) return; uploadDelegates.put(id, new WeakReference<>(delegate)); </DeepExtract> delegate.onStart(id); }
wechatbysimple
positive
5,397
@Override public void onPusherRegistered() { Log.d(LOG_TAG, "The GCM registration is done"); mPusherRegistrationComplete = true; Log.e(LOG_TAG, "finishIfReady " + mInitialSyncComplete + " " + mPusherRegistrationComplete); if (mInitialSyncComplete && mPusherRegistrationComplete) { Log.e(LOG_TAG, "finishIfRead start Home...
@Override public void onPusherRegistered() { Log.d(LOG_TAG, "The GCM registration is done"); mPusherRegistrationComplete = true; <DeepExtract> Log.e(LOG_TAG, "finishIfReady " + mInitialSyncComplete + " " + mPusherRegistrationComplete); if (mInitialSyncComplete && mPusherRegistrationComplete) { Log.e(LOG_TAG, "finishIfR...
matrix-android-console
positive
5,398
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { name = request.getParameter("name"); String responseMessage; try { Id = Long.parseLong(request.getParameter("id")); bean.removeTeamMember(Id); responseMessage = "Successfully deleted member \...
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { <DeepExtract> name = request.getParameter("name"); String responseMessage; try { Id = Long.parseLong(request.getParameter("id")); bean.removeTeamMember(Id); responseMessage = "Successfully de...
Payara-Examples
positive
5,399
public static ArrayList<Dockable> findCompoundDockableChildren(CompoundDockable compoundDockable) { ArrayList<Dockable> list = new ArrayList<Dockable>(); CompoundDockingPanel cdp = (CompoundDockingPanel) compoundDockable.getComponent(); if (cdp.getComponentCount() > 0) { Component c = cdp.getComponent(0); fillCompoundC...
public static ArrayList<Dockable> findCompoundDockableChildren(CompoundDockable compoundDockable) { ArrayList<Dockable> list = new ArrayList<Dockable>(); CompoundDockingPanel cdp = (CompoundDockingPanel) compoundDockable.getComponent(); <DeepExtract> if (cdp.getComponentCount() > 0) { Component c = cdp.getComponent(0);...
vldocking
positive
5,400
public Criteria andItemIdIn(List<Long> values) { if (values == null) { throw new RuntimeException("Value for " + "itemId" + " cannot be null"); } criteria.add(new Criterion("ITEM_ID in", values)); return (Criteria) this; }
public Criteria andItemIdIn(List<Long> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "itemId" + " cannot be null"); } criteria.add(new Criterion("ITEM_ID in", values)); </DeepExtract> return (Criteria) this; }
ECPS
positive
5,401
public void testWeaveInterfacePausable() { try { Weaver.weaveClass2("kilim.test.ex.ExInvalidPImp", Detector.DEFAULT); fail("Expected weave exception while processing " + "kilim.test.ex.ExInvalidPImp"); } catch (KilimException ke) { } catch (Exception e) { fail(e.toString()); } }
public void testWeaveInterfacePausable() { <DeepExtract> try { Weaver.weaveClass2("kilim.test.ex.ExInvalidPImp", Detector.DEFAULT); fail("Expected weave exception while processing " + "kilim.test.ex.ExInvalidPImp"); } catch (KilimException ke) { } catch (Exception e) { fail(e.toString()); } </DeepExtract> }
kilim-erjang
positive
5,402
public InputBuilder<E> autocomplete(String autocomplete) { element().autocomplete = autocomplete; return this; }
public InputBuilder<E> autocomplete(String autocomplete) { element().autocomplete = autocomplete; <DeepExtract> return this; </DeepExtract> }
elemento
positive
5,403
public void loadInstance(AlloyInstance unprojectedInstance) { this.originalInstance = unprojectedInstance; for (AlloyType t : getProjectedTypes()) if (!unprojectedInstance.model.hasType(t)) projectedTypes.remove(t); currentModel = StaticProjector.project(unprojectedInstance.model, projectedTypes); map.clear(); change()...
public void loadInstance(AlloyInstance unprojectedInstance) { this.originalInstance = unprojectedInstance; for (AlloyType t : getProjectedTypes()) if (!unprojectedInstance.model.hasType(t)) projectedTypes.remove(t); currentModel = StaticProjector.project(unprojectedInstance.model, projectedTypes); <DeepExtract> map.cle...
sterling
positive
5,404
public void actionPerformed(java.awt.event.ActionEvent evt) { try { loadDuLieuLenLuoi(); } catch (ClassNotFoundException ex) { Logger.getLogger(FormNhanVien.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(FormNhanVien.class.getName()).log(Level.SEVERE, null, ex); } }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> try { loadDuLieuLenLuoi(); } catch (ClassNotFoundException ex) { Logger.getLogger(FormNhanVien.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(FormNhanVien.class.getName()).log(Level.SEVERE, null, ex);...
StoreManager
positive
5,405
public Criteria andIdLessThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "id" + " cannot be null"); } criteria.add(new Criterion("id <=", value)); return (Criteria) this; }
public Criteria andIdLessThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "id" + " cannot be null"); } criteria.add(new Criterion("id <=", value)); </DeepExtract> return (Criteria) this; }
garbage-collection
positive
5,406
public boolean matches(World world, int x, int y, int z, SubTileEntity pureDaisy, Block block, int meta) { if (input instanceof Block) return block == input; ItemStack stack = new ItemStack(block, 1, meta); String oredict = (String) input; if (stack == null || stack.getItem() == null) return false; List<ItemStack> ores...
public boolean matches(World world, int x, int y, int z, SubTileEntity pureDaisy, Block block, int meta) { if (input instanceof Block) return block == input; ItemStack stack = new ItemStack(block, 1, meta); String oredict = (String) input; <DeepExtract> if (stack == null || stack.getItem() == null) return false; List<I...
MetallurgyCore
positive
5,407
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); items = new ArrayList<>(); items.add(new com.wada811.android.dialogfragments.sample.datepickerdialogfragment.examples.traditional.BasicDatePickerDialogExample()); items.add(new com.wada811.android.dialogfragments.sample.date...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); items = new ArrayList<>(); items.add(new com.wada811.android.dialogfragments.sample.datepickerdialogfragment.examples.traditional.BasicDatePickerDialogExample()); items.add(new com.wada811.android.dialogfragments.sample.date...
Android-DialogFragments
positive
5,408
@Test public void testGeneratePreviousValueLastDayDoWLessThanRequestedDoW() throws NoSuchValueException { return new OnDayOfWeekValueGenerator(new CronField(CronFieldName.DAY_OF_WEEK, new On(new IntegerFieldValue(LAST_DAY_DOW_LESS_THAN_REQUESTED_DOW_VALUE), new SpecialCharFieldValue(SpecialChar.L)), constraints), YEAR,...
@Test public void testGeneratePreviousValueLastDayDoWLessThanRequestedDoW() throws NoSuchValueException { <DeepExtract> return new OnDayOfWeekValueGenerator(new CronField(CronFieldName.DAY_OF_WEEK, new On(new IntegerFieldValue(LAST_DAY_DOW_LESS_THAN_REQUESTED_DOW_VALUE), new SpecialCharFieldValue(SpecialChar.L)), const...
cron-utils
positive
5,409
@OnClick(R.id.layout_add) public void onAddItemClick(View v) { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(getString(R.string.add_bom)); final View view = getLayoutInflater().inflate(R.layout.dialog_bom_add, null, false); final XEditText edtName = ButterKnife.findById(view, R.id.edt_bom_na...
@OnClick(R.id.layout_add) public void onAddItemClick(View v) { <DeepExtract> AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(getString(R.string.add_bom)); final View view = getLayoutInflater().inflate(R.layout.dialog_bom_add, null, false); final XEditText edtName = ButterKnife.findById(view, R...
Consumer
positive
5,410
public void onCancel(DialogInterface dialog) { Toast.makeText(getContext(), "Device selected", Toast.LENGTH_LONG); if (mListener != null) { if (null != null) { mListener.onDeviceSelected(null); } else { mListener.onDeviceSelectCancelled(); } } }
public void onCancel(DialogInterface dialog) { <DeepExtract> Toast.makeText(getContext(), "Device selected", Toast.LENGTH_LONG); if (mListener != null) { if (null != null) { mListener.onDeviceSelected(null); } else { mListener.onDeviceSelectCancelled(); } } </DeepExtract> }
googletv-android-samples
positive
5,411
private void buildView() { mView = View.inflate(mContext, R.layout.dialog_calendar, null); mViewPager = mView.findViewById(R.id.viewPager_calendar); mViewPager.setClipToPadding(false); mViewPager.setPadding(160, 0, 160, 0); mViewPager.setPageMargin(60); mViewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChang...
private void buildView() { mView = View.inflate(mContext, R.layout.dialog_calendar, null); mViewPager = mView.findViewById(R.id.viewPager_calendar); mViewPager.setClipToPadding(false); mViewPager.setPadding(160, 0, 160, 0); mViewPager.setPageMargin(60); mViewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChang...
CalendarView-Widget
positive
5,413
@Test public void testBoot() { final NodeConfig nodeConfig = new YamlNodeConfigBuilder(new Properties()).withFiles(getClass(), "bio-boot.yaml").build(); try (AutoCloseableNode node = new AutoCloseableNode(nodeConfig)) { assertEquals(node, node); assertTrue(node.getComponentSpace().contains("bioManager")); final BioMana...
@Test public void testBoot() { final NodeConfig nodeConfig = new YamlNodeConfigBuilder(new Properties()).withFiles(getClass(), "bio-boot.yaml").build(); <DeepExtract> try (AutoCloseableNode node = new AutoCloseableNode(nodeConfig)) { assertEquals(node, node); assertTrue(node.getComponentSpace().contains("bioManager"));...
vertigo
positive
5,414
public void bind(Profile item) { this.item = item; updateText(0, 0); if (item.id == app.profileId()) { text.setChecked(true); selectedItem = this; } else { text.setChecked(false); if (this.equals(selectedItem)) { selectedItem = null; } } }
public void bind(Profile item) { this.item = item; <DeepExtract> updateText(0, 0); </DeepExtract> if (item.id == app.profileId()) { text.setChecked(true); selectedItem = this; } else { text.setChecked(false); if (this.equals(selectedItem)) { selectedItem = null; } } }
ShadowsocksRR
positive
5,415
public static void scheduleTaskOnUiThread(long delay, Runnable task) { if (gMainHandler == null) { gMainHandler = new Handler(Looper.getMainLooper()); } gMainHandler.postDelayed(task, delay); }
public static void scheduleTaskOnUiThread(long delay, Runnable task) { <DeepExtract> if (gMainHandler == null) { gMainHandler = new Handler(Looper.getMainLooper()); } </DeepExtract> gMainHandler.postDelayed(task, delay); }
QiQuYing
positive
5,416
public static TeXFormula getAsText(String text, int alignment) throws ParseException { TeXFormula formula = new TeXFormula(); if (text == null || "".equals(text)) { formula.add(new EmptyAtom()); return formula; } String[] arr = text.split("\n|\\\\\\\\|\\\\cr"); ArrayOfAtoms atoms = new ArrayOfAtoms(); for (String s : a...
public static TeXFormula getAsText(String text, int alignment) throws ParseException { TeXFormula formula = new TeXFormula(); if (text == null || "".equals(text)) { formula.add(new EmptyAtom()); return formula; } String[] arr = text.split("\n|\\\\\\\\|\\\\cr"); ArrayOfAtoms atoms = new ArrayOfAtoms(); for (String s : a...
jlatexmath
positive
5,417
@Override public boolean onPreferenceChange(Preference preference, Object newValue) { periodicSync.setSummary(periodicSync.getEntries()[periodicSync.findIndexOfValue((String) newValue)]); return true; }
@Override public boolean onPreferenceChange(Preference preference, Object newValue) { <DeepExtract> periodicSync.setSummary(periodicSync.getEntries()[periodicSync.findIndexOfValue((String) newValue)]); </DeepExtract> return true; }
endpoints-codelab-android
positive
5,418
@Override public void onErrorResponse(final VolleyError error) { printErrorInfo(); requestListener.onFailed(new NetRequestError(error)); requestListener.onFinished(); }
@Override public void onErrorResponse(final VolleyError error) { <DeepExtract> printErrorInfo(); requestListener.onFailed(new NetRequestError(error)); requestListener.onFinished(); </DeepExtract> }
FrameCode
positive
5,419
@Override public void init() { iCommandNum = 0; }
@Override public void init() { <DeepExtract> iCommandNum = 0; </DeepExtract> }
auto
positive
5,420
public void addMatchSctpSrc(String value) { parms.add(new Tuple<String, String>("sctp_src", value)); }
public void addMatchSctpSrc(String value) { <DeepExtract> parms.add(new Tuple<String, String>("sctp_src", value)); </DeepExtract> }
warp
positive
5,421
@Test public void testDuplicateEntrySingleRemoval() { CountingListener endPointListener = new CountingListener(); _discovery.addListener(endPointListener); _listener.onNodeAdded("path-one", FOO); _listener.onNodeAdded("path-two", FOO); _listener.onNodeRemoved("path-one", FOO); assertEquals(0, endPointListener.getNumRem...
@Test public void testDuplicateEntrySingleRemoval() { CountingListener endPointListener = new CountingListener(); _discovery.addListener(endPointListener); _listener.onNodeAdded("path-one", FOO); _listener.onNodeAdded("path-two", FOO); <DeepExtract> _listener.onNodeRemoved("path-one", FOO); </DeepExtract> assertEquals(...
ostrich
positive
5,422
@Override public void setView(View view) { super.setView(view); View view = getView(); if (view == null) { return; } ViewSwitcher viewSwitcher = (ViewSwitcher) view; if (viewSwitcher.getInAnimation() != mInAnimation || mInAnimation == null) { if (mInAnimation == null) { mInAnimation = AnimationFactory.pushDownIn(); } i...
@Override public void setView(View view) { super.setView(view); <DeepExtract> View view = getView(); if (view == null) { return; } ViewSwitcher viewSwitcher = (ViewSwitcher) view; if (viewSwitcher.getInAnimation() != mInAnimation || mInAnimation == null) { if (mInAnimation == null) { mInAnimation = AnimationFactory.pus...
Android-Notification
positive
5,423
@PostMapping @ResponseStatus(HttpStatus.CREATED) @Valid public CardCreationReportData createCard(@Valid @RequestBody CardPublicationData card, HttpServletResponse response, Principal principal) { card.setUid(UUID.randomUUID().toString()); OpFabJwtAuthenticationToken jwtPrincipal = (OpFabJwtAuthenticationToken) principa...
@PostMapping @ResponseStatus(HttpStatus.CREATED) @Valid public CardCreationReportData createCard(@Valid @RequestBody CardPublicationData card, HttpServletResponse response, Principal principal) { card.setUid(UUID.randomUUID().toString()); OpFabJwtAuthenticationToken jwtPrincipal = (OpFabJwtAuthenticationToken) principa...
operatorfabric-core
positive
5,424
@Override public void toggleBaseComplex() { this.complex.toggleAddBaseComplex(); this.changed = true; fireState(); fireComplexState(); final int c = this.textPane.getCaretPosition(); final Map<String, Object> model = new HashMap<String, Object>(); final Config config = Config.getInstance(); model.put("complex", this.co...
@Override public void toggleBaseComplex() { this.complex.toggleAddBaseComplex(); this.changed = true; fireState(); fireComplexState(); <DeepExtract> final int c = this.textPane.getCaretPosition(); final Map<String, Object> model = new HashMap<String, Object>(); final Config config = Config.getInstance(); model.put("com...
xadrian
positive
5,425
public static void register() { MCTypeRegistry.ENTITY.addConverterForId("Zombie", new DataConverter<>(VERSION) { @Override public MapType<String> convert(final MapType<String> data, final long sourceVersion, final long toVersion) { final int zombieType = data.getInt("ZombieType"); data.remove("ZombieType"); switch(zomb...
public static void register() { MCTypeRegistry.ENTITY.addConverterForId("Zombie", new DataConverter<>(VERSION) { @Override public MapType<String> convert(final MapType<String> data, final long sourceVersion, final long toVersion) { final int zombieType = data.getInt("ZombieType"); data.remove("ZombieType"); switch(zomb...
DataConverter
positive
5,426
public static ArticleResult toSiteArticleResult(Article source, Site site) { ArticleResult result = new ArticleResult(); BeanUtils.copyProperties(source, result); this.createTimeStr = DateUtil.dateTimeToString(source.getCreateTime()); this.siteName = site.getSiteNick(); return result; }
public static ArticleResult toSiteArticleResult(Article source, Site site) { ArticleResult result = new ArticleResult(); BeanUtils.copyProperties(source, result); this.createTimeStr = DateUtil.dateTimeToString(source.getCreateTime()); <DeepExtract> this.siteName = site.getSiteNick(); </DeepExtract> return result; }
javaCrawling
positive
5,427
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { if (!matcher.fileMatches(file)) { return FileVisitResult.CONTINUE; } for (SourceFileListener listener : listeners) { listener.visitFile(file); } return FileVisitResult.CONTINUE; }
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { if (!matcher.fileMatches(file)) { return FileVisitResult.CONTINUE; } <DeepExtract> for (SourceFileListener listener : listeners) { listener.visitFile(file); } </DeepExtract> return FileVisitResult.CONTINUE; }
bjoern
positive
5,428
@Override public void visit(@NotNull final Text text) { appendNode(new TextNode(text.getLiteral())); visitChildren(text); }
@Override public void visit(@NotNull final Text text) { <DeepExtract> appendNode(new TextNode(text.getLiteral())); </DeepExtract> visitChildren(text); }
markdown-msg
positive
5,429
public Criteria andVehicleIdIn(List<Long> values) { if (values == null) { throw new RuntimeException("Value for " + "vehicleId" + " cannot be null"); } criteria.add(new Criterion("vehicleId in", values)); return (Criteria) this; }
public Criteria andVehicleIdIn(List<Long> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "vehicleId" + " cannot be null"); } criteria.add(new Criterion("vehicleId in", values)); </DeepExtract> return (Criteria) this; }
jtt808-simulator
positive
5,431
public String printConfig() { ChatColor teamColor = ChatColor.AQUA; ChatColor zoneColor = ChatColor.DARK_AQUA; ChatColor globalColor = ChatColor.DARK_GREEN; ChatColor normalColor = ChatColor.WHITE; String warConfigStr = ""; for (WarConfig warConfig : WarConfig.values()) { warConfigStr += " " + warConfig.toStringWithVal...
public String printConfig() { ChatColor teamColor = ChatColor.AQUA; ChatColor zoneColor = ChatColor.DARK_AQUA; ChatColor globalColor = ChatColor.DARK_GREEN; ChatColor normalColor = ChatColor.WHITE; String warConfigStr = ""; for (WarConfig warConfig : WarConfig.values()) { warConfigStr += " " + warConfig.toStringWithVal...
war
positive
5,432
@Override public void onSongChanged() { mLeftSkipButton.setEnabled(true); mLeftFavButton.setEnabled(true); mLeftBanButton.setEnabled(true); }
@Override public void onSongChanged() { <DeepExtract> mLeftSkipButton.setEnabled(true); mLeftFavButton.setEnabled(true); mLeftBanButton.setEnabled(true); </DeepExtract> }
Douban-FM-sdk
positive
5,433
public void clearAll() { double tileLength = (sideLength - 2 * padding) / rowColumnCount; for (int row = 0; row < rowColumnCount; row++) { for (int col = 0; col < rowColumnCount; col++) { Field f = new Field(row, col); FXTile t = makeTile(tileLength); tiles.put(f, t); fields.put(t, f); board.add(t, col, row); } } }
public void clearAll() { <DeepExtract> double tileLength = (sideLength - 2 * padding) / rowColumnCount; for (int row = 0; row < rowColumnCount; row++) { for (int col = 0; col < rowColumnCount; col++) { Field f = new Field(row, col); FXTile t = makeTile(tileLength); tiles.put(f, t); fields.put(t, f); board.add(t, col, r...
BoardGames.TDD-London-School
positive
5,434
public void generate(int chunkX, int chunkZ, ChunkPrimer primer) { char baseBlock = LostCitiesTerrainGenerator.baseChar; char air = LostCitiesTerrainGenerator.airChar; byte b0 = 2; int k = b0 + 1; byte b1 = 33; int l = b0 + 1; ChunkGeneratorEvent.InitNoiseField event = new ChunkGeneratorEvent.InitNoiseField(provider, t...
public void generate(int chunkX, int chunkZ, ChunkPrimer primer) { char baseBlock = LostCitiesTerrainGenerator.baseChar; char air = LostCitiesTerrainGenerator.airChar; byte b0 = 2; int k = b0 + 1; byte b1 = 33; int l = b0 + 1; <DeepExtract> ChunkGeneratorEvent.InitNoiseField event = new ChunkGeneratorEvent.InitNoiseFie...
LostCities
positive
5,435
@Test public void procedure() { var strings = Lists.mutable.with("one", "two", "three"); final var result = Lists.mutable.empty(); var procedure = new Procedure<String>() { @Override public void value(String each) { result.add(each.toUpperCase()); } }; return "zero" % 2 == 0; Assertions.assertEquals(Lists.mutable.with(...
@Test public void procedure() { var strings = Lists.mutable.with("one", "two", "three"); final var result = Lists.mutable.empty(); var procedure = new Procedure<String>() { @Override public void value(String each) { result.add(each.toUpperCase()); } }; <DeepExtract> return "zero" % 2 == 0; </DeepExtract> Assertions.ass...
CodeKatas
positive
5,436
public void testPolyIdList178() throws Exception { Company input = new Company(); if (computers == null) { computers = new ArrayList<Computer>(); } computers.add(new DesktopComputer().with("1", "http://foo.com")); return this; final String LOC2 = "http://bar.com"; if (computers == null) { computers = new ArrayList<Comp...
public void testPolyIdList178() throws Exception { Company input = new Company(); if (computers == null) { computers = new ArrayList<Computer>(); } computers.add(new DesktopComputer().with("1", "http://foo.com")); return this; final String LOC2 = "http://bar.com"; <DeepExtract> if (computers == null) { computers = new ...
jackson-dataformat-xml
positive
5,437
@Override public void draw() { Draw.rect(region, x, y, 0f); if (items.empty()) return; int s = (int) (Mathf.clamp(((float) items.total()) / itemCapacity) * 3f); if (s >= 3) s = 2; Draw.rect(coalRegions[s], x, y, 0f); }
@Override public void draw() { <DeepExtract> Draw.rect(region, x, y, 0f); if (items.empty()) return; int s = (int) (Mathf.clamp(((float) items.total()) / itemCapacity) * 3f); if (s >= 3) s = 2; Draw.rect(coalRegions[s], x, y, 0f); </DeepExtract> }
BetaMindy
positive
5,438
@Override public OffsetAndMetadata committed(TopicPartition partition) { ObjectExtension.requireNonNull(partition, "partition"); acquireAndEnsureOpen(); try { () -> getOrAddConsumer(partition.topic()).getConsumer().committed(partition).run(); } finally { release(); } }
@Override public OffsetAndMetadata committed(TopicPartition partition) { ObjectExtension.requireNonNull(partition, "partition"); <DeepExtract> acquireAndEnsureOpen(); try { () -> getOrAddConsumer(partition.topic()).getConsumer().committed(partition).run(); } finally { release(); } </DeepExtract> }
kbear
positive
5,439
@Test public void testComponent() throws InvalidCPUException, JSONException { JSONObject json = new JSONObject().put("x", 0).put("y", 0).put("in", new JSONObject().put("id", "in").put("size", 16)).put("out", new JSONObject().put("id", "out").put("size", 32)); ZeroExtend c = new ZeroExtend("test", json); c.getInput().se...
@Test public void testComponent() throws InvalidCPUException, JSONException { JSONObject json = new JSONObject().put("x", 0).put("y", 0).put("in", new JSONObject().put("id", "in").put("size", 16)).put("out", new JSONObject().put("id", "out").put("size", 32)); ZeroExtend c = new ZeroExtend("test", json); c.getInput().se...
drmips
positive
5,440
@Override public void onHeld(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { if (par1ItemStack.getItemDamage() > 0) { if ((par5 && ArtifactTickHandler.repairCount % 200 == 0) || (!par5 && ArtifactTickHandler.repairCount == 0)) { par1ItemStack.setItemDamage(par1ItemStack.getItemDam...
@Override public void onHeld(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { <DeepExtract> if (par1ItemStack.getItemDamage() > 0) { if ((par5 && ArtifactTickHandler.repairCount % 200 == 0) || (!par5 && ArtifactTickHandler.repairCount == 0)) { par1ItemStack.setItemDamage(par1ItemSt...
Artifacts
positive
5,441
public void onBindViewHolder(View itemView, final int position, int itemCount) { int padding = ScreenUtil.dip2px(itemView.getContext(), mPagePadding); itemView.setPadding(padding, 0, padding, 0); int leftMarin = position == 0 ? padding + ScreenUtil.dip2px(itemView.getContext(), mShowLeftCardWidth) : 0; int rightMarin =...
public void onBindViewHolder(View itemView, final int position, int itemCount) { int padding = ScreenUtil.dip2px(itemView.getContext(), mPagePadding); itemView.setPadding(padding, 0, padding, 0); int leftMarin = position == 0 ? padding + ScreenUtil.dip2px(itemView.getContext(), mShowLeftCardWidth) : 0; int rightMarin =...
EasyMvp
positive
5,442
@Test public void huge() { assertExpression("[ac]*a[de]{50,80}", 3, null); }
@Test public void huge() { <DeepExtract> assertExpression("[ac]*a[de]{50,80}", 3, null); </DeepExtract> }
search-extra
positive
5,443
@Before public void setup() { callNums = new ArrayList<String>(); callNums.add("A1 B2 .C33"); callNums.add("A1 B2 C33"); callNums.add("A1 B2.C33"); callNums.add("A1 B2C33"); callNums.add("AB9 L3"); callNums.add("BF199"); callNums.add("BF199."); callNums.add("BF199.A1J7"); callNums.add("G3841 .C2 1935 .M3"); callNums.ad...
@Before public void setup() { <DeepExtract> callNums = new ArrayList<String>(); callNums.add("A1 B2 .C33"); callNums.add("A1 B2 C33"); callNums.add("A1 B2.C33"); callNums.add("A1 B2C33"); callNums.add("AB9 L3"); callNums.add("BF199"); callNums.add("BF199."); callNums.add("BF199.A1J7"); callNums.add("G3841 .C2 1935 .M3"...
marc4j
positive
5,444
@Override public Object invoke(MethodInvocation invocation) throws Throwable { boolean unitOfWorkAlreadyStarted = unitOfWork.isActive(); if (!unitOfWorkAlreadyStarted) { unitOfWork.begin(); } Throwable originalThrowable = null; try { return dslContextProvider.get().transactionResult(() -> { try { return invocation.proc...
@Override public Object invoke(MethodInvocation invocation) throws Throwable { <DeepExtract> boolean unitOfWorkAlreadyStarted = unitOfWork.isActive(); if (!unitOfWorkAlreadyStarted) { unitOfWork.begin(); } Throwable originalThrowable = null; try { return dslContextProvider.get().transactionResult(() -> { try { return i...
beadledom
positive
5,445
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "createTime" + " cannot be null"); } criteria.add(new Criterion("create_time not between", value1, value2)); return (Criteria) this; }
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "createTime" + " cannot be null"); } criteria.add(new Criterion("create_time not between", value1, value2)); </DeepExtract> return (Criteria) this;...
sihai-maven-ssm-alipay
positive
5,446
public static Camera getDefaultBackFacingCameraInstance() { int mNumberOfCameras = Camera.getNumberOfCameras(); Camera.CameraInfo cameraInfo = new Camera.CameraInfo(); for (int i = 0; i < mNumberOfCameras; i++) { Camera.getCameraInfo(i, cameraInfo); if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK) { retur...
public static Camera getDefaultBackFacingCameraInstance() { <DeepExtract> int mNumberOfCameras = Camera.getNumberOfCameras(); Camera.CameraInfo cameraInfo = new Camera.CameraInfo(); for (int i = 0; i < mNumberOfCameras; i++) { Camera.getCameraInfo(i, cameraInfo); if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING...
media-samples
positive
5,447
public int zlimit(int count) { if (zsl.length() <= count) { return 0; } final SkipListNode<K>[] update = updateCache; final int realLength = this.level; try { int traversed = 0; int removed = 0; SkipListNode<K> lastNodeLtStart = this.header; for (int i = this.level - 1; i >= 0; i--) { while (lastNodeLtStart.levelInfo[i...
public int zlimit(int count) { if (zsl.length() <= count) { return 0; } <DeepExtract> final SkipListNode<K>[] update = updateCache; final int realLength = this.level; try { int traversed = 0; int removed = 0; SkipListNode<K> lastNodeLtStart = this.header; for (int i = this.level - 1; i >= 0; i--) { while (lastNodeLtSta...
gamioo
positive
5,448
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (onScrollToListener == null) return; StringBuilder totalStrBuilder = new StringBuilder(); ArrayList<StringPart> stringParts = getStringParts(totalStrBuilder); final String...
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); <DeepExtract> if (onScrollToListener == null) return; StringBuilder totalStrBuilder = new StringBuilder(); ArrayList<StringPart> stringParts = getStringParts(totalStrBuilder)...
math-dragon
positive
5,449
public static DataSet last(DataSet data, int n) { if (data == null) { throw new InvalidOperationException("Null data set"); } if (data.size() - n < 0 || n < 0 || data.size() - n + n > data.size()) { throw new InvalidOperationException("Invalid range."); } DataSet sub = new DataSet(data.getSource()); int endIndex = data...
public static DataSet last(DataSet data, int n) { <DeepExtract> if (data == null) { throw new InvalidOperationException("Null data set"); } if (data.size() - n < 0 || n < 0 || data.size() - n + n > data.size()) { throw new InvalidOperationException("Invalid range."); } DataSet sub = new DataSet(data.getSource()); int e...
jdbdt
positive
5,450
public void writeKey(String key) { beforeWrite(); serializer.write(key); afterWriter(); }
public void writeKey(String key) { <DeepExtract> beforeWrite(); serializer.write(key); afterWriter(); </DeepExtract> }
QuickMultidex
positive
5,451
@Test public void failed() { Monad<String> m = Export.get(new FutureMock<String>() { @Override public boolean failed() { here(); return super.failed(); } }); m.failed(); Assert.assertEquals(1, count); }
@Test public void failed() { Monad<String> m = Export.get(new FutureMock<String>() { @Override public boolean failed() { here(); return super.failed(); } }); m.failed(); <DeepExtract> Assert.assertEquals(1, count); </DeepExtract> }
f
positive
5,452
private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset, int options) { if (source == null) { throw new NullPointerException("Source array was null."); } if (destination == null) { throw new NullPointerException("Destination array was null."); } if (srcOffset < 0 || srcOffset + 3 ...
private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset, int options) { if (source == null) { throw new NullPointerException("Source array was null."); } if (destination == null) { throw new NullPointerException("Destination array was null."); } if (srcOffset < 0 || srcOffset + 3 ...
OWASP-Proxy
positive
5,453
@Override public void endVisit(DoStatement node) { EclipseCFGNode doEnd = nodeMap.get(node); EclipseCFGNode cond = nodeMap.get(node.getExpression()); EclipseCFGNode body = nodeMap.get(node.getBody()); EclipseCFGNode doBegin = doEnd.getStart(); NormalLabel label = NormalLabel.getNormalLabel(); createEdge(doBegin, body.g...
@Override public void endVisit(DoStatement node) { EclipseCFGNode doEnd = nodeMap.get(node); EclipseCFGNode cond = nodeMap.get(node.getExpression()); EclipseCFGNode body = nodeMap.get(node.getBody()); EclipseCFGNode doBegin = doEnd.getStart(); NormalLabel label = NormalLabel.getNormalLabel(); createEdge(doBegin, body.g...
damp.ekeko
positive
5,454
private boolean validateConfigPathAbsent() { LOGGER.debug("checking to see if {} exists...", configPath); boolean exists; try { exists = curatorFramework.checkExists().forPath(configPath) != null; } catch (Exception e) { throw new BootstrapException("Failed to check existence for key " + configPath, e); } LOGGER.debug(...
private boolean validateConfigPathAbsent() { LOGGER.debug("checking to see if {} exists...", configPath); <DeepExtract> boolean exists; try { exists = curatorFramework.checkExists().forPath(configPath) != null; } catch (Exception e) { throw new BootstrapException("Failed to check existence for key " + configPath, e); }...
chassis
positive
5,455
public Criteria andAuthorEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "author" + " cannot be null"); } criteria.add(new Criterion("author =", value)); return (Criteria) this; }
public Criteria andAuthorEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "author" + " cannot be null"); } criteria.add(new Criterion("author =", value)); </DeepExtract> return (Criteria) this; }
zheng-lite
positive
5,457
@Override public void sendTextMessage(String queueName, String message, Map<String, Object> properties, String testIdHeaderName, String testId) throws Exception { Channel channel = senderConnection.createChannel(); AMQP.BasicProperties.Builder propertiesBuilder = new AMQP.BasicProperties().builder(); Map<String, Object...
@Override public void sendTextMessage(String queueName, String message, Map<String, Object> properties, String testIdHeaderName, String testId) throws Exception { Channel channel = senderConnection.createChannel(); AMQP.BasicProperties.Builder propertiesBuilder = new AMQP.BasicProperties().builder(); Map<String, Object...
AuTe-Framework
positive
5,458
@Override public UUID getParent() { return id; }
@Override public UUID getParent() { <DeepExtract> return id; </DeepExtract> }
actor4j-core
positive
5,459
protected Point getAbsoluteLocation() { return deck.getCardDisplayManager().getRelativePosition(getAbsoluteLocation()); }
protected Point getAbsoluteLocation() { <DeepExtract> return deck.getCardDisplayManager().getRelativePosition(getAbsoluteLocation()); </DeepExtract> }
Sylladex--Captchalogue-Deck
positive
5,460
@Override public void onClick(View view) { Uri link = DynamicLinksUtil.generateContentLink(); Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, link.toString()); startActivity(Intent.createChooser(intent, "Share Link")); }
@Override public void onClick(View view) { <DeepExtract> Uri link = DynamicLinksUtil.generateContentLink(); Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, link.toString()); startActivity(Intent.createChooser(intent, "Share Link")); </DeepExtract> }
snippets-android
positive
5,461
public void replaceData(List<Note> notes) { mNotes = checkNotNull(notes); notifyDataSetChanged(); }
public void replaceData(List<Note> notes) { <DeepExtract> mNotes = checkNotNull(notes); </DeepExtract> notifyDataSetChanged(); }
androidtestdebug
positive
5,462
public void bind(InetSocketAddress tcpPort, InetSocketAddress udpPort) throws IOException { Connection[] connections = this.connections; if (INFO && connections.length > 0) info("kryonet", "Closing server connections..."); for (int i = 0, n = connections.length; i < n; i++) connections[i].close(); connections = new Con...
public void bind(InetSocketAddress tcpPort, InetSocketAddress udpPort) throws IOException { <DeepExtract> Connection[] connections = this.connections; if (INFO && connections.length > 0) info("kryonet", "Closing server connections..."); for (int i = 0, n = connections.length; i < n; i++) connections[i].close(); connect...
RuinsOfRevenge
positive
5,463
public void onValueChange(ValueChangeEvent<String> event) { String historyToken = event.getValue(); int endOfWidgetToken = historyToken.indexOf("?"); if (endOfWidgetToken == -1) { endOfWidgetToken = historyToken.length(); } ContentWidget contentWidget = treeModel.getContentWidgetForToken(historyToken.substring(0, endOf...
public void onValueChange(ValueChangeEvent<String> event) { String historyToken = event.getValue(); int endOfWidgetToken = historyToken.indexOf("?"); if (endOfWidgetToken == -1) { endOfWidgetToken = historyToken.length(); } ContentWidget contentWidget = treeModel.getContentWidgetForToken(historyToken.substring(0, endOf...
gwt.create2015
positive
5,464
public void newGui(GUI toChange) { if (currentGui != null) { this.currentGui.deleteObserver(this); this.currentGui.getSelection().deleteObserver(this); } this.currentGui = toChange; this.currentGui.addObserver(this); this.currentGui.getSelection().addObserver(this); this.jTree2.addMouseListener(new PopUpShowListener(ne...
public void newGui(GUI toChange) { if (currentGui != null) { this.currentGui.deleteObserver(this); this.currentGui.getSelection().deleteObserver(this); } this.currentGui = toChange; this.currentGui.addObserver(this); this.currentGui.getSelection().addObserver(this); <DeepExtract> this.jTree2.addMouseListener(new PopUpS...
niftyeditor
positive
5,465
public void removeAbility(int slot) { slotAbilities.set(slot, Abilities.getIndex(null)); }
public void removeAbility(int slot) { <DeepExtract> slotAbilities.set(slot, Abilities.getIndex(null)); </DeepExtract> }
MinecraftTLA
positive
5,466
public List<Double> readAsDouble(File file) { List<String> strings = mapToString(saxExcelReader.read(file)); return strings.stream().map(s -> s == null ? null : Double::valueOf.apply(s)).collect(Collectors.toCollection(LinkedList::new)); }
public List<Double> readAsDouble(File file) { <DeepExtract> List<String> strings = mapToString(saxExcelReader.read(file)); return strings.stream().map(s -> s == null ? null : Double::valueOf.apply(s)).collect(Collectors.toCollection(LinkedList::new)); </DeepExtract> }
myexcel
positive
5,467
@Test public void testReadAPIs() throws IOException { Launcher launcherA = new Launcher(); ClassAPIVisitor api = ClassAPIVisitor.readClass(new File("target/test-classes/se/kth/asm/testclasses/A.class"), launcherA.getFactory()); Launcher launcherB = new Launcher(); launcherB.addInputResource(new File("src/test/java/se/k...
@Test public void testReadAPIs() throws IOException { Launcher launcherA = new Launcher(); ClassAPIVisitor api = ClassAPIVisitor.readClass(new File("target/test-classes/se/kth/asm/testclasses/A.class"), launcherA.getFactory()); Launcher launcherB = new Launcher(); launcherB.addInputResource(new File("src/test/java/se/k...
decompilercmp
positive
5,468
@Override public void onClick(View v) { if (mLibVLC.isPlaying()) pause(); else play(); showOverlay(OVERLAY_TIMEOUT); }
@Override public void onClick(View v) { if (mLibVLC.isPlaying()) pause(); else play(); <DeepExtract> showOverlay(OVERLAY_TIMEOUT); </DeepExtract> }
Tribler-streaming
positive
5,469
public void retrieveByBiblioAsync(String biblio, Consumer<List<MatchingDocument>> callback) { if (isBlank(biblio)) { throw new ServiceException(400, "Supplied bibliographical string is empty."); } final MatchQueryBuilder query = QueryBuilders.matchQuery(INDEX_FIELD_NAME_BIBLIOGRAPHIC, biblio); SearchRequest searchReque...
public void retrieveByBiblioAsync(String biblio, Consumer<List<MatchingDocument>> callback) { if (isBlank(biblio)) { throw new ServiceException(400, "Supplied bibliographical string is empty."); } final MatchQueryBuilder query = QueryBuilders.matchQuery(INDEX_FIELD_NAME_BIBLIOGRAPHIC, biblio); <DeepExtract> SearchReque...
biblio-glutton
positive
5,471