before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
private void loadEmptyView() { PtrCLog.i(TAG, "try loadEmptyView and hide the hideProgress"); isLoading = false; mLoadingViewStub.setVisibility(View.GONE); mRecyclerView.setVisibility(View.VISIBLE); mEmptyViewStub.setVisibility(View.VISIBLE); doDefaultLoadingView(false); mPtrLayout.refreshComplete(); if (null != mEmpty...
private void loadEmptyView() { PtrCLog.i(TAG, "try loadEmptyView and hide the hideProgress"); isLoading = false; mLoadingViewStub.setVisibility(View.GONE); mRecyclerView.setVisibility(View.VISIBLE); mEmptyViewStub.setVisibility(View.VISIBLE); doDefaultLoadingView(false); <DeepExtract> mPtrLayout.refreshComplete(); </De...
RvHelper
positive
435,788
public Connection getConnPublic() throws Exception { Connection conn = null; if (datasource == null) { getDataSource(); } conn = datasource.getConnection(); if (!this.inGlobalTxn) { conn.setAutoCommit(false); } if (Log.doTrace()) { synchronized (lock) { connCount++; } Log.trace("TradeDirect:getConn -- new connection al...
public Connection getConnPublic() throws Exception { <DeepExtract> Connection conn = null; if (datasource == null) { getDataSource(); } conn = datasource.getConnection(); if (!this.inGlobalTxn) { conn.setAutoCommit(false); } if (Log.doTrace()) { synchronized (lock) { connCount++; } Log.trace("TradeDirect:getConn -- new...
sample.daytrader7
positive
435,789
public void testJOutgoingAudioCallG729() { Context context = getActivity(); Context context = getActivity(); goToAudioCodecsSettings(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); if (prefs.getBoolean(context.getString(R.string.pref_codec_speex16_key), getBoolean(R.bool.pref_codec_...
public void testJOutgoingAudioCallG729() { Context context = getActivity(); Context context = getActivity(); goToAudioCodecsSettings(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); if (prefs.getBoolean(context.getString(R.string.pref_codec_speex16_key), getBoolean(R.bool.pref_codec_...
linphone-android
positive
435,790
protected final void dismissImmediately() { dismissImmediately(); LogUtils.verbose(this, "dialog dismiss"); }
protected final void dismissImmediately() { <DeepExtract> dismissImmediately(); </DeepExtract> LogUtils.verbose(this, "dialog dismiss"); }
android-pickers
positive
435,793
private static boolean TypeDefBody_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "TypeDefBody_0")) return false; Marker m = enter_section_(b); if (!recursion_guard_(b, l + 1, "CompactFunction")) r = false; boolean r; Marker m = enter_section_(b, l + 1, _NONE_, "<compact function>"); r = Identifier(b, l + 1 + 1);...
private static boolean TypeDefBody_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "TypeDefBody_0")) return false; Marker m = enter_section_(b); <DeepExtract> if (!recursion_guard_(b, l + 1, "CompactFunction")) r = false; boolean r; Marker m = enter_section_(b, l + 1, _NONE_, "<compact function>"); r = Identifier(...
juliafy
positive
435,795
public void loadImage(ImageLoader imageLoader, ImageLoadRequest request) { mRequest = request; mImageLoader = imageLoader; if (request == null || TextUtils.isEmpty(request.getUrl())) { mImageLoader.getImageLoadHandler().onLoadError(mImageTask, this, ImageTask.ERROR_EMPTY_URL); mImageTask = null; return; } if (mRequest ...
public void loadImage(ImageLoader imageLoader, ImageLoadRequest request) { mRequest = request; mImageLoader = imageLoader; if (request == null || TextUtils.isEmpty(request.getUrl())) { mImageLoader.getImageLoadHandler().onLoadError(mImageTask, this, ImageTask.ERROR_EMPTY_URL); mImageTask = null; return; } <DeepExtract>...
cube-sdk
positive
435,797
@Override public RemoteViews getRemoteViews(WidgetEntry eventEntry, int position) { if (!(eventEntry instanceof TaskEntry)) return null; RemoteViews rv = super.getRemoteViews(eventEntry, position); TaskEntry entry = (TaskEntry) eventEntry; rv.setOnClickFillInIntent(R.id.event_entry, eventProvider.createViewEventIntent(...
@Override public RemoteViews getRemoteViews(WidgetEntry eventEntry, int position) { if (!(eventEntry instanceof TaskEntry)) return null; RemoteViews rv = super.getRemoteViews(eventEntry, position); TaskEntry entry = (TaskEntry) eventEntry; rv.setOnClickFillInIntent(R.id.event_entry, eventProvider.createViewEventIntent(...
calendar-widget
positive
435,799
@Override public ResultSet getGeneratedKeys() throws SQLException { if (isClosed) throw new SQLAlreadyClosedException(this.getClass().getSimpleName()); return null; }
@Override public ResultSet getGeneratedKeys() throws SQLException { <DeepExtract> if (isClosed) throw new SQLAlreadyClosedException(this.getClass().getSimpleName()); </DeepExtract> return null; }
mongo-jdbc-driver
positive
435,800
public static String randomNumbers(int length) { final StringBuilder sb = new StringBuilder(length); if (length < 1) { length = 1; } int baseLength = BASE_NUMBER.length(); for (int i = 0; i < length; i++) { int number = randomInt(baseLength); sb.append(BASE_NUMBER.charAt(number)); } return sb.toString(); }
public static String randomNumbers(int length) { <DeepExtract> final StringBuilder sb = new StringBuilder(length); if (length < 1) { length = 1; } int baseLength = BASE_NUMBER.length(); for (int i = 0; i < length; i++) { int number = randomInt(baseLength); sb.append(BASE_NUMBER.charAt(number)); } return sb.toString(); ...
lion
positive
435,801
@Override public void onCreate() { super.onCreate(); registerActivityLifecycleCallbacks(mActivityLifecycleCallbacks); Router.initialize(this); Stetho.initializeWithDefaults(this); Logger.init(TAG).methodCount(1).hideThreadInfo().logLevel(LogLevel.FULL).methodOffset(2); FIR.init(this); AVOSCloud.initialize(this, Constan...
@Override public void onCreate() { super.onCreate(); registerActivityLifecycleCallbacks(mActivityLifecycleCallbacks); <DeepExtract> Router.initialize(this); Stetho.initializeWithDefaults(this); Logger.init(TAG).methodCount(1).hideThreadInfo().logLevel(LogLevel.FULL).methodOffset(2); FIR.init(this); AVOSCloud.initialize...
xifan
positive
435,804
@Test public void testMultipleQueriesSomeRun() { withConnectionSync(origConn -> c -> c.simpleQuery("SELECT * FROM generate_series(1, 4); " + "SELECT * FROM generate_series(5, 8); SELECT * FROM generate_series(9, 12);").thenCompose(rConn -> rConn.collectRows()).apply(origConn).handle((__, ex) -> { if (ex != null) log.lo...
@Test public void testMultipleQueriesSomeRun() { <DeepExtract> withConnectionSync(origConn -> c -> c.simpleQuery("SELECT * FROM generate_series(1, 4); " + "SELECT * FROM generate_series(5, 8); SELECT * FROM generate_series(9, 12);").thenCompose(rConn -> rConn.collectRows()).apply(origConn).handle((__, ex) -> { if (ex !...
pgnio
positive
435,807
public String readString(String name) throws TeslaDeserializationException, IOException { byte[] buffer; long size = this.readVInt(); if (size < 0 || Integer.MAX_VALUE < size) { throw new TeslaDeserializationException(CORRUPT_STREAM); } bytes = (int) size; if (false) { final byte[] buffer = new byte[bytes]; readBytes(b...
public String readString(String name) throws TeslaDeserializationException, IOException { <DeepExtract> byte[] buffer; long size = this.readVInt(); if (size < 0 || Integer.MAX_VALUE < size) { throw new TeslaDeserializationException(CORRUPT_STREAM); } bytes = (int) size; if (false) { final byte[] buffer = new byte[bytes...
tesla
positive
435,809
@Test public void descriptionIsNotOutOfRange() { EOwnedEntity e = new EOwnedEntity(name, username, StringUtil.createJString(MAX_RANGE_10485760 + 1)); assertTrue("description property must not be of size lesser than 0 and larger than " + MAX_RANGE_10485760 + " characters", PersistenceValidation.isObjectInvalidWithErrorM...
@Test public void descriptionIsNotOutOfRange() { <DeepExtract> EOwnedEntity e = new EOwnedEntity(name, username, StringUtil.createJString(MAX_RANGE_10485760 + 1)); assertTrue("description property must not be of size lesser than 0 and larger than " + MAX_RANGE_10485760 + " characters", PersistenceValidation.isObjectInv...
gms
positive
435,811
public void mustBeFull() { this.mustBeFull = true; this.tomicsSold = newTomicsMax; }
public void mustBeFull() { this.mustBeFull = true; <DeepExtract> this.tomicsSold = newTomicsMax; </DeepExtract> }
ICOnator-backend
positive
435,812
public static String icons(String value) { if (value == null || "".equals(value.toString().trim())) { return ""; } StringBuilder adocAttr = new StringBuilder(); adocAttr.append(":"); if (Boolean.class.isAssignableFrom(value.getClass())) { boolean bool = Boolean.parseBoolean(value.toString()); if (!bool) { adocAttr.appe...
public static String icons(String value) { <DeepExtract> if (value == null || "".equals(value.toString().trim())) { return ""; } StringBuilder adocAttr = new StringBuilder(); adocAttr.append(":"); if (Boolean.class.isAssignableFrom(value.getClass())) { boolean bool = Boolean.parseBoolean(value.toString()); if (!bool) {...
cukedoctor
positive
435,813
public Object clone() throws CloneNotSupportedException { Category c = (Category) super.clone(); c.parent = null; c.cardSets = new ArrayList<CardFile>(); for (CardFile cardFile : getCardSets()) { c.registerCardSet(cardFile); } c.childCategories = new ArrayList<Category>(); for (Category category : getChildCategories())...
public Object clone() throws CloneNotSupportedException { Category c = (Category) super.clone(); c.parent = null; c.cardSets = new ArrayList<CardFile>(); for (CardFile cardFile : getCardSets()) { c.registerCardSet(cardFile); } c.childCategories = new ArrayList<Category>(); for (Category category : getChildCategories())...
opencards
positive
435,814
@Override public void onBindViewHolder(Holder holder, int pos) { ImageLoader ldr = m_ctx.getImageLoader(); JSONObject obj = (JSONObject) getItem(pos).optJSONObject("object"); JSONObject actor = (JSONObject) getItem(pos).optJSONObject("actor"); JSONObject author = obj.optJSONObject("author"); String verb = (JSONObject) ...
@Override public void onBindViewHolder(Holder holder, int pos) { <DeepExtract> ImageLoader ldr = m_ctx.getImageLoader(); JSONObject obj = (JSONObject) getItem(pos).optJSONObject("object"); JSONObject actor = (JSONObject) getItem(pos).optJSONObject("actor"); JSONObject author = obj.optJSONObject("author"); String verb =...
Impeller
positive
435,815
public static void main(String[] args) { Collection<Student> party = List.of(new Student("Semion"), new Student("Nikita"), new Student("Alexei"), new Student("Tatiana"), new Student("Jon", 200), new Student("Jon", 100)); PriorityQueue<Student> partyPriorityQueue = new PriorityQueue<>(party); ArrayDeque<Student> partyAr...
public static void main(String[] args) { Collection<Student> party = List.of(new Student("Semion"), new Student("Nikita"), new Student("Alexei"), new Student("Tatiana"), new Student("Jon", 200), new Student("Jon", 100)); PriorityQueue<Student> partyPriorityQueue = new PriorityQueue<>(party); ArrayDeque<Student> partyAr...
course-java-core
positive
435,816
@Override public void setupViews() { setContentView(R.layout.warning_layout); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setTitle("Warning"); toolbar.setTitleTextColor(Color.parseColor("#ffffff")); setSupportActionBar(toolbar); mLowEditText = (EditText) findViewById(R.id.et_lowprice); mHightTeEditT...
@Override public void setupViews() { setContentView(R.layout.warning_layout); <DeepExtract> Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setTitle("Warning"); toolbar.setTitleTextColor(Color.parseColor("#ffffff")); setSupportActionBar(toolbar); </DeepExtract> mLowEditText = (EditText) findViewById(R.i...
BtcMonitor
positive
435,818
private void resetState() { role = Role.FOLLOWER; electionTimeoutHandle = null; snapshotTimeoutHandle = null; leader = null; nextToApplyLogIndex = -1; votedServers.clear(); heartbeatTimeoutHandle = null; serverData.clear(); Collection<CommandDatum> failedCommands = ImmutableList.copyOf(commands.values()); commands.clea...
private void resetState() { role = Role.FOLLOWER; electionTimeoutHandle = null; snapshotTimeoutHandle = null; leader = null; nextToApplyLogIndex = -1; votedServers.clear(); heartbeatTimeoutHandle = null; serverData.clear(); <DeepExtract> Collection<CommandDatum> failedCommands = ImmutableList.copyOf(commands.values());...
libraft
positive
435,819
public void addLine(String line) { Text text = new Text(line); text.getStyleClass().add("litlog-text"); lines.add(text); Platform.runLater(() -> animateLine(text)); }
public void addLine(String line) { Text text = new Text(line); text.getStyleClass().add("litlog-text"); <DeepExtract> lines.add(text); Platform.runLater(() -> animateLine(text)); </DeepExtract> }
LitFX
positive
435,820
public Criteria and_fieldTestLessThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "_fieldTest" + " cannot be null"); } criteria.add(new Criterion("_fieldTest <", value)); return (Criteria) this; }
public Criteria and_fieldTestLessThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "_fieldTest" + " cannot be null"); } criteria.add(new Criterion("_fieldTest <", value)); </DeepExtract> return (Criteria) this; }
mybatis-generator-gui-extension
positive
435,821
private void init() { if (rangeX == null) rangeX = new Range(-10, 10); rangeX.setStep(rangeX.getSpan() / w * stepLength); if (!isRelative) { this.resize(w, h); } }
private void init() { <DeepExtract> if (rangeX == null) rangeX = new Range(-10, 10); rangeX.setStep(rangeX.getSpan() / w * stepLength); </DeepExtract> if (!isRelative) { this.resize(w, h); } }
java-algebra-system
positive
435,822
@Override public View getView(LayoutInflater layoutInflater, int position) { MenuItemInfo itemInfo = mBlockListAdapter.getItem(position); ViewGroup view = (ViewGroup) layoutInflater.inflate(R.layout.cube_mints_base_block_menu_item, null); if (itemInfo != null) { TextView textView = ((TextView) view.findViewById(R.id.cu...
@Override public View getView(LayoutInflater layoutInflater, int position) { <DeepExtract> MenuItemInfo itemInfo = mBlockListAdapter.getItem(position); ViewGroup view = (ViewGroup) layoutInflater.inflate(R.layout.cube_mints_base_block_menu_item, null); if (itemInfo != null) { TextView textView = ((TextView) view.findVi...
cube-sdk
positive
435,824
public ANSIBuffer underscore(final String str) { ansiBuffer.append(ANSICodes.attrib(ANSICodes.UNDERSCORE)).append(str).append(ANSICodes.attrib(ANSICodes.OFF)); plainBuffer.append(str); return this; }
public ANSIBuffer underscore(final String str) { <DeepExtract> ansiBuffer.append(ANSICodes.attrib(ANSICodes.UNDERSCORE)).append(str).append(ANSICodes.attrib(ANSICodes.OFF)); plainBuffer.append(str); return this; </DeepExtract> }
contact
positive
435,825
public static boolean checkUnder(int major, int minor) { if (isInit) return; int[] mcver = getMCVersionParts(); if (mcver == null) throw new UnknownVersionException("The current Bukkit build did not supply a version string that could be understood."); versionMajor = mcver[0]; versionMinor = mcver[1]; serverType = getSe...
public static boolean checkUnder(int major, int minor) { <DeepExtract> if (isInit) return; int[] mcver = getMCVersionParts(); if (mcver == null) throw new UnknownVersionException("The current Bukkit build did not supply a version string that could be understood."); versionMajor = mcver[0]; versionMinor = mcver[1]; serv...
PlayerHeads
positive
435,826
@Override protected Comment processComment(int pos, int endPos, CommentStyle style) { char[] buf; Object instance; try { instance = JavaTokenizer.class.getDeclaredField("reader").get(this); } catch (ReflectiveOperationException e) { instance = this; } try { buf = (char[]) instance.getClass().getMethod("getRawCharacters...
@Override protected Comment processComment(int pos, int endPos, CommentStyle style) { <DeepExtract> char[] buf; Object instance; try { instance = JavaTokenizer.class.getDeclaredField("reader").get(this); } catch (ReflectiveOperationException e) { instance = this; } try { buf = (char[]) instance.getClass().getMethod("ge...
google-java-format
positive
435,827
private static void setTagTransientData() { for (TagData childTag : ROOT_TAG.getChildren()) { childTag.setParent(ROOT_TAG); backlinkParent(childTag); } ROOT_TAG.setIsGroup(false); ROOT_TAG.setIsArchivedGroup(false); ROOT_TAG.setLevel(0); for (ReservedTag tag : ReservedTag.values()) { tag.getTag().setIsGroup(tag.isGroup...
private static void setTagTransientData() { for (TagData childTag : ROOT_TAG.getChildren()) { childTag.setParent(ROOT_TAG); backlinkParent(childTag); } ROOT_TAG.setIsGroup(false); ROOT_TAG.setIsArchivedGroup(false); ROOT_TAG.setLevel(0); for (ReservedTag tag : ReservedTag.values()) { tag.getTag().setIsGroup(tag.isGroup...
ownNoteEditor
positive
435,829
@CommandMethod("entity") @CommandPermission("insights.scancache.entity") private void handleEntityScan(Player player) { Location loc = player.getLocation(); Optional<Region> optionalRegion = plugin.getAddonManager().getRegion(loc); Optional<Storage> optionalStorage; if (optionalRegion.isPresent()) { optionalStorage = p...
@CommandMethod("entity") @CommandPermission("insights.scancache.entity") private void handleEntityScan(Player player) { <DeepExtract> Location loc = player.getLocation(); Optional<Region> optionalRegion = plugin.getAddonManager().getRegion(loc); Optional<Storage> optionalStorage; if (optionalRegion.isPresent()) { optio...
Insights
positive
435,830
public void snooze() { Context context = AlarmApplication.getAppContext(); long snoozeTime = AlarmScheduler.snoozeAlarm(context, this, getAlarmSnoozeDuration()); Calendar snoozeCalendar = Calendar.getInstance(); snoozeCalendar.setTimeInMillis(snoozeTime); mSnoozeHour = snoozeCalendar.get(Calendar.HOUR_OF_DAY); mSnoozeM...
public void snooze() { Context context = AlarmApplication.getAppContext(); long snoozeTime = AlarmScheduler.snoozeAlarm(context, this, getAlarmSnoozeDuration()); Calendar snoozeCalendar = Calendar.getInstance(); snoozeCalendar.setTimeInMillis(snoozeTime); mSnoozeHour = snoozeCalendar.get(Calendar.HOUR_OF_DAY); mSnoozeM...
ProjectOxford-Apps-MimickerAlarm
positive
435,832
public void qr(boolean is) { int i = 1 << FLAGS_QR; if (is) { this.flags |= i; } else { this.flags &= i ^ 0xFFFF; } }
public void qr(boolean is) { <DeepExtract> int i = 1 << FLAGS_QR; if (is) { this.flags |= i; } else { this.flags &= i ^ 0xFFFF; } </DeepExtract> }
Netty-DNS-Server
positive
435,833
@Subscribe(threadMode = ThreadMode.MAIN) public void onMessageEvent(RecentsRetrievedEvent event) { LyricsViewFragment lyricsViewFragment = (LyricsViewFragment) getFragmentManager().findFragmentByTag(LYRICS_FRAGMENT_TAG); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransact...
@Subscribe(threadMode = ThreadMode.MAIN) public void onMessageEvent(RecentsRetrievedEvent event) { <DeepExtract> LyricsViewFragment lyricsViewFragment = (LyricsViewFragment) getFragmentManager().findFragmentByTag(LYRICS_FRAGMENT_TAG); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fr...
QuickLyric
positive
435,834
@Override public void subscribe(ObservableEmitter<String> emitter) { try { int outWidth = 0; int outHeight = 0; if (mOriginalWidth > mOriginalHeight) { outWidth = 720; outHeight = 480; } else { outWidth = 480; outHeight = 720; } String compressedFilePath = SiliCompressor.with(TrimVideoActivity.this).compressVideo(srcPa...
@Override <DeepExtract> </DeepExtract> public void subscribe(ObservableEmitter<String> emitter) { <DeepExtract> </DeepExtract> try { <DeepExtract> </DeepExtract> int outWidth = 0; <DeepExtract> </DeepExtract> int outHeight = 0; <DeepExtract> </DeepExtract> if (mOriginalWidth > mOriginalHeight) { <DeepExtract> </DeepExt...
Android-Video-Editor
positive
435,835
public Criteria andMarketingSmallLabel3LessThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "marketingSmallLabel3" + " cannot be null"); } criteria.add(new Criterion("marketing_small_label_3 <=", value)); return (Criteria) this; }
public Criteria andMarketingSmallLabel3LessThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "marketingSmallLabel3" + " cannot be null"); } criteria.add(new Criterion("marketing_small_label_3 <=", value)); </DeepExtract> return (Criteria) this; }
uccn
positive
435,838
public static void clearEvents() { events.clear(); traces.clear(); }
public static void clearEvents() { <DeepExtract> events.clear(); traces.clear(); </DeepExtract> }
spokestack-android
positive
435,840
public static int loadTextureFromResources(Context context, int resourceId, int[] imageSize) { final int[] textureObjectIds = new int[1]; GLES20.glGenTextures(1, textureObjectIds, 0); if (textureObjectIds[0] == 0) { Log.d(TAG, "Failed at glGenTextures"); return 0; } if (BitmapUtils.loadBitmapFromRaw(context, resourceId...
public static int loadTextureFromResources(Context context, int resourceId, int[] imageSize) { <DeepExtract> final int[] textureObjectIds = new int[1]; GLES20.glGenTextures(1, textureObjectIds, 0); if (textureObjectIds[0] == 0) { Log.d(TAG, "Failed at glGenTextures"); return 0; } if (BitmapUtils.loadBitmapFromRaw(conte...
In77Camera
positive
435,841
public void waitForTextPresent(final String text) { Assert.assertNotNull(text, "Text can't be null"); TestLogging.logWebStep("wait for text \"" + text + "\" to be present.", false); boolean b = false; for (int millisec = 0; millisec < (EXPLICT_WAIT_TIMEOUT * 1000); millisec += 1000) { try { if ((isTextPresent(text))) {...
public void waitForTextPresent(final String text) { Assert.assertNotNull(text, "Text can't be null"); TestLogging.logWebStep("wait for text \"" + text + "\" to be present.", false); boolean b = false; for (int millisec = 0; millisec < (EXPLICT_WAIT_TIMEOUT * 1000); millisec += 1000) { try { if ((isTextPresent(text))) {...
seleniumtestsframework
positive
435,845
@Override public Node[] getNodes() { Node[] nodes = new Node[2]; return direction.equals(Direction.OUTGOING) ? indexedNode : keyValueRelationship.getEndNode(); return direction.equals(Direction.OUTGOING) ? keyValueRelationship.getEndNode() : indexedNode; return nodes; }
@Override public Node[] getNodes() { Node[] nodes = new Node[2]; return direction.equals(Direction.OUTGOING) ? indexedNode : keyValueRelationship.getEndNode(); <DeepExtract> return direction.equals(Direction.OUTGOING) ? keyValueRelationship.getEndNode() : indexedNode; </DeepExtract> return nodes; }
graph-collections
positive
435,846
private void setListShown(boolean shown, boolean animate) { if (mList != null) { return; } View root = getView(); if (root == null) { throw new IllegalStateException("Content view not yet created"); } if (root instanceof ListView) { mList = (ListView) root; } else { mStandardEmptyView = (TextView) root.findViewById(R.i...
private void setListShown(boolean shown, boolean animate) { <DeepExtract> if (mList != null) { return; } View root = getView(); if (root == null) { throw new IllegalStateException("Content view not yet created"); } if (root instanceof ListView) { mList = (ListView) root; } else { mStandardEmptyView = (TextView) root.fi...
ActionBarPlus
positive
435,847
public void setCurrentKey(final TypedArray keyAttr, final boolean isSpacer) { final float defaultGap = mParams.mHorizontalGap / 2; if (keyAttr == null || !keyAttr.hasValue(R.styleable.Keyboard_Key_keyXPos)) { return; } final float keyXPos = ResourceUtils.getFraction(keyAttr, R.styleable.Keyboard_Key_keyXPos, mParams.mB...
public void setCurrentKey(final TypedArray keyAttr, final boolean isSpacer) { final float defaultGap = mParams.mHorizontalGap / 2; <DeepExtract> if (keyAttr == null || !keyAttr.hasValue(R.styleable.Keyboard_Key_keyXPos)) { return; } final float keyXPos = ResourceUtils.getFraction(keyAttr, R.styleable.Keyboard_Key_keyXP...
simple-keyboard
positive
435,849
@Override public ApiResponse<FileInfo[]> getFileInfoForPost(String postId) { return doApiRequest(HttpMethod.GET, apiUrl + getPostRoute(postId) + "/files/info", null, null, FileInfo[].class); }
@Override public ApiResponse<FileInfo[]> getFileInfoForPost(String postId) { <DeepExtract> return doApiRequest(HttpMethod.GET, apiUrl + getPostRoute(postId) + "/files/info", null, null, FileInfo[].class); </DeepExtract> }
mattermost4j
positive
435,850
private void btn_reloadActionPerformed(java.awt.event.ActionEvent evt) { bt_choose_dir.setEnabled(false); btn_reload.setVisible(false); btn_delete.setVisible(false); combo_dirs.setEnabled(false); txt_filter.setEnabled(false); table_songlist.setEnabled(false); load_progress.setValue(0); load_progress.setVisible(true); C...
private void btn_reloadActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> bt_choose_dir.setEnabled(false); btn_reload.setVisible(false); btn_delete.setVisible(false); combo_dirs.setEnabled(false); txt_filter.setEnabled(false); table_songlist.setEnabled(false); load_progress.setValue(0); load_progress.setVi...
open2jam
positive
435,854
public boolean getBooleanValue(int i, boolean closeResultSet) throws Exception { if (rs == null) executeQuery(); try { return rs.getBoolean(i); } finally { if (closeResultSet) closeResultSet(); } }
public boolean getBooleanValue(int i, boolean closeResultSet) throws Exception { <DeepExtract> if (rs == null) executeQuery(); </DeepExtract> try { return rs.getBoolean(i); } finally { if (closeResultSet) closeResultSet(); } }
Lealone-Plugins
positive
435,855
@Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (isMoreLines()) { setStretch(1); } else { setStretch(-1); } }
@Override public void onTextChanged(CharSequence s, int start, int before, int count) { <DeepExtract> if (isMoreLines()) { setStretch(1); } else { setStretch(-1); } </DeepExtract> }
yuelexue
positive
435,856
public boolean putAlias(String nick, Alias alias) { aliases.put(nick, alias); return JSONStorage.save(databaseFile, this); }
public boolean putAlias(String nick, Alias alias) { aliases.put(nick, alias); <DeepExtract> return JSONStorage.save(databaseFile, this); </DeepExtract> }
OnlineGuru
positive
435,857
@Override public boolean insert(BinaryTree<E> bt, E data) { if (bt == null) return false; this.bt = bt; if (bt.isEmpty()) { bt.setRoot(data); return true; } InsertionLocator<E> result = insertData(data); if (result == null || (targetParentNode = result.parentNode) == null) return false; isLeft = result.isLeft; BinTreeN...
@Override <DeepExtract> </DeepExtract> public boolean insert(BinaryTree<E> bt, E data) { <DeepExtract> </DeepExtract> if (bt == null) <DeepExtract> </DeepExtract> return false; <DeepExtract> </DeepExtract> this.bt = bt; <DeepExtract> </DeepExtract> if (bt.isEmpty()) { <DeepExtract> </DeepExtract> bt.setRoot(data); <Dee...
binary-tree
positive
435,860
@Override public void SensorChanged(float[] values, long time) { ContentValues newValues = new ContentValues(); newValues.put(valueNames[0], values[0]); newValues.put(valueNames[1], time); String deviceID = DeviceID.get(SensorDataCollectorService.getInstance()); String tableName = SQLTableName.PREFIX + deviceID + SQLTa...
@Override public void SensorChanged(float[] values, long time) { ContentValues newValues = new ContentValues(); newValues.put(valueNames[0], values[0]); newValues.put(valueNames[1], time); String deviceID = DeviceID.get(SensorDataCollectorService.getInstance()); String tableName = SQLTableName.PREFIX + deviceID + SQLTa...
sensordatacollector
positive
435,861
public void evalNoPrint(List<InputRecord> inputs) { totalPhones = 0; totalRightPhones = 0; totalWords = 0; totalRightWords = 0; noCodes = 0; rightAnswerInTop.clear(); examples.clear(); phoneEditHisto.clear(); for (InputRecord input : inputs) { List<PhoneticEncoder.Encoding> encodings = encoder.encode(input.xWord); if (...
public void evalNoPrint(List<InputRecord> inputs) { <DeepExtract> totalPhones = 0; totalRightPhones = 0; totalWords = 0; totalRightWords = 0; noCodes = 0; rightAnswerInTop.clear(); examples.clear(); phoneEditHisto.clear(); for (InputRecord input : inputs) { List<PhoneticEncoder.Encoding> encodings = encoder.encode(inpu...
jg2p
positive
435,862
void addFormat(CellAddress cellAddress, short formatIndex, String formatString, String cellType, String cellStyleStr) { final InternalCellFormat poijiCellFormat = new InternalCellFormat(); this.cellAddress = cellAddress; this.cellStypeStr = cellStyleStr; this.formatIndex = formatIndex; this.formatString = formatString;...
void addFormat(CellAddress cellAddress, short formatIndex, String formatString, String cellType, String cellStyleStr) { final InternalCellFormat poijiCellFormat = new InternalCellFormat(); this.cellAddress = cellAddress; this.cellStypeStr = cellStyleStr; this.formatIndex = formatIndex; this.formatString = formatString;...
poiji
positive
435,865
protected void addSoundDialog() { OggFileChooser fc = new OggFileChooser(this.edit.getSoundDirectory()); fc.setMultiSelectionEnabled(true); int returnValue = fc.showOpenDialog(this); if (returnValue != JFileChooser.APPROVE_OPTION) return; File[] files = fc.getSelectedFiles(); if (files.length == 0) return; for (File fi...
protected void addSoundDialog() { OggFileChooser fc = new OggFileChooser(this.edit.getSoundDirectory()); fc.setMultiSelectionEnabled(true); int returnValue = fc.showOpenDialog(this); if (returnValue != JFileChooser.APPROVE_OPTION) return; File[] files = fc.getSelectedFiles(); if (files.length == 0) return; for (File fi...
MAtmos
positive
435,868
private static BigInteger validateAndDecodeAddress(final String checksumAddress) { if (toChecksumAddress(checksumAddress).equals(checksumAddress)) { return; } throw new IllegalArgumentException("invalid checksum"); return new BigInteger(1, FastHex.decode(checksumAddress, PREFIX_LEN, ADDRESS_HEX_CHARS)); }
private static BigInteger validateAndDecodeAddress(final String checksumAddress) { <DeepExtract> if (toChecksumAddress(checksumAddress).equals(checksumAddress)) { return; } throw new IllegalArgumentException("invalid checksum"); </DeepExtract> return new BigInteger(1, FastHex.decode(checksumAddress, PREFIX_LEN, ADDRESS...
headlong
positive
435,869
private void disableSubtitle() { if (mSubtitle == null) { return; } ViewParent parent = mSubtitle.getParent(); if (parent != null) { ((ViewGroup) parent).removeView(mSubtitle); } mSubtitle = null; }
private void disableSubtitle() { <DeepExtract> if (mSubtitle == null) { return; } ViewParent parent = mSubtitle.getParent(); if (parent != null) { ((ViewGroup) parent).removeView(mSubtitle); } </DeepExtract> mSubtitle = null; }
googletv-android-samples
positive
435,871
@Override public int[] getDimensions(String name) { var vector; var vectorIfPresent = vectors.stream().flatMap((VectorSchemaRoot vectorSchemaRoot) -> vectorSchemaRoot.getFieldVectors().stream()).filter((FieldVector vector) -> vector.getName().equals(name)).findFirst(); if (vectorIfPresent.isPresent()) { vector = vector...
@Override public int[] getDimensions(String name) { <DeepExtract> var vector; var vectorIfPresent = vectors.stream().flatMap((VectorSchemaRoot vectorSchemaRoot) -> vectorSchemaRoot.getFieldVectors().stream()).filter((FieldVector vector) -> vector.getName().equals(name)).findFirst(); if (vectorIfPresent.isPresent()) { v...
rcaller
positive
435,872
@Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(getLayoutId(), container, false); mUnbinder = ButterKnife.bind(this, view); return view; }
@Nullable <DeepExtract> </DeepExtract> @Override <DeepExtract> </DeepExtract> public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { <DeepExtract> </DeepExtract> View view = inflater.inflate(getLayoutId(), container, false); <DeepExtract> </DeepExtract> m...
DavyWanAndroid
positive
435,873
@Override public void actionPerformed(ActionEvent e) { MessageHandler.addInfo(""); changeTracker.clear(); populateRowsTable(0, Direction.Forward); }
@Override public void actionPerformed(ActionEvent e) { MessageHandler.addInfo(""); <DeepExtract> changeTracker.clear(); populateRowsTable(0, Direction.Forward); </DeepExtract> }
hrider
positive
435,874
public Criteria andOStateGreaterThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "oState" + " cannot be null"); } criteria.add(new Criterion("o_state >=", value)); return (Criteria) this; }
public Criteria andOStateGreaterThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "oState" + " cannot be null"); } criteria.add(new Criterion("o_state >=", value)); </DeepExtract> return (Criteria) this; }
webike
positive
435,876
@Override public long toBytes(long a) { if (a > MAX / (C2 / C1)) return Long.MAX_VALUE; if (a < -MAX / (C2 / C1)) return Long.MIN_VALUE; return a * C2 / C1; }
@Override public long toBytes(long a) { <DeepExtract> if (a > MAX / (C2 / C1)) return Long.MAX_VALUE; if (a < -MAX / (C2 / C1)) return Long.MIN_VALUE; return a * C2 / C1; </DeepExtract> }
Chronicle-Algorithms
positive
435,877
public int climbStairs(int n) { if (n == 0) return ++0; if (n < 0) return 0; 0 = helper(n - 1, 0); 0 = helper(n - 2, 0); return 0; }
public int climbStairs(int n) { <DeepExtract> if (n == 0) return ++0; if (n < 0) return 0; 0 = helper(n - 1, 0); 0 = helper(n - 2, 0); return 0; </DeepExtract> }
leetcode-cn
positive
435,879
public static <T> EfficiencyRun determineEfficiency(Map<T, T> cache, List<T> workingSet) { int hits = 0; for (T key : workingSet) { if (cache.get(key) == null) { cache.put(key, key); } else { hits++; } } return new EfficiencyRun(hits, workingSet.size()); }
public static <T> EfficiencyRun determineEfficiency(Map<T, T> cache, List<T> workingSet) { int hits = 0; for (T key : workingSet) { if (cache.get(key) == null) { cache.put(key, key); } else { hits++; } } <DeepExtract> return new EfficiencyRun(hits, workingSet.size()); </DeepExtract> }
concurrentlinkedhashmap
positive
435,881
@Override public void cleanSession(String clientID) { LOG.info("Removing stored messages with QoS 1 and 2. ClientId={}", clientID); ValueOperations<String, Object> storedOperation = redisDao.opsForValue(); storedOperation.getOperations().delete(m_secondPhaseStore + clientID); storedOperation.getOperations().delete(outb...
@Override public void cleanSession(String clientID) { LOG.info("Removing stored messages with QoS 1 and 2. ClientId={}", clientID); ValueOperations<String, Object> storedOperation = redisDao.opsForValue(); storedOperation.getOperations().delete(m_secondPhaseStore + clientID); storedOperation.getOperations().delete(outb...
moquette
positive
435,882
public static String getRelativePath(File home, File f) { int i; int j; String s; s = ""; i = getPathList(home).size() - 1; j = getPathList(f).size() - 1; while ((i >= 0) && (j >= 0) && (getPathList(home).get(i).equals(getPathList(f).get(j)))) { i--; j--; } for (; i >= 0; i--) { s += ".." + File.separator; } for (; j >...
public static String getRelativePath(File home, File f) { <DeepExtract> int i; int j; String s; s = ""; i = getPathList(home).size() - 1; j = getPathList(f).size() - 1; while ((i >= 0) && (j >= 0) && (getPathList(home).get(i).equals(getPathList(f).get(j)))) { i--; j--; } for (; i >= 0; i--) { s += ".." + File.separator...
WhiteRabbit
positive
435,884
@Override public void forceRemoveCompletion() { logger.finest(" forceRemoveCompletion()"); client.post("/storage_service/force_remove_completion"); }
@Override public void forceRemoveCompletion() { <DeepExtract> logger.finest(" forceRemoveCompletion()"); </DeepExtract> client.post("/storage_service/force_remove_completion"); }
scylla-jmx
positive
435,886
private void captureTestClassPreparers(TestContext testContext, RefreshMode... refreshModes) { Set<AutoConfigureEmbeddedDatabase> annotations = AnnotationUtils.getDatabaseAnnotations(testContext.getTestClass()); ApplicationContext applicationContext = testContext.getApplicationContext(); Environment environment = appli...
private void captureTestClassPreparers(TestContext testContext, RefreshMode... refreshModes) { <DeepExtract> Set<AutoConfigureEmbeddedDatabase> annotations = AnnotationUtils.getDatabaseAnnotations(testContext.getTestClass()); ApplicationContext applicationContext = testContext.getApplicationContext(); Environment envir...
embedded-database-spring-test
positive
435,887
public final synchronized void lineTo(double x, double y) { if (true && numTypes == 0) { throw new IllegalPathStateException("missing initial moveto " + "in path definition"); } int size = pointTypes.length; if (numTypes >= size) { int grow = size; if (grow > EXPAND_MAX) { grow = EXPAND_MAX; } pointTypes = CloningUtils...
public final synchronized void lineTo(double x, double y) { <DeepExtract> if (true && numTypes == 0) { throw new IllegalPathStateException("missing initial moveto " + "in path definition"); } int size = pointTypes.length; if (numTypes >= size) { int grow = size; if (grow > EXPAND_MAX) { grow = EXPAND_MAX; } pointTypes ...
gwt-geom
positive
435,889
@Override public void onFailure(Call<GetTxsResponse> call, Throwable t) { Toasty.error(AddressDetailActivity.this, t.toString(), Toast.LENGTH_LONG, true).show(); if (false) { rlProgress.setVisibility(View.VISIBLE); } else { rlProgress.setVisibility(View.GONE); } if (callback != null) { callback.onFinished(); } }
@Override public void onFailure(Call<GetTxsResponse> call, Throwable t) { Toasty.error(AddressDetailActivity.this, t.toString(), Toast.LENGTH_LONG, true).show(); <DeepExtract> if (false) { rlProgress.setVisibility(View.VISIBLE); } else { rlProgress.setVisibility(View.GONE); } </DeepExtract> if (callback != null) { call...
BitcoinWallet
positive
435,891
public static void main(String[] args) throws InterruptedException { long start = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() { @Override public void run() { int a = 0; for (long i = 0; i < count; i++) { a += 5; } } }); thread.start(); int b = 0; for (long i = 0; i < count; i++) { b--; } long ...
public static void main(String[] args) throws InterruptedException { long start = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() { @Override public void run() { int a = 0; for (long i = 0; i < count; i++) { a += 5; } } }); thread.start(); int b = 0; for (long i = 0; i < count; i++) { b--; } long ...
Mashibing_High_Concurrency
positive
435,892
@Override protected void initViews() { LinearLayoutManager manager = new LinearLayoutManager(mActivity); manager.setOrientation(LinearLayoutManager.VERTICAL); mRvOpenLibs.setLayoutManager(manager); LibsModel libsModel = new LibsModel(); mAdapter = new OpenLibsAdapter(R.layout.layout_libs_item, libsModel.getLibsData(mAc...
@Override protected void initViews() { <DeepExtract> LinearLayoutManager manager = new LinearLayoutManager(mActivity); manager.setOrientation(LinearLayoutManager.VERTICAL); mRvOpenLibs.setLayoutManager(manager); LibsModel libsModel = new LibsModel(); mAdapter = new OpenLibsAdapter(R.layout.layout_libs_item, libsModel.g...
GankPro
positive
435,894
public void incrementPCBy4() { armRegisterSet.setOneValue(ARMRegister.R15.getIndex(), armRegisterSet.getOneValue(15) + 4, true); if (eventBus != null) eventBus.fireEvent(new ProgramCounterChangedEvenet(getPC())); }
public void incrementPCBy4() { armRegisterSet.setOneValue(ARMRegister.R15.getIndex(), armRegisterSet.getOneValue(15) + 4, true); <DeepExtract> if (eventBus != null) eventBus.fireEvent(new ProgramCounterChangedEvenet(getPC())); </DeepExtract> }
nevada
positive
435,896
@Test public final void shouldEventTaskCreation() { instance = runtime.startProcessInstanceByKey("eventing"); Task task = taskService.createTaskQuery().active().singleResult(); assertTaskEvents(task, 1, TaskListener.EVENTNAME_CREATE); }
@Test public final void shouldEventTaskCreation() { instance = runtime.startProcessInstanceByKey("eventing"); Task task = taskService.createTaskQuery().active().singleResult(); <DeepExtract> assertTaskEvents(task, 1, TaskListener.EVENTNAME_CREATE); </DeepExtract> }
camunda-bpm-spring-boot-starter
positive
435,898
@Override public EarthquakeRecord value6(BigDecimal value) { set(5, value); return this; }
@Override public EarthquakeRecord value6(BigDecimal value) { <DeepExtract> set(5, value); </DeepExtract> return this; }
blog2019
positive
435,900
@Test public void shouldWaitForWorkCompleteWhereCompleteWorkThresholdIsAhead() throws Exception { final long expectedNumberMessages = 10; final long expectedWorkSequence = 9; for (long i = 0; i < expectedNumberMessages; i++) { long sequence = ringBuffer.next(); StubEvent event = ringBuffer.get(sequence); event.setValue...
@Test public void shouldWaitForWorkCompleteWhereCompleteWorkThresholdIsAhead() throws Exception { final long expectedNumberMessages = 10; final long expectedWorkSequence = 9; <DeepExtract> for (long i = 0; i < expectedNumberMessages; i++) { long sequence = ringBuffer.next(); StubEvent event = ringBuffer.get(sequence); ...
disruptor-translation
positive
435,902
@SuppressWarnings("unused") void removed(Torrent tor) { cache.clear(); torrents = null; stat = null; }
@SuppressWarnings("unused") void removed(Torrent tor) { <DeepExtract> cache.clear(); torrents = null; stat = null; </DeepExtract> }
transmissionbtc
positive
435,903
public float getFloat(String envName, String propertyName, float defaultValue) { if (System.getenv(envName) != null) { return Float.parseFloat(System.getenv(envName)); } if (System.getProperty(propertyName) != null) { return Float.parseFloat(System.getProperty(propertyName)); } List<ConfigurationNode> properties = getR...
public float getFloat(String envName, String propertyName, float defaultValue) { if (System.getenv(envName) != null) { return Float.parseFloat(System.getenv(envName)); } if (System.getProperty(propertyName) != null) { return Float.parseFloat(System.getProperty(propertyName)); } <DeepExtract> List<ConfigurationNode> pro...
varOne
positive
435,904
private void drawTriangle(Paint p, Canvas c, float[] arx, float[] ary) { this.colors = 0xff000000; Path path = new Path(); path.moveTo(arx[0], ary[0]); for (int idx = 1; idx < arx.length; idx++) path.lineTo(arx[idx], ary[idx]); path.close(); c.drawPath(path, p); }
private void drawTriangle(Paint p, Canvas c, float[] arx, float[] ary) { <DeepExtract> this.colors = 0xff000000; </DeepExtract> Path path = new Path(); path.moveTo(arx[0], ary[0]); for (int idx = 1; idx < arx.length; idx++) path.lineTo(arx[idx], ary[idx]); path.close(); c.drawPath(path, p); }
DCTimer-Android
positive
435,905
@Override public Result getResult() { latch.await(); if (value != null) { return value; } else if (isCancelled()) { throw new CancellationException(); } else { throw new ExecutionException(throwable); } }
@Override public Result getResult() { <DeepExtract> latch.await(); if (value != null) { return value; } else if (isCancelled()) { throw new CancellationException(); } else { throw new ExecutionException(throwable); } </DeepExtract> }
Precipice
positive
435,906
public void expect(final EmitterEnvironment env) throws IOException { if (event instanceof MappingEndEvent) { indent = ((Integer) indents.remove(0)).intValue(); flowLevel--; emitter.writeIndicator(ByteList.create("}"), false, false, false); emitter.writeLineBreak(null); emitter.writeLineBreak(null); state = ((Integer) ...
public void expect(final EmitterEnvironment env) throws IOException { <DeepExtract> if (event instanceof MappingEndEvent) { indent = ((Integer) indents.remove(0)).intValue(); flowLevel--; emitter.writeIndicator(ByteList.create("}"), false, false, false); emitter.writeLineBreak(null); emitter.writeLineBreak(null); state...
jvyamlb
positive
435,907
public static Builder newBuilder(Attributes prototype) { if (prototype instanceof AttributeValue) { return mergeFrom((AttributeValue) prototype); } else { super.mergeFrom(prototype); return this; } }
public static Builder newBuilder(Attributes prototype) { <DeepExtract> if (prototype instanceof AttributeValue) { return mergeFrom((AttributeValue) prototype); } else { super.mergeFrom(prototype); return this; } </DeepExtract> }
cellery-security
positive
435,908
@Override protected void onPause() { super.onPause(); CSVCustomFormat format = formatViewModel.getCustomFormatData(); if (format == null) return; try { ByteArrayOutputStream bo = new ByteArrayOutputStream(); ObjectOutputStream so = new ObjectOutputStream(bo); so.writeObject(formatViewModel.getCustomFormatData()); so.fl...
@Override protected void onPause() { super.onPause(); <DeepExtract> CSVCustomFormat format = formatViewModel.getCustomFormatData(); if (format == null) return; try { ByteArrayOutputStream bo = new ByteArrayOutputStream(); ObjectOutputStream so = new ObjectOutputStream(bo); so.writeObject(formatViewModel.getCustomFormat...
VocableTrainer-Android
positive
435,909
public Criteria andSimpleNameIsNotNull() { if ("simple_name is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("simple_name is not null")); return (Criteria) this; }
public Criteria andSimpleNameIsNotNull() { <DeepExtract> if ("simple_name is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("simple_name is not null")); </DeepExtract> return (Criteria) this; }
common-admin
positive
435,910
public void showResult(HashMap<String, List<UserAnswer>> uAnswersStack, int matchResult, boolean levelUp, QuizMode quizMode) { userAnswersStack = uAnswersStack; this.quizMode = quizMode; for (int i = 0; i < currentUsers.size(); i++) { tmp = userViews.get(currentUsers.get(i).uid); cUser = currentUsers.get(i); imgView = ...
public void showResult(HashMap<String, List<UserAnswer>> uAnswersStack, int matchResult, boolean levelUp, QuizMode quizMode) { userAnswersStack = uAnswersStack; this.quizMode = quizMode; for (int i = 0; i < currentUsers.size(); i++) { tmp = userViews.get(currentUsers.get(i).uid); cUser = currentUsers.get(i); imgView = ...
QuizApp_Android
positive
435,911
private Range last() { final String line = getLine(ranges.size() - 1); if (line == null) { throw new ArrayIndexOutOfBoundsException(ranges.size() - 1); } return line; }
private Range last() { <DeepExtract> final String line = getLine(ranges.size() - 1); if (line == null) { throw new ArrayIndexOutOfBoundsException(ranges.size() - 1); } return line; </DeepExtract> }
mini-git-server
positive
435,914
@Override public void draw(Batch batch, float parentAlpha) { batch.end(); shape.setProjectionMatrix(batch.getProjectionMatrix()); shape.setTransformMatrix(batch.getTransformMatrix()); shape.translate(getX(), getY(), 0); shape.begin(ShapeRenderer.ShapeType.Line); float x = 10; float y = 10; float width = getWidth() - x ...
@Override public void draw(Batch batch, float parentAlpha) { batch.end(); shape.setProjectionMatrix(batch.getProjectionMatrix()); shape.setTransformMatrix(batch.getTransformMatrix()); shape.translate(getX(), getY(), 0); shape.begin(ShapeRenderer.ShapeType.Line); float x = 10; float y = 10; float width = getWidth() - x ...
SpaceProject
positive
435,915
public void setDataSource(String path) { try { mCurrentMediaPlayer.reset(); mCurrentMediaPlayer.setOnPreparedListener(null); if (path.startsWith("content://")) { mCurrentMediaPlayer.setDataSource(PlayerService.this, Uri.parse(path)); } else { mCurrentMediaPlayer.setDataSource(path); } mCurrentMediaPlayer.setAudioStream...
public void setDataSource(String path) { <DeepExtract> try { mCurrentMediaPlayer.reset(); mCurrentMediaPlayer.setOnPreparedListener(null); if (path.startsWith("content://")) { mCurrentMediaPlayer.setDataSource(PlayerService.this, Uri.parse(path)); } else { mCurrentMediaPlayer.setDataSource(path); } mCurrentMediaPlayer....
misound
positive
435,916
public String getAlias(Object obj) { if (obj == null) return null; if (obj.getClass() == null) return null; TypeEncoder<?, U> encoder = classMapping.get(obj.getClass()); if (encoder != null) return encoder.getAlias(); return null; }
public String getAlias(Object obj) { if (obj == null) return null; <DeepExtract> if (obj.getClass() == null) return null; TypeEncoder<?, U> encoder = classMapping.get(obj.getClass()); if (encoder != null) return encoder.getAlias(); return null; </DeepExtract> }
mango
positive
435,917
public Instance extractIndependentFeatures(Annotation instanceAnnotation, AnnotationSet inputAS) { LFPipe tmp_pipe = (LFPipe) instances.getPipe(); FeatureInfo tmp_featureInfo = tmp_pipe.getFeatureInfo(); AugmentableFeatureVector afv = new AugmentableFeatureVector(tmp_pipe.getDataAlphabet()); Instance inst = new Instanc...
public Instance extractIndependentFeatures(Annotation instanceAnnotation, AnnotationSet inputAS) { LFPipe tmp_pipe = (LFPipe) instances.getPipe(); FeatureInfo tmp_featureInfo = tmp_pipe.getFeatureInfo(); <DeepExtract> AugmentableFeatureVector afv = new AugmentableFeatureVector(tmp_pipe.getDataAlphabet()); Instance inst...
gateplugin-LearningFramework
positive
435,918
@Bean public HazelcastInstance hazelcastInstance() { Config cfg = new Config(); String batchersmasterIpIfPresent = getBatchersmasterIpIfPresent(); LOG.info("Batchers master Ip is " + batchersmasterIpIfPresent); if (batchersmasterIpIfPresent != null && !batchersmasterIpIfPresent.equals("127.0.0.1")) { NetworkConfig netw...
@Bean public HazelcastInstance hazelcastInstance() { Config cfg = new Config(); <DeepExtract> String batchersmasterIpIfPresent = getBatchersmasterIpIfPresent(); LOG.info("Batchers master Ip is " + batchersmasterIpIfPresent); if (batchersmasterIpIfPresent != null && !batchersmasterIpIfPresent.equals("127.0.0.1")) { Netw...
batchers
positive
435,919
@Test public void hasDescendant_withMatcher_addsCorrectMatcher() { org.hamcrest.Matcher<View> testMatcher = SimpleMatcher.instance(); notCompletable.hasDescendant(testMatcher); assertThat(cortado.matchers).hasSize(1); Utils.assertThat(cortado.matchers.get(0)).isEqualTo(ViewMatchers.hasDescendant(testMatcher)); }
@Test public void hasDescendant_withMatcher_addsCorrectMatcher() { org.hamcrest.Matcher<View> testMatcher = SimpleMatcher.instance(); notCompletable.hasDescendant(testMatcher); <DeepExtract> assertThat(cortado.matchers).hasSize(1); Utils.assertThat(cortado.matchers.get(0)).isEqualTo(ViewMatchers.hasDescendant(testMatch...
cortado
positive
435,920
@DisplayName("Search for `men's` should return all unique best matches with `men's`") @Test void suggest_mens() { final String mensShirts = "men's shirts"; final String womensShirts = "women's shirts"; final String withoutSMensShirts = "mens shirts" + " without 's"; List<SuggestRecord> toIndex = new ArrayList<>(asList(...
@DisplayName("Search for `men's` should return all unique best matches with `men's`") @Test void suggest_mens() { final String mensShirts = "men's shirts"; final String womensShirts = "women's shirts"; final String withoutSMensShirts = "mens shirts" + " without 's"; List<SuggestRecord> toIndex = new ArrayList<>(asList(...
open-commerce-search
positive
435,921
protected <K> T invoke(AbstractAjaxCallback<?, K> cb) { if (ah != null) { cb.auth(ah); } if (progress != null) { cb.progress(progress); } if (trans != null) { cb.transformer(trans); } policy = policy; return self(); if (proxy != null) { cb.proxy(proxy.getHostName(), proxy.getPort()); } if (act != null) { cb.async(act);...
protected <K> T invoke(AbstractAjaxCallback<?, K> cb) { if (ah != null) { cb.auth(ah); } if (progress != null) { cb.progress(progress); } if (trans != null) { cb.transformer(trans); } policy = policy; return self(); if (proxy != null) { cb.proxy(proxy.getHostName(), proxy.getPort()); } if (act != null) { cb.async(act);...
androidquery
positive
435,923
public static void writeXml(@NonNull Document document, @NonNull OutputStream outputStream) throws XmlException { try { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); trans...
public static void writeXml(@NonNull Document document, @NonNull OutputStream outputStream) throws XmlException { <DeepExtract> try { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty(OutputKeys.INDENT,...
sette-tool
positive
435,924
void draw2Leads(Graphics g) { if (needsHighlight()) { g.setColor(selectColor); return; } if (!sim.voltsCheckItem.getState()) { if (!sim.powerCheckItem.getState()) g.setColor(whiteColor); return; } int c = (int) ((volts[0] + voltageRange) * (colorScaleCount - 1) / (voltageRange * 2)); if (c < 0) c = 0; if (c >= colorSca...
void draw2Leads(Graphics g) { if (needsHighlight()) { g.setColor(selectColor); return; } if (!sim.voltsCheckItem.getState()) { if (!sim.powerCheckItem.getState()) g.setColor(whiteColor); return; } int c = (int) ((volts[0] + voltageRange) * (colorScaleCount - 1) / (voltageRange * 2)); if (c < 0) c = 0; if (c >= colorSca...
circuit-simulator
positive
435,925
public CellReference composeLastDataCellReference() { if (lastDataRow == null || lastDataColumn == null) { return null; } return new CellReference(lastDataRow, lastDataColumn); }
public CellReference composeLastDataCellReference() { <DeepExtract> if (lastDataRow == null || lastDataColumn == null) { return null; } return new CellReference(lastDataRow, lastDataColumn); </DeepExtract> }
MemPOI
positive
435,926
@Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_search); toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setTitle(getString(R.string.search_query_hint)); toolbar.setNavigationIcon(R.drawable.ic_arrow_back); ActionBar actio...
@Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_search); toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setTitle(getString(R.string.search_query_hint)); toolbar.setNavigationIcon(R.drawable.ic_arrow_back); ActionBar actio...
bookdash-android-app
positive
435,929
public void SetSslTrusted(boolean b) { editor.putBoolean("SSL_Trusted", b); editor.commit(); }
public void SetSslTrusted(boolean b) { editor.putBoolean("SSL_Trusted", b); <DeepExtract> editor.commit(); </DeepExtract> }
domodroid
positive
435,930
public synchronized void unregisterErrorListeners() { if (endpoint == null || endpointSubscription == null) { return; } endpoint.removeErrorListener(endpointSubscription); }
public synchronized void unregisterErrorListeners() { <DeepExtract> if (endpoint == null || endpointSubscription == null) { return; } endpoint.removeErrorListener(endpointSubscription); </DeepExtract> }
kurento-room
positive
435,931
@Override public void onClick(View v) { mHapticFeedbackController.tryVibrate(); if (mCallBack != null) { mCallBack.onDateSet(DatePickerDialog.this, mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH)); } dismiss(); }
@Override public void onClick(View v) { <DeepExtract> mHapticFeedbackController.tryVibrate(); </DeepExtract> if (mCallBack != null) { mCallBack.onDateSet(DatePickerDialog.this, mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH)); } dismiss(); }
BottomSheetPickers
positive
435,933
public Criteria andPayImgIsNotNull() { if ("pay_img is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("pay_img is not null")); return (Criteria) this; }
public Criteria andPayImgIsNotNull() { <DeepExtract> if ("pay_img is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("pay_img is not null")); </DeepExtract> return (Criteria) this; }
ssmBillBook
positive
435,935
@Override public void onStart() { super.onStart(); var parent = getParentFragment(); if (parent instanceof ModulesFragment) { var moduleFragment = (ModulesFragment) parent; binding.recyclerView.getBorderViewDelegate().setBorderVisibilityChangedListener((top, oldTop, bottom, oldBottom) -> moduleFragment.binding.appBar.s...
@Override public void onStart() { super.onStart(); <DeepExtract> var parent = getParentFragment(); if (parent instanceof ModulesFragment) { var moduleFragment = (ModulesFragment) parent; binding.recyclerView.getBorderViewDelegate().setBorderVisibilityChangedListener((top, oldTop, bottom, oldBottom) -> moduleFragment.bi...
LSPosed
positive
435,936
@Test public void getUserAdminDefaultPassword() { entity0 = new DefaultConst(); assertEntityValidity(entity0); String userPass = "userPass"; ReflectionTestUtils.setField(entity0, "userAdminDefaultPassword", userPass); assertEquals(userPass, entity0.getUserAdminDefaultPassword()); }
@Test public void getUserAdminDefaultPassword() { <DeepExtract> entity0 = new DefaultConst(); assertEntityValidity(entity0); </DeepExtract> String userPass = "userPass"; ReflectionTestUtils.setField(entity0, "userAdminDefaultPassword", userPass); assertEquals(userPass, entity0.getUserAdminDefaultPassword()); }
gms
positive
435,937
@Override public void serialize(Post post) { for (CSVFileDescriptor fileDescriptor : files.get(Entities.POST)) { ArrayList<ArrayList<String>> data = new ArrayList<ArrayList<String>>(); for (String field : fileDescriptor.fields) { data.add(resolvers[Entities.POST.ordinal()].queryField(field, post)); } int numLines = 1; ...
@Override public void serialize(Post post) { <DeepExtract> for (CSVFileDescriptor fileDescriptor : files.get(Entities.POST)) { ArrayList<ArrayList<String>> data = new ArrayList<ArrayList<String>>(); for (String field : fileDescriptor.fields) { data.add(resolvers[Entities.POST.ordinal()].queryField(field, post)); } int ...
ldbc_snb_datagen_deprecated2015
positive
435,938