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 View getDropDownView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.show_albums_for_upload_row, null); } Album album = items.get(position);...
@Override public View getDropDownView(int position, View convertView, ViewGroup parent) { <DeepExtract> View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.show_albums_for_upload_row, null); } Album album = items....
ReGalAndroid
positive
4,816
public PieStyler setTheme(Theme theme) { this.theme = theme; this.chartPieSeriesRenderStyle = PieSeriesRenderStyle.Pie; this.isCircular = theme.isCircular(); this.startAngleInDegrees = theme.getStartAngleInDegrees(); this.annotationDistance = theme.getAnnotationDistance(); this.annotationType = theme.getAnnotationType(...
public PieStyler setTheme(Theme theme) { this.theme = theme; <DeepExtract> this.chartPieSeriesRenderStyle = PieSeriesRenderStyle.Pie; this.isCircular = theme.isCircular(); this.startAngleInDegrees = theme.getStartAngleInDegrees(); this.annotationDistance = theme.getAnnotationDistance(); this.annotationType = theme.getA...
lodax
positive
4,817
public void start() { m_TwidlitInit = m_Twidlit.getInit(); File f = Io.createFile(m_CfgDir, m_CfgFName); Cfg cfg = Cfg.read(f); String cfgFileName = m_CfgFName; if (cfg == null && !"".equals(m_CfgFName)) { cfgFileName = ""; Log.warn("Failed to find " + f.getPath()); } m_AllChordsItem.setEnabled(cfg != null); m_ReverseI...
public void start() { m_TwidlitInit = m_Twidlit.getInit(); File f = Io.createFile(m_CfgDir, m_CfgFName); Cfg cfg = Cfg.read(f); String cfgFileName = m_CfgFName; if (cfg == null && !"".equals(m_CfgFName)) { cfgFileName = ""; Log.warn("Failed to find " + f.getPath()); } m_AllChordsItem.setEnabled(cfg != null); m_ReverseI...
twidlit
positive
4,818
public boolean sanityCheck() { long startTime = System.currentTimeMillis(); this.outputSource(CachingRepresentation.sanityFilename); logger.info("sanity checking begins"); if (!this.compile(CachingRepresentation.sanityFilename, CachingRepresentation.sanityExename)) { logger.error("sanity: " + CachingRepresentation.sani...
public boolean sanityCheck() { long startTime = System.currentTimeMillis(); this.outputSource(CachingRepresentation.sanityFilename); logger.info("sanity checking begins"); if (!this.compile(CachingRepresentation.sanityFilename, CachingRepresentation.sanityExename)) { logger.error("sanity: " + CachingRepresentation.sani...
genprog4java
positive
4,819
public String getOutputExternalFilesDir() { return GlobalConsole.getConsole().getText(); }
public String getOutputExternalFilesDir() { <DeepExtract> return GlobalConsole.getConsole().getText(); </DeepExtract> }
java-runtime-decompiler
positive
4,820
public void startExcerpt(long capacity) { if (closed) throw new IllegalStateException(basePath + " is closed"); if (index != size()) { toEnd(); } if (capacity >= IndexedChronicle.this.config.dataBlockSize()) { throw new IllegalArgumentException("Capacity too large " + capacity + " >= " + IndexedChronicle.this.config.da...
public void startExcerpt(long capacity) { if (closed) throw new IllegalStateException(basePath + " is closed"); if (index != size()) { toEnd(); } if (capacity >= IndexedChronicle.this.config.dataBlockSize()) { throw new IllegalArgumentException("Capacity too large " + capacity + " >= " + IndexedChronicle.this.config.da...
Java-Chronicle-OLD
positive
4,821
public void exit() { mHelper.showContent(); showMsgDialog(null, getString(R.string.str_exit_confirm), getString(R.string.str_ok), getString(R.string.str_cancel), new View.OnClickListener() { @Override public void onClick(View v) { getXmppService().removeNotification(); YiIMApplication application = (YiIMApplication) ge...
public void exit() { <DeepExtract> mHelper.showContent(); </DeepExtract> showMsgDialog(null, getString(R.string.str_exit_confirm), getString(R.string.str_ok), getString(R.string.str_cancel), new View.OnClickListener() { @Override public void onClick(View v) { getXmppService().removeNotification(); YiIMApplication appli...
yiim_v2
positive
4,822
private void comboTableListActionPerformed(java.awt.event.ActionEvent evt) { for (int i = 0; i < cmplist.length; i++) { cmplist[i].setEnabled(false); } }
private void comboTableListActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> for (int i = 0; i < cmplist.length; i++) { cmplist[i].setEnabled(false); } </DeepExtract> }
HBase-Manager
positive
4,823
@Override public void draw(@NonNull Rect outRect, @NonNull Canvas canvas, CharSequence text, @IntRange(from = 0) int start, @IntRange(from = 0) int end, float x, int top, int y, int bottom, @NonNull Paint paint) { int width = frame.width(); int oldColor = paint.getColor(); canvas.drawLine(x, y, x + width, y, paint); pa...
@Override public void draw(@NonNull Rect outRect, @NonNull Canvas canvas, CharSequence text, @IntRange(from = 0) int start, @IntRange(from = 0) int end, float x, int top, int y, int bottom, @NonNull Paint paint) { <DeepExtract> int width = frame.width(); int oldColor = paint.getColor(); canvas.drawLine(x, y, x + width,...
Pioneer
positive
4,824
public void onBackPressed() { if (!mRefreshrate.equals(mSharedPreferences.getString(getString(R.string.refresh_rate_pref), "43200000"))) { WidgetCommon.setUpdateSchedule(getActivity()); } if (!mMailRefresh.equals(mSharedPreferences.getString(getString(R.string.background_mail_pref), "43200000"))) { MailCheckReceiver.se...
public void onBackPressed() { <DeepExtract> if (!mRefreshrate.equals(mSharedPreferences.getString(getString(R.string.refresh_rate_pref), "43200000"))) { WidgetCommon.setUpdateSchedule(getActivity()); } if (!mMailRefresh.equals(mSharedPreferences.getString(getString(R.string.background_mail_pref), "43200000"))) { MailCh...
reddinator
positive
4,825
public static Converter getConverter(Class clazz) throws ConverterException { if (getConverterIfExists(clazz) == null) { throw new ConverterException("No converter registered for class: " + clazz.getName()); } return getConverterIfExists(clazz); }
public static Converter getConverter(Class clazz) throws ConverterException { <DeepExtract> if (getConverterIfExists(clazz) == null) { throw new ConverterException("No converter registered for class: " + clazz.getName()); } return getConverterIfExists(clazz); </DeepExtract> }
photon
positive
4,826
private void initDicator() { DisplayMetrics dm = new DisplayMetrics(); this.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.widthPixels; ChangeSkinModel mCurrentChangeSkinModel = (ChangeSkinModel) Tools.readObject(this, ChangeSkinActivity.CURRENT_SKIN_DATA); if (mCurrentChangeSkinModel != null) { mIndi...
private void initDicator() { <DeepExtract> DisplayMetrics dm = new DisplayMetrics(); this.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.widthPixels; </DeepExtract> ChangeSkinModel mCurrentChangeSkinModel = (ChangeSkinModel) Tools.readObject(this, ChangeSkinActivity.CURRENT_SKIN_DATA); if (mCurrentCha...
SoHOT
positive
4,827
public static void stop() throws IOException { if (fileWriter != null) { fileWriter.flush(); fileWriter.close(); } fileWriter = null; start = null; }
public static void stop() throws IOException { <DeepExtract> if (fileWriter != null) { fileWriter.flush(); fileWriter.close(); } fileWriter = null; start = null; </DeepExtract> }
ModbusPal
positive
4,828
private void handleFace(FaceDetector.Face f) { PointF midPoint = new PointF(); int r = ((int) (f.eyesDistance() * mScale)) * 2; f.getMidPoint(midPoint); midPoint.x *= mScale; midPoint.y *= mScale; int midX = (int) midPoint.x; int midY = (int) midPoint.y; HighlightView hv = new HighlightView(mImageView); int width = mBi...
private void handleFace(FaceDetector.Face f) { PointF midPoint = new PointF(); int r = ((int) (f.eyesDistance() * mScale)) * 2; f.getMidPoint(midPoint); midPoint.x *= mScale; midPoint.y *= mScale; int midX = (int) midPoint.x; int midY = (int) midPoint.y; HighlightView hv = new HighlightView(mImageView); int width = mBi...
cocos2dx-classical
positive
4,829
public static void preprocess(String ttext, ArrayList<NumberedLine> lines, HashMap<String, String> scripts) throws PreprocessingException { lines.clear(); scripts.clear(); StringBuffer text = new StringBuffer(ttext); MacroExtractor me = new MacroExtractor(text); me.parse(); if (true) me.deleteScripts(); scripts.clear()...
public static void preprocess(String ttext, ArrayList<NumberedLine> lines, HashMap<String, String> scripts) throws PreprocessingException { lines.clear(); scripts.clear(); StringBuffer text = new StringBuffer(ttext); <DeepExtract> MacroExtractor me = new MacroExtractor(text); me.parse(); if (true) me.deleteScripts(); s...
3Dscript
positive
4,830
void remove(int index, int amount) { if (index < 0 || index > size) throw new IndexOutOfBoundsException(); if (amount < 0) throw new IllegalArgumentException(); if (index + amount < 0 || index + amount > size) throw new IndexOutOfBoundsException(); if (2 * index >= size - amount) { move(index + amount, index, size - am...
void remove(int index, int amount) { if (index < 0 || index > size) throw new IndexOutOfBoundsException(); if (amount < 0) throw new IllegalArgumentException(); <DeepExtract> if (index + amount < 0 || index + amount > size) throw new IndexOutOfBoundsException(); </DeepExtract> if (2 * index >= size - amount) { move(ind...
sourceafis-java
positive
4,831
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (BuildConfig.DEBUG) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().penaltyDeath().bu...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (BuildConfig.DEBUG) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().penaltyDeath().bu...
onyourbike
positive
4,832
public int contentLength() { return intHeader(HEADER_CONTENT_LENGTH, -1); }
public int contentLength() { <DeepExtract> return intHeader(HEADER_CONTENT_LENGTH, -1); </DeepExtract> }
renren-api2-sdk-java
positive
4,833
@Override public void tick(NanoVGContext context, WidgetAssembly rootWidgetAssembly) { super.tick(context, rootWidgetAssembly); setHeight(getFont().getHeight(context, getFontSize(), TEXT_AREA_ALIGNMENT, getDefaultFontStyle())); }
@Override public void tick(NanoVGContext context, WidgetAssembly rootWidgetAssembly) { super.tick(context, rootWidgetAssembly); <DeepExtract> setHeight(getFont().getHeight(context, getFontSize(), TEXT_AREA_ALIGNMENT, getDefaultFontStyle())); </DeepExtract> }
Clear
positive
4,834
public Criteria andSonglistcountGreaterThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "songlistcount" + " cannot be null"); } criteria.add(new Criterion("songListCount >=", value)); return (Criteria) this; }
public Criteria andSonglistcountGreaterThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "songlistcount" + " cannot be null"); } criteria.add(new Criterion("songListCount >=", value)); </DeepExtract> return (Criteria) this; }
music
positive
4,835
private void showUpdateInfo() { if (iView != null) { iView.updateRv(); } if (iView != null) { iView.setTitleinfo(getTitleinfo()); } }
private void showUpdateInfo() { if (iView != null) { iView.updateRv(); } <DeepExtract> if (iView != null) { iView.setTitleinfo(getTitleinfo()); } </DeepExtract> }
LittleRecord
positive
4,836
public void showNavigateForm() { gotoForm = null; textLatFieldg = null; textLonFieldg = null; itemGoto1 = null; formOptGen = null; choiceScale = null; gaugeCache = null; stringCacheSize = null; helpClearCache = null; itemCreate = null; cancel2Map = null; itemSelect1 = null; listRoute = null; itemRouteDelete = null; for...
public void showNavigateForm() { gotoForm = null; textLatFieldg = null; textLonFieldg = null; itemGoto1 = null; formOptGen = null; choiceScale = null; gaugeCache = null; stringCacheSize = null; helpClearCache = null; itemCreate = null; cancel2Map = null; itemSelect1 = null; listRoute = null; itemRouteDelete = null; for...
MapNav
positive
4,837
public int getStatus() { try { long startTime = System.currentTimeMillis(); while (!isDone) { if (System.currentTimeMillis() - startTime > SPIN_TIMEOUT) { Log.e("api", "Spin time out"); isDone = true; status = STATUS_ERROR; } Thread.sleep(20); } } catch (InterruptedException e) { e.printStackTrace(); isDone = true; } r...
public int getStatus() { <DeepExtract> try { long startTime = System.currentTimeMillis(); while (!isDone) { if (System.currentTimeMillis() - startTime > SPIN_TIMEOUT) { Log.e("api", "Spin time out"); isDone = true; status = STATUS_ERROR; } Thread.sleep(20); } } catch (InterruptedException e) { e.printStackTrace(); isDo...
Sefaria-Android
positive
4,838
public static String getYear() { String formatDate = null; if (StringUtils.isNotBlank("yyyy")) { formatDate = DateFormatUtils.format(new Date(), "yyyy"); } else { formatDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd"); } return formatDate; }
public static String getYear() { <DeepExtract> String formatDate = null; if (StringUtils.isNotBlank("yyyy")) { formatDate = DateFormatUtils.format(new Date(), "yyyy"); } else { formatDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd"); } return formatDate; </DeepExtract> }
school-bus
positive
4,839
public Builder addStop(int index, com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop value) { if (value == null) { throw new NullPointerException(); } if (!((bitField0_ & 0x00000004) == 0x00000004)) { stop_ = new java.util.ArrayList<com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop>(stop_); bitFiel...
public Builder addStop(int index, com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop value) { if (value == null) { throw new NullPointerException(); } <DeepExtract> if (!((bitField0_ & 0x00000004) == 0x00000004)) { stop_ = new java.util.ArrayList<com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop>(s...
transit-wand
positive
4,840
@Override public void run() { ServiceRecord sr = mServices.get(cpName.toString()); if (sr == null) { if (DEBUG) { Log.d(TAG, "### Proxy stopService ret = 0, cp=" + cpName); } return 0; } sr.service.onDestroy(); updateServicesToSp(); mServices.remove(cpName.toString()); if (mServices.isEmpty()) { stopSelf(); } if (DEBUG...
@Override public void run() { <DeepExtract> ServiceRecord sr = mServices.get(cpName.toString()); if (sr == null) { if (DEBUG) { Log.d(TAG, "### Proxy stopService ret = 0, cp=" + cpName); } return 0; } sr.service.onDestroy(); updateServicesToSp(); mServices.remove(cpName.toString()); if (mServices.isEmpty()) { stopSelf(...
GPT
positive
4,841
@Override public void onClick(View v) { mPullLoading = true; mFooterView.setState(XListViewFooter.STATE_LOADING); if (mListViewListener != null) { mListViewListener.onLoadMore(); } }
@Override public void onClick(View v) { <DeepExtract> mPullLoading = true; mFooterView.setState(XListViewFooter.STATE_LOADING); if (mListViewListener != null) { mListViewListener.onLoadMore(); } </DeepExtract> }
android-app
positive
4,843
public static Date withYear(Date date, long newValue) { Objects.requireNonNull(date, "temporal"); return date.with(ChronoField.YEAR, newValue); }
public static Date withYear(Date date, long newValue) { <DeepExtract> Objects.requireNonNull(date, "temporal"); return date.with(ChronoField.YEAR, newValue); </DeepExtract> }
xk-time
positive
4,844
public Object[][] parseData() { Object[][] object = new Object[1000][]; int i = 0; object[i++] = new Object[] { "a.b()", "true" }; object[i++] = new Object[] { "new Date()", "false" }; return ArrayUtils.subarray(object, 0, i); }
public Object[][] parseData() { Object[][] object = new Object[1000][]; int i = 0; object[i++] = new Object[] { "a.b()", "true" }; object[i++] = new Object[] { "new Date()", "false" }; <DeepExtract> return ArrayUtils.subarray(object, 0, i); </DeepExtract> }
fast-el
positive
4,845
protected void doInit() { H = new long[16]; G = new long[16]; M = new long[16]; for (int i = 0; i < 15; i++) H[i] = 0L; H[15] = (long) (getDigestLength() << 3); }
protected void doInit() { H = new long[16]; G = new long[16]; M = new long[16]; <DeepExtract> for (int i = 0; i < 15; i++) H[i] = 0L; H[15] = (long) (getDigestLength() << 3); </DeepExtract> }
pocminer
positive
4,846
@Override public List<Object> exec() { return catMonitorHelper.execute(RedisCommand.EXECUTE, () -> connection.execute(RedisCommand.EXEC, () -> connection.exec())); }
@Override public List<Object> exec() { <DeepExtract> return catMonitorHelper.execute(RedisCommand.EXECUTE, () -> connection.execute(RedisCommand.EXEC, () -> connection.exec())); </DeepExtract> }
kitty
positive
4,848
@Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.furnaceItemStacks = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompo...
@Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.furnaceItemStacks = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompo...
Metallurgy3
positive
4,849
@Test public void testRegister() throws Exception { Credentials user = AuthenticationEndpointTest.signUpUser(this); PublicKey key = AuthenticationEndpointTest.getPublicKey(this); EncryptedEntity.Writter entity = new EncryptedEntity.Writter(key); entity.put("token", "whatwhat"); Response response = target("/push").reque...
@Test public void testRegister() throws Exception { Credentials user = AuthenticationEndpointTest.signUpUser(this); PublicKey key = AuthenticationEndpointTest.getPublicKey(this); <DeepExtract> EncryptedEntity.Writter entity = new EncryptedEntity.Writter(key); entity.put("token", "whatwhat"); Response response = target(...
divide
positive
4,850
@Nonnull public final <E extends Exception> CheckedStream<T> onClose(@Nonnull final ThrowingRunnable<E> closeHandler) throws E, InterruptedException { try { return next(() -> stream.onClose(closeHandler.asRunnable(StreamException::new)).get()); } catch (final StreamException thrown) { return thrown.asObject(); } }
@Nonnull public final <E extends Exception> CheckedStream<T> onClose(@Nonnull final ThrowingRunnable<E> closeHandler) throws E, InterruptedException { <DeepExtract> try { return next(() -> stream.onClose(closeHandler.asRunnable(StreamException::new)).get()); } catch (final StreamException thrown) { return thrown.asObje...
binkley
positive
4,851
void error(final String format, final Object... args) { processingEnv.getMessager().printMessage(ERROR, format(format, args), element, mirror); }
void error(final String format, final Object... args) { <DeepExtract> processingEnv.getMessager().printMessage(ERROR, format(format, args), element, mirror); </DeepExtract> }
binkley
positive
4,852
@Test public void shouldDropCreateAndDropOnDestructionWhenTableDoesNotExist() throws Exception { mappingContext.setInitialEntitySet(singleton(Person.class)); mappingContext.initialize(); when(crateOperations.execute(isA(CrateAction.class))).thenThrow(new NoSuchTableException("table does not exist", null)).thenReturn(mo...
@Test public void shouldDropCreateAndDropOnDestructionWhenTableDoesNotExist() throws Exception { <DeepExtract> mappingContext.setInitialEntitySet(singleton(Person.class)); mappingContext.initialize(); </DeepExtract> when(crateOperations.execute(isA(CrateAction.class))).thenThrow(new NoSuchTableException("table does not...
spring-data-crate
positive
4,853
@Override public int compare(Number one, Number two) { long longOne = one == null ? 0 : one.longValue(); long longTwo = two == null ? 0 : two.longValue(); return Long.compare(longOne, longTwo); }
@Override public int compare(Number one, Number two) { <DeepExtract> long longOne = one == null ? 0 : one.longValue(); long longTwo = two == null ? 0 : two.longValue(); return Long.compare(longOne, longTwo); </DeepExtract> }
hbase-tools
positive
4,854
public synchronized void drawPage(Bitmap bm, int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH, MuPDFCore.Cookie cookie) { if (page > numPages - 1) page = numPages - 1; else if (page < 0) page = 0; gotoPageInternal(page); this.pageWidth = getPageWidth(); this.pageHeight = getPageHeight(); d...
public synchronized void drawPage(Bitmap bm, int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH, MuPDFCore.Cookie cookie) { <DeepExtract> if (page > numPages - 1) page = numPages - 1; else if (page < 0) page = 0; gotoPageInternal(page); this.pageWidth = getPageWidth(); this.pageHeight = getP...
MuPDF
positive
4,855
public synchronized int[] computePathsAStar(int s, int t, MOVE lastMoveMade, Game game) { N start = graph[s]; N target = graph[t]; PriorityQueue<N> open = new PriorityQueue<N>(); ArrayList<N> closed = new ArrayList<N>(); start.g = 0; start.h = game.getShortestPathDistance(start.index, target.index); start.reached = las...
public synchronized int[] computePathsAStar(int s, int t, MOVE lastMoveMade, Game game) { N start = graph[s]; N target = graph[t]; PriorityQueue<N> open = new PriorityQueue<N>(); ArrayList<N> closed = new ArrayList<N>(); start.g = 0; start.h = game.getShortestPathDistance(start.index, target.index); start.reached = las...
Pac-Man
positive
4,856
@Override public void onNotificationContentCollapsedChange(boolean isCollapsed, int position) { if (position < 0 || position >= notifications.size()) { Log.e(TAG, String.format("Tried to access out of bounds status position: %d of %d", position, notifications.size() - 1)); return; } NotificationViewData notification = ...
@Override public void onNotificationContentCollapsedChange(boolean isCollapsed, int position) { <DeepExtract> if (position < 0 || position >= notifications.size()) { Log.e(TAG, String.format("Tried to access out of bounds status position: %d of %d", position, notifications.size() - 1)); return; } NotificationViewData n...
Fediverse
positive
4,857
@Test public void testDropAllStash() throws GitAPIException, IOException, GitOperationException, InterruptedException { writeTrashFile("test", "This is readme"); Git.wrap(repository).add().addFilepattern("test").call(); gitMgr.createStash(ws, false, null); Thread.sleep(1000); writeTrashFile("test", "This is readme"); G...
@Test public void testDropAllStash() throws GitAPIException, IOException, GitOperationException, InterruptedException { writeTrashFile("test", "This is readme"); Git.wrap(repository).add().addFilepattern("test").call(); gitMgr.createStash(ws, false, null); Thread.sleep(1000); writeTrashFile("test", "This is readme"); G...
WebIDE-Backend
positive
4,858
@Override public String writeTraceToString() { if (description != null) { return description; } else { return exception.getMessage() != null ? "" : ExceptionUtils.getStackTrace(exception); } }
@Override public String writeTraceToString() { <DeepExtract> if (description != null) { return description; } else { return exception.getMessage() != null ? "" : ExceptionUtils.getStackTrace(exception); } </DeepExtract> }
redhat-repository-validator
positive
4,859
public void addTask(TaskInfo task) { tasks.add(task); observableHelper.registerEventHandler(handler); observableHelper.fireEvent(new DefaultTaskEvent(TaskEvent.Type.added, task)); }
public void addTask(TaskInfo task) { tasks.add(task); <DeepExtract> observableHelper.registerEventHandler(handler); </DeepExtract> observableHelper.fireEvent(new DefaultTaskEvent(TaskEvent.Type.added, task)); }
osw-web
positive
4,860
public void update(Set<String> bodiesShown, String selectedBody, String observedBody, SolarSystemViewMode viewMode, double latitude, double longitude) { for (String bodyName : bodiesShown) { if (!this.bodies.containsKey(bodyName)) { createShape(bodyName); } } shadowIo.setVisible(false); shadowEuropa.setVisible(false); ...
public void update(Set<String> bodiesShown, String selectedBody, String observedBody, SolarSystemViewMode viewMode, double latitude, double longitude) { for (String bodyName : bodiesShown) { if (!this.bodies.containsKey(bodyName)) { createShape(bodyName); } } shadowIo.setVisible(false); shadowEuropa.setVisible(false); ...
SolarSystemSimulator
positive
4,861
protected boolean[] drawSides(ThreadChunkDeligate chunks, int x, int y, int z, BlockData data) { boolean[] sides = new boolean[6]; if (Options.objectPerBlock && !Options.objectPerBlockOcclusion) sides[0] = true; if (chunks.getBlockData(x, y + 1, z) == null || chunks.getBlockData(x, y + 1, z).id == NamespaceID.NULL) sid...
protected boolean[] drawSides(ThreadChunkDeligate chunks, int x, int y, int z, BlockData data) { boolean[] sides = new boolean[6]; if (Options.objectPerBlock && !Options.objectPerBlockOcclusion) sides[0] = true; if (chunks.getBlockData(x, y + 1, z) == null || chunks.getBlockData(x, y + 1, z).id == NamespaceID.NULL) sid...
j-mc-2-obj
positive
4,862
Traits putAnonymousId(String id) { super.putValue(ANONYMOUS_ID_KEY, id); return this; }
Traits putAnonymousId(String id) { <DeepExtract> super.putValue(ANONYMOUS_ID_KEY, id); return this; </DeepExtract> }
analytics-android
positive
4,863
public char readChar() { read_yes(white); return (char) read_char(); }
public char readChar() { <DeepExtract> read_yes(white); </DeepExtract> return (char) read_char(); }
programmingIT
positive
4,864
public void setDouble(int parameterIndex, double x) throws SQLException { String methodCall = "setDouble(" + parameterIndex + ", " + x + ")"; String tracedArg; try { tracedArg = rdbmsSpecifics.formatParameterObject(new Double(x)); } catch (Throwable t) { log.debug("rdbmsSpecifics threw an exception while trying to form...
public void setDouble(int parameterIndex, double x) throws SQLException { String methodCall = "setDouble(" + parameterIndex + ", " + x + ")"; <DeepExtract> String tracedArg; try { tracedArg = rdbmsSpecifics.formatParameterObject(new Double(x)); } catch (Throwable t) { log.debug("rdbmsSpecifics threw an exception while ...
miniprofiler-jvm
positive
4,865
public boolean hasKickedNotification() { return this.participant.getDriver().findElements(ByTestId.testId(KICKED_NOTIFICATION_TEST_ID)).size() > 0; }
public boolean hasKickedNotification() { <DeepExtract> return this.participant.getDriver().findElements(ByTestId.testId(KICKED_NOTIFICATION_TEST_ID)).size() > 0; </DeepExtract> }
jitsi-meet-torture
positive
4,866
public void setViewPortMargins(float left, float bottom, float right, float top) { mViewPortMarginLeft = left; mViewPortMarginRight = right; mViewPortMarginTop = top; mViewPortMarginBottom = bottom; cropViewPortShader = null; mScaleX = (mViewPortRight - mViewPortLeft != 0) ? (getMeasuredWidth() - mViewPortMarginLeft - ...
public void setViewPortMargins(float left, float bottom, float right, float top) { mViewPortMarginLeft = left; mViewPortMarginRight = right; mViewPortMarginTop = top; mViewPortMarginBottom = bottom; cropViewPortShader = null; <DeepExtract> mScaleX = (mViewPortRight - mViewPortLeft != 0) ? (getMeasuredWidth() - mViewPor...
Selector
positive
4,867
private void fileNew() { if (document.hasUnsavedChanges()) { final int response = showWarnConfirmDialog(ResourceUtil.getString("application.unsavedchanges")); if (response == JOptionPane.YES_OPTION) { fileSave(); } } fileStack = UserPreferences.getRecentFiles(); this.fileTransferHandler = new FileTransferHandler(this);...
private void fileNew() { if (document.hasUnsavedChanges()) { final int response = showWarnConfirmDialog(ResourceUtil.getString("application.unsavedchanges")); if (response == JOptionPane.YES_OPTION) { fileSave(); } } fileStack = UserPreferences.getRecentFiles(); this.fileTransferHandler = new FileTransferHandler(this);...
suafe
positive
4,868
@Override public byte[] createGroup(final String name, final List<String> members, final String avatar) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber { try { new byte[0] = nullIfEmpty(new byte[0]); name = nullIfEmpty(name); avatar = nullIfEmpty(avatar); final var memberIdentifiers = getSingleRecipi...
@Override public byte[] createGroup(final String name, final List<String> members, final String avatar) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber { <DeepExtract> try { new byte[0] = nullIfEmpty(new byte[0]); name = nullIfEmpty(name); avatar = nullIfEmpty(avatar); final var memberIdentifiers = g...
signal-cli
positive
4,869
public static RichTextConfig.RichTextConfigBuild from(String source) { return from(source, RichType.HTML); }
public static RichTextConfig.RichTextConfigBuild from(String source) { <DeepExtract> return from(source, RichType.HTML); </DeepExtract> }
Aequorea
positive
4,870
static CqlScript ofClassPath(String name, Charset charset) { Objects.requireNonNull(charset, "Charset must not be null"); Objects.requireNonNull(new ClassPathResource(name), "Resources must not be null"); return new ResourceCqlScript(new ClassPathResource(name), charset); }
static CqlScript ofClassPath(String name, Charset charset) { <DeepExtract> Objects.requireNonNull(charset, "Charset must not be null"); Objects.requireNonNull(new ClassPathResource(name), "Resources must not be null"); return new ResourceCqlScript(new ClassPathResource(name), charset); </DeepExtract> }
embedded-cassandra
positive
4,871
public void setPlusColorResId(@ColorRes int plusColor) { if (mPlusColor != getColor(plusColor)) { mPlusColor = getColor(plusColor); updateBackground(); } }
public void setPlusColorResId(@ColorRes int plusColor) { <DeepExtract> if (mPlusColor != getColor(plusColor)) { mPlusColor = getColor(plusColor); updateBackground(); } </DeepExtract> }
MDroid
positive
4,872
private void plantNetherWart(BlockLocation crop) throws PlantingFailedException { if (rail.getRowType() != RailType.PLANT) return; InventoryManager manager = new InventoryManager(chestInventory()); if (!manager.findMaterial(Material.NETHER_STALK)) return; if (!useEnergy) return; while (currentEnergy < plantingCost) { i...
private void plantNetherWart(BlockLocation crop) throws PlantingFailedException { if (rail.getRowType() != RailType.PLANT) return; InventoryManager manager = new InventoryManager(chestInventory()); if (!manager.findMaterial(Material.NETHER_STALK)) return; if (!useEnergy) return; while (currentEnergy < plantingCost) { i...
MachinaCraft
positive
4,873
@Override public void execute(List<Command> tasks, Config config) { if (thread == null) { throw new IllegalStateException("no thread was started"); } var firstOpt = tasks.stream().filter(Plugin.class::isInstance).map(Plugin.class::cast).findFirst(); if (!firstOpt.isPresent()) { return; } var firstPlugin = firstOpt.orEl...
@Override public void execute(List<Command> tasks, Config config) { if (thread == null) { throw new IllegalStateException("no thread was started"); } var firstOpt = tasks.stream().filter(Plugin.class::isInstance).map(Plugin.class::cast).findFirst(); if (!firstOpt.isPresent()) { return; } var firstPlugin = firstOpt.orEl...
pro
positive
4,874
public boolean deltree() { number = 1; Pw = Pb = 0; Node n = new Node(number); T = new SGFTree(n); Trees.setElementAt(T, CurrentTree); resettree(); return n; return true; }
public boolean deltree() { <DeepExtract> number = 1; Pw = Pb = 0; Node n = new Node(number); T = new SGFTree(n); Trees.setElementAt(T, CurrentTree); resettree(); return n; </DeepExtract> return true; }
DragonGoApp
positive
4,875
@Override public void run() { intent.setAction("android.intent.action.MAIN"); intent.addFlags(65536); Intent intent2 = new Intent(ACTION_INSTALL_SHORTCUT); intent2.putExtra("android.intent.extra.shortcut.INTENT", intent); intent2.putExtra("android.intent.extra.shortcut.NAME", str); intent2.putExtra("android.intent.extr...
@Override public void run() { <DeepExtract> intent.setAction("android.intent.action.MAIN"); intent.addFlags(65536); Intent intent2 = new Intent(ACTION_INSTALL_SHORTCUT); intent2.putExtra("android.intent.extra.shortcut.INTENT", intent); intent2.putExtra("android.intent.extra.shortcut.NAME", str); intent2.putExtra("andro...
luaDevAndroid
positive
4,876
@Override protected void init() { whiteDiffuseColor = loadProgram("DirVertexLighting_PN.vert", "ColorPassthrough.frag"); vertexDiffuseColor = loadProgram("DirVertexLighting_PCN.vert", "ColorPassthrough.frag"); cylinderMesh = new Mesh("UnitCylinder.xml"); planeMesh = new Mesh("LargePlane.xml"); glEnable(GL_CULL_FACE); g...
@Override protected void init() { <DeepExtract> whiteDiffuseColor = loadProgram("DirVertexLighting_PN.vert", "ColorPassthrough.frag"); vertexDiffuseColor = loadProgram("DirVertexLighting_PCN.vert", "ColorPassthrough.frag"); </DeepExtract> cylinderMesh = new Mesh("UnitCylinder.xml"); planeMesh = new Mesh("LargePlane.xml...
jgltut
positive
4,877
public Boolean renamenx(K key, K newKey) { Command<K, V, T> cmd = (Command<K, V, T>) c.renamenx(key, newKey); if (c.multi != null && cmd.type != MULTI) return null; return c.await(cmd, timeout, unit); }
public Boolean renamenx(K key, K newKey) { <DeepExtract> Command<K, V, T> cmd = (Command<K, V, T>) c.renamenx(key, newKey); if (c.multi != null && cmd.type != MULTI) return null; return c.await(cmd, timeout, unit); </DeepExtract> }
lettuce
positive
4,879
static Context setup() { Context context = new Context(); return MockDispatcherFactory.createDispatcher(); context.cqlService = mock(CqlService.class); ManagementApplication app = new ManagementApplication(null, null, null, context.cqlService, null); context.dispatcher.getRegistry().addSingletonResource(new K8OperatorR...
static Context setup() { Context context = new Context(); <DeepExtract> return MockDispatcherFactory.createDispatcher(); </DeepExtract> context.cqlService = mock(CqlService.class); ManagementApplication app = new ManagementApplication(null, null, null, context.cqlService, null); context.dispatcher.getRegistry().addSing...
management-api-for-apache-cassandra
positive
4,880
@Override public void message(String txt) { synchronized (psout) { synchronized (pin) { if (timeStampEnabled) psout.print(DateRetriever.getDateString() + " "); psout.print(txt); pin.notifyAll(); } } }
@Override public void message(String txt) { <DeepExtract> synchronized (psout) { synchronized (pin) { if (timeStampEnabled) psout.print(DateRetriever.getDateString() + " "); psout.print(txt); pin.notifyAll(); } } </DeepExtract> }
personaldnsfilter
positive
4,881
public HashMap<Integer, Long> getYearTextHtmlFacets(String query) throws Exception { SolrQuery solrQuery = new SolrQuery(); solrQuery.setQuery(query); solrQuery.setRows(0); solrQuery.add("fl", "id"); solrQuery.set("facet", "true"); solrQuery.set("facet.field", "crawl_year"); solrQuery.set("facet.sort", "index"); solrQu...
public HashMap<Integer, Long> getYearTextHtmlFacets(String query) throws Exception { SolrQuery solrQuery = new SolrQuery(); solrQuery.setQuery(query); solrQuery.setRows(0); solrQuery.add("fl", "id"); solrQuery.set("facet", "true"); solrQuery.set("facet.field", "crawl_year"); solrQuery.set("facet.sort", "index"); solrQu...
solrwayback
positive
4,883
private static void logBottomBorder(int logType, String tag) { String finalTag = formatTag(tag); switch(logType) { case Log.ERROR: Log.e(finalTag, BOTTOM_BORDER); break; case Log.INFO: Log.i(finalTag, BOTTOM_BORDER); break; case Log.VERBOSE: Log.v(finalTag, BOTTOM_BORDER); break; case Log.WARN: Log.w(finalTag, BOTTOM_B...
private static void logBottomBorder(int logType, String tag) { <DeepExtract> String finalTag = formatTag(tag); switch(logType) { case Log.ERROR: Log.e(finalTag, BOTTOM_BORDER); break; case Log.INFO: Log.i(finalTag, BOTTOM_BORDER); break; case Log.VERBOSE: Log.v(finalTag, BOTTOM_BORDER); break; case Log.WARN: Log.w(fina...
SoHOT
positive
4,884
public void pushView(GraphicGraph graph, Graphics2D g2) { if (oldTx == null) { oldTx = g2.getTransform(); if (autoFit) autoFitView(g2); else userView(g2); } else { throw new RuntimeException("DefaultCamera.pushView() / popView() wrongly nested"); } double X = metrics.viewport[0]; double Y = metrics.viewport[1]; double ...
public void pushView(GraphicGraph graph, Graphics2D g2) { if (oldTx == null) { oldTx = g2.getTransform(); if (autoFit) autoFitView(g2); else userView(g2); } else { throw new RuntimeException("DefaultCamera.pushView() / popView() wrongly nested"); } <DeepExtract> double X = metrics.viewport[0]; double Y = metrics.viewpo...
gs-ui-swing
positive
4,885
private void createExcelField() { this.fields = new ArrayList<>(); Class<?> tempClass = clazz; List<Field> tempFields = new ArrayList<>(Arrays.asList(clazz.getDeclaredFields())); while (tempClass != null) { tempClass = tempClass.getSuperclass(); if (tempClass != null) { tempFields.addAll(Arrays.asList(tempClass.getDecl...
private void createExcelField() { this.fields = new ArrayList<>(); Class<?> tempClass = clazz; List<Field> tempFields = new ArrayList<>(Arrays.asList(clazz.getDeclaredFields())); while (tempClass != null) { tempClass = tempClass.getSuperclass(); if (tempClass != null) { tempFields.addAll(Arrays.asList(tempClass.getDecl...
RuoYi
positive
4,886
public static String dateToStringWithTime() { if (new java.util.Date() == null) { return null; } try { SimpleDateFormat sfDate = new SimpleDateFormat(DATETIME_PATTERN); sfDate.setLenient(false); return sfDate.format(new java.util.Date()); } catch (Exception e) { return null; } }
public static String dateToStringWithTime() { <DeepExtract> if (new java.util.Date() == null) { return null; } try { SimpleDateFormat sfDate = new SimpleDateFormat(DATETIME_PATTERN); sfDate.setLenient(false); return sfDate.format(new java.util.Date()); } catch (Exception e) { return null; } </DeepExtract> }
SpringMVC-Mybatis-shiro
positive
4,887
public Criteria andFullNameEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "fullName" + " cannot be null"); } criteria.add(new Criterion("full_name =", value)); return (Criteria) this; }
public Criteria andFullNameEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "fullName" + " cannot be null"); } criteria.add(new Criterion("full_name =", value)); </DeepExtract> return (Criteria) this; }
common-admin
positive
4,888
public Criteria andGmtEndGreaterThanOrEqualTo(Long value) { if (value == null) { throw new RuntimeException("Value for " + "gmtEnd" + " cannot be null"); } criteria.add(new Criterion("gmt_end >=", value)); return (Criteria) this; }
public Criteria andGmtEndGreaterThanOrEqualTo(Long value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "gmtEnd" + " cannot be null"); } criteria.add(new Criterion("gmt_end >=", value)); </DeepExtract> return (Criteria) this; }
community
positive
4,889
protected <T> T queryForClass(String sql, Object[] params, int[] sqlTypes, Class<T> clazz) { LOGGER.info(String.format("Executing SQL query [%s] with parameters [%s] and SQL types [%s] for class [%s]", sql, Arrays.toString(params), Arrays.toString(sqlTypes), clazz)); List<T> results = queryForList(sql, params, sqlTypes...
protected <T> T queryForClass(String sql, Object[] params, int[] sqlTypes, Class<T> clazz) { LOGGER.info(String.format("Executing SQL query [%s] with parameters [%s] and SQL types [%s] for class [%s]", sql, Arrays.toString(params), Arrays.toString(sqlTypes), clazz)); <DeepExtract> List<T> results = queryForList(sql, pa...
elucidate-server
positive
4,890
@Override public void initializeViewParts() { Form form = Form.of(); List<Group> groups = categoryModel.getGroups(); if (groups == null) { groups = new ArrayList<>(); } List<com.dlsc.formsfx.model.structure.Group> formGroups = form.getGroups(); for (int i = 0; i < groups.size(); i++) { PreferencesFxGroup preferencesGro...
@Override public void initializeViewParts() { Form form = Form.of(); List<Group> groups = categoryModel.getGroups(); if (groups == null) { groups = new ArrayList<>(); } List<com.dlsc.formsfx.model.structure.Group> formGroups = form.getGroups(); for (int i = 0; i < groups.size(); i++) { PreferencesFxGroup preferencesGro...
PreferencesFX
positive
4,891
@Test(timeout = 1000) public void testTransferDataIntegrity2Hop() { CountDown cancellationCountDown = new CountDown(2, () -> PeerConfiguration.twoHopRoutedConfiguration().runloop.stop()); PeerConfiguration.twoHopRoutedConfiguration().startAndExecuteAfterDiscovery(() -> { PeerConfiguration.twoHopRoutedConfiguration().pe...
@Test(timeout = 1000) public void testTransferDataIntegrity2Hop() { <DeepExtract> CountDown cancellationCountDown = new CountDown(2, () -> PeerConfiguration.twoHopRoutedConfiguration().runloop.stop()); PeerConfiguration.twoHopRoutedConfiguration().startAndExecuteAfterDiscovery(() -> { PeerConfiguration.twoHopRoutedConf...
jReto
positive
4,892
@Override public void onVectorSetted(VectorSet evtSrc, int vecid, int[] old, int[] vector) { if (evtSrc == this.source && sorters.containsKey(vecid)) { sorters.get(vecid).reset(); } if (evtSrc == this.source) { target.rescore(source.key(), vecid, vector, this); } else if (evtSrc == this.target) { int tgtVecId = vecid; ...
@Override public void onVectorSetted(VectorSet evtSrc, int vecid, int[] old, int[] vector) { if (evtSrc == this.source && sorters.containsKey(vecid)) { sorters.get(vecid).reset(); } <DeepExtract> if (evtSrc == this.source) { target.rescore(source.key(), vecid, vector, this); } else if (evtSrc == this.target) { int tgtV...
simbase
positive
4,893
private String truststore() { if (this.context.getProperties().get(HTTP_SERVER_TRUST_STORE) == null) { return null; } else { return String.valueOf(this.context.getProperties().get(HTTP_SERVER_TRUST_STORE)); } }
private String truststore() { <DeepExtract> if (this.context.getProperties().get(HTTP_SERVER_TRUST_STORE) == null) { return null; } else { return String.valueOf(this.context.getProperties().get(HTTP_SERVER_TRUST_STORE)); } </DeepExtract> }
SilverWare
positive
4,894
public static byte[] encodeAsUnsignedLong(long value) { assert 8 > 0 && 8 <= Long.BYTES; assert Long.BYTES == 8; assert Byte.BYTES == 1; byte[] res = new byte[8]; int startByte = 8 - 1; for (int i = 0; i < 8; i++) { int byteOffset = 8 * (startByte - i); res[i] = (byte) ((value >> byteOffset) & 0xFF); } return res; }
public static byte[] encodeAsUnsignedLong(long value) { <DeepExtract> assert 8 > 0 && 8 <= Long.BYTES; assert Long.BYTES == 8; assert Byte.BYTES == 1; byte[] res = new byte[8]; int startByte = 8 - 1; for (int i = 0; i < 8; i++) { int byteOffset = 8 * (startByte - i); res[i] = (byte) ((value >> byteOffset) & 0xFF); } re...
Simulizer
positive
4,895
public Criteria andMaxTimeIsNull() { if ("maxTime is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("maxTime is null")); return (Criteria) this; }
public Criteria andMaxTimeIsNull() { <DeepExtract> if ("maxTime is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("maxTime is null")); </DeepExtract> return (Criteria) this; }
jtt808-simulator
positive
4,896
public Criteria andIntroNotIn(List<String> values) { if (values == null) { throw new RuntimeException("Value for " + "intro" + " cannot be null"); } criteria.add(new Criterion("intro not in", values)); return (Criteria) this; }
public Criteria andIntroNotIn(List<String> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "intro" + " cannot be null"); } criteria.add(new Criterion("intro not in", values)); </DeepExtract> return (Criteria) this; }
ReptilianDemo
positive
4,897
public static boolean build(World world, Random rand, int i, int j, int k) { world.setBlock(i + 0, j + 11, k + 1, StructureGenHelper.randomBlock(rand, new Block[] { Blocks.stone_stairs, Blocks.stone_stairs, Blocks.air }), 4, 2); world.setBlock(i + 0, j + 11, k + 2, StructureGenHelper.randomBlock(rand, new Block[] { Blo...
public static boolean build(World world, Random rand, int i, int j, int k) { world.setBlock(i + 0, j + 11, k + 1, StructureGenHelper.randomBlock(rand, new Block[] { Blocks.stone_stairs, Blocks.stone_stairs, Blocks.air }), 4, 2); world.setBlock(i + 0, j + 11, k + 2, StructureGenHelper.randomBlock(rand, new Block[] { Blo...
Artifacts
positive
4,898
public Criteria andBorrowNumberLessThan(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "borrowNumber" + " cannot be null"); } criteria.add(new Criterion("borrow_number <", value)); return (Criteria) this; }
public Criteria andBorrowNumberLessThan(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "borrowNumber" + " cannot be null"); } criteria.add(new Criterion("borrow_number <", value)); </DeepExtract> return (Criteria) this; }
BookLibrarySystem
positive
4,899
private int getStringRemapRules(final Field field, @Nullable final Map<Integer, GroupKey> groupKeys, Map<Integer, GroupKey> newGroupKeys, final GroupMultiRemapRule[] rules, final int ruleIndex, int positiveGroup, final int group, final List<String> termList) { final RegroupCondition[] conditions = new RegroupCondition[...
private int getStringRemapRules(final Field field, @Nullable final Map<Integer, GroupKey> groupKeys, Map<Integer, GroupKey> newGroupKeys, final GroupMultiRemapRule[] rules, final int ruleIndex, int positiveGroup, final int group, final List<String> termList) { final RegroupCondition[] conditions = new RegroupCondition[...
iql
positive
4,900
@Override public User findByMobile(String mobile) { User user = userDao.findByMobile(mobile); if (user == null) { return null; } List<Role> roleList = userRoleMapper.findByUserId(user.getId()); List<RoleDTO> roleDTOList = roleList.stream().map(e -> { return new RoleDTO().setId(e.getId()).setName(e.getName()); }).collec...
@Override public User findByMobile(String mobile) { User user = userDao.findByMobile(mobile); <DeepExtract> if (user == null) { return null; } List<Role> roleList = userRoleMapper.findByUserId(user.getId()); List<RoleDTO> roleDTOList = roleList.stream().map(e -> { return new RoleDTO().setId(e.getId()).setName(e.getName...
xboot
positive
4,901
@Override public void run() { if (!isEnabledI()) { return; } if (Util.isUrlFilteredOut(url)) { logger.debug("Deep link (" + url.toString() + ") processing skipped"); return; } ActivityPackage sdkClickPackage = PackageFactory.buildDeeplinkSdkClickPackage(url, clickTime, activityState, adjustConfig, deviceInfo, sessionPa...
@Override public void run() { <DeepExtract> if (!isEnabledI()) { return; } if (Util.isUrlFilteredOut(url)) { logger.debug("Deep link (" + url.toString() + ") processing skipped"); return; } ActivityPackage sdkClickPackage = PackageFactory.buildDeeplinkSdkClickPackage(url, clickTime, activityState, adjustConfig, deviceI...
adobe_air_sdk
positive
4,902
@Test public void shouldNotCallWriteSnapshotOnListenerWhenSnapshotTimeoutOccursAndSnapshotExistsAndNotEnoughLogEntriesHaveBeenCommittedNoOverlap() throws StorageException { SnapshotsStore.ExtendedSnapshot storedSnapshot = new UnitTestSnapshot(6L, 1); final LogEntry[] entries = new LogEntry[] { CLIENT(7, 3, new UnitTest...
@Test public void shouldNotCallWriteSnapshotOnListenerWhenSnapshotTimeoutOccursAndSnapshotExistsAndNotEnoughLogEntriesHaveBeenCommittedNoOverlap() throws StorageException { SnapshotsStore.ExtendedSnapshot storedSnapshot = new UnitTestSnapshot(6L, 1); final LogEntry[] entries = new LogEntry[] { CLIENT(7, 3, new UnitTest...
libraft
positive
4,903
@Override public void onClick(View v) { if (onViewClickListener != null) { onViewClickListener.onDownload(downLoadTag); } }
@Override public void onClick(View v) { <DeepExtract> if (onViewClickListener != null) { onViewClickListener.onDownload(downLoadTag); } </DeepExtract> }
my_aliplayer
positive
4,904
public void AddImageStream(ByteBuffer stream) { ImageStream = stream; boolean blockY0HasAcComponents = false; boolean blockY1HasAcComponents = false; boolean blockY2HasAcComponents = false; boolean blockY3HasAcComponents = false; boolean blockCbHasAcComponents = false; boolean blockCrHasAcComponents = false; StreamFiel...
public void AddImageStream(ByteBuffer stream) { ImageStream = stream; <DeepExtract> boolean blockY0HasAcComponents = false; boolean blockY1HasAcComponents = false; boolean blockY2HasAcComponents = false; boolean blockY3HasAcComponents = false; boolean blockCbHasAcComponents = false; boolean blockCrHasAcComponents = fal...
YADrone
positive
4,905
public String getUdpIp() { return config.getProperty(ConfigConstant.UDP_IP); }
public String getUdpIp() { <DeepExtract> return config.getProperty(ConfigConstant.UDP_IP); </DeepExtract> }
PixelController
positive
4,906
public BigDecimalWrapper plus(double value) { BigDecimal calculate = BigDecimalUtils.calculate(this.bigDecimal).plus(value); if (calculate == null || calculate.isEmpty()) { return new BigDecimalWrapper("0"); } return new BigDecimalWrapper(calculate); }
public BigDecimalWrapper plus(double value) { BigDecimal calculate = BigDecimalUtils.calculate(this.bigDecimal).plus(value); <DeepExtract> if (calculate == null || calculate.isEmpty()) { return new BigDecimalWrapper("0"); } return new BigDecimalWrapper(calculate); </DeepExtract> }
Clean-Architecture-Coin
positive
4,907
@Step public void searchesFor(String searchTerm) { searchField.type(searchTerm); searchButton.click(); }
@Step public void searchesFor(String searchTerm) { searchField.type(searchTerm); <DeepExtract> searchButton.click(); </DeepExtract> }
serenity-cucumber5
positive
4,908
@Override protected void onPreExecute() { super.onPreExecute(); if (downloadProgressDialog != null) downloadProgressDialog.dismiss(); downloadProgressDialog = new ProgressDialog(this); downloadProgressDialog.setIndeterminate(true); downloadProgressDialog.setMessage(getString(R.string.downloading_widget)); downloadProgr...
@Override protected void onPreExecute() { super.onPreExecute(); <DeepExtract> if (downloadProgressDialog != null) downloadProgressDialog.dismiss(); downloadProgressDialog = new ProgressDialog(this); downloadProgressDialog.setIndeterminate(true); downloadProgressDialog.setMessage(getString(R.string.downloading_widget));...
Webinos-Platform
positive
4,909
public void actionPerformed(java.awt.event.ActionEvent evt) { enableMsgfJCheckBox.setSelected(!enableMsgfJCheckBox.isSelected()); enableMsgfJCheckBoxActionPerformed(null); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> enableMsgfJCheckBox.setSelected(!enableMsgfJCheckBox.isSelected()); enableMsgfJCheckBoxActionPerformed(null); </DeepExtract> }
searchgui
positive
4,910
public Criteria andIconLessThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "icon" + " cannot be null"); } criteria.add(new Criterion("icon <", value)); return (Criteria) this; }
public Criteria andIconLessThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "icon" + " cannot be null"); } criteria.add(new Criterion("icon <", value)); </DeepExtract> return (Criteria) this; }
common-admin
positive
4,911
@Async public void sendEmailFromTemplate(User user, String templateName, String titleKey) { Locale locale = Locale.forLanguageTag(user.getLangKey()); Context context = new Context(locale); context.setVariable(USER, user); context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl()); String content = templat...
@Async public void sendEmailFromTemplate(User user, String templateName, String titleKey) { Locale locale = Locale.forLanguageTag(user.getLangKey()); Context context = new Context(locale); context.setVariable(USER, user); context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl()); String content = templat...
ionic-jhipster-example
positive
4,912
@SuppressWarnings("unused") public synchronized void requestPermissionsIfNecessaryForResult(@NonNull Fragment fragment, @NonNull String[] permissions, @Nullable PermissionsResultAction action) { Activity activity = fragment.getActivity(); if (activity == null) { return; } if (action == null) { return; } action.register...
@SuppressWarnings("unused") public synchronized void requestPermissionsIfNecessaryForResult(@NonNull Fragment fragment, @NonNull String[] permissions, @Nullable PermissionsResultAction action) { Activity activity = fragment.getActivity(); if (activity == null) { return; } <DeepExtract> if (action == null) { return; } a...
ndileber
positive
4,913
@SuppressWarnings("deprecation") @SuppressLint("NewApi") @Override public void onGlobalLayout() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { getViewTreeObserver().removeGlobalOnLayoutListener(this); } else { getViewTreeObserver().removeOnGlobalLayoutListener(this); } currentPosition = pager.getCurren...
@SuppressWarnings("deprecation") @SuppressLint("NewApi") @Override public void onGlobalLayout() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { getViewTreeObserver().removeGlobalOnLayoutListener(this); } else { getViewTreeObserver().removeOnGlobalLayoutListener(this); } currentPosition = pager.getCurren...
funnyDemo
positive
4,914
public void actionPerformed(ActionEvent e) { SwingUtilities.windowForComponent(TextPanel.this).dispose(); }
public void actionPerformed(ActionEvent e) { <DeepExtract> SwingUtilities.windowForComponent(TextPanel.this).dispose(); </DeepExtract> }
eniac
positive
4,915
public Criteria andReadnumberGreaterThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "readnumber" + " cannot be null"); } criteria.add(new Criterion("readnumber >=", value)); return (Criteria) this; }
public Criteria andReadnumberGreaterThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "readnumber" + " cannot be null"); } criteria.add(new Criterion("readnumber >=", value)); </DeepExtract> return (Criteria) this; }
zheng-lite
positive
4,916
@Override public void onBottomToTop(float endVelocity) { if (endVelocity > 0) { if (CustomFlingListener.DIRECTION_UP == CustomFlingListener.DIRECTION_UP) { notificationCardsLayout.animate().translationY(-lLayout.getHeight()).setInterpolator(new DecelerateInterpolator(endVelocity / 2)).alpha(CARDS_MIN_ALPHA).setListener...
@Override public void onBottomToTop(float endVelocity) { <DeepExtract> if (endVelocity > 0) { if (CustomFlingListener.DIRECTION_UP == CustomFlingListener.DIRECTION_UP) { notificationCardsLayout.animate().translationY(-lLayout.getHeight()).setInterpolator(new DecelerateInterpolator(endVelocity / 2)).alpha(CARDS_MIN_ALPH...
SmartLockScreen
positive
4,917
private static boolean ImmutableTypeDef_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ImmutableTypeDef_2")) return false; if (!recursion_guard_(b, l + 1, "TypeParameters")) return false; boolean r; Marker m = enter_section_(b, l + 1, _NONE_, "<type parameters>"); r = consumeToken(b, "{"); r = r && ExpList(b, l ...
private static boolean ImmutableTypeDef_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ImmutableTypeDef_2")) return false; <DeepExtract> if (!recursion_guard_(b, l + 1, "TypeParameters")) return false; boolean r; Marker m = enter_section_(b, l + 1, _NONE_, "<type parameters>"); r = consumeToken(b, "{"); r = r &&...
juliafy
positive
4,918
@Override public synchronized void run() { serverLaufen = true; StatsUpload.getInstance().sendCrawlStart(); Config.setStop(false); if (CrawlerConfig.dirFilme.isEmpty()) { Log.sysLog("Kein Pfad der Filmlisten angegeben"); System.exit(-1); } CrawlerTool.startMsg(); Log.sysLog(""); Log.sysLog(""); filmeSuchen.addAdListene...
@Override public synchronized void run() { serverLaufen = true; StatsUpload.getInstance().sendCrawlStart(); Config.setStop(false); if (CrawlerConfig.dirFilme.isEmpty()) { Log.sysLog("Kein Pfad der Filmlisten angegeben"); System.exit(-1); } CrawlerTool.startMsg(); Log.sysLog(""); Log.sysLog(""); filmeSuchen.addAdListene...
MServer
positive
4,919