before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Test public void shouldReportNumberOfFoundExamplesWhenValuesExhausted() { int numberOfExamples = 3; strategy = new Strategy(Configuration.defaultPRNG(0), numberOfExamples, 0, 0, 10, reporter, guidance); return new TheoryRunner<>(strategy, arbitrary().pick(1, 2, 1, 1, 1).assuming(i -> i == 2), x -> x, a -> a.toString()...
@Test public void shouldReportNumberOfFoundExamplesWhenValuesExhausted() { int numberOfExamples = 3; strategy = new Strategy(Configuration.defaultPRNG(0), numberOfExamples, 0, 0, 10, reporter, guidance); <DeepExtract> return new TheoryRunner<>(strategy, arbitrary().pick(1, 2, 1, 1, 1).assuming(i -> i == 2), x -> x, a -...
QuickTheories
positive
5,033
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { try { setString(parameterIndex, CharStreams.toString(value)); } catch (IOException e) { throw new SQLException(e); } }
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { <DeepExtract> try { setString(parameterIndex, CharStreams.toString(value)); } catch (IOException e) { throw new SQLException(e); } </DeepExtract> }
cassandra-jdbc-driver
positive
5,034
public void uncompress() { data.position(0); byte[] buffer = new byte[8192]; IoBuffer tmp = IoBuffer.allocate(0); tmp.setAutoExpand(true); try (InflaterInputStream inflater = new InflaterInputStream(data.asInputStream())) { while (inflater.available() > 0) { int decompressed = inflater.read(buffer); if (decompressed <=...
public void uncompress() { data.position(0); byte[] buffer = new byte[8192]; IoBuffer tmp = IoBuffer.allocate(0); tmp.setAutoExpand(true); try (InflaterInputStream inflater = new InflaterInputStream(data.asInputStream())) { while (inflater.available() > 0) { int decompressed = inflater.read(buffer); if (decompressed <=...
red5-server
positive
5,035
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (mList != null) { return; } View root = getView(); if (root == null) { throw new IllegalStateException("Content view not yet created"); } if (root instanceof ExpandableListView) { mList = (ExpandableList...
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); <DeepExtract> if (mList != null) { return; } View root = getView(); if (root == null) { throw new IllegalStateException("Content view not yet created"); } if (root instanceof ExpandableListView) { mList = (...
PathfinderOpenReference
positive
5,036
@Override public void write(JsonValue value) { requireNonNull(value, "value"); if (alreadyClosed) { throw new IllegalStateException(Message.thatWriterHasBeenAlreadyClosed()); } if (alreadyWritten) { throw new IllegalStateException(Message.thatWriterHasAlreadyWritten()); } alreadyWritten = true; generator.write(value); ...
@Override public void write(JsonValue value) { requireNonNull(value, "value"); <DeepExtract> if (alreadyClosed) { throw new IllegalStateException(Message.thatWriterHasBeenAlreadyClosed()); } if (alreadyWritten) { throw new IllegalStateException(Message.thatWriterHasAlreadyWritten()); } </DeepExtract> alreadyWritten = t...
joy
positive
5,037
public String getWhenConditionString() { StringBuilder sb = new StringBuilder(512); boolean isFirst = true; for (Entry<String, MatchPair> entry : whenCondition.entrySet()) { String keyName = entry.getKey(); MatchPair p = entry.getValue(); @SuppressWarnings("unchecked") Set<String>[] setArray = new Set[] { p.matches, p....
public String getWhenConditionString() { StringBuilder sb = new StringBuilder(512); boolean isFirst = true; for (Entry<String, MatchPair> entry : whenCondition.entrySet()) { String keyName = entry.getKey(); MatchPair p = entry.getValue(); @SuppressWarnings("unchecked") Set<String>[] setArray = new Set[] { p.matches, p....
dubbo-admin
positive
5,038
public void make2d(Chart chart) { chart.getView().setViewPositionMode(ViewPositionMode.TOP); chart.getView().getCamera().setViewportMode(ViewportMode.STRETCH_TO_FILL); IAxeLayout axe = chart.getAxeLayout(); axe.setXAxeLabel("time"); axe.setYAxeLabel("freq"); axe.setZAxeLabel(""); axe.setXTickRenderer(new ElapsedTimeTic...
public void make2d(Chart chart) { chart.getView().setViewPositionMode(ViewPositionMode.TOP); chart.getView().getCamera().setViewportMode(ViewportMode.STRETCH_TO_FILL); <DeepExtract> IAxeLayout axe = chart.getAxeLayout(); axe.setXAxeLabel("time"); axe.setYAxeLabel("freq"); axe.setZAxeLabel(""); axe.setXTickRenderer(new ...
vocobox
positive
5,040
public Criteria andTrademarkSmallLabel3NotLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "trademarkSmallLabel3" + " cannot be null"); } criteria.add(new Criterion("trademark_small_label_3 not like", value)); return (Criteria) this; }
public Criteria andTrademarkSmallLabel3NotLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "trademarkSmallLabel3" + " cannot be null"); } criteria.add(new Criterion("trademark_small_label_3 not like", value)); </DeepExtract> return (Criteria) this; }
uccn
positive
5,042
@Override public void testAfterMove() { if (getDiscardStack().isEmpty() && !getMainStack().isEmpty()) { recordList.addToLastEntry(getMainStack().getTopCard(), getMainStack()); moveToStack(getMainStack().getTopCard(), stacks[8], OPTION_NO_RECORD); } for (int i = 0; i < 4; i++) { if (stacks[4 + i].isEmpty()) { continue; ...
@Override public void testAfterMove() { if (getDiscardStack().isEmpty() && !getMainStack().isEmpty()) { recordList.addToLastEntry(getMainStack().getTopCard(), getMainStack()); moveToStack(getMainStack().getTopCard(), stacks[8], OPTION_NO_RECORD); } <DeepExtract> for (int i = 0; i < 4; i++) { if (stacks[4 + i].isEmpty()...
Simple-Solitaire
positive
5,043
@Override public void act() { currentState = ControlState.MANUAL; Translation2d translationalInput = new Translation2d(input.x(), input.y()); double inputMagnitude = translationalInput.norm(); double threshold = Math.toRadians(10.0); if (Math.abs(translationalInput.direction().distance(translationalInput.direction().ne...
@Override public void act() { currentState = ControlState.MANUAL; <DeepExtract> Translation2d translationalInput = new Translation2d(input.x(), input.y()); double inputMagnitude = translationalInput.norm(); double threshold = Math.toRadians(10.0); if (Math.abs(translationalInput.direction().distance(translationalInput....
2019DeepSpace
positive
5,045
@Override public void init() { if (mInsertableObjectStroke.getPoints() == null || mInsertableObjectStroke.getPoints().size() <= 3) { return; } List<StylusPoint> list = mInsertableObjectStroke.getPoints(); float mX = 0; float mY = 0; int index = 0; HWPoint point; HWPoint pointLast; double curWidth = 0; double curDis = 0...
@Override public void init() { if (mInsertableObjectStroke.getPoints() == null || mInsertableObjectStroke.getPoints().size() <= 3) { return; } <DeepExtract> List<StylusPoint> list = mInsertableObjectStroke.getPoints(); float mX = 0; float mY = 0; int index = 0; HWPoint point; HWPoint pointLast; double curWidth = 0; dou...
commondraw
positive
5,046
@Override public void cancel() { mCloseFromCancel = true; mConfirmButton.startAnimation(mOverlayOutAnim); mDialogView.startAnimation(mModalOutAnim); }
@Override public void cancel() { <DeepExtract> mCloseFromCancel = true; mConfirmButton.startAnimation(mOverlayOutAnim); mDialogView.startAnimation(mModalOutAnim); </DeepExtract> }
jjjPlus
positive
5,047
public void read(TProtocol iprot) throws TException { iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch(field.id) { case 1: if (field.type == TType.STRING) { this.symbol = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; c...
public void read(TProtocol iprot) throws TException { <DeepExtract> </DeepExtract> iprot.readStructBegin(); <DeepExtract> </DeepExtract> while (true) { <DeepExtract> </DeepExtract> field = iprot.readFieldBegin(); <DeepExtract> </DeepExtract> if (field.type == TType.STOP) { <DeepExtract> </DeepExtract> break; <DeepExtra...
hadoop-book
positive
5,048
public void setDrawerItem(int position, IDrawerItem drawerItem) { mDrawerItems.set(position - getHeaderItemCount(), drawerItem); if (!mTypeInstances.containsKey(drawerItem.getType())) { mTypeIds.add(drawerItem.getType()); mTypeInstances.put(drawerItem.getType(), drawerItem); } notifyItemChanged(position); }
public void setDrawerItem(int position, IDrawerItem drawerItem) { mDrawerItems.set(position - getHeaderItemCount(), drawerItem); <DeepExtract> if (!mTypeInstances.containsKey(drawerItem.getType())) { mTypeIds.add(drawerItem.getType()); mTypeInstances.put(drawerItem.getType(), drawerItem); } </DeepExtract> notifyItemCha...
MaterialDrawer-Xamarin
positive
5,049
RestApiRequest<List<LiquidationOrder>> getLiquidationOrders(String symbol, Long startTime, Long endTime, Integer limit) { RestApiRequest<List<LiquidationOrder>> request = new RestApiRequest<>(); UrlParamsBuilder builder = UrlParamsBuilder.build().putToUrl("symbol", symbol).putToUrl("startTime", startTime).putToUrl("end...
RestApiRequest<List<LiquidationOrder>> getLiquidationOrders(String symbol, Long startTime, Long endTime, Integer limit) { RestApiRequest<List<LiquidationOrder>> request = new RestApiRequest<>(); UrlParamsBuilder builder = UrlParamsBuilder.build().putToUrl("symbol", symbol).putToUrl("startTime", startTime).putToUrl("end...
Binance_Futures_Java
positive
5,050
public void testTypeOfStringProperty() { assertTypeOfExpression("", "stringProperty", "java.lang.String"); }
public void testTypeOfStringProperty() { <DeepExtract> assertTypeOfExpression("", "stringProperty", "java.lang.String"); </DeepExtract> }
idea-concordion-support
positive
5,051
public List<List<Integer>> subsets(int[] nums) { LinkedList<List<Integer>> result = new LinkedList<List<Integer>>(); LinkedList<Integer> answer = new LinkedList<Integer>(); result.add(answer); if (0 == nums.length) return; answer.add(nums[0]); LinkedList<Integer> tmp = new LinkedList<Integer>(); for (int i = 0; i < ans...
public List<List<Integer>> subsets(int[] nums) { LinkedList<List<Integer>> result = new LinkedList<List<Integer>>(); LinkedList<Integer> answer = new LinkedList<Integer>(); result.add(answer); <DeepExtract> if (0 == nums.length) return; answer.add(nums[0]); LinkedList<Integer> tmp = new LinkedList<Integer>(); for (int ...
OnlineJudge-Solutions
positive
5,052
@Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { if (!(urlConnection instanceof HttpURLConnection)) { return null; } HttpURLConnection httpConnection = (HttpURLConnection) urlConnection; String requestMethod = httpConnection.getRequestMethod(); String key; try { MessageDigest...
@Override public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { if (!(urlConnection instanceof HttpURLConnection)) { return null; } HttpURLConnection httpConnection = (HttpURLConnection) urlConnection; String requestMethod = httpConnection.getRequestMethod(); String key; try { MessageDigest...
cc-calc
positive
5,053
@Override public boolean succeedWithStatusWord(APDU apdu, short sw) throws ServiceException { if (apdu.getCurrentState() < APDU.STATE_INITIAL) ServiceException.throwIt(ServiceException.CANNOT_ACCESS_OUT_COMMAND); if (apdu.getCurrentState() < APDU.STATE_INITIAL) ServiceException.throwIt(ServiceException.CANNOT_ACCESS_OU...
@Override public boolean succeedWithStatusWord(APDU apdu, short sw) throws ServiceException { if (apdu.getCurrentState() < APDU.STATE_INITIAL) ServiceException.throwIt(ServiceException.CANNOT_ACCESS_OUT_COMMAND); if (apdu.getCurrentState() < APDU.STATE_INITIAL) ServiceException.throwIt(ServiceException.CANNOT_ACCESS_OU...
jcardsim
positive
5,055
@Override public void onPause() { super.onPause(); borderView.getBorderViewDelegate().setBorderVisibilityChangedListener(null); }
@Override public void onPause() { super.onPause(); <DeepExtract> borderView.getBorderViewDelegate().setBorderVisibilityChangedListener(null); </DeepExtract> }
LSPosed
positive
5,056
protected String getString(QName name) { String namespaceURI = name.getNamespaceURI(); return reader.getAttributeValue(XMLConstants.NULL_NS_URI.equals(namespaceURI) ? null : namespaceURI, name.getLocalPart()); }
protected String getString(QName name) { <DeepExtract> String namespaceURI = name.getNamespaceURI(); return reader.getAttributeValue(XMLConstants.NULL_NS_URI.equals(namespaceURI) ? null : namespaceURI, name.getLocalPart()); </DeepExtract> }
llrp4j
positive
5,057
String translateText(String url, String content) throws Exception { InputStream is = null; URL urltoAccess = new URL(url); HttpURLConnection conn = (HttpURLConnection) urltoAccess.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Accept", "text/plain"); conn.setRequestProperty("Content-Type", "t...
String translateText(String url, String content) throws Exception { InputStream is = null; URL urltoAccess = new URL(url); HttpURLConnection conn = (HttpURLConnection) urltoAccess.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Accept", "text/plain"); conn.setRequestProperty("Content-Type", "t...
Asynchronous-Android-Programming
positive
5,058
@Override @NotForUIThread public synchronized void clear() { boolean success = true; if (mCacheLocation.exists()) { final File[] files = mCacheLocation.listFiles(); if (files != null) { for (File f : files) { if (f.isFile()) { success = success && f.delete(); } } } } return success; }
@Override @NotForUIThread public synchronized void clear() { <DeepExtract> boolean success = true; if (mCacheLocation.exists()) { final File[] files = mCacheLocation.listFiles(); if (files != null) { for (File f : files) { if (f.isFile()) { success = success && f.delete(); } } } } return success; </DeepExtract> }
kraken
positive
5,059
@Override public void onDismiss(DialogInterface dialog) { mSaveKeyIntentConfirmationInProgress = false; }
@Override public void onDismiss(DialogInterface dialog) { <DeepExtract> mSaveKeyIntentConfirmationInProgress = false; </DeepExtract> }
otp-authenticator-android
positive
5,060
@Override public void showHistoryData(List<HistoryData> historyDataList) { if (historyDataList == null && historyDataList.size() <= 0) { setHistoryTvStatus(true); return; } mClearAll.setEnabled(!false); if (false) { setHistoryTvStatus(R.color.search_grey_gone, R.drawable.ic_clear_all_gone); } else { setHistoryTvStatus(...
@Override public void showHistoryData(List<HistoryData> historyDataList) { if (historyDataList == null && historyDataList.size() <= 0) { setHistoryTvStatus(true); return; } <DeepExtract> mClearAll.setEnabled(!false); if (false) { setHistoryTvStatus(R.color.search_grey_gone, R.drawable.ic_clear_all_gone); } else { setHi...
DavyWanAndroid
positive
5,061
@Override public void onConfigured(@NonNull CameraCaptureSession session) { if (mCamera == null) { return; } mCaptureSession = session; if (mAutoFocus) { int[] modes = mCameraCharacteristics.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES); if (modes == null || modes.length == 0 || (modes.length == 1 && modes[0] =...
@Override public void onConfigured(@NonNull CameraCaptureSession session) { if (mCamera == null) { return; } mCaptureSession = session; if (mAutoFocus) { int[] modes = mCameraCharacteristics.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES); if (modes == null || modes.length == 0 || (modes.length == 1 && modes[0] =...
MediaCodec
positive
5,062
private void retrieveMeals() { Calendar now = Calendar.getInstance(); now.setTimeInMillis(System.currentTimeMillis()); mDate = now.getTime(); mToday = new Day(mDate); Date firstDate = DateUtils.getFirstTimeOfDay(now.getTime()); Date lastDate = DateUtils.getLastTimeOfDay(now.getTime()); mGetMealListForDate.setDate(first...
private void retrieveMeals() { Calendar now = Calendar.getInstance(); now.setTimeInMillis(System.currentTimeMillis()); mDate = now.getTime(); mToday = new Day(mDate); Date firstDate = DateUtils.getFirstTimeOfDay(now.getTime()); Date lastDate = DateUtils.getLastTimeOfDay(now.getTime()); mGetMealListForDate.setDate(first...
CleanFit
positive
5,063
@Override @BasicMetric("findInBlackList") public Boolean findInBlackList(List<Pair<PaymentCheckedField, String>> fields, PaymentModel model) { try { String partyId = model.getPartyId(); String shopId = model.getShopId(); List<Row> rows = fields.stream().filter(entry -> entry.getFirst() != null && !StringUtils.isEmpty(e...
@Override @BasicMetric("findInBlackList") public Boolean findInBlackList(List<Pair<PaymentCheckedField, String>> fields, PaymentModel model) { <DeepExtract> try { String partyId = model.getPartyId(); String shopId = model.getShopId(); List<Row> rows = fields.stream().filter(entry -> entry.getFirst() != null && !StringU...
fraudbusters
positive
5,064
@Override public void onCreate(Bundle savedInstanceState) { OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_); OnViewChangedNotifier.registerOnViewChangedListener(this); fadeIn = AnimationUtils.loadAnimation(getActivity(), anim.fade_in); simpleWeatherAdapter = Simple...
@Override public void onCreate(Bundle savedInstanceState) { OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_); <DeepExtract> OnViewChangedNotifier.registerOnViewChangedListener(this); fadeIn = AnimationUtils.loadAnimation(getActivity(), anim.fade_in); simpleWeatherAd...
Sunday
positive
5,065
private static Browser startBrowser() { return getInstance().getApp(injector -> AqualityServices.startBrowser()); }
private static Browser startBrowser() { <DeepExtract> return getInstance().getApp(injector -> AqualityServices.startBrowser()); </DeepExtract> }
aquality-selenium-java
positive
5,066
public static void update() { if (AGame.notNthGameFrame(7) || noSupply(25)) { return; } if (A.notNthGameFrame(47) || A.seconds() < 350) { return; } for (AUnit base : Select.ourBases().list()) { int existingCannonsNearby = Select.ourWithUnfinished(Protoss_Photon_Cannon).inRadius(10, base).count(); if (existingCannonsNea...
public static void update() { if (AGame.notNthGameFrame(7) || noSupply(25)) { return; } if (A.notNthGameFrame(47) || A.seconds() < 350) { return; } for (AUnit base : Select.ourBases().list()) { int existingCannonsNearby = Select.ourWithUnfinished(Protoss_Photon_Cannon).inRadius(10, base).count(); if (existingCannonsNea...
Atlantis
positive
5,067
public void rightTrim(double second) { long chunkSize = waveHeader.getChunkSize(); long subChunk2Size = waveHeader.getSubChunk2Size(); long totalTrimmed = 0 + second; if (totalTrimmed > subChunk2Size) { 0 = (int) subChunk2Size; } chunkSize -= totalTrimmed; subChunk2Size -= totalTrimmed; if (chunkSize >= 0 && subChunk2S...
public void rightTrim(double second) { <DeepExtract> long chunkSize = waveHeader.getChunkSize(); long subChunk2Size = waveHeader.getSubChunk2Size(); long totalTrimmed = 0 + second; if (totalTrimmed > subChunk2Size) { 0 = (int) subChunk2Size; } chunkSize -= totalTrimmed; subChunk2Size -= totalTrimmed; if (chunkSize >= 0...
Canova
positive
5,068
public Criteria andPayImgEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "payImg" + " cannot be null"); } criteria.add(new Criterion("pay_img =", value)); return (Criteria) this; }
public Criteria andPayImgEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "payImg" + " cannot be null"); } criteria.add(new Criterion("pay_img =", value)); </DeepExtract> return (Criteria) this; }
ssmBillBook
positive
5,069
void showTabBarAnimated(Animation anim) { if (anim == null) { showTabBar(); return; } mTabBarHidden = false; mTabBar.setVisibility(View.GONE); setNeedsNavigationBarAppearanceUpdate(); mTabBar.postDelayed(() -> { if (isAdded()) { mTabBar.setVisibility(mTabBarHidden ? View.GONE : View.VISIBLE); } }, anim.getDuration()); ...
void showTabBarAnimated(Animation anim) { if (anim == null) { showTabBar(); return; } mTabBarHidden = false; mTabBar.setVisibility(View.GONE); <DeepExtract> setNeedsNavigationBarAppearanceUpdate(); mTabBar.postDelayed(() -> { if (isAdded()) { mTabBar.setVisibility(mTabBarHidden ? View.GONE : View.VISIBLE); } }, anim.ge...
AndroidNavigation
positive
5,070
@Override public void onClick(View v) { sfx.play(sfxIds[SFX_CLICK], 1, 1, 1, 0, 1.0f); bgm.reset(); AssetFileDescriptor afd = getResources().openRawResourceFd(newBGM); if (afd == null) return; try { bgm.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); afd.close(); bgm.prepare(); } catch (I...
@Override public void onClick(View v) { sfx.play(sfxIds[SFX_CLICK], 1, 1, 1, 0, 1.0f); <DeepExtract> bgm.reset(); AssetFileDescriptor afd = getResources().openRawResourceFd(newBGM); if (afd == null) return; try { bgm.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); afd.close(); bgm.prepare...
SchoolQuest
positive
5,071
@Override public void onReceive(Context context, Intent intent) { mCurrentNumber.setText(String.valueOf(RandomService.getRandomNumber())); }
@Override public void onReceive(Context context, Intent intent) { <DeepExtract> mCurrentNumber.setText(String.valueOf(RandomService.getRandomNumber())); </DeepExtract> }
android-recipes-5ed
positive
5,072
public void render(SpriteBatch sb) { Color c = new Color(1f, 1f, 1f, alpha); sb.setColor(c); Texture image = images.get(index); sb.draw(image, SHOW_X - image.getWidth() / 2f, DRAW_Y - image.getHeight() / 2f, image.getWidth() / 2f, image.getHeight() / 2f, image.getWidth(), image.getHeight(), Settings.scale, Settings.sca...
public void render(SpriteBatch sb) { Color c = new Color(1f, 1f, 1f, alpha); sb.setColor(c); <DeepExtract> Texture image = images.get(index); sb.draw(image, SHOW_X - image.getWidth() / 2f, DRAW_Y - image.getHeight() / 2f, image.getWidth() / 2f, image.getHeight() / 2f, image.getWidth(), image.getHeight(), Settings.scale...
Slay-the-Spire-Together
positive
5,073
public static void setTransparentForImageView(Activity activity, View needOffsetView) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { return; } setTransparentForWindow(activity); addTranslucentView(activity, 0); if (needOffsetView != null) { Object haveSetOffset = needOffsetView.getTag(TAG_KEY_HAVE_SET_OFFS...
public static void setTransparentForImageView(Activity activity, View needOffsetView) { <DeepExtract> if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { return; } setTransparentForWindow(activity); addTranslucentView(activity, 0); if (needOffsetView != null) { Object haveSetOffset = needOffsetView.getTag(TAG_KEY...
AndroidRapidDevelopLibrarys
positive
5,074
public List<Path> listFiles(boolean absolutePath, String... fileExtensions) { if (recheckInProgress) { return; } if (!dirty && lastCheck != null && lastCheck + this.refreshRateInMillis > System.currentTimeMillis()) { return; } try { recheckInProgress = true; walkTree(); } finally { recheckInProgress = false; } List<Pat...
public List<Path> listFiles(boolean absolutePath, String... fileExtensions) { <DeepExtract> if (recheckInProgress) { return; } if (!dirty && lastCheck != null && lastCheck + this.refreshRateInMillis > System.currentTimeMillis()) { return; } try { recheckInProgress = true; walkTree(); } finally { recheckInProgress = fal...
Merlin
positive
5,075
public Drawable getAsDrawable(String key) { if (getAsBinary(key) == null) { return null; } if (Utils.Bytes2Bimap(getAsBinary(key)) == null) { return null; } return new BitmapDrawable(Utils.Bytes2Bimap(getAsBinary(key))); }
public Drawable getAsDrawable(String key) { if (getAsBinary(key) == null) { return null; } <DeepExtract> if (Utils.Bytes2Bimap(getAsBinary(key)) == null) { return null; } return new BitmapDrawable(Utils.Bytes2Bimap(getAsBinary(key))); </DeepExtract> }
FunNews
positive
5,076
public int moveCursor(final int num) throws IOException { int where = num; if ((buf.cursor == 0) && (where <= 0)) { return 0; } if ((buf.cursor == buf.buffer.length()) && (where >= 0)) { return 0; } if ((buf.cursor + where) < 0) { where = -buf.cursor; } else if ((buf.cursor + where) > buf.buffer.length()) { where = buf...
public int moveCursor(final int num) throws IOException { int where = num; if ((buf.cursor == 0) && (where <= 0)) { return 0; } if ((buf.cursor == buf.buffer.length()) && (where >= 0)) { return 0; } if ((buf.cursor + where) < 0) { where = -buf.cursor; } else if ((buf.cursor + where) > buf.buffer.length()) { where = buf...
jline2
positive
5,077
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mTilesFrameLayout.setOnAnimationFinishedListener(this); mRecycler.setLayoutManager(new LinearLayoutManager(getContext())); mRecycler.setAdapter(new ProfileAdapter(getContext(), getUser(), this)); m...
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mTilesFrameLayout.setOnAnimationFinishedListener(this); mRecycler.setLayoutManager(new LinearLayoutManager(getContext())); mRecycler.setAdapter(new ProfileAdapter(getContext(), getUser(), this)); <...
Yalantis-Series
positive
5,078
public static URL dispatchJob2Worker(String address) { return new URL().setServerType(ServerType.WORKER).setAddress(Address.fromIpv4(address)).setLocation(new HandlerLocation().setRootPath(WORKER_PATH).setMethodPath(WTT_HANDLER_RUN_JOB)); }
public static URL dispatchJob2Worker(String address) { <DeepExtract> return new URL().setServerType(ServerType.WORKER).setAddress(Address.fromIpv4(address)).setLocation(new HandlerLocation().setRootPath(WORKER_PATH).setMethodPath(WTT_HANDLER_RUN_JOB)); </DeepExtract> }
PowerJob
positive
5,079
public Complex rotate(double phi) { return new Complex(real * new Complex(Math.cos(phi), Math.sin(phi)).real - imag * new Complex(Math.cos(phi), Math.sin(phi)).imag, imag * new Complex(Math.cos(phi), Math.sin(phi)).real + real * new Complex(Math.cos(phi), Math.sin(phi)).imag); }
public Complex rotate(double phi) { <DeepExtract> return new Complex(real * new Complex(Math.cos(phi), Math.sin(phi)).real - imag * new Complex(Math.cos(phi), Math.sin(phi)).imag, imag * new Complex(Math.cos(phi), Math.sin(phi)).real + real * new Complex(Math.cos(phi), Math.sin(phi)).imag); </DeepExtract> }
fractals
positive
5,081
@Override public String add() { sql = new SQL() { }; sql.INSERT_INTO(tablename); Set<Entry<String, Object>> entrySet = entity.entrySet(); for (Entry<String, Object> entry : entrySet) { sql.VALUES(entry.getKey(), Constants.COMMON_ICON.QUESTION_SPACE); parameter.add(entry.getValue()); } if (null == parameter) { result = ...
@Override public String add() { <DeepExtract> sql = new SQL() { }; </DeepExtract> sql.INSERT_INTO(tablename); Set<Entry<String, Object>> entrySet = entity.entrySet(); for (Entry<String, Object> entry : entrySet) { sql.VALUES(entry.getKey(), Constants.COMMON_ICON.QUESTION_SPACE); parameter.add(entry.getValue()); } if (n...
YoioJava
positive
5,082
private void drawUltimateBitmap() { mWaveY = mWaveOriginalY; mBezierControlY = mBezierControlOriginalY; mBezierControlX = 0; postInvalidate(); mUltimateBitmap.eraseColor(Color.parseColor("#00ffffff")); if (mBezierControlX >= mOriginalBitmapWidth + 1 / 2 * mOriginalBitmapWidth) { mIsBezierControlXIncrease = false; } els...
private void drawUltimateBitmap() { <DeepExtract> mWaveY = mWaveOriginalY; mBezierControlY = mBezierControlOriginalY; mBezierControlX = 0; postInvalidate(); </DeepExtract> mUltimateBitmap.eraseColor(Color.parseColor("#00ffffff")); if (mBezierControlX >= mOriginalBitmapWidth + 1 / 2 * mOriginalBitmapWidth) { mIsBezierCo...
TouTiao
positive
5,083
@Test public void tokenize_emptyArgsString_noValues() { String argsString = " "; ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(argsString, pSlash); assertTrue(argMultimap.getPreamble().isEmpty()); assertFalse(argMultimap.getValue(pSlash).isPresent()); }
@Test public void tokenize_emptyArgsString_noValues() { String argsString = " "; ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(argsString, pSlash); assertTrue(argMultimap.getPreamble().isEmpty()); <DeepExtract> assertFalse(argMultimap.getValue(pSlash).isPresent()); </DeepExtract> }
addressbook-level3
positive
5,084
@Test public void testCreateDynamoDBTable() throws Exception { DynamoDbClient dynamoDbClient = TestUtils.getClientDyanamoV2(); String tableName = "test-s-" + UUID.randomUUID().toString(); CreateTableRequest createTableRequest = CreateTableRequest.builder().keySchema(KeySchemaElement.builder().keyType(KeyType.HASH).attr...
@Test public void testCreateDynamoDBTable() throws Exception { DynamoDbClient dynamoDbClient = TestUtils.getClientDyanamoV2(); <DeepExtract> String tableName = "test-s-" + UUID.randomUUID().toString(); CreateTableRequest createTableRequest = CreateTableRequest.builder().keySchema(KeySchemaElement.builder().keyType(KeyT...
localstack-java-utils
positive
5,085
public void actionPerformed(java.awt.event.ActionEvent evt) { if (jtPorcentaje.getText().equals("")) JOptionPane.showMessageDialog(this, "Debe completar el campo 'Porcentaje'"); else { float porc = 0; try { porc = Float.parseFloat(jtPorcentaje.getText()); } catch (NumberFormatException e) { JOptionPane.showMessageDialo...
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> if (jtPorcentaje.getText().equals("")) JOptionPane.showMessageDialog(this, "Debe completar el campo 'Porcentaje'"); else { float porc = 0; try { porc = Float.parseFloat(jtPorcentaje.getText()); } catch (NumberFormatException e) { JOptionPane.sh...
Diplo_NT_Intro_Programacion
positive
5,087
protected static void bounceServer() throws Exception { String curIndexName = server.curIndexName; Path curIndexPath = server.curIndexPath; if (server == null) { throw new IllegalStateException("server was not started"); } server.shutdown(); server = null; server = new RunServer(new Random(random().nextLong()), "test",...
protected static void bounceServer() throws Exception { String curIndexName = server.curIndexName; Path curIndexPath = server.curIndexPath; if (server == null) { throw new IllegalStateException("server was not started"); } server.shutdown(); server = null; <DeepExtract> server = new RunServer(new Random(random().nextLo...
luceneserver
positive
5,088
public static void dumpFilter(final FilterType f) { logger.debug("<filter>"); final StringBuilder sb = new StringBuilder(" "); sb.append("<comp-filter name=\""); sb.append(f.getCompFilter().getName()); sb.append("\">"); logger.debug(sb.toString()); if (f.getCompFilter().getIsNotDefined() != null) { logger.debug(" " +...
public static void dumpFilter(final FilterType f) { logger.debug("<filter>"); <DeepExtract> final StringBuilder sb = new StringBuilder(" "); sb.append("<comp-filter name=\""); sb.append(f.getCompFilter().getName()); sb.append("\">"); logger.debug(sb.toString()); if (f.getCompFilter().getIsNotDefined() != null) { logge...
bw-caldav
positive
5,089
public static Date getTheDayOfMonth(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.MONTH, month - 1); calendar.set(Calendar.DATE, day); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0)...
public static Date getTheDayOfMonth(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.MONTH, month - 1); calendar.set(Calendar.DATE, day); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0)...
springboot-gatherdemo
positive
5,090
@Override public boolean getAutoCommit() throws SQLException { if (!pooledObject.isBorrowed()) { throw new SQLException("PooledConnection has been returned to pool"); } return connection.getAutoCommit(); }
@Override public boolean getAutoCommit() throws SQLException { <DeepExtract> if (!pooledObject.isBorrowed()) { throw new SQLException("PooledConnection has been returned to pool"); } </DeepExtract> return connection.getAutoCommit(); }
jsql
positive
5,091
private void videoDefinitionSelected(PineMediaPlayerBean pineMediaPlayerBean) { if (pineMediaPlayerBean == null) { return; } this.pineMediaPlayerBean = pineMediaPlayerBean; this.mData = pineMediaPlayerBean.getMediaUriSourceList(); mDefinitionListInPlayerAdapter.notifyDataSetChanged(); mPlayer.resetPlayingMediaAndResume...
private void videoDefinitionSelected(PineMediaPlayerBean pineMediaPlayerBean) { if (pineMediaPlayerBean == null) { return; } <DeepExtract> this.pineMediaPlayerBean = pineMediaPlayerBean; this.mData = pineMediaPlayerBean.getMediaUriSourceList(); </DeepExtract> mDefinitionListInPlayerAdapter.notifyDataSetChanged(); mPlay...
PinePlayer
positive
5,092
public static BlockOutline createBlock(Class<?> clazz) { DescriptorOutline descriptor = new DescriptorOutline(); descriptor.setPackageName(clazz.getPackage().getName() + ".builder"); AnnotationIntrospector introspector = new AnnotationIntrospector(); boolean found = introspector.handleClass(descriptor, clazz); if (!cla...
public static BlockOutline createBlock(Class<?> clazz) { <DeepExtract> DescriptorOutline descriptor = new DescriptorOutline(); descriptor.setPackageName(clazz.getPackage().getName() + ".builder"); AnnotationIntrospector introspector = new AnnotationIntrospector(); boolean found = introspector.handleClass(descriptor, cl...
Flapi
positive
5,093
@Test public void testPublishDateSortMapping() throws InvocationTargetException, IllegalAccessException, FileNotFoundException, ParserConfigurationException, SAXException, JAXBException { cfg = helper.readFusionSchemaWithoutValidation("fusion-schema-uni-leipzig.xml"); searchServerConfig = cfg.getSearchServerConfigByNam...
@Test public void testPublishDateSortMapping() throws InvocationTargetException, IllegalAccessException, FileNotFoundException, ParserConfigurationException, SAXException, JAXBException { cfg = helper.readFusionSchemaWithoutValidation("fusion-schema-uni-leipzig.xml"); searchServerConfig = cfg.getSearchServerConfigByNam...
solr-fusion
positive
5,094
@Override public void visitPropertyRead(AstPropertyRead instruction) { if (AstIPASSAPropagationCallGraphBuilder.DEBUG_PROPERTIES) { Position instructionPosition = getInstructionPosition(instruction); if (instructionPosition != null) { System.err.println("processing read instruction " + instruction + ", position " + ins...
@Override public void visitPropertyRead(AstPropertyRead instruction) { if (AstIPASSAPropagationCallGraphBuilder.DEBUG_PROPERTIES) { Position instructionPosition = getInstructionPosition(instruction); if (instructionPosition != null) { System.err.println("processing read instruction " + instruction + ", position " + ins...
Incremental_Points_to_Analysis
positive
5,095
void addBody(final CodeBlock block) { final StringBlock b = new StringBlock(block); final String varName = TEMP_VAR_PREFIX + intermediateVariableCounter.getAndIncrement(); declarations.computeIfAbsent(b, (k) -> new ArrayList<>()).add(varName); return declarations.get(b).get(0); }
void addBody(final CodeBlock block) { final StringBlock b = new StringBlock(block); <DeepExtract> final String varName = TEMP_VAR_PREFIX + intermediateVariableCounter.getAndIncrement(); declarations.computeIfAbsent(b, (k) -> new ArrayList<>()).add(varName); return declarations.get(b).get(0); </DeepExtract> }
declarative-cluster-management
positive
5,096
public static <T> Result<T> failed(String msg) { Result<T> result = new Result<>(); result.setCode(ResultCode.SYSTEM_EXECUTION_ERROR.getCode()); result.setData(null); result.setMsg(msg); return result; }
public static <T> Result<T> failed(String msg) { <DeepExtract> Result<T> result = new Result<>(); result.setCode(ResultCode.SYSTEM_EXECUTION_ERROR.getCode()); result.setData(null); result.setMsg(msg); return result; </DeepExtract> }
youlai-mall
positive
5,097
public ProgressionConfigurator setDefaultMultiThreadedMode() { setThreads(-1); setWorkers(32); return this; return this; }
public ProgressionConfigurator setDefaultMultiThreadedMode() { <DeepExtract> setThreads(-1); setWorkers(32); return this; </DeepExtract> return this; }
PerformanceTools
positive
5,098
public static Map<String, Function<InputStream, Stream<Resource>>> createDefaultLogFmtRegistry() { Map<String, Function<InputStream, Stream<Resource>>> result = new HashMap<>(); Map<String, Function<InputStream, Stream<Resource>>> tmp = result == null ? new HashMap<>() : result; WebLogParser.loadRegistry(RDFDataMgr.loa...
public static Map<String, Function<InputStream, Stream<Resource>>> createDefaultLogFmtRegistry() { Map<String, Function<InputStream, Stream<Resource>>> result = new HashMap<>(); <DeepExtract> Map<String, Function<InputStream, Stream<Resource>>> tmp = result == null ? new HashMap<>() : result; WebLogParser.loadRegistry(...
LSQ
positive
5,100
public void addCardFilesSelectionListener(CategoryTreeSelectionListener l) { if (l == null) return; cardSelectionListeners.add(l); Set<Category> selCategories = new HashSet<Category>(); TreePath[] selectionPaths = getSelectionPaths(); if (selectionPaths == null) { return; } List<Category> allCats = CategoryUtils.recurs...
public void addCardFilesSelectionListener(CategoryTreeSelectionListener l) { if (l == null) return; cardSelectionListeners.add(l); <DeepExtract> Set<Category> selCategories = new HashSet<Category>(); TreePath[] selectionPaths = getSelectionPaths(); if (selectionPaths == null) { return; } List<Category> allCats = Catego...
opencards
positive
5,101
public void notifyDiscordWithActivePart() { PlatformUI.getWorkbench().getDisplay().syncExec(this::findActivePart); IEditorPart activePart = lastSelectedEditor; lastSelectedEditor = null; if (!(activePart instanceof IEditorPart) || activePart.equals(lastSelectedEditor)) { return; } try { lastSelectedEditor = (IEditorPar...
public void notifyDiscordWithActivePart() { PlatformUI.getWorkbench().getDisplay().syncExec(this::findActivePart); IEditorPart activePart = lastSelectedEditor; lastSelectedEditor = null; <DeepExtract> if (!(activePart instanceof IEditorPart) || activePart.equals(lastSelectedEditor)) { return; } try { lastSelectedEditor...
eclipse-discord-integration
positive
5,102
@Test public void testOneToEmpty() throws IOException, DbException, TransactionAbortedException { ArrayList<ArrayList<Integer>> sourceTuples = new ArrayList<ArrayList<Integer>>(); HeapFile source = SystemTestUtil.createRandomHeapFile(3, 1, null, sourceTuples); assert sourceTuples.size() == 1; ArrayList<ArrayList<Intege...
@Test public void testOneToEmpty() throws IOException, DbException, TransactionAbortedException { <DeepExtract> ArrayList<ArrayList<Integer>> sourceTuples = new ArrayList<ArrayList<Integer>>(); HeapFile source = SystemTestUtil.createRandomHeapFile(3, 1, null, sourceTuples); assert sourceTuples.size() == 1; ArrayList<Ar...
cs143-simpledb
positive
5,103
public void windowClosing(WindowEvent e) { dispose(); }
public void windowClosing(WindowEvent e) { <DeepExtract> dispose(); </DeepExtract> }
jExifToolGUI
positive
5,104
@Override public Fragment getItem(int position) { Fragment fragment = null; switch(position + 1) { case 1: fragment = new AmarilloFragment(); break; case 2: fragment = new AzulFragment(); break; case 3: fragment = new RojoFragment(); break; case 4: fragment = new GreenFragment(); break; } return fragment; }
@Override public Fragment getItem(int position) { <DeepExtract> Fragment fragment = null; switch(position + 1) { case 1: fragment = new AmarilloFragment(); break; case 2: fragment = new AzulFragment(); break; case 3: fragment = new RojoFragment(); break; case 4: fragment = new GreenFragment(); break; } return fragment;...
curso-android-codejavu
positive
5,106
@Override public int getCount() { switch(getState()) { case STATE_EMPTY_ITEM: return getDataSize() + 1; case STATE_NETWORK_ERROR: case STATE_LOAD_MORE: return getDataSize() + 1; case STATE_NO_DATA: return 0; case STATE_NO_MORE: return getDataSize() + 1; case STATE_LESS_ONE_PAGE: return getDataSize(); default: break; } ...
@Override public int getCount() { switch(getState()) { case STATE_EMPTY_ITEM: return getDataSize() + 1; case STATE_NETWORK_ERROR: case STATE_LOAD_MORE: return getDataSize() + 1; case STATE_NO_DATA: return 0; case STATE_NO_MORE: return getDataSize() + 1; case STATE_LESS_ONE_PAGE: return getDataSize(); default: break; } ...
Cotable
positive
5,107
@Test public void testDeserializationAsFloat02WithTimeZone() throws Exception { OffsetDateTime date = OffsetDateTime.ofInstant(Instant.ofEpochSecond(123456789L, 183917322), Z2); OffsetDateTime value = MAPPER.readerFor(OffsetDateTime.class).with(TimeZone.getDefault()).readValue("123456789.183917322"); assertTrue("The va...
@Test public void testDeserializationAsFloat02WithTimeZone() throws Exception { OffsetDateTime date = OffsetDateTime.ofInstant(Instant.ofEpochSecond(123456789L, 183917322), Z2); OffsetDateTime value = MAPPER.readerFor(OffsetDateTime.class).with(TimeZone.getDefault()).readValue("123456789.183917322"); <DeepExtract> asse...
jackson-modules-java8
positive
5,108
public void setValueFrom(BerDataValue dataValue, Object obj) throws Asn1DecodingException { int readTagClass = dataValue.getTagClass(); if (mBerTagNumber != -1) { int readTagNumber = dataValue.getTagNumber(); if ((readTagClass != mBerTagClass) || (readTagNumber != mBerTagNumber)) { throw new Asn1UnexpectedTagException(...
public void setValueFrom(BerDataValue dataValue, Object obj) throws Asn1DecodingException { int readTagClass = dataValue.getTagClass(); if (mBerTagNumber != -1) { int readTagNumber = dataValue.getTagNumber(); if ((readTagClass != mBerTagClass) || (readTagNumber != mBerTagNumber)) { throw new Asn1UnexpectedTagException(...
apk-parser
positive
5,109
public static void blur(Context context, Bitmap bkg, View view) { long startMs = System.currentTimeMillis(); float radius = 15; float scaleFactor = 8; bkg = DrawableProvider.getReSizeBitmap(bkg, view.getMeasuredWidth(), view.getMeasuredHeight()); Bitmap overlay = Bitmap.createBitmap((int) (view.getMeasuredWidth() / sca...
public static void blur(Context context, Bitmap bkg, View view) { long startMs = System.currentTimeMillis(); float radius = 15; float scaleFactor = 8; bkg = DrawableProvider.getReSizeBitmap(bkg, view.getMeasuredWidth(), view.getMeasuredHeight()); Bitmap overlay = Bitmap.createBitmap((int) (view.getMeasuredWidth() / sca...
MVPArms_Fragment
positive
5,110
public synchronized void connect() throws IllegalArgumentException, UnknownHostException, JIException, AlreadyConnectedException { if (isConnected()) { throw new AlreadyConnectedException(); } final int socketTimeout = Integer.getInteger("rpc.socketTimeout", 0); logger.info(String.format("Socket timeout: %s ", socketTi...
public synchronized void connect() throws IllegalArgumentException, UnknownHostException, JIException, AlreadyConnectedException { if (isConnected()) { throw new AlreadyConnectedException(); } final int socketTimeout = Integer.getInteger("rpc.socketTimeout", 0); logger.info(String.format("Socket timeout: %s ", socketTi...
OPC_Client
positive
5,111
public AbstractMsgBuilder image(File path) throws IOException { return this.append(String.valueOf(code.image(path))); return this; }
public AbstractMsgBuilder image(File path) throws IOException { <DeepExtract> return this.append(String.valueOf(code.image(path))); </DeepExtract> return this; }
jcq-coolq
positive
5,112
public SFTPv3FileAttributes stat(String path) throws IOException { int req_id = generateNextRequestID(); TypesWriter tw = new TypesWriter(); tw.writeString(path, charsetName); log.debug("Sending SSH_FXP_STAT/SSH_FXP_LSTAT..."); sendMessage(Packet.SSH_FXP_STAT, req_id, tw.getBytes()); byte[] resp = receiveMessage(34000)...
public SFTPv3FileAttributes stat(String path) throws IOException { <DeepExtract> int req_id = generateNextRequestID(); TypesWriter tw = new TypesWriter(); tw.writeString(path, charsetName); log.debug("Sending SSH_FXP_STAT/SSH_FXP_LSTAT..."); sendMessage(Packet.SSH_FXP_STAT, req_id, tw.getBytes()); byte[] resp = receive...
Testingbot-Tunnel
positive
5,113
@Test public void test4_13_21() throws Exception { List<String> crls = new ArrayList<String>(); for (int i = 1; i < new String[] { "nameConstraintsRFC822CA1Cert", "nameConstraintsRFC822CA1CRL" }.length; i++) crls.add(new String[] { "nameConstraintsRFC822CA1Cert", "nameConstraintsRFC822CA1CRL" }[i]); crls.add(TRUST_ANCH...
@Test public void test4_13_21() throws Exception { <DeepExtract> List<String> crls = new ArrayList<String>(); for (int i = 1; i < new String[] { "nameConstraintsRFC822CA1Cert", "nameConstraintsRFC822CA1CRL" }.length; i++) crls.add(new String[] { "nameConstraintsRFC822CA1Cert", "nameConstraintsRFC822CA1CRL" }[i]); crls....
canl-java
positive
5,114
public void visitCustomType(@NotNull ThriftCustomType o) { visitElement(o); }
public void visitCustomType(@NotNull ThriftCustomType o) { <DeepExtract> visitElement(o); </DeepExtract> }
intellij-thrift
positive
5,115
public void testSearchClientsWithOptions() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(ChefApi.class, "searchClients", SearchOptions.class); GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object>of(SearchOptions.Builder.quer...
public void testSearchClientsWithOptions() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(ChefApi.class, "searchClients", SearchOptions.class); GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object>of(SearchOptions.Builder.quer...
legacy-jclouds-chef
positive
5,116
@Override public void call(Subscriber<? super Integer> sub) { next.set(true); subscriber.unsubscribe(); }
@Override <DeepExtract> </DeepExtract> public void call(Subscriber<? super Integer> sub) { <DeepExtract> </DeepExtract> next.set(true); <DeepExtract> </DeepExtract> subscriber.unsubscribe(); <DeepExtract> </DeepExtract> }
rtree
positive
5,117
public Criteria andG_nameNotBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "g_name" + " cannot be null"); } criteria.add(new Criterion("g_name not between", value1, value2)); return (Criteria) this; }
public Criteria andG_nameNotBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "g_name" + " cannot be null"); } criteria.add(new Criterion("g_name not between", value1, value2)); </DeepExtract> return (Criteria) this; }
BaiChengNews
positive
5,118
@Override public void onErrorResponse(VolleyError error) { Response<JSONObject> resp; if (error.networkResponse == null || error.networkResponse.data == null) { resp = Response.error(new ParseError(new Exception("Unknown error or no network"))); } try { String jsonString = new String(error.networkResponse.data, HttpHea...
@Override public void onErrorResponse(VolleyError error) { <DeepExtract> Response<JSONObject> resp; if (error.networkResponse == null || error.networkResponse.data == null) { resp = Response.error(new ParseError(new Exception("Unknown error or no network"))); } try { String jsonString = new String(error.networkResponse...
Rando-android
positive
5,119
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); CircularMenuView actionMenu = findViewById(R.id.actionMenu); actionMenu.setOnMenuItemClickListe...
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); CircularMenuView actionMenu = findViewById(R.id.actionMenu); actionMenu.setOnMenuItemClickListe...
cardroid
positive
5,120
public static void main(String[] args) { processFold(1, 3, true); }
public static void main(String[] args) { <DeepExtract> processFold(1, 3, true); </DeepExtract> }
LeetCodeAndSwordToOffer
positive
5,121
@Override public void render(float delta) { timeLeft += delta; if (timeLeft >= 4) { dispose(); game.setScreen(game.game); } Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); spriteBatch.begin(); try { String st = game.getStage(); int length = st.length(); for (int i = 0; i < length; ++i) sprite...
@Override public void render(float delta) { timeLeft += delta; if (timeLeft >= 4) { dispose(); game.setScreen(game.game); } Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); spriteBatch.begin(); <DeepExtract> try { String st = game.getStage(); int length = st.length(); for (int i = 0; i < lengt...
libgdx
positive
5,122
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.bga_pp_menu_photo_preview, menu); MenuItem menuItem = menu.findItem(R.id.item_photo_preview_title); View actionView = menuItem.getActionView(); mTitleTv = actionView.findViewById(R.id.tv_photo_preview_title); mDownloadIv = action...
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.bga_pp_menu_photo_preview, menu); MenuItem menuItem = menu.findItem(R.id.item_photo_preview_title); View actionView = menuItem.getActionView(); mTitleTv = actionView.findViewById(R.id.tv_photo_preview_title); mDownloadIv = action...
BGAPhotoPicker-Android
positive
5,123
protected int unpackHeader(byte[] buffer, int offset) { id = BufferTools.byteBufferToStringIgnoringEncodingIssues(buffer, offset + ID_OFFSET, ID_LENGTH); dataLength = BufferTools.unpackInteger(buffer[offset + DATA_LENGTH_OFFSET], buffer[offset + DATA_LENGTH_OFFSET + 1], buffer[offset + DATA_LENGTH_OFFSET + 2], buffer[o...
protected int unpackHeader(byte[] buffer, int offset) { id = BufferTools.byteBufferToStringIgnoringEncodingIssues(buffer, offset + ID_OFFSET, ID_LENGTH); dataLength = BufferTools.unpackInteger(buffer[offset + DATA_LENGTH_OFFSET], buffer[offset + DATA_LENGTH_OFFSET + 1], buffer[offset + DATA_LENGTH_OFFSET + 2], buffer[o...
MineTunes
positive
5,124
@Override public void onDestroy() { super.onDestroy(); if (mCompositeSubscription != null) { mCompositeSubscription.unsubscribe(); } }
@Override public void onDestroy() { super.onDestroy(); <DeepExtract> if (mCompositeSubscription != null) { mCompositeSubscription.unsubscribe(); } </DeepExtract> }
SmallExcellent-master
positive
5,125
public int get(int key) { if (count == 0) { return -1; } Node node = map.get(key); if (node == null) { return -1; } if (node.last != null) { node.last.next = node.next; if (node.next != null) { node.next.last = node.last; } else { end = node.last; } node.last = null; node.next = head; head.last = node; head = node; } r...
public int get(int key) { if (count == 0) { return -1; } Node node = map.get(key); if (node == null) { return -1; } <DeepExtract> if (node.last != null) { node.last.next = node.next; if (node.next != null) { node.next.last = node.last; } else { end = node.last; } node.last = null; node.next = head; head.last = node; he...
demo-project
positive
5,126
@Override public ValueNode pojoNode(Object pojo) { JsonParser parser = parserSupplier.get(); JsonLocation loc = parser.currentTokenLocation(); if (parser instanceof YAMLParser && parser.currentToken().isStructEnd()) { loc = new JsonLocation(loc.contentReference(), loc.getCharOffset(), loc.getLineNr() - 1, loc.getColumn...
@Override public ValueNode pojoNode(Object pojo) { <DeepExtract> JsonParser parser = parserSupplier.get(); JsonLocation loc = parser.currentTokenLocation(); if (parser instanceof YAMLParser && parser.currentToken().isStructEnd()) { loc = new JsonLocation(loc.contentReference(), loc.getCharOffset(), loc.getLineNr() - 1,...
conjure
positive
5,127
public void run(Type contextType, Map<String, Object> config) throws Exception { JsonSubscriber.subscribe(topo, subscribeTopic).print(); StreamsContextFactory.getStreamsContext(contextType).submit(topo, config).get(); }
public void run(Type contextType, Map<String, Object> config) throws Exception { <DeepExtract> JsonSubscriber.subscribe(topo, subscribeTopic).print(); </DeepExtract> StreamsContextFactory.getStreamsContext(contextType).submit(topo, config).get(); }
streamsx.health
positive
5,128
private Job createJob(Properties props) throws IOException { if (getConf() == null) { setConf(new Configuration()); } for (Object key : props.keySet()) { getConf().set(key.toString(), props.getProperty(key.toString())); } FileSystem fs = FileSystem.get(getConf()); String hadoopCacheJarDir = getConf().get("hdfs.default....
private Job createJob(Properties props) throws IOException { if (getConf() == null) { setConf(new Configuration()); } <DeepExtract> for (Object key : props.keySet()) { getConf().set(key.toString(), props.getProperty(key.toString())); } FileSystem fs = FileSystem.get(getConf()); String hadoopCacheJarDir = getConf().get(...
camus
positive
5,129
@Override public void okAt(String location, Object value) { send(OK, value, location, defaultSerializationStrategy); }
@Override public void okAt(String location, Object value) { <DeepExtract> send(OK, value, location, defaultSerializationStrategy); </DeepExtract> }
fast-http
positive
5,130
@Override public void onStartPlayRecord(long timeMillis) { if (timeMillis < 0) { timeMillis = 0; } MediaSource mediaSource = new ExtractorMediaSource.Factory(new FileDataSourceFactory()).createMediaSource(Uri.fromFile(AudioRecordDataSource.getInstance().getRecordFile())); simpleExoPlayer.prepare(mediaSource); simpleExo...
@Override public void onStartPlayRecord(long timeMillis) { <DeepExtract> if (timeMillis < 0) { timeMillis = 0; } MediaSource mediaSource = new ExtractorMediaSource.Factory(new FileDataSourceFactory()).createMediaSource(Uri.fromFile(AudioRecordDataSource.getInstance().getRecordFile())); simpleExoPlayer.prepare(mediaSour...
AduioRecordUI
positive
5,131
public static ParseStatus read(DataInput in) throws IOException { ParseStatus res = new ParseStatus(); byte version = in.readByte(); switch(version) { case 1: majorCode = in.readByte(); minorCode = in.readShort(); args = WritableUtils.readCompressedStringArray(in); break; case 2: majorCode = in.readByte(); minorCode = ...
public static ParseStatus read(DataInput in) throws IOException { ParseStatus res = new ParseStatus(); <DeepExtract> byte version = in.readByte(); switch(version) { case 1: majorCode = in.readByte(); minorCode = in.readShort(); args = WritableUtils.readCompressedStringArray(in); break; case 2: majorCode = in.readByte()...
HiBench-8.0
positive
5,132
@Override public int updateMsg(long id, String msg) { TaskInstance msgUpdateInstance = new TaskInstance(); msgUpdateInstance.setId(id); msgUpdateInstance.setMsg(msg); return taskInstanceMapper.update(msgUpdateInstance); }
@Override public int updateMsg(long id, String msg) { TaskInstance msgUpdateInstance = new TaskInstance(); msgUpdateInstance.setId(id); msgUpdateInstance.setMsg(msg); <DeepExtract> return taskInstanceMapper.update(msgUpdateInstance); </DeepExtract> }
liteflow
positive
5,133
void scheduleEvents() { if (!getEnabled()) { L.fine("disabled"); return; } for (int i = PLevel.Type.VALUES.size(); --i >= 0; ) { PLevel.Type levelType = PLevel.Type.VALUES.get(i); float value = getMultRangedValue(levelType); changedLevels.add(new PLevel(levelType, value)); } getPenManager().scheduleLevelEvent(this, win...
void scheduleEvents() { if (!getEnabled()) { L.fine("disabled"); return; } <DeepExtract> for (int i = PLevel.Type.VALUES.size(); --i >= 0; ) { PLevel.Type levelType = PLevel.Type.VALUES.get(i); float value = getMultRangedValue(levelType); changedLevels.add(new PLevel(levelType, value)); } getPenManager().scheduleLevelE...
jpen
positive
5,134
@Override public CustomersRecord value1(Integer value) { set(0, value); return this; }
@Override public CustomersRecord value1(Integer value) { <DeepExtract> set(0, value); </DeepExtract> return this; }
graphql-java-db-example
positive
5,137
void unScrap() { mAttachedScrap.remove(this); this.mScrapContainer = null; mScrapContainer = null; }
void unScrap() { <DeepExtract> mAttachedScrap.remove(this); this.mScrapContainer = null; </DeepExtract> mScrapContainer = null; }
HorizontalGridView
positive
5,138
private void nu_scatterActionPerformed(java.awt.event.ActionEvent evt) { String s = "nu-scatter"; "nu-scatter" = " " + s + " "; return "nu-scatter"; }
private void nu_scatterActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> String s = "nu-scatter"; "nu-scatter" = " " + s + " "; return "nu-scatter"; </DeepExtract> }
ERSN-OpenMC
positive
5,139
@Override public void onNotify(InventorySlot slot, SlotEvent event) { switch(event) { case ADDED_ITEM: if (slot.getTopInventoryItem().getName().equalsIgnoreCase(InventoryUI.PLAYER_INVENTORY) && slot.getName().equalsIgnoreCase(InventoryUI.STORE_INVENTORY)) { _tradeInVal += slot.getTopInventoryItem().getTradeValue(); _se...
@Override public void onNotify(InventorySlot slot, SlotEvent event) { switch(event) { case ADDED_ITEM: if (slot.getTopInventoryItem().getName().equalsIgnoreCase(InventoryUI.PLAYER_INVENTORY) && slot.getName().equalsIgnoreCase(InventoryUI.STORE_INVENTORY)) { _tradeInVal += slot.getTopInventoryItem().getTradeValue(); _se...
BludBourne
positive
5,140
@Override public Product getValue() { return product; }
@Override public Product getValue() { <DeepExtract> return product; </DeepExtract> }
moserp
positive
5,141
@Override public Boolean value5() { return (Boolean) get(4); }
@Override public Boolean value5() { <DeepExtract> return (Boolean) get(4); </DeepExtract> }
sapling
positive
5,142