before stringlengths 33 3.21M | after stringlengths 63 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
public static VerifyCode generateMathCaptcha(int width, int height) {
LineCaptcha captcha = CaptchaUtil.createLineCaptcha(width, height, DEFAULT_CODE_COUNT, DEFAULT_DISTURB_NUM);
captcha.setGenerator(new MathGenerator());
ByteArrayOutputStream bos = new ByteArrayOutputStream();
captcha.write(bos);
VerifyCode code = new... | public static VerifyCode generateMathCaptcha(int width, int height) {
LineCaptcha captcha = CaptchaUtil.createLineCaptcha(width, height, DEFAULT_CODE_COUNT, DEFAULT_DISTURB_NUM);
captcha.setGenerator(new MathGenerator());
<DeepExtract>
ByteArrayOutputStream bos = new ByteArrayOutputStream();
captcha.write(bos);
VerifyC... | base-spring-boot | positive | 460 |
@NonNull
public Number sum(@NonNull String column) {
final StringBuilder sql = new StringBuilder("SELECT ").append("SUM").append(LEFT_PARENTHESIS).append(column).append(RIGHT_PARENTHESIS).append(" FROM ").append(SQLiteSchema.resolveTable(mType));
if (!TextUtils.isEmpty(mWhere)) {
sql.append(WHERE).append(mWhere);
}
fin... | @NonNull
public Number sum(@NonNull String column) {
<DeepExtract>
final StringBuilder sql = new StringBuilder("SELECT ").append("SUM").append(LEFT_PARENTHESIS).append(column).append(RIGHT_PARENTHESIS).append(" FROM ").append(SQLiteSchema.resolveTable(mType));
if (!TextUtils.isEmpty(mWhere)) {
sql.append(WHERE).append(... | droidkit-v5x | positive | 461 |
@Override
protected boolean doUpload(GlucoseDataSet glucoseDataSet) throws IOException {
return upsert(getCollection(), toBasicDBObject(glucoseDataSet));
} | @Override
protected boolean doUpload(GlucoseDataSet glucoseDataSet) throws IOException {
<DeepExtract>
return upsert(getCollection(), toBasicDBObject(glucoseDataSet));
</DeepExtract>
} | android-uploader | positive | 462 |
public Criteria andIdNotEqualTo(Long value) {
if (value == null) {
throw new RuntimeException("Value for " + "id" + " cannot be null");
}
criteria.add(new Criterion("id <>", value));
return (Criteria) this;
} | public Criteria andIdNotEqualTo(Long value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "id" + " cannot be null");
}
criteria.add(new Criterion("id <>", value));
</DeepExtract>
return (Criteria) this;
} | AnyMock | positive | 463 |
private void loadFromFile(File file) throws IOException {
try {
String type = new DataInputStream(new FileInputStream(file)).readUTF();
if (type.equals("jergometer session")) {
int format = Integer.parseInt(new DataInputStream(new FileInputStream(file)).readUTF());
if (format <= 2) {
startTime = new Time(new DataInputS... | private void loadFromFile(File file) throws IOException {
<DeepExtract>
try {
String type = new DataInputStream(new FileInputStream(file)).readUTF();
if (type.equals("jergometer session")) {
int format = Integer.parseInt(new DataInputStream(new FileInputStream(file)).readUTF());
if (format <= 2) {
startTime = new Time(... | JErgometer | positive | 465 |
@Test
public void stepInCaptureTest() {
assertEquals(2, 2);
assertEquals(2, 2);
assertEquals(2, 2);
assertEquals(2, 2);
} | @Test
public void stepInCaptureTest() {
<DeepExtract>
assertEquals(2, 2);
assertEquals(2, 2);
</DeepExtract>
assertEquals(2, 2);
assertEquals(2, 2);
} | sahagin-java | positive | 466 |
public String getString(int index) throws IOException {
InputStream in;
synchronized (DiskLruCache.this) {
if (entry.currentEditor != this) {
throw new IllegalStateException();
}
if (!entry.readable) {
in = null;
}
in = new FileInputStream(entry.getCleanFile(index));
}
return in != null ? inputStreamToString(in) : null... | public String getString(int index) throws IOException {
<DeepExtract>
InputStream in;
synchronized (DiskLruCache.this) {
if (entry.currentEditor != this) {
throw new IllegalStateException();
}
if (!entry.readable) {
in = null;
}
in = new FileInputStream(entry.getCleanFile(index));
}
</DeepExtract>
return in != null ? i... | socket-rxjava | positive | 467 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Analytics.init(this);
setContentView(R.layout.list);
database = new Database(this);
database.open();
cursor = database.getSubscriptions();
startManagingCursor(cursor);
if (cursor.getCount() == 0)
Utils.showEmpty(this, R.stri... | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Analytics.init(this);
setContentView(R.layout.list);
database = new Database(this);
database.open();
cursor = database.getSubscriptions();
startManagingCursor(cursor);
<DeepExtract>
if (cursor.getCount() == 0)
Utils.showEmpt... | congress-android | positive | 468 |
@Test
@Deployment(resources = { "org/camunda/bpm/scenario/test/boundary/ConditionalBoundaryEventTest.bpmn" })
public void testConditionInitiallyFalseAndSetTrue() {
when(scenario.waitsAtUserTask("UserTask")).thenReturn(new UserTaskAction() {
@Override
public void execute(TaskDelegate task) {
rule.getRuntimeService().set... | @Test
@Deployment(resources = { "org/camunda/bpm/scenario/test/boundary/ConditionalBoundaryEventTest.bpmn" })
public void testConditionInitiallyFalseAndSetTrue() {
when(scenario.waitsAtUserTask("UserTask")).thenReturn(new UserTaskAction() {
@Override
public void execute(TaskDelegate task) {
rule.getRuntimeService().set... | camunda-platform-scenario | positive | 469 |
private void drawSmoothPath(Canvas canvas, final Line line) {
linePaint.setStrokeWidth(ChartUtils.dp2px(density, line.getStrokeWidth()));
linePaint.setColor(line.getColor());
linePaint.setPathEffect(line.getPathEffect());
final int lineSize = line.getValues().size();
float prePreviousPointX = Float.NaN;
float prePrevio... | private void drawSmoothPath(Canvas canvas, final Line line) {
linePaint.setStrokeWidth(ChartUtils.dp2px(density, line.getStrokeWidth()));
linePaint.setColor(line.getColor());
linePaint.setPathEffect(line.getPathEffect());
final int lineSize = line.getValues().size();
float prePreviousPointX = Float.NaN;
float prePrevio... | hellocharts-android | positive | 473 |
@Override
public Vector scale(float scale) {
return mul(scale, this);
return this;
} | @Override
public Vector scale(float scale) {
<DeepExtract>
return mul(scale, this);
</DeepExtract>
return this;
} | Ents | positive | 474 |
public GitIntentBuilder tag(String tagName) {
intent.putStringArrayListExtra("tag", tagName);
return this;
} | public GitIntentBuilder tag(String tagName) {
<DeepExtract>
intent.putStringArrayListExtra("tag", tagName);
return this;
</DeepExtract>
} | agit | positive | 475 |
@Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
if (findViewById(getToolbarActionbarId()) != null) {
titleView = findViewById(getToolbarActionbarId()).findViewById(getToolbarTitleId());
setTitle(getTitle());
setSupportActionBar(findViewById(getToolbarActionbarId()));
}
} | @Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
<DeepExtract>
if (findViewById(getToolbarActionbarId()) != null) {
titleView = findViewById(getToolbarActionbarId()).findViewById(getToolbarTitleId());
setTitle(getTitle());
setSupportActionBar(findViewById(getToolbarActionbarId(... | bible | positive | 476 |
private void addFeatureToSite(Map<String, Site> sites, String origin, int feature) {
Site site = null;
if (sites.containsKey(origin)) {
site = (Site) sites.get(origin);
} else {
site = new Site(origin);
sites.put(origin, site);
}
mFeatures |= (1 << feature);
} | private void addFeatureToSite(Map<String, Site> sites, String origin, int feature) {
Site site = null;
if (sites.containsKey(origin)) {
site = (Site) sites.get(origin);
} else {
site = new Site(origin);
sites.put(origin, site);
}
<DeepExtract>
mFeatures |= (1 << feature);
</DeepExtract>
} | TintBrowser | positive | 477 |
@Test
public void buySellStockTwice2() {
prices = Arrays.asList(100, 200);
maxProfit = 100;
assertEquals(maxProfit, BuySellStockTwice.buySellStockTwice(prices));
} | @Test
public void buySellStockTwice2() {
prices = Arrays.asList(100, 200);
maxProfit = 100;
<DeepExtract>
assertEquals(maxProfit, BuySellStockTwice.buySellStockTwice(prices));
</DeepExtract>
} | elements-of-programming-interviews-solutions | positive | 479 |
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
activity.setRequestedOrientation(globalSettings.getScreenOrientation());
} | @Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
<DeepExtract>
activity.setRequestedOrientation(globalSettings.getScreenOrientation());
</DeepExtract>
} | homerplayer | positive | 481 |
public Criteria andBookPriceIn(List<Double> values) {
if (values == null) {
throw new RuntimeException("Value for " + "bookPrice" + " cannot be null");
}
criteria.add(new Criterion("book_price in", values));
return (Criteria) this;
} | public Criteria andBookPriceIn(List<Double> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "bookPrice" + " cannot be null");
}
criteria.add(new Criterion("book_price in", values));
</DeepExtract>
return (Criteria) this;
} | library_manager_system | positive | 482 |
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mRootView = inflater.inflate(R.layout.animated_logo_fragment, container, false);
mSubtitleView = mRootView.findViewById(R.id.logo_subtitle);
mLogoView = (AnimatedMuzeiLogoView) mRootView.findViewById(R.id.anima... | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mRootView = inflater.inflate(R.layout.animated_logo_fragment, container, false);
mSubtitleView = mRootView.findViewById(R.id.logo_subtitle);
mLogoView = (AnimatedMuzeiLogoView) mRootView.findViewById(R.id.anima... | ScreenLocker | positive | 483 |
@Override
public void onSuccess(Object result) {
if (Storage.isSupported() && rememberme.getValue() == true) {
Storage localStorage = Storage.getLocalStorage();
localStorage.setItem("username", usernameText.getValue());
localStorage.setItem("password", passwordText.getValue());
}
handler.handleLogin(true);
hide();
} | @Override
public void onSuccess(Object result) {
if (Storage.isSupported() && rememberme.getValue() == true) {
Storage localStorage = Storage.getLocalStorage();
localStorage.setItem("username", usernameText.getValue());
localStorage.setItem("password", passwordText.getValue());
}
<DeepExtract>
handler.handleLogin(true)... | osw-web | positive | 484 |
@Override
public void onResume() {
super.onResume();
CrimeLab crimeLab = CrimeLab.get(getActivity());
List<Crime> crimes = crimeLab.getCrimes();
if (mAdapter == null) {
mAdapter = new CrimeAdapter(crimes);
mCrimeRecyclerView.setAdapter(mAdapter);
} else {
mAdapter.notifyDataSetChanged();
}
} | @Override
public void onResume() {
super.onResume();
<DeepExtract>
CrimeLab crimeLab = CrimeLab.get(getActivity());
List<Crime> crimes = crimeLab.getCrimes();
if (mAdapter == null) {
mAdapter = new CrimeAdapter(crimes);
mCrimeRecyclerView.setAdapter(mAdapter);
} else {
mAdapter.notifyDataSetChanged();
}
</DeepExtract>
... | AndroidBNR2 | positive | 485 |
static Mode mapIntToValue(final int modeInt) {
for (Mode value : Mode.values()) {
if (modeInt == value.getIntValue()) {
return value;
}
}
return ROTATE;
} | static Mode mapIntToValue(final int modeInt) {
for (Mode value : Mode.values()) {
if (modeInt == value.getIntValue()) {
return value;
}
}
<DeepExtract>
return ROTATE;
</DeepExtract>
} | My-Weather | positive | 486 |
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (null == data || 0 == data.size()) {
return;
}
canvas.drawRect(0, mItemHeight * mHalfItemCount, viewWidth, mItemHeight * (mHalfItemCount + 1), mSelectedBgPaint);
String text;
float midY;
int startShowIndex = Math.max(0, mSelectedIndex - (mHalfIte... | @Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (null == data || 0 == data.size()) {
return;
}
canvas.drawRect(0, mItemHeight * mHalfItemCount, viewWidth, mItemHeight * (mHalfItemCount + 1), mSelectedBgPaint);
<DeepExtract>
String text;
float midY;
int startShowIndex = Math.max(0, mSelectedInd... | ZJYWidget | positive | 487 |
@Test(expected = IllegalArgumentException.class)
public void testBadContainerSuperPoint() throws NoSuchMethodException {
BadContainerSuperPoint bad = new BadContainerSuperPoint();
return x;
} | @Test(expected = IllegalArgumentException.class)
public void testBadContainerSuperPoint() throws NoSuchMethodException {
BadContainerSuperPoint bad = new BadContainerSuperPoint();
<DeepExtract>
return x;
</DeepExtract>
} | ObjectLayout | positive | 488 |
@Override
public void onDragMove(DragEvent e) {
double currX;
if (_hasTextBox) {
currX = FxUtil.getStyleLeft(this);
} else {
currX = FxUtil.getTranslateX(el());
}
if (currX > 0) {
if (e.OffsetX > 0) {
currX += (int) (e.OffsetX / 2);
} else {
currX += e.OffsetX * 2;
}
} else if (-currX + panelWidth > widgetWidth) {
if (... | @Override
public void onDragMove(DragEvent e) {
double currX;
if (_hasTextBox) {
currX = FxUtil.getStyleLeft(this);
} else {
currX = FxUtil.getTranslateX(el());
}
if (currX > 0) {
if (e.OffsetX > 0) {
currX += (int) (e.OffsetX / 2);
} else {
currX += e.OffsetX * 2;
}
} else if (-currX + panelWidth > widgetWidth) {
if (... | next | positive | 489 |
public PointF mapImageToView(PointF imagePoint) {
float[] points = mTempValues;
points[0] = imagePoint.x;
points[1] = imagePoint.y;
for (int i = 0; i < 1; i++) {
points[i * 2 + 0] = points[i * 2 + 0] * mImageBounds.width() + mImageBounds.left;
points[i * 2 + 1] = points[i * 2 + 1] * mImageBounds.height() + mImageBounds... | public PointF mapImageToView(PointF imagePoint) {
float[] points = mTempValues;
points[0] = imagePoint.x;
points[1] = imagePoint.y;
<DeepExtract>
for (int i = 0; i < 1; i++) {
points[i * 2 + 0] = points[i * 2 + 0] * mImageBounds.width() + mImageBounds.left;
points[i * 2 + 1] = points[i * 2 + 1] * mImageBounds.height() ... | MyDiary | positive | 490 |
@Override
public int enable(Socket socket) {
int result = -1;
if (pollable(socket) != null) {
if (pollable(socket).getChannel() != null) {
result = poller.register(pollable(socket).getChannel(), sumOptions(pollable(socket)));
} else {
result = poller.register(pollable(socket).getSocket().getZMQSocket(), sumOptions(poll... | @Override
public int enable(Socket socket) {
<DeepExtract>
int result = -1;
if (pollable(socket) != null) {
if (pollable(socket).getChannel() != null) {
result = poller.register(pollable(socket).getChannel(), sumOptions(pollable(socket)));
} else {
result = poller.register(pollable(socket).getSocket().getZMQSocket(), s... | jzmq-api | positive | 491 |
public E removeFirst() {
E x;
final ReentrantLock lock = this.lock;
lock.lock();
try {
x = unlinkFirst();
} finally {
lock.unlock();
}
if (x == null)
throw new NoSuchElementException();
return x;
} | public E removeFirst() {
<DeepExtract>
E x;
final ReentrantLock lock = this.lock;
lock.lock();
try {
x = unlinkFirst();
} finally {
lock.unlock();
}
</DeepExtract>
if (x == null)
throw new NoSuchElementException();
return x;
} | Android-Universal-Image-Loader | positive | 493 |
public void startServer(IConfig config, List<? extends InterceptHandler> handlers, ISslContextCreator sslCtxCreator, IAuthenticator authenticator, IAuthorizator authorizator) throws IOException {
if (handlers == null) {
handlers = Collections.emptyList();
}
LOG.info("Starting Moquette Server. MQTT message interceptors=... | public void startServer(IConfig config, List<? extends InterceptHandler> handlers, ISslContextCreator sslCtxCreator, IAuthenticator authenticator, IAuthorizator authorizator) throws IOException {
if (handlers == null) {
handlers = Collections.emptyList();
}
LOG.info("Starting Moquette Server. MQTT message interceptors=... | springboot-mqtt | positive | 494 |
public static boolean expression(PsiBuilder b, int l, int g) {
if (!recursion_guard_(b, l, "expression"))
return false;
addVariant(b, "<expression>");
Marker m = enter_section_(b, l, _NONE_, "<expression>");
if (!recursion_guard_(b, l + 1, "unaryExpression"))
r = false;
boolean r, p;
Marker m = enter_section_(b, l + 1,... | public static boolean expression(PsiBuilder b, int l, int g) {
if (!recursion_guard_(b, l, "expression"))
return false;
addVariant(b, "<expression>");
Marker m = enter_section_(b, l, _NONE_, "<expression>");
<DeepExtract>
if (!recursion_guard_(b, l + 1, "unaryExpression"))
r = false;
boolean r, p;
Marker m = enter_sect... | Cofe-Mybatis | positive | 495 |
@Override
public void clicked(InputEvent event, float x, float y) {
if (this.getSelectedBlock() != null && this.currentScreen == this.hud) {
IChunk chunk = world.getChunk(selectedBlock);
if (chunk != null) {
try {
Block block = chunk.getBlock(selectedBlock.x & (world.getChunkSize() - 1), selectedBlock.y, selectedBlock.... | @Override
public void clicked(InputEvent event, float x, float y) {
<DeepExtract>
if (this.getSelectedBlock() != null && this.currentScreen == this.hud) {
IChunk chunk = world.getChunk(selectedBlock);
if (chunk != null) {
try {
Block block = chunk.getBlock(selectedBlock.x & (world.getChunkSize() - 1), selectedBlock.y, ... | Radix | positive | 496 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
Completable completable = Completable.fromAction(() -> {
log("Let's do something");
});
completable.subscribe(() -> {
log("Finished");
}, throwable -> {
log(... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
<DeepExtract>
Completable completable = Completable.fromAction(() -> {
log("Let's do something");
});
completable.subscribe(() -> {
log("Finished");
}, throw... | Reactive-Android-Programming | positive | 497 |
public URL getVersionsPropertiesUrl() {
String name = versionsPropertiesUrl.getName();
T tValue = versionsPropertiesUrl.getValue();
Class<T> type = versionsPropertiesUrl.getType();
return resolver(name, tValue, type);
} | public URL getVersionsPropertiesUrl() {
<DeepExtract>
String name = versionsPropertiesUrl.getName();
T tValue = versionsPropertiesUrl.getValue();
Class<T> type = versionsPropertiesUrl.getType();
return resolver(name, tValue, type);
</DeepExtract>
} | webdrivermanager | positive | 498 |
public Criteria andPasswordLessThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "password" + " cannot be null");
}
criteria.add(new Criterion("password <", value));
return (Criteria) this;
} | public Criteria andPasswordLessThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "password" + " cannot be null");
}
criteria.add(new Criterion("password <", value));
</DeepExtract>
return (Criteria) this;
} | PetStore | positive | 499 |
private void uploadFile(String coverPath, String filePath) {
if (loadingDialog == null) {
loadingDialog = new LoadingDialog(getContext());
loadingDialog.setLoadingText(getString(R.string.upload_text));
loadingDialog.setCanceledOnTouchOutside(false);
loadingDialog.setCancelable(false);
}
if (!loadingDialog.isShowing()) ... | private void uploadFile(String coverPath, String filePath) {
<DeepExtract>
if (loadingDialog == null) {
loadingDialog = new LoadingDialog(getContext());
loadingDialog.setLoadingText(getString(R.string.upload_text));
loadingDialog.setCanceledOnTouchOutside(false);
loadingDialog.setCancelable(false);
}
if (!loadingDialog... | JokeVideo | positive | 500 |
@Test
public void thenIActionR_doesNothingThenReturnsValue() throws Throwable {
v(tag, "Start " + Thread.currentThread().getStackTrace()[0].getMethodName());
Integer expected = 66;
IAltFuture<?, Integer> test = threadType.then(() -> {
v(tag, "Do 66");
return expected;
}).then(() -> v(tag, "After 66")).then(() -> v(tag,... | @Test
public void thenIActionR_doesNothingThenReturnsValue() throws Throwable {
v(tag, "Start " + Thread.currentThread().getStackTrace()[0].getMethodName());
Integer expected = 66;
IAltFuture<?, Integer> test = threadType.then(() -> {
v(tag, "Do 66");
return expected;
}).then(() -> v(tag, "After 66")).then(() -> v(tag,... | cascade | positive | 502 |
private short computeDigitalSignature(APDU apdu) {
if (!(pw1.isValidated() && pw1_modes[PW1_MODE_NO81]))
ISOException.throwIt(SW_SECURITY_STATUS_NOT_SATISFIED);
if (pw1_status == (byte) 0x00)
pw1_modes[PW1_MODE_NO81] = false;
if (!sig_key.getPrivate().isInitialized())
ISOException.throwIt(SW_REFERENCED_DATA_NOT_FOUND);... | private short computeDigitalSignature(APDU apdu) {
if (!(pw1.isValidated() && pw1_modes[PW1_MODE_NO81]))
ISOException.throwIt(SW_SECURITY_STATUS_NOT_SATISFIED);
if (pw1_status == (byte) 0x00)
pw1_modes[PW1_MODE_NO81] = false;
if (!sig_key.getPrivate().isInitialized())
ISOException.throwIt(SW_REFERENCED_DATA_NOT_FOUND);... | AppletPlayground | positive | 503 |
@Test
public void test() {
assertEquals(CoverageRange.ABYSSMAL, CoverageRange.valueOf(-20.0));
assertNotNull(CoverageRange.fillColorOf(-20.0));
assertNotNull(CoverageRange.ABYSSMAL.getLineColor());
assertNotNull(CoverageRange.ABYSSMAL.getFillHexString());
assertNotNull(CoverageRange.ABYSSMAL.getLineHexString());
assert... | @Test
public void test() {
assertEquals(CoverageRange.ABYSSMAL, CoverageRange.valueOf(-20.0));
assertNotNull(CoverageRange.fillColorOf(-20.0));
assertNotNull(CoverageRange.ABYSSMAL.getLineColor());
assertNotNull(CoverageRange.ABYSSMAL.getFillHexString());
assertNotNull(CoverageRange.ABYSSMAL.getLineHexString());
assert... | jacoco-plugin | positive | 504 |
public static int[] shorten(final int[] list) {
final boolean[] output = new boolean[list.length - 1];
System.arraycopy(list, 0, output, 0, list.length - 1);
return output;
} | public static int[] shorten(final int[] list) {
<DeepExtract>
final boolean[] output = new boolean[list.length - 1];
System.arraycopy(list, 0, output, 0, list.length - 1);
return output;
</DeepExtract>
} | rainbow | positive | 505 |
@Override
public void handleEvent(Event event) {
TableColumn[] columns = viewer.getTable().getColumns();
int[] newWidths = new int[columns.length - 1];
int i = 0;
boolean first = true;
for (TableColumn col : columns) {
if (first) {
first = false;
continue;
}
newWidths[i++] = col.getWidth();
}
columnConfig.update(column... | @Override
public void handleEvent(Event event) {
<DeepExtract>
TableColumn[] columns = viewer.getTable().getColumns();
int[] newWidths = new int[columns.length - 1];
int i = 0;
boolean first = true;
for (TableColumn col : columns) {
if (first) {
first = false;
continue;
}
newWidths[i++] = col.getWidth();
}
columnConfig... | logsaw-app | positive | 506 |
private void performRefreshComplete() {
mStatus = PTR_STATUS_COMPLETE;
if (mScrollChecker.mIsRunning && isAutoRefresh()) {
if (DEBUG) {
PtrCLog.d(LOG_TAG, "performRefreshComplete do nothing, scrolling: %s, auto refresh: %s", mScrollChecker.mIsRunning, mFlag);
}
return;
}
if (mPtrIndicator.hasLeftStartPosition() && !fal... | private void performRefreshComplete() {
mStatus = PTR_STATUS_COMPLETE;
if (mScrollChecker.mIsRunning && isAutoRefresh()) {
if (DEBUG) {
PtrCLog.d(LOG_TAG, "performRefreshComplete do nothing, scrolling: %s, auto refresh: %s", mScrollChecker.mIsRunning, mFlag);
}
return;
}
<DeepExtract>
if (mPtrIndicator.hasLeftStartPosi... | Android-rxjava-retrofit-okhttp-app | positive | 507 |
@EventHandler()
public void onDeath(PlayerDeathEvent event) {
Player p = event.getEntity();
if (NPCChecker.isNPC(p))
return;
event.getDrops().removeIf(item -> {
if (item == null)
return true;
if (item.hasItemMeta()) {
return UTEi18n.cache("item.locked").equalsIgnoreCase(item.getItemMeta().getDisplayName());
}
return fa... | @EventHandler()
public void onDeath(PlayerDeathEvent event) {
Player p = event.getEntity();
if (NPCChecker.isNPC(p))
return;
event.getDrops().removeIf(item -> {
if (item == null)
return true;
if (item.hasItemMeta()) {
return UTEi18n.cache("item.locked").equalsIgnoreCase(item.getItemMeta().getDisplayName());
}
return fa... | UntilTheEnd | positive | 508 |
@Override
public void onClickYes() {
button.setText("登录");
button.setEnabled(true);
etAccount.setEnabled(true);
etPwd.setEnabled(true);
etPwd2.setEnabled(true);
progressBar.setVisibility(View.GONE);
} | @Override
public void onClickYes() {
<DeepExtract>
button.setText("登录");
button.setEnabled(true);
etAccount.setEnabled(true);
etPwd.setEnabled(true);
etPwd2.setEnabled(true);
progressBar.setVisibility(View.GONE);
</DeepExtract>
} | GuetClassTable | positive | 509 |
public String getFormatTotalSize() {
String displaySize;
if (totalSize.divide(ONE_EB_BI).compareTo(BigInteger.ZERO) > 0) {
displaySize = String.valueOf(totalSize.divide(ONE_EB_BI)) + " EB";
} else if (totalSize.divide(ONE_PB_BI).compareTo(BigInteger.ZERO) > 0) {
displaySize = String.valueOf(totalSize.divide(ONE_PB_BI))... | public String getFormatTotalSize() {
<DeepExtract>
String displaySize;
if (totalSize.divide(ONE_EB_BI).compareTo(BigInteger.ZERO) > 0) {
displaySize = String.valueOf(totalSize.divide(ONE_EB_BI)) + " EB";
} else if (totalSize.divide(ONE_PB_BI).compareTo(BigInteger.ZERO) > 0) {
displaySize = String.valueOf(totalSize.divi... | XinFrameworkLib | positive | 510 |
@Nullable
private JsonPointer getMatchingPointer(final JsonRef ref) {
if (otherRefs.containsKey(ref))
return otherRefs.get(ref);
if (!ref.isLegal())
return null;
final JsonPointer refPtr = ref.getPointer();
for (final Map.Entry<JsonRef, JsonPointer> entry : absRefs.entrySet()) if (entry.getKey().contains(ref))
return e... | @Nullable
private JsonPointer getMatchingPointer(final JsonRef ref) {
if (otherRefs.containsKey(ref))
return otherRefs.get(ref);
if (!ref.isLegal())
return null;
<DeepExtract>
final JsonPointer refPtr = ref.getPointer();
for (final Map.Entry<JsonRef, JsonPointer> entry : absRefs.entrySet()) if (entry.getKey().contains(... | json-schema-core | positive | 511 |
public MSSRegistrationReq createRegistrationReq(final String apTransId) {
MSSRegistrationReq req = mssObjFactory.createMSSRegistrationReq();
if (req == null)
throw new IllegalArgumentException("Invalid request (null)");
req.setMajorVersion(Long.valueOf(1));
req.setMinorVersion(Long.valueOf(1));
if (apTransId != null) {... | public MSSRegistrationReq createRegistrationReq(final String apTransId) {
MSSRegistrationReq req = mssObjFactory.createMSSRegistrationReq();
<DeepExtract>
if (req == null)
throw new IllegalArgumentException("Invalid request (null)");
req.setMajorVersion(Long.valueOf(1));
req.setMinorVersion(Long.valueOf(1));
if (apTran... | laverca | positive | 512 |
public static void numericConcept(String token, ConceptNumeric concept, boolean required, Locale locale, FormField formField) {
String bindName = token;
Element controlNode = getParentNode(formField, locale).createElement(XformBuilder.NAMESPACE_XFORMS, null);
controlNode.setName(XformBuilder.CONTROL_INPUT);
controlNode... | public static void numericConcept(String token, ConceptNumeric concept, boolean required, Locale locale, FormField formField) {
<DeepExtract>
String bindName = token;
Element controlNode = getParentNode(formField, locale).createElement(XformBuilder.NAMESPACE_XFORMS, null);
controlNode.setName(XformBuilder.CONTROL_INPUT... | buendia | positive | 514 |
@Override
public void closeEmphasis(SpannableStringBuilder out) {
int len = out.length();
T obj = getLast(out, Italic.class);
int where = out.getSpanStart(obj);
out.removeSpan(obj);
Object[] nestSpans = out.getSpans(where, len, Object.class);
List<NestSpanInfo> spans = new ArrayList<>();
for (Object nestSpan : nestSpan... | @Override
public void closeEmphasis(SpannableStringBuilder out) {
<DeepExtract>
int len = out.length();
T obj = getLast(out, Italic.class);
int where = out.getSpanStart(obj);
out.removeSpan(obj);
Object[] nestSpans = out.getSpans(where, len, Object.class);
List<NestSpanInfo> spans = new ArrayList<>();
for (Object nestS... | kaif-android | positive | 515 |
public static EventAssertOperationBuilder fromEventInfo(EventInfo eventInfo) {
this.data = eventInfo.getEventData();
return this;
} | public static EventAssertOperationBuilder fromEventInfo(EventInfo eventInfo) {
<DeepExtract>
this.data = eventInfo.getEventData();
return this;
</DeepExtract>
} | eventuate-cdc | positive | 516 |
@Override
public void forward() {
this.setStringAttribute(POLARITY, POLARITY_NORMAL);
this.power = this.power;
this.setIntegerAttribute(DUTY_CYCLE, this.power);
this.setStringAttribute(COMMAND, RUN_FOREVER);
} | @Override
public void forward() {
this.setStringAttribute(POLARITY, POLARITY_NORMAL);
<DeepExtract>
this.power = this.power;
this.setIntegerAttribute(DUTY_CYCLE, this.power);
</DeepExtract>
this.setStringAttribute(COMMAND, RUN_FOREVER);
} | ev3dev-lang-java | positive | 517 |
private void addMethodDesc(final String desc) {
switch(Type.getReturnType(desc).getSort()) {
case Type.ARRAY:
addType(Type.getReturnType(desc).getElementType());
break;
case Type.OBJECT:
addName(Type.getReturnType(desc).getInternalName());
break;
}
Type[] types = Type.getArgumentTypes(desc);
for (int i = 0; i < types.l... | private void addMethodDesc(final String desc) {
<DeepExtract>
switch(Type.getReturnType(desc).getSort()) {
case Type.ARRAY:
addType(Type.getReturnType(desc).getElementType());
break;
case Type.OBJECT:
addName(Type.getReturnType(desc).getInternalName());
break;
}
</DeepExtract>
Type[] types = Type.getArgumentTypes(desc)... | vinja | positive | 518 |
private void createArtworkRequestQueue(final boolean fetchAlbums, final boolean fetchArtists) {
mArtworkRequestQueue.clear();
if (fetchAlbums) {
List<AlbumModel> albums = MusicLibraryHelper.getAllAlbums(getApplicationContext());
for (AlbumModel album : albums) {
mArtworkRequestQueue.add(new ArtworkRequestModel(album));... | private void createArtworkRequestQueue(final boolean fetchAlbums, final boolean fetchArtists) {
mArtworkRequestQueue.clear();
if (fetchAlbums) {
List<AlbumModel> albums = MusicLibraryHelper.getAllAlbums(getApplicationContext());
for (AlbumModel album : albums) {
mArtworkRequestQueue.add(new ArtworkRequestModel(album));... | odyssey | positive | 519 |
@Override
public boolean hasNext() {
return nextIndex > 0;
} | @Override
public boolean hasNext() {
<DeepExtract>
return nextIndex > 0;
</DeepExtract>
} | CoFHTweaks | positive | 521 |
public void init(Cursor c) {
if (mAdapter == null) {
return;
}
if (mActivity.isFinishing() && c != null) {
c.close();
c = null;
}
if (c != mActivity.mQueryCursor) {
mActivity.mQueryCursor = c;
super.changeCursor(c);
}
if (mQueryCursor == null) {
setListAdapter(null);
return;
}
} | public void init(Cursor c) {
if (mAdapter == null) {
return;
}
<DeepExtract>
if (mActivity.isFinishing() && c != null) {
c.close();
c = null;
}
if (c != mActivity.mQueryCursor) {
mActivity.mQueryCursor = c;
super.changeCursor(c);
}
</DeepExtract>
if (mQueryCursor == null) {
setListAdapter(null);
return;
}
} | android_packages_apps_apolloMod | positive | 522 |
@Override
protected void onPause() {
unregisterReceiver(airplaneModeChangedReceiver);
unregisterReceiver(updateChartReceiver);
unregisterReceiver(batteryChangedReceiver);
Log.d(TAG, "cancelDimScreenTask");
if (dimScreenTask != null) {
Log.d(TAG, "dimScreenTask != null");
dimScreenTask.cancel(true);
if (!dimScreenTask.i... | @Override
protected void onPause() {
unregisterReceiver(airplaneModeChangedReceiver);
unregisterReceiver(updateChartReceiver);
unregisterReceiver(batteryChangedReceiver);
<DeepExtract>
Log.d(TAG, "cancelDimScreenTask");
if (dimScreenTask != null) {
Log.d(TAG, "dimScreenTask != null");
dimScreenTask.cancel(true);
if (!d... | ElectricSleep | positive | 523 |
@Test
public void testVeienVn() {
assertEquals(cleaner.clean("grefsenvn. 132"), cleaner.clean("grefsenveien 132"));
} | @Test
public void testVeienVn() {
<DeepExtract>
assertEquals(cleaner.clean("grefsenvn. 132"), cleaner.clean("grefsenveien 132"));
</DeepExtract>
} | duke | positive | 524 |
@Override
public void write(int b) throws IOException {
if (closed)
throw new IOException("Cannot read from stream anymore. It has been closed");
if (available() < 1)
flush();
buf[curr++] = (byte) b;
} | @Override
public void write(int b) throws IOException {
<DeepExtract>
if (closed)
throw new IOException("Cannot read from stream anymore. It has been closed");
</DeepExtract>
if (available() < 1)
flush();
buf[curr++] = (byte) b;
} | mango | positive | 525 |
@Test
public void canWorkWithProcessViewOfModel3c() throws IOException {
ServiceSpecification mdsl = new MDSLResource(getTestResource("flowtest3c-exclusivechoiceviacommand-implicitmerge.mdsl")).getServiceSpecification();
MDSL2GeneratorModelConverter converter = new MDSL2GeneratorModelConverter(mdsl);
MDSLGeneratorModel... | @Test
public void canWorkWithProcessViewOfModel3c() throws IOException {
ServiceSpecification mdsl = new MDSLResource(getTestResource("flowtest3c-exclusivechoiceviacommand-implicitmerge.mdsl")).getServiceSpecification();
MDSL2GeneratorModelConverter converter = new MDSL2GeneratorModelConverter(mdsl);
MDSLGeneratorModel... | MDSL-Specification | positive | 526 |
public void ping() throws org.apache.thrift.TException {
ping_args args = new ping_args();
sendBase("ping", args);
ping_result result = new ping_result();
receiveBase(result, "ping");
return;
} | public void ping() throws org.apache.thrift.TException {
ping_args args = new ping_args();
sendBase("ping", args);
<DeepExtract>
ping_result result = new ping_result();
receiveBase(result, "ping");
return;
</DeepExtract>
} | Thrift-Connection-Pool | positive | 527 |
@Override
public String toString() {
return position + "-" + type;
} | @Override
public String toString() {
<DeepExtract>
return position + "-" + type;
</DeepExtract>
} | JointER | positive | 528 |
@Subscribe
public void handleScapyConnectedEventEngine(ScapyClientConnectedEvent event) {
menuControllerEngine.initTemplateMenu();
} | @Subscribe
public void handleScapyConnectedEventEngine(ScapyClientConnectedEvent event) {
<DeepExtract>
menuControllerEngine.initTemplateMenu();
</DeepExtract>
} | trex-packet-editor | positive | 530 |
private static boolean listQuads(ArrayList<XYZO> a, ArrayList<XYZO> b, ArrayList<XYZO> c, ArrayList<XYZO> d, File f) {
if ((a == null) || (f == null))
return false;
try {
pw = new PrintWriter(new FileWriter(f), true);
} catch (IOException ioe) {
return false;
}
if ((a == null) || (pw == null))
return;
for (int i = 0; i... | private static boolean listQuads(ArrayList<XYZO> a, ArrayList<XYZO> b, ArrayList<XYZO> c, ArrayList<XYZO> d, File f) {
if ((a == null) || (f == null))
return false;
try {
pw = new PrintWriter(new FileWriter(f), true);
} catch (IOException ioe) {
return false;
}
if ((a == null) || (pw == null))
return;
for (int i = 0; i... | BeamFour | positive | 531 |
public void validateForm(String firstName, String lastName, String email, String userName, String password, String confirmPassword) {
clearForm();
firstNameField.sendKeys(firstName);
lastNameField.sendKeys(lastName);
emailField.sendKeys(email);
userNameField.sendKeys(userName);
passwordField.sendKeys(password);
passwor... | public void validateForm(String firstName, String lastName, String email, String userName, String password, String confirmPassword) {
<DeepExtract>
clearForm();
firstNameField.sendKeys(firstName);
lastNameField.sendKeys(lastName);
emailField.sendKeys(email);
userNameField.sendKeys(userName);
passwordField.sendKeys(pass... | product-iots | positive | 533 |
public void setColorMap(Palette palette) {
this.colors.clear();
this.colors.addAll(Arrays.asList(palette.getColors()));
setValues(Arrays.asList(palette.getValues()));
} | public void setColorMap(Palette palette) {
<DeepExtract>
this.colors.clear();
this.colors.addAll(Arrays.asList(palette.getColors()));
setValues(Arrays.asList(palette.getValues()));
</DeepExtract>
} | DicomViewer | positive | 534 |
public Criteria andCreate_timeGreaterThan(Date value) {
if (value == null) {
throw new RuntimeException("Value for " + "create_time" + " cannot be null");
}
criteria.add(new Criterion("create_time >", value));
return (Criteria) this;
} | public Criteria andCreate_timeGreaterThan(Date value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "create_time" + " cannot be null");
}
criteria.add(new Criterion("create_time >", value));
</DeepExtract>
return (Criteria) this;
} | SpringBootLearning | positive | 535 |
public RetCode tema(int startIdx, int endIdx, double[] inReal, int optInTimePeriod, MInteger outBegIdx, MInteger outNBElement, double[] outReal) {
MInteger firstEMABegIdx = new MInteger();
MInteger firstEMANbElement = new MInteger();
MInteger secondEMABegIdx = new MInteger();
MInteger secondEMANbElement = new MInteger(... | public RetCode tema(int startIdx, int endIdx, double[] inReal, int optInTimePeriod, MInteger outBegIdx, MInteger outNBElement, double[] outReal) {
MInteger firstEMABegIdx = new MInteger();
MInteger firstEMANbElement = new MInteger();
MInteger secondEMABegIdx = new MInteger();
MInteger secondEMANbElement = new MInteger(... | TA-Lib | positive | 536 |
public boolean beginFakeDrag() {
if (mIsBeingDragged) {
return false;
}
mFakeDragging = true;
if (mScrollState == SCROLL_STATE_DRAGGING) {
return;
}
mScrollState = SCROLL_STATE_DRAGGING;
if (mOnPageChangeListener != null) {
mOnPageChangeListener.onPageScrollStateChanged(SCROLL_STATE_DRAGGING);
}
mInitialMotionY = mLast... | public boolean beginFakeDrag() {
if (mIsBeingDragged) {
return false;
}
mFakeDragging = true;
<DeepExtract>
if (mScrollState == SCROLL_STATE_DRAGGING) {
return;
}
mScrollState = SCROLL_STATE_DRAGGING;
if (mOnPageChangeListener != null) {
mOnPageChangeListener.onPageScrollStateChanged(SCROLL_STATE_DRAGGING);
}
</DeepExt... | OkCalendar | positive | 538 |
@Override
public MafRecord next() {
MafRecord ret = nextRecord_;
try {
String buffer = lastLine_ != null ? lastLine_ : brMaf_.readLine();
lastLine_ = null;
for (; buffer != null; buffer = brMaf_.readLine()) {
buffer = buffer.trim();
if (buffer.length() > 0 && buffer.charAt(0) != '#')
break;
}
if (buffer == null)
nextRe... | @Override
public MafRecord next() {
MafRecord ret = nextRecord_;
<DeepExtract>
try {
String buffer = lastLine_ != null ? lastLine_ : brMaf_.readLine();
lastLine_ = null;
for (; buffer != null; buffer = brMaf_.readLine()) {
buffer = buffer.trim();
if (buffer.length() > 0 && buffer.charAt(0) != '#')
break;
}
if (buffer =... | varsim | positive | 539 |
public Criteria andClassroomNotLike(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "classroom" + " cannot be null");
}
criteria.add(new Criterion("classRoom not like", value));
return (Criteria) this;
} | public Criteria andClassroomNotLike(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "classroom" + " cannot be null");
}
criteria.add(new Criterion("classRoom not like", value));
</DeepExtract>
return (Criteria) this;
} | Examination_System | positive | 540 |
public static void putIntPreference(ContentResolver resolver, Uri uri, String key, int value) {
ContentValues contentValues = new ContentValues(1);
(v, contentValues) -> contentValues.put(key, v).onPutValue(value, contentValues);
resolver.update(uri, contentValues, null, null);
} | public static void putIntPreference(ContentResolver resolver, Uri uri, String key, int value) {
<DeepExtract>
ContentValues contentValues = new ContentValues(1);
(v, contentValues) -> contentValues.put(key, v).onPutValue(value, contentValues);
resolver.update(uri, contentValues, null, null);
</DeepExtract>
} | igniter | positive | 541 |
public void apkToolDecode(String apkPath) throws TNotFoundEx {
String args = " d -o " + TicklerVars.extractedDir + " " + apkPath;
FileUtil fileT = new FileUtil();
File apkPathFile = new File(apkPath);
try {
File file = new File("/dev/null");
PrintStream ps = new PrintStream(new FileOutputStream(file));
System.setErr(ps... | public void apkToolDecode(String apkPath) throws TNotFoundEx {
String args = " d -o " + TicklerVars.extractedDir + " " + apkPath;
<DeepExtract>
FileUtil fileT = new FileUtil();
File apkPathFile = new File(apkPath);
try {
File file = new File("/dev/null");
PrintStream ps = new PrintStream(new FileOutputStream(file));
Sy... | AndroTickler | positive | 542 |
public Criteria andField_not_having_default_valueGreaterThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "field_not_having_default_value" + " cannot be null");
}
criteria.add(new Criterion("field_not_having_default_value >", value));
return (Criteria) this;
} | public Criteria andField_not_having_default_valueGreaterThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "field_not_having_default_value" + " cannot be null");
}
criteria.add(new Criterion("field_not_having_default_value >", value));
</DeepExtract>
return (Criteria) this... | mybatis-generator-gui-extension | positive | 543 |
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (mTarget == null) {
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
if (!child.equals(mCircleView)) {
mTarget = child;
break;
}
}
}
final int action = MotionEventCompat.getActionMasked(ev);
if (mReturningToStart && action == Mot... | @Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
<DeepExtract>
if (mTarget == null) {
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
if (!child.equals(mCircleView)) {
mTarget = child;
break;
}
}
}
</DeepExtract>
final int action = MotionEventCompat.getActionMasked(ev);
if (mRetu... | android-starter-kit | positive | 544 |
public String getDependencies() throws MojoExecutionException {
String dependencies = null;
DependencyInputType dependencyType;
if (projectCP != null) {
getLog().info("Reading dependencies from folder");
dependencyType = DependencyInputType.FOLDER;
} else if (groupId != null && artifactId != null) {
getLog().info("Read... | public String getDependencies() throws MojoExecutionException {
String dependencies = null;
<DeepExtract>
DependencyInputType dependencyType;
if (projectCP != null) {
getLog().info("Reading dependencies from folder");
dependencyType = DependencyInputType.FOLDER;
} else if (groupId != null && artifactId != null) {
getLo... | botsing | positive | 545 |
public String convertToDatabaseForm() {
StringBuilder latStringBuilder = new StringBuilder();
latStringBuilder.append(baseVertex.getLat());
for (TorVertex pillarPoint : pillarVertexes) {
latStringBuilder.append(",").append(pillarPoint.getLat());
}
latStringBuilder.append(",").append(adjVertex.getLat());
return String.v... | public String convertToDatabaseForm() {
StringBuilder latStringBuilder = new StringBuilder();
latStringBuilder.append(baseVertex.getLat());
for (TorVertex pillarPoint : pillarVertexes) {
latStringBuilder.append(",").append(pillarPoint.getLat());
}
latStringBuilder.append(",").append(adjVertex.getLat());
<DeepExtract>
r... | torchtrajectory | positive | 546 |
@Override
public void setConfigParams(ConfigParams config) {
super.setConfigParams(config);
icsAlarm = config.getIcsAlarm();
return icsAlarmMinutes;
icsAllDay = config.getIcsAllDay();
extractIcsAttributes(note);
org.psidnell.omnifocus.expr.Date date = null;
if ("due".equals(icsStart)) {
date = new org.psidnell.omnifocu... | @Override
public void setConfigParams(ConfigParams config) {
super.setConfigParams(config);
icsAlarm = config.getIcsAlarm();
return icsAlarmMinutes;
icsAllDay = config.getIcsAllDay();
extractIcsAttributes(note);
org.psidnell.omnifocus.expr.Date date = null;
if ("due".equals(icsStart)) {
date = new org.psidnell.omnifocu... | ofexport2 | positive | 547 |
private void writeTestMetric(AbstractOutputWriter writer) {
if (value < 10) {
value += 1;
} else {
value = 1;
}
try {
writer.writeQueryResult("jmxtransagentinputtest", null, value);
writer.writeQueryResult("second", null, value + 20);
tcpByteServer.readResponse = "ZBXA100000000{\"result\":\"success\"}".getBytes(Standar... | private void writeTestMetric(AbstractOutputWriter writer) {
<DeepExtract>
if (value < 10) {
value += 1;
} else {
value = 1;
}
</DeepExtract>
try {
writer.writeQueryResult("jmxtransagentinputtest", null, value);
writer.writeQueryResult("second", null, value + 20);
tcpByteServer.readResponse = "ZBXA100000000{\"result\":\... | jmxtrans-agent | positive | 548 |
@Override
@Deprecated
public void setMaxScale(float maxScale) {
mAttacher.setMaximumScale(maxScale);
} | @Override
@Deprecated
public void setMaxScale(float maxScale) {
<DeepExtract>
mAttacher.setMaximumScale(maxScale);
</DeepExtract>
} | AppleFramework | positive | 549 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity());
mUserLearnedDrawer = sp.getBoolean(PREF_USER_LEARNED_DRAWER, false);
if (savedInstanceState != null) {
mCurrentSelectedPosition = savedInst... | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity());
mUserLearnedDrawer = sp.getBoolean(PREF_USER_LEARNED_DRAWER, false);
if (savedInstanceState != null) {
mCurrentSelectedPosition = savedInst... | MonitoraBrasil | positive | 550 |
@Test
public void testEventResponse_createSharesRequested_requiredShareCountSetToEmptyAndAllOtherInputsAreValid() {
presenter.startPresenting().blockingGet();
requiredShareCountObservable.onNext(Optional.empty());
totalShareCountObservable.onNext(Optional.of(3));
secretFilePathObservable.onNext(Optional.of(secretFile.g... | @Test
public void testEventResponse_createSharesRequested_requiredShareCountSetToEmptyAndAllOtherInputsAreValid() {
presenter.startPresenting().blockingGet();
requiredShareCountObservable.onNext(Optional.empty());
totalShareCountObservable.onNext(Optional.of(3));
secretFilePathObservable.onNext(Optional.of(secretFile.g... | Shamir | positive | 551 |
private void printNpc() {
if (!deps.needsNpc()) {
return;
}
out.print(FileUtil.readResource(NPC_HPP));
} | private void printNpc() {
if (!deps.needsNpc()) {
return;
}
<DeepExtract>
out.print(FileUtil.readResource(NPC_HPP));
</DeepExtract>
} | j2c | positive | 552 |
@Override
public void restoreMemento(Memento memento) {
this.valor = memento.getValor();
this.cadena = memento.getCadena();
} | @Override
public void restoreMemento(Memento memento) {
this.valor = memento.getValor();
<DeepExtract>
this.cadena = memento.getCadena();
</DeepExtract>
} | apaw | positive | 553 |
@Override
public void onClick(View view) {
startActivityForResult(AuthUI.getInstance().createSignInIntentBuilder().setTheme(getSelectedTheme()).setLogo(getSelectedLogo()).setProviders(getSelectedProviders()).setTosUrl(getSelectedTosUrl()).setIsSmartLockEnabled(true).build(), RC_SIGN_IN);
} | @Override
public void onClick(View view) {
<DeepExtract>
startActivityForResult(AuthUI.getInstance().createSignInIntentBuilder().setTheme(getSelectedTheme()).setLogo(getSelectedLogo()).setProviders(getSelectedProviders()).setTosUrl(getSelectedTosUrl()).setIsSmartLockEnabled(true).build(), RC_SIGN_IN);
</DeepExtract>
} | UPES-SPE-Fest | positive | 554 |
@Override
public void run() {
if (!mGoToTopFadeInAnimator.isRunning()) {
if (mGoToTopFadeOutAnimator.isRunning()) {
mGoToTopFadeOutAnimator.cancel();
}
mGoToTopFadeInAnimator.setFloatValues(mGoToTopView.getAlpha(), 1.0f);
mGoToTopFadeInAnimator.start();
}
} | @Override
public void run() {
<DeepExtract>
if (!mGoToTopFadeInAnimator.isRunning()) {
if (mGoToTopFadeOutAnimator.isRunning()) {
mGoToTopFadeOutAnimator.cancel();
}
mGoToTopFadeInAnimator.setFloatValues(mGoToTopView.getAlpha(), 1.0f);
mGoToTopFadeInAnimator.start();
}
</DeepExtract>
} | SamsungOneUi | positive | 555 |
public void assertEqual(long constant, BitVector a) {
if (a == Lit.True || a == Lit.False)
return;
if (a == null) {
throw new NullPointerException("Literal is null");
} else if (a.l < 0) {
throw new IllegalArgumentException("Literal " + a.toString() + " is not a valid literal.");
} else if (a.solver != this) {
throw ne... | public void assertEqual(long constant, BitVector a) {
if (a == Lit.True || a == Lit.False)
return;
if (a == null) {
throw new NullPointerException("Literal is null");
} else if (a.l < 0) {
throw new IllegalArgumentException("Literal " + a.toString() + " is not a valid literal.");
} else if (a.solver != this) {
throw ne... | monosat | positive | 556 |
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_recycler_view, container, false);
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
mRecyclerView.addItemDecoration(new BallotRecyclerViewDecor... | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_recycler_view, container, false);
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
mRecyclerView.addItemDecoration(new BallotRecyclerViewDecor... | android-white-label-app | positive | 557 |
public synchronized void onResume() {
if (registered) {
Log.w(TAG, "PowerStatusReceiver was already registered?");
} else {
activity.registerReceiver(powerStatusReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
registered = true;
}
cancel();
inactivityTask = new InactivityAsyncTask();
if (Build.VERSION.SDK_IN... | public synchronized void onResume() {
if (registered) {
Log.w(TAG, "PowerStatusReceiver was already registered?");
} else {
activity.registerReceiver(powerStatusReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
registered = true;
}
<DeepExtract>
cancel();
inactivityTask = new InactivityAsyncTask();
if (Build.... | RetrofitAndRxjavaforRecyclerview | positive | 558 |
@LargeTest
public void testWithInvalidPassword() throws Exception {
solo.assertCurrentActivity("Expected Login Activity", LoginActivity.class);
solo.enterText(0, Account.USERNAME);
solo.enterText(1, "blah");
solo.clickOnButton("Log In");
solo.waitForDialogToClose(DIALOG_TIMEOUT);
solo.assertCurrentActivity("Expected Lo... | @LargeTest
public void testWithInvalidPassword() throws Exception {
solo.assertCurrentActivity("Expected Login Activity", LoginActivity.class);
<DeepExtract>
solo.enterText(0, Account.USERNAME);
solo.enterText(1, "blah");
solo.clickOnButton("Log In");
</DeepExtract>
solo.waitForDialogToClose(DIALOG_TIMEOUT);
solo.asser... | musicbrainz-android | positive | 560 |
@Override
public synchronized int read() {
bitOffset = 0;
return (streamPos < count) ? (buf[(int) (streamPos++)] & 0xff) : -1;
} | @Override
public synchronized int read() {
<DeepExtract>
bitOffset = 0;
</DeepExtract>
return (streamPos < count) ? (buf[(int) (streamPos++)] & 0xff) : -1;
} | monte-screen-recorder | positive | 561 |
@Override
public void onCancel(DialogInterface dialogInterface) {
activityToFinish.finish();
} | @Override
public void onCancel(DialogInterface dialogInterface) {
<DeepExtract>
activityToFinish.finish();
</DeepExtract>
} | MVPLibrary | positive | 562 |
@Override
protected Control createDialogArea(Composite parent) {
this.parentContainer = parent;
Composite container = (Composite) super.createDialogArea(parent);
final int layoutMargin = 10;
GridLayout layout = new GridLayout(1, false);
layout.marginTop = layoutMargin;
layout.marginLeft = layoutMargin;
layout.marginBot... | @Override
protected Control createDialogArea(Composite parent) {
this.parentContainer = parent;
Composite container = (Composite) super.createDialogArea(parent);
final int layoutMargin = 10;
GridLayout layout = new GridLayout(1, false);
layout.marginTop = layoutMargin;
layout.marginLeft = layoutMargin;
layout.marginBot... | watchdog | positive | 563 |
@Override
public void deleteCustomCredentials() {
logger.debug("Deleting custom credentials file {}", customCredentialsPath);
asUnchecked(() -> deleteIfExists(customCredentialsPath));
hashOfConfiguredCredentials = configuredToUseCustomCredentials() ? crc32(getAsUnchecked(() -> customCredentialsPath.toUri().toURL())) : ... | @Override
public void deleteCustomCredentials() {
logger.debug("Deleting custom credentials file {}", customCredentialsPath);
asUnchecked(() -> deleteIfExists(customCredentialsPath));
<DeepExtract>
hashOfConfiguredCredentials = configuredToUseCustomCredentials() ? crc32(getAsUnchecked(() -> customCredentialsPath.toUri(... | jiotty-photos-uploader | positive | 564 |
public static boolean hasBusyBox() {
for (String path : SU_BINARY_PATH) {
File file = new File(path, BUSYBOX);
if (file.exists()) {
return true;
}
}
return false;
} | public static boolean hasBusyBox() {
<DeepExtract>
for (String path : SU_BINARY_PATH) {
File file = new File(path, BUSYBOX);
if (file.exists()) {
return true;
}
}
return false;
</DeepExtract>
} | apptoolkit | positive | 566 |
@Override
public boolean isMultipart() {
if (destroyed) {
throw new IllegalStateException(HttpPostMultipartRequestDecoder.class.getSimpleName() + " was destroyed already");
}
return true;
} | @Override
public boolean isMultipart() {
<DeepExtract>
if (destroyed) {
throw new IllegalStateException(HttpPostMultipartRequestDecoder.class.getSimpleName() + " was destroyed already");
}
</DeepExtract>
return true;
} | dorado | positive | 567 |
private DotElement handleDotRow(int y, DotRowHandler h) {
Map<Integer, DotElement> row = foods.get(Integer.valueOf(y));
if (row == null) {
return null;
}
return row.get(Integer.valueOf(x));
} | private DotElement handleDotRow(int y, DotRowHandler h) {
Map<Integer, DotElement> row = foods.get(Integer.valueOf(y));
if (row == null) {
return null;
}
<DeepExtract>
return row.get(Integer.valueOf(x));
</DeepExtract>
} | google-pacman | positive | 568 |
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Bundle args = getArguments();
pickerId = args.getInt(ARG_PICKER_ID);
title = args.getString(ARG_TITLE);
positiveButtonText = args.getString(ARG_POSITIVE_BUTTON_TEXT);
negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON_TEXT);
enableMultipleSe... | @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
<DeepExtract>
final Bundle args = getArguments();
pickerId = args.getInt(ARG_PICKER_ID);
title = args.getString(ARG_TITLE);
positiveButtonText = args.getString(ARG_POSITIVE_BUTTON_TEXT);
negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON_TEXT);
en... | MVPAndroidBootstrap | positive | 569 |
@Override
public MonetaryAmount apply(MonetaryAmount amount) {
Objects.requireNonNull(amount, "Amount required");
Objects.requireNonNull(rate, "Rate required");
return amount.divide(rate.get());
} | @Override
public MonetaryAmount apply(MonetaryAmount amount) {
<DeepExtract>
Objects.requireNonNull(amount, "Amount required");
Objects.requireNonNull(rate, "Rate required");
return amount.divide(rate.get());
</DeepExtract>
} | javamoney-lib | positive | 570 |
@Test
public void iteratorDirectory() throws IOException {
AmazonS3ClientMock client = AmazonS3MockFactory.getAmazonClientMock();
client.bucket("bucketA").dir("dir").file("dir/file1");
S3FileSystem s3FileSystem = (S3FileSystem) FileSystems.getFileSystem(endpoint);
S3Path path = s3FileSystem.getPath("/bucketA", "dir");
... | @Test
public void iteratorDirectory() throws IOException {
AmazonS3ClientMock client = AmazonS3MockFactory.getAmazonClientMock();
client.bucket("bucketA").dir("dir").file("dir/file1");
S3FileSystem s3FileSystem = (S3FileSystem) FileSystems.getFileSystem(endpoint);
S3Path path = s3FileSystem.getPath("/bucketA", "dir");
... | nifi-minio | positive | 573 |
public void run() {
dbHelper.DeleteImagePreview();
dbHelper.CreateImagePreview(mContext);
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(mContext);
SharedPreferences.Editor editor = sharedPref.edit();
editor.putBoolean(Constants.REFRESH, true);
editor.apply();
if (pDialog.isShowing())
pDia... | public void run() {
dbHelper.DeleteImagePreview();
dbHelper.CreateImagePreview(mContext);
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(mContext);
SharedPreferences.Editor editor = sharedPref.edit();
editor.putBoolean(Constants.REFRESH, true);
editor.apply();
<DeepExtract>
if (pDialog.isS... | Rocket-Notes | positive | 574 |
@Test
public void testTransactions() throws Exception {
try (TimeRecordAuto tra = new TimeRecordAuto("test_transaction")) {
System.out.println("Test tx: " + "85db49cb288f3a92168fae9f4bf155279f7d5418636c9ef04e9fdc1b7f5fa024");
Transaction tx = jelly.getDB().getTransaction(Sha256Hash.wrap("85db49cb288f3a92168fae9f4bf1552... | @Test
public void testTransactions() throws Exception {
try (TimeRecordAuto tra = new TimeRecordAuto("test_transaction")) {
System.out.println("Test tx: " + "85db49cb288f3a92168fae9f4bf155279f7d5418636c9ef04e9fdc1b7f5fa024");
Transaction tx = jelly.getDB().getTransaction(Sha256Hash.wrap("85db49cb288f3a92168fae9f4bf1552... | jelectrum | positive | 575 |
@Override
public void onShowMessage(@NonNull String msg) {
if (getProgressDialog().isShowing())
getProgressDialog().dismiss();
Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
} | @Override
public void onShowMessage(@NonNull String msg) {
<DeepExtract>
if (getProgressDialog().isShowing())
getProgressDialog().dismiss();
</DeepExtract>
Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
} | FastAccess | positive | 576 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.