before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public void setStatusErrorMessage(String message) { Runnable task = () -> setStatusMessageInternal(message, new Color(Display.getCurrent(), new RGB(255, 0, 0))); Display.getDefault().asyncExec(task); }
public void setStatusErrorMessage(String message) { <DeepExtract> Runnable task = () -> setStatusMessageInternal(message, new Color(Display.getCurrent(), new RGB(255, 0, 0))); Display.getDefault().asyncExec(task); </DeepExtract> }
abapCI
positive
4,374
public void clearCache() { m_ObjectIdToDomainObject.clear(); }
public void clearCache() { <DeepExtract> m_ObjectIdToDomainObject.clear(); </DeepExtract> }
sonar-sonargraph
positive
4,375
private void addNodeToArray(final ViterbiNode node, final int index, ViterbiNode[][] arr, int[] sizes) { int count = sizes[index]; if (count == 0) { arr[index] = new ViterbiNode[10]; } if (arr[index].length <= count) { arr[index] = extendArray(arr[index]); } arr[index][count] = node; sizes[index] = count + 1; }
private void addNodeToArray(final ViterbiNode node, final int index, ViterbiNode[][] arr, int[] sizes) { int count = sizes[index]; <DeepExtract> if (count == 0) { arr[index] = new ViterbiNode[10]; } if (arr[index].length <= count) { arr[index] = extendArray(arr[index]); } </DeepExtract> arr[index][count] = node; sizes[...
kuromoji
positive
4,376
@SuppressWarnings("unused") void setRotation(float rotation) { mRotation = rotation; mRingCallback.invalidateDrawable(null); }
@SuppressWarnings("unused") void setRotation(float rotation) { mRotation = rotation; <DeepExtract> mRingCallback.invalidateDrawable(null); </DeepExtract> }
Swface
positive
4,377
public static void matrixGiven(Matrix matrix) { if (matrix != null && mQueue.size() < mSize) { mQueue.offer(matrix); } }
public static void matrixGiven(Matrix matrix) { <DeepExtract> if (matrix != null && mQueue.size() < mSize) { mQueue.offer(matrix); } </DeepExtract> }
SRich
positive
4,378
@Override public Boolean doInTransaction() throws Exception { Set<String> playerGroupNames = new HashSet<>(); playerGroupNames.addAll(Utils.toGroupNames(Utils.filterExpired(storageStrategy.getPermissionService().getGroups(uuid)))); if (playerGroupNames.isEmpty()) playerGroupNames.add(resolver.getDefaultGroup()); Set<St...
@Override public Boolean doInTransaction() throws Exception { Set<String> playerGroupNames = new HashSet<>(); playerGroupNames.addAll(Utils.toGroupNames(Utils.filterExpired(storageStrategy.getPermissionService().getGroups(uuid)))); if (playerGroupNames.isEmpty()) playerGroupNames.add(resolver.getDefaultGroup()); <DeepE...
zPermissions
positive
4,379
public boolean run() { super.log("# " + "Symbol range map extraction starting"); String[] files = input.gatherAll(".java").stream().map(f -> f.replaceAll("\\\\", "/")).sorted().toArray(String[]::new); super.log("# " + "Processing " + files.length + " files"); if (files.length == 0) { cleanup(); return true; } if (canBa...
public boolean run() { super.log("# " + "Symbol range map extraction starting"); String[] files = input.gatherAll(".java").stream().map(f -> f.replaceAll("\\\\", "/")).sorted().toArray(String[]::new); <DeepExtract> super.log("# " + "Processing " + files.length + " files"); </DeepExtract> if (files.length == 0) { cleanu...
Srg2Source
positive
4,380
@Override public void beforeEach(ExtensionContext context) throws Exception { this.copy = new ByteArrayOutputStream(); this.captureOut = new CaptureOutputStream(System.out, this.copy); this.captureErr = new CaptureOutputStream(System.err, this.copy); System.setOut(new PrintStream(this.captureOut)); System.setErr(new Pr...
@Override public void beforeEach(ExtensionContext context) throws Exception { <DeepExtract> this.copy = new ByteArrayOutputStream(); this.captureOut = new CaptureOutputStream(System.out, this.copy); this.captureErr = new CaptureOutputStream(System.err, this.copy); System.setOut(new PrintStream(this.captureOut)); System...
spring-5-examples
positive
4,382
public static InnerClassesInfo create(DataInput din) throws IOException { InnerClassesInfo ici = new InnerClassesInfo(); this.u2innerClassInfoIndex = din.readUnsignedShort(); this.u2outerClassInfoIndex = din.readUnsignedShort(); this.u2innerNameIndex = din.readUnsignedShort(); this.u2innerClassAccessFlags = din.readUns...
public static InnerClassesInfo create(DataInput din) throws IOException { InnerClassesInfo ici = new InnerClassesInfo(); <DeepExtract> this.u2innerClassInfoIndex = din.readUnsignedShort(); this.u2outerClassInfoIndex = din.readUnsignedShort(); this.u2innerNameIndex = din.readUnsignedShort(); this.u2innerClassAccessFlags...
Retroguard
positive
4,383
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mListView = (ListView) findViewById(R.id.list); mAdapter = new ArrayAdapter<String>(this, R.layout.list_item); mListView.setAdapter(mAdapter); getWindow().addFlags(WindowManager.Lay...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mListView = (ListView) findViewById(R.id.list); mAdapter = new ArrayAdapter<String>(this, R.layout.list_item); mListView.setAdapter(mAdapter); getWindow().addFlags(WindowManager.Lay...
AndroidDemoProjects
positive
4,384
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { JobOperator jo = BatchRuntime.getJobOperator(); long id = jo.start("simplejob", null); ejb.se...
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { <DeepExtract> response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { JobOperator jo = BatchRuntime.getJobOperator(); long id = jo.start("simplejob",...
practical-javaee7-development-wildfly
positive
4,385
public Criteria andSonglistplaycountNotEqualTo(Long value) { if (value == null) { throw new RuntimeException("Value for " + "songlistplaycount" + " cannot be null"); } criteria.add(new Criterion("songListPlayCount <>", value)); return (Criteria) this; }
public Criteria andSonglistplaycountNotEqualTo(Long value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "songlistplaycount" + " cannot be null"); } criteria.add(new Criterion("songListPlayCount <>", value)); </DeepExtract> return (Criteria) this; }
music
positive
4,386
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { assertSize(position); checkStates.set(position, isChecked); }
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { <DeepExtract> assertSize(position); checkStates.set(position, isChecked); </DeepExtract> }
leanchat-android
positive
4,387
public void startTransitions(View view) { if (view != null) { Rect locRect = new Rect(); view.getGlobalVisibleRect(locRect); setTransitionsRegion(locRect.left, locRect.top, locRect.right, locRect.bottom, view.getWidth(), view.getHeight()); } return this; startTransitions(); }
public void startTransitions(View view) { <DeepExtract> if (view != null) { Rect locRect = new Rect(); view.getGlobalVisibleRect(locRect); setTransitionsRegion(locRect.left, locRect.top, locRect.right, locRect.bottom, view.getWidth(), view.getHeight()); } return this; </DeepExtract> startTransitions(); }
MeiWidgetView
positive
4,388
@Override public void renderForeground() { angleClockwise++; if (angleClockwise >= 360) { angleClockwise -= 360; } angleAntiClockwise--; if (angleAntiClockwise <= 0) { angleAntiClockwise += 360; } double lastRadius = 0; for (int i = 0; i < RINGS; i++) { if (radii[i] > 0 || lastRadius > space) { radii[i] += SPEED; if (r...
@Override public void renderForeground() { angleClockwise++; if (angleClockwise >= 360) { angleClockwise -= 360; } angleAntiClockwise--; if (angleAntiClockwise <= 0) { angleAntiClockwise += 360; } <DeepExtract> double lastRadius = 0; for (int i = 0; i < RINGS; i++) { if (radii[i] > 0 || lastRadius > space) { radii[i] +...
DemoFX
positive
4,389
public static void main(String[] args) { CRSFactory csFactory = new CRSFactory(); CoordinateReferenceSystem cs = csFactory.createFromName(ProjectionGridTest.class); if (cs == null) return; ProjectionGridRoundTripper tripper = new ProjectionGridRoundTripper(cs); boolean isOK = tripper.runGrid(TOLERANCE); double[] extent...
public static void main(String[] args) { <DeepExtract> CRSFactory csFactory = new CRSFactory(); CoordinateReferenceSystem cs = csFactory.createFromName(ProjectionGridTest.class); if (cs == null) return; ProjectionGridRoundTripper tripper = new ProjectionGridRoundTripper(cs); boolean isOK = tripper.runGrid(TOLERANCE); d...
proj4j
positive
4,390
@Override public List<Job> loadFavoriteJobs(List<JenkinsSettings.FavoriteJob> favoriteJobs) { if (handleNotYetLoggedInState()) return Collections.emptyList(); final List<Job> jobs = new LinkedList<>(); for (JenkinsSettings.FavoriteJob favoriteJob : favoriteJobs) { jobs.add(loadJob(favoriteJob.getUrl())); } final List<J...
@Override public List<Job> loadFavoriteJobs(List<JenkinsSettings.FavoriteJob> favoriteJobs) { if (handleNotYetLoggedInState()) return Collections.emptyList(); final List<Job> jobs = new LinkedList<>(); for (JenkinsSettings.FavoriteJob favoriteJob : favoriteJobs) { jobs.add(loadJob(favoriteJob.getUrl())); } <DeepExtract...
jenkins-control-plugin
positive
4,391
@Override public void onLoad(Bundle savedInstanceState) { super.onLoad(savedInstanceState); if (getView() == null) return; getView().toggleAnimation(); }
@Override public void onLoad(Bundle savedInstanceState) { super.onLoad(savedInstanceState); if (getView() == null) return; <DeepExtract> getView().toggleAnimation(); </DeepExtract> }
u2020-mortar
positive
4,392
private String _toString(boolean withOrigin) { if (simpleText != null) return simpleText; if (parts == null) return null; StringBuilder sb = new StringBuilder(); if (withOrigin && origin != null) { sb.append("{!--@ORIGIN:"); sb.append(origin); sb.append("@--}"); } for (SnippetPart part : parts) { sb.append(part.toStrin...
private String _toString(boolean withOrigin) { if (simpleText != null) return simpleText; if (parts == null) return null; StringBuilder sb = new StringBuilder(); if (withOrigin && origin != null) { sb.append("{!--@ORIGIN:"); sb.append(origin); sb.append("@--}"); } for (SnippetPart part : parts) { sb.append(part.toStrin...
chunk-templates
positive
4,393
@Override public void putBitmap(String key, Bitmap bitmap) { if (Looper.myLooper() == Looper.getMainLooper()) { throw new RuntimeException("Can not operate in the main thread !!!"); } Optional.checkNotNull(bitmap, "obj is null !!!"); Optional.checkNotNull(new BitmapByteMapper(), "mapper is null !!!"); String k = absolu...
@Override public void putBitmap(String key, Bitmap bitmap) { <DeepExtract> if (Looper.myLooper() == Looper.getMainLooper()) { throw new RuntimeException("Can not operate in the main thread !!!"); } Optional.checkNotNull(bitmap, "obj is null !!!"); Optional.checkNotNull(new BitmapByteMapper(), "mapper is null !!!"); Str...
TLRLoadRefresh
positive
4,394
public Criteria andBz18NotLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "bz18" + " cannot be null"); } criteria.add(new Criterion("`bz18` not like", value)); return (Criteria) this; }
public Criteria andBz18NotLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "bz18" + " cannot be null"); } criteria.add(new Criterion("`bz18` not like", value)); </DeepExtract> return (Criteria) this; }
blockhealth
positive
4,395
@Override public void writeString(String value) { if (!_expectValue) { throw new IllegalStateException("Expecting FIELD_NAME, not value"); } _expectValue = false; _data.put(_currentName, value); }
@Override public void writeString(String value) { <DeepExtract> if (!_expectValue) { throw new IllegalStateException("Expecting FIELD_NAME, not value"); } _expectValue = false; </DeepExtract> _data.put(_currentName, value); }
jackson-dataformat-avro
positive
4,396
public String SendAndWaitResponse(String strReqData, String strUrl) { ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo ni = cm.getActiveNetworkInfo(); if (ni != null && ni.isAvailable() && ni.getType() == ConnectivityManager.TYPE_MOBILE) { String proxyH...
public String SendAndWaitResponse(String strReqData, String strUrl) { <DeepExtract> ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo ni = cm.getActiveNetworkInfo(); if (ni != null && ni.isAvailable() && ni.getType() == ConnectivityManager.TYPE_MOBILE) {...
world
positive
4,397
public CPUOpDependency checkOutputDependency(CPUOpDependency dep) { if (outputDeps == null) outputDeps = spec.getOutputDependencies(args); return outputDeps; CPUOpDependency dep2 = new CPUOpDependency(dep); for (CPUOpDependency outDep : outputDeps) { dep2.remove(outDep); } if (dep2.isEmpty()) return null; return dep2; ...
public CPUOpDependency checkOutputDependency(CPUOpDependency dep) { <DeepExtract> if (outputDeps == null) outputDeps = spec.getOutputDependencies(args); return outputDeps; </DeepExtract> CPUOpDependency dep2 = new CPUOpDependency(dep); for (CPUOpDependency outDep : outputDeps) { dep2.remove(outDep); } if (dep2.isEmpty(...
mdlz80optimizer
positive
4,398
public final void deVoice(String channel, String nick) { this.sendRawLine("MODE " + channel + " " + "-v " + nick); }
public final void deVoice(String channel, String nick) { <DeepExtract> this.sendRawLine("MODE " + channel + " " + "-v " + nick); </DeepExtract> }
simpleirc
positive
4,399
@Override boolean sameValue(DNSRecord other) { return (((Pointer) other)._alias instanceof DNSRecord) && super.equals(((Pointer) other)._alias) && sameValue((DNSRecord) ((Pointer) other)._alias); }
@Override boolean sameValue(DNSRecord other) { <DeepExtract> return (((Pointer) other)._alias instanceof DNSRecord) && super.equals(((Pointer) other)._alias) && sameValue((DNSRecord) ((Pointer) other)._alias); </DeepExtract> }
droidpad-android
positive
4,400
@Override public void execute(double timestamp) { scrollDelay.cancel(); double scrollPosition = 0.0; if (delegateScrollGridTarget != null) { scrollPosition = delegateScrollGridTarget.getScrollTop(); } delegatingVerticalScroll = true; try { getWidget().getScrollContainer().setScrollTop(Double.valueOf(scrollPosition).int...
@Override public void execute(double timestamp) { <DeepExtract> scrollDelay.cancel(); double scrollPosition = 0.0; if (delegateScrollGridTarget != null) { scrollPosition = delegateScrollGridTarget.getScrollTop(); } delegatingVerticalScroll = true; try { getWidget().getScrollContainer().setScrollTop(Double.valueOf(scrol...
gantt
positive
4,401
public void setPref(String key, String value) { SharedPreferences.Editor editor = mSharedPreferences.edit(); setPref(key, value); for (String s : keys) if (s.equals(key)) { values.set(keys.indexOf(s), value); return; } values.add(value); keys.add(key); editor.apply(); logPref("'" + key + "' saved with value '" + value ...
public void setPref(String key, String value) { SharedPreferences.Editor editor = mSharedPreferences.edit(); setPref(key, value); for (String s : keys) if (s.equals(key)) { values.set(keys.indexOf(s), value); return; } values.add(value); keys.add(key); editor.apply(); <DeepExtract> logPref("'" + key + "' saved with val...
Cornowser
positive
4,402
public void visitFractionAssignOp(@NotNull JuliaFractionAssignOp o) { visitPsiElement(o); }
public void visitFractionAssignOp(@NotNull JuliaFractionAssignOp o) { <DeepExtract> visitPsiElement(o); </DeepExtract> }
juliafy
positive
4,404
@Override public void run() { if (isJumpWhenMore) cancelToast(); if (sToast == null) { sToast = Toast.makeText(context.getApplicationContext(), resId, Toast.LENGTH_LONG); } else { sToast.setText(resId); sToast.setDuration(Toast.LENGTH_LONG); } sToast.show(); }
@Override public void run() { <DeepExtract> if (isJumpWhenMore) cancelToast(); if (sToast == null) { sToast = Toast.makeText(context.getApplicationContext(), resId, Toast.LENGTH_LONG); } else { sToast.setText(resId); sToast.setDuration(Toast.LENGTH_LONG); } sToast.show(); </DeepExtract> }
HeavenlyModule
positive
4,405
public void iniSlice(SliceSources slice) { debug.accept("Initializing " + slice.getName()); if (guiState.nSlices() == 1) { iCurrentSlice = 0; navigateCurrentSlice(); } debug.accept(slice.getName() + " z position changed"); guiState.runSlice(slice, guiState -> { guiState.slicePositionChanged(); updateSliceDisplayedPosit...
public void iniSlice(SliceSources slice) { debug.accept("Initializing " + slice.getName()); if (guiState.nSlices() == 1) { iCurrentSlice = 0; navigateCurrentSlice(); } debug.accept(slice.getName() + " z position changed"); guiState.runSlice(slice, guiState -> { guiState.slicePositionChanged(); updateSliceDisplayedPosit...
ijp-imagetoatlas
positive
4,406
@Override public void run() { if (mProgressListener != null && mMediaPlayer.isPlaying()) { mProgressListener.onProgress(mMediaPlayer.getCurrentPosition()); } mProgressHandler.postDelayed(runnable, 1000); }
@Override public void run() { <DeepExtract> if (mProgressListener != null && mMediaPlayer.isPlaying()) { mProgressListener.onProgress(mMediaPlayer.getCurrentPosition()); } mProgressHandler.postDelayed(runnable, 1000); </DeepExtract> }
io2014-codelabs
positive
4,407
public Object onCall(final MuleEventContext eventContext) throws Exception { logger.info(buildLogEntry(eventContext)); return null; }
public Object onCall(final MuleEventContext eventContext) throws Exception { <DeepExtract> logger.info(buildLogEntry(eventContext)); </DeepExtract> return null; }
mule-in-action
positive
4,408
@Override @Nullable public Boolean isDeleted(final K key) { Entry<K, V> entry; try { final Block<K, V> valueBlock = rootBlock().getValueBlock(key); if (valueBlock == null) entry = null; entry = valueBlock.get(key); } catch (InternalError e) { throw new RuntimeException("file " + indexFile.normalize() + " length is curr...
@Override @Nullable public Boolean isDeleted(final K key) { <DeepExtract> Entry<K, V> entry; try { final Block<K, V> valueBlock = rootBlock().getValueBlock(key); if (valueBlock == null) entry = null; entry = valueBlock.get(key); } catch (InternalError e) { throw new RuntimeException("file " + indexFile.normalize() + " ...
lsmtree
positive
4,409
public void read(TProtocol iprot) throws TException { iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch(field.id) { case SUCCESS: if (field.type == TType.MAP) { { TMap _map0 = iprot.readMapBegin(); this.success = new HashMap<String, Long>(2 * _map0.s...
public void read(TProtocol iprot) throws TException { <DeepExtract> </DeepExtract> iprot.readStructBegin(); <DeepExtract> </DeepExtract> while (true) { <DeepExtract> </DeepExtract> field = iprot.readFieldBegin(); <DeepExtract> </DeepExtract> if (field.type == TType.STOP) { <DeepExtract> </DeepExtract> break; <DeepExtra...
Scribe-log4j-Appender
positive
4,410
public byte i6() { assert (6 <= 8); return (byte) readInt(6, true); }
public byte i6() { <DeepExtract> assert (6 <= 8); return (byte) readInt(6, true); </DeepExtract> }
testing-video
positive
4,411
public void openVideo() { if ((mUri == null) || (mSurfaceTexture == null)) { Log.d(TAG, "Cannot open video, uri or surface texture is null."); return; } Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "pause"); mContext.sendBroadcast(i); Log.d(TAG, "Releasing media player."); if (m...
public void openVideo() { if ((mUri == null) || (mSurfaceTexture == null)) { Log.d(TAG, "Cannot open video, uri or surface texture is null."); return; } Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "pause"); mContext.sendBroadcast(i); <DeepExtract> Log.d(TAG, "Releasing media pl...
Filmstrip
positive
4,412
@Test public void testBufferPackBufferUnpack() throws Exception { super.testByteArray(); }
@Test public void testBufferPackBufferUnpack() throws Exception { <DeepExtract> super.testByteArray(); </DeepExtract> }
msgpack-java
positive
4,413
public Criteria andDidNotIn(List<Long> values) { if (values == null) { throw new RuntimeException("Value for " + "did" + " cannot be null"); } criteria.add(new Criterion("did not in", values)); return (Criteria) this; }
public Criteria andDidNotIn(List<Long> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "did" + " cannot be null"); } criteria.add(new Criterion("did not in", values)); </DeepExtract> return (Criteria) this; }
Hospital
positive
4,414
@Override public LimitOrder deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { JsonObject object = json.getAsJsonObject(); String id = object.get(KEY_ID).getAsString(); String expiration = object.get(KEY_EXPIRATION).getAsString(); UserAccount seller = context.des...
@Override public LimitOrder deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { JsonObject object = json.getAsJsonObject(); String id = object.get(KEY_ID).getAsString(); String expiration = object.get(KEY_EXPIRATION).getAsString(); UserAccount seller = context.des...
graphenej
positive
4,415
public Criteria andRecordStatusNotBetween(int value1, int value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "recordStatus" + " cannot be null"); } criteria.add(new Criterion("record_status not between", value1, value2)); return (Criteria) this; }
public Criteria andRecordStatusNotBetween(int value1, int value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "recordStatus" + " cannot be null"); } criteria.add(new Criterion("record_status not between", value1, value2)); </DeepExtract> return (Criteria) t...
oauth2-resource
positive
4,416
@Override public void onSuccess(@Nullable Object responseData) { ElectrodeBridgeResponse response = ElectrodeBridgeResponse.createResponseForRequest(request, responseData, null); Logger.d(TAG, "Handling bridge response"); BridgeTransaction transaction = sPendingTransactions.get(response.getId()); if (transaction != nul...
@Override public void onSuccess(@Nullable Object responseData) { ElectrodeBridgeResponse response = ElectrodeBridgeResponse.createResponseForRequest(request, responseData, null); <DeepExtract> Logger.d(TAG, "Handling bridge response"); BridgeTransaction transaction = sPendingTransactions.get(response.getId()); if (tran...
react-native-electrode-bridge
positive
4,419
public String addDiffResponseListenerOnSameUrl(String originUrl, String qualifier, ProgressListener listener) { String newUrl = originUrl + HttpProgressInterceptor.IDENTIFICATION_NUMBER + qualifier; List<WeakReference<ProgressListener>> progressListeners; synchronized (HttpManager.class) { progressListeners = mProgress...
public String addDiffResponseListenerOnSameUrl(String originUrl, String qualifier, ProgressListener listener) { String newUrl = originUrl + HttpProgressInterceptor.IDENTIFICATION_NUMBER + qualifier; <DeepExtract> List<WeakReference<ProgressListener>> progressListeners; synchronized (HttpManager.class) { progressListene...
DevRing
positive
4,420
@Override public void onClick(DialogInterface dialog, int which) { removeDialog(DIALOG_REMOVE_PROJECT_ID); ApiService.deleteProject(ProjectsActivity.this, projectPath); mAdapter.remove(projectPath); }
@Override public void onClick(DialogInterface dialog, int which) { removeDialog(DIALOG_REMOVE_PROJECT_ID); <DeepExtract> ApiService.deleteProject(ProjectsActivity.this, projectPath); mAdapter.remove(projectPath); </DeepExtract> }
VideoEditor
positive
4,421
public void loadFile(String path, String filename) throws Exception { BookmarkReader reader = EngineUtils.getSortedBookmarkReader(path, filename); Map<Integer, Double> collectiveTags = EngineUtils.calcTopEntities(reader, EntityType.TAG); Map<String, Double> collectiveTagNames = new LinkedHashMap<String, Double>(); for ...
public void loadFile(String path, String filename) throws Exception { BookmarkReader reader = EngineUtils.getSortedBookmarkReader(path, filename); Map<Integer, Double> collectiveTags = EngineUtils.calcTopEntities(reader, EntityType.TAG); Map<String, Double> collectiveTagNames = new LinkedHashMap<String, Double>(); for ...
TagRec
positive
4,422
private static MetaObject getMetaObjectFromJar(String className, File archiveFile) { MetaObject result = null; try { clazz = ClassUtils.loadClassFromJar(archiveFile.getPath(), className); } catch (ClassNotFoundException e) { clazz = Exception.class; } catch (MalformedURLException e) { clazz = Exception.class; } catch (...
private static MetaObject getMetaObjectFromJar(String className, File archiveFile) { MetaObject result = null; try { clazz = ClassUtils.loadClassFromJar(archiveFile.getPath(), className); } catch (ClassNotFoundException e) { clazz = Exception.class; } catch (MalformedURLException e) { clazz = Exception.class; } catch (...
android-classyshark
positive
4,423
public static void registerRecipes() { return Registry.register(Registry.RECIPE_TYPE, ArtOfAlchemy.id("calcination"), new RecipeType<T>() { public String toString() { CALCINATION = ArtOfAlchemy.id("calcination").toString(); } }); return Registry.register(Registry.RECIPE_SERIALIZER, ArtOfAlchemy.id("calcination"), new S...
public static void registerRecipes() { return Registry.register(Registry.RECIPE_TYPE, ArtOfAlchemy.id("calcination"), new RecipeType<T>() { public String toString() { CALCINATION = ArtOfAlchemy.id("calcination").toString(); } }); return Registry.register(Registry.RECIPE_SERIALIZER, ArtOfAlchemy.id("calcination"), new S...
art-of-alchemy
positive
4,424
public final Where bracket() { builder.append(')'); return this; }
public final Where bracket() { <DeepExtract> builder.append(')'); return this; </DeepExtract> }
NoHttp
positive
4,425
public Criteria andFineGreaterThanOrEqualTo(Long value) { if (value == null) { throw new RuntimeException("Value for " + "fine" + " cannot be null"); } criteria.add(new Criterion("fine >=", value)); return (Criteria) this; }
public Criteria andFineGreaterThanOrEqualTo(Long value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "fine" + " cannot be null"); } criteria.add(new Criterion("fine >=", value)); </DeepExtract> return (Criteria) this; }
BookLibrarySystem
positive
4,426
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { STATE = position; unsplashListAdapter.clearData(); if (STATE == STATE_SEARCH) { mPresenter.getSearchPhotoList(""); } else { mPresenter.getPhotoList(STATE); } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { STATE = position; <DeepExtract> unsplashListAdapter.clearData(); if (STATE == STATE_SEARCH) { mPresenter.getSearchPhotoList(""); } else { mPresenter.getPhotoList(STATE); } </DeepExtract> }
KTReader
positive
4,427
public Criteria andExpectReturnTimeLessThan(Date value) { if (value == null) { throw new RuntimeException("Value for " + "expectReturnTime" + " cannot be null"); } criteria.add(new Criterion("expect_return_time <", value)); return (Criteria) this; }
public Criteria andExpectReturnTimeLessThan(Date value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "expectReturnTime" + " cannot be null"); } criteria.add(new Criterion("expect_return_time <", value)); </DeepExtract> return (Criteria) this; }
SSM_BookSystem
positive
4,428
@org.junit.Test public void checkSorting3() throws Exception { Integer[] sortingAttempt = testSpecificSort(testArrSet[3].clone(), testArrSet[3].length); assertArrayEquals(expectedArrSet[3], sortingAttempt); }
@org.junit.Test public void checkSorting3() throws Exception { <DeepExtract> Integer[] sortingAttempt = testSpecificSort(testArrSet[3].clone(), testArrSet[3].length); assertArrayEquals(expectedArrSet[3], sortingAttempt); </DeepExtract> }
gin
positive
4,429
@Override protected void onPreExecute() { super.onPreExecute(); rvMovie.setVisibility(View.GONE); progressBar.setVisibility(View.VISIBLE); results.clear(); ; }
@Override protected void onPreExecute() { super.onPreExecute(); <DeepExtract> rvMovie.setVisibility(View.GONE); progressBar.setVisibility(View.VISIBLE); </DeepExtract> results.clear(); ; }
Android-Developer-Expert-Example
positive
4,430
@Override public void triggerEmpty() { mLoading.setVisibility(GONE); mLoading.stop(); mEmptyImg.setImageResource(mDrawableIds[0]); mStatusText.setText(mTextIds[0]); mEmptyImg.setVisibility(VISIBLE); setVisibility(VISIBLE); final View[] views = mBindViews; if (views == null || views.length == 0) return; for (View view :...
@Override public void triggerEmpty() { mLoading.setVisibility(GONE); mLoading.stop(); mEmptyImg.setImageResource(mDrawableIds[0]); mStatusText.setText(mTextIds[0]); mEmptyImg.setVisibility(VISIBLE); setVisibility(VISIBLE); <DeepExtract> final View[] views = mBindViews; if (views == null || views.length == 0) return; fo...
ITalker
positive
4,431
static public boolean checkIP(String ipAddress) { String regex = "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\." + "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\." + "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\." + "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])"; boolean tem = false; Pattern pattern = Pattern.compile(regex); Matcher matcher = pa...
static public boolean checkIP(String ipAddress) { String regex = "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\." + "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\." + "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\." + "(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])"; <DeepExtract> boolean tem = false; Pattern pattern = Pattern.compile(regex); Matche...
Car-eye-pusher-android
positive
4,432
@PostMapping(value = "/password") public String updatePassword(String oldPassword, String password, ModelMap model) { try { AccountProfile profile = getProfile(); userService.updatePassword(profile.getId(), oldPassword, password); data = Result.success(); } catch (Exception e) { data = Result.failure(e.getMessage()); }...
@PostMapping(value = "/password") public String updatePassword(String oldPassword, String password, ModelMap model) { try { AccountProfile profile = getProfile(); userService.updatePassword(profile.getId(), oldPassword, password); data = Result.success(); } catch (Exception e) { data = Result.failure(e.getMessage()); }...
mblog
positive
4,433
@Override public boolean isHidden() { return accountSelect.isCollapsed(); }
@Override public boolean isHidden() { <DeepExtract> return accountSelect.isCollapsed(); </DeepExtract> }
domino-ui-demo
positive
4,434
public void writerComplex(Object... args) throws IOException { if (args == null) { writerNull(); return; } out.write(Protocol.ASTERISK_BYTE); out.writeIntCrLf(args.length); for (Object arg : args) { if (arg == null) { writerNull(); continue; } if (arg instanceof byte[]) { byte[] val = (byte[]) arg; writer(val); } else ...
public void writerComplex(Object... args) throws IOException { <DeepExtract> if (args == null) { writerNull(); return; } out.write(Protocol.ASTERISK_BYTE); out.writeIntCrLf(args.length); for (Object arg : args) { if (arg == null) { writerNull(); continue; } if (arg instanceof byte[]) { byte[] val = (byte[]) arg; writer...
redis-mock
positive
4,435
private void credits() { long duration = 8 * D; new CreditsSprite(config, "greetings_demofx_3.txt", 0.22, 2.1).setStartOffsetMillis(time); new CreditsSprite(config, "greetings_demofx_3.txt", 0.22, 2.1).setStopOffsetMillis(time + duration); effects.add(new CreditsSprite(config, "greetings_demofx_3.txt", 0.22, 2.1)); Sys...
private void credits() { long duration = 8 * D; new CreditsSprite(config, "greetings_demofx_3.txt", 0.22, 2.1).setStartOffsetMillis(time); new CreditsSprite(config, "greetings_demofx_3.txt", 0.22, 2.1).setStopOffsetMillis(time + duration); effects.add(new CreditsSprite(config, "greetings_demofx_3.txt", 0.22, 2.1)); Sys...
DemoFX
positive
4,436
public void putInt32(int xint) { int boffset = byteArray.length; byte[] value = new byte[byteArray.length + 4]; System.arraycopy(byteArray, 0, value, 0, byteArray.length); byteArray = value; byteArray[boffset + 3] = (byte) ((xint) & 0xff); byteArray[boffset + 2] = (byte) ((xint >> 8) & 0xff); byteArray[boffset + 1] = (...
public void putInt32(int xint) { int boffset = byteArray.length; <DeepExtract> byte[] value = new byte[byteArray.length + 4]; System.arraycopy(byteArray, 0, value, 0, byteArray.length); byteArray = value; </DeepExtract> byteArray[boffset + 3] = (byte) ((xint) & 0xff); byteArray[boffset + 2] = (byte) ((xint >> 8) & 0xff...
jta
positive
4,437
public static <K> void quickSort(final K[] x, final int from, final int to, final Comparator<K> comp) { final int len = to - from; if (len < SMALL) { selectionSort(x, from, to, comp); return; } int m = from + len / 2; if (len > SMALL) { int l = from; int n = to - 1; if (len > MEDIUM) { int s = len / 8; l = med3(x, l, l...
public static <K> void quickSort(final K[] x, final int from, final int to, final Comparator<K> comp) { final int len = to - from; if (len < SMALL) { selectionSort(x, from, to, comp); return; } int m = from + len / 2; if (len > SMALL) { int l = from; int n = to - 1; if (len > MEDIUM) { int s = len / 8; l = med3(x, l, l...
jhighlight
positive
4,438
public static void cleanSharedPreference(Context context) { if (new File("/data/data/" + context.getPackageName() + "/shared_prefs") != null && new File("/data/data/" + context.getPackageName() + "/shared_prefs").exists() && new File("/data/data/" + context.getPackageName() + "/shared_prefs").isDirectory()) { for (File...
public static void cleanSharedPreference(Context context) { <DeepExtract> if (new File("/data/data/" + context.getPackageName() + "/shared_prefs") != null && new File("/data/data/" + context.getPackageName() + "/shared_prefs").exists() && new File("/data/data/" + context.getPackageName() + "/shared_prefs").isDirectory(...
Akit-Reader
positive
4,439
private void obtainColorFormat(@NonNull final TypedArray typedArray) { int defaultValue = getContext().getResources().getInteger(R.integer.color_picker_preference_default_color_format); Condition.INSTANCE.ensureNotNull(ColorFormat.fromValue(typedArray.getInteger(R.styleable.AbstractColorPickerPreference_colorFormat, de...
private void obtainColorFormat(@NonNull final TypedArray typedArray) { int defaultValue = getContext().getResources().getInteger(R.integer.color_picker_preference_default_color_format); <DeepExtract> Condition.INSTANCE.ensureNotNull(ColorFormat.fromValue(typedArray.getInteger(R.styleable.AbstractColorPickerPreference_c...
AndroidMaterialPreferences
positive
4,440
@LocalData @Test public void aggregatedTestResultsOnly() throws Exception { upstreamProject = j.createFreeStyleProject(AGGREGATION_PROJECT_NAME); addFingerprinterToProject(upstreamProject, singleContents, singleFiles); upstreamProject.setQuietPeriod(0); createDownstreamProjectWithNoTests(); addJUnitResultArchiver(downs...
@LocalData @Test public void aggregatedTestResultsOnly() throws Exception { upstreamProject = j.createFreeStyleProject(AGGREGATION_PROJECT_NAME); addFingerprinterToProject(upstreamProject, singleContents, singleFiles); upstreamProject.setQuietPeriod(0); createDownstreamProjectWithNoTests(); addJUnitResultArchiver(downs...
junit-plugin
positive
4,441
public static void main(String[] args) { Trie tt = new Trie(); if ("banana" == null) { return root; } return add(root, "banana".toLowerCase(), 0); if ("apple" == null) { return root; } return add(root, "apple".toLowerCase(), 0); if ("mango" == null) { return root; } return add(root, "mango".toLowerCase(), 0); System.ou...
public static void main(String[] args) { Trie tt = new Trie(); if ("banana" == null) { return root; } return add(root, "banana".toLowerCase(), 0); if ("apple" == null) { return root; } return add(root, "apple".toLowerCase(), 0); <DeepExtract> if ("mango" == null) { return root; } return add(root, "mango".toLowerCase(),...
Problem-Solving-in-Data-Structures-Algorithms-using-Java
positive
4,443
public void handle(MouseEvent event) { snappedIndex = -1; for (Shape s : shapes) s.delete(); update(); Shape.StrokeWidth = Shape.DEFAULT_STROKE_WIDTH; AsyUnitSize = DEFAULT_ASY_UNIT_SIZE; for (Shape s : shapes) { if (getChildren().contains(s.getObject())) { if (Utility.distToShape(event.getSceneX(), event.getSceneY(), ...
public void handle(MouseEvent event) { snappedIndex = -1; <DeepExtract> for (Shape s : shapes) s.delete(); update(); Shape.StrokeWidth = Shape.DEFAULT_STROKE_WIDTH; AsyUnitSize = DEFAULT_ASY_UNIT_SIZE; </DeepExtract> for (Shape s : shapes) { if (getChildren().contains(s.getObject())) { if (Utility.distToShape(event.get...
AsyPad
positive
4,444
public Builder setMsgType(com.github.yuanrw.im.protobuf.generate.Internal.InternalMsg.MsgType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; return value; onChanged(); return this; }
public Builder setMsgType(com.github.yuanrw.im.protobuf.generate.Internal.InternalMsg.MsgType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; <DeepExtract> return value; </DeepExtract> onChanged(); return this; }
IM
positive
4,445
public void doShipTickUpdate() { if (torpCoolMsgSent) torpCoolMsgSent = false; if (phaserCoolMsgSent) phaserCoolMsgSent = false; if (torpsOutMsgSent) torpsOutMsgSent = false; if (!docked && !orbiting) { repairLSMsgSent = false; } if (isIntercepting()) { if (!currentQuadrant.isInQuadrant(interceptTarget)) interceptTarge...
public void doShipTickUpdate() { if (torpCoolMsgSent) torpCoolMsgSent = false; if (phaserCoolMsgSent) phaserCoolMsgSent = false; if (torpsOutMsgSent) torpsOutMsgSent = false; if (!docked && !orbiting) { repairLSMsgSent = false; } if (isIntercepting()) { if (!currentQuadrant.isInQuadrant(interceptTarget)) interceptTarge...
jtrek
positive
4,446
public static org.eclipselab.emf.ecore.protobuf.tests.library.LibraryProtos.Book parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.eclipselab.emf.ecore.protobuf.tests.library.LibraryProtos.Library.Ref result = buildPartial(); if (!result.i...
public static org.eclipselab.emf.ecore.protobuf.tests.library.LibraryProtos.Book parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { <DeepExtract> org.eclipselab.emf.ecore.protobuf.tests.library.LibraryProtos.Library.Ref result = buildPartial();...
org.eclipselab.emf.ecore.protobuf
positive
4,447
@Nullable public Bitmap cropImage() { Bitmap viewBitmap = getViewBitmap(); if (viewBitmap == null || viewBitmap.isRecycled()) { return null; } removeCallbacks(mWrapCropBoundsRunnable); removeCallbacks(mZoomImageToPositionRunnable); if (!isImageWrapCropBounds()) { float currentX = mCurrentImageCenter[0]; float currentY ...
@Nullable public Bitmap cropImage() { Bitmap viewBitmap = getViewBitmap(); if (viewBitmap == null || viewBitmap.isRecycled()) { return null; } removeCallbacks(mWrapCropBoundsRunnable); removeCallbacks(mZoomImageToPositionRunnable); <DeepExtract> if (!isImageWrapCropBounds()) { float currentX = mCurrentImageCenter[0]; f...
Yalantis-Series
positive
4,448
public static void main(String... argv) { Main args = new Main(); JCommander.newBuilder().addObject(args).build().parse(argv); out.printf("%d %d", length, pattern); }
public static void main(String... argv) { Main args = new Main(); JCommander.newBuilder().addObject(args).build().parse(argv); <DeepExtract> out.printf("%d %d", length, pattern); </DeepExtract> }
jcommander
positive
4,449
private void restoreEncryptedWithPGP(Uri uri, Intent decryptIntent) { if (decryptIntent == null) decryptIntent = new Intent(OpenPgpApi.ACTION_DECRYPT_VERIFY); PGPRestoreTask task = new PGPRestoreTask(this, uri, decryptIntent); currentTask = BackupTaskResult.ResultType.RESTORE; startBackgroundTask(task); }
private void restoreEncryptedWithPGP(Uri uri, Intent decryptIntent) { if (decryptIntent == null) decryptIntent = new Intent(OpenPgpApi.ACTION_DECRYPT_VERIFY); PGPRestoreTask task = new PGPRestoreTask(this, uri, decryptIntent); <DeepExtract> currentTask = BackupTaskResult.ResultType.RESTORE; startBackgroundTask(task); <...
andOTP
positive
4,450
public int sum(int l, int r) { if (lazy != 0) { sum += lazy * (maxPos - minPos); min += lazy; if (left != null) left.lazy += lazy; if (right != null) right.lazy += lazy; lazy = 0; } if (l <= minPos && maxPos <= r) return sum; else if (r <= minPos || l >= maxPos) return 0; else return (left == null ? 0 : left.sum(l, r))...
public int sum(int l, int r) { <DeepExtract> if (lazy != 0) { sum += lazy * (maxPos - minPos); min += lazy; if (left != null) left.lazy += lazy; if (right != null) right.lazy += lazy; lazy = 0; } </DeepExtract> if (l <= minPos && maxPos <= r) return sum; else if (r <= minPos || l >= maxPos) return 0; else return (left ...
DEPRECATED-data-structures
positive
4,451
public static R error(int code, String msg) { R r = new R(); super.put("code", code); return this; super.put("msg", msg); return this; return r; }
public static R error(int code, String msg) { R r = new R(); super.put("code", code); return this; <DeepExtract> super.put("msg", msg); return this; </DeepExtract> return r; }
clouddo
positive
4,452
@Override protected void finalize() throws Throwable { if (this.db != null) this.db.close(); super.finalize(); }
@Override protected void finalize() throws Throwable { <DeepExtract> if (this.db != null) this.db.close(); </DeepExtract> super.finalize(); }
hmdm-android
positive
4,453
@Override public void run() { vtData.produceState(whichState, progressIndicator); }
@Override public void run() { <DeepExtract> vtData.produceState(whichState, progressIndicator); </DeepExtract> }
VisibleTesla
positive
4,454
private void msAmandaBrowseActionPerformed(java.awt.event.ActionEvent evt) { browseSearchEngineLocationPressed(Advocate.msAmanda, MsAmandaProcessBuilder.EXECUTABLE_FILE_NAME, msAmandaLocationTxt); }
private void msAmandaBrowseActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> browseSearchEngineLocationPressed(Advocate.msAmanda, MsAmandaProcessBuilder.EXECUTABLE_FILE_NAME, msAmandaLocationTxt); </DeepExtract> }
searchgui
positive
4,455
@Deprecated @Override public void loadComplete() { try { super.loadComplete(); } catch (Throwable e) { LogUtils.e(e); } notifyDataSetChanged(); }
@Deprecated @Override public void loadComplete() { <DeepExtract> try { super.loadComplete(); } catch (Throwable e) { LogUtils.e(e); } notifyDataSetChanged(); </DeepExtract> }
JianshuApp
positive
4,456
public void query() { System.out.println("[Debug]使用了" + "query" + "方法"); userService.query(); }
public void query() { <DeepExtract> System.out.println("[Debug]使用了" + "query" + "方法"); </DeepExtract> userService.query(); }
codingce-java
positive
4,457
@Override public void onRefresh() { mPage = 1; if (mIsLoading) return; mIsLoading = true; if (mNodeName != null && !mNodeName.isEmpty()) requestTopicsByName(true); else if (mTabName != null && !mTabName.isEmpty()) requestTopicsByTab(true); else requestTopicsById(true); }
@Override public void onRefresh() { mPage = 1; <DeepExtract> if (mIsLoading) return; mIsLoading = true; if (mNodeName != null && !mNodeName.isEmpty()) requestTopicsByName(true); else if (mTabName != null && !mTabName.isEmpty()) requestTopicsByTab(true); else requestTopicsById(true); </DeepExtract> }
v2ex-android
positive
4,458
@Override public void onClick(View v) { DialogFragment dialog; if (USE_BUILDERS) { dialog = createDialogWithBuilders(group.getCheckedRadioButtonId()); } else { dialog = createDialogWithSetters(group.getCheckedRadioButtonId()); } dialog.show(getSupportFragmentManager(), TAG); }
@Override public void onClick(View v) { <DeepExtract> DialogFragment dialog; if (USE_BUILDERS) { dialog = createDialogWithBuilders(group.getCheckedRadioButtonId()); } else { dialog = createDialogWithSetters(group.getCheckedRadioButtonId()); } </DeepExtract> dialog.show(getSupportFragmentManager(), TAG); }
BottomSheetPickers
positive
4,460
public void setSchema(String schema) throws SQLException { super.validateState(); if (_session == null || _session.isClosed()) { _session = null; throw CassandraErrors.connectionClosedException(); } if (!quiet) { throw CassandraErrors.notSupportedException(); } if (Strings.isNullOrEmpty(schema) || schema.equals(_keyspa...
public void setSchema(String schema) throws SQLException { <DeepExtract> super.validateState(); if (_session == null || _session.isClosed()) { _session = null; throw CassandraErrors.connectionClosedException(); } </DeepExtract> if (!quiet) { throw CassandraErrors.notSupportedException(); } if (Strings.isNullOrEmpty(sch...
cassandra-jdbc-driver
positive
4,461
@Override public void onRefresh() { mPresenter.loadList(mPage, finalType, date); }
@Override public void onRefresh() { <DeepExtract> mPresenter.loadList(mPage, finalType, date); </DeepExtract> }
pivisionM
positive
4,462
@Override public void run() { if (mLoadingDialog != null) mLoadingDialog.dismiss(); try { if (mTimer != null) { mTimer.cancel(); mTimer = null; } if (mTimerTask != null) { mTimerTask.cancel(); mTimerTask = null; } } catch (Exception e) { e.printStackTrace(); } }
@Override public void run() { if (mLoadingDialog != null) mLoadingDialog.dismiss(); <DeepExtract> try { if (mTimer != null) { mTimer.cancel(); mTimer = null; } if (mTimerTask != null) { mTimerTask.cancel(); mTimerTask = null; } } catch (Exception e) { e.printStackTrace(); } </DeepExtract> }
BlueskyAndroid
positive
4,463
@Override public E poll() { if (this.sourceIterator.hasNext()) { this.pollCount++; result = this.sourceIterator.next(); } else { int tailSize = this.tail.size(); if (tailSize > 0) { this.pollCount++; result = this.tail.remove(0); } else { result = null; } } this.peekCount = Math.max(this.pollCount, this.peekCount); ret...
@Override public E poll() { if (this.sourceIterator.hasNext()) { this.pollCount++; result = this.sourceIterator.next(); } else { int tailSize = this.tail.size(); if (tailSize > 0) { this.pollCount++; result = this.tail.remove(0); } else { result = null; } } <DeepExtract> this.peekCount = Math.max(this.pollCount, this.p...
Entwined-STM
positive
4,464
public static RestResponse failure(String message) { RestResponse restResponse = new RestResponse(); if (false != null) put("success", false); return this; if (message != null) put("message", message); return this; return restResponse; }
public static RestResponse failure(String message) { RestResponse restResponse = new RestResponse(); if (false != null) put("success", false); return this; <DeepExtract> if (message != null) put("message", message); return this; </DeepExtract> return restResponse; }
PinPlus
positive
4,465
static int solve(int[] A) { int result = 0; int cumulative = A[0]; int power2 = 1; for (int i = 1; i < A.length; i++) { result = addMod(multiplyMod(result, 2), multiplyMod(A[i], cumulative)); cumulative = addMod(cumulative, multiplyMod(A[i], power2)); power2 = multiplyMod(power2, 2); } return (int) ((long) result * 2 %...
static int solve(int[] A) { int result = 0; int cumulative = A[0]; int power2 = 1; for (int i = 1; i < A.length; i++) { result = addMod(multiplyMod(result, 2), multiplyMod(A[i], cumulative)); cumulative = addMod(cumulative, multiplyMod(A[i], power2)); power2 = multiplyMod(power2, 2); } <DeepExtract> return (int) ((long...
codechef
positive
4,466
private void compileInto(String srcDirPath, String compDirPath) { final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); if (compiler == null) { throw new IllegalStateException("no JavaCompiler provided for this platform"); } final List<String> javaFilePathList = new ArrayList<String>(); final File mainSrc...
private void compileInto(String srcDirPath, String compDirPath) { final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); if (compiler == null) { throw new IllegalStateException("no JavaCompiler provided for this platform"); } final List<String> javaFilePathList = new ArrayList<String>(); final File mainSrc...
jafama
positive
4,467
private void updateExpandPath(float progress) { float yProgress = (1 - progress) * mHeight; float xProgress = progress * mWidth; mExpandPath.reset(); mExpandRectF.left = mIsBigBar ? xProgress / 2 + mBarOverDistance : xProgress / 2; mExpandRectF.top = mIsBigBar ? progress * mHeight / 2 + mBarOverDistance : progress * mH...
private void updateExpandPath(float progress) { float yProgress = (1 - progress) * mHeight; float xProgress = progress * mWidth; mExpandPath.reset(); mExpandRectF.left = mIsBigBar ? xProgress / 2 + mBarOverDistance : xProgress / 2; mExpandRectF.top = mIsBigBar ? progress * mHeight / 2 + mBarOverDistance : progress * mH...
ZJYWidget
positive
4,468
public void parseHeader() throws BadMapperException { header = new int[16]; System.arraycopy(therom, 0, header, 0, 16); if (header[0] == 'N' && header[1] == 'E' && header[2] == 'S' && header[3] == 0x1A) { scrolltype = ((header[6] & (utils.BIT3)) != 0) ? Mapper.MirrorType.FOUR_SCREEN_MIRROR : ((header[6] & (utils.BIT0))...
public void parseHeader() throws BadMapperException { <DeepExtract> header = new int[16]; System.arraycopy(therom, 0, header, 0, 16); </DeepExtract> if (header[0] == 'N' && header[1] == 'E' && header[2] == 'S' && header[3] == 0x1A) { scrolltype = ((header[6] & (utils.BIT3)) != 0) ? Mapper.MirrorType.FOUR_SCREEN_MIRROR ...
halfnes
positive
4,469
void initialCapacity(String key, @Nullable String value) { if (!initialCapacity == UNSET_INT) { throw new IllegalArgumentException(String.format("initial capacity was already set to %,d", initialCapacity)); } requireArgument((value != null) && !value.isEmpty(), "value of key %s was omitted", key); try { initialCapacity...
void initialCapacity(String key, @Nullable String value) { if (!initialCapacity == UNSET_INT) { throw new IllegalArgumentException(String.format("initial capacity was already set to %,d", initialCapacity)); } <DeepExtract> requireArgument((value != null) && !value.isEmpty(), "value of key %s was omitted", key); try { i...
l2cache
positive
4,471
@Override public void onExtendMenuContainerHide() { faceNormal.setVisibility(View.VISIBLE); faceChecked.setVisibility(View.INVISIBLE); }
@Override public void onExtendMenuContainerHide() { <DeepExtract> faceNormal.setVisibility(View.VISIBLE); faceChecked.setVisibility(View.INVISIBLE); </DeepExtract> }
KTalk
positive
4,472
public void shift_bytes_right(short numBytes) { rm.locker.lock(bnh.fnc_shift_bytes_right_tmp); Util.arrayCopyNonAtomic(this.value, (short) 0, bnh.fnc_shift_bytes_right_tmp, (short) 0, (short) (this.value.length)); Util.arrayCopyNonAtomic(bnh.fnc_shift_bytes_right_tmp, (short) 0, this.value, numBytes, (short) ((short) (...
public void shift_bytes_right(short numBytes) { rm.locker.lock(bnh.fnc_shift_bytes_right_tmp); Util.arrayCopyNonAtomic(this.value, (short) 0, bnh.fnc_shift_bytes_right_tmp, (short) 0, (short) (this.value.length)); Util.arrayCopyNonAtomic(bnh.fnc_shift_bytes_right_tmp, (short) 0, this.value, numBytes, (short) ((short) (...
JCMathLib
positive
4,473
private void removeLanguage(String language) { newDeckContext.getDestinationLanguages().remove(language); flexboxLayout.removeAllViews(); for (String language : newDeckContext.getDestinationLanguages()) { flexboxLayout.addView(createLanguageChip(language)); } boolean hasLanguages = !newDeckContext.getDestinationLanguag...
private void removeLanguage(String language) { newDeckContext.getDestinationLanguages().remove(language); flexboxLayout.removeAllViews(); for (String language : newDeckContext.getDestinationLanguages()) { flexboxLayout.addView(createLanguageChip(language)); } <DeepExtract> boolean hasLanguages = !newDeckContext.getDest...
translation-cards
positive
4,474
@Override public void buttonClick(final ClickEvent event) { final GroupMember userElement = new GroupMember(); userElement.setUser(user); userElement.setCreated(new Date()); final UserGroupMemberFlowlet userGroupMemberFlowlet = getFlow().forward(UserGroupMemberFlowlet.class); this.user = userElement; editor.setItem(new...
@Override public void buttonClick(final ClickEvent event) { final GroupMember userElement = new GroupMember(); userElement.setUser(user); userElement.setCreated(new Date()); final UserGroupMemberFlowlet userGroupMemberFlowlet = getFlow().forward(UserGroupMemberFlowlet.class); <DeepExtract> this.user = userElement; edit...
ilves
positive
4,475
@Override public String getHost() { return "RemoteServiceHandle for " + "address: " + address + "and type: " + type + " ."; }
@Override public String getHost() { <DeepExtract> return "RemoteServiceHandle for " + "address: " + address + "and type: " + type + " ."; </DeepExtract> }
SilverWare
positive
4,476
@Test public void matches() throws ReflectiveOperationException { checkMatches(Object.class, "hashCode"); Method method = Object.class.getMethod("equals", Object.class); MethodKey methodKey = new MethodKey(method); assertEquals(methodKey, new MethodKey(Object.class, "equals", Object.class)); assertTrue(methodKey.matche...
@Test public void matches() throws ReflectiveOperationException { checkMatches(Object.class, "hashCode"); <DeepExtract> Method method = Object.class.getMethod("equals", Object.class); MethodKey methodKey = new MethodKey(method); assertEquals(methodKey, new MethodKey(Object.class, "equals", Object.class)); assertTrue(me...
dynamic-proxies-samples
positive
4,477
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); OPENLOG.initTag("hailongqiu", true); setContentView(R.layout.demo_keyboard_activity); input_tv = (TextView) findViewById(R.id.input_tv); skbContainer = (SkbContainer) findViewById(R.id.skbContainer); skbContainer.setSkbLa...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); OPENLOG.initTag("hailongqiu", true); setContentView(R.layout.demo_keyboard_activity); input_tv = (TextView) findViewById(R.id.input_tv); skbContainer = (SkbContainer) findViewById(R.id.skbContainer); skbContainer.setSkbLa...
AndroidTVWidget
positive
4,478
public void init(Properties p) throws WorkloadException { table = p.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT); fieldcount = Integer.parseInt(p.getProperty(FIELD_COUNT_PROPERTY, FIELD_COUNT_PROPERTY_DEFAULT)); IntegerGenerator fieldlengthgenerator; String fieldlengthdistribution = p.getProperty(FIELD_L...
public void init(Properties p) throws WorkloadException { table = p.getProperty(TABLENAME_PROPERTY, TABLENAME_PROPERTY_DEFAULT); fieldcount = Integer.parseInt(p.getProperty(FIELD_COUNT_PROPERTY, FIELD_COUNT_PROPERTY_DEFAULT)); <DeepExtract> IntegerGenerator fieldlengthgenerator; String fieldlengthdistribution = p.getPr...
tapir
positive
4,479
public void init(WorldConfig baseWorld) { if (this.initialized) { return; } if (baseWorld != null) { if (this.enabled == null) { this.enabled = baseWorld.enabled; } if (this.darknessHideBlocks == null) { this.darknessHideBlocks = baseWorld.darknessHideBlocks; } if (this.antiTexturePackAndFreecam == null) { this.antiTex...
public void init(WorldConfig baseWorld) { if (this.initialized) { return; } if (baseWorld != null) { if (this.enabled == null) { this.enabled = baseWorld.enabled; } if (this.darknessHideBlocks == null) { this.darknessHideBlocks = baseWorld.darknessHideBlocks; } if (this.antiTexturePackAndFreecam == null) { this.antiTex...
Orebfuscator
positive
4,480