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 com.google.cloud.solutions.samples.timeseries.dataflow.application.proto.TimeSeriesProtos.TSProtoOrBuilder getMaxBidValueOrBuilder() { return maxBidValue_ == null ? com.google.cloud.solutions.samples.timeseries.dataflow.application.proto.TimeSeriesProtos.TSProto.getDefaultInstance() : maxBidValue_; }
public com.google.cloud.solutions.samples.timeseries.dataflow.application.proto.TimeSeriesProtos.TSProtoOrBuilder getMaxBidValueOrBuilder() { <DeepExtract> return maxBidValue_ == null ? com.google.cloud.solutions.samples.timeseries.dataflow.application.proto.TimeSeriesProtos.TSProto.getDefaultInstance() : maxBidValue_;...
data-timeseries-java
positive
5,695
@Test public void testQueryDruidException() throws DruidException, IOException { mocks(); when(sHttpClient.newHttpGet(anyString())).thenReturn(get); when(sHttpClient.newHttpPost(anyString())).thenReturn(post); when(sHttpClient.newHttpClient()).thenReturn(client); when(sHttpClient.newHttpClient(anyBoolean(), anyString()...
@Test public void testQueryDruidException() throws DruidException, IOException { <DeepExtract> mocks(); when(sHttpClient.newHttpGet(anyString())).thenReturn(get); when(sHttpClient.newHttpPost(anyString())).thenReturn(post); when(sHttpClient.newHttpClient()).thenReturn(client); when(sHttpClient.newHttpClient(anyBoolean(...
sherlock
positive
5,696
@Override public DLedgerEntry get(Long index) { PreConditions.check(index >= 0, DLedgerResponseCode.INDEX_OUT_OF_RANGE, "%d should gt 0", index); PreConditions.check(index > ledgerBeforeBeginIndex, DLedgerResponseCode.INDEX_LESS_THAN_LOCAL_BEGIN, "%d should be gt %d, beforeBeginIndex may be revised", index, ledgerBefor...
@Override public DLedgerEntry get(Long index) { <DeepExtract> PreConditions.check(index >= 0, DLedgerResponseCode.INDEX_OUT_OF_RANGE, "%d should gt 0", index); PreConditions.check(index > ledgerBeforeBeginIndex, DLedgerResponseCode.INDEX_LESS_THAN_LOCAL_BEGIN, "%d should be gt %d, beforeBeginIndex may be revised", inde...
dledger
positive
5,697
public void setShowPairedSessionDrawPrompt(boolean showPairedSessionDrawPrompt) { mShowPairedSessionDrawPrompt = showPairedSessionDrawPrompt; int state = STATE_NONE; if (anchorTrackingMessageEnabled && anchorTrackingState != null && anchorTrackingState != TrackingState.TRACKING) { state = STATE_NOT_TRACKING_ANCHOR; } e...
public void setShowPairedSessionDrawPrompt(boolean showPairedSessionDrawPrompt) { mShowPairedSessionDrawPrompt = showPairedSessionDrawPrompt; <DeepExtract> int state = STATE_NONE; if (anchorTrackingMessageEnabled && anchorTrackingState != null && anchorTrackingState != TrackingState.TRACKING) { state = STATE_NOT_TRACKI...
justaline-android
positive
5,698
public static void main(String[] args) throws IOException, UnsupportedAudioFileException { VocoboxControllerCsv controller = new VocoboxControllerCsv(); String analysisRoot = "data/analyses/"; String analysisName = "doremi"; String wavFile = "data/sound/" + analysisName + ".wav"; controller.muteWinTime = 0.10f; loadAna...
public static void main(String[] args) throws IOException, UnsupportedAudioFileException { VocoboxControllerCsv controller = new VocoboxControllerCsv(); String analysisRoot = "data/analyses/"; String analysisName = "doremi"; String wavFile = "data/sound/" + analysisName + ".wav"; controller.muteWinTime = 0.10f; <DeepEx...
vocobox
positive
5,699
@Override public void onDrawFrame(int textureId) { super.onPreDrawElements(); glPassThroughProgram.use(); plane.uploadTexCoordinateBuffer(glPassThroughProgram.getTextureCoordinateHandle()); plane.uploadVerticesBuffer(glPassThroughProgram.getPositionHandle()); GLES20.glUniformMatrix4fv(glPassThroughProgram.getMVPMatrixH...
@Override public void onDrawFrame(int textureId) { <DeepExtract> super.onPreDrawElements(); glPassThroughProgram.use(); plane.uploadTexCoordinateBuffer(glPassThroughProgram.getTextureCoordinateHandle()); plane.uploadVerticesBuffer(glPassThroughProgram.getPositionHandle()); GLES20.glUniformMatrix4fv(glPassThroughProgram...
In77Camera
positive
5,700
@Override protected void handleInternal(@NonNull UriRequest request, @NonNull UriCallback callback) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(request.getUri()); UriSourceTools.setIntentSource(intent, request); request.putFieldIfAbsent(ActivityLauncher.FIELD_LIMIT_PACKAGE, limitPackage()); int res...
@Override protected void handleInternal(@NonNull UriRequest request, @NonNull UriCallback callback) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(request.getUri()); UriSourceTools.setIntentSource(intent, request); request.putFieldIfAbsent(ActivityLauncher.FIELD_LIMIT_PACKAGE, limitPackage()); int res...
WMRouter
positive
5,701
@Override protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); if (mColumnCount <= 0) { boolean isLandscape = getMeasuredWidth() > getMeasuredHeight(); mColumnCount = isLandscape ? mColumnCountLandscape : mColumnCountPortrait; } final ...
@Override protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); if (mColumnCount <= 0) { boolean isLandscape = getMeasuredWidth() > getMeasuredHeight(); mColumnCount = isLandscape ? mColumnCountLandscape : mColumnCountPortrait; } <DeepE...
PullToRefreshLibrary
positive
5,702
@Test public void excludedPatternWithAll() throws Exception { WorkflowJob p = j.jenkins.createProject(WorkflowJob.class, "p"); p.setDefinition(new CpsFlowDefinition("node('slaves') {\n" + " writeFile file: 'hello.txt', text: 'Hello World!'\n" + " writeFile file: 'goodbye.txt', text: 'Goodbye World!'\n" + " tar file:...
@Test public void excludedPatternWithAll() throws Exception { WorkflowJob p = j.jenkins.createProject(WorkflowJob.class, "p"); p.setDefinition(new CpsFlowDefinition("node('slaves') {\n" + " writeFile file: 'hello.txt', text: 'Hello World!'\n" + " writeFile file: 'goodbye.txt', text: 'Goodbye World!'\n" + " tar file:...
pipeline-utility-steps-plugin
positive
5,703
public Criteria andProductIdEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "productId" + " cannot be null"); } criteria.add(new Criterion("product_id =", value)); return (Criteria) this; }
public Criteria andProductIdEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "productId" + " cannot be null"); } criteria.add(new Criterion("product_id =", value)); </DeepExtract> return (Criteria) this; }
sihai-maven-ssm-alipay
positive
5,704
@Deprecated public void setTextRotation(double angle, double tx, double ty) throws IOException { setTextMatrix(new Matrix(Matrix.getRotateInstance(angle, (float) tx, (float) ty))); }
@Deprecated public void setTextRotation(double angle, double tx, double ty) throws IOException { <DeepExtract> setTextMatrix(new Matrix(Matrix.getRotateInstance(angle, (float) tx, (float) ty))); </DeepExtract> }
pint-publisher
positive
5,707
public void windowClosing(WindowEvent event) { }
public void windowClosing(WindowEvent event) { <DeepExtract> </DeepExtract> }
JavaSE8Tutorial
positive
5,708
public void addDataSelectionQuery(@NonNull DataSelectionQuery query) { mirrorSettings.addQuery(query); mirrorSettings.setQueriesModificationDate(new Date()); File dataDir = getDataDir(); if (!dataDir.exists()) { dataDir.mkdirs(); } mirrorSettings.save(getSettingsFile()); }
public void addDataSelectionQuery(@NonNull DataSelectionQuery query) { mirrorSettings.addQuery(query); mirrorSettings.setQueriesModificationDate(new Date()); <DeepExtract> File dataDir = getDataDir(); if (!dataDir.exists()) { dataDir.mkdirs(); } mirrorSettings.save(getSettingsFile()); </DeepExtract> }
algoliasearch-client-android
positive
5,709
@Override public T next() { return this.principal().match((head, tail) -> { this.sequence = tail; return head; }, () -> { throw new NoSuchElementException(); }); }
@Override public T next() { <DeepExtract> return this.principal().match((head, tail) -> { this.sequence = tail; return head; }, () -> { throw new NoSuchElementException(); }); </DeepExtract> }
procrastination
positive
5,710
public static void main(String[] args) { try { URL url = new URL("file:src/main/resources/hello.txt"); System.out.println(url.getPath()); System.out.println(url.getFile()); try (InputStream is = url.openStream()) { int data = is.read(); while (data != -1) { System.out.print((char) data); data = is.read(); } } } catch (...
public static void main(String[] args) { try { URL url = new URL("file:src/main/resources/hello.txt"); System.out.println(url.getPath()); System.out.println(url.getFile()); try (InputStream is = url.openStream()) { int data = is.read(); while (data != -1) { System.out.print((char) data); data = is.read(); } } } catch (...
Learn-Java-12-Programming
positive
5,711
static Journal buildJournal(int id, int userId, long createdOn, String notes) throws Exception { Journal journal = new Journal(); Field f = null; if (journal instanceof Property) { f = Property.class.getDeclaredField("id"); } else { f = journal.getClass().getDeclaredField("id"); } f.setAccessible(true); f.setInt(journa...
static Journal buildJournal(int id, int userId, long createdOn, String notes) throws Exception { Journal journal = new Journal(); <DeepExtract> Field f = null; if (journal instanceof Property) { f = Property.class.getDeclaredField("id"); } else { f = journal.getClass().getDeclaredField("id"); } f.setAccessible(true); f...
redmine-mylyn-plugin
positive
5,712
public String toString() { if (!hasError()) { return "Imported " + importCount + " files"; } String msg = "Imported " + importCount + " files, of which "; if (renameCount != 0) { msg += renameCount + " have been renamed (name too long)"; } if (rejectedCount != 0) { if (renameCount != 0) { msg += ", and "; } msg += reje...
public String toString() { <DeepExtract> if (!hasError()) { return "Imported " + importCount + " files"; } String msg = "Imported " + importCount + " files, of which "; if (renameCount != 0) { msg += renameCount + " have been renamed (name too long)"; } if (rejectedCount != 0) { if (renameCount != 0) { msg += ", and ";...
mpcmaid
positive
5,713
@Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { mSendButton.setEnabled(isSignedIn()); mMessageEdit.setEnabled(isSignedIn()); }
@Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { <DeepExtract> mSendButton.setEnabled(isSignedIn()); mMessageEdit.setEnabled(isSignedIn()); </DeepExtract> }
def-guide-to-firebase
positive
5,714
public static void writeToAscii(Writer wr, List<Sample> list) throws IOException { SampleWriter sw = new SampleWriter(wr); for (Sample s : list) sw.write(s); wr.flush(); wr.close(); }
public static void writeToAscii(Writer wr, List<Sample> list) throws IOException { SampleWriter sw = new SampleWriter(wr); for (Sample s : list) sw.write(s); <DeepExtract> wr.flush(); wr.close(); </DeepExtract> }
crowdpp
positive
5,715
public static void main(String[] args) { StringBuilder str = new StringBuilder(); str = new StringBuilder("sss"); System.out.println(str.toString()); str.append("sss"); System.out.println(str.toString()); PersonTest personTest = new PersonTest(); personTest.setName("sxs"); personTest.setAge(16); System.out.println(pers...
public static void main(String[] args) { StringBuilder str = new StringBuilder(); str = new StringBuilder("sss"); System.out.println(str.toString()); str.append("sss"); System.out.println(str.toString()); PersonTest personTest = new PersonTest(); <DeepExtract> personTest.setName("sxs"); personTest.setAge(16); </DeepExt...
project-learn
positive
5,717
public void setScrollPosition(float focusX, float focusY) { setZoom(normalizedScale, focusX, focusY, mScaleType); }
public void setScrollPosition(float focusX, float focusY) { <DeepExtract> setZoom(normalizedScale, focusX, focusY, mScaleType); </DeepExtract> }
AndroidCamera
positive
5,718
public Criteria andIdNotEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "id" + " cannot be null"); } criteria.add(new Criterion("id <>", value)); return (Criteria) this; }
public Criteria andIdNotEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "id" + " cannot be null"); } criteria.add(new Criterion("id <>", value)); </DeepExtract> return (Criteria) this; }
miaosha
positive
5,719
public static boolean isUseThreadLocal() { return Boolean.valueOf(AccessController.doPrivileged((PrivilegedAction<String>) () -> { String value = System.getProperty("prism.marlin.useThreadLocal"); return (value == null) ? "true" : value; })); }
public static boolean isUseThreadLocal() { <DeepExtract> return Boolean.valueOf(AccessController.doPrivileged((PrivilegedAction<String>) () -> { String value = System.getProperty("prism.marlin.useThreadLocal"); return (value == null) ? "true" : value; })); </DeepExtract> }
marlin-fx
positive
5,720
@Override public void refreshData(boolean pullToRefresh, boolean staleRefresh) { queueRequest(new ForumListRequest(this, this)); new FastQueryTask<ForumItem>(SomeDatabase.getDatabase(), this).query(SomeDatabase.VIEW_FORUMS); }
@Override public void refreshData(boolean pullToRefresh, boolean staleRefresh) { queueRequest(new ForumListRequest(this, this)); <DeepExtract> new FastQueryTask<ForumItem>(SomeDatabase.getDatabase(), this).query(SomeDatabase.VIEW_FORUMS); </DeepExtract> }
something.apk
positive
5,721
public static double[] readDoubles(String filename) { String[] fields = readAllStrings(); double[] vals = new double[fields.length]; for (int i = 0; i < fields.length; i++) vals[i] = Double.parseDouble(fields[i]); return vals; }
public static double[] readDoubles(String filename) { <DeepExtract> String[] fields = readAllStrings(); double[] vals = new double[fields.length]; for (int i = 0; i < fields.length; i++) vals[i] = Double.parseDouble(fields[i]); return vals; </DeepExtract> }
skeleton-sp17
positive
5,723
@Override public void haltAndRestartLogging() { Log.i(TAG, "stop:: Stopping listener for sensor " + getSensorName()); logger.stop(); if (mLocationManager != null) { mLocationManager.removeUpdates(this); } logger.resetByteCounter(); Log.i(TAG, "start:: Starting listener for sensor: " + getSensorName()); mLocationManager...
@Override public void haltAndRestartLogging() { Log.i(TAG, "stop:: Stopping listener for sensor " + getSensorName()); logger.stop(); if (mLocationManager != null) { mLocationManager.removeUpdates(this); } logger.resetByteCounter(); <DeepExtract> Log.i(TAG, "start:: Starting listener for sensor: " + getSensorName()); mL...
DataLogger
positive
5,724
@GetMapping(value = "/menus/{id}") @ResponseStatus(value = HttpStatus.OK) public Menu getMenu(@PathVariable Integer id) { Menu menu = menuRepository.findOne(id); if (menu == null) { exceptionFactory.throwObjectNotFound(ErrorConstant.MENU_NOT_FOUND); } return menu; }
@GetMapping(value = "/menus/{id}") @ResponseStatus(value = HttpStatus.OK) public Menu getMenu(@PathVariable Integer id) { <DeepExtract> Menu menu = menuRepository.findOne(id); if (menu == null) { exceptionFactory.throwObjectNotFound(ErrorConstant.MENU_NOT_FOUND); } return menu; </DeepExtract> }
plumdo-work
positive
5,725
@Override public void onStartup(ServletContext aServletContext) throws ServletException { super.onStartup(aServletContext); aServletContext.addFilter("hiddenHttpMethodFilter", new HiddenHttpMethodFilter()).addMappingForUrlPatterns(null, true, "/*"); }
@Override public void onStartup(ServletContext aServletContext) throws ServletException { super.onStartup(aServletContext); <DeepExtract> aServletContext.addFilter("hiddenHttpMethodFilter", new HiddenHttpMethodFilter()).addMappingForUrlPatterns(null, true, "/*"); </DeepExtract> }
SpringCourse
positive
5,726
public String consumeBooleanAttribute(String name) throws UnableToCompleteException { return consumeAttributeWithDefault(name, null, getBooleanType()); }
public String consumeBooleanAttribute(String name) throws UnableToCompleteException { <DeepExtract> return consumeAttributeWithDefault(name, null, getBooleanType()); </DeepExtract> }
gwt-uibinder
positive
5,727
@Unofficial @Deprecated default PubSubSubscription listenForBroadcastSettingUpdateEvents(OAuth2Credential credential, String channelId) { PubSubRequest request = new PubSubRequest(); request.setType(PubSubType.LISTEN); request.setNonce(CryptoUtils.generateNonce(30)); request.getData().put("auth_token", credential != nu...
@Unofficial @Deprecated default PubSubSubscription listenForBroadcastSettingUpdateEvents(OAuth2Credential credential, String channelId) { <DeepExtract> PubSubRequest request = new PubSubRequest(); request.setType(PubSubType.LISTEN); request.setNonce(CryptoUtils.generateNonce(30)); request.getData().put("auth_token", cr...
twitch4j
positive
5,728
@Override public final void hideNoNetView() { if (getView() == null) { return; } if (mBaseViewHelper.getView() == null) { return; } ViewGroup parent = (ViewGroup) mBaseViewHelper.getView().getParent(); if (parent != null) { parent.removeView(mBaseViewHelper.getView()); } }
@Override public final void hideNoNetView() { <DeepExtract> if (getView() == null) { return; } if (mBaseViewHelper.getView() == null) { return; } ViewGroup parent = (ViewGroup) mBaseViewHelper.getView().getParent(); if (parent != null) { parent.removeView(mBaseViewHelper.getView()); } </DeepExtract> }
BaseMyProject
positive
5,729
public boolean deleteJob(Job j) { if (j == null) { return false; } j.cancel(); for (Node node : nodeManager.getNodes()) { ArrayList<ClientTask> nodeTasks = new ArrayList<>(node.getCurrentTasks()); nodeTasks.addAll(node.getPendingTasks()); for (ClientTask task : nodeTasks) { if (task.getJobId().equals(j.getJobId())) { u...
public boolean deleteJob(Job j) { if (j == null) { return false; } j.cancel(); for (Node node : nodeManager.getNodes()) { ArrayList<ClientTask> nodeTasks = new ArrayList<>(node.getCurrentTasks()); nodeTasks.addAll(node.getPendingTasks()); for (ClientTask task : nodeTasks) { if (task.getJobId().equals(j.getJobId())) { u...
lancoder
positive
5,731
protected void updateCarrying(AutoRefPlayer apl, GoalsInventorySnapshot oldCarrying, GoalsInventorySnapshot newCarrying) { match.updateCarrying(apl, oldCarrying, newCarrying); objloop: for (BlockGoal goal : this.getTeamGoals(BlockGoal.class)) { if (goal.isSatisfied(getMatch())) { changeObjectiveStatus(goal, AutoRefGoal...
protected void updateCarrying(AutoRefPlayer apl, GoalsInventorySnapshot oldCarrying, GoalsInventorySnapshot newCarrying) { match.updateCarrying(apl, oldCarrying, newCarrying); objloop: for (BlockGoal goal : this.getTeamGoals(BlockGoal.class)) { if (goal.isSatisfied(getMatch())) { changeObjectiveStatus(goal, AutoRefGoal...
AutoReferee
positive
5,732
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public void measureAutoTypedHandlerAverage() { sagaLibStream.handle(new AutoTypedMessage()); }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public void measureAutoTypedHandlerAverage() { <DeepExtract> sagaLibStream.handle(new AutoTypedMessage()); </DeepExtract> }
saga-lib
positive
5,733
@Override public void onClick(View view) { if (latitudesaya_fixes != 0 && longitudesaya_fixes != 0) { String strlatitudefixes = latitudesaya_fixes + ""; String strlongitudefixes = longitudesaya_fixes + ""; if (strlatitudefixes.length() > 3 && strlongitudefixes.length() > 3) { Intent intenthasil = new Intent(); intentha...
@Override public void onClick(View view) { <DeepExtract> if (latitudesaya_fixes != 0 && longitudesaya_fixes != 0) { String strlatitudefixes = latitudesaya_fixes + ""; String strlongitudefixes = longitudesaya_fixes + ""; if (strlatitudefixes.length() > 3 && strlongitudefixes.length() > 3) { Intent intenthasil = new Inte...
PantauHargaAndroidNative
positive
5,735
private void initModel() { eventFilterModel.setMultiple(true); if (!eventFilterModel.contains(eventFilterModel)) { eventFilterModel.add(Events.ON_START_EDITING); } if (true) { eventFilterModel.addToSelection(Events.ON_START_EDITING); } else { eventFilterModel.removeFromSelection(Events.ON_START_EDITING); } if (!eventFi...
private void initModel() { eventFilterModel.setMultiple(true); if (!eventFilterModel.contains(eventFilterModel)) { eventFilterModel.add(Events.ON_START_EDITING); } if (true) { eventFilterModel.addToSelection(Events.ON_START_EDITING); } else { eventFilterModel.removeFromSelection(Events.ON_START_EDITING); } if (!eventFi...
dev-ref
positive
5,737
public Criteria andRatioIn(List<Integer> values) { if (values == null) { throw new RuntimeException("Value for " + "ratio" + " cannot be null"); } criteria.add(new Criterion("ratio in", values)); return (Criteria) this; }
public Criteria andRatioIn(List<Integer> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "ratio" + " cannot be null"); } criteria.add(new Criterion("ratio in", values)); </DeepExtract> return (Criteria) this; }
jtt808-simulator
positive
5,738
public static boolean isNumber(String arg) { if (StringUtils.isEmpty(arg)) { return false; } if (StringUtils.isEmpty(arg)) { return false; } Matcher matcher = NUMBER_PARTER.matcher(arg); return matcher.matches(); }
public static boolean isNumber(String arg) { if (StringUtils.isEmpty(arg)) { return false; } <DeepExtract> if (StringUtils.isEmpty(arg)) { return false; } Matcher matcher = NUMBER_PARTER.matcher(arg); return matcher.matches(); </DeepExtract> }
utils
positive
5,739
public void setRotationAngle(float mAngle) { mPolygonShapeSpec.setRotation(mAngle); float borderNeeded = mPolygonShapeSpec.hasBorder() ? mPolygonShapeSpec.getBorderWidth() : 0; float shadowNeeded = mPolygonShapeSpec.hasShadow() ? mPolygonShapeSpec.getShadowRadius() : 0; mPolygonShapeSpec.setCenterX(mPolygonShapeSpec.ge...
public void setRotationAngle(float mAngle) { mPolygonShapeSpec.setRotation(mAngle); <DeepExtract> float borderNeeded = mPolygonShapeSpec.hasBorder() ? mPolygonShapeSpec.getBorderWidth() : 0; float shadowNeeded = mPolygonShapeSpec.hasShadow() ? mPolygonShapeSpec.getShadowRadius() : 0; mPolygonShapeSpec.setCenterX(mPolyg...
Football-Lottery
positive
5,741
@Override public void postConnections(ConnectionsParams.Post params) { wrapObjectWithAnnotations(params); try { String body = js.get(POSTCONNECTIONS); if (body != null && !body.isEmpty()) { Context localContext = Context.enter(); localContext.evaluateString(jsscope, body, POSTCONNECTIONS, 1, null); Context.exit(); } } ...
@Override public void postConnections(ConnectionsParams.Post params) { <DeepExtract> wrapObjectWithAnnotations(params); try { String body = js.get(POSTCONNECTIONS); if (body != null && !body.isEmpty()) { Context localContext = Context.enter(); localContext.evaluateString(jsscope, body, POSTCONNECTIONS, 1, null); Contex...
contact
positive
5,742
@Override public void onDataBack(byte[] data, int width, int height) { super.onDataBack(data, width, height); saveFile(data, width, height, mDeviceMgr.getCameraId(false), CameraSettings.KEY_PICTURE_FORMAT, "AUX"); if (mPicCount == 2) { mUI.setUIClickable(true); getBaseUI().setUIClickable(true); mPicCount = 0; mSession....
@Override public void onDataBack(byte[] data, int width, int height) { super.onDataBack(data, width, height); saveFile(data, width, height, mDeviceMgr.getCameraId(false), CameraSettings.KEY_PICTURE_FORMAT, "AUX"); <DeepExtract> if (mPicCount == 2) { mUI.setUIClickable(true); getBaseUI().setUIClickable(true); mPicCount ...
Camera2
positive
5,744
@Test public void testCreateTresorAndEncryptText() { String cipherText = encrypt(createTresor(), "textToEncrypt01"); String decryptedText = decrypt(cipherText); assertEquals("textToEncrypt01", decryptedText); return cipherText; }
@Test public void testCreateTresorAndEncryptText() { <DeepExtract> String cipherText = encrypt(createTresor(), "textToEncrypt01"); String decryptedText = decrypt(cipherText); assertEquals("textToEncrypt01", decryptedText); return cipherText; </DeepExtract> }
ZeroKit-Android-SDK
positive
5,745
public long getNurseryHeapCommitted() throws MBeanRuntimeException { long heapCommitted = 0; try { MemoryUsage memoryUsage = MemoryUsage.from((CompositeData) mbsc.getAttribute(nurseryPoolObjectName, "Usage")); heapCommitted = (long) memoryUsage.getCommitted(); } catch (AttributeNotFoundException e) { throw new MBeanRun...
public long getNurseryHeapCommitted() throws MBeanRuntimeException { <DeepExtract> long heapCommitted = 0; try { MemoryUsage memoryUsage = MemoryUsage.from((CompositeData) mbsc.getAttribute(nurseryPoolObjectName, "Usage")); heapCommitted = (long) memoryUsage.getCommitted(); } catch (AttributeNotFoundException e) { thro...
top4j
positive
5,746
public static String getProxyHost(String proxyHost) { String value; try { value = System.getProperty("weibo4j.http.proxyHost", proxyHost); if (null == value) { value = defaultProperty.getProperty("weibo4j.http.proxyHost"); } if (null == value) { String fallback = defaultProperty.getProperty("weibo4j.http.proxyHost" + "...
public static String getProxyHost(String proxyHost) { <DeepExtract> String value; try { value = System.getProperty("weibo4j.http.proxyHost", proxyHost); if (null == value) { value = defaultProperty.getProperty("weibo4j.http.proxyHost"); } if (null == value) { String fallback = defaultProperty.getProperty("weibo4j.http....
twitter-2-weibo
positive
5,747
public void smoothScrollToPosition(int position) { if (mPositionScroller == null) { mPositionScroller = new PositionScroller(); } position = modifyFlingInitialVelocity(position); int initialY = position < 0 ? Integer.MAX_VALUE : 0; mLastFlingY = initialY; mScroller.fling(0, initialY, 0, position, 0, Integer.MAX_VALUE, ...
public void smoothScrollToPosition(int position) { if (mPositionScroller == null) { mPositionScroller = new PositionScroller(); } <DeepExtract> position = modifyFlingInitialVelocity(position); int initialY = position < 0 ? Integer.MAX_VALUE : 0; mLastFlingY = initialY; mScroller.fling(0, initialY, 0, position, 0, Integ...
nicehair
positive
5,748
@Override public void onPageSelected(int position) { mCurrentPosition = position; ; mTvIndicator.setText(mCurrentPosition + 1 + "/" + mImageUrls.size()); }
@Override public void onPageSelected(int position) { mCurrentPosition = position; ; <DeepExtract> mTvIndicator.setText(mCurrentPosition + 1 + "/" + mImageUrls.size()); </DeepExtract> }
TouTiao
positive
5,749
public int ftp_pwd(String line, StringTokenizer st) throws FtpCommandException { if (password == null) { throw new FtpCommandException(530, "Please login with USER and PASS."); } writer.println(257 + " " + currentDir); return 257; }
public int ftp_pwd(String line, StringTokenizer st) throws FtpCommandException { if (password == null) { throw new FtpCommandException(530, "Please login with USER and PASS."); } <DeepExtract> writer.println(257 + " " + currentDir); return 257; </DeepExtract> }
myHome
positive
5,750
public static File downFileFromSFTP(ChannelSftp channelSftp, final String filePath) { StringBuffer tempFilePath = new StringBuffer(System.getProperty("user.dir")).append(File.separator).append("temp"); String[] paths = tempFilePath.toString().split("/"); String filePath = ""; for (int i = 0; i < paths.length; i++) { if...
public static File downFileFromSFTP(ChannelSftp channelSftp, final String filePath) { StringBuffer tempFilePath = new StringBuffer(System.getProperty("user.dir")).append(File.separator).append("temp"); <DeepExtract> String[] paths = tempFilePath.toString().split("/"); String filePath = ""; for (int i = 0; i < paths.len...
sao
positive
5,751
default <R extends Comparable> Object selectMaxByDynamicQueryInternal(GetPropertyFunction<T, R> getPropertyFunction, DynamicQuery<T> dynamicQuery) { String propertyName = CommonsHelper.getPropertyName(getPropertyFunction); Class entityClass = dynamicQuery.getEntityClass(); String queryColumn = QUERY_HELPER.getQueryColu...
default <R extends Comparable> Object selectMaxByDynamicQueryInternal(GetPropertyFunction<T, R> getPropertyFunction, DynamicQuery<T> dynamicQuery) { String propertyName = CommonsHelper.getPropertyName(getPropertyFunction); Class entityClass = dynamicQuery.getEntityClass(); String queryColumn = QUERY_HELPER.getQueryColu...
mybatis-dynamic-query
positive
5,752
@SubscribeEvent public void onWorldLoad(WorldEvent.Load event) { if (event.world.isRemote || worldDir != null) { return; } MinecraftServer server = MinecraftServer.getServer(); if (BQ_Standard.proxy.isClient()) { worldDir = server.getFile("saves/" + server.getFolderName()); } else { worldDir = server.getFile(server.get...
@SubscribeEvent public void onWorldLoad(WorldEvent.Load event) { if (event.world.isRemote || worldDir != null) { return; } MinecraftServer server = MinecraftServer.getServer(); if (BQ_Standard.proxy.isClient()) { worldDir = server.getFile("saves/" + server.getFolderName()); } else { worldDir = server.getFile(server.get...
StandardQuestingPack
positive
5,753
public static void removeCookie(HttpServletResponse response, String key) { Cookie cookie = new Cookie(key, null); cookie.setPath("/"); cookie.setMaxAge(0); cookie.setHttpOnly(true); response.addCookie(cookie); }
public static void removeCookie(HttpServletResponse response, String key) { <DeepExtract> Cookie cookie = new Cookie(key, null); cookie.setPath("/"); cookie.setMaxAge(0); cookie.setHttpOnly(true); response.addCookie(cookie); </DeepExtract> }
blade-tool
positive
5,754
public boolean shouldRemindMissingPrivileges() { return getBoolPref(R.string.pref_settings_privileges_reminder_key, App.getRes().getBoolean(R.bool.pref_settings_privileges_reminder_default)); }
public boolean shouldRemindMissingPrivileges() { <DeepExtract> return getBoolPref(R.string.pref_settings_privileges_reminder_key, App.getRes().getBoolean(R.bool.pref_settings_privileges_reminder_default)); </DeepExtract> }
PermissionManagerX
positive
5,755
public void testIntersectionSaveProperties() throws DelaunayError { while (!Element.WEIGHTED_PROPERTIES.isEmpty()) { Element.WEIGHTED_PROPERTIES.remove(0); } Element.WEIGHTED_PROPERTIES.add(WALL); Element.WEIGHTED_PROPERTIES.add(SEWER); Element.WEIGHTED_PROPERTIES.add(ROAD); Element.WEIGHTED_PROPERTIES.add(DITCH); Elem...
public void testIntersectionSaveProperties() throws DelaunayError { <DeepExtract> while (!Element.WEIGHTED_PROPERTIES.isEmpty()) { Element.WEIGHTED_PROPERTIES.remove(0); } Element.WEIGHTED_PROPERTIES.add(WALL); Element.WEIGHTED_PROPERTIES.add(SEWER); Element.WEIGHTED_PROPERTIES.add(ROAD); Element.WEIGHTED_PROPERTIES.ad...
jdelaunay
positive
5,756
public TreeNode upsideDownBinaryTree(TreeNode root) { if (root == null) { return null; } if (root == null) { return null; } TreeNode newNode = upsideDownBinaryTreeHelper(root.left, root); root.left = null == null ? null : null.right; root.right = null; return newNode; }
public TreeNode upsideDownBinaryTree(TreeNode root) { if (root == null) { return null; } <DeepExtract> if (root == null) { return null; } TreeNode newNode = upsideDownBinaryTreeHelper(root.left, root); root.left = null == null ? null : null.right; root.right = null; return newNode; </DeepExtract> }
coding
positive
5,757
@Override public void onAnimationEnd(Animator animator) { mAnimatorSet.start(); }
@Override public void onAnimationEnd(Animator animator) { <DeepExtract> mAnimatorSet.start(); </DeepExtract> }
AndroidCustomView
positive
5,758
public static void addEquipmentCards() { try { Card c = ZhuGeLianNu.class.getConstructor(Color.class, int.class).newInstance(DIAMOND, 1); IO.debug(c.info() + c.toString()); drawCards.add(c); allCards.add(c); } catch (Exception e) { e.printStackTrace(); } try { Card c = ZhuGeLianNu.class.getConstructor(Color.class, int....
public static void addEquipmentCards() { try { Card c = ZhuGeLianNu.class.getConstructor(Color.class, int.class).newInstance(DIAMOND, 1); IO.debug(c.info() + c.toString()); drawCards.add(c); allCards.add(c); } catch (Exception e) { e.printStackTrace(); } try { Card c = ZhuGeLianNu.class.getConstructor(Color.class, int....
sanguosha
positive
5,759
public Criteria andDiscussIsNotNull() { if ("discuss is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("discuss is not null")); return (Criteria) this; }
public Criteria andDiscussIsNotNull() { <DeepExtract> if ("discuss is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("discuss is not null")); </DeepExtract> return (Criteria) this; }
Ordering
positive
5,760
@GetMapping("/edit-form") public String getCashEditForm(@RequestParam(name = "id", required = false) Integer id, Model model) { PortfolioCashModel cash; if (id != null) { cash = portfolioCashFormsService.getById(id).orElseGet(PortfolioCashModel::new); } else { PortfolioCashModel model = PortfolioCashModel::new.get(); m...
@GetMapping("/edit-form") public String getCashEditForm(@RequestParam(name = "id", required = false) Integer id, Model model) { <DeepExtract> PortfolioCashModel cash; if (id != null) { cash = portfolioCashFormsService.getById(id).orElseGet(PortfolioCashModel::new); } else { PortfolioCashModel model = PortfolioCashModel...
investbook
positive
5,761
@Override public void onInvalidated() { destroyPinnedShadow(); ListAdapter adapter = getAdapter(); if (adapter != null && adapter.getCount() > 0) { int firstVisiblePosition = getFirstVisiblePosition(); int sectionPosition = findCurrentSectionPosition(firstVisiblePosition); if (sectionPosition == -1) return; ensureShado...
@Override public void onInvalidated() { <DeepExtract> destroyPinnedShadow(); ListAdapter adapter = getAdapter(); if (adapter != null && adapter.getCount() > 0) { int firstVisiblePosition = getFirstVisiblePosition(); int sectionPosition = findCurrentSectionPosition(firstVisiblePosition); if (sectionPosition == -1) retur...
routerkeygenAndroid
positive
5,762
public static void d(String s) { String s; if (s instanceof String) s = (String) s; else s = String.valueOf(s); if (TimeString.Types.debug == TimeString.Types.debug) s = getCallerName() + s; long curTime = System.currentTimeMillis(); long interval = curTime - lastTime; TimeString ts = new TimeString(TimeString.Types.de...
public static void d(String s) { <DeepExtract> String s; if (s instanceof String) s = (String) s; else s = String.valueOf(s); if (TimeString.Types.debug == TimeString.Types.debug) s = getCallerName() + s; long curTime = System.currentTimeMillis(); long interval = curTime - lastTime; TimeString ts = new TimeString(TimeS...
MC-ticker
positive
5,763
public AudioAnalysisSection getSection() { if (analysis.getSections().length - 1 >= 0) { int middle = 0 + (analysis.getSections().length - 1 - 0) / 2; AudioAnalysisMeasure measure = analysis.getSections()[middle].getMeasure(); double start = round(measure.getStart(), 1); double end = start + round(measure.getDuration()...
public AudioAnalysisSection getSection() { <DeepExtract> if (analysis.getSections().length - 1 >= 0) { int middle = 0 + (analysis.getSections().length - 1 - 0) / 2; AudioAnalysisMeasure measure = analysis.getSections()[middle].getMeasure(); double start = round(measure.getStart(), 1); double end = start + round(measure...
nanoleaf-desktop
positive
5,764
public static String writeToString(List<ChangeSet> changeSets) { OutputStream out = new ByteArrayOutputStream(); XMLChangeLogSerializer serializer = new XMLChangeLogSerializer(); try { serializer.write(changeSets, out); } catch (IOException ex) { Exceptions.printStackTrace(ex); } return out.toString(); }
public static String writeToString(List<ChangeSet> changeSets) { OutputStream out = new ByteArrayOutputStream(); <DeepExtract> XMLChangeLogSerializer serializer = new XMLChangeLogSerializer(); try { serializer.write(changeSets, out); } catch (IOException ex) { Exceptions.printStackTrace(ex); } </DeepExtract> return out...
liquiface
positive
5,765
public void setCacheControl(String directive, int value) { String strVal = directive + "=" + Integer.toString(value); HTTPHeader header = getHeader(HTTP.CACHE_CONTROL); if (header != null) { header.setValue(strVal); return; } addHeader(HTTP.CACHE_CONTROL, strVal); }
public void setCacheControl(String directive, int value) { String strVal = directive + "=" + Integer.toString(value); <DeepExtract> HTTPHeader header = getHeader(HTTP.CACHE_CONTROL); if (header != null) { header.setValue(strVal); return; } addHeader(HTTP.CACHE_CONTROL, strVal); </DeepExtract> }
dlna_framework
positive
5,767
public static void main(String[] args) throws Exception { BriefLogFormatter.init(); OptionParser parser = new OptionParser(); parser.accepts("network").withRequiredArg().withValuesConvertedBy(regex("(mainnet)|(testnet)|(regtest)")).defaultsTo("mainnet"); parser.accepts("server").withRequiredArg().required(); parser.acc...
public static void main(String[] args) throws Exception { BriefLogFormatter.init(); OptionParser parser = new OptionParser(); parser.accepts("network").withRequiredArg().withValuesConvertedBy(regex("(mainnet)|(testnet)|(regtest)")).defaultsTo("mainnet"); parser.accepts("server").withRequiredArg().required(); parser.acc...
PayFile
positive
5,768
public void AddParagraphSymbol(String NewCharacter, String Display, int Colour, String Foreground) { m_Characters.add(NewCharacter); m_Display.add(Display); m_Colours.add(Colour); m_Foreground.add(Foreground); int ThisSymbol = m_Characters.size() - 1; TextMap.Add(NewCharacter, ThisSymbol); m_ParagraphSymbol = GetNumber...
public void AddParagraphSymbol(String NewCharacter, String Display, int Colour, String Foreground) { <DeepExtract> m_Characters.add(NewCharacter); m_Display.add(Display); m_Colours.add(Colour); m_Foreground.add(Foreground); int ThisSymbol = m_Characters.size() - 1; TextMap.Add(NewCharacter, ThisSymbol); </DeepExtract> ...
dasher
positive
5,769
public void changedUpdate(DocumentEvent e) { }
public void changedUpdate(DocumentEvent e) { <DeepExtract> </DeepExtract> }
nationgen
positive
5,770
@Test public void workOrders() throws Exception { final MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl<String, String>(); queryParams.add("startPosition", "0"); queryParams.add("maxResults", "10"); runXMLGetTest(ORDER_RESOURCE_PREFIX, "/", queryParams, "xml/Order_unassignedFirstOrders.xml"); final ...
@Test public void workOrders() throws Exception { final MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl<String, String>(); queryParams.add("startPosition", "0"); queryParams.add("maxResults", "10"); runXMLGetTest(ORDER_RESOURCE_PREFIX, "/", queryParams, "xml/Order_unassignedFirstOrders.xml"); final ...
jboss-keynote-2012
positive
5,771
public CommonInstance removeSlaveNode(String instanceId) throws BelugaException, UnknownIaasProviderException { List<CommonInstance> list = clusterTopology.getMesosSlaveList(); List<String> instanceIdList = new ArrayList<>(); CommonInstance obj = null; for (CommonInstance instance : list) { if (instance.getInstanceId()...
public CommonInstance removeSlaveNode(String instanceId) throws BelugaException, UnknownIaasProviderException { List<CommonInstance> list = clusterTopology.getMesosSlaveList(); List<String> instanceIdList = new ArrayList<>(); CommonInstance obj = null; for (CommonInstance instance : list) { if (instance.getInstanceId()...
beluga
positive
5,772
@Override public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { final SQLiteDatabase db = OrgDatabase.getInstance().getWritableDatabase(); SelectionBuilder builder; final SelectionBuilder builder = new SelectionBuilder(); switch(uriMatcher.match(uri)) { case ORGDATA: builder = bui...
@Override public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { final SQLiteDatabase db = OrgDatabase.getInstance().getWritableDatabase(); <DeepExtract> SelectionBuilder builder; final SelectionBuilder builder = new SelectionBuilder(); switch(uriMatcher.match(uri)) { case ORGDATA:...
mobileorg-android
positive
5,773
@Override public User findByEmail(String email) { User user = userDao.findByEmail(email); 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()); }).collect(Co...
@Override public User findByEmail(String email) { User user = userDao.findByEmail(email); <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
5,774
@Override public String toString() { String ret = ""; if (s.lastIndexOf(",") > 1) { ret = s.substring(0, s.length() - 1); } ret += "}"; return ret; }
@Override public String toString() { <DeepExtract> String ret = ""; if (s.lastIndexOf(",") > 1) { ret = s.substring(0, s.length() - 1); } ret += "}"; return ret; </DeepExtract> }
fwm
positive
5,775
public int getChargingInt() { if (isCharging()) { return 1; } else { return 0; } }
public int getChargingInt() { <DeepExtract> if (isCharging()) { return 1; } else { return 0; } </DeepExtract> }
BetterBatteryStats
positive
5,776
@SuppressWarnings("rawtypes") public static CheckedTreeSelectionDialog createMulti(Shell parent, String title, String message, Class[] filter, Object input, List selectedElements) { CheckedTreeSelectionDialog diag = new CheckedTreeSelectionDialog(parent, new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider())...
@SuppressWarnings("rawtypes") public static CheckedTreeSelectionDialog createMulti(Shell parent, String title, String message, Class[] filter, Object input, List selectedElements) { CheckedTreeSelectionDialog diag = new CheckedTreeSelectionDialog(parent, new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider())...
Composer-Eclipse-Plugin
positive
5,777
public static Builder newBuilder(GrpcService.ModelInferRequest.InferInputTensor prototype) { if (prototype instanceof GrpcService.ServerLiveRequest) { return mergeFrom((GrpcService.ServerLiveRequest) prototype); } else { super.mergeFrom(prototype); return this; } }
public static Builder newBuilder(GrpcService.ModelInferRequest.InferInputTensor prototype) { <DeepExtract> if (prototype instanceof GrpcService.ServerLiveRequest) { return mergeFrom((GrpcService.ServerLiveRequest) prototype); } else { super.mergeFrom(prototype); return this; } </DeepExtract> }
dl_inference
positive
5,778
@Before public void setUpMocks() { when(strategy.getEntryPrice()).thenReturn(opt(SOME_PRICE)); when(strategy.getTakeProfit()).thenReturn(opt(SOME_PRICE)); when(strategy.getStopLoose()).thenReturn(opt(SOME_PRICE)); when(strategy.getEntryCondition()).thenReturn(LIMIT); when(broker.sendOrder(any(), any())).thenReturn(exem...
@Before public void setUpMocks() { <DeepExtract> when(strategy.getEntryPrice()).thenReturn(opt(SOME_PRICE)); when(strategy.getTakeProfit()).thenReturn(opt(SOME_PRICE)); when(strategy.getStopLoose()).thenReturn(opt(SOME_PRICE)); </DeepExtract> when(strategy.getEntryCondition()).thenReturn(LIMIT); when(broker.sendOrder(a...
trading4j
positive
5,779
public String hexDelimited(String sDelimter) { return sbHexBuffer.toString(); }
public String hexDelimited(String sDelimter) { <DeepExtract> return sbHexBuffer.toString(); </DeepExtract> }
Oscar
positive
5,780
private void handleContact(Entity entityA, Entity entityB) { Name nameA = entityA.getComponent(Name.class); Name nameB = entityB.getComponent(Name.class); handleContact(entityA, nameA); handleContact(entityB, nameB); if (entityA.getComponent(CollideEffect.class) != null && entityB.getComponent(Health.class) != null) { ...
private void handleContact(Entity entityA, Entity entityB) { Name nameA = entityA.getComponent(Name.class); Name nameB = entityB.getComponent(Name.class); handleContact(entityA, nameA); handleContact(entityB, nameB); if (entityA.getComponent(CollideEffect.class) != null && entityB.getComponent(Health.class) != null) { ...
cell-rpg
positive
5,781
public Context getContext() { if (closed) { throw new HibersapException("The SessionManager has been closed, it must not be used anymore"); } return context; }
public Context getContext() { <DeepExtract> if (closed) { throw new HibersapException("The SessionManager has been closed, it must not be used anymore"); } </DeepExtract> return context; }
hibersap
positive
5,782
public Criteria andSortPriorityLessThanOrEqualTo(int value) { if (value == null) { throw new RuntimeException("Value for " + "sortPriority" + " cannot be null"); } criteria.add(new Criterion("sort_priority <=", value)); return (Criteria) this; }
public Criteria andSortPriorityLessThanOrEqualTo(int value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "sortPriority" + " cannot be null"); } criteria.add(new Criterion("sort_priority <=", value)); </DeepExtract> return (Criteria) this; }
oauth2-resource
positive
5,783
@Test public void testEnterBlockedNotPlaceHolder() throws Exception { Run run = mock(Run.class); NonBlockingTask task = mock(NonBlockingTask.class); BlockedItem item = mock(BlockedItem.class); BlockedItem.class.getField("task").setAccessible(true); Field modifiersField = Field.class.getDeclaredField("modifiers"); modif...
@Test public void testEnterBlockedNotPlaceHolder() throws Exception { Run run = mock(Run.class); NonBlockingTask task = mock(NonBlockingTask.class); BlockedItem item = mock(BlockedItem.class); <DeepExtract> BlockedItem.class.getField("task").setAccessible(true); Field modifiersField = Field.class.getDeclaredField("modi...
github-autostatus-plugin
positive
5,784
@Override public <T> List<T> selectOrderBy(T entity, String orderFields, OrderType[] orderTypes) { if (entity == null) return null; getInterceptorChain().beforePasreEntity(entity, SuidType.SELECT); List<T> list = null; try { String sql = getObjToSQLRich().toSelectOrderBySQL(entity, orderFields, orderTypes); sql = doAft...
@Override public <T> List<T> selectOrderBy(T entity, String orderFields, OrderType[] orderTypes) { if (entity == null) return null; <DeepExtract> getInterceptorChain().beforePasreEntity(entity, SuidType.SELECT); </DeepExtract> List<T> list = null; try { String sql = getObjToSQLRich().toSelectOrderBySQL(entity, orderFie...
honey
positive
5,785
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_comd_edit_device_alias); ivBack = (ImageView) findViewById(R.id.iv_edit_back); tvSave = (TextView) findViewById(R.id.tv_save); etAlias = (EditText) findViewById(R.id.et_alias); ivDelete = ...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_comd_edit_device_alias); ivBack = (ImageView) findViewById(R.id.iv_edit_back); tvSave = (TextView) findViewById(R.id.tv_save); etAlias = (EditText) findViewById(R.id.et_alias); ivDelete = ...
Gizwits-SmartBuld_Android
positive
5,786
@Test public void jsonToStrNew() { new ParserConfig(); new SerializeConfig(); for (int i = 0; i < times; i++) { long start = Utils.now(); JSON.toJSONString(sourceData); System.out.println("jsonToStrNew: " + Utils.diff(start)); } }
@Test public void jsonToStrNew() { <DeepExtract> new ParserConfig(); new SerializeConfig(); </DeepExtract> for (int i = 0; i < times; i++) { long start = Utils.now(); JSON.toJSONString(sourceData); System.out.println("jsonToStrNew: " + Utils.diff(start)); } }
blog-sample
positive
5,787
@Override public Instant getNextExecutionTime(ExecutionComplete executionComplete) { if (cronExecutionTime != null) { return; } synchronized (this) { if (cronExecutionTime == null) { if (isDisabled()) { cronExecutionTime = new CronSchedule.DisabledScheduleExecutionTime(); } else { CronParser parser = new CronParser(Cro...
@Override public Instant getNextExecutionTime(ExecutionComplete executionComplete) { if (cronExecutionTime != null) { return; } synchronized (this) { if (cronExecutionTime == null) { if (isDisabled()) { cronExecutionTime = new CronSchedule.DisabledScheduleExecutionTime(); } else { CronParser parser = new CronParser(Cro...
db-scheduler
positive
5,789
public Criteria andOrderStatusGreaterThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "orderStatus" + " cannot be null"); } criteria.add(new Criterion("order_status >=", value)); return (Criteria) this; }
public Criteria andOrderStatusGreaterThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "orderStatus" + " cannot be null"); } criteria.add(new Criterion("order_status >=", value)); </DeepExtract> return (Criteria) this; }
bw-pay
positive
5,790
private void handleMessage(final Message msg) { }
private void handleMessage(final Message msg) { <DeepExtract> </DeepExtract> }
curiosus
positive
5,791
public Future2Task<T> start() { try { doWork(); } catch (Exception e) { setException(e); } return this; }
public Future2Task<T> start() { <DeepExtract> try { doWork(); } catch (Exception e) { setException(e); } </DeepExtract> return this; }
android-oauth-client
positive
5,792
@Test public void testHTTPSPublisherWithLogSink() throws Exception { Path carbonHome = Paths.get(""); carbonHome = Paths.get(carbonHome.toString(), "src", "test"); System.setProperty(CARBON_HOME, carbonHome.toString()); logger.info("Carbon Home Absolute path set to: " + carbonHome.toAbsolutePath()); logger.info("Test c...
@Test public void testHTTPSPublisherWithLogSink() throws Exception { <DeepExtract> Path carbonHome = Paths.get(""); carbonHome = Paths.get(carbonHome.toString(), "src", "test"); System.setProperty(CARBON_HOME, carbonHome.toString()); logger.info("Carbon Home Absolute path set to: " + carbonHome.toAbsolutePath()); </Dee...
siddhi-io-http
positive
5,793
protected void activateAppender(org.apache.logging.log4j.core.Logger logger) { Map<String, Appender> appenders = this.logger.getAppenders(); if (appenders != null) { for (Appender appender : appenders.values()) { this.logger.removeAppender(appender); } } Map<String, Appender> appenders = null; if ((appenders = logger.g...
protected void activateAppender(org.apache.logging.log4j.core.Logger logger) { <DeepExtract> Map<String, Appender> appenders = this.logger.getAppenders(); if (appenders != null) { for (Appender appender : appenders.values()) { this.logger.removeAppender(appender); } } </DeepExtract> Map<String, Appender> appenders = nu...
logger.api
positive
5,794
public static void main(String[] args) { start(DEFAULT_HOST, DEFAULT_PORT); }
public static void main(String[] args) { <DeepExtract> start(DEFAULT_HOST, DEFAULT_PORT); </DeepExtract> }
practice
positive
5,795
@Override public void unregisterConnectStatusListener(String mac, BleConnectStatusListener listener) { Looper targetLooper = true ? mWorkerHandler.getLooper() : Looper.getMainLooper(); if (Looper.myLooper() != targetLooper) { throw new RuntimeException(); } List<BleConnectStatusListener> listeners = mConnectStatusListe...
@Override public void unregisterConnectStatusListener(String mac, BleConnectStatusListener listener) { <DeepExtract> Looper targetLooper = true ? mWorkerHandler.getLooper() : Looper.getMainLooper(); if (Looper.myLooper() != targetLooper) { throw new RuntimeException(); } </DeepExtract> List<BleConnectStatusListener> li...
MyBleTools
positive
5,796
public SkriptDate minus(Duration duration) { return of(timestamp - duration.toMillis(), TIME_ZONE); }
public SkriptDate minus(Duration duration) { <DeepExtract> return of(timestamp - duration.toMillis(), TIME_ZONE); </DeepExtract> }
skript-parser
positive
5,797
private void initView() { fm = getSupportFragmentManager(); mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost); mTabHost.setup(this, fm, android.R.id.tabcontent); mTabHost.addTab(mTabHost.newTabSpec(TAG_FAVOR).setIndicator(TAG_FAVOR), FavorFragment.class, null); mTabHost.addTab(mTabHost.newTabSpec(TAG_RECO...
private void initView() { fm = getSupportFragmentManager(); mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost); mTabHost.setup(this, fm, android.R.id.tabcontent); mTabHost.addTab(mTabHost.newTabSpec(TAG_FAVOR).setIndicator(TAG_FAVOR), FavorFragment.class, null); mTabHost.addTab(mTabHost.newTabSpec(TAG_RECO...
iBuka
positive
5,798
@Override public void workflowInstanceEnded(WorkflowInstance workflowInstance) { updates.add("Mark workflow instance " + workflowInstance + " as ended"); }
@Override public void workflowInstanceEnded(WorkflowInstance workflowInstance) { <DeepExtract> updates.add("Mark workflow instance " + workflowInstance + " as ended"); </DeepExtract> }
pwe
positive
5,799
private void copyCodeToClipboard(PinInfo account) { ClipboardManager clipboard = (ClipboardManager) userList.getContext().getSystemService(CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(userList.getContext().getString(R.string.clipboard_label), account.getPin()); clipboard.setPrimaryClip(clip); Toast.makeTex...
private void copyCodeToClipboard(PinInfo account) { <DeepExtract> ClipboardManager clipboard = (ClipboardManager) userList.getContext().getSystemService(CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText(userList.getContext().getString(R.string.clipboard_label), account.getPin()); clipboard.setPrimaryClip(clip);...
google-authenticator-android
positive
5,800
public Criteria andCreateTimeNotEqualTo(Date value) { if (value == null) { throw new RuntimeException("Value for " + "createTime" + " cannot be null"); } criteria.add(new Criterion("create_time <>", value)); return (Criteria) this; }
public Criteria andCreateTimeNotEqualTo(Date value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "createTime" + " cannot be null"); } criteria.add(new Criterion("create_time <>", value)); </DeepExtract> return (Criteria) this; }
oauth4j
positive
5,801
@Override public void setinternalChange(Frag section, String title, Frag previousFragment, boolean closedrawer) { currentFragmentNow = section; setTitle(title); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { android.support.v4.app.FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); if...
@Override public void setinternalChange(Frag section, String title, Frag previousFragment, boolean closedrawer) { <DeepExtract> currentFragmentNow = section; setTitle(title); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { android.support.v4.app.FragmentTransaction ft = getSupportFragmentManager().beginTra...
KickAssSlidingMenu
positive
5,802
public Criteria andIdNotBetween(Long value1, Long value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "id" + " cannot be null"); } criteria.add(new Criterion("ID not between", value1, value2)); return (Criteria) this; }
public Criteria andIdNotBetween(Long value1, Long value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "id" + " cannot be null"); } criteria.add(new Criterion("ID not between", value1, value2)); </DeepExtract> return (Criteria) this; }
communitycode
positive
5,803
@Override public void onRangeStart(String taskId, int start, int end) { String str = "TaskID: " + taskId + ", onRangeStart [" + start + "," + end + "]"; Message msg = new Message(); Bundle data = new Bundle(); data.putString(HANDLE_KEY, str); msg.setData(data); msg.what = HANDLE_CODE; handler.sendMessage(msg); }
@Override public void onRangeStart(String taskId, int start, int end) { String str = "TaskID: " + taskId + ", onRangeStart [" + start + "," + end + "]"; <DeepExtract> Message msg = new Message(); Bundle data = new Bundle(); data.putString(HANDLE_KEY, str); msg.setData(data); msg.what = HANDLE_CODE; handler.sendMessag...
MLKit
positive
5,804
public IndexField setNorms(boolean enable) { Map<String, Object> data = new HashMap<>(); this.map.put("enable", enable); return this; if (enable) { data.put("loading", "lazy"); } return this; }
public IndexField setNorms(boolean enable) { Map<String, Object> data = new HashMap<>(); <DeepExtract> this.map.put("enable", enable); return this; </DeepExtract> if (enable) { data.put("loading", "lazy"); } return this; }
search-spring-boot-starter
positive
5,805