before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Override public void initView() { mModel.getTitle(); mBinder.toolbar.setTitle(getString(R.string.rb_home)); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { Explode explode = new Explode(); explode.setDuration(1000); getActivity().getWindow().setEnterTransition(explode); } }
@Override public void initView() { mModel.getTitle(); mBinder.toolbar.setTitle(getString(R.string.rb_home)); <DeepExtract> if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { Explode explode = new Explode(); explode.setDuration(1000); getActivity().getWindow().setEnterTransition(explode);...
RxFamilyUser
positive
761
public static void copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) throws IOException { if (null == destDir) { throw new NullPointerException("Destination must not be null"); } if (destDir.exists() && !destDir.isDirectory()) { throw new IllegalArgumentException("Destination '" + destDir + "' i...
public static void copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) throws IOException { if (null == destDir) { throw new NullPointerException("Destination must not be null"); } if (destDir.exists() && !destDir.isDirectory()) { throw new IllegalArgumentException("Destination '" + destDir + "' i...
bigapple
positive
762
@Test public void testCancel() { String idOne = tryCreateAndShouldCreate().getId(); tryCreateAndShouldNotCreate(); id -> listener.byId(response(id, OrderStatus.CANCELED)).accept(idOne); tryCreateAndShouldCreate(); tryCreateAndShouldNotCreate(); }
@Test public void testCancel() { <DeepExtract> String idOne = tryCreateAndShouldCreate().getId(); tryCreateAndShouldNotCreate(); id -> listener.byId(response(id, OrderStatus.CANCELED)).accept(idOne); tryCreateAndShouldCreate(); tryCreateAndShouldNotCreate(); </DeepExtract> }
GTC-all-repo
positive
763
@Override public void actionPerformed(java.awt.event.ActionEvent evt) { encodeData(); }
@Override public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> encodeData(); </DeepExtract> }
OkapiBarcode
positive
764
public String printRecords(Object... values) throws IOException { csvPrinter.printRecords(values); writer.flush(); final String output = writer.getBuffer().toString(); writer.getBuffer().setLength(0); return output; }
public String printRecords(Object... values) throws IOException { csvPrinter.printRecords(values); <DeepExtract> writer.flush(); final String output = writer.getBuffer().toString(); writer.getBuffer().setLength(0); return output; </DeepExtract> }
freemarker-generator
positive
765
@Override public void run() { if (status.isLoadable(false)) { synchronized (lock) { if (status.isLoadable(false)) { try { asset = Assets.get(info); status = FutureAssetStatus.Loaded; failure = null; } catch (AssetException e) { failure = e; status = FutureAssetStatus.Failed; } } } } return asset; }
@Override public void run() { <DeepExtract> if (status.isLoadable(false)) { synchronized (lock) { if (status.isLoadable(false)) { try { asset = Assets.get(info); status = FutureAssetStatus.Loaded; failure = null; } catch (AssetException e) { failure = e; status = FutureAssetStatus.Failed; } } } } return asset; </DeepEx...
Azzet
positive
766
@Override public void handleMessage(Message msg) { super.handleMessage(msg); prepareBackgroundManager(); setupUIElements(); loadRows(); setupEventListeners(); }
@Override public void handleMessage(Message msg) { super.handleMessage(msg); <DeepExtract> prepareBackgroundManager(); setupUIElements(); loadRows(); setupEventListeners(); </DeepExtract> }
CumulusTV
positive
767
public static final void quickSort(Object[] array, int offset, int len, GComparator comparator) throws NullPointerException, ArrayIndexOutOfBoundsException { int level = array.length; boolean isGreater = false; int offset, len = comparator.length; if (comparator != comparator) { if ((offset = comparator.length) < len) ...
public static final void quickSort(Object[] array, int offset, int len, GComparator comparator) throws NullPointerException, ArrayIndexOutOfBoundsException { int level = array.length; <DeepExtract> boolean isGreater = false; int offset, len = comparator.length; if (comparator != comparator) { if ((offset = comparator.l...
AndroidRepeaterProject
positive
768
public Criteria andAccessAuthorityNotLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "accessAuthority" + " cannot be null"); } criteria.add(new Criterion("access_authority not like", value)); return (Criteria) this; }
public Criteria andAccessAuthorityNotLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "accessAuthority" + " cannot be null"); } criteria.add(new Criterion("access_authority not like", value)); </DeepExtract> return (Criteria) this; }
AnyMock
positive
769
public void onLayoutComplete() { return mLayoutManager.getWidth() - mLayoutManager.getPaddingLeft() - mLayoutManager.getPaddingRight(); }
public void onLayoutComplete() { <DeepExtract> return mLayoutManager.getWidth() - mLayoutManager.getPaddingLeft() - mLayoutManager.getPaddingRight(); </DeepExtract> }
RxBanner
positive
770
public void settingsChanged(SettingsChangedEvent e) { ProtocolSettings settings = (ProtocolSettings) e.getSource(); if (!settings.isAllowClipboardTransfer()) { this.isRunning = false; } if (settings.isAllowClipboardTransfer() && !this.isEnabled) { (new Thread(this)).start(); } this.isEnabled = settings.isAllowClipboard...
public void settingsChanged(SettingsChangedEvent e) { ProtocolSettings settings = (ProtocolSettings) e.getSource(); <DeepExtract> if (!settings.isAllowClipboardTransfer()) { this.isRunning = false; } if (settings.isAllowClipboardTransfer() && !this.isEnabled) { (new Thread(this)).start(); } this.isEnabled = settings.is...
tvnjviewer4cs
positive
771
public User f(SessionId sessionId, InterestLevel interestLevel, User user) { UserSessionAssociation userSessionAssociation = sessionAssociations.get(sessionId).orSome(UserSessionAssociation.$constructor_().f(sessionId).f(interestLevel)).interestLevel(interestLevel); return new User(id, name, sessionAssociations.set(ses...
public User f(SessionId sessionId, InterestLevel interestLevel, User user) { <DeepExtract> UserSessionAssociation userSessionAssociation = sessionAssociations.get(sessionId).orSome(UserSessionAssociation.$constructor_().f(sessionId).f(interestLevel)).interestLevel(interestLevel); return new User(id, name, sessionAssoci...
incogito
positive
772
public static void polygon(double[] x, double[] y) { if (x == null) throw new IllegalArgumentException("x-coordinate array is null"); if (y == null) throw new IllegalArgumentException("y-coordinate array is null"); int n1 = x.length; int n2 = y.length; if (n1 != n2) throw new IllegalArgumentException("arrays must be of...
public static void polygon(double[] x, double[] y) { if (x == null) throw new IllegalArgumentException("x-coordinate array is null"); if (y == null) throw new IllegalArgumentException("y-coordinate array is null"); int n1 = x.length; int n2 = y.length; if (n1 != n2) throw new IllegalArgumentException("arrays must be of...
skeleton-sp18
positive
773
@Override public void set(TableId table, Value shardValue, Timestamp commitTimestamp) { Preconditions.checkNotNull(table); Preconditions.checkNotNull(commitTimestamp); if (!initialized) { initialize(); } Type.Code t = shardValue == null ? null : shardValue.getType().getCode(); client.writeAtLeastOnce(Collections.single...
@Override public void set(TableId table, Value shardValue, Timestamp commitTimestamp) { <DeepExtract> Preconditions.checkNotNull(table); Preconditions.checkNotNull(commitTimestamp); if (!initialized) { initialize(); } Type.Code t = shardValue == null ? null : shardValue.getType().getCode(); client.writeAtLeastOnce(Coll...
spanner-change-watcher
positive
774
@Override public void onClick(View v) { if (tint_color != Color.parseColor("#FFA0D722")) { tint_color = Color.parseColor("#FFA0D722"); applyTempSelectedEffect(); } }
@Override public void onClick(View v) { <DeepExtract> if (tint_color != Color.parseColor("#FFA0D722")) { tint_color = Color.parseColor("#FFA0D722"); applyTempSelectedEffect(); } </DeepExtract> }
Dali-Doodle
positive
775
Point2D.Double dragPosition(Point2D.Double newLoc, Dimension workSize) { double x = Math.max(Math.min(newLoc.x, workSize.width / SCREEN_PPI), 0); double y = Math.max(Math.min(newLoc.y, workSize.height / SCREEN_PPI), 0); Point2D.Double delta = new Point2D.Double(x - xLoc, y - yLoc); if (!(this instanceof CNCPath)) { xLo...
Point2D.Double dragPosition(Point2D.Double newLoc, Dimension workSize) { double x = Math.max(Math.min(newLoc.x, workSize.width / SCREEN_PPI), 0); double y = Math.max(Math.min(newLoc.y, workSize.height / SCREEN_PPI), 0); Point2D.Double delta = new Point2D.Double(x - xLoc, y - yLoc); <DeepExtract> if (!(this instanceof C...
LaserCut
positive
776
@Override public Object getRawCache(final String cachePath) { TreeCache cache = findTreeCache(cachePath + "/"); if (null == cache) { return getDirectly(cachePath + "/"); } ChildData resultInCache = cache.getCurrentData(cachePath + "/"); if (null != resultInCache) { return null == resultInCache.getData() ? null : new St...
@Override public Object getRawCache(final String cachePath) { <DeepExtract> TreeCache cache = findTreeCache(cachePath + "/"); if (null == cache) { return getDirectly(cachePath + "/"); } ChildData resultInCache = cache.getCurrentData(cachePath + "/"); if (null != resultInCache) { return null == resultInCache.getData() ?...
shardingsphere-elasticjob-cloud
positive
777
public void setConversationGraph(ConversationGraph graph) { if (_graph != null) _graph.removeAllObservers(); this._graph = graph; clearDialog(); Conversation conversation = _graph.getConversationByID(_graph.getCurrentConversationID()); if (conversation == null) return; _graph.setCurrentConversation(_graph.getCurrentCon...
public void setConversationGraph(ConversationGraph graph) { if (_graph != null) _graph.removeAllObservers(); this._graph = graph; <DeepExtract> clearDialog(); Conversation conversation = _graph.getConversationByID(_graph.getCurrentConversationID()); if (conversation == null) return; _graph.setCurrentConversation(_graph...
BludBourne
positive
778
private void addDate(int increment) { int period = spinner.getSelectedItemPosition(); if (period == DAILY) { currentTime.add(Calendar.DATE, 1 * increment); } else if (period == WEEKLY) { currentTime.add(Calendar.DATE, 7 * increment); } else if (period == MONTHLY) { currentTime.add(Calendar.MONTH, 1 * increment); } else...
private void addDate(int increment) { int period = spinner.getSelectedItemPosition(); if (period == DAILY) { currentTime.add(Calendar.DATE, 1 * increment); } else if (period == WEEKLY) { currentTime.add(Calendar.DATE, 7 * increment); } else if (period == MONTHLY) { currentTime.add(Calendar.MONTH, 1 * increment); } else...
pos
positive
779
public static Map<LoincId, LoincEntry> load(String pathToLoincCoreTable) { LoincTableCoreParser parser = new LoincTableCoreParser(pathToLoincCoreTable); return loincEntries; }
public static Map<LoincId, LoincEntry> load(String pathToLoincCoreTable) { LoincTableCoreParser parser = new LoincTableCoreParser(pathToLoincCoreTable); <DeepExtract> return loincEntries; </DeepExtract> }
loinc2hpo
positive
780
private OSchema getSchema() { final ODatabaseDocument tlDb = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined(); if (database != null && tlDb != database) { database.activateOnCurrentThread(); ODatabaseRecordThreadLocal.INSTANCE.set(database); } return database.getMetadata().getSchema(); }
private OSchema getSchema() { <DeepExtract> final ODatabaseDocument tlDb = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined(); if (database != null && tlDb != database) { database.activateOnCurrentThread(); ODatabaseRecordThreadLocal.INSTANCE.set(database); } </DeepExtract> return database.getMetadata().getSchema(); }
orientdb-gremlin
positive
781
public static void main(String[] args) throws Exception { if (cons == null) cons = new Console(); return cons; if (in != null) in.setMessage("How are you?"); Object s = Toolkit.getDefaultToolkit().getSystemClipboard().getData(java.awt.datatransfer.DataFlavor.stringFlavor); System.out.println(s); System.out.println("Tes...
public static void main(String[] args) throws Exception { if (cons == null) cons = new Console(); return cons; <DeepExtract> if (in != null) in.setMessage("How are you?"); </DeepExtract> Object s = Toolkit.getDefaultToolkit().getSystemClipboard().getData(java.awt.datatransfer.DataFlavor.stringFlavor); System.out.printl...
SmallSimpleSafe
positive
782
@Override public void onBindViewHolder(FormHolder viewHolder, Cursor cursor) { int idColumnIndex = cursor.getColumnIndex(BaseColumns._ID); int displayNameColumnIndex = cursor.getColumnIndex(FormsProviderAPI.FormsColumns.DISPLAY_NAME); int jrFormIdColumnIndex = cursor.getColumnIndex(FormsProviderAPI.FormsColumns.JR_FORM...
@Override public void onBindViewHolder(FormHolder viewHolder, Cursor cursor) { int idColumnIndex = cursor.getColumnIndex(BaseColumns._ID); int displayNameColumnIndex = cursor.getColumnIndex(FormsProviderAPI.FormsColumns.DISPLAY_NAME); int jrFormIdColumnIndex = cursor.getColumnIndex(FormsProviderAPI.FormsColumns.JR_FORM...
skunkworks-crow
positive
783
@Override public void onConnectionFailed(@NonNull ConnectionResult connectionResult) { Toast toast = Toast.makeText(this, "access location fail...", Toast.LENGTH_SHORT); toast.show(); }
@Override public void onConnectionFailed(@NonNull ConnectionResult connectionResult) { <DeepExtract> Toast toast = Toast.makeText(this, "access location fail...", Toast.LENGTH_SHORT); toast.show(); </DeepExtract> }
kkangs_android
positive
784
void initFromCameraParameters(Camera camera) { Camera.Parameters parameters = camera.getParameters(); return previewFormat; previewFormatString = parameters.get("preview-format"); Log.d(TAG, "Default preview format: " + previewFormat + '/' + previewFormatString); WindowManager manager = (WindowManager) context.getSyste...
void initFromCameraParameters(Camera camera) { Camera.Parameters parameters = camera.getParameters(); return previewFormat; previewFormatString = parameters.get("preview-format"); Log.d(TAG, "Default preview format: " + previewFormat + '/' + previewFormatString); WindowManager manager = (WindowManager) context.getSyste...
Android_BaseLib
positive
785
public boolean cellInDbiBts(int lac, int cellID) { String query = String.format(Locale.US, "SELECT CID,LAC FROM DBi_bts WHERE LAC = %d AND CID = %d", lac, cellID); Cursor cursor = mDb.rawQuery(query, null); boolean exists = cursor.getCount() > 0; mDb.close(); return exists; }
public boolean cellInDbiBts(int lac, int cellID) { String query = String.format(Locale.US, "SELECT CID,LAC FROM DBi_bts WHERE LAC = %d AND CID = %d", lac, cellID); Cursor cursor = mDb.rawQuery(query, null); boolean exists = cursor.getCount() > 0; <DeepExtract> mDb.close(); </DeepExtract> return exists; }
AIMSICDL
positive
786
public static Album diamondsAndPearls() { Album album = new Album(6, "Diamonds And Pearls", 1991, prince(), new ArrayList<Song>()); Song song = new Song(16, "Thunder", album); album.getSongs().add(song); Song song = new Song(17, "Cream", album); album.getSongs().add(song); Song song = new Song(18, "Gett Off", album); a...
public static Album diamondsAndPearls() { Album album = new Album(6, "Diamonds And Pearls", 1991, prince(), new ArrayList<Song>()); Song song = new Song(16, "Thunder", album); album.getSongs().add(song); Song song = new Song(17, "Cream", album); album.getSongs().add(song); <DeepExtract> Song song = new Song(18, "Gett O...
yoga
positive
787
public void setTintColor(int color) { if (mStatusBarAvailable) { mStatusBarTintView.setBackgroundColor(color); } if (mNavBarAvailable) { mNavBarTintView.setBackgroundColor(color); } }
public void setTintColor(int color) { if (mStatusBarAvailable) { mStatusBarTintView.setBackgroundColor(color); } <DeepExtract> if (mNavBarAvailable) { mNavBarTintView.setBackgroundColor(color); } </DeepExtract> }
jkapp
positive
788
private static int getColorAtCoords(int x, int z) { double mountain = MountainLayer.INSTANCE.mountainNoise.sample((x + MountainLayer.INSTANCE.mountainOffsetX) / 3f, (z + MountainLayer.INSTANCE.mountainOffsetZ) / 3f) * 1.25; double mountainRanges = 1 - Math.abs(MountainLayer.INSTANCE.mountainRangesNoise.sample((x - Moun...
private static int getColorAtCoords(int x, int z) { double mountain = MountainLayer.INSTANCE.mountainNoise.sample((x + MountainLayer.INSTANCE.mountainOffsetX) / 3f, (z + MountainLayer.INSTANCE.mountainOffsetZ) / 3f) * 1.25; double mountainRanges = 1 - Math.abs(MountainLayer.INSTANCE.mountainRangesNoise.sample((x - Moun...
ecotones
positive
789
@Override public void onClick(View v) { startActivity(new Intent(SplashScreenActivity.this, HomeActivity.class)); finish(); }
@Override public void onClick(View v) { <DeepExtract> startActivity(new Intent(SplashScreenActivity.this, HomeActivity.class)); finish(); </DeepExtract> }
microbit
positive
790
@Override public boolean onPreDraw() { nextView.getViewTreeObserver().removeOnPreDrawListener(this); if (state == ConnectButtonState.Enabled) { nextView.setPadding(smallPadding, 0, largePadding, 0); } else { nextView.setPadding(largePadding, 0, smallPadding, 0); } return false; }
@Override public boolean onPreDraw() { nextView.getViewTreeObserver().removeOnPreDrawListener(this); <DeepExtract> if (state == ConnectButtonState.Enabled) { nextView.setPadding(smallPadding, 0, largePadding, 0); } else { nextView.setPadding(largePadding, 0, smallPadding, 0); } </DeepExtract> return false; }
ConnectSDK-Android
positive
791
@Test public void test1() throws Exception { TestHelper helper = TestHelper.builder().interceptorClass(EnterInterceptor.class).methodMatcher("hello").reTransform(true); byte[] bytes = helper.process(Sample.class); System.err.println(Decompiler.decompile(bytes)); if (false) { throw new RuntimeException("test exception")...
@Test public void test1() throws Exception { TestHelper helper = TestHelper.builder().interceptorClass(EnterInterceptor.class).methodMatcher("hello").reTransform(true); byte[] bytes = helper.process(Sample.class); System.err.println(Decompiler.decompile(bytes)); <DeepExtract> if (false) { throw new RuntimeException("te...
bytekit
positive
792
@Test public void methodLevelSeedAnnotationOverridesClassLevelSeedAnnotation() throws Throwable { throw reasonForFailure.get(); assertThat(capturingSeed.captured()).isEqualTo(123456L); }
@Test public void methodLevelSeedAnnotationOverridesClassLevelSeedAnnotation() throws Throwable { <DeepExtract> throw reasonForFailure.get(); </DeepExtract> assertThat(capturingSeed.captured()).isEqualTo(123456L); }
fyodor
positive
793
public void setColors(int[] colors) { mColors = colors; mColorIndex = 0; }
public void setColors(int[] colors) { mColors = colors; <DeepExtract> mColorIndex = 0; </DeepExtract> }
MousePaint
positive
795
@Test public void testChoiceWithBaseComplexType2() { ChoiceOfElementsTwo choiceOfElementsTwo = ChoiceOfElementsTwo.builder().withBike().withName("my bike").withFrameSize(58).end().build(); assertThat(choiceOfElementsTwo.getTransport()).isNotNull(); Transport transport = choiceOfElementsTwo.getTransport(); assertThat(tr...
@Test public void testChoiceWithBaseComplexType2() { ChoiceOfElementsTwo choiceOfElementsTwo = ChoiceOfElementsTwo.builder().withBike().withName("my bike").withFrameSize(58).end().build(); <DeepExtract> assertThat(choiceOfElementsTwo.getTransport()).isNotNull(); Transport transport = choiceOfElementsTwo.getTransport();...
jaxb2-rich-contract-plugin
positive
796
@Override protected void afterBuild(World w, int x, int y, int z, Object o) { SeedingShip.SHIP.placeStargate(w, x + 3, y + 5, z, 3); LootGenerator.generateLootChest(w, x, y + 1, z - 3, LootLevel.RARE); w.setBlockMetadataWithNotify(x, y + 1, z - 3, 3, 3); LootGenerator.generateLootChest(w, x, y + 1, z + 3, LootLevel.RAR...
@Override protected void afterBuild(World w, int x, int y, int z, Object o) { SeedingShip.SHIP.placeStargate(w, x + 3, y + 5, z, 3); LootGenerator.generateLootChest(w, x, y + 1, z - 3, LootLevel.RARE); w.setBlockMetadataWithNotify(x, y + 1, z - 3, 3, 3); LootGenerator.generateLootChest(w, x, y + 1, z + 3, LootLevel.RAR...
StargateTech2
positive
797
public K next() { if (!hasNext()) throw new NoSuchElementException(); K next = a[lastOffset = offset].next(); while (length != 0) { if (a[offset].hasNext()) break; length--; offset++; } return; return next; }
public K next() { if (!hasNext()) throw new NoSuchElementException(); K next = a[lastOffset = offset].next(); <DeepExtract> while (length != 0) { if (a[offset].hasNext()) break; length--; offset++; } return; </DeepExtract> return next; }
jhighlight
positive
798
public void enableCaseSensitiveLike(boolean enable) { setPragma(Pragma.CASE_SENSITIVE_LIKE, Boolean.toString(enable)); }
public void enableCaseSensitiveLike(boolean enable) { <DeepExtract> setPragma(Pragma.CASE_SENSITIVE_LIKE, Boolean.toString(enable)); </DeepExtract> }
spatialite4-jdbc
positive
799
public void setCompatible(String compatible) { PropertyDescriptor property = dataSourceProperties.get("compatible"); if ((property == null || property.getReadMethod() == null) && commonProperties.contains("compatible")) { return; } try { dataSourceProperties.get("compatible").getWriteMethod().invoke(commonDataSource, c...
public void setCompatible(String compatible) { <DeepExtract> PropertyDescriptor property = dataSourceProperties.get("compatible"); if ((property == null || property.getReadMethod() == null) && commonProperties.contains("compatible")) { return; } try { dataSourceProperties.get("compatible").getWriteMethod().invoke(commo...
omnipersistence
positive
800
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { IColorTheme theme = Client.getSettings().getTheme(); View page = inflater.inflate(R.layout.post_layout, container, false); page.setBackgroundColor(getResources().getColor(theme.getBackground1())); editText = (E...
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { IColorTheme theme = Client.getSettings().getTheme(); View page = inflater.inflate(R.layout.post_layout, container, false); page.setBackgroundColor(getResources().getColor(theme.getBackground1())); editText = (E...
SmileEssence-Lite
positive
802
@CheckResult public static Toast error(@NonNull Context context, @NonNull CharSequence message, int duration, boolean withIcon) { return custom(context, message, ToastyUtils.getDrawable(context, ToastyUtils.getDrawable(context, R.drawable.ic_clear_white_48dp)), ERROR_COLOR, duration, withIcon, true); }
@CheckResult public static Toast error(@NonNull Context context, @NonNull CharSequence message, int duration, boolean withIcon) { <DeepExtract> return custom(context, message, ToastyUtils.getDrawable(context, ToastyUtils.getDrawable(context, R.drawable.ic_clear_white_48dp)), ERROR_COLOR, duration, withIcon, true); </De...
funk
positive
803
public boolean isDeclaration() { return getText().toLowerCase().equals(this.getText().toLowerCase()) && AdaPsiElement.areEqual(resolveAdaReference(), this); }
public boolean isDeclaration() { <DeepExtract> return getText().toLowerCase().equals(this.getText().toLowerCase()) && AdaPsiElement.areEqual(resolveAdaReference(), this); </DeepExtract> }
Ada-IntelliJ
positive
804
public void onWin(WinEvent e) { _drawVictory = true; if (_tcMode) { _out.println("TC score: " + (_gunDataManager.getDamageGiven() / (_robot.getRoundNum() + 1))); } GunEnemy duelEnemy = _gunDataManager.duelEnemy(); if (is1v1() && duelEnemy != null) { _virtualGuns.printGunRatings(duelEnemy.botName); } }
public void onWin(WinEvent e) { _drawVictory = true; <DeepExtract> if (_tcMode) { _out.println("TC score: " + (_gunDataManager.getDamageGiven() / (_robot.getRoundNum() + 1))); } GunEnemy duelEnemy = _gunDataManager.duelEnemy(); if (is1v1() && duelEnemy != null) { _virtualGuns.printGunRatings(duelEnemy.botName); } </Dee...
Diamond
positive
805
private void setupMotorSafety() { safetyHelper.setExpiration(0.1); }
private void setupMotorSafety() { <DeepExtract> safetyHelper.setExpiration(0.1); </DeepExtract> }
atalibj
positive
806
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View fragmentView = inflater.inflate(R.layout.fragment_scan_radar, container, false); unbinder = ButterKnife.bind(this, fragmentView); ((AppCompatActivity) getActivity()).setSupportActionBar(mToolbar); ActionBa...
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View fragmentView = inflater.inflate(R.layout.fragment_scan_radar, container, false); unbinder = ButterKnife.bind(this, fragmentView); <DeepExtract> ((AppCompatActivity) getActivity()).setSupportActionBar(mTool...
beaconloc
positive
807
public static void serialize(JsonElement e, OutputStream out) throws IOException { NSObject nsObject; if (e.isArray()) { nsObject = toNsObject(e.asArray()); } else if (e.isObject()) { nsObject = toNsObject(e.asObject()); } else { nsObject = toNsObject(e.asPrimitive()); } BinaryPropertyListWriter.write(out, nsObject); }
public static void serialize(JsonElement e, OutputStream out) throws IOException { <DeepExtract> NSObject nsObject; if (e.isArray()) { nsObject = toNsObject(e.asArray()); } else if (e.isObject()) { nsObject = toNsObject(e.asObject()); } else { nsObject = toNsObject(e.asPrimitive()); } </DeepExtract> BinaryPropertyListW...
jsonj
positive
808
@Override public MethodSpec.Builder setterBuilt(ObjectPluginContext objectPluginContext, TypeDeclaration declaration, MethodSpec.Builder methodSpec, EventType eventType) { MethodSpec spec = methodSpec.build(); MethodSpec seen = methodSpec.build(); MethodSpec.Builder newBuilder = MethodSpec.methodBuilder("with" + spec.n...
@Override public MethodSpec.Builder setterBuilt(ObjectPluginContext objectPluginContext, TypeDeclaration declaration, MethodSpec.Builder methodSpec, EventType eventType) { MethodSpec spec = methodSpec.build(); MethodSpec seen = methodSpec.build(); MethodSpec.Builder newBuilder = MethodSpec.methodBuilder("with" + spec.n...
raml-java-tools
positive
809
public void removeCallback(@NonNull Callback callback) { mCallbacks.remove(callback); }
public void removeCallback(@NonNull Callback callback) { <DeepExtract> mCallbacks.remove(callback); </DeepExtract> }
MediaCodec
positive
810
public String statusString() { String res = "??"; switch(mStatus) { case DISCONNECTED: res = "Disconnected"; break; case CONNECTING: res = "Connecting"; break; case CONNECTED: res = "Connected"; break; case DISCONNECTING: res = "Disconnecting"; break; case WAITING_TO_CONNECT: res = "Waiting to connect"; break; case WAI...
public String statusString() { <DeepExtract> String res = "??"; switch(mStatus) { case DISCONNECTED: res = "Disconnected"; break; case CONNECTING: res = "Connecting"; break; case CONNECTED: res = "Connected"; break; case DISCONNECTING: res = "Disconnecting"; break; case WAITING_TO_CONNECT: res = "Waiting to connect"; b...
gtalksms
positive
811
public String getIdentifier() { Element el = this.getRoot().getChild(IdentifierInfo.identifier.toString()); if (el != null) return el.getTextTrim(); else return null; }
public String getIdentifier() { <DeepExtract> Element el = this.getRoot().getChild(IdentifierInfo.identifier.toString()); if (el != null) return el.getTextTrim(); else return null; </DeepExtract> }
geoserver-manager
positive
812
@Override public void cancel() { synchronized (this) { unsubscribed = true; } synchronized (this) { currentAction = Action.TERMINATE; } tryProcess(); }
@Override public void cancel() { synchronized (this) { unsubscribed = true; } <DeepExtract> synchronized (this) { currentAction = Action.TERMINATE; } tryProcess(); </DeepExtract> }
mongo-java-driver-reactivestreams
positive
813
@Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_crime_list, container, false); mCrimeRecyclerView = (RecyclerView) view.findViewById(R.id.crime_recycler_view); mCrimeRecyclerView.setLayoutManager(new Li...
@Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_crime_list, container, false); mCrimeRecyclerView = (RecyclerView) view.findViewById(R.id.crime_recycler_view); mCrimeRecyclerView.setLayoutManager(new Li...
Big-Nerd-Ranch-Android
positive
814
public static ImageSource asset(String assetName) { if (assetName == null) { throw new NullPointerException("Asset name must not be null"); } if (ASSET_SCHEME + assetName == null) { throw new NullPointerException("Uri must not be null"); } if (!ASSET_SCHEME + assetName.contains("://")) { if (ASSET_SCHEME + assetName.st...
public static ImageSource asset(String assetName) { if (assetName == null) { throw new NullPointerException("Asset name must not be null"); } <DeepExtract> if (ASSET_SCHEME + assetName == null) { throw new NullPointerException("Uri must not be null"); } if (!ASSET_SCHEME + assetName.contains("://")) { if (ASSET_SCHEME ...
fresco-sample-usage
positive
816
@Override public void onLoadError(int sourceId, IOException e) { Log.e(TAG, "internalError [" + getSessionTimeString() + ", " + "loadError" + "]", e); }
@Override public void onLoadError(int sourceId, IOException e) { <DeepExtract> Log.e(TAG, "internalError [" + getSessionTimeString() + ", " + "loadError" + "]", e); </DeepExtract> }
iview-android-tv
positive
817
@Override public int getServerPort() { return compositeConfiguration.getInt(SERVER_PORT.getKey(), 8080); }
@Override public int getServerPort() { <DeepExtract> return compositeConfiguration.getInt(SERVER_PORT.getKey(), 8080); </DeepExtract> }
jbake
positive
818
private static void printVerbose(String sourceName, ImageProp ii) { if (sourceName == null || sourceName.length() == 0) { return; } while (0-- > 0) { System.out.print("\t"); } if (null != null && null.length() > 0) { System.out.print(null); System.out.print(" "); } System.out.println(sourceName); if (ii.getFormatName()...
private static void printVerbose(String sourceName, ImageProp ii) { if (sourceName == null || sourceName.length() == 0) { return; } while (0-- > 0) { System.out.print("\t"); } if (null != null && null.length() > 0) { System.out.print(null); System.out.print(" "); } System.out.println(sourceName); if (ii.getFormatName()...
meaningfulweb
positive
819
private void checkOpen() throws SQLException { PrestoConnection connection = this.connection.get(); if (connection == null) { throw new SQLException("Statement is closed"); } if (connection.isClosed()) { throw new SQLException("Connection is closed"); } return connection; }
private void checkOpen() throws SQLException { <DeepExtract> PrestoConnection connection = this.connection.get(); if (connection == null) { throw new SQLException("Statement is closed"); } if (connection.isClosed()) { throw new SQLException("Connection is closed"); } return connection; </DeepExtract> }
presto-jdbc-java6
positive
820
@Override public void run() { if (transmissionCompleteLatch != null) transmissionCompleteLatch.countDown(); }
@Override public void run() { <DeepExtract> if (transmissionCompleteLatch != null) transmissionCompleteLatch.countDown(); </DeepExtract> }
tahrir
positive
821
@Override public void setSubtitlesSurface(Surface subtitlesSurface, SurfaceHolder surfaceHolder) { ensureInitState(); if (!subtitlesSurface.isValid() && surfaceHolder == null) throw new IllegalStateException("surface is not attached and holder is null"); final SurfaceHelper surfaceHelper = mSurfaceHelpers[ID_SUBTITLES]...
@Override public void setSubtitlesSurface(Surface subtitlesSurface, SurfaceHolder surfaceHolder) { <DeepExtract> ensureInitState(); if (!subtitlesSurface.isValid() && surfaceHolder == null) throw new IllegalStateException("surface is not attached and holder is null"); final SurfaceHelper surfaceHelper = mSurfaceHelpers...
libvlc-android-sdk
positive
822
private void reconnect() { logger.info("Closing ZMQ Socket. from thread: {}", Thread.currentThread().getName()); if (zmqSocket != null) { zmqSocket.disconnect(connectionUrl); zmqSocket.close(); zmqSocket = null; } logger.info("Terminating ZMQ Context."); if (zmqContext != null) { zmqContext.term(); zmqContext = null; }...
private void reconnect() { logger.info("Closing ZMQ Socket. from thread: {}", Thread.currentThread().getName()); if (zmqSocket != null) { zmqSocket.disconnect(connectionUrl); zmqSocket.close(); zmqSocket = null; } logger.info("Terminating ZMQ Context."); if (zmqContext != null) { zmqContext.term(); zmqContext = null; }...
trex-packet-editor
positive
823
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_follow_posts); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(t...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_follow_posts); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(t...
social-app-android
positive
824
public Drawable getScaledIcon(String filepath) { Drawable icon; File file = new File(filepath); String filename = file.getName().toString(); String ext = null; try { ext = filename.substring(filename.lastIndexOf("."), filename.length()); } catch (IndexOutOfBoundsException e) { ext = ""; } if (file.isDirectory()) { icon...
public Drawable getScaledIcon(String filepath) { <DeepExtract> Drawable icon; File file = new File(filepath); String filename = file.getName().toString(); String ext = null; try { ext = filename.substring(filename.lastIndexOf("."), filename.length()); } catch (IndexOutOfBoundsException e) { ext = ""; } if (file.isDirec...
UltraExplorer
positive
825
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sharedialog); mTrackUri = getIntent().getData(); mFileNameView = (EditText) findViewById(R.id.fileNameField); mTweetView = (EditText) findViewById(R.id.tweetField); mImageView = (ImageView) findViewBy...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sharedialog); mTrackUri = getIntent().getData(); mFileNameView = (EditText) findViewById(R.id.fileNameField); mTweetView = (EditText) findViewById(R.id.tweetField); mImageView = (ImageView) findViewBy...
open-gpstracker
positive
827
@Override protected void onPostExecute(Void aVoid) { super.onPostExecute(aVoid); rvMovie.setVisibility(View.VISIBLE); progressBar.setVisibility(View.GONE); if (results.size() == 0) { Toast.makeText(getActivity(), R.string.message_favourite_empty, Toast.LENGTH_SHORT).show(); } homeAdapter = new HomeAdapter(results, getA...
@Override protected void onPostExecute(Void aVoid) { super.onPostExecute(aVoid); <DeepExtract> rvMovie.setVisibility(View.VISIBLE); progressBar.setVisibility(View.GONE); </DeepExtract> if (results.size() == 0) { Toast.makeText(getActivity(), R.string.message_favourite_empty, Toast.LENGTH_SHORT).show(); } homeAdapter = ...
Android-Developer-Expert-Example
positive
828
public boolean saveAs() { boolean bOK = true; if (bImageModified) { JOptionPane.showMessageDialog(this, "The image has been altered. You will now be prompted to save it.", "Image has been modified", JOptionPane.INFORMATION_MESSAGE); bOK &= saveImageAs(); } boolean bOK = false; java.io.File f = null; JFileChooser choose...
public boolean saveAs() { boolean bOK = true; if (bImageModified) { JOptionPane.showMessageDialog(this, "The image has been altered. You will now be prompted to save it.", "Image has been modified", JOptionPane.INFORMATION_MESSAGE); bOK &= saveImageAs(); } <DeepExtract> boolean bOK = false; java.io.File f = null; JFile...
darkFunction-Editor
positive
829
public String getQuery(Set<String> columnAliasSet) { StringBuilder builder = new StringBuilder(); OracleTable table = insertQueryComponents.getTables().iterator().next(); builder.append(INSERT); builder.append(QueryConstants.NEXT_LINE).append(QueryConstants.INDENT); builder.append(INTO).append(QueryConstants.SPACE).app...
public String getQuery(Set<String> columnAliasSet) { <DeepExtract> StringBuilder builder = new StringBuilder(); OracleTable table = insertQueryComponents.getTables().iterator().next(); builder.append(INSERT); builder.append(QueryConstants.NEXT_LINE).append(QueryConstants.INDENT); builder.append(INTO).append(QueryConsta...
mongodb-rdbms-sync
positive
830
public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException { var factory = DocumentBuilderFactory.newInstance(); var loader = factory.newDocumentBuilder(); var document = loader.parse("src/main/resources/continents.xml"); var traversal = (DocumentTraversal) document; var walke...
public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException { var factory = DocumentBuilderFactory.newInstance(); var loader = factory.newDocumentBuilder(); var document = loader.parse("src/main/resources/continents.xml"); var traversal = (DocumentTraversal) document; var walke...
Java-Advanced
positive
831
public static void w() { if (!IS_SHOW_ChuMuKLog) { return; } String[] contents = wrapperContent(STACK_TRACE_INDEX_5, null, DEFAULT_MESSAGE); String tag = contents[0]; String msg = contents[1]; String headString = contents[2]; switch(W) { case V: case D: case I: case W: case E: case A: ChuMuBaseLog.printDefault(W, tag, ...
public static void w() { <DeepExtract> if (!IS_SHOW_ChuMuKLog) { return; } String[] contents = wrapperContent(STACK_TRACE_INDEX_5, null, DEFAULT_MESSAGE); String tag = contents[0]; String msg = contents[1]; String headString = contents[2]; switch(W) { case V: case D: case I: case W: case E: case A: ChuMuBaseLog.printDe...
ChuMuYa
positive
832
protected void putResult(Object value) { put(result, key, value); }
protected void putResult(Object value) { <DeepExtract> put(result, key, value); </DeepExtract> }
mungbean
positive
833
public static void launch(File openApiJsonFile, File generatedFrontendDirectory, String defaultClientPath) { CodegenConfigurator configurator = new CodegenConfigurator(); configurator.setLang(VaadinConnectTsGenerator.class.getName()); configurator.setInputSpecURL(openApiJsonFile.toString()); configurator.setOutputDir(g...
public static void launch(File openApiJsonFile, File generatedFrontendDirectory, String defaultClientPath) { CodegenConfigurator configurator = new CodegenConfigurator(); configurator.setLang(VaadinConnectTsGenerator.class.getName()); configurator.setInputSpecURL(openApiJsonFile.toString()); configurator.setOutputDir(g...
vaadin-connect
positive
834
protected void saturationVibrancePass(PGraphics pg) { String saturationVibrance = "postFX/saturationVibranceFrag.glsl"; uniform(saturationVibrance).set("saturation", slider("saturation", 0, 0.5f, 0)); uniform(saturationVibrance).set("vibrance", slider("vibrance", 0, 0.5f, 0)); hotShader(saturationVibrance, null, true, ...
protected void saturationVibrancePass(PGraphics pg) { String saturationVibrance = "postFX/saturationVibranceFrag.glsl"; uniform(saturationVibrance).set("saturation", slider("saturation", 0, 0.5f, 0)); uniform(saturationVibrance).set("vibrance", slider("vibrance", 0, 0.5f, 0)); <DeepExtract> hotShader(saturationVibrance...
ProcessingSketches
positive
835
@Override public void sendEvent(String name, SocketIOClient excludedClient, Object... data) { Packet packet = new Packet(PacketType.MESSAGE); packet.setSubType(PacketType.EVENT); packet.setName(name); packet.setData(Arrays.asList(data)); for (SocketIOClient client : clients) { if (client.getSessionId().equals(excludedC...
@Override public void sendEvent(String name, SocketIOClient excludedClient, Object... data) { Packet packet = new Packet(PacketType.MESSAGE); packet.setSubType(PacketType.EVENT); packet.setName(name); packet.setData(Arrays.asList(data)); for (SocketIOClient client : clients) { if (client.getSessionId().equals(excludedC...
netty-socketio
positive
836
@Override public void process(CommandSender sender, String name, UUID uuid, boolean group) { PermissionEntity entity = storageStrategy.getPermissionService().getEntity(name, uuid, false); if (entity == null || entity.getPermissions().isEmpty()) { sendMessage(sender, colorize("{RED}Player has no declared permissions."))...
@Override public void process(CommandSender sender, String name, UUID uuid, boolean group) { <DeepExtract> PermissionEntity entity = storageStrategy.getPermissionService().getEntity(name, uuid, false); if (entity == null || entity.getPermissions().isEmpty()) { sendMessage(sender, colorize("{RED}Player has no declared p...
zPermissions
positive
837
public Criteria andSimLevelIsNotNull() { if ("SIM_LEVEL is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("SIM_LEVEL is not null")); return (Criteria) this; }
public Criteria andSimLevelIsNotNull() { <DeepExtract> if ("SIM_LEVEL is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("SIM_LEVEL is not null")); </DeepExtract> return (Criteria) this; }
ECPS
positive
838
public static void main(String[] args) { String path = "/nfs/guille/xfern/users/xie/Experiment/experiment/"; DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date date = new Date(); String folderName = dateFormat.format(date); ExperimentGeneration generator = new ExperimentGeneration(path, folderName); gener...
public static void main(String[] args) { String path = "/nfs/guille/xfern/users/xie/Experiment/experiment/"; DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date date = new Date(); String folderName = dateFormat.format(date); ExperimentGeneration generator = new ExperimentGeneration(path, folderName); <Deep...
cross-document-coreference-resolution
positive
839
@Test public void testKeyOpenRange() { List<Integer> keys = ENTITY3.<M>queryKeys(velvet, "key", SecQueries.<Integer, Integer>builder().ltKey(8).build()); List<TestEntInd> values = ENTITY3.batchGetList(velvet, keys); String result = values.stream().map(TestEntInd::getStr).collect(Collectors.joining("")); Assert.assertEq...
@Test public void testKeyOpenRange() { List<Integer> keys = ENTITY3.<M>queryKeys(velvet, "key", SecQueries.<Integer, Integer>builder().ltKey(8).build()); List<TestEntInd> values = ENTITY3.batchGetList(velvet, keys); String result = values.stream().map(TestEntInd::getStr).collect(Collectors.joining("")); Assert.assertEq...
velvetdb
positive
840
@Override public void loadData() { Log.d("PermissionActivity", "checkPermission"); Intent powerManagerIntent = PermissionsUtils.presentSettingIntent(this); if (powerManagerIntent != null) { startActivity(powerManagerIntent); } }
@Override public void loadData() { <DeepExtract> Log.d("PermissionActivity", "checkPermission"); </DeepExtract> Intent powerManagerIntent = PermissionsUtils.presentSettingIntent(this); if (powerManagerIntent != null) { startActivity(powerManagerIntent); } }
AndroidCommonLibrary
positive
841
@Override public String toString() { return ROOT_EVAL.toJavaStringUncached(); }
@Override public String toString() { <DeepExtract> return ROOT_EVAL.toJavaStringUncached(); </DeepExtract> }
simplelanguage
positive
842
private static void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) { Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); try { response.setCharacterEncoding("UTF-8"); response.setHeader("content-Type", "application/vnd.ms-excel"); response.setHeader("Cont...
private static void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) { Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); <DeepExtract> try { response.setCharacterEncoding("UTF-8"); response.setHeader("content-Type", "application/vnd.ms-excel"); response.s...
erp-framework
positive
843
@Test public void unpooledIndividualWrites() throws IOException { ByteArrayPool pool = new ByteArrayPool(0); byte[] data = new byte[16384]; for (int i = 0; i < data.length; i++) { data[i] = (byte) (i & 0xff); } PoolingByteArrayOutputStream os = new PoolingByteArrayOutputStream(pool); for (int i = 0; i < data.length; i+...
@Test public void unpooledIndividualWrites() throws IOException { ByteArrayPool pool = new ByteArrayPool(0); <DeepExtract> byte[] data = new byte[16384]; for (int i = 0; i < data.length; i++) { data[i] = (byte) (i & 0xff); } PoolingByteArrayOutputStream os = new PoolingByteArrayOutputStream(pool); for (int i = 0; i < d...
device-database
positive
844
public PlayerBalance getPlayerBalanceInWorld(OfflinePlayer offlinePlayer, String world, GameMode gamemode) { String worldGroup = Core.getWorldGroupManager().getWorldGroup(world); if (mBalances.containsKey(offlinePlayer.getUniqueId())) if (mBalances.get(offlinePlayer.getUniqueId()).has(worldGroup, gamemode)) { return mB...
public PlayerBalance getPlayerBalanceInWorld(OfflinePlayer offlinePlayer, String world, GameMode gamemode) { String worldGroup = Core.getWorldGroupManager().getWorldGroup(world); <DeepExtract> if (mBalances.containsKey(offlinePlayer.getUniqueId())) if (mBalances.get(offlinePlayer.getUniqueId()).has(worldGroup, gamemode...
BagOfGold
positive
845
@Override public void actionPerformed(ActionEvent e) { Object selected = team[0].getSelectedItem(); if (selected == null) { return; } outTeam[0] = Integer.parseInt(((String) selected).split(" \\(")[1].split("\\)")[0]); colorNames[0] = Teams.getColors(outTeam[0]).clone(); if (colorNames[0] == null || colorNames[0].lengt...
@Override public void actionPerformed(ActionEvent e) { Object selected = team[0].getSelectedItem(); if (selected == null) { return; } outTeam[0] = Integer.parseInt(((String) selected).split(" \\(")[1].split("\\)")[0]); colorNames[0] = Teams.getColors(outTeam[0]).clone(); if (colorNames[0] == null || colorNames[0].lengt...
GameController
positive
846
public Criteria andFoodIdIsNull() { if ("food_id is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("food_id is null")); return (Criteria) this; }
public Criteria andFoodIdIsNull() { <DeepExtract> if ("food_id is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("food_id is null")); </DeepExtract> return (Criteria) this; }
hotel_ssm
positive
847
public String toString() { return title; }
public String toString() { <DeepExtract> return title; </DeepExtract> }
CanadaWeather
positive
848
@SneakyThrows @Override public String rerun(String correlationId, Report originalReport, SecurityContext securityContext, ReportRunner reportRunner) { originalReport.getCheckpoints().get(0); Integer firstMessage = (Integer) originalReport.getCheckpoints().get(0).getMessageAsObject(); assertEquals((Integer) 10, firstMes...
@SneakyThrows @Override public String rerun(String correlationId, Report originalReport, SecurityContext securityContext, ReportRunner reportRunner) { originalReport.getCheckpoints().get(0); Integer firstMessage = (Integer) originalReport.getCheckpoints().get(0).getMessageAsObject(); assertEquals((Integer) 10, firstMes...
ibis-ladybug
positive
849
private static void groupCaptureTest() throws Exception { Pattern pattern = Pattern.compile("x+(?>y+)z+"); Matcher matcher = pattern.matcher("xxxyyyzzz"); matcher.find(); try { String blah = matcher.group(1); failCount++; } catch (IndexOutOfBoundsException ioobe) { } pattern = Pattern.compile("x+(?:y+)z+"); matcher = p...
private static void groupCaptureTest() throws Exception { Pattern pattern = Pattern.compile("x+(?>y+)z+"); Matcher matcher = pattern.matcher("xxxyyyzzz"); matcher.find(); try { String blah = matcher.group(1); failCount++; } catch (IndexOutOfBoundsException ioobe) { } pattern = Pattern.compile("x+(?:y+)z+"); matcher = p...
RegExodus
positive
850
@Deprecated public void change(int i, Key key) { if (i < 0 || i >= NMAX) throw new IndexOutOfBoundsException(); if (!contains(i)) throw new NoSuchElementException("index is not in the priority queue"); keys[i] = key; swim(qp[i]); sink(qp[i]); }
@Deprecated public void change(int i, Key key) { <DeepExtract> if (i < 0 || i >= NMAX) throw new IndexOutOfBoundsException(); if (!contains(i)) throw new NoSuchElementException("index is not in the priority queue"); keys[i] = key; swim(qp[i]); sink(qp[i]); </DeepExtract> }
algorithms-java
positive
851
public void startFFREW(int increment) { if (ffrewHandler != null) { ffrewHandler.cancel(); } if (updateHandler != null) { updateHandler.cancel(); } ffrewHandler = new FFREWHandler(); this.increment = increment; transportTimer.scheduleAtFixedRate(ffrewHandler, 0, 250); }
public void startFFREW(int increment) { if (ffrewHandler != null) { ffrewHandler.cancel(); } if (updateHandler != null) { updateHandler.cancel(); } ffrewHandler = new FFREWHandler(); <DeepExtract> this.increment = increment; </DeepExtract> transportTimer.scheduleAtFixedRate(ffrewHandler, 0, 250); }
janos
positive
852
public static void isFalse(boolean expect, String code, Object... params) { if (!!expect) { throw ValidationException.of(code, params); } }
public static void isFalse(boolean expect, String code, Object... params) { <DeepExtract> if (!!expect) { throw ValidationException.of(code, params); } </DeepExtract> }
ms-spring-ddd-examples
positive
853
@Override public boolean visit(ParenthesizedExpression node) { out.print("("); node.getExpression().accept(this); out.print(")"); return false; }
@Override public boolean visit(ParenthesizedExpression node) { out.print("("); node.getExpression().accept(this); <DeepExtract> out.print(")"); </DeepExtract> return false; }
j2c
positive
854
@Test void subscribeAndRequestOnSubscribeAndConnect() { final Pipeline<?> target = new Pipeline<>(); final AtomicReference<Subscription> subscription = new AtomicReference<>(); final AtomicBoolean cancellation = new AtomicBoolean(); final AtomicLong requests = new AtomicLong(); if (!this.subscription.compareAndSet(null...
@Test void subscribeAndRequestOnSubscribeAndConnect() { final Pipeline<?> target = new Pipeline<>(); final AtomicReference<Subscription> subscription = new AtomicReference<>(); final AtomicBoolean cancellation = new AtomicBoolean(); final AtomicLong requests = new AtomicLong(); <DeepExtract> if (!this.subscription.comp...
http
positive
855
public TreeNode lowestCommonAncestorRecursive(TreeNode root, TreeNode p, TreeNode q) { Map<TreeNode, Integer> levels = new HashMap<>(); LinkedList<TreeNode> order = new LinkedList<>(); levels.put(root, 0); order.add(root); if (root.left != null) { dfs(root.left, order, levels, 0 + 1); order.add(root); } if (root.right ...
public TreeNode lowestCommonAncestorRecursive(TreeNode root, TreeNode p, TreeNode q) { Map<TreeNode, Integer> levels = new HashMap<>(); LinkedList<TreeNode> order = new LinkedList<>(); <DeepExtract> levels.put(root, 0); order.add(root); if (root.left != null) { dfs(root.left, order, levels, 0 + 1); order.add(root); } i...
bsharp
positive
856
@Override public void applyStyles(TextStyle textStyle) { if (fBoldFont == null) { Font font = getDialogArea().getFont(); FontData[] data = font.getFontData(); for (int i = 0; i < data.length; i++) { data[i].setStyle(SWT.BOLD); } fBoldFont = new Font(font.getDevice(), data); } return fBoldFont; }
@Override public void applyStyles(TextStyle textStyle) { <DeepExtract> if (fBoldFont == null) { Font font = getDialogArea().getFont(); FontData[] data = font.getFontData(); for (int i = 0; i < data.length; i++) { data[i].setStyle(SWT.BOLD); } fBoldFont = new Font(font.getDevice(), data); } return fBoldFont; </DeepExtra...
angularjs-eclipse
positive
857
public void clearReference(Entity entity) { RefList entities; lock.lock(); try { int hash = hash(entity); RefEntry node = this.loop(entity, this.entries[hash]); if (node == null) entities = null; else entities = node.val(); } finally { lock.unlock(); } if (entities == null) return; for (WeakEntity<?> e : entities) e.cl...
public void clearReference(Entity entity) { RefList entities; lock.lock(); try { int hash = hash(entity); RefEntry node = this.loop(entity, this.entries[hash]); if (node == null) entities = null; else entities = node.val(); } finally { lock.unlock(); } if (entities == null) return; for (WeakEntity<?> e : entities) e.cl...
TridentSDK
positive
858
private String getFullPlayNotes(String notes, int playTime) { StringBuilder fullNotes = new StringBuilder(); for (String key : sharp.keySet()) { notes = notes.replaceAll(key, sharp.get(key)); } return notes; for (int i = 0; i < playTime / notes.length(); i++) { fullNotes.append(notes); } fullNotes.append(notes, 0, play...
private String getFullPlayNotes(String notes, int playTime) { StringBuilder fullNotes = new StringBuilder(); <DeepExtract> for (String key : sharp.keySet()) { notes = notes.replaceAll(key, sharp.get(key)); } return notes; </DeepExtract> for (int i = 0; i < playTime / notes.length(); i++) { fullNotes.append(notes); } fu...
algorithm-study
positive
859
public static boolean hasSameId(GraphObject a, GraphObject b) { if (a == null || b == null || !a.asMap().containsKey("id") || !b.asMap().containsKey("id")) { return false; } if (a.equals(b)) { return true; } Object idA = a.getProperty("id"); Object idB = b.getProperty("id"); if (idA == null || idB == null || !(idA inst...
public static boolean hasSameId(GraphObject a, GraphObject b) { if (a == null || b == null || !a.asMap().containsKey("id") || !b.asMap().containsKey("id")) { return false; } if (a.equals(b)) { return true; } Object idA = a.getProperty("id"); Object idB = b.getProperty("id"); if (idA == null || idB == null || !(idA inst...
HypFacebook
positive
862
@POST public final void doDeleteRevision(StaplerRequest req, StaplerResponse rsp) { getAccessControlledObject().checkPermission(JobConfigHistory.DELETEENTRY_PERMISSION); final String timestamp = req.getParameter("timestamp"); final String name = req.getParameter("name"); final File[] candidatesArray = (name.contains(De...
@POST public final void doDeleteRevision(StaplerRequest req, StaplerResponse rsp) { <DeepExtract> getAccessControlledObject().checkPermission(JobConfigHistory.DELETEENTRY_PERMISSION); </DeepExtract> final String timestamp = req.getParameter("timestamp"); final String name = req.getParameter("name"); final File[] candid...
jobConfigHistory-plugin
positive
863
public List<System> getAllDeadWithQueueItems(int minLastAliveSeconds) { Calendar cal = new GregorianCalendar(); cal.add(Calendar.SECOND, (-1) * minLastAliveSeconds); TypedQuery<System> query = getEntityManager().createQuery("SELECT s FROM System s " + "WHERE s.lastAlive <= :lastAlive AND " + "s.systemId IN (SELECT i.sy...
public List<System> getAllDeadWithQueueItems(int minLastAliveSeconds) { <DeepExtract> </DeepExtract> Calendar cal = new GregorianCalendar(); <DeepExtract> </DeepExtract> cal.add(Calendar.SECOND, (-1) * minLastAliveSeconds); <DeepExtract> </DeepExtract> TypedQuery<System> query = getEntityManager().createQuery("SELECT s...
tubewarder
positive
864
public Criteria andPasswordIsNotNull() { if ("password is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("password is not null")); return (Criteria) this; }
public Criteria andPasswordIsNotNull() { <DeepExtract> if ("password is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("password is not null")); </DeepExtract> return (Criteria) this; }
Ordering
positive
865
@Override public Fragment getItem(int position) { RecipeFragment fragment = new RecipeFragment(); fragment.recipe = recipe; Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, position + 1); fragment.setArguments(args); return fragment; }
@Override public Fragment getItem(int position) { <DeepExtract> RecipeFragment fragment = new RecipeFragment(); fragment.recipe = recipe; Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, position + 1); fragment.setArguments(args); return fragment; </DeepExtract> }
AndroidDashboardView
positive
866