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 <T> T getForObject(URI url, Class<T> responseType) throws RestClientException {
AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType);
HttpMessageConverterExtractor<T> responseExtractor = new HttpMessageConverterExtractor<T>(responseType, getMessageConverters(), logger);
ret... | public <T> T getForObject(URI url, Class<T> responseType) throws RestClientException {
AcceptHeaderRequestCallback requestCallback = new AcceptHeaderRequestCallback(responseType);
HttpMessageConverterExtractor<T> responseExtractor = new HttpMessageConverterExtractor<T>(responseType, getMessageConverters(), logger);
<De... | spring-data-document-examples | positive | 1,742 |
@Override
public void onClick(View v) {
String message = mCommentText.getText().toString();
Bundle bundle = new Bundle();
bundle.putString(GerritService.REVIEW_MESSAGE, message);
sendRequest(GerritService.DataType.Comment, bundle);
} | @Override
public void onClick(View v) {
<DeepExtract>
String message = mCommentText.getText().toString();
Bundle bundle = new Bundle();
bundle.putString(GerritService.REVIEW_MESSAGE, message);
sendRequest(GerritService.DataType.Comment, bundle);
</DeepExtract>
} | external_jbirdvegas_mGerrit | positive | 1,743 |
private void doZsort() {
double[] xyz = new double[3];
jjj[0] = 0;
xyz[0] = 0.0;
xyz[1] = 0.0;
xyz[2] = -0.5;
double horiz = xyz[0] * cosaz - xyz[1] * sinaz;
double vert = xyz[0] * sinel * sinaz + xyz[1] * sinel * cosaz + xyz[2] * cosel;
double outof = -xyz[0] * cosel * sinaz - xyz[1] * cosel * cosaz + xyz[2] * sinel;
... | private void doZsort() {
double[] xyz = new double[3];
jjj[0] = 0;
xyz[0] = 0.0;
xyz[1] = 0.0;
xyz[2] = -0.5;
double horiz = xyz[0] * cosaz - xyz[1] * sinaz;
double vert = xyz[0] * sinel * sinaz + xyz[1] * sinel * cosaz + xyz[2] * cosel;
double outof = -xyz[0] * cosel * sinaz - xyz[1] * cosel * cosaz + xyz[2] * sinel;
... | BeamFour | positive | 1,744 |
@Override
public String discoverTopBooksService() {
String[] topBooksServiceURLs = { "http://localhost:8080/topbooks", "http://localhost:8082/topbooks" };
for (String url : topBooksServiceURLs) {
try {
Response response = ClientBuilder.newClient().target(url).request(MediaType.APPLICATION_JSON).get();
if (response.getS... | @Override
public String discoverTopBooksService() {
String[] topBooksServiceURLs = { "http://localhost:8080/topbooks", "http://localhost:8082/topbooks" };
<DeepExtract>
for (String url : topBooksServiceURLs) {
try {
Response response = ClientBuilder.newClient().target(url).request(MediaType.APPLICATION_JSON).get();
if ... | agoncal-sample-javaee | positive | 1,745 |
@Override
public boolean generate(World world, Random rand, int x, int y, int z) {
final Random random = new Random();
random.setSeed(rand.nextLong());
if (isPoorGrowthConditions(world, x, y, z, 0, getSaplingBlock()))
return false;
final Block block = world.getBlock(x, y - 1, z);
block.onPlantGrow(world, x, y - 1, z, x... | @Override
public boolean generate(World world, Random rand, int x, int y, int z) {
final Random random = new Random();
random.setSeed(rand.nextLong());
if (isPoorGrowthConditions(world, x, y, z, 0, getSaplingBlock()))
return false;
final Block block = world.getBlock(x, y - 1, z);
block.onPlantGrow(world, x, y - 1, z, x... | ancient-trees | positive | 1,746 |
@Override
@Deprecated
public void setMinScale(float minScale) {
mAttacher.setMinimumScale(minScale);
} | @Override
@Deprecated
public void setMinScale(float minScale) {
<DeepExtract>
mAttacher.setMinimumScale(minScale);
</DeepExtract>
} | WeiboClient_Biu | positive | 1,747 |
public void execute(Nation n) {
this.n = n;
this.random = new Random(n.random.nextInt());
n.races.get(0).tags.getAllStrings("priestnames").forEach(set -> names.addAll(assets.magenames.get(set)));
n.races.get(0).tags.getAllStrings("priestadjectives").forEach(set -> adjectives.addAll(assets.magenames.get(set)));
n.races.... | public void execute(Nation n) {
this.n = n;
this.random = new Random(n.random.nextInt());
<DeepExtract>
n.races.get(0).tags.getAllStrings("priestnames").forEach(set -> names.addAll(assets.magenames.get(set)));
n.races.get(0).tags.getAllStrings("priestadjectives").forEach(set -> adjectives.addAll(assets.magenames.get(se... | nationgen | positive | 1,748 |
@Override
protected void onLayout(boolean flag, int i, int j, int k, int l) {
int offsetHeaderY;
int offsetFooterY;
if (mPtrIndicator.isHeader()) {
offsetHeaderY = mPtrIndicator.getCurrentPosY();
offsetFooterY = 0;
} else {
offsetHeaderY = 0;
offsetFooterY = mPtrIndicator.getCurrentPosY();
}
int paddingLeft = getPaddin... | @Override
protected void onLayout(boolean flag, int i, int j, int k, int l) {
<DeepExtract>
int offsetHeaderY;
int offsetFooterY;
if (mPtrIndicator.isHeader()) {
offsetHeaderY = mPtrIndicator.getCurrentPosY();
offsetFooterY = 0;
} else {
offsetHeaderY = 0;
offsetFooterY = mPtrIndicator.getCurrentPosY();
}
int paddingLe... | Elephant | positive | 1,749 |
void min2NormalAndDrag2Min(boolean showImmediately, float currentY, float startY, float endY, float startLeft, float endLeft, float startWidth, float endWidth, float startHeight, float endHeight) {
if (endY == startY) {
return;
}
if (showImmediately) {
imageWrapper.setWidth(endWidth);
imageWrapper.setHeight(endHeight);... | void min2NormalAndDrag2Min(boolean showImmediately, float currentY, float startY, float endY, float startLeft, float endLeft, float startWidth, float endWidth, float startHeight, float endHeight) {
if (endY == startY) {
return;
}
if (showImmediately) {
imageWrapper.setWidth(endWidth);
imageWrapper.setHeight(endHeight);... | LxViewLibs | positive | 1,750 |
@Override
public Camera.CameraBuilder getCameraBuilder() {
if (mCamera == null) {
throw new IllegalStateException("camera == null");
}
return mCamera.getBuilder();
} | @Override
public Camera.CameraBuilder getCameraBuilder() {
<DeepExtract>
if (mCamera == null) {
throw new IllegalStateException("camera == null");
}
</DeepExtract>
return mCamera.getBuilder();
} | VideoRecorder | positive | 1,751 |
@Override
public ResultSet executeQuery(String sql) throws SQLException {
this.sql = sql;
return this.statement.executeQuery(sql);
} | @Override
public ResultSet executeQuery(String sql) throws SQLException {
<DeepExtract>
this.sql = sql;
</DeepExtract>
return this.statement.executeQuery(sql);
} | dts | positive | 1,752 |
@Override
public void onComplete(Object arg0) {
} | @Override
<DeepExtract>
</DeepExtract>
public void onComplete(Object arg0) {
<DeepExtract>
</DeepExtract>
} | GOpenSource_AppKit_Android_AS | positive | 1,755 |
public void addRawText(String content) {
cont.add(content).pad(3.5f).padLeft(tablePad).padRight(tablePad);
if (!tableMode)
cont.row();
else if (lineCol) {
cont.image().color(tableColor).fillY().growY().width(tableStroke).pad(0);
}
} | public void addRawText(String content) {
cont.add(content).pad(3.5f).padLeft(tablePad).padRight(tablePad);
<DeepExtract>
if (!tableMode)
cont.row();
else if (lineCol) {
cont.image().color(tableColor).fillY().growY().width(tableStroke).pad(0);
}
</DeepExtract>
} | BetaMindy | positive | 1,756 |
public ModelConfigOuterClass.ModelDynamicBatching getDynamicBatching() {
if (schedulingChoiceCase_ == 11) {
return (ModelConfigOuterClass.ModelDynamicBatching) schedulingChoice_;
}
return DEFAULT_INSTANCE;
} | public ModelConfigOuterClass.ModelDynamicBatching getDynamicBatching() {
if (schedulingChoiceCase_ == 11) {
return (ModelConfigOuterClass.ModelDynamicBatching) schedulingChoice_;
}
<DeepExtract>
return DEFAULT_INSTANCE;
</DeepExtract>
} | dl_inference | positive | 1,758 |
public Criteria andGmtModifiedEqualTo(Long value) {
if (value == null) {
throw new RuntimeException("Value for " + "gmtModified" + " cannot be null");
}
criteria.add(new Criterion("gmt_modified =", value));
return (Criteria) this;
} | public Criteria andGmtModifiedEqualTo(Long value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "gmtModified" + " cannot be null");
}
criteria.add(new Criterion("gmt_modified =", value));
</DeepExtract>
return (Criteria) this;
} | community | positive | 1,759 |
public void exponential(Runnable fn, int maxRetries, long retryBackoffMillis) {
int retries = 0;
while (true) {
try {
fn.run();
return;
} catch (Exception e) {
if (retries >= (maxRetries - 1)) {
throw e;
}
long timeout = !true ? retryBackoffMillis : (long) Math.pow(2, retries) * retryBackoffMillis;
sleep(timeout);
retr... | public void exponential(Runnable fn, int maxRetries, long retryBackoffMillis) {
<DeepExtract>
int retries = 0;
while (true) {
try {
fn.run();
return;
} catch (Exception e) {
if (retries >= (maxRetries - 1)) {
throw e;
}
long timeout = !true ? retryBackoffMillis : (long) Math.pow(2, retries) * retryBackoffMillis;
sleep(... | kayenta | positive | 1,760 |
@Override
public double distance(Point from, double toX, double toY) {
final double scale = Math.pow(10, 10);
return Math.round(delegate.distance(from, toX, toY) * scale) / scale;
} | @Override
public double distance(Point from, double toX, double toY) {
<DeepExtract>
final double scale = Math.pow(10, 10);
return Math.round(delegate.distance(from, toX, toY) * scale) / scale;
</DeepExtract>
} | spatial4j | positive | 1,761 |
public Criteria andSeqIsNull() {
if ("seq is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("seq is null"));
return (Criteria) this;
} | public Criteria andSeqIsNull() {
<DeepExtract>
if ("seq is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("seq is null"));
</DeepExtract>
return (Criteria) this;
} | einvoice | positive | 1,763 |
@Override
public void reset() {
song = loader.header[7] - 1;
nsfBanks = nsfStartBanks.clone();
setBanks();
for (int i = 0; i <= 0x7ff; ++i) {
cpuram.write(i, 0);
}
for (int i = 0x4000; i <= 0x4013; ++i) {
cpuram.write(i, 0);
}
cpuram.write(0x4015, 0x0f);
cpuram.write(0x4017, 0x40);
cpu.push(0xff);
cpu.push(0xfa);
cpu.s... | @Override
public void reset() {
song = loader.header[7] - 1;
<DeepExtract>
nsfBanks = nsfStartBanks.clone();
setBanks();
for (int i = 0; i <= 0x7ff; ++i) {
cpuram.write(i, 0);
}
for (int i = 0x4000; i <= 0x4013; ++i) {
cpuram.write(i, 0);
}
cpuram.write(0x4015, 0x0f);
cpuram.write(0x4017, 0x40);
cpu.push(0xff);
cpu.pus... | halfnes | positive | 1,764 |
@Override
public void run() {
if (null != mProgressDialog && mProgressDialog.isShowing()) {
mProgressDialog.dismiss();
}
} | @Override
public void run() {
<DeepExtract>
if (null != mProgressDialog && mProgressDialog.isShowing()) {
mProgressDialog.dismiss();
}
</DeepExtract>
} | NoWordsChat | positive | 1,765 |
@Override
protected void processSystem() {
boolean wasPaused = isPaused;
if (Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) {
if (isPaused)
onResume();
else
onPause();
}
if (isPaused || wasPaused) {
gameBatch.setProjectionMatrix(camera.combined);
gameBatch.begin();
gameBatch.draw(cachedBackground, 0, 0);
gameBatch.end(... | @Override
protected void processSystem() {
boolean wasPaused = isPaused;
<DeepExtract>
if (Gdx.input.isKeyJustPressed(Input.Keys.ESCAPE)) {
if (isPaused)
onResume();
else
onPause();
}
</DeepExtract>
if (isPaused || wasPaused) {
gameBatch.setProjectionMatrix(camera.combined);
gameBatch.begin();
gameBatch.draw(cachedBack... | cell-rpg | positive | 1,766 |
public static VpnProfile getAlwaysOnVPN(Context context) {
if (instance == null) {
instance = new ProfileManager();
instance.loadVPNList(context);
}
SharedPreferences prefs = Preferences.getDefaultSharedPreferences(context);
String uuid = prefs.getString("alwaysOnVpn", null);
if (tmpprofile != null && tmpprofile.getUUI... | public static VpnProfile getAlwaysOnVPN(Context context) {
if (instance == null) {
instance = new ProfileManager();
instance.loadVPNList(context);
}
SharedPreferences prefs = Preferences.getDefaultSharedPreferences(context);
String uuid = prefs.getString("alwaysOnVpn", null);
<DeepExtract>
if (tmpprofile != null && tmp... | Cake-VPN | positive | 1,767 |
@Override
public void onTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
if (mViewWidth < 2) {
mViewWidth = mRecyclerView.getWidth();
}
switch(motionEvent.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
{
actionDown(motionEvent);
break;
}
case MotionEvent.ACTION_CANCEL:
{
actionCancel();
break;
}
case MotionEv... | @Override
public void onTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
<DeepExtract>
if (mViewWidth < 2) {
mViewWidth = mRecyclerView.getWidth();
}
switch(motionEvent.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
{
actionDown(motionEvent);
break;
}
case MotionEvent.ACTION_CANCEL:
{
actionCancel();
break;
}... | Keep | positive | 1,768 |
@NotNull
default PagedRestAction<List<GalleryElement>> getSelfFavorites() {
return getUserGalleryFavorites("me", FavoriteSort.NEWEST);
} | @NotNull
default PagedRestAction<List<GalleryElement>> getSelfFavorites() {
<DeepExtract>
return getUserGalleryFavorites("me", FavoriteSort.NEWEST);
</DeepExtract>
} | Jmgur | positive | 1,769 |
@Override
public void release() {
mCurrentMediaPlayer.reset();
mIsInitialized = false;
mCurrentMediaPlayer.release();
if (mNextMediaPlayer != null) {
mNextMediaPlayer.release();
}
} | @Override
public void release() {
<DeepExtract>
mCurrentMediaPlayer.reset();
mIsInitialized = false;
</DeepExtract>
mCurrentMediaPlayer.release();
if (mNextMediaPlayer != null) {
mNextMediaPlayer.release();
}
} | RandomPlayer | positive | 1,770 |
private CompositeServletContextListener createCompositeListener(VaadinServletContext context) {
CompositeServletContextListener compositeListener = new CompositeServletContextListener();
listeners.add(new LookupInitializerListener());
listeners.add(new VaadinAppShellContextListener());
ApplicationRouteRegistry registry... | private CompositeServletContextListener createCompositeListener(VaadinServletContext context) {
CompositeServletContextListener compositeListener = new CompositeServletContextListener();
listeners.add(new LookupInitializerListener());
listeners.add(new VaadinAppShellContextListener());
ApplicationRouteRegistry registry... | spring | positive | 1,771 |
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
mCurrentItemOffset += dx;
if (mOnePageWidth <= 0)
return;
boolean pageChanged = false;
if (Math.abs(mCurrentItemOffset - mCurrentItemPos * mOnePageWidth) >= mOnePageWidth) {
pageChanged = true;
}
if (pa... | @Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
mCurrentItemOffset += dx;
if (mOnePageWidth <= 0)
return;
boolean pageChanged = false;
if (Math.abs(mCurrentItemOffset - mCurrentItemPos * mOnePageWidth) >= mOnePageWidth) {
pageChanged = true;
}
if (pa... | KotlinMVPRxJava2Dagger2GreenDaoRetrofitDemo | positive | 1,772 |
@Override
public FileHandle resolve(String fileName) {
switch(this) {
case CLASSPATH:
return Gdx.files.classpath(fileName);
case INTERNAL:
return Gdx.files.internal(fileName);
case LOCAL:
return Gdx.files.local(fileName);
case EXTERNAL:
return Gdx.files.external(fileName);
case ABSOLUTE:
return Gdx.files.absolute(fileN... | @Override
public FileHandle resolve(String fileName) {
<DeepExtract>
switch(this) {
case CLASSPATH:
return Gdx.files.classpath(fileName);
case INTERNAL:
return Gdx.files.internal(fileName);
case LOCAL:
return Gdx.files.local(fileName);
case EXTERNAL:
return Gdx.files.external(fileName);
case ABSOLUTE:
return Gdx.files.... | RuinsOfRevenge | positive | 1,773 |
@Bean
public DataSource clickHouseOnRecordDataSource(@Value("${graphouse.clickhouse.hosts}") String hostsString, @Value("${graphouse.clickhouse.port}") int port, @Value("${graphouse.clickhouse.db}") String db, @Value("${graphouse.on-record-tree.clickhouse.pool.max-life-time-seconds}") long maxLifeTimeSeconds, @Value("$... | @Bean
public DataSource clickHouseOnRecordDataSource(@Value("${graphouse.clickhouse.hosts}") String hostsString, @Value("${graphouse.clickhouse.port}") int port, @Value("${graphouse.clickhouse.db}") String db, @Value("${graphouse.on-record-tree.clickhouse.pool.max-life-time-seconds}") long maxLifeTimeSeconds, @Value("$... | graphouse | positive | 1,774 |
private void push(int insertKey, V insertValue, int index1, int key1, int index2, int key2, int index3, int key3) {
int[] keyTable = this.keyTable;
V[] valueTable = this.valueTable;
int mask = this.mask;
int i = 0, pushIterations = this.pushIterations;
int i = 0, pushIterations = this.pushIterations;
do {
switch(MathUt... | private void push(int insertKey, V insertValue, int index1, int key1, int index2, int key2, int index3, int key3) {
int[] keyTable = this.keyTable;
V[] valueTable = this.valueTable;
int mask = this.mask;
int i = 0, pushIterations = this.pushIterations;
int i = 0, pushIterations = this.pushIterations;
do {
switch(MathUt... | NanoUI-win32 | positive | 1,776 |
public int getCountCustomer() {
database = dbHelper.getWritableDatabase();
Cursor cursor = database.query(dbHelper.TABLE_CT_NAME, null, null, null, null, null, null);
cursor.moveToFirst();
database.close();
if (cursor.getCount() > 0) {
return cursor.getCount();
} else
return 0;
} | public int getCountCustomer() {
database = dbHelper.getWritableDatabase();
Cursor cursor = database.query(dbHelper.TABLE_CT_NAME, null, null, null, null, null, null);
cursor.moveToFirst();
<DeepExtract>
database.close();
</DeepExtract>
if (cursor.getCount() > 0) {
return cursor.getCount();
} else
return 0;
} | Android-POS | positive | 1,777 |
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options, ImageSize targetSize, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
if (configuration == null) {
throw new IllegalStateException(ERROR_NOT_INIT);
}
if (imageAware == null) {
throw new IllegalArgume... | public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options, ImageSize targetSize, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
<DeepExtract>
if (configuration == null) {
throw new IllegalStateException(ERROR_NOT_INIT);
}
</DeepExtract>
if (imageAware == nu... | Android-Universal-Image-Loader | positive | 1,778 |
public static String getMimeTypeFromUrl(String url) {
return MimeTypeMap.getSingleton().getMimeTypeFromExtension(getFileExtensionFromUrl(url));
} | public static String getMimeTypeFromUrl(String url) {
<DeepExtract>
return MimeTypeMap.getSingleton().getMimeTypeFromExtension(getFileExtensionFromUrl(url));
</DeepExtract>
} | YCWebView | positive | 1,779 |
public static BigDecimal getTimestampWithMicroPrecision() {
if (TimeUtil.secondsOffset == null) {
calibrateNanosConversion();
} else {
long currentMillis1 = System.currentTimeMillis();
long currentNanos = System.nanoTime();
long currentMillis2 = System.currentTimeMillis();
BigDecimal currentTimeStamp = DecimalTimeUnit.... | public static BigDecimal getTimestampWithMicroPrecision() {
<DeepExtract>
if (TimeUtil.secondsOffset == null) {
calibrateNanosConversion();
} else {
long currentMillis1 = System.currentTimeMillis();
long currentNanos = System.nanoTime();
long currentMillis2 = System.currentTimeMillis();
BigDecimal currentTimeStamp = De... | funf-core-android | positive | 1,780 |
public Single<PagedResponse<Transaction>> listTransactionsRx(@NonNull String accountId, @NonNull PaginationParams paginationParams, @Nullable ExpandField... expandOptions) {
return transactionsApi.listTransactions(accountId, toValueSet(paginationParams.toQueryMap()), toValueSet(expandOptions).toQueryMap());
} | public Single<PagedResponse<Transaction>> listTransactionsRx(@NonNull String accountId, @NonNull PaginationParams paginationParams, @Nullable ExpandField... expandOptions) {
<DeepExtract>
return transactionsApi.listTransactions(accountId, toValueSet(paginationParams.toQueryMap()), toValueSet(expandOptions).toQueryMap()... | coinbase-java | positive | 1,781 |
@Override
public void onErrorResponse(VolleyError volleyError) {
if (ingreso == 0) {
cargarWebService(resultadoId, getString(R.string.ip2));
ingreso = 1;
} else {
if (ingreso == 1) {
cargarWebService(resultadoId, getString(R.string.ip3));
ingreso = 2;
} else {
txtinfo.setText("No se pudo establecer conexión con el ser... | @Override
public void onErrorResponse(VolleyError volleyError) {
<DeepExtract>
if (ingreso == 0) {
cargarWebService(resultadoId, getString(R.string.ip2));
ingreso = 1;
} else {
if (ingreso == 1) {
cargarWebService(resultadoId, getString(R.string.ip3));
ingreso = 2;
} else {
txtinfo.setText("No se pudo establecer conexi... | curso-android-codejavu | positive | 1,782 |
public void setVisible(boolean isVisible) {
if (isVisible)
penColour = (int) Math.abs(penColour);
else
penColour = -(int) (Math.abs(penColour));
if (penColour < 1)
visible = false;
else
visible = true;
} | public void setVisible(boolean isVisible) {
if (isVisible)
penColour = (int) Math.abs(penColour);
else
penColour = -(int) (Math.abs(penColour));
<DeepExtract>
if (penColour < 1)
visible = false;
else
visible = true;
</DeepExtract>
} | dxf2svg | positive | 1,783 |
@Test
public void testStoreSportTypeList() throws STException {
SportTypeList sportTypes = storage.readSportTypeList("misc/testdata/sport-types-valid.xml", SPEED_MODE);
storage.storeSportTypeList(sportTypes, SPORTTYPES_WRITETEST_XML);
SportTypeList sportTypesNew = storage.readSportTypeList(SPORTTYPES_WRITETEST_XML, SPE... | @Test
public void testStoreSportTypeList() throws STException {
SportTypeList sportTypes = storage.readSportTypeList("misc/testdata/sport-types-valid.xml", SPEED_MODE);
storage.storeSportTypeList(sportTypes, SPORTTYPES_WRITETEST_XML);
SportTypeList sportTypesNew = storage.readSportTypeList(SPORTTYPES_WRITETEST_XML, SPE... | sportstracker | positive | 1,784 |
public static void main(String[] args) {
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
int n = iRead(br);
for (int i = 0; i < n; i++) {
unitSolution(br);
}
} catch (IOException ie) {
ie.printStackTrace();
}
} | public static void main(String[] args) {
<DeepExtract>
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
int n = iRead(br);
for (int i = 0; i < n; i++) {
unitSolution(br);
}
} catch (IOException ie) {
ie.printStackTrace();
}
</DeepExtract>
} | Study-Book | positive | 1,785 |
public Criteria andPAddressNotBetween(String value1, String value2) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "pAddress" + " cannot be null");
}
criteria.add(new Criterion("p_address not between", value1, value2));
return (Criteria) this;
} | public Criteria andPAddressNotBetween(String value1, String value2) {
<DeepExtract>
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "pAddress" + " cannot be null");
}
criteria.add(new Criterion("p_address not between", value1, value2));
</DeepExtract>
return (Criteria) this;
} | webike | positive | 1,786 |
@Override
synchronized public Socket accept() throws IOException {
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, "entered accept()");
Socket sock = new Socket();
implAccept(sock);
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, "Socket connected to client: " + sock.getInetAddress().getHostAddress() + ", port: " + soc... | @Override
synchronized public Socket accept() throws IOException {
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, "entered accept()");
Socket sock = new Socket();
implAccept(sock);
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, "Socket connected to client: " + sock.getInetAddress().getHostAddress() + ", port: " + soc... | wolfssljni | positive | 1,787 |
public static int getBlockSize_Log2() {
final String property = AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty("prism.marlin.blockSize_log2"));
int value = 5;
if (property != null) {
try {
value = Integer.decode(property);
} catch (NumberFormatException e) {
logInfo("Invalid integer v... | public static int getBlockSize_Log2() {
<DeepExtract>
final String property = AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty("prism.marlin.blockSize_log2"));
int value = 5;
if (property != null) {
try {
value = Integer.decode(property);
} catch (NumberFormatException e) {
logInfo("Inv... | marlin-fx | positive | 1,788 |
public void crop(final ImagePlus in, final int channel, final ByteProcessor mask, final float[] fwdTransform) {
final ImageProcessor[] inProcessors = new ImageProcessor[in.getStackSize()];
for (int z = 0; z < inProcessors.length; z++) inProcessors[z] = in.getStack().getProcessor(z + 1);
final int wIn = in.getWidth();
f... | public void crop(final ImagePlus in, final int channel, final ByteProcessor mask, final float[] fwdTransform) {
final ImageProcessor[] inProcessors = new ImageProcessor[in.getStackSize()];
for (int z = 0; z < inProcessors.length; z++) inProcessors[z] = in.getStack().getProcessor(z + 1);
final int wIn = in.getWidth();
f... | 3Dscript | positive | 1,789 |
@Test
public void testDeletedJobsListException() throws IOException {
Routes.initParams();
req = mock(Request.class);
res = mock(Response.class);
qs = mock(DruidQueryService.class);
ds = mock(DetectorService.class);
jes = mock(JobExecutionService.class);
sf = mock(ServiceFactory.class);
ss = mock(SchedulerService.class... | @Test
public void testDeletedJobsListException() throws IOException {
Routes.initParams();
req = mock(Request.class);
res = mock(Response.class);
qs = mock(DruidQueryService.class);
ds = mock(DetectorService.class);
jes = mock(JobExecutionService.class);
sf = mock(ServiceFactory.class);
ss = mock(SchedulerService.class... | sherlock | positive | 1,790 |
@Override
public long decrementAndGet(byte[] key) {
ByteString keyByteStr = copyFrom(key);
return addAndGet(keyByteStr, -1);
} | @Override
public long decrementAndGet(byte[] key) {
<DeepExtract>
ByteString keyByteStr = copyFrom(key);
return addAndGet(keyByteStr, -1);
</DeepExtract>
} | dkv | positive | 1,791 |
public static void populateSurvey(Survey survey, String string) throws JSONException, ParseException {
JSONObject json = new JSONObject(string);
errors = false;
String name = json.getString(SURVEY_NAME_TAG);
if (!survey.getName().equals(name)) {
Log.e("This is weird; the survey name in the file is different to the file... | public static void populateSurvey(Survey survey, String string) throws JSONException, ParseException {
JSONObject json = new JSONObject(string);
<DeepExtract>
errors = false;
String name = json.getString(SURVEY_NAME_TAG);
if (!survey.getName().equals(name)) {
Log.e("This is weird; the survey name in the file is differe... | sexytopo | positive | 1,792 |
public void reverseAdd(E obj) {
ListIterator<E> iter = theList.listIterator(theList.size());
while (iter.hasPrevious()) {
if (obj.compareTo(iter.previous()) > 0) {
iter.next();
iter.add(obj);
return;
}
}
ListIterator<E> iter = theList.listIterator();
while (iter.hasNext()) {
if (obj.compareTo(iter.next()) < 0) {
iter.p... | public void reverseAdd(E obj) {
ListIterator<E> iter = theList.listIterator(theList.size());
while (iter.hasPrevious()) {
if (obj.compareTo(iter.previous()) > 0) {
iter.next();
iter.add(obj);
return;
}
}
<DeepExtract>
ListIterator<E> iter = theList.listIterator();
while (iter.hasNext()) {
if (obj.compareTo(iter.next())... | Data-Structures | positive | 1,793 |
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
presenterLifeCycleLinker.initializeLifeCycle(this, this);
} | @Override
<DeepExtract>
</DeepExtract>
public void onViewCreated(View view, Bundle savedInstanceState) {
<DeepExtract>
</DeepExtract>
super.onViewCreated(view, savedInstanceState);
<DeepExtract>
</DeepExtract>
presenterLifeCycleLinker.initializeLifeCycle(this, this);
<DeepExtract>
</DeepExtract>
} | Rosie | positive | 1,794 |
public static <T extends Enum<?>> T getEnum(final Config config, final String section, final String subsection, final String setting, final T defaultValue) {
T[] all;
try {
all = (T[]) defaultValue.getClass().getMethod("values").invoke(null);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Ca... | public static <T extends Enum<?>> T getEnum(final Config config, final String section, final String subsection, final String setting, final T defaultValue) {
<DeepExtract>
T[] all;
try {
all = (T[]) defaultValue.getClass().getMethod("values").invoke(null);
} catch (IllegalArgumentException e) {
throw new IllegalArgumen... | mini-git-server | positive | 1,795 |
@Test
public void testCdcProcessingStatusService() {
testHelper.prepareBinlogEntryHandlerEventAssertion(binlogEntryReader, event -> {
onEventSent(event);
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
});
testHelper.runInSeparateThread(binlogEntryReader::start);
for (int i ... | @Test
public void testCdcProcessingStatusService() {
testHelper.prepareBinlogEntryHandlerEventAssertion(binlogEntryReader, event -> {
onEventSent(event);
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
});
testHelper.runInSeparateThread(binlogEntryReader::start);
for (int i ... | eventuate-cdc | positive | 1,796 |
public void visit(OWLSubAnnotationPropertyOfAxiom axiom) {
if (!axiom.getSubProperty().isAnonymous()) {
referencedEntities.add(axiom.getSubProperty().asOWLClass());
}
} | public void visit(OWLSubAnnotationPropertyOfAxiom axiom) {
<DeepExtract>
if (!axiom.getSubProperty().isAnonymous()) {
referencedEntities.add(axiom.getSubProperty().asOWLClass());
}
</DeepExtract>
} | protege-server | positive | 1,797 |
@CheckResult
@NonNull
public static GlideOptions placeholderOf(@Nullable Drawable drawable) {
return (GlideOptions) super.placeholder(drawable);
} | @CheckResult
@NonNull
public static GlideOptions placeholderOf(@Nullable Drawable drawable) {
<DeepExtract>
return (GlideOptions) super.placeholder(drawable);
</DeepExtract>
} | easy_mvp | positive | 1,798 |
@Override
public void saveAutofillDatasets(List<DatasetWithFilledAutofillFields> datasetsWithFilledAutofillFields) {
mAppExecutors.diskIO().execute(() -> {
for (DatasetWithFilledAutofillFields datasetWithFilledAutofillFields : datasetsWithFilledAutofillFields) {
List<FilledAutofillField> filledAutofillFields = datasetW... | @Override
public void saveAutofillDatasets(List<DatasetWithFilledAutofillFields> datasetsWithFilledAutofillFields) {
mAppExecutors.diskIO().execute(() -> {
for (DatasetWithFilledAutofillFields datasetWithFilledAutofillFields : datasetsWithFilledAutofillFields) {
List<FilledAutofillField> filledAutofillFields = datasetW... | input-samples | positive | 1,799 |
private void writeIndexBlock(List<SSTablePage> pageList) {
int indexPageCount = 0;
int indexRecordCount = 0;
if (this.indexPage == null) {
this.indexPage = this.indexBlock.newPage();
}
for (SSTablePage page : pageList) {
byte[] pageBytes = toPageRecord(page);
indexRecordCount++;
if (this.indexPage.write(pageBytes) == B... | private void writeIndexBlock(List<SSTablePage> pageList) {
int indexPageCount = 0;
int indexRecordCount = 0;
<DeepExtract>
if (this.indexPage == null) {
this.indexPage = this.indexBlock.newPage();
}
</DeepExtract>
for (SSTablePage page : pageList) {
byte[] pageBytes = toPageRecord(page);
indexRecordCount++;
if (this.in... | corejava | positive | 1,800 |
@Override
public void paintComponent(Graphics g) {
setOpaque(false);
super.paintComponent(g);
(Graphics2D) g.setColor(fg);
(Graphics2D) g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
int wp = (int) (getWidth() * dispProgress), h = getHeight();
Polygon p = new Polygon(new int[] {... | @Override
public void paintComponent(Graphics g) {
setOpaque(false);
super.paintComponent(g);
<DeepExtract>
(Graphics2D) g.setColor(fg);
(Graphics2D) g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
int wp = (int) (getWidth() * dispProgress), h = getHeight();
Polygon p = new Polyg... | GIFKR | positive | 1,801 |
public Matrix4 toNormalMatrix() {
val[M03] = 0;
val[M13] = 0;
val[M23] = 0;
tmp[M00] = val[M00];
tmp[M01] = val[M10];
tmp[M02] = val[M20];
tmp[M03] = val[M30];
tmp[M10] = val[M01];
tmp[M11] = val[M11];
tmp[M12] = val[M21];
tmp[M13] = val[M31];
tmp[M20] = val[M02];
tmp[M21] = val[M12];
tmp[M22] = val[M22];
tmp[M23] = va... | public Matrix4 toNormalMatrix() {
val[M03] = 0;
val[M13] = 0;
val[M23] = 0;
<DeepExtract>
tmp[M00] = val[M00];
tmp[M01] = val[M10];
tmp[M02] = val[M20];
tmp[M03] = val[M30];
tmp[M10] = val[M01];
tmp[M11] = val[M11];
tmp[M12] = val[M21];
tmp[M13] = val[M31];
tmp[M20] = val[M02];
tmp[M21] = val[M12];
tmp[M22] = val[M22];... | SCW | positive | 1,802 |
private void launch() {
Location location = player.getLocation();
for (Entity entity : targetentities.keySet()) {
double dx, dy, dz;
Location target = entity.getLocation().clone();
dx = target.getX() - location.getX();
dy = target.getY() - location.getY();
dz = target.getZ() - location.getZ();
Vector vector = new Vecto... | private void launch() {
Location location = player.getLocation();
for (Entity entity : targetentities.keySet()) {
double dx, dy, dz;
Location target = entity.getLocation().clone();
dx = target.getX() - location.getX();
dy = target.getY() - location.getY();
dz = target.getZ() - location.getZ();
Vector vector = new Vecto... | MinecraftTLA | positive | 1,803 |
public static Gesture rightClickMouse() {
return sequence(pressMouse(BUTTON2), pause(MID_MOUSE_CLICK_DELAY), releaseMouse(BUTTON2));
} | public static Gesture rightClickMouse() {
<DeepExtract>
return sequence(pressMouse(BUTTON2), pause(MID_MOUSE_CLICK_DELAY), releaseMouse(BUTTON2));
</DeepExtract>
} | goos | positive | 1,804 |
@Override
public void handleArrowAction(Snipe snipe) {
Block targetBlock = getTargetBlock();
ToolkitProperties toolkitProperties = snipe.getToolkitProperties();
int brushSize = toolkitProperties.getBrushSize();
Painters.sphere().center(targetBlock).radius(brushSize).trueCircle(this.trueCircle).blockSetter(position -> {... | @Override
public void handleArrowAction(Snipe snipe) {
Block targetBlock = getTargetBlock();
<DeepExtract>
ToolkitProperties toolkitProperties = snipe.getToolkitProperties();
int brushSize = toolkitProperties.getBrushSize();
Painters.sphere().center(targetBlock).radius(brushSize).trueCircle(this.trueCircle).blockSetter... | FastAsyncVoxelSniper | positive | 1,805 |
@Override
public void setPinData(int pin, int pinMode, int data) {
DataPackage.Builder b = new DataPackage.Builder().setPin(pin).setPinMode(pinMode).setData(data);
switch(pinMode) {
case Common.DUO_PIN_MODE_DIGITAL_WRITE:
b.setCommand("T");
break;
case Common.DUO_PIN_MODE_PWM:
b.setCommand("N");
break;
case Common.DUO_... | @Override
public void setPinData(int pin, int pinMode, int data) {
DataPackage.Builder b = new DataPackage.Builder().setPin(pin).setPinMode(pinMode).setData(data);
switch(pinMode) {
case Common.DUO_PIN_MODE_DIGITAL_WRITE:
b.setCommand("T");
break;
case Common.DUO_PIN_MODE_PWM:
b.setCommand("N");
break;
case Common.DUO_... | Duo | positive | 1,806 |
public Criteria andIsLostNotEqualTo(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "isLost" + " cannot be null");
}
criteria.add(new Criterion("is_lost <>", value));
return (Criteria) this;
} | public Criteria andIsLostNotEqualTo(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "isLost" + " cannot be null");
}
criteria.add(new Criterion("is_lost <>", value));
</DeepExtract>
return (Criteria) this;
} | BookLibrarySystem | positive | 1,808 |
public Builder<T> maxLevel(int maxLevel) {
this.maxLevel = maxLevel;
return this;
} | public Builder<T> maxLevel(int maxLevel) {
<DeepExtract>
this.maxLevel = maxLevel;
</DeepExtract>
return this;
} | Zenchantments | positive | 1,809 |
public static int getWorkExecuteMaxAtGivenTime() {
try {
return config.getInt("work.execute.maxAtGivenTime");
} catch (Exception e) {
return 10;
}
} | public static int getWorkExecuteMaxAtGivenTime() {
<DeepExtract>
try {
return config.getInt("work.execute.maxAtGivenTime");
} catch (Exception e) {
return 10;
}
</DeepExtract>
} | Sql4D | positive | 1,811 |
@Test
public void flipPolygonTest() {
Polygon polygon = Polygon.fromPoints(Vector3d.xy(1, 1), Vector3d.xy(2, 1), Vector3d.xy(1, 2));
Assert.assertEquals(Vector3d.z(1).getX(), polygon.getPlane().getNormal().getX(), EPSILON);
Assert.assertEquals(Vector3d.z(1).getY(), polygon.getPlane().getNormal().getY(), EPSILON);
Asser... | @Test
public void flipPolygonTest() {
Polygon polygon = Polygon.fromPoints(Vector3d.xy(1, 1), Vector3d.xy(2, 1), Vector3d.xy(1, 2));
Assert.assertEquals(Vector3d.z(1).getX(), polygon.getPlane().getNormal().getX(), EPSILON);
Assert.assertEquals(Vector3d.z(1).getY(), polygon.getPlane().getNormal().getY(), EPSILON);
Asser... | JCSG | positive | 1,812 |
private static void analysisSocial(String sampleDir, String sampleName, String networkFilename, String type, Integer granularity) {
if (TOPIC_NAME != null) {
sampleName += ("_" + TOPIC_NAME);
}
BookmarkReader trainReader = new BookmarkReader(-1, false);
trainReader.readFile(sampleName + "_train");
TRAIN_SIZE = trainRea... | private static void analysisSocial(String sampleDir, String sampleName, String networkFilename, String type, Integer granularity) {
<DeepExtract>
if (TOPIC_NAME != null) {
sampleName += ("_" + TOPIC_NAME);
}
BookmarkReader trainReader = new BookmarkReader(-1, false);
trainReader.readFile(sampleName + "_train");
TRAIN_S... | TagRec | positive | 1,813 |
public Criteria andContentIn(List<String> values) {
if (values == null) {
throw new RuntimeException("Value for " + "content" + " cannot be null");
}
criteria.add(new Criterion("content in", values));
return (Criteria) this;
} | public Criteria andContentIn(List<String> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "content" + " cannot be null");
}
criteria.add(new Criterion("content in", values));
</DeepExtract>
return (Criteria) this;
} | webim | positive | 1,814 |
protected Edge parseEdge(StringTokenizer tokenizer, int vertexId) {
int neighborId = Integer.parseInt(tokenizer.nextToken());
int neighborIdx = neighborId;
if (isEdgeLabelled) {
int edgeLabel = Integer.parseInt(tokenizer.nextToken());
edge = createEdge(vertexId, neighborIdx, edgeLabel);
} else {
edge = createEdge(verte... | protected Edge parseEdge(StringTokenizer tokenizer, int vertexId) {
int neighborId = Integer.parseInt(tokenizer.nextToken());
int neighborIdx = neighborId;
if (isEdgeLabelled) {
int edgeLabel = Integer.parseInt(tokenizer.nextToken());
edge = createEdge(vertexId, neighborIdx, edgeLabel);
} else {
edge = createEdge(verte... | fractal | positive | 1,815 |
private void ALU8BitXor(int value) {
reg_F = 0;
reg_A = reg_A ^ value;
if ((reg_A & 0x0080) != 0)
setS();
else
resetS();
if (reg_A == 0)
setZ();
else
resetZ();
if (PARITY_TABLE[reg_A])
setPV();
else
resetPV();
reg_A = reg_A & 0x28;
reg_F = reg_F & 0xD7;
reg_F = reg_F | reg_A;
} | private void ALU8BitXor(int value) {
reg_F = 0;
reg_A = reg_A ^ value;
if ((reg_A & 0x0080) != 0)
setS();
else
resetS();
if (reg_A == 0)
setZ();
else
resetZ();
if (PARITY_TABLE[reg_A])
setPV();
else
resetPV();
<DeepExtract>
reg_A = reg_A & 0x28;
reg_F = reg_F & 0xD7;
reg_F = reg_F | reg_A;
</DeepExtract>
} | mdlz80optimizer | positive | 1,816 |
@Override
public void initData() {
this.room = uid;
LogUtils.d("room");
anchorInfoFragment.onUpdateAnchor(uid);
viewPagerFragmentAdapter.notifyDataSetChanged();
} | @Override
public void initData() {
<DeepExtract>
this.room = uid;
LogUtils.d("room");
anchorInfoFragment.onUpdateAnchor(uid);
viewPagerFragmentAdapter.notifyDataSetChanged();
</DeepExtract>
} | KingTV | positive | 1,817 |
public List<InputMethodSubtype> getMyEnabledInputMethodSubtypeList(boolean allowsImplicitlySelectedSubtypes) {
final HashMap<InputMethodInfo, List<InputMethodSubtype>> cache = allowsImplicitlySelectedSubtypes ? mCachedSubtypeListWithImplicitlySelected : mCachedSubtypeListOnlyExplicitlySelected;
final List<InputMethodSu... | public List<InputMethodSubtype> getMyEnabledInputMethodSubtypeList(boolean allowsImplicitlySelectedSubtypes) {
<DeepExtract>
final HashMap<InputMethodInfo, List<InputMethodSubtype>> cache = allowsImplicitlySelectedSubtypes ? mCachedSubtypeListWithImplicitlySelected : mCachedSubtypeListOnlyExplicitlySelected;
final List... | LokiBoard-Android-Keylogger | positive | 1,818 |
@Override
public void onClick(DialogInterface dialog, int whichButton) {
mAccountDb.delete(user);
ArrayList<String> usernames = new ArrayList<String>();
mAccountDb.getNames(usernames);
int userCount = usernames.size();
if (userCount > 0) {
boolean newListRequired = true || mUsers.length != userCount;
if (newListRequire... | @Override
public void onClick(DialogInterface dialog, int whichButton) {
mAccountDb.delete(user);
<DeepExtract>
ArrayList<String> usernames = new ArrayList<String>();
mAccountDb.getNames(usernames);
int userCount = usernames.size();
if (userCount > 0) {
boolean newListRequired = true || mUsers.length != userCount;
if (... | glassauth | positive | 1,819 |
public List<InvestmentSummary> getAllInvestments() {
Configuration configuration = new Configuration();
configuration.configure();
StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder().applySettings(configuration.getProperties());
SessionFactory sessionfactory = configuration.buildSessionFactory... | public List<InvestmentSummary> getAllInvestments() {
<DeepExtract>
Configuration configuration = new Configuration();
configuration.configure();
StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder().applySettings(configuration.getProperties());
SessionFactory sessionfactory = configuration.build... | primefaces-blueprints | positive | 1,820 |
@Override
public void onClick(View v) {
dismiss();
} | @Override
public void onClick(View v) {
<DeepExtract>
dismiss();
</DeepExtract>
} | rich-text-android | positive | 1,821 |
private void handleException(DvbException e) {
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
Collection<UsbDevice> availableDevices = manager.getDeviceList().values();
int[] productIds = new int[availableDevices.size()];
int[] vendorIds = new int[availableDevices.size()];
int id = 0;
for (Usb... | private void handleException(DvbException e) {
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
Collection<UsbDevice> availableDevices = manager.getDeviceList().values();
int[] productIds = new int[availableDevices.size()];
int[] vendorIds = new int[availableDevices.size()];
int id = 0;
for (Usb... | AndroidDvbDriver | positive | 1,822 |
public static void putWikiPage(@NonNull CloseableHttpClient httpclient, @NonNull String pagename, String content, @NonNull HashMap<String, String> formfields) throws Exception {
if (!formfields.containsKey("token")) {
throw new WikiException(R.string.wiki_error_protected);
}
HttpPost httppost = new HttpPost(WIKI_API_UR... | public static void putWikiPage(@NonNull CloseableHttpClient httpclient, @NonNull String pagename, String content, @NonNull HashMap<String, String> formfields) throws Exception {
if (!formfields.containsKey("token")) {
throw new WikiException(R.string.wiki_error_protected);
}
HttpPost httppost = new HttpPost(WIKI_API_UR... | geohashdroid | positive | 1,823 |
private FileVertex makeFile(final FramedGraph graph, String name) {
final VertexType vertex = graph.addFramedVertex(FileVertex.class);
vertex.setName(name);
return vertex;
} | private FileVertex makeFile(final FramedGraph graph, String name) {
<DeepExtract>
final VertexType vertex = graph.addFramedVertex(FileVertex.class);
vertex.setName(name);
return vertex;
</DeepExtract>
} | Ferma | positive | 1,824 |
public void handleControlKey(boolean down) {
if (down) {
mControlKey.onPress();
} else {
mControlKey.onRelease();
}
mCursorMode = getCursorModeHelper(mCapKey, TextRenderer.MODE_SHIFT_SHIFT) | getCursorModeHelper(mAltKey, TextRenderer.MODE_ALT_SHIFT) | getCursorModeHelper(mControlKey, TextRenderer.MODE_CTRL_SHIFT) | get... | public void handleControlKey(boolean down) {
if (down) {
mControlKey.onPress();
} else {
mControlKey.onRelease();
}
<DeepExtract>
mCursorMode = getCursorModeHelper(mCapKey, TextRenderer.MODE_SHIFT_SHIFT) | getCursorModeHelper(mAltKey, TextRenderer.MODE_ALT_SHIFT) | getCursorModeHelper(mControlKey, TextRenderer.MODE_CTR... | FloatingTerminalEmulator-Android | positive | 1,825 |
public boolean exists(Path path) throws FsException {
return execute(false, (shell, fs) -> fs.exists(fsPath(path)));
} | public boolean exists(Path path) throws FsException {
<DeepExtract>
return execute(false, (shell, fs) -> fs.exists(fsPath(path)));
</DeepExtract>
} | fsbrowser | positive | 1,826 |
@Override
public void setQueryID(String queryID) {
this.queryID = queryID;
resultPreAnnotation.put("queryId", queryID);
} | @Override
public void setQueryID(String queryID) {
this.queryID = queryID;
<DeepExtract>
resultPreAnnotation.put("queryId", queryID);
</DeepExtract>
} | BlastGraph | positive | 1,827 |
public void visit_FLOAT_FLOOR(Instruction instr, PcodeOp pcode) throws VisitorUnimplementedException {
TVLBitVector result = new TVLBitVector(new GhidraSizeAdapter(pcode.getOutput().getSize()));
AbstractState.Associate(pcode.getOutput(), result);
} | public void visit_FLOAT_FLOOR(Instruction instr, PcodeOp pcode) throws VisitorUnimplementedException {
<DeepExtract>
TVLBitVector result = new TVLBitVector(new GhidraSizeAdapter(pcode.getOutput().getSize()));
AbstractState.Associate(pcode.getOutput(), result);
</DeepExtract>
} | GhidraPAL | positive | 1,828 |
public synchronized void setRecentlyViewed(final List<? extends DictEntry> notepadItems) {
if (!prefs.edit().putString(KEY_RECENTLY_VIEWED_ITEMS, DictEntry.toExternalList(notepadItems)).commit()) {
throw new IllegalStateException("Failed to commit new SharedPreferences value");
}
} | public synchronized void setRecentlyViewed(final List<? extends DictEntry> notepadItems) {
<DeepExtract>
if (!prefs.edit().putString(KEY_RECENTLY_VIEWED_ITEMS, DictEntry.toExternalList(notepadItems)).commit()) {
throw new IllegalStateException("Failed to commit new SharedPreferences value");
}
</DeepExtract>
} | aedict | positive | 1,829 |
public Criteria andBz112GreaterThanOrEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "bz112" + " cannot be null");
}
criteria.add(new Criterion("`bz112` >=", value));
return (Criteria) this;
} | public Criteria andBz112GreaterThanOrEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "bz112" + " cannot be null");
}
criteria.add(new Criterion("`bz112` >=", value));
</DeepExtract>
return (Criteria) this;
} | blockhealth | positive | 1,830 |
private int readFrame(int stackMap, boolean zip, boolean unzip, Context frame) {
char[] c = frame.buffer;
Label[] labels = frame.labels;
if (zip) {
tag = b[stackMap++] & 0xFF;
} else {
tag = MethodWriter.FULL_FRAME;
frame.offset = -1;
}
frame.localDiff = 0;
if (tag < MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME) {
delta... | private int readFrame(int stackMap, boolean zip, boolean unzip, Context frame) {
char[] c = frame.buffer;
Label[] labels = frame.labels;
if (zip) {
tag = b[stackMap++] & 0xFF;
} else {
tag = MethodWriter.FULL_FRAME;
frame.offset = -1;
}
frame.localDiff = 0;
if (tag < MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME) {
delta... | qiuyj-code | positive | 1,831 |
public AuthTokenVO mapRefreshToken(RefreshTokenEntity refreshToken) {
String clientId = refreshToken.getClientId();
Long authHolderId = refreshToken.getAuthHolderId();
AuthTokenVO tokenVO = new AuthTokenVO();
BeanUtils.copyProperties(refreshToken, tokenVO);
if (clientId != null) {
tokenVO.setClientName(clientId);
}
if ... | public AuthTokenVO mapRefreshToken(RefreshTokenEntity refreshToken) {
String clientId = refreshToken.getClientId();
Long authHolderId = refreshToken.getAuthHolderId();
<DeepExtract>
AuthTokenVO tokenVO = new AuthTokenVO();
BeanUtils.copyProperties(refreshToken, tokenVO);
if (clientId != null) {
tokenVO.setClientName(cl... | pauth | positive | 1,832 |
public boolean accept(File k) {
if (!k.getAbsolutePath().endsWith(".html"))
return;
String s = getFile(k);
doOneFileStr(s);
return false;
} | public boolean accept(File k) {
<DeepExtract>
if (!k.getAbsolutePath().endsWith(".html"))
return;
String s = getFile(k);
doOneFileStr(s);
</DeepExtract>
return false;
} | MTX_HackerTools | positive | 1,833 |
public static void main(String[] args) {
RuntimeContext.put("name", "Value");
ExecutorService threadPool = Executors.newFixedThreadPool(3);
threadPool.submit(new CallableTask());
} | public static void main(String[] args) {
RuntimeContext.put("name", "Value");
<DeepExtract>
ExecutorService threadPool = Executors.newFixedThreadPool(3);
threadPool.submit(new CallableTask());
</DeepExtract>
} | talos | positive | 1,834 |
@Override
public Long component9() {
return (Long) get(8);
} | @Override
public Long component9() {
<DeepExtract>
return (Long) get(8);
</DeepExtract>
} | wdumper | positive | 1,835 |
public static void setFirstMsgSent(Context context, Boolean flag) {
SharedPreferences.Editor editor = sharedPreferences(context).edit();
editor.putBoolean(IS_FIRST_MSG_SENT, flag);
editor.commit();
} | public static void setFirstMsgSent(Context context, Boolean flag) {
<DeepExtract>
SharedPreferences.Editor editor = sharedPreferences(context).edit();
editor.putBoolean(IS_FIRST_MSG_SENT, flag);
editor.commit();
</DeepExtract>
} | PanicButton | positive | 1,836 |
@Test
public void modifying_an_existing_file_only_triggers_creations_for_new_warnings() throws Exception {
IMarker marker = this.preExistingTestFile.createMarker(IMarker.PROBLEM);
marker.setAttribute(IMarker.MESSAGE, "Unused import java.util.*;");
IMarker marker2 = this.preExistingTestFile.createMarker(IMarker.PROBLEM)... | @Test
public void modifying_an_existing_file_only_triggers_creations_for_new_warnings() throws Exception {
IMarker marker = this.preExistingTestFile.createMarker(IMarker.PROBLEM);
marker.setAttribute(IMarker.MESSAGE, "Unused import java.util.*;");
IMarker marker2 = this.preExistingTestFile.createMarker(IMarker.PROBLEM)... | watchdog | positive | 1,837 |
public Object error() {
return store.get(ERROR);
} | public Object error() {
<DeepExtract>
return store.get(ERROR);
</DeepExtract>
} | japid42 | positive | 1,838 |
public void rumbleBlips(int count) {
RumbleEffect.Builder builder = new RumbleEffect.Builder();
for (int i = 0; i < count; i++) {
builder.addStep(1.0, 0, 250).addStep(0, 0, 100);
}
LedEffect copy = new LedEffect(builder.build().steps, builder.build().repeating);
copy.user = userForEffects;
ledQueue.offer(copy);
} | public void rumbleBlips(int count) {
RumbleEffect.Builder builder = new RumbleEffect.Builder();
for (int i = 0; i < count; i++) {
builder.addStep(1.0, 0, 250).addStep(0, 0, 100);
}
<DeepExtract>
LedEffect copy = new LedEffect(builder.build().steps, builder.build().repeating);
copy.user = userForEffects;
ledQueue.offer(... | virtual_robot | positive | 1,839 |
private void setExpanded(boolean expanded, boolean animate, boolean force) {
return setLiftedState(!expanded);
pendingAction = (expanded ? PENDING_ACTION_EXPANDED : seslGetImmersiveScroll() ? PENDING_ACTION_COLLAPSED_IMM : PENDING_ACTION_COLLAPSED) | (animate ? PENDING_ACTION_ANIMATE_ENABLED : 0) | (force ? PENDING_ACT... | private void setExpanded(boolean expanded, boolean animate, boolean force) {
<DeepExtract>
return setLiftedState(!expanded);
</DeepExtract>
pendingAction = (expanded ? PENDING_ACTION_EXPANDED : seslGetImmersiveScroll() ? PENDING_ACTION_COLLAPSED_IMM : PENDING_ACTION_COLLAPSED) | (animate ? PENDING_ACTION_ANIMATE_ENABLE... | SamsungOneUi | positive | 1,840 |
public void setShimmerAngle(int angle) {
if (angle < MIN_ANGLE_VALUE || MAX_ANGLE_VALUE < angle) {
throw new IllegalArgumentException(String.format("shimmerAngle value must be between %d and %d", MIN_ANGLE_VALUE, MAX_ANGLE_VALUE));
}
this.shimmerAngle = angle;
if (isAnimationStarted) {
resetShimmering();
startShimmerAn... | public void setShimmerAngle(int angle) {
if (angle < MIN_ANGLE_VALUE || MAX_ANGLE_VALUE < angle) {
throw new IllegalArgumentException(String.format("shimmerAngle value must be between %d and %d", MIN_ANGLE_VALUE, MAX_ANGLE_VALUE));
}
this.shimmerAngle = angle;
<DeepExtract>
if (isAnimationStarted) {
resetShimmering();
... | ByRecyclerView | positive | 1,841 |
public static Date add(Date date, int amount, String... pattern) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_MONTH, amount);
if (pattern == null || pattern.length == 0) {
pattern = new String[] { DEFAULT_PATTERN };
}
return parseDate(parseString(calendar.getTime(),... | public static Date add(Date date, int amount, String... pattern) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_MONTH, amount);
if (pattern == null || pattern.length == 0) {
pattern = new String[] { DEFAULT_PATTERN };
}
<DeepExtract>
return parseDate(parseString(calen... | cloud-learning-lite | positive | 1,843 |
public void setDoubleValue(Key<Double> key, double v) {
doubleRegisters.put(key, v);
if (pending) {
return;
}
pending = true;
ThreadUtils.get().schedule(() -> {
pending = false;
try {
doSave();
} catch (Exception e) {
Logger.error("saving config failed", e);
}
}, 1, TimeUnit.SECONDS);
} | public void setDoubleValue(Key<Double> key, double v) {
doubleRegisters.put(key, v);
<DeepExtract>
if (pending) {
return;
}
pending = true;
ThreadUtils.get().schedule(() -> {
pending = false;
try {
doSave();
} catch (Exception e) {
Logger.error("saving config failed", e);
}
}, 1, TimeUnit.SECONDS);
</DeepExtract>
} | Chara | positive | 1,845 |
@PUT
@Path("{nome}")
public void atualizarCerveja(@PathParam("nome") String nome, Cerveja cerveja) {
Cerveja cerveja = estoque.recuperarCervejaPeloNome(nome);
if (cerveja != null)
return cerveja;
throw new WebApplicationException(Status.NOT_FOUND);
cerveja.setNome(nome);
estoque.atualizarCerveja(cerveja);
} | @PUT
@Path("{nome}")
public void atualizarCerveja(@PathParam("nome") String nome, Cerveja cerveja) {
<DeepExtract>
Cerveja cerveja = estoque.recuperarCervejaPeloNome(nome);
if (cerveja != null)
return cerveja;
throw new WebApplicationException(Status.NOT_FOUND);
</DeepExtract>
cerveja.setNome(nome);
estoque.atualizarCe... | rest | positive | 1,846 |
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle state) {
mSettings = new Settings(getActivity());
View root = inflater.inflate(R.layout.fragment_edit_recipe, container, false);
mRootView = root;
root.findViewById(R.id.recipe_stats_layout).setOnClickListener(this);
root.findViewBy... | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle state) {
mSettings = new Settings(getActivity());
View root = inflater.inflate(R.layout.fragment_edit_recipe, container, false);
mRootView = root;
root.findViewById(R.id.recipe_stats_layout).setOnClickListener(this);
root.findViewBy... | BrewShopApp | positive | 1,847 |
public Criteria andFIELD_UPPER_UNDERSCOREGreaterThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "FIELD_UPPER_UNDERSCORE" + " cannot be null");
}
criteria.add(new Criterion("FIELD_UPPER_UNDERSCORE >", value));
return (Criteria) this;
} | public Criteria andFIELD_UPPER_UNDERSCOREGreaterThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "FIELD_UPPER_UNDERSCORE" + " cannot be null");
}
criteria.add(new Criterion("FIELD_UPPER_UNDERSCORE >", value));
</DeepExtract>
return (Criteria) this;
} | mybatis-generator-gui-extension | positive | 1,848 |
public ResCode findValueByNumber(int number) {
switch(number) {
case 0:
return RES_CODE_SUCCESS;
case 1:
return RES_CODE_FAIL;
default:
return null;
}
} | public ResCode findValueByNumber(int number) {
<DeepExtract>
switch(number) {
case 0:
return RES_CODE_SUCCESS;
case 1:
return RES_CODE_FAIL;
default:
return null;
}
</DeepExtract>
} | distmq | positive | 1,849 |
@Override
public void writeBytecode(MethodVisitor methodVisitor) {
loadResultHandle(methodVisitor, resolvedLength, BytecodeCreatorImpl.this, "I", false);
methodVisitor.visitTypeInsn(Opcodes.ANEWARRAY, arrayType);
if (ret.getResultType() == ResultHandle.ResultType.UNUSED) {
if (ret.getType().equals("J") || ret.getType()... | @Override
public void writeBytecode(MethodVisitor methodVisitor) {
loadResultHandle(methodVisitor, resolvedLength, BytecodeCreatorImpl.this, "I", false);
methodVisitor.visitTypeInsn(Opcodes.ANEWARRAY, arrayType);
<DeepExtract>
if (ret.getResultType() == ResultHandle.ResultType.UNUSED) {
if (ret.getType().equals("J") ||... | gizmo | positive | 1,850 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.