before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public boolean lift() { if (!this.equals(new UnitCommand(this, UnitCommandTypes.Lift).getUnit())) { throw new IllegalArgumentException("Unit Command is for a different Unit"); } return bwapi.issueCommand(new UnitCommand(this, UnitCommandTypes.Lift)); }
public boolean lift() { <DeepExtract> if (!this.equals(new UnitCommand(this, UnitCommandTypes.Lift).getUnit())) { throw new IllegalArgumentException("Unit Command is for a different Unit"); } return bwapi.issueCommand(new UnitCommand(this, UnitCommandTypes.Lift)); </DeepExtract> }
JNIBWAPI
positive
436,510
@ChangeSet(order = "0003", id = "Migration_0003_ShapeDefinition", author = "migrationBot") public void run(MongoDatabase database) throws Exception { final MongoCollection<Document> shapeCol = database.getCollection("shape"); shapeCol.insertOne(resourceDefinition()); shapeCol.insertOne(repositoryDefinition()); shapeCol...
@ChangeSet(order = "0003", id = "Migration_0003_ShapeDefinition", author = "migrationBot") public void run(MongoDatabase database) throws Exception { <DeepExtract> final MongoCollection<Document> shapeCol = database.getCollection("shape"); shapeCol.insertOne(resourceDefinition()); shapeCol.insertOne(repositoryDefinitio...
FAIRDataPoint
positive
436,514
public Criteria andScopeGreaterThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "scope" + " cannot be null"); } criteria.add(new Criterion("scope >=", value)); return (Criteria) this; }
public Criteria andScopeGreaterThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "scope" + " cannot be null"); } criteria.add(new Criterion("scope >=", value)); </DeepExtract> return (Criteria) this; }
oauth4j
positive
436,515
public static void main(String[] args) { int[] array = { 3, 4, 2, 1, 6, 5, 7, 8 }; MergeSort m = new MergeSort(); int size = array.length; int[] tempArray = new int[size]; mergeSrt(array, tempArray, 0, size - 1); for (int i = 0; i < array.length; i++) { System.out.print(array[i] + " "); } }
public static void main(String[] args) { int[] array = { 3, 4, 2, 1, 6, 5, 7, 8 }; MergeSort m = new MergeSort(); <DeepExtract> int size = array.length; int[] tempArray = new int[size]; mergeSrt(array, tempArray, 0, size - 1); </DeepExtract> for (int i = 0; i < array.length; i++) { System.out.print(array[i] + " "); } }
Problem-Solving-in-Data-Structures-Algorithms-using-Java
positive
436,516
private void play(final int index) { if (index >= mMusicDatas.size()) return; if (mCurrentMusicIndex == index && mIsMusicPause) { mMediaPlayer.start(); } else { mMediaPlayer.stop(); mMediaPlayer = null; mMediaPlayer = MediaPlayer.create(getApplicationContext(), mMusicDatas.get(index).getMusicRes()); mMediaPlayer.start(...
private void play(final int index) { if (index >= mMusicDatas.size()) return; if (mCurrentMusicIndex == index && mIsMusicPause) { mMediaPlayer.start(); } else { mMediaPlayer.stop(); mMediaPlayer = null; mMediaPlayer = MediaPlayer.create(getApplicationContext(), mMusicDatas.get(index).getMusicRes()); mMediaPlayer.start(...
MusicPlayerdemo
positive
436,518
@Test public void unbalancedGainTranslocationIntrachromosomalWithInversion() throws IOException { File wd = tmpFolder.newFolder("tmp"); String reference = new File("src/test/resources/TranslocationTest/UnbalancedGainTranslocationTest/UnbalancedGainIntrachromosomalTranslocationWithInversion", "reference.fa").toString();...
@Test public void unbalancedGainTranslocationIntrachromosomalWithInversion() throws IOException { <DeepExtract> File wd = tmpFolder.newFolder("tmp"); String reference = new File("src/test/resources/TranslocationTest/UnbalancedGainTranslocationTest/UnbalancedGainIntrachromosomalTranslocationWithInversion", "reference.fa...
varsim
positive
436,520
@Override public boolean supports(MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) { boolean ignore = ignoreSecret(); if (ignore) { return false; } if (methodParameter.getContainingClass().getAnnotation(secretProperties.getAnnotationClass()) != null) { return tru...
@Override public boolean supports(MethodParameter methodParameter, Type targetType, Class<? extends HttpMessageConverter<?>> converterType) { <DeepExtract> boolean ignore = ignoreSecret(); if (ignore) { return false; } if (methodParameter.getContainingClass().getAnnotation(secretProperties.getAnnotationClass()) != null...
chao-cloud
positive
436,522
@Test public void should() { String actual = ai.get(board("☼☼☼☼☼☼☼" + "☼ x ☼" + "☼ $ ☼" + "☼ ☼" + "☼ ☺ $ ☼" + "☼ ☻ ☼" + "☼☼☼☼☼☼☼")); assertEquals(Direction.UP.toString(), actual); String actual = ai.get(board("☼☼☼☼☼☼☼" + "☼ x ☼" + "☼ $ ...
@Test public void should() { String actual = ai.get(board("☼☼☼☼☼☼☼" + "☼ x ☼" + "☼ $ ☼" + "☼ ☼" + "☼ ☺ $ ☼" + "☼ ☻ ☼" + "☼☼☼☼☼☼☼")); assertEquals(Direction.UP.toString(), actual); String actual = ai.get(board("☼☼☼☼☼☼☼" + "☼ x ☼" + "☼ $ ...
tetris
positive
436,523
private String searchForBundle(String target, String start) { if (target.startsWith(REFERENCE_SCHEME)) { target = target.substring(REFERENCE_SCHEME.length()); if (!target.startsWith(FILE_SCHEME)) throw new IllegalArgumentException("Bundle URL is invalid: " + target); target = target.substring(FILE_SCHEME.length()); Fil...
private String searchForBundle(String target, String start) { if (target.startsWith(REFERENCE_SCHEME)) { target = target.substring(REFERENCE_SCHEME.length()); if (!target.startsWith(FILE_SCHEME)) throw new IllegalArgumentException("Bundle URL is invalid: " + target); target = target.substring(FILE_SCHEME.length()); Fil...
goomph
positive
436,524
public void drawImage(PDInlineImage inlineImage, float x, float y, float width, float height) throws IOException { if (inTextMode) { throw new IllegalStateException("Error: drawImage is not allowed within a text block."); } if (!fontStack.isEmpty()) { fontStack.push(fontStack.peek()); } if (!strokingColorSpaceStack.isE...
public void drawImage(PDInlineImage inlineImage, float x, float y, float width, float height) throws IOException { if (inTextMode) { throw new IllegalStateException("Error: drawImage is not allowed within a text block."); } if (!fontStack.isEmpty()) { fontStack.push(fontStack.peek()); } if (!strokingColorSpaceStack.isE...
pint-publisher
positive
436,525
@Override public Scores search(SearchQueryHolder holder) { IndexSearcher idxSearcher; try { if (indexReader == null) { if (!DirectoryReader.indexExists(directory)) { idxSearcher = null; } indexReader = DirectoryReader.open(directory); indexSearcher = new IndexSearcher(indexReader); } idxSearcher = indexSearcher; } catc...
@Override public Scores search(SearchQueryHolder holder) { <DeepExtract> IndexSearcher idxSearcher; try { if (indexReader == null) { if (!DirectoryReader.indexExists(directory)) { idxSearcher = null; } indexReader = DirectoryReader.open(directory); indexSearcher = new IndexSearcher(indexReader); } idxSearcher = indexSe...
Stargraph
positive
436,526
@Override final void doSetRate(double permitsPerSecond, long nowMicros) { if (nowMicros > nextFreeTicketMicros) { double newPermits = (nowMicros - nextFreeTicketMicros) / coolDownIntervalMicros(); storedPermits = min(maxPermits, storedPermits + newPermits); nextFreeTicketMicros = nowMicros; } double stableIntervalMicro...
@Override final void doSetRate(double permitsPerSecond, long nowMicros) { <DeepExtract> if (nowMicros > nextFreeTicketMicros) { double newPermits = (nowMicros - nextFreeTicketMicros) / coolDownIntervalMicros(); storedPermits = min(maxPermits, storedPermits + newPermits); nextFreeTicketMicros = nowMicros; } </DeepExtrac...
jfilebeat
positive
436,529
@Test public void testResetOnFindInt_StringBuilder() { Matcher matcher = Pattern.compile("a").matcher("zza"); assertTrue(matcher.find()); buffer = new StringBuilder(); StringBuilder b = new StringBuilder(); buffer.appendReplacement(b, "foo"); return b.toString(); assertEquals("1st time", "zzfoo", buffer.toString()); as...
@Test public void testResetOnFindInt_StringBuilder() { Matcher matcher = Pattern.compile("a").matcher("zza"); assertTrue(matcher.find()); buffer = new StringBuilder(); <DeepExtract> StringBuilder b = new StringBuilder(); buffer.appendReplacement(b, "foo"); return b.toString(); </DeepExtract> assertEquals("1st time", "z...
re2j
positive
436,535
protected void doTestHttpWriting(Class<?> clazz, Object output) throws Throwable { Assert.assertNotNull(this.marshallingHttpMessageConverter); Assert.assertNotNull(this.marshaller); Assert.assertNotNull(this.unmarshaller); Assert.assertNotNull(this.mediaType); Assert.assertNotNull("object to output can't be null", outp...
protected void doTestHttpWriting(Class<?> clazz, Object output) throws Throwable { Assert.assertNotNull(this.marshallingHttpMessageConverter); Assert.assertNotNull(this.marshaller); Assert.assertNotNull(this.unmarshaller); Assert.assertNotNull(this.mediaType); Assert.assertNotNull("object to output can't be null", outp...
spring-advanced-marhshallers-and-service-exporters
positive
436,537
public void init() { setInitialized(true); this.selectedItem = new MICRBean(); this.setFocusable(false); this.setBackground(Color.LIGHT_GRAY); this.setName("SimulatedMICR"); JButton button1 = new JButton("Enter"); button1.setName("Enter"); button1.setSize(200, 20); SAXBuilder builder = new SAXBuilder(); Document doc = ...
public void init() { setInitialized(true); this.selectedItem = new MICRBean(); this.setFocusable(false); this.setBackground(Color.LIGHT_GRAY); this.setName("SimulatedMICR"); JButton button1 = new JButton("Enter"); button1.setName("Enter"); button1.setSize(200, 20); <DeepExtract> SAXBuilder builder = new SAXBuilder(); D...
POSdeviceSimulator
positive
436,538
@Override public AsyncActionResponse method() { return executeSyncApiCall(api.getAsyncAction(id)); }
@Override public AsyncActionResponse method() { <DeepExtract> return executeSyncApiCall(api.getAsyncAction(id)); </DeepExtract> }
voucherify-java-sdk
positive
436,540
@Override public void handleMessage(Message msg) { PortalActivity activity = mActivityRef.get(); if (activity == null || activity.isFinishing()) { return; } WebView webview = activity.findViewById(R.id.webview); switch(msg.what) { case BaseRunnable.REFRESH: java.net.CookieStore rawCookieStore = ((java.net.CookieManager...
@Override public void handleMessage(Message msg) { PortalActivity activity = mActivityRef.get(); if (activity == null || activity.isFinishing()) { return; } WebView webview = activity.findViewById(R.id.webview); switch(msg.what) { case BaseRunnable.REFRESH: java.net.CookieStore rawCookieStore = ((java.net.CookieManager...
TaipeiTechStudent
positive
436,543
public static void filterTopicReply(Map<String, Object> topicReplyInfoMap) { topicReplyInfoMap.put(ParamConst.REPLY_ID, topicReplyInfoMap.get(ParamConst.ID)); for (String key : new String[] { ParamConst.ID, ParamConst.USER_ID }) { topicReplyInfoMap.remove(key); } }
public static void filterTopicReply(Map<String, Object> topicReplyInfoMap) { topicReplyInfoMap.put(ParamConst.REPLY_ID, topicReplyInfoMap.get(ParamConst.ID)); <DeepExtract> for (String key : new String[] { ParamConst.ID, ParamConst.USER_ID }) { topicReplyInfoMap.remove(key); } </DeepExtract> }
neubbs
positive
436,545
private DockableState removePreviousFloatingState(Dockable dockable) { if (dockable instanceof CompoundDockable) { ArrayList children = DockingUtilities.findCompoundDockableChildren((CompoundDockable) dockable); for (int i = 0; i < children.size(); i++) { Dockable d = (Dockable) children.get(i); previousFloatingDockabl...
private DockableState removePreviousFloatingState(Dockable dockable) { if (dockable instanceof CompoundDockable) { ArrayList children = DockingUtilities.findCompoundDockableChildren((CompoundDockable) dockable); for (int i = 0; i < children.size(); i++) { Dockable d = (Dockable) children.get(i); previousFloatingDockabl...
vldocking
positive
436,546
private void writeElement(BufferedWriter writer, Element cuboid) throws IOException { writer.newLine(); space(2) + "{".write("{"); space(2) + "{".newLine(); space(2) + "{".write(space(1) + "\"__comment\": \"Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)\","); space(2) + "{".newLin...
private void writeElement(BufferedWriter writer, Element cuboid) throws IOException { writer.newLine(); space(2) + "{".write("{"); space(2) + "{".newLine(); space(2) + "{".write(space(1) + "\"__comment\": \"Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)\","); space(2) + "{".newLin...
ModelCreator
positive
436,547
@Override public void doPreAnalysis(Set<Unit> targetUnits, TraceManager traceManager) { super.runAnalysis(targetUnits); }
@Override public void doPreAnalysis(Set<Unit> targetUnits, TraceManager traceManager) { <DeepExtract> super.runAnalysis(targetUnits); </DeepExtract> }
FuzzDroid
positive
436,548
@Test public void testCodeGenerationForABC() throws FileNotFoundException { generateClassesForDomain("Nested composite id example", "abc", "abc", "/samples.xml"); }
@Test public void testCodeGenerationForABC() throws FileNotFoundException { <DeepExtract> generateClassesForDomain("Nested composite id example", "abc", "abc", "/samples.xml"); </DeepExtract> }
xuml-tools
positive
436,549
@Override public Single<IndirectIncoming> getIndirectIncoming(SignumAddress account, SignumID transaction) { return compositeSingle(map(burstNodeServices, service -> service.getIndirectIncoming(account, transaction))); }
@Override public Single<IndirectIncoming> getIndirectIncoming(SignumAddress account, SignumID transaction) { <DeepExtract> return compositeSingle(map(burstNodeServices, service -> service.getIndirectIncoming(account, transaction))); </DeepExtract> }
signumj
positive
436,551
@Override public EarthquakeRecord value7(String value) { set(6, value); return this; }
@Override public EarthquakeRecord value7(String value) { <DeepExtract> set(6, value); </DeepExtract> return this; }
blog2019
positive
436,552
public static void resendMessage(int what, Runnable runnable, long delay) { getMainHandler().removeMessages(what); Message message = Message.obtain(); message.what = what; message.obj = runnable; getMainHandler().sendMessageDelayed(message, delay); }
public static void resendMessage(int what, Runnable runnable, long delay) { getMainHandler().removeMessages(what); <DeepExtract> Message message = Message.obtain(); message.what = what; message.obj = runnable; getMainHandler().sendMessageDelayed(message, delay); </DeepExtract> }
Utils-Everywhere
positive
436,553
public List findByCompTel(Object compTel) { log.debug("finding TbCompany instance with property: " + COMP_TEL + ", value: " + compTel); try { String queryString = "from TbCompany as model where model." + COMP_TEL + "= ?"; Query queryObject = getSession().createQuery(queryString); queryObject.setParameter(0, compTel); r...
public List findByCompTel(Object compTel) { <DeepExtract> log.debug("finding TbCompany instance with property: " + COMP_TEL + ", value: " + compTel); try { String queryString = "from TbCompany as model where model." + COMP_TEL + "= ?"; Query queryObject = getSession().createQuery(queryString); queryObject.setParameter(...
GraduteJobManagementSystem
positive
436,554
public int end(int group) { if (group < 0 || group > groupCount) { throw new IndexOutOfBoundsException("Group index out of bounds: " + group); } if (!hasMatch) { throw new IllegalStateException("perhaps no match attempted"); } if (group == 0 || hasGroups) { return; } int end = groups[1] + 1; if (end > inputLength) { en...
public int end(int group) { <DeepExtract> if (group < 0 || group > groupCount) { throw new IndexOutOfBoundsException("Group index out of bounds: " + group); } if (!hasMatch) { throw new IllegalStateException("perhaps no match attempted"); } if (group == 0 || hasGroups) { return; } int end = groups[1] + 1; if (end > inp...
re2j
positive
436,556
@Override public void onUpdated() { repCountView.setText("x" + programNode.getTotalReps()); }
@Override public void onUpdated() { <DeepExtract> repCountView.setText("x" + programNode.getTotalReps()); </DeepExtract> }
HIITMe
positive
436,557
@Test public void testSearchUtil() { values = new String[] { "a" }; search = new String[] { "a" }; assertTrue(SearchUtil.matches(Arrays.asList(values), Arrays.asList(search))); values = new String[] { "a" }; search = new String[] { "*" }; assertTrue(SearchUtil.matches(Arrays.asList(values), Arrays.asList(search))); val...
@Test public void testSearchUtil() { values = new String[] { "a" }; search = new String[] { "a" }; assertTrue(SearchUtil.matches(Arrays.asList(values), Arrays.asList(search))); values = new String[] { "a" }; search = new String[] { "*" }; assertTrue(SearchUtil.matches(Arrays.asList(values), Arrays.asList(search))); val...
ibis-ladybug
positive
436,564
public static void main(String[] args) throws InterruptedException { Thread t = new Thread(); System.out.println("Thread state of " + t.getName() + " is: " + t.getState()); t.start(); System.out.println("Thread state of " + t.getName() + " is: " + t.getState()); t.join(); System.out.println("Thread state of " + Threa...
public static void main(String[] args) throws InterruptedException { Thread t = new Thread(); <DeepExtract> System.out.println("Thread state of " + t.getName() + " is: " + t.getState()); </DeepExtract> t.start(); <DeepExtract> System.out.println("Thread state of " + t.getName() + " is: " + t.getState()); </DeepExtrac...
java_concurrency
positive
436,565
public DynamicByteBuffer putShort(short v) { if (autoExpand) { expand(2); } _buf.putShort(v); return this; }
public DynamicByteBuffer putShort(short v) { <DeepExtract> if (autoExpand) { expand(2); } </DeepExtract> _buf.putShort(v); return this; }
netx
positive
436,566
public Criteria andCreateUseridLessThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "createUserid" + " cannot be null"); } criteria.add(new Criterion("CREATE_USERID <=", value)); return (Criteria) this; }
public Criteria andCreateUseridLessThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "createUserid" + " cannot be null"); } criteria.add(new Criterion("CREATE_USERID <=", value)); </DeepExtract> return (Criteria) this; }
console
positive
436,568
public <T> Predicate lt(T value) { Less re = new Less(); re._left = this; if (value instanceof Directive) { re._right = (Directive) value; } else { re._right = new Literal(value); } return re; }
public <T> Predicate lt(T value) { Less re = new Less(); re._left = this; <DeepExtract> if (value instanceof Directive) { re._right = (Directive) value; } else { re._right = new Literal(value); } </DeepExtract> return re; }
jaskell-java8
positive
436,570
@Override public void onBlogItemClicked(Blog blog) { openBlogDetailActivity.setValue(blog); }
@Override public void onBlogItemClicked(Blog blog) { <DeepExtract> openBlogDetailActivity.setValue(blog); </DeepExtract> }
base-mvvm
positive
436,571
public static byte[] sha1Encode(byte[] input) { try { MessageDigest digest = MessageDigest.getInstance(ALGORITHM_SHA1); if (null != null) { digest.update(null); } byte[] result = digest.digest(input); for (int i = 1; i < 1; i++) { digest.reset(); result = digest.digest(result); } return result; } catch (GeneralSecurity...
public static byte[] sha1Encode(byte[] input) { <DeepExtract> try { MessageDigest digest = MessageDigest.getInstance(ALGORITHM_SHA1); if (null != null) { digest.update(null); } byte[] result = digest.digest(input); for (int i = 1; i < 1; i++) { digest.reset(); result = digest.digest(result); } return result; } catch (G...
radish
positive
436,572
public static String solveXcross(String scramble, int face) { if (ini) return; int a, b, c, d, e, f; for (a = 0; a < 495; a++) { for (b = 0; b < 24; b++) { for (c = 0; c < 6; c++) { d = getmv(a, b, c); epm[24 * a + b][c] = (short) (d >> 4); if (b < 16) eom[16 * a + b][c] = (short) ((d / 384) << 4 | d & 15); } } } for (...
public static String solveXcross(String scramble, int face) { <DeepExtract> if (ini) return; int a, b, c, d, e, f; for (a = 0; a < 495; a++) { for (b = 0; b < 24; b++) { for (c = 0; c < 6; c++) { d = getmv(a, b, c); epm[24 * a + b][c] = (short) (d >> 4); if (b < 16) eom[16 * a + b][c] = (short) ((d / 384) << 4 | d & 15...
DCTimer-Android
positive
436,574
public void handle(MouseEvent me) { Player player = new Player(); Note newNote = new Note(); newNote.setNoteSource(noteInputEnums.virtual_keyboardClick); newNote.setValidNote(true); NoteWrapper nw = new NoteWrapper(newNote, 90); ic.set(Collections.singleton(nw), null); String note = "I[Guitar] " + "A"; player.play(note...
public void handle(MouseEvent me) { <DeepExtract> Player player = new Player(); Note newNote = new Note(); newNote.setNoteSource(noteInputEnums.virtual_keyboardClick); newNote.setValidNote(true); NoteWrapper nw = new NoteWrapper(newNote, 90); ic.set(Collections.singleton(nw), null); String note = "I[Guitar] " + "A"; pl...
jmn
positive
436,575
@Override public String getValue() { int index = this.getSelectedIndex(); return (index >= 0) ? this.getValue(index) : null; }
@Override public String getValue() { <DeepExtract> int index = this.getSelectedIndex(); return (index >= 0) ? this.getValue(index) : null; </DeepExtract> }
gwt-traction
positive
436,576
private void buildConnection() throws IOException { socket = new DatagramSocket(); address = InetAddress.getByName(URL); buffer = new byte[65527]; this.running = true; }
private void buildConnection() throws IOException { socket = new DatagramSocket(); address = InetAddress.getByName(URL); buffer = new byte[65527]; <DeepExtract> this.running = true; </DeepExtract> }
l.free-android
positive
436,577
@Bean public DataSource whole(EasyTransTestProperties properties) { DruidDataSource ds = new DruidDataSource(); ds.setUrl(properties.getUrl()); ds.setUsername(properties.getUsername()); ds.setPassword(properties.getPassword()); ds.setMaxActive(10); ds.setInitialSize(1); ds.setMinIdle(1); ds.setPoolPreparedStatements(tr...
@Bean public DataSource whole(EasyTransTestProperties properties) { <DeepExtract> DruidDataSource ds = new DruidDataSource(); ds.setUrl(properties.getUrl()); ds.setUsername(properties.getUsername()); ds.setPassword(properties.getPassword()); ds.setMaxActive(10); ds.setInitialSize(1); ds.setMinIdle(1); ds.setPoolPrepare...
EasyTransaction
positive
436,578
private void fitsWindowsKITKAT() { if (checkFitsSystemWindows(mDecorView.findViewById(android.R.id.content))) { setPadding(0, 0, 0, 0); return; } int top = 0, right = 0, bottom = 0; int top = 0, right = 0, bottom = 0; int top = 0, right = 0, bottom = 0; if (mBarParams.fits && mFitsStatusBarType == FLAG_FITS_SYSTEM_WIND...
private void fitsWindowsKITKAT() { if (checkFitsSystemWindows(mDecorView.findViewById(android.R.id.content))) { setPadding(0, 0, 0, 0); return; } int top = 0, right = 0, bottom = 0; int top = 0, right = 0, bottom = 0; int top = 0, right = 0, bottom = 0; if (mBarParams.fits && mFitsStatusBarType == FLAG_FITS_SYSTEM_WIND...
ImmersionBar
positive
436,582
static public Intent convert(final Intent intent) { if (intent == null) { return null; } if (!ACTION_VIEW.equals(intent.getAction())) { return null; } Uri data = intent.getData(); if (data == null) { return null; } if (TextUtils.isEmpty(data.getHost()) || TextUtils.isEmpty(data.getScheme())) { String host = data.getHos...
static public Intent convert(final Intent intent) { if (intent == null) { return null; } if (!ACTION_VIEW.equals(intent.getAction())) { return null; } Uri data = intent.getData(); if (data == null) { return null; } if (TextUtils.isEmpty(data.getHost()) || TextUtils.isEmpty(data.getScheme())) { String host = data.getHos...
PocketHub
positive
436,583
public static void exe(String command, String workDir) { CmdTask cmdTask = new CmdTask(command, workDir); Process process = null; int exitVal = 0; String error = ""; try { File work_dirs = null; if (mWorkDir != null && mWorkDir.length() > 0) { work_dirs = new File(mWorkDir); } process = Runtime.getRuntime().exec(mComma...
public static void exe(String command, String workDir) { CmdTask cmdTask = new CmdTask(command, workDir); <DeepExtract> Process process = null; int exitVal = 0; String error = ""; try { File work_dirs = null; if (mWorkDir != null && mWorkDir.length() > 0) { work_dirs = new File(mWorkDir); } process = Runtime.getRuntime...
BaseMyProject
positive
436,585
private int addResourcesObject() throws Exception { objOffset.add(byteCount); append(objOffset.size()); append(" 0 obj\n"); append(Integer.toString("<<\n")); if (!extGState.equals("")) { append(extGState); } if (fonts.size() > 0 || importedFonts.size() > 0) { append("/Font\n"); append("<<\n"); for (String token : impor...
private int addResourcesObject() throws Exception { objOffset.add(byteCount); append(objOffset.size()); append(" 0 obj\n"); append(Integer.toString("<<\n")); if (!extGState.equals("")) { append(extGState); } if (fonts.size() > 0 || importedFonts.size() > 0) { append("/Font\n"); append("<<\n"); for (String token : impor...
pdfjet
positive
436,587
@Override public final short readShort() throws IOException { dis.readFully(work, 0, 2); return (short) ((work[1] & 0xff) << 8 | (work[0] & 0xff)); }
@Override public final short readShort() throws IOException { <DeepExtract> dis.readFully(work, 0, 2); </DeepExtract> return (short) ((work[1] & 0xff) << 8 | (work[0] & 0xff)); }
dexknife-wj
positive
436,588
@Override public Expr onLocalImport(Path path, Expr.ImportMode mode, byte[] hash) { if (mode.equals(Expr.ImportMode.LOCATION)) { result = Expr.makeApplication(Expr.makeFieldAccess(Expr.Constants.LOCATION_TYPE, "Local"), Expr.makeTextLiteral(path.toString())); } else { Path resolvedPath = (currentPath == null) ? path : ...
@Override public Expr onLocalImport(Path path, Expr.ImportMode mode, byte[] hash) { if (mode.equals(Expr.ImportMode.LOCATION)) { result = Expr.makeApplication(Expr.makeFieldAccess(Expr.Constants.LOCATION_TYPE, "Local"), Expr.makeTextLiteral(path.toString())); } else { Path resolvedPath = (currentPath == null) ? path : ...
dhallj
positive
436,589
public void onNetworkDisconnected() { if (this.state != State.WAITING_FOR_NETWORK) { Log.d(LOG_TAG, "enter state: " + State.WAITING_FOR_NETWORK.name()); this.state = State.WAITING_FOR_NETWORK; } }
public void onNetworkDisconnected() { <DeepExtract> if (this.state != State.WAITING_FOR_NETWORK) { Log.d(LOG_TAG, "enter state: " + State.WAITING_FOR_NETWORK.name()); this.state = State.WAITING_FOR_NETWORK; } </DeepExtract> }
LetsChat
positive
436,591
@Override public void mousePressed(MouseEvent e) { if (mediaPlayer.status().isPlaying()) { mousePressedPlaying = true; mediaPlayer.controls().pause(); } else { mousePressedPlaying = false; } if (!mediaPlayer.status().isSeekable()) { return; } float positionValue = positionSlider.getValue() / 1000.0f; if (positionValue ...
@Override public void mousePressed(MouseEvent e) { if (mediaPlayer.status().isPlaying()) { mousePressedPlaying = true; mediaPlayer.controls().pause(); } else { mousePressedPlaying = false; } <DeepExtract> if (!mediaPlayer.status().isSeekable()) { return; } float positionValue = positionSlider.getValue() / 1000.0f; if (...
vlcj-examples
positive
436,592
private String encodeEmail(String s) { StringBuffer sb = new StringBuffer(); char[] email = s.toCharArray(); for (char ch : email) { double r = rnd.nextDouble(); if (r < 0.45) { sb.append("&#"); sb.append((int) ch); sb.append(';'); } else if (r < 0.9) { sb.append("&#x"); sb.append(Integer.toString((int) ch, 16)); sb.ap...
private String encodeEmail(String s) { StringBuffer sb = new StringBuffer(); char[] email = s.toCharArray(); for (char ch : email) { double r = rnd.nextDouble(); if (r < 0.45) { sb.append("&#"); sb.append((int) ch); sb.append(';'); } else if (r < 0.9) { sb.append("&#x"); sb.append(Integer.toString((int) ch, 16)); sb.ap...
fresco-sample-usage
positive
436,593
private void initBitmap() { if (getDrawable() == null) mBitmap = null; if (getDrawable() instanceof BitmapDrawable) mBitmap = ((BitmapDrawable) getDrawable()).getBitmap(); try { Bitmap bitmap; if (getDrawable() instanceof ColorDrawable) bitmap = Bitmap.createBitmap(2, 2, Config.ARGB_8888); else bitmap = Bitmap.createBi...
private void initBitmap() { if (getDrawable() == null) mBitmap = null; if (getDrawable() instanceof BitmapDrawable) mBitmap = ((BitmapDrawable) getDrawable()).getBitmap(); try { Bitmap bitmap; if (getDrawable() instanceof ColorDrawable) bitmap = Bitmap.createBitmap(2, 2, Config.ARGB_8888); else bitmap = Bitmap.createBi...
Android-development-with-example
positive
436,594
public int getRealCount() { if (mAdapter == null) { return 0; } if (getRealCount() <= 0) { return 0; } return mCanLoop ? getRealCount() + 2 : getRealCount(); }
public int getRealCount() { if (mAdapter == null) { return 0; } <DeepExtract> if (getRealCount() <= 0) { return 0; } return mCanLoop ? getRealCount() + 2 : getRealCount(); </DeepExtract> }
JianshuApp
positive
436,596
public void loadIntVariable(int vindex) { if (vindex < 0) throw new IllegalArgumentException("vindex must be positive"); if (vindex >= numLocals) { numLocals = vindex + 1; if (numLocals > 65535) throw new ClassFileLimitExceededException("Too many locals."); } if (stackSize == -1) { return; } stackSize -= 0; if (stackSi...
public void loadIntVariable(int vindex) { if (vindex < 0) throw new IllegalArgumentException("vindex must be positive"); if (vindex >= numLocals) { numLocals = vindex + 1; if (numLocals > 65535) throw new ClassFileLimitExceededException("Too many locals."); } <DeepExtract> if (stackSize == -1) { return; } stackSize -= ...
arden2bytecode
positive
436,597
public String getDocFor(Method method) { if (cache.contains(method)) return cache.get(method); StringBuilder b = new StringBuilder(); synchronized (map) { int lastIndex = map.keySet().size() - 1; int index = 0; for (Class<? extends Annotation> key : map.keySet()) { DocMultiple docMultiple = key.getAnnotation(DocMultipl...
public String getDocFor(Method method) { <DeepExtract> if (cache.contains(method)) return cache.get(method); StringBuilder b = new StringBuilder(); synchronized (map) { int lastIndex = map.keySet().size() - 1; int index = 0; for (Class<? extends Annotation> key : map.keySet()) { DocMultiple docMultiple = key.getAnnotat...
JDA-Utilities
positive
436,598
@Override public void onGlobalLayout() { if (browserStorage.getIsFullscreenEnabled()) { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { getW...
@Override public void onGlobalLayout() { <DeepExtract> if (browserStorage.getIsFullscreenEnabled()) { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES....
Cornowser
positive
436,599
private void buildPostOrder(TreeNode<T> node, List<TreeNode<T>> traversalResult) { for (TreeNode<T> child : node.getChildren()) { buildPostOrder(child, traversalResult); } additionOrder.put(node, i); i++; }
private void buildPostOrder(TreeNode<T> node, List<TreeNode<T>> traversalResult) { for (TreeNode<T> child : node.getChildren()) { buildPostOrder(child, traversalResult); } <DeepExtract> additionOrder.put(node, i); i++; </DeepExtract> }
isoscm
positive
436,600
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_help_tutorial); materialTutorialPresenter = new MaterialTutorialPresenter(this, this); if (isFinishing()) { return; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window wi...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_help_tutorial); materialTutorialPresenter = new MaterialTutorialPresenter(this, this); <DeepExtract> if (isFinishing()) { return; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPO...
bookdash-android-app
positive
436,601
public static DocumentFile getMembershipsDirectory(Context context, String worldName, String personName, boolean createIfNotExists) { DocumentFile articleDirectory; DocumentFile categoryDirectory = getCategoryDirectory(context, worldName, Category.Person, createIfNotExists); if (categoryDirectory == null) { articleDire...
public static DocumentFile getMembershipsDirectory(Context context, String worldName, String personName, boolean createIfNotExists) { <DeepExtract> DocumentFile articleDirectory; DocumentFile categoryDirectory = getCategoryDirectory(context, worldName, Category.Person, createIfNotExists); if (categoryDirectory == null)...
World-Scribe
positive
436,602
public final <U> Ix<U> replay(final Func1<? super Iterable<T>, ? extends Iterable<U>> func) { if (Interactive.replay(it, func) instanceof Ix) { return (Ix<T>) Interactive.replay(it, func); } return new Ix<T>(Interactive.replay(it, func)); }
public final <U> Ix<U> replay(final Func1<? super Iterable<T>, ? extends Iterable<U>> func) { <DeepExtract> if (Interactive.replay(it, func) instanceof Ix) { return (Ix<T>) Interactive.replay(it, func); } return new Ix<T>(Interactive.replay(it, func)); </DeepExtract> }
ixjava
positive
436,603
@Override public void onBackStackChanged() { boolean canback = (getSupportFragmentManager().getBackStackEntryCount() > 0); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(canback); } }
@Override public void onBackStackChanged() { <DeepExtract> boolean canback = (getSupportFragmentManager().getBackStackEntryCount() > 0); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(canback); } </DeepExtract> }
AlexaAndroid
positive
436,605
@Test public void testExecuteWithoutException() { Runnable runnable = spy(new MockRunnableWithoutException()); Throwable caught = null; try { synchronized (executor) { executor.execute(runnable); executor.wait(100); } } catch (InterruptedException x) { throw new Error(x); } catch (Exception x) { caught = x; } assertTha...
@Test public void testExecuteWithoutException() { Runnable runnable = spy(new MockRunnableWithoutException()); Throwable caught = null; try { synchronized (executor) { executor.execute(runnable); executor.wait(100); } } catch (InterruptedException x) { throw new Error(x); } catch (Exception x) { caught = x; } assertTha...
jhipster
positive
436,606
@Override public boolean canParse() { ContentType type = ContentTypes.fromURL(mURL); if (type == ContentType.NULL) { return false; } String file = mURL.toExternalForm(); StringBuffer sb = StringBuffer.fromString(file); StringBuffer filenameAndQuery = sb.lastAfter("/"); String filename = filenameAndQuery.stringBefore("?...
@Override public boolean canParse() { ContentType type = ContentTypes.fromURL(mURL); if (type == ContentType.NULL) { return false; } <DeepExtract> String file = mURL.toExternalForm(); StringBuffer sb = StringBuffer.fromString(file); StringBuffer filenameAndQuery = sb.lastAfter("/"); String filename = filenameAndQuery.s...
Viz
positive
436,608
public static void argpush(int subsig, Expression a0, Expression a1, Expression a2, Expression a3, Expression a4, Expression a5, Expression a6, Expression a7, Expression a8, Expression a9, Expression a10, Expression a11, Expression a12, Expression a13, Expression a14, Expression a15, Expression a16, Expression a17, Exp...
public static void argpush(int subsig, Expression a0, Expression a1, Expression a2, Expression a3, Expression a4, Expression a5, Expression a6, Expression a7, Expression a8, Expression a9, Expression a10, Expression a11, Expression a12, Expression a13, Expression a14, Expression a15, Expression a16, Expression a17, Exp...
acteve
positive
436,609
@Test public void testOrderedFilteredSubset() throws ETSdkException { ETFilter filter = ETFilter.parse("order by foo", "foo=bar", "foo"); assertEquals("foo", filter.getExpression().getProperty()); assertEquals(ETExpression.Operator.EQUALS, filter.getExpression().getOperator()); assertEquals("bar", filter.getExpression(...
@Test public void testOrderedFilteredSubset() throws ETSdkException { ETFilter filter = ETFilter.parse("order by foo", "foo=bar", "foo"); <DeepExtract> assertEquals("foo", filter.getExpression().getProperty()); assertEquals(ETExpression.Operator.EQUALS, filter.getExpression().getOperator()); assertEquals("bar", filter....
FuelSDK-Java
positive
436,610
public void noMoreSessionChannels() throws Exception { Buffer buf = new Buffer(); Packet packet = new Packet(buf); packet.reset(); buf.putByte((byte) SSH_MSG_GLOBAL_REQUEST); buf.putString(nomoresessions); buf.putByte((byte) 0); long t = getTimeout(); while (in_kex) { if (t > 0L && (System.currentTimeMillis() - kex_sta...
public void noMoreSessionChannels() throws Exception { Buffer buf = new Buffer(); Packet packet = new Packet(buf); packet.reset(); buf.putByte((byte) SSH_MSG_GLOBAL_REQUEST); buf.putString(nomoresessions); buf.putByte((byte) 0); <DeepExtract> long t = getTimeout(); while (in_kex) { if (t > 0L && (System.currentTimeMill...
jsch-documentation
positive
436,611
public static DStateLayout wrap(View view) { if (view == null) { throw new RuntimeException("content view can not be null"); } ViewGroup parent = (ViewGroup) view.getParent(); if (parent == null) { throw new RuntimeException("parent view can not be null"); } ViewGroup.LayoutParams lp = view.getLayoutParams(); int index...
public static DStateLayout wrap(View view) { if (view == null) { throw new RuntimeException("content view can not be null"); } ViewGroup parent = (ViewGroup) view.getParent(); if (parent == null) { throw new RuntimeException("parent view can not be null"); } ViewGroup.LayoutParams lp = view.getLayoutParams(); int index...
Selector
positive
436,612
@SuppressWarnings("OptionalGetWithoutIsPresent") private void maybeTruncateOrPruneTrackedOffsets(EpochAndRecordsMap<?, ?>.RecordsAndEpoch polledRecordBatch) { var records = polledRecordBatch.getRecords(); if (records.isEmpty()) { log.warn("Polled an empty batch of records? {}", polledRecordBatch); return; } var offsetO...
@SuppressWarnings("OptionalGetWithoutIsPresent") private void maybeTruncateOrPruneTrackedOffsets(EpochAndRecordsMap<?, ?>.RecordsAndEpoch polledRecordBatch) { var records = polledRecordBatch.getRecords(); if (records.isEmpty()) { log.warn("Polled an empty batch of records? {}", polledRecordBatch); return; } var offsetO...
parallel-consumer
positive
436,613
private void testAlgo(String gen_algo, AlgorithmParameterSpec gen_spec, String sign_algo, AlgorithmParameterSpec sign_spec, int data_size) throws Exception { System.out.println("------------------------" + gen_algo + "/" + sign_algo); KeyPairGenerator key_gen = KeyPairGenerator.getInstance(gen_algo); if (gen_spec != nu...
private void testAlgo(String gen_algo, AlgorithmParameterSpec gen_spec, String sign_algo, AlgorithmParameterSpec sign_spec, int data_size) throws Exception { System.out.println("------------------------" + gen_algo + "/" + sign_algo); KeyPairGenerator key_gen = KeyPairGenerator.getInstance(gen_algo); if (gen_spec != nu...
snowblossom
positive
436,615
public void save(Game game) { xmlHandler.saveAsXml(game); XmlTree games; try { File gf = FileManager.getGamesFile(); boolean ex = gf.exists(); Profile p = Profile.getInstance(); games = new XmlHelper().loadXml(gf); } catch (IOException e) { throw new IllegalStateException("Profil broken", e); } for (XmlTree g : games) ...
public void save(Game game) { xmlHandler.saveAsXml(game); XmlTree games; try { File gf = FileManager.getGamesFile(); boolean ex = gf.exists(); Profile p = Profile.getInstance(); games = new XmlHelper().loadXml(gf); } catch (IOException e) { throw new IllegalStateException("Profil broken", e); } for (XmlTree g : games) ...
SudoQ
positive
436,616
@Override public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 4 : 2; if (this.isEntityInvulnerable()) { return false; } else { Entity entity = DamageSource.causeMobDamage(this).getEntity(); this.aiSit.setSitting(false); if (entity != null && !(entity instanceof EntityPlayer) && !(entity insta...
@Override public boolean attackEntityAsMob(Entity par1Entity) { int i = this.isTamed() ? 4 : 2; <DeepExtract> if (this.isEntityInvulnerable()) { return false; } else { Entity entity = DamageSource.causeMobDamage(this).getEntity(); this.aiSit.setSitting(false); if (entity != null && !(entity instanceof EntityPlayer) && ...
Atum
positive
436,617
@Test public void testEC384() throws Exception { java.security.spec.ECGenParameterSpec spec = new java.security.spec.ECGenParameterSpec("secp384r1"); System.out.println("------------------------" + "ECDSA" + "/" + "SHA256withECDSA"); KeyPairGenerator key_gen = KeyPairGenerator.getInstance("ECDSA"); if (spec != null) ke...
@Test public void testEC384() throws Exception { java.security.spec.ECGenParameterSpec spec = new java.security.spec.ECGenParameterSpec("secp384r1"); System.out.println("------------------------" + "ECDSA" + "/" + "SHA256withECDSA"); KeyPairGenerator key_gen = KeyPairGenerator.getInstance("ECDSA"); if (spec != null) ke...
snowblossom
positive
436,619
@Override public String stringify(boolean includePositionalInfo) { StringBuilder s = new StringBuilder(); s.append("["); if (getStreamName() != null) { s.append(getStreamName()).append(" = "); } if (sourceDestinationNode != null) { s.append(sourceDestinationNode.stringify(includePositionalInfo)); } for (AppNode appNode...
@Override public String stringify(boolean includePositionalInfo) { StringBuilder s = new StringBuilder(); s.append("["); if (getStreamName() != null) { s.append(getStreamName()).append(" = "); } if (sourceDestinationNode != null) { s.append(sourceDestinationNode.stringify(includePositionalInfo)); } for (AppNode appNode...
spring-cloud-dashboard
positive
436,620
@Test public void dupDelTest() throws IOException { File wd = tmpFolder.newFolder("tmp"); String reference = new File("src/test/resources/simulationTests/dupDelTest", "reference.fa").toString(); String vcf = new File("src/test/resources/simulationTests/dupDelTest", "input.vcf").toString(); String expectedVCF1 = new Fil...
@Test public void dupDelTest() throws IOException { <DeepExtract> File wd = tmpFolder.newFolder("tmp"); String reference = new File("src/test/resources/simulationTests/dupDelTest", "reference.fa").toString(); String vcf = new File("src/test/resources/simulationTests/dupDelTest", "input.vcf").toString(); String expected...
varsim
positive
436,621
@Override protected final void configure() { super.configure(); bindConstant().annotatedWith(named(SERVER_PORT_KEY)).to(SERVER_PORT); bind(ChatServer.class).to(ChatServerImpl.class).in(Singleton.class); bind(ChatHandler.class).to(ChatHandlerImpl.class).in(Singleton.class); bind(ScheduledExecutorService.class).toProvide...
@Override protected final void configure() { super.configure(); bindConstant().annotatedWith(named(SERVER_PORT_KEY)).to(SERVER_PORT); bind(ChatServer.class).to(ChatServerImpl.class).in(Singleton.class); bind(ChatHandler.class).to(ChatHandlerImpl.class).in(Singleton.class); <DeepExtract> bind(ScheduledExecutorService.cl...
javatrove
positive
436,629
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_menu, container, false); if (getArguments().containsKey(FITS_SYSTEM_WINDOW)) { rootView.setFitsSystemWindows(getArguments().getBoolean(FITS_SYSTEM_WINDOW)); } ...
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_menu, container, false); if (getArguments().containsKey(FITS_SYSTEM_WINDOW)) { rootView.setFitsSystemWindows(getArguments().getBoolean(FITS_SYSTEM_WINDOW)); } ...
Yalantis-Series
positive
436,630
public List<List<Integer>> combinationSum2(int[] candidates, int target) { List<List<Integer>> list = new LinkedList<List<Integer>>(); Arrays.sort(candidates); if (target < 0) { return; } else if (target == 0) { list.add(new ArrayList<>(new ArrayList<Integer>())); } else { for (int i = 0; i < candidates.length; i++) { ...
public List<List<Integer>> combinationSum2(int[] candidates, int target) { List<List<Integer>> list = new LinkedList<List<Integer>>(); Arrays.sort(candidates); <DeepExtract> if (target < 0) { return; } else if (target == 0) { list.add(new ArrayList<>(new ArrayList<Integer>())); } else { for (int i = 0; i < candidates.l...
myleetcode
positive
436,631
private void pullUpTrackedMethodInvocations(ClassInfo classInfo, Map<String, Set<String>> methods, ClassLoader loader) { if (methods.isEmpty()) return; if (classInfo.getSuperclassInfo(this, loader) == null || classInfo.getSuperclassInfo(this, loader).isSealed()) return; Map<String, Set<String>> remainingMethods = new H...
private void pullUpTrackedMethodInvocations(ClassInfo classInfo, Map<String, Set<String>> methods, ClassLoader loader) { if (methods.isEmpty()) return; <DeepExtract> if (classInfo.getSuperclassInfo(this, loader) == null || classInfo.getSuperclassInfo(this, loader).isSealed()) return; Map<String, Set<String>> remainingM...
aprof
positive
436,632
protected boolean isExcluded(String name) { String path = null; String baseDir = getBasedir(); if (baseDir.length() > 0) { baseDir = baseDir.concat(File.separator); } for (int i = 0; i < excludes.length; i++) { path = PathUtils.convertPathForOS(baseDir + excludes[i]); if (matchPath(path, name, isCaseSensitive)) { retur...
protected boolean isExcluded(String name) { <DeepExtract> String path = null; String baseDir = getBasedir(); if (baseDir.length() > 0) { baseDir = baseDir.concat(File.separator); } for (int i = 0; i < excludes.length; i++) { path = PathUtils.convertPathForOS(baseDir + excludes[i]); if (matchPath(path, name, isCaseSensi...
maven-archetype
positive
436,633
void onPrevious(String keywords, Long category, int startIndex) { this.keywords = keywords; this.category = category; this.startIndex = startIndex; productBlock = productService.findProductsByKeywordsCategory(keywords, category, startIndex, PRODUCTS_PER_PAGE); if (request.isXHR()) { ajaxResponseRenderer.addRender("tabl...
void onPrevious(String keywords, Long category, int startIndex) { this.keywords = keywords; this.category = category; this.startIndex = startIndex; productBlock = productService.findProductsByKeywordsCategory(keywords, category, startIndex, PRODUCTS_PER_PAGE); <DeepExtract> if (request.isXHR()) { ajaxResponseRenderer.a...
TendereteOnline
positive
436,634
@Override public Dimension getMaximumSize() { int maxWidth = 34; int maxHeight = Tileable.HEIGHT * 20; Dimension dim = super.getPreferredSize(); if (dim.width < maxWidth) dim.width = maxWidth; if (dim.height < maxHeight) dim.height = maxHeight; if (dim.width > maxWidth) dim.width = maxWidth; if (dim.height > maxHeight)...
@Override public Dimension getMaximumSize() { <DeepExtract> int maxWidth = 34; int maxHeight = Tileable.HEIGHT * 20; Dimension dim = super.getPreferredSize(); if (dim.width < maxWidth) dim.width = maxWidth; if (dim.height < maxHeight) dim.height = maxHeight; if (dim.width > maxWidth) dim.width = maxWidth; if (dim.heigh...
PokemonWalking
positive
436,636
public View getView(int position, View convertView, ViewGroup view) { if (convertView == null) { convertView = inflater.inflate(R.layout.listitem, null); holder = new ViewHolder(); holder.title = (TextView) convertView.findViewById(R.id.taskTitle); convertView.setTag(holder); } else { holder = (ViewHolder) convertView....
public View getView(int position, View convertView, ViewGroup view) { if (convertView == null) { convertView = inflater.inflate(R.layout.listitem, null); holder = new ViewHolder(); holder.title = (TextView) convertView.findViewById(R.id.taskTitle); convertView.setTag(holder); } else { holder = (ViewHolder) convertView....
google-api-java-client-samples
positive
436,637
File resourceToFile(IResource resource, ResourceType resourceType, ExecutionEvent event) throws ExecutionException { IPath path = resource.getLocation(); if (path == null) { getLogFacility().logWarning("Current selection contains a resource object with null-location: " + resource); return null; } return this.pathString...
File resourceToFile(IResource resource, ResourceType resourceType, ExecutionEvent event) throws ExecutionException { IPath path = resource.getLocation(); if (path == null) { getLogFacility().logWarning("Current selection contains a resource object with null-location: " + resource); return null; } <DeepExtract> return t...
startexplorer
positive
436,640
public static void main(String[] args) { DemoClass demoClass = new DemoClass(); System.out.println(getTestMessage("hello")); }
public static void main(String[] args) { DemoClass demoClass = new DemoClass(); <DeepExtract> System.out.println(getTestMessage("hello")); </DeepExtract> }
j360-jdk
positive
436,642
public static void main(String... args) throws IOException { DaciukTest1 fsa = new DaciukTest1(); fsa.addMinWord(str("fox")); PrintWriter pw = new PrintWriter("001.dot"); pw.println("digraph finite_state_machine {"); pw.println("rankdir=LR;"); pw.println("node [shape=circle,style=filled, fillcolor=white]"); for (Node n...
public static void main(String... args) throws IOException { DaciukTest1 fsa = new DaciukTest1(); fsa.addMinWord(str("fox")); PrintWriter pw = new PrintWriter("001.dot"); pw.println("digraph finite_state_machine {"); pw.println("rankdir=LR;"); pw.println("node [shape=circle,style=filled, fillcolor=white]"); for (Node n...
fsa
positive
436,643
private void sendForbidden(HttpServerExchange exchange, String details) { boolean isSuccess = StatusCodes.FORBIDDEN >= 200 && StatusCodes.FORBIDDEN < 300; JsonObject toSend = new JsonObject(); toSend.addProperty("success", isSuccess); toSend.addProperty("message", StatusCodes.getReason(StatusCodes.FORBIDDEN)); toSend.a...
private void sendForbidden(HttpServerExchange exchange, String details) { <DeepExtract> boolean isSuccess = StatusCodes.FORBIDDEN >= 200 && StatusCodes.FORBIDDEN < 300; JsonObject toSend = new JsonObject(); toSend.addProperty("success", isSuccess); toSend.addProperty("message", StatusCodes.getReason(StatusCodes.FORBIDD...
Pxls
positive
436,644
public WhenActions iOpenCardsPage() { browser.currentPage().clickLink("Pending Cards"); return this; }
public WhenActions iOpenCardsPage() { <DeepExtract> browser.currentPage().clickLink("Pending Cards"); </DeepExtract> return this; }
calopsita
positive
436,645
@Test public void canGenerateOperationWithInlineReturnValue() throws IOException { Resource inputModel = getTestResource("endpoint-test-operation-test-4" + ".mdsl"); OpenAPIGenerator generator = new OpenAPIGenerator(); JavaIoFileSystemAccess javaIoFileSystemAccess = getFileSystemAccess(); javaIoFileSystemAccess.setOutp...
@Test public void canGenerateOperationWithInlineReturnValue() throws IOException { <DeepExtract> Resource inputModel = getTestResource("endpoint-test-operation-test-4" + ".mdsl"); OpenAPIGenerator generator = new OpenAPIGenerator(); JavaIoFileSystemAccess javaIoFileSystemAccess = getFileSystemAccess(); javaIoFileSystem...
MDSL-Specification
positive
436,646
public void setDatas(List<NewsCommentBean.DataBean.CommentBean> lists) { mDatas.clear(); mDatas.addAll(lists); notifyDataSetChanged(); }
public void setDatas(List<NewsCommentBean.DataBean.CommentBean> lists) { mDatas.clear(); <DeepExtract> mDatas.addAll(lists); notifyDataSetChanged(); </DeepExtract> }
HeadLine
positive
436,648
RetCode TA_INT_PO(int startIdx, int endIdx, double[] inReal, int optInFastPeriod, int optInSlowPeriod, MAType optInMethod_2, MInteger outBegIdx, MInteger outNBElement, double[] outReal, double[] tempBuffer, int doPercentageOutput) { MInteger outBegIdx1 = new MInteger(); MInteger outNbElement1 = new MInteger(); MInteger...
RetCode TA_INT_PO(int startIdx, int endIdx, double[] inReal, int optInFastPeriod, int optInSlowPeriod, MAType optInMethod_2, MInteger outBegIdx, MInteger outNBElement, double[] outReal, double[] tempBuffer, int doPercentageOutput) { MInteger outBegIdx1 = new MInteger(); MInteger outNbElement1 = new MInteger(); MInteger...
TA-Lib
positive
436,651
public ShapeWrapper and(ShapeWrapper s2) { ArrayList<Point2D> pts = new ArrayList<Point2D>(); for (Point2D p : vertices(this)) { pts.add(p); } for (Point2D p : vertices(s2)) { pts.add(p); } return convexHull2(pts.toArray(new Point2D[0])); }
public ShapeWrapper and(ShapeWrapper s2) { <DeepExtract> ArrayList<Point2D> pts = new ArrayList<Point2D>(); for (Point2D p : vertices(this)) { pts.add(p); } for (Point2D p : vertices(s2)) { pts.add(p); } return convexHull2(pts.toArray(new Point2D[0])); </DeepExtract> }
molvec
positive
436,654
static String toJavaVersionString(int[] version) { final StringBuilder sb = new StringBuilder(); sb.append(version[0]).append('.'); sb.append(version[1]).append('.'); sb.append(version[2]); if (version.length > 3 && version[3] > 0) sb.append('_').append(version[3]); if (version.length > 4 && version[4] != 0) { final St...
static String toJavaVersionString(int[] version) { final StringBuilder sb = new StringBuilder(); sb.append(version[0]).append('.'); sb.append(version[1]).append('.'); sb.append(version[2]); if (version.length > 3 && version[3] > 0) sb.append('_').append(version[3]); if (version.length > 4 && version[4] != 0) { final St...
capsule
positive
436,655
@Deprecated public static system.proxies.User initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException { com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveI...
@Deprecated public static system.proxies.User initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException { <DeepExtract> com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core....
QueryApiBlogPost
positive
436,656
public List<Measurement> getMeasurementsSorted() { if (WebsitesSuite.NAME.equals(test_group_name)) return SQLite.select().from(Measurement.class).where(Measurement_Table.result_id.eq(id), Measurement_Table.is_rerun.eq(false), Measurement_Table.is_done.eq(true)).orderBy(Measurement_Table.is_anomaly, false).orderBy(Measu...
public List<Measurement> getMeasurementsSorted() { if (WebsitesSuite.NAME.equals(test_group_name)) return SQLite.select().from(Measurement.class).where(Measurement_Table.result_id.eq(id), Measurement_Table.is_rerun.eq(false), Measurement_Table.is_done.eq(true)).orderBy(Measurement_Table.is_anomaly, false).orderBy(Measu...
probe-android
positive
436,657
private void sendToActiveFragment(int rssi) { Fragment fragment; if (mViewPager.getCurrentItem() == 0) { if (mOverviewFragment == null) mOverviewFragment = OverviewFragment.newInstance(); long timeout = (System.currentTimeMillis() - lastSendLed); if (timeout > 1000 || timeout < 0) { lastSendLed = System.currentTimeMill...
private void sendToActiveFragment(int rssi) { <DeepExtract> Fragment fragment; if (mViewPager.getCurrentItem() == 0) { if (mOverviewFragment == null) mOverviewFragment = OverviewFragment.newInstance(); long timeout = (System.currentTimeMillis() - lastSendLed); if (timeout > 1000 || timeout < 0) { lastSendLed = System.c...
Android-u-blox-BLE
positive
436,658
@Override public Mib load(URL url) throws MibLoaderException, IOException { lock.lock(); try { final String name = loader.load(url).getName(); names.add(0, name); cache.put(name, loader.load(url)); return loader.load(url); } finally { lock.unlock(); } }
@Override public Mib load(URL url) throws MibLoaderException, IOException { <DeepExtract> lock.lock(); try { final String name = loader.load(url).getName(); names.add(0, name); cache.put(name, loader.load(url)); return loader.load(url); } finally { lock.unlock(); } </DeepExtract> }
tnm4j
positive
436,660
@Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView != null) { v = (DragSortItemView) convertView; View oldChild = v.getChildAt(0); child = mAdapter.getView(position, oldChild, DragSortListView.this); if (child != oldChild) { if (oldChild != null) { v.removeViewAt(0); } v.a...
@Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView != null) { v = (DragSortItemView) convertView; View oldChild = v.getChildAt(0); child = mAdapter.getView(position, oldChild, DragSortListView.this); if (child != oldChild) { if (oldChild != null) { v.removeViewAt(0); } v.a...
World-Weather
positive
436,661
@Override public boolean remove(K key) { if (closed) { throw new IllegalStateException("this cache is closed"); } return remove(key, true, null); }
@Override public boolean remove(K key) { <DeepExtract> if (closed) { throw new IllegalStateException("this cache is closed"); } </DeepExtract> return remove(key, true, null); }
blazingcache
positive
436,662
public Criteria andPtidNotIn(List<Integer> values) { if (values == null) { throw new RuntimeException("Value for " + "ptid" + " cannot be null"); } criteria.add(new Criterion("ptid not in", values)); return (Criteria) this; }
public Criteria andPtidNotIn(List<Integer> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "ptid" + " cannot be null"); } criteria.add(new Criterion("ptid not in", values)); </DeepExtract> return (Criteria) this; }
Gotrip
positive
436,663
private void runEvents() { Runnable r = new Runnable() { @Override public void run() { while (doTicks) { eventTick(); } } }; Thread t = new Thread(r); doTicks = true; startTime = System.currentTimeMillis(); runEvents(); }
private void runEvents() { Runnable r = new Runnable() { @Override public void run() { while (doTicks) { eventTick(); } } }; Thread t = new Thread(r); <DeepExtract> doTicks = true; startTime = System.currentTimeMillis(); runEvents(); </DeepExtract> }
retroscope-lib
positive
436,665
public void actionPerformed(java.awt.event.ActionEvent evt) { jTable1.scrollRectToVisible(new Rectangle(0, 0, 0, 0)); model.setMode(MemoryTableModel.BYTE); toggleButton32Bit.setSelected(false); toggleButton16Bit.setSelected(false); toggleButton8Bit.setSelected(true); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> jTable1.scrollRectToVisible(new Rectangle(0, 0, 0, 0)); model.setMode(MemoryTableModel.BYTE); toggleButton32Bit.setSelected(false); toggleButton16Bit.setSelected(false); toggleButton8Bit.setSelected(true); </DeepExtract> }
Jasmin
positive
436,666
@Override public int deleteById(Object key) { return mapper.deleteByPrimaryKey(key); }
@Override public int deleteById(Object key) { <DeepExtract> return mapper.deleteByPrimaryKey(key); </DeepExtract> }
robert
positive
436,667