before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Override public void render(float delta) { timeLeft += delta; if (timeLeft >= 4) { dispose(); game.setScreen(game.game); } Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); spriteBatch.begin(); try { String st = game.getStage(); int length = st.length(); for (int i = 0; i < length; ++i) sprite...
@Override public void render(float delta) { timeLeft += delta; if (timeLeft >= 4) { dispose(); game.setScreen(game.game); } Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); spriteBatch.begin(); <DeepExtract> try { String st = game.getStage(); int length = st.length(); for (int i = 0; i < lengt...
libgdx
positive
5,122
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.bga_pp_menu_photo_preview, menu); MenuItem menuItem = menu.findItem(R.id.item_photo_preview_title); View actionView = menuItem.getActionView(); mTitleTv = actionView.findViewById(R.id.tv_photo_preview_title); mDownloadIv = action...
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.bga_pp_menu_photo_preview, menu); MenuItem menuItem = menu.findItem(R.id.item_photo_preview_title); View actionView = menuItem.getActionView(); mTitleTv = actionView.findViewById(R.id.tv_photo_preview_title); mDownloadIv = action...
BGAPhotoPicker-Android
positive
5,123
protected int unpackHeader(byte[] buffer, int offset) { id = BufferTools.byteBufferToStringIgnoringEncodingIssues(buffer, offset + ID_OFFSET, ID_LENGTH); dataLength = BufferTools.unpackInteger(buffer[offset + DATA_LENGTH_OFFSET], buffer[offset + DATA_LENGTH_OFFSET + 1], buffer[offset + DATA_LENGTH_OFFSET + 2], buffer[o...
protected int unpackHeader(byte[] buffer, int offset) { id = BufferTools.byteBufferToStringIgnoringEncodingIssues(buffer, offset + ID_OFFSET, ID_LENGTH); dataLength = BufferTools.unpackInteger(buffer[offset + DATA_LENGTH_OFFSET], buffer[offset + DATA_LENGTH_OFFSET + 1], buffer[offset + DATA_LENGTH_OFFSET + 2], buffer[o...
MineTunes
positive
5,124
@Override public void onDestroy() { super.onDestroy(); if (mCompositeSubscription != null) { mCompositeSubscription.unsubscribe(); } }
@Override public void onDestroy() { super.onDestroy(); <DeepExtract> if (mCompositeSubscription != null) { mCompositeSubscription.unsubscribe(); } </DeepExtract> }
SmallExcellent-master
positive
5,125
public int get(int key) { if (count == 0) { return -1; } Node node = map.get(key); if (node == null) { return -1; } if (node.last != null) { node.last.next = node.next; if (node.next != null) { node.next.last = node.last; } else { end = node.last; } node.last = null; node.next = head; head.last = node; head = node; } r...
public int get(int key) { if (count == 0) { return -1; } Node node = map.get(key); if (node == null) { return -1; } <DeepExtract> if (node.last != null) { node.last.next = node.next; if (node.next != null) { node.next.last = node.last; } else { end = node.last; } node.last = null; node.next = head; head.last = node; he...
demo-project
positive
5,126
@Override public ValueNode pojoNode(Object pojo) { JsonParser parser = parserSupplier.get(); JsonLocation loc = parser.currentTokenLocation(); if (parser instanceof YAMLParser && parser.currentToken().isStructEnd()) { loc = new JsonLocation(loc.contentReference(), loc.getCharOffset(), loc.getLineNr() - 1, loc.getColumn...
@Override public ValueNode pojoNode(Object pojo) { <DeepExtract> JsonParser parser = parserSupplier.get(); JsonLocation loc = parser.currentTokenLocation(); if (parser instanceof YAMLParser && parser.currentToken().isStructEnd()) { loc = new JsonLocation(loc.contentReference(), loc.getCharOffset(), loc.getLineNr() - 1,...
conjure
positive
5,127
public void run(Type contextType, Map<String, Object> config) throws Exception { JsonSubscriber.subscribe(topo, subscribeTopic).print(); StreamsContextFactory.getStreamsContext(contextType).submit(topo, config).get(); }
public void run(Type contextType, Map<String, Object> config) throws Exception { <DeepExtract> JsonSubscriber.subscribe(topo, subscribeTopic).print(); </DeepExtract> StreamsContextFactory.getStreamsContext(contextType).submit(topo, config).get(); }
streamsx.health
positive
5,128
private Job createJob(Properties props) throws IOException { if (getConf() == null) { setConf(new Configuration()); } for (Object key : props.keySet()) { getConf().set(key.toString(), props.getProperty(key.toString())); } FileSystem fs = FileSystem.get(getConf()); String hadoopCacheJarDir = getConf().get("hdfs.default....
private Job createJob(Properties props) throws IOException { if (getConf() == null) { setConf(new Configuration()); } <DeepExtract> for (Object key : props.keySet()) { getConf().set(key.toString(), props.getProperty(key.toString())); } FileSystem fs = FileSystem.get(getConf()); String hadoopCacheJarDir = getConf().get(...
camus
positive
5,129
@Override public void okAt(String location, Object value) { send(OK, value, location, defaultSerializationStrategy); }
@Override public void okAt(String location, Object value) { <DeepExtract> send(OK, value, location, defaultSerializationStrategy); </DeepExtract> }
fast-http
positive
5,130
@Override public void onStartPlayRecord(long timeMillis) { if (timeMillis < 0) { timeMillis = 0; } MediaSource mediaSource = new ExtractorMediaSource.Factory(new FileDataSourceFactory()).createMediaSource(Uri.fromFile(AudioRecordDataSource.getInstance().getRecordFile())); simpleExoPlayer.prepare(mediaSource); simpleExo...
@Override public void onStartPlayRecord(long timeMillis) { <DeepExtract> if (timeMillis < 0) { timeMillis = 0; } MediaSource mediaSource = new ExtractorMediaSource.Factory(new FileDataSourceFactory()).createMediaSource(Uri.fromFile(AudioRecordDataSource.getInstance().getRecordFile())); simpleExoPlayer.prepare(mediaSour...
AduioRecordUI
positive
5,131
public static ParseStatus read(DataInput in) throws IOException { ParseStatus res = new ParseStatus(); byte version = in.readByte(); switch(version) { case 1: majorCode = in.readByte(); minorCode = in.readShort(); args = WritableUtils.readCompressedStringArray(in); break; case 2: majorCode = in.readByte(); minorCode = ...
public static ParseStatus read(DataInput in) throws IOException { ParseStatus res = new ParseStatus(); <DeepExtract> byte version = in.readByte(); switch(version) { case 1: majorCode = in.readByte(); minorCode = in.readShort(); args = WritableUtils.readCompressedStringArray(in); break; case 2: majorCode = in.readByte()...
HiBench-8.0
positive
5,132
@Override public int updateMsg(long id, String msg) { TaskInstance msgUpdateInstance = new TaskInstance(); msgUpdateInstance.setId(id); msgUpdateInstance.setMsg(msg); return taskInstanceMapper.update(msgUpdateInstance); }
@Override public int updateMsg(long id, String msg) { TaskInstance msgUpdateInstance = new TaskInstance(); msgUpdateInstance.setId(id); msgUpdateInstance.setMsg(msg); <DeepExtract> return taskInstanceMapper.update(msgUpdateInstance); </DeepExtract> }
liteflow
positive
5,133
void scheduleEvents() { if (!getEnabled()) { L.fine("disabled"); return; } for (int i = PLevel.Type.VALUES.size(); --i >= 0; ) { PLevel.Type levelType = PLevel.Type.VALUES.get(i); float value = getMultRangedValue(levelType); changedLevels.add(new PLevel(levelType, value)); } getPenManager().scheduleLevelEvent(this, win...
void scheduleEvents() { if (!getEnabled()) { L.fine("disabled"); return; } <DeepExtract> for (int i = PLevel.Type.VALUES.size(); --i >= 0; ) { PLevel.Type levelType = PLevel.Type.VALUES.get(i); float value = getMultRangedValue(levelType); changedLevels.add(new PLevel(levelType, value)); } getPenManager().scheduleLevelE...
jpen
positive
5,134
@Override public CustomersRecord value1(Integer value) { set(0, value); return this; }
@Override public CustomersRecord value1(Integer value) { <DeepExtract> set(0, value); </DeepExtract> return this; }
graphql-java-db-example
positive
5,137
void unScrap() { mAttachedScrap.remove(this); this.mScrapContainer = null; mScrapContainer = null; }
void unScrap() { <DeepExtract> mAttachedScrap.remove(this); this.mScrapContainer = null; </DeepExtract> mScrapContainer = null; }
HorizontalGridView
positive
5,138
private void nu_scatterActionPerformed(java.awt.event.ActionEvent evt) { String s = "nu-scatter"; "nu-scatter" = " " + s + " "; return "nu-scatter"; }
private void nu_scatterActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> String s = "nu-scatter"; "nu-scatter" = " " + s + " "; return "nu-scatter"; </DeepExtract> }
ERSN-OpenMC
positive
5,139
@Override public void onNotify(InventorySlot slot, SlotEvent event) { switch(event) { case ADDED_ITEM: if (slot.getTopInventoryItem().getName().equalsIgnoreCase(InventoryUI.PLAYER_INVENTORY) && slot.getName().equalsIgnoreCase(InventoryUI.STORE_INVENTORY)) { _tradeInVal += slot.getTopInventoryItem().getTradeValue(); _se...
@Override public void onNotify(InventorySlot slot, SlotEvent event) { switch(event) { case ADDED_ITEM: if (slot.getTopInventoryItem().getName().equalsIgnoreCase(InventoryUI.PLAYER_INVENTORY) && slot.getName().equalsIgnoreCase(InventoryUI.STORE_INVENTORY)) { _tradeInVal += slot.getTopInventoryItem().getTradeValue(); _se...
BludBourne
positive
5,140
@Override public Product getValue() { return product; }
@Override public Product getValue() { <DeepExtract> return product; </DeepExtract> }
moserp
positive
5,141
@Override public Boolean value5() { return (Boolean) get(4); }
@Override public Boolean value5() { <DeepExtract> return (Boolean) get(4); </DeepExtract> }
sapling
positive
5,142
public static boolean schemaWritable(Schema sourceSchema, Schema destinationSchema, boolean regardFieldOrder, boolean enableModeCheckForSchemaFields) { if (sourceSchema == destinationSchema) { return true; } if (sourceSchema == null || destinationSchema == null) { return false; } if (regardFieldOrder) { return sourceSc...
public static boolean schemaWritable(Schema sourceSchema, Schema destinationSchema, boolean regardFieldOrder, boolean enableModeCheckForSchemaFields) { if (sourceSchema == destinationSchema) { return true; } if (sourceSchema == null || destinationSchema == null) { return false; } if (regardFieldOrder) { return sourceSc...
spark-bigquery-connector
positive
5,143
@Override public void changedUpdate(DocumentEvent e) { try { boolean differenceFound = Integer.parseInt(chromaBorderInput[0].getText()) != config.getChromaBorder().x || Integer.parseInt(chromaBorderInput[1].getText()) != config.getChromaBorder().y || Integer.parseInt(chromaBorderInput[2].getText()) != config.getChromaB...
@Override public void changedUpdate(DocumentEvent e) { <DeepExtract> try { boolean differenceFound = Integer.parseInt(chromaBorderInput[0].getText()) != config.getChromaBorder().x || Integer.parseInt(chromaBorderInput[1].getText()) != config.getChromaBorder().y || Integer.parseInt(chromaBorderInput[2].getText()) != con...
ChatGameFontificator
positive
5,144
public static boolean isNotNeedInject(String innerClassName) { if (innerClassName == null) { return false; } if (innerClassName.indexOf('$') >= 0) { return true; } for (String prefix : excludePackagePrefix) { if (innerClassName.startsWith(prefix)) { return true; } } for (String exp : excludePackageExp) { if (StrMatchUt...
public static boolean isNotNeedInject(String innerClassName) { if (innerClassName == null) { return false; } if (innerClassName.indexOf('$') >= 0) { return true; } <DeepExtract> for (String prefix : excludePackagePrefix) { if (innerClassName.startsWith(prefix)) { return true; } } for (String exp : excludePackageExp) { ...
MyPerf4J
positive
5,147
@Override public void onClick(View v) { snackBar.dismiss(); if (cursorAdapter != null) { cursorAdapter.setAllItemsChecked(false); } }
@Override public void onClick(View v) { snackBar.dismiss(); <DeepExtract> if (cursorAdapter != null) { cursorAdapter.setAllItemsChecked(false); } </DeepExtract> }
BlackList
positive
5,148
@Nonnull public static Date getRequiredDate(Map obj, String key) { Object value = obj.get(key); if (value == null) { throw new InvalidObjectDataException(String.format("Required property \"%s\" is missing or null", key)); } if (value.toString() == null) return null; try { return ((DateFormat) YYYYMMDD_UTC_FORMAT.clone(...
@Nonnull public static Date getRequiredDate(Map obj, String key) { Object value = obj.get(key); if (value == null) { throw new InvalidObjectDataException(String.format("Required property \"%s\" is missing or null", key)); } <DeepExtract> if (value.toString() == null) return null; try { return ((DateFormat) YYYYMMDD_UTC...
buendia
positive
5,149
public TreeNode sortedListToBST1(ListNode head) { if (head == null) { return null; } int len = 0; ListNode cur = head; while (cur != null) { len++; cur = cur.next; } int[] nums = new int[len]; cur = head; int index = 0; while (cur != null) { nums[index++] = cur.val; cur = cur.next; } if (0 == nums.length) { return null...
public TreeNode sortedListToBST1(ListNode head) { if (head == null) { return null; } int len = 0; ListNode cur = head; while (cur != null) { len++; cur = cur.next; } int[] nums = new int[len]; cur = head; int index = 0; while (cur != null) { nums[index++] = cur.val; cur = cur.next; } <DeepExtract> if (0 == nums.length)...
LeetCodeAndSwordToOffer
positive
5,150
public static DataUnit equiv(EquivEdge value) { DataUnit x = new DataUnit(); if (value == null) throw new NullPointerException(); setField_ = _Fields.EQUIV; value_ = value; return x; }
public static DataUnit equiv(EquivEdge value) { DataUnit x = new DataUnit(); <DeepExtract> if (value == null) throw new NullPointerException(); setField_ = _Fields.EQUIV; value_ = value; </DeepExtract> return x; }
big-data-src
positive
5,151
public Criteria andPasswordNotBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "password" + " cannot be null"); } criteria.add(new Criterion("password not between", value1, value2)); return (Criteria) this; }
public Criteria andPasswordNotBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "password" + " cannot be null"); } criteria.add(new Criterion("password not between", value1, value2)); </DeepExtract> return (Criteria) this; }
ssmxiaomi
positive
5,152
public OrderByClauseBuilder<I> property(String sql) { return property("{{" + sql + "}}"); return this; }
public OrderByClauseBuilder<I> property(String sql) { return property("{{" + sql + "}}"); <DeepExtract> return this; </DeepExtract> }
jirm
positive
5,154
public static byte[] getBytesUtf16(String string) { if (string == null) { return null; } try { return string.getBytes(Codings.UTF16); } catch (UnsupportedEncodingException e) { throw new CodingException(Codings.UTF16, e); } }
public static byte[] getBytesUtf16(String string) { <DeepExtract> if (string == null) { return null; } try { return string.getBytes(Codings.UTF16); } catch (UnsupportedEncodingException e) { throw new CodingException(Codings.UTF16, e); } </DeepExtract> }
howsun-javaee-framework
positive
5,155
@Override public <W extends IBaseTabPageAdapter<T, V>> W addToTopNoNotify(T bean) { addNoNotify(0, bean); notifyDataSetChanged(); return (W) this; return (W) this; }
@Override public <W extends IBaseTabPageAdapter<T, V>> W addToTopNoNotify(T bean) { <DeepExtract> addNoNotify(0, bean); notifyDataSetChanged(); return (W) this; </DeepExtract> return (W) this; }
TabLayoutNiubility
positive
5,156
@Override public String toString() { ToString ts = new ToString(this); ts.append("href", getHref()); ts.append("commonName", getCommonName()); ts.append("summary", getSummary()); ts.append(getAccess().toString()); return ts.toString(); }
@Override public String toString() { ToString ts = new ToString(this); <DeepExtract> ts.append("href", getHref()); ts.append("commonName", getCommonName()); ts.append("summary", getSummary()); ts.append(getAccess().toString()); </DeepExtract> return ts.toString(); }
bw-caldav
positive
5,157
public static int minFuel(int[] a, int[] b, int n) { ArrayList<ArrayList<Integer>> graph = new ArrayList<>(); for (int i = 0; i <= n; i++) { graph.add(new ArrayList<>()); } for (int i = 0; i < a.length; i++) { graph.get(a[i]).add(b[i]); graph.get(b[i]).add(a[i]); } int[] dfn = new int[n + 1]; int[] size = new int[n + 1...
public static int minFuel(int[] a, int[] b, int n) { ArrayList<ArrayList<Integer>> graph = new ArrayList<>(); for (int i = 0; i <= n; i++) { graph.add(new ArrayList<>()); } for (int i = 0; i < a.length; i++) { graph.get(a[i]).add(b[i]); graph.get(b[i]).add(a[i]); } int[] dfn = new int[n + 1]; int[] size = new int[n + 1...
publicclass2020
positive
5,158
@Override protected void validate(UploadSnowballObjectsArgs args) { args.objectName = "snowball." + random.nextLong() + ".tar"; validateNotNull(args.objects, "objects"); super.validate(args); }
@Override protected void validate(UploadSnowballObjectsArgs args) { args.objectName = "snowball." + random.nextLong() + ".tar"; <DeepExtract> validateNotNull(args.objects, "objects"); </DeepExtract> super.validate(args); }
minio-java
positive
5,160
@NonNull public TSnackbar setColor(ColorStateList colors) { final Button btn = mView.getActionView(); btn.setTextColor(colors); return this; final TextView tv = mView.getMessageView(); tv.setTextColor(colors); return this; return this; }
@NonNull public TSnackbar setColor(ColorStateList colors) { final Button btn = mView.getActionView(); btn.setTextColor(colors); return this; <DeepExtract> final TextView tv = mView.getMessageView(); tv.setTextColor(colors); return this; </DeepExtract> return this; }
GarbageSorting
positive
5,161
public boolean open() { name = ""; description = ""; speed = 0.05; idleTime = 3; isEquippable = 0; isMenuDriven = 0; isBoardDriven = 0; isBattleDriven = 0; usersSpecified = 0; userChar = new ArrayList<>(USER_CHAR_COUNT); for (int i = 0; i != USER_CHAR_COUNT; i++) { userChar.add(""); } buyPrice = 0; sellPrice = 0; isKey...
public boolean open() { <DeepExtract> name = ""; description = ""; speed = 0.05; idleTime = 3; isEquippable = 0; isMenuDriven = 0; isBoardDriven = 0; isBattleDriven = 0; usersSpecified = 0; userChar = new ArrayList<>(USER_CHAR_COUNT); for (int i = 0; i != USER_CHAR_COUNT; i++) { userChar.add(""); } buyPrice = 0; sellPr...
editor
positive
5,162
@Override public void openGithub() { String uri = mView.getActivity().getResources().getString(R.string.github); Intent intent = new Intent(); intent.setAction("android.intent.action.VIEW"); Uri content_url = Uri.parse(uri); intent.setData(content_url); mView.getActivity().startActivity(intent); }
@Override public void openGithub() { String uri = mView.getActivity().getResources().getString(R.string.github); <DeepExtract> Intent intent = new Intent(); intent.setAction("android.intent.action.VIEW"); Uri content_url = Uri.parse(uri); intent.setData(content_url); mView.getActivity().startActivity(intent); </DeepExt...
SuperNote
positive
5,164
@CheckForNull private ConnectedSonarLintEngine createConnectedEngine(String connectionId) { LOG.debug("Starting connected SonarLint engine for '{}'...", connectionId); try { var serverConnectionSettings = settingsManager.getCurrentSettings().getServerConnections().get(connectionId); engine = enginesFactory.createConnec...
@CheckForNull private ConnectedSonarLintEngine createConnectedEngine(String connectionId) { LOG.debug("Starting connected SonarLint engine for '{}'...", connectionId); try { var serverConnectionSettings = settingsManager.getCurrentSettings().getServerConnections().get(connectionId); engine = enginesFactory.createConnec...
sonarlint-language-server
positive
5,165
@Override protected void onDetachedFromWindow() { if (mDecorView != null) { mDecorView.getViewTreeObserver().removeOnPreDrawListener(preDrawListener); } releaseBitmap(); releaseScript(); super.onDetachedFromWindow(); }
@Override protected void onDetachedFromWindow() { if (mDecorView != null) { mDecorView.getViewTreeObserver().removeOnPreDrawListener(preDrawListener); } <DeepExtract> releaseBitmap(); releaseScript(); </DeepExtract> super.onDetachedFromWindow(); }
DialogX
positive
5,166
@Override public String readData() { byte[] result = Base64.getDecoder().decode(super.readData()); for (int i = 0; i < result.length; i++) { result[i] -= (byte) 1; } return new String(result); }
@Override public String readData() { <DeepExtract> byte[] result = Base64.getDecoder().decode(super.readData()); for (int i = 0; i < result.length; i++) { result[i] -= (byte) 1; } return new String(result); </DeepExtract> }
design-pattern-examples
positive
5,167
@Override public ProductResponse method() { return executeSyncApiCall(api.updateProduct(product.getId(), product)); }
@Override public ProductResponse method() { <DeepExtract> return executeSyncApiCall(api.updateProduct(product.getId(), product)); </DeepExtract> }
voucherify-java-sdk
positive
5,168
public boolean removeLabelByNameFromSpace(String labelName, String spaceKey) throws Exception { final Object[] args = { labelName, spaceKey }; return call("removeLabelByNameFromSpace", args); }
public boolean removeLabelByNameFromSpace(String labelName, String spaceKey) throws Exception { <DeepExtract> final Object[] args = { labelName, spaceKey }; return call("removeLabelByNameFromSpace", args); </DeepExtract> }
maven-confluence-plugin
positive
5,169
@Override public void run() { Observer<T> realObserver; if (observerMap.containsKey(observer)) { realObserver = observerMap.remove(observer); } else { realObserver = observer; } liveData.removeObserver(realObserver); }
@Override public void run() { <DeepExtract> Observer<T> realObserver; if (observerMap.containsKey(observer)) { realObserver = observerMap.remove(observer); } else { realObserver = observer; } liveData.removeObserver(realObserver); </DeepExtract> }
LiveEventBus
positive
5,171
private void editPlaylist(Playlist playlist, String title) { playlist.setTitle(title); FileUtils.write(String.format("playlist_%s", playlist.id.toString()), activity.getApplicationContext(), playlist); }
private void editPlaylist(Playlist playlist, String title) { playlist.setTitle(title); <DeepExtract> FileUtils.write(String.format("playlist_%s", playlist.id.toString()), activity.getApplicationContext(), playlist); </DeepExtract> }
IdealMedia
positive
5,175
@Test public void testDeserializationAsInt02NanosecondsWithoutTimeZone() throws Exception { OffsetDateTime date = OffsetDateTime.ofInstant(Instant.ofEpochSecond(123456789L, 0), Z2); this.mapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, true); OffsetDateTime value = this.mapper.readValue("123...
@Test public void testDeserializationAsInt02NanosecondsWithoutTimeZone() throws Exception { OffsetDateTime date = OffsetDateTime.ofInstant(Instant.ofEpochSecond(123456789L, 0), Z2); this.mapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, true); OffsetDateTime value = this.mapper.readValue("123...
jackson-datatype-jsr310
positive
5,176
@Test void featherCallInjectedServiceRestTest(VertxTestContext context) { Router router = new RestBuilder(vertx).injectWith(new FeatherInjectionProvider()).register(InjectedServicesRest.class).build(); vertx.createHttpServer().requestHandler(router).listen(PORT); client.get(PORT, HOST, "/getInstance/dummy").as(BodyCode...
@Test void featherCallInjectedServiceRestTest(VertxTestContext context) { <DeepExtract> Router router = new RestBuilder(vertx).injectWith(new FeatherInjectionProvider()).register(InjectedServicesRest.class).build(); vertx.createHttpServer().requestHandler(router).listen(PORT); </DeepExtract> client.get(PORT, HOST, "/ge...
rest.vertx
positive
5,177
@Subscribe public void onTracksDownloadDone(TracksDownloadEvent event) { if (event.isState()) { eventsDone++; Timber.tag(COUNTER_TAG).d("%d %s %d", eventsDone, getString(R.string.menu_tracks), counter); updateDownloadProgress(eventsDone / (float) counter, R.string.menu_tracks); if (counter == eventsDone) { notifyComple...
@Subscribe public void onTracksDownloadDone(TracksDownloadEvent event) { <DeepExtract> if (event.isState()) { eventsDone++; Timber.tag(COUNTER_TAG).d("%d %s %d", eventsDone, getString(R.string.menu_tracks), counter); updateDownloadProgress(eventsDone / (float) counter, R.string.menu_tracks); if (counter == eventsDone) ...
open-event-droidgen
positive
5,178
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); this.screenshotCapturer = new ScreenshotCapturer(this); this.screenshotCapturer.start(); setContentView(R.layout.activity_mapsforg...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); this.screenshotCapturer = new ScreenshotCapturer(this); this.screenshotCapturer.start(); setContentView(R.layout.activity_mapsforg...
WhereYouGo
positive
5,179
public void exitApp(View view) { mLogger.info("Exit selected"); mLogger.info("Finished"); finish(); mApp.doExit(); }
public void exitApp(View view) { mLogger.info("Exit selected"); <DeepExtract> mLogger.info("Finished"); finish(); mApp.doExit(); </DeepExtract> }
Wallet32
positive
5,180
private void initTodayData() { StepBean step = DataManager.currentStep(this); CURRENT_STEP = step != null ? Integer.parseInt(step.step) : 0; if (mStepCount != null) { mStepCount.setSteps(CURRENT_STEP); } Intent hangIntent = new Intent(this, StepActivity.class); PendingIntent hangPendingIntent = PendingIntent.getActivit...
private void initTodayData() { StepBean step = DataManager.currentStep(this); CURRENT_STEP = step != null ? Integer.parseInt(step.step) : 0; if (mStepCount != null) { mStepCount.setSteps(CURRENT_STEP); } <DeepExtract> Intent hangIntent = new Intent(this, StepActivity.class); PendingIntent hangPendingIntent = PendingInt...
jkapp
positive
5,181
@Override public void startUp(Page startUpPage) { String token = History.getToken(); final String[] tokenRef = parseParams(token); final Page page = _mapper.getPage(tokenRef[0]); if (page == null) Utils.Console("No page registered for history token:" + token); else { page._tokenStateInfo = tokenRef[1]; Page current = c...
@Override public void startUp(Page startUpPage) { String token = History.getToken(); <DeepExtract> final String[] tokenRef = parseParams(token); final Page page = _mapper.getPage(tokenRef[0]); if (page == null) Utils.Console("No page registered for history token:" + token); else { page._tokenStateInfo = tokenRef[1]; Pa...
GwtMobile-UI
positive
5,182
@Override public void handleMessage(Message msg) { systemUIHandler.removeMessages(0); int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE; if (Build.VERSION.SDK_INT >= 16) { uiOptions |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_FULLSCREEN; } else { getWindow().clearFla...
@Override public void handleMessage(Message msg) { <DeepExtract> systemUIHandler.removeMessages(0); int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE; if (Build.VERSION.SDK_INT >= 16) { uiOptions |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_FULLSCREEN; } else { getWin...
ehreader-android
positive
5,183
@Override public Map<String, Object> getExplicitRootResources() { if (initialized) { return; } initialized = true; String pkgNamesStr = getConfigInstance().getString(PackagesResourceConfig.PROPERTY_PACKAGES, null); if (null == pkgNamesStr) { logger.warn("No property defined with name: " + PackagesResourceConfig.PROPERT...
@Override public Map<String, Object> getExplicitRootResources() { <DeepExtract> if (initialized) { return; } initialized = true; String pkgNamesStr = getConfigInstance().getString(PackagesResourceConfig.PROPERTY_PACKAGES, null); if (null == pkgNamesStr) { logger.warn("No property defined with name: " + PackagesResource...
karyon
positive
5,184
@Override public void widgetSelected(SelectionEvent e) { if (getConfigTreeItem(getSelectedTreeItem()).getData().isAccount()) { TreeItemController tic = getConfigTreeItem(getSelectedTreeItem()); try { final String password = ((Account) tic.getData()).getPassword(); clipboard.setContents(new Object[] { password }, new Tr...
@Override public void widgetSelected(SelectionEvent e) { <DeepExtract> if (getConfigTreeItem(getSelectedTreeItem()).getData().isAccount()) { TreeItemController tic = getConfigTreeItem(getSelectedTreeItem()); try { final String password = ((Account) tic.getData()).getPassword(); clipboard.setContents(new Object[] { pass...
ServerAccess
positive
5,186
@Test public void testGetAsUser() { userGroupPayload.put("name", fairy.textProducer().word(1)); Long createdUserGroupId = given().auth().oauth2(adminUserOAuth2AccessToken).contentType(ContentType.JSON).body(userGroupPayload).when().post(RequestMappings.USER_GROUPS).then().extract().body().as(UserGroup.class).getId(); g...
@Test public void testGetAsUser() { <DeepExtract> userGroupPayload.put("name", fairy.textProducer().word(1)); </DeepExtract> Long createdUserGroupId = given().auth().oauth2(adminUserOAuth2AccessToken).contentType(ContentType.JSON).body(userGroupPayload).when().post(RequestMappings.USER_GROUPS).then().extract().body().a...
communikey-backend
positive
5,187
private synchronized void updateHeapStats() throws MBeanRuntimeException { cpuTime.init(); LOGGER.fine("Updating Heap stats...."); if (enabled) { try { updateHeapStats(); } catch (Exception e) { this.failureReason = e.getMessage(); this.enabled = false; LOGGER.severe("TOP4J ERROR: Failed to update HeapStats MBean due t...
private synchronized void updateHeapStats() throws MBeanRuntimeException { cpuTime.init(); LOGGER.fine("Updating Heap stats...."); <DeepExtract> if (enabled) { try { updateHeapStats(); } catch (Exception e) { this.failureReason = e.getMessage(); this.enabled = false; LOGGER.severe("TOP4J ERROR: Failed to update HeapSta...
top4j
positive
5,188
public boolean sendMsg(Handler h, int msgType, String msgBody) { boolean sent = false; if (h != null) { Message msg = Message.obtain(); msg.what = msgType; msg.obj = msgBody; msg.arg1 = 0; msg.arg2 = 0; try { sent = h.sendMessageDelayed(msg, 0); } catch (Exception e) { try { h.removeCallbacksAndMessages(null); } catch ...
public boolean sendMsg(Handler h, int msgType, String msgBody) { <DeepExtract> boolean sent = false; if (h != null) { Message msg = Message.obtain(); msg.what = msgType; msg.obj = msgBody; msg.arg1 = 0; msg.arg2 = 0; try { sent = h.sendMessageDelayed(msg, 0); } catch (Exception e) { try { h.removeCallbacksAndMessages(n...
EngineDriver
positive
5,189
public String getClassName() { if (header + 2 == null) { throw new IOException("Class not found"); } try { byte[] b = new byte[header + 2.available()]; int len = 0; while (true) { int n = header + 2.read(b, len, b.length - len); if (n == -1) { if (len < b.length) { byte[] c = new byte[len]; System.arraycopy(b, 0, c, 0,...
public String getClassName() { <DeepExtract> if (header + 2 == null) { throw new IOException("Class not found"); } try { byte[] b = new byte[header + 2.available()]; int len = 0; while (true) { int n = header + 2.read(b, len, b.length - len); if (n == -1) { if (len < b.length) { byte[] c = new byte[len]; System.arrayco...
qiuyj-code
positive
5,190
public void save(Bitmap bitmap, String key) { if (memoryLruCache != null && key != null) { memoryLruCache.put(key, bitmap); } saveBitmapDiskCache(bitmap, key, Bitmap.CompressFormat.JPEG); }
public void save(Bitmap bitmap, String key) { if (memoryLruCache != null && key != null) { memoryLruCache.put(key, bitmap); } <DeepExtract> saveBitmapDiskCache(bitmap, key, Bitmap.CompressFormat.JPEG); </DeepExtract> }
Androids
positive
5,191
public static DWProto.ClockEntryMsg parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { DWProto.DataWrapperMsg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result).asInvalidProto...
public static DWProto.ClockEntryMsg parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { <DeepExtract> DWProto.DataWrapperMsg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result)....
bolton-sigmod2013-code
positive
5,192
private boolean isCorporateUserEvent() { String entityType = event.getEntityName(); if (CorporateUser.class.getSimpleName().equalsIgnoreCase(entityType)) { return true; } return false; }
private boolean isCorporateUserEvent() { <DeepExtract> String entityType = event.getEntityName(); if (CorporateUser.class.getSimpleName().equalsIgnoreCase(entityType)) { return true; } return false; </DeepExtract> }
starter-kit-spring-maven
positive
5,194
@Test public void testCount() throws IOException, DbException, TransactionAbortedException { ArrayList<ArrayList<Integer>> createdTuples = new ArrayList<ArrayList<Integer>>(); HeapFile table = SystemTestUtil.createRandomHeapFile(COLUMNS, ROWS, MAX_VALUE, null, createdTuples); ArrayList<ArrayList<Integer>> expected = ag...
@Test public void testCount() throws IOException, DbException, TransactionAbortedException { <DeepExtract> ArrayList<ArrayList<Integer>> createdTuples = new ArrayList<ArrayList<Integer>>(); HeapFile table = SystemTestUtil.createRandomHeapFile(COLUMNS, ROWS, MAX_VALUE, null, createdTuples); ArrayList<ArrayList<Integer>>...
cs143-simpledb
positive
5,195
public List<String> restoreIpAddresses1(String s) { List<String> ans = new ArrayList<>(); if (new ArrayList<>().size() >= 4) { if (0 == s.length()) ans.add(String.join(".", new ArrayList<>())); return; } for (int i = 1; i <= 3; i++) { if (0 + i > s.length()) break; String segment = s.substring(0, 0 + i); if (segment.st...
public List<String> restoreIpAddresses1(String s) { List<String> ans = new ArrayList<>(); <DeepExtract> if (new ArrayList<>().size() >= 4) { if (0 == s.length()) ans.add(String.join(".", new ArrayList<>())); return; } for (int i = 1; i <= 3; i++) { if (0 + i > s.length()) break; String segment = s.substring(0, 0 + i); ...
LeetCode
positive
5,196
public static KieSession getKieSessionFromXLS(String realPath) throws Exception { KieHelper kieHelper = new KieHelper(); kieHelper.addContent(getDRL(realPath), ResourceType.DRL); Results results = kieHelper.verify(); if (results.hasMessages(Message.Level.WARNING, Message.Level.ERROR)) { List<Message> messages = results...
public static KieSession getKieSessionFromXLS(String realPath) throws Exception { <DeepExtract> KieHelper kieHelper = new KieHelper(); kieHelper.addContent(getDRL(realPath), ResourceType.DRL); Results results = kieHelper.verify(); if (results.hasMessages(Message.Level.WARNING, Message.Level.ERROR)) { List<Message> mess...
fw-spring-cloud
positive
5,197
@Override public long toBits(long a) { if (a > MAX / (C6 / C0)) return Long.MAX_VALUE; if (a < -MAX / (C6 / C0)) return Long.MIN_VALUE; return a * C6 / C0; }
@Override public long toBits(long a) { <DeepExtract> if (a > MAX / (C6 / C0)) return Long.MAX_VALUE; if (a < -MAX / (C6 / C0)) return Long.MIN_VALUE; return a * C6 / C0; </DeepExtract> }
Chronicle-Algorithms
positive
5,198
public Criteria andAccountIdNotBetween(Long value1, Long value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "accountId" + " cannot be null"); } criteria.add(new Criterion("ACCOUNTID not between", value1, value2)); return (Criteria) this; }
public Criteria andAccountIdNotBetween(Long value1, Long value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "accountId" + " cannot be null"); } criteria.add(new Criterion("ACCOUNTID not between", value1, value2)); </DeepExtract> return (Criteria) this; }
compass
positive
5,199
public static String dateToStringWithTime(Date date) { if (date == null) { return null; } try { SimpleDateFormat sfDate = new SimpleDateFormat(DATETIME_PATTERN); sfDate.setLenient(false); return sfDate.format(date); } catch (Exception e) { return null; } }
public static String dateToStringWithTime(Date date) { <DeepExtract> if (date == null) { return null; } try { SimpleDateFormat sfDate = new SimpleDateFormat(DATETIME_PATTERN); sfDate.setLenient(false); return sfDate.format(date); } catch (Exception e) { return null; } </DeepExtract> }
SpringMVC-Mybatis-shiro
positive
5,200
@Override public void visit(TableRowNode trn) { final Node n = nodeStack.peek(); if (n instanceof TableHeaderNode) _buffer.append("||"); else if (n instanceof TableBodyNode) _buffer.append('|'); for (Node child : trn.getChildren()) { child.accept(this); } _buffer.append('\n'); }
@Override public void visit(TableRowNode trn) { final Node n = nodeStack.peek(); if (n instanceof TableHeaderNode) _buffer.append("||"); else if (n instanceof TableBodyNode) _buffer.append('|'); <DeepExtract> for (Node child : trn.getChildren()) { child.accept(this); } </DeepExtract> _buffer.append('\n'); }
maven-confluence-plugin
positive
5,201
public void addWord(String word) { if (0 == word.toCharArray().length - 1) { children.computeIfAbsent(word.toCharArray()[0], (ignored) -> new TrieNode(true)); return; } else { children.computeIfAbsent(word.toCharArray()[0], (ignored) -> new TrieNode(false)); } children.get(word.toCharArray()[0]).addNode(0 + 1, word.toC...
public void addWord(String word) { <DeepExtract> if (0 == word.toCharArray().length - 1) { children.computeIfAbsent(word.toCharArray()[0], (ignored) -> new TrieNode(true)); return; } else { children.computeIfAbsent(word.toCharArray()[0], (ignored) -> new TrieNode(false)); } children.get(word.toCharArray()[0]).addNode(0...
algos
positive
5,202
public Object opt(String key) { Object val = this.get((Object) (Object) key); if (val == null) { if (!this.containsKey((Object) key)) { throw new JSONException("The key [" + (Object) key + "] was not in the map"); } } return val; }
public Object opt(String key) { <DeepExtract> Object val = this.get((Object) (Object) key); if (val == null) { if (!this.containsKey((Object) key)) { throw new JSONException("The key [" + (Object) key + "] was not in the map"); } } return val; </DeepExtract> }
phonegap-simjs
positive
5,203
@Deprecated public AlbumBuilder setSelectedPhotoPaths(ArrayList<String> selectedPhotoPaths) { Result.clear(); Setting.clear(); instance = null; ArrayList<Photo> selectedPhotos = new ArrayList<>(); for (String path : selectedPhotoPaths) { File file = new File(path); Uri uri = null; if (null != mActivity && null != mActi...
@Deprecated public AlbumBuilder setSelectedPhotoPaths(ArrayList<String> selectedPhotoPaths) { <DeepExtract> Result.clear(); Setting.clear(); instance = null; </DeepExtract> ArrayList<Photo> selectedPhotos = new ArrayList<>(); for (String path : selectedPhotoPaths) { File file = new File(path); Uri uri = null; if (null ...
EasyPhotos
positive
5,204
public static TreeInfo walk(String start) { TreeInfo result = new TreeInfo(); for (File item : new File(start).listFiles()) { if (item.isDirectory()) { result.dirs.add(item); result.addAll(recurseDirs(item, ".*")); } else { if (item.getName().matches(".*")) { result.files.add(item); } } } return result; }
public static TreeInfo walk(String start) { <DeepExtract> TreeInfo result = new TreeInfo(); for (File item : new File(start).listFiles()) { if (item.isDirectory()) { result.dirs.add(item); result.addAll(recurseDirs(item, ".*")); } else { if (item.getName().matches(".*")) { result.files.add(item); } } } return result; <...
LearningOfThinkInJava
positive
5,205
public void diagnose() { duration(); eventType(); gcCause(); specialSituation(); memory(); cputime(); promotion(); interval(); }
public void diagnose() { <DeepExtract> duration(); eventType(); gcCause(); specialSituation(); memory(); cputime(); promotion(); interval(); </DeepExtract> }
jifa
positive
5,206
public Criteria andPayidGreaterThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "payid" + " cannot be null"); } criteria.add(new Criterion("payId >=", value)); return (Criteria) this; }
public Criteria andPayidGreaterThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "payid" + " cannot be null"); } criteria.add(new Criterion("payId >=", value)); </DeepExtract> return (Criteria) this; }
ssmBillBook
positive
5,207
@Test public void testGetExtension() throws Exception { var userData = new UserData(); userData.setLoginName("admin_user"); userData.setFullName("Admin User"); userData.setRole(UserData.ROLE_ADMIN); Mockito.doReturn(userData).when(users).findLoggedInUser(); return userData; var namespace = mockNamespace(); var extensio...
@Test public void testGetExtension() throws Exception { var userData = new UserData(); userData.setLoginName("admin_user"); userData.setFullName("Admin User"); userData.setRole(UserData.ROLE_ADMIN); Mockito.doReturn(userData).when(users).findLoggedInUser(); return userData; <DeepExtract> var namespace = mockNamespace()...
openvsx
positive
5,208
@Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { Uri firebaseUrl = taskSnapshot.getDownloadUrl(); Toast.makeText(mContext, "photo upload success", Toast.LENGTH_SHORT).show(); Log.d(TAG, "addPhotoToDatabase: adding photo to database."); String tags = StringManipulation.getTags(caption); String new...
@Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { Uri firebaseUrl = taskSnapshot.getDownloadUrl(); Toast.makeText(mContext, "photo upload success", Toast.LENGTH_SHORT).show(); <DeepExtract> Log.d(TAG, "addPhotoToDatabase: adding photo to database."); String tags = StringManipulation.getTags(captio...
Android-Instagram-Clone
positive
5,209
@Test public void ensureUnknownDataIsDeserializedAndSerializedCorrectly() throws IOException { byte[] data = TestUtils.getBytes("V1MsgStrangeData.payload"); InputStream in = new ByteArrayInputStream(data); ObjectMessage object = Factory.getObjectMessage(1, in, data.length); ByteArrayOutputStream out = new ByteArrayOutp...
@Test public void ensureUnknownDataIsDeserializedAndSerializedCorrectly() throws IOException { <DeepExtract> byte[] data = TestUtils.getBytes("V1MsgStrangeData.payload"); InputStream in = new ByteArrayInputStream(data); ObjectMessage object = Factory.getObjectMessage(1, in, data.length); ByteArrayOutputStream out = new...
Jabit
positive
5,210
@Test public void rejectUnacceleratedCausesFailuresWhenItCannotAccelerateTheRegex() throws InterruptedException, ExecutionException, IOException { setup("root"); indexRandom(true, doc("findme", "test")); assertFailures(search(filter("...").rejectUnaccelerated(true)), RestStatus.INTERNAL_SERVER_ERROR, containsString("Un...
@Test public void rejectUnacceleratedCausesFailuresWhenItCannotAccelerateTheRegex() throws InterruptedException, ExecutionException, IOException { <DeepExtract> setup("root"); </DeepExtract> indexRandom(true, doc("findme", "test")); assertFailures(search(filter("...").rejectUnaccelerated(true)), RestStatus.INTERNAL_SER...
search-extra
positive
5,212
@Test(groups = { "listers" }) public void listerForFeaturedAuthor() { String currentAuthor = getCurrentUserAuthorString(); BlogPosts posts = conn.blogPosts(); Lister blogLister = posts.listerForFeatured(BlogPostField.featuredDate); blogLister = blogLister.author(currentAuthor); int count = 0; Iterator<BlogPost> blogIte...
@Test(groups = { "listers" }) public void listerForFeaturedAuthor() { String currentAuthor = getCurrentUserAuthorString(); BlogPosts posts = conn.blogPosts(); Lister blogLister = posts.listerForFeatured(BlogPostField.featuredDate); blogLister = blogLister.author(currentAuthor); <DeepExtract> int count = 0; Iterator<Blo...
ning-api-java
positive
5,213
public void setValue(String str) throws BufferOverflowException, IOException { m_LastSize = m_Buffer.size(); storeSize(); m_Buffer.clear(); m_Cursor = 0; draw(); m_Cursor = 0; m_IO.moveLeft(m_LastSize); m_IO.eraseToEndOfLine(); storeSize(); m_Buffer.ensureSpace(1); m_Buffer.append(str); m_Cursor++; m_IO.write(str); }
public void setValue(String str) throws BufferOverflowException, IOException { m_LastSize = m_Buffer.size(); storeSize(); m_Buffer.clear(); m_Cursor = 0; draw(); m_Cursor = 0; m_IO.moveLeft(m_LastSize); m_IO.eraseToEndOfLine(); <DeepExtract> storeSize(); m_Buffer.ensureSpace(1); m_Buffer.append(str); m_Cursor++; m_IO.w...
remotekeyboard
positive
5,214
public void writeInt(int val) { byte[] bytes = new byte[4]; bytes[3] = (byte) (val & 0xFF); bytes[2] = (byte) (val >> 8 & 0xFF); bytes[1] = (byte) (val >> 16 & 0xFF); bytes[0] = (byte) (val >> 24 & 0xFF); for (byte b : bytes) { bytes.insert(b); } }
public void writeInt(int val) { byte[] bytes = new byte[4]; bytes[3] = (byte) (val & 0xFF); bytes[2] = (byte) (val >> 8 & 0xFF); bytes[1] = (byte) (val >> 16 & 0xFF); bytes[0] = (byte) (val >> 24 & 0xFF); <DeepExtract> for (byte b : bytes) { bytes.insert(b); } </DeepExtract> }
minecraft-world-downloader
positive
5,215
public void testNoIncludeExcludes() throws Exception { mojo.execute(); File destFile = new File(mojo.getOutputDirectory().getAbsolutePath(), UNPACKED_FILE_PREFIX + 1 + UNPACKED_FILE_SUFFIX); assertEquals(true, destFile.exists()); File destFile = new File(mojo.getOutputDirectory().getAbsolutePath(), UNPACKED_FILE_PREFIX...
public void testNoIncludeExcludes() throws Exception { mojo.execute(); File destFile = new File(mojo.getOutputDirectory().getAbsolutePath(), UNPACKED_FILE_PREFIX + 1 + UNPACKED_FILE_SUFFIX); assertEquals(true, destFile.exists()); File destFile = new File(mojo.getOutputDirectory().getAbsolutePath(), UNPACKED_FILE_PREFIX...
maven-dependency-plugin
positive
5,216
public void sendMessage() { context.createProducer().send(queue, message); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Sent message " + message, "Sent message " + message)); }
public void sendMessage() { context.createProducer().send(queue, message); <DeepExtract> FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Sent message " + message, "Sent message " + message)); </DeepExtract> }
practical-javaee7-development-wildfly
positive
5,217
default boolean isCompatibleWith(PuffinBasicType other) { if (this == other) { return true; } if (other == null || other.getClass() != ScalarType.class) { return false; } ScalarType o = (ScalarType) other; return getTypeId() == o.getTypeId() && getAtomTypeId() == o.getAtomTypeId(); }
default boolean isCompatibleWith(PuffinBasicType other) { <DeepExtract> if (this == other) { return true; } if (other == null || other.getClass() != ScalarType.class) { return false; } ScalarType o = (ScalarType) other; return getTypeId() == o.getTypeId() && getAtomTypeId() == o.getAtomTypeId(); </DeepExtract> }
PuffinBASIC
positive
5,218
@Around("logStream()") public Object webSocketAudit(ProceedingJoinPoint pjp) throws Throwable { StringBuilder builder = new StringBuilder(NEXT_LINE); Object[] args = pjp.getArgs(); Parameter[] parameters = ((MethodSignature) pjp.getSignature()).getMethod().getParameters(); builder.append(DASH_LINE); builder.append(NEXT...
@Around("logStream()") public Object webSocketAudit(ProceedingJoinPoint pjp) throws Throwable { StringBuilder builder = new StringBuilder(NEXT_LINE); Object[] args = pjp.getArgs(); Parameter[] parameters = ((MethodSignature) pjp.getSignature()).getMethod().getParameters(); builder.append(DASH_LINE); builder.append(NEXT...
spring-boot-messaging
positive
5,220
@Test public void happy_dinner_together() { run(process).startByKey("Dinner").execute(); verify(process, times(1)).hasFinished("DinnerPrepared"); verify(process, never()).hasFinished("DinnerNotPrepared"); verify(process, times(1)).hasFinished("HaveDinnerTogether"); verify(process, times(1)).hasFinished("DinnerFinished"...
@Test public void happy_dinner_together() { run(process).startByKey("Dinner").execute(); verify(process, times(1)).hasFinished("DinnerPrepared"); verify(process, never()).hasFinished("DinnerNotPrepared"); verify(process, times(1)).hasFinished("HaveDinnerTogether"); <DeepExtract> verify(process, times(1)).hasFinished("D...
camunda-platform-scenario
positive
5,221
public ArrayList<ArrayList<Point>> getClusterByDivding() { clusters = new ArrayList<>(); boolean canDivide = false; ArrayList<ArrayList<Point>> pointGroup; ArrayList<Point> pointList1 = new ArrayList<>(); ArrayList<Point> pointList2 = new ArrayList<>(); for (int m = 2; m <= points.size() / 2; m++) { pointGroup = remove...
public ArrayList<ArrayList<Point>> getClusterByDivding() { clusters = new ArrayList<>(); <DeepExtract> boolean canDivide = false; ArrayList<ArrayList<Point>> pointGroup; ArrayList<Point> pointList1 = new ArrayList<>(); ArrayList<Point> pointList2 = new ArrayList<>(); for (int m = 2; m <= points.size() / 2; m++) { point...
datamining-18algorithms
positive
5,223
@Override public String getTitle() { return i18n.getString("project-info-report", locale, "report.summary.title"); }
@Override public String getTitle() { <DeepExtract> return i18n.getString("project-info-report", locale, "report.summary.title"); </DeepExtract> }
maven-confluence-plugin
positive
5,224
@Override public Fragment getFragmentTop() { TravelExpandingFragment fragment = new TravelExpandingFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_TRAVEL, travel); fragment.setArguments(args); return fragment; }
@Override public Fragment getFragmentTop() { <DeepExtract> TravelExpandingFragment fragment = new TravelExpandingFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_TRAVEL, travel); fragment.setArguments(args); return fragment; </DeepExtract> }
More-MobileBookstore
positive
5,225
public static <T> T toBean(Class<T> beanClass, ValueProvider valueProvider) { if (null == valueProvider) { return ClassKit.newInstance(beanClass); } Class<?> beanClass = ClassKit.newInstance(beanClass).getClass(); try { PropertyDescriptor[] propertyDescriptors = getPropertyDescriptors(beanClass); String propertyName; O...
public static <T> T toBean(Class<T> beanClass, ValueProvider valueProvider) { <DeepExtract> if (null == valueProvider) { return ClassKit.newInstance(beanClass); } Class<?> beanClass = ClassKit.newInstance(beanClass).getClass(); try { PropertyDescriptor[] propertyDescriptors = getPropertyDescriptors(beanClass); String p...
school-bus
positive
5,227
private void writeObject(ObjectOutputStream oos) throws IOException { WritableByteChannel dataChannel = Channels.newChannel(new DataOutputStream(oos)); new DataOutputStream(oos).writeInt(getOriginalSize()); new DataOutputStream(oos).writeInt(getSamplingRateSA()); new DataOutputStream(oos).writeInt(getSamplingRateISA())...
private void writeObject(ObjectOutputStream oos) throws IOException { <DeepExtract> WritableByteChannel dataChannel = Channels.newChannel(new DataOutputStream(oos)); new DataOutputStream(oos).writeInt(getOriginalSize()); new DataOutputStream(oos).writeInt(getSamplingRateSA()); new DataOutputStream(oos).writeInt(getSamp...
succinct
positive
5,228
@Test public void onEmptyObject() { String value = "{}"; String sign = "K8280/U9SSy9IVtjBuVeLr+HpOB4BQFWbg+UZaADMtTdGYI7Geitb76LTrr5QV/7Xg4ahLwYGYZzuHGZKM5ZAQ"; assertThat(signMgr.sign(value), is(equalTo(sign))); }
@Test public void onEmptyObject() { String value = "{}"; String sign = "K8280/U9SSy9IVtjBuVeLr+HpOB4BQFWbg+UZaADMtTdGYI7Geitb76LTrr5QV/7Xg4ahLwYGYZzuHGZKM5ZAQ"; <DeepExtract> assertThat(signMgr.sign(value), is(equalTo(sign))); </DeepExtract> }
matrix-java-sdk
positive
5,229
@Override protected void setUp() throws Exception { super.setUp(); myFixture.enableInspections(HtmlUnknownTagInspection.class); }
@Override protected void setUp() throws Exception { super.setUp(); <DeepExtract> myFixture.enableInspections(HtmlUnknownTagInspection.class); </DeepExtract> }
idea-handlebars
positive
5,230
public void mouseClicked(java.awt.event.MouseEvent evt) { Point2D p = trans.transform(new Point2D.Double(evt.getX(), evt.getY()), null); jLCNCCommands.setSelectedIndices(layers.getIndexes(p, jCBPerview.getSelectedIndex())); jLCNCCommands.ensureIndexIsVisible(jLCNCCommands.getSelectedIndex()); }
public void mouseClicked(java.awt.event.MouseEvent evt) { <DeepExtract> Point2D p = trans.transform(new Point2D.Double(evt.getX(), evt.getY()), null); jLCNCCommands.setSelectedIndices(layers.getIndexes(p, jCBPerview.getSelectedIndex())); jLCNCCommands.ensureIndexIsVisible(jLCNCCommands.getSelectedIndex()); </DeepExtrac...
cncgcodecontroller
positive
5,231
@Override public void writeObject(final MGenBase o) throws IOException { m_expectType = -1; m_buffer.clear(); if (true) writeTypeTag(TAG_CLASS); if (o != null) { m_expectType = null != null ? null.typeId() : 0; o._accept(this, FieldVisitSelection.ALL_SET_NONTRANSIENT); } else { writeByte(0); } if (m_buffer.nonEmpty()) ...
@Override public void writeObject(final MGenBase o) throws IOException { m_expectType = -1; m_buffer.clear(); if (true) writeTypeTag(TAG_CLASS); if (o != null) { m_expectType = null != null ? null.typeId() : 0; o._accept(this, FieldVisitSelection.ALL_SET_NONTRANSIENT); } else { writeByte(0); } <DeepExtract> if (m_buffe...
mgen
positive
5,232
@SuppressWarnings("unchecked") public final Ix<Long> sumLong() { if (Interactive.sumLong((Iterable<Long>) it) instanceof Ix) { return (Ix<T>) Interactive.sumLong((Iterable<Long>) it); } return new Ix<T>(Interactive.sumLong((Iterable<Long>) it)); }
@SuppressWarnings("unchecked") public final Ix<Long> sumLong() { <DeepExtract> if (Interactive.sumLong((Iterable<Long>) it) instanceof Ix) { return (Ix<T>) Interactive.sumLong((Iterable<Long>) it); } return new Ix<T>(Interactive.sumLong((Iterable<Long>) it)); </DeepExtract> }
ixjava
positive
5,234
public Object visitFloatNode(FloatNode node) { hashCode = hashCode * 13 + 41; return this; }
public Object visitFloatNode(FloatNode node) { <DeepExtract> hashCode = hashCode * 13 + 41; return this; </DeepExtract> }
emacs-config
positive
5,235
@Override public void afterTextChanged(Editable s) { searchInput.getText().toString() = searchInput.getText().toString().toLowerCase(); searchResult = new ArrayList<>(); if (!"".equals(searchInput.getText().toString())) { if (LeetCoderApplication.categories != null && LeetCoderApplication.categoriesTag != null) { HashS...
@Override public void afterTextChanged(Editable s) { <DeepExtract> searchInput.getText().toString() = searchInput.getText().toString().toLowerCase(); searchResult = new ArrayList<>(); if (!"".equals(searchInput.getText().toString())) { if (LeetCoderApplication.categories != null && LeetCoderApplication.categoriesTag !=...
LeeCo
positive
5,236
@Test public void createStreamTest() { List<ColumnNameTypeValue> columns = new ArrayList<>(); columns.add(new ColumnNameTypeValue("col1", ColumnType.INTEGER, 1)); columns.add(new ColumnNameTypeValue("col2", ColumnType.STRING, "test string")); columns.add(new ColumnNameTypeValue("col3", ColumnType.BOOLEAN, true)); colum...
@Test public void createStreamTest() { <DeepExtract> List<ColumnNameTypeValue> columns = new ArrayList<>(); columns.add(new ColumnNameTypeValue("col1", ColumnType.INTEGER, 1)); columns.add(new ColumnNameTypeValue("col2", ColumnType.STRING, "test string")); columns.add(new ColumnNameTypeValue("col3", ColumnType.BOOLEAN,...
Decision
positive
5,240
@Override public void onError(Throwable e) { e.printStackTrace(); if (mBaseService != null) { mBaseService.returnFailed(e.getMessage()); } CrashReport.postCatchedException(e); }
@Override public void onError(Throwable e) { e.printStackTrace(); <DeepExtract> if (mBaseService != null) { mBaseService.returnFailed(e.getMessage()); } </DeepExtract> CrashReport.postCatchedException(e); }
V2EX
positive
5,241
@Override public GiteaPullRequest fetchPullRequest(String username, String name, long id) throws IOException, InterruptedException { HttpURLConnection connection = openConnection(api().literal("/repos").path(UriTemplateBuilder.var("username")).path(UriTemplateBuilder.var("name")).literal("/pulls").path(UriTemplateBuild...
@Override public GiteaPullRequest fetchPullRequest(String username, String name, long id) throws IOException, InterruptedException { <DeepExtract> HttpURLConnection connection = openConnection(api().literal("/repos").path(UriTemplateBuilder.var("username")).path(UriTemplateBuilder.var("name")).literal("/pulls").path(Ur...
gitea-plugin
positive
5,242