before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Override public void authenticated(XMPPConnection connection, boolean resumed) { super.authenticated(connection, resumed); Preferences.getInstance().setLoggedIn(true); mConnectionPublisher.onNext(new ChatConnection(ChatConnection.ChatConnectionStatus.Authenticated)); if (mXMPPConnection.isAuthenticated()) { new Thread...
@Override public void authenticated(XMPPConnection connection, boolean resumed) { super.authenticated(connection, resumed); Preferences.getInstance().setLoggedIn(true); mConnectionPublisher.onNext(new ChatConnection(ChatConnection.ChatConnectionStatus.Authenticated)); if (mXMPPConnection.isAuthenticated()) { new Thread...
mangosta-android
positive
6,033
public void scale(float sx, float sy, float x, float y) { apply(1, 0, x, 0, 1, y); scale(sx, sy); apply(1, 0, -x, 0, 1, -y); }
public void scale(float sx, float sy, float x, float y) { apply(1, 0, x, 0, 1, y); scale(sx, sy); <DeepExtract> apply(1, 0, -x, 0, 1, -y); </DeepExtract> }
geomerative
positive
6,034
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); VerticalGridPresenter presenter = new VerticalGridPresenter(); presenter.setNumberOfColumns(3); setGridPresenter(presenter); ArrayObjectAdapter adapter = new ArrayObjectAdapter(new CardPresenter()); adapter.addAll(0, MovieLi...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); VerticalGridPresenter presenter = new VerticalGridPresenter(); presenter.setNumberOfColumns(3); setGridPresenter(presenter); <DeepExtract> ArrayObjectAdapter adapter = new ArrayObjectAdapter(new CardPresenter()); adapter.add...
BuildingForAndroidTV
positive
6,037
@Override public String format(LoggingEvent event) { final StringBuffer buf = new StringBuffer(128); buf.append('['); final int millis = (int) (event.getTimeStamp() % 1000); final long rounded = event.getTimeStamp() - millis; if (rounded != lastTimeMillis) { synchronized (calendar) { final int start = buf.length(); cal...
@Override public String format(LoggingEvent event) { final StringBuffer buf = new StringBuffer(128); buf.append('['); final int millis = (int) (event.getTimeStamp() % 1000); final long rounded = event.getTimeStamp() - millis; if (rounded != lastTimeMillis) { synchronized (calendar) { final int start = buf.length(); cal...
mini-git-server
positive
6,038
public Docopt withVersion(final InputStream stream) { return read(stream, "UTF-8"); return this; }
public Docopt withVersion(final InputStream stream) { <DeepExtract> return read(stream, "UTF-8"); </DeepExtract> return this; }
ldbc-snb-impls
positive
6,039
private void init() { if (geo == null) { geo = app.startGeo(activity, geoUpdate, base, settings, warning, 0, 0); } if (settings.livelist == 1 && settings.useCompass == 1 && dir == null) { dir = app.startDir(activity, dirUpdate, warning); } if (cacheList != null) { base.setTitle(activity, title); } if (cacheList != null...
private void init() { if (geo == null) { geo = app.startGeo(activity, geoUpdate, base, settings, warning, 0, 0); } if (settings.livelist == 1 && settings.useCompass == 1 && dir == null) { dir = app.startDir(activity, dirUpdate, warning); } if (cacheList != null) { base.setTitle(activity, title); } if (cacheList != null...
c-geo
positive
6,040
@Override public Object[] getNullableResult(ResultSet rs, String columnName) throws SQLException { if (rs.getArray(columnName) == null) { return new Object[0]; } try { Object[] value = (Object[]) rs.getArray(columnName).getArray(); if (value instanceof Short[]) { Integer[] tmp = new Integer[value.length]; for (int i = ...
@Override public Object[] getNullableResult(ResultSet rs, String columnName) throws SQLException { <DeepExtract> if (rs.getArray(columnName) == null) { return new Object[0]; } try { Object[] value = (Object[]) rs.getArray(columnName).getArray(); if (value instanceof Short[]) { Integer[] tmp = new Integer[value.length];...
base-spring-boot
positive
6,041
public Criteria andCreateTimeIn(List<Date> values) { if (values == null) { throw new RuntimeException("Value for " + "createTime" + " cannot be null"); } criteria.add(new Criterion("create_time in", values)); return (Criteria) this; }
public Criteria andCreateTimeIn(List<Date> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "createTime" + " cannot be null"); } criteria.add(new Criterion("create_time in", values)); </DeepExtract> return (Criteria) this; }
springboot-weixin-alipay
positive
6,043
@Override public void run() { contentView.setSystemUiVisibility(getSystemUiVisibilityHideFlags()); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { Window window = getActivity().getWindow(); WindowInsetsController controller = window.getInsetsController(); if (controller != null) { controller.hide(WindowInsets.Typ...
@Override public void run() { <DeepExtract> contentView.setSystemUiVisibility(getSystemUiVisibilityHideFlags()); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { Window window = getActivity().getWindow(); WindowInsetsController controller = window.getInsetsController(); if (controller != null) { controller.hide(Wi...
ImgurViewer
positive
6,044
private void jButtonOCRActionPerformed(java.awt.event.ActionEvent evt) { }
private void jButtonOCRActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> </DeepExtract> }
VietOCR3
positive
6,045
public void actionPerformed(ActionEvent e) { int numberOfModels; try { if (Button3SubsTypeCalcLike.isSelected()) numberOfModels = 3; else if (Button5SubsTypeCalcLike.isSelected()) numberOfModels = 5; else if (Button7SubsTypeCalcLike.isSelected()) numberOfModels = 7; else if (Button11SubsTypeCalcLike.isSelected()) numbe...
public void actionPerformed(ActionEvent e) { <DeepExtract> int numberOfModels; try { if (Button3SubsTypeCalcLike.isSelected()) numberOfModels = 3; else if (Button5SubsTypeCalcLike.isSelected()) numberOfModels = 5; else if (Button7SubsTypeCalcLike.isSelected()) numberOfModels = 7; else if (Button11SubsTypeCalcLike.isSel...
jmodeltest2
positive
6,046
public Future<Long> incr(K key) { CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key); return dispatch(INCR, new IntegerOutput<K, V>(codec), args); }
public Future<Long> incr(K key) { <DeepExtract> CommandArgs<K, V> args = new CommandArgs<K, V>(codec).addKey(key); return dispatch(INCR, new IntegerOutput<K, V>(codec), args); </DeepExtract> }
lettuce
positive
6,047
@Override public OAuth2Authentication loadAuthentication(String accessToken) throws AuthenticationException, InvalidTokenException { Map<String, Object> map; logger.debug("Getting user info from: " + userInfoEndpointUrl); try { OAuth2RestOperations restTemplate = this.restTemplate; if (restTemplate == null) { BaseOAuth...
@Override public OAuth2Authentication loadAuthentication(String accessToken) throws AuthenticationException, InvalidTokenException { Map<String, Object> map; logger.debug("Getting user info from: " + userInfoEndpointUrl); try { OAuth2RestOperations restTemplate = this.restTemplate; if (restTemplate == null) { BaseOAuth...
DAFramework
positive
6,048
public <E> E restExchange(String url, boolean isRetry, Class<E> bodyClass) { if (isRetry) { logger.info("restExchange retry: " + url); } if (connected() && cookieValid()) { return; } logger.info("logging in"); final String loginUrl = baseUrl + "/user/login?_format=json&="; MultiValueMap<String, String> loginHeaders = n...
public <E> E restExchange(String url, boolean isRetry, Class<E> bodyClass) { if (isRetry) { logger.info("restExchange retry: " + url); } <DeepExtract> if (connected() && cookieValid()) { return; } logger.info("logging in"); final String loginUrl = baseUrl + "/user/login?_format=json&="; MultiValueMap<String, String> lo...
CRD
positive
6,050
@Override public void onReceive(Context context, Intent intent) { }
@Override <DeepExtract> </DeepExtract> public void onReceive(Context context, Intent intent) { <DeepExtract> </DeepExtract> }
ProjectX
positive
6,051
private void configPlatforms() { String appId = "1104825624"; String appKey = "vDkmHGzG4nC0iufF"; UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(ShareBaseActivity.this, appId, appKey); qqSsoHandler.setTargetUrl(shareUrl); qqSsoHandler.setTitle(title); qqSsoHandler.addToSocialSDK(); QZoneSsoHandler qZoneSsoHandler = n...
private void configPlatforms() { String appId = "1104825624"; String appKey = "vDkmHGzG4nC0iufF"; UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(ShareBaseActivity.this, appId, appKey); qqSsoHandler.setTargetUrl(shareUrl); qqSsoHandler.setTitle(title); qqSsoHandler.addToSocialSDK(); QZoneSsoHandler qZoneSsoHandler = n...
WecenterMobileAndroidRestructure
positive
6,052
@Override public String getSessionID() { if (isDebug) { Log.d(TAG, "getSessionID() invoked!"); } return UCGameSDK.defaultSDK().getSid(); }
@Override public String getSessionID() { <DeepExtract> if (isDebug) { Log.d(TAG, "getSessionID() invoked!"); } </DeepExtract> return UCGameSDK.defaultSDK().getSid(); }
HelloRuby
positive
6,053
@Ignore("New geckodriver") @Test public void itShouldBePossibleToSignUp() { goToLogin(); try { final String migrationLightboxSelector = "#migration_lightbox"; final FluentWebElement migrationLightbox = browser.find(migrationLightboxSelector).first(); migrationLightbox.find(".mfp-close").click(); browser.await().atMost(...
@Ignore("New geckodriver") @Test public void itShouldBePossibleToSignUp() { <DeepExtract> goToLogin(); try { final String migrationLightboxSelector = "#migration_lightbox"; final FluentWebElement migrationLightbox = browser.find(migrationLightboxSelector).first(); migrationLightbox.find(".mfp-close").click(); browser.a...
play-authenticate
positive
6,054
public Criteria andTagIsNull() { if ("tag is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("tag is null")); return (Criteria) this; }
public Criteria andTagIsNull() { <DeepExtract> if ("tag is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("tag is null")); </DeepExtract> return (Criteria) this; }
community
positive
6,055
@Override public <T> T findByPartialTextContent(Class<T> type, String partialTextContent) { By by = new ByPartialVisibleText(partialTextContent); if (!Element.class.isAssignableFrom(type)) { throw new DarcyException("An ElementContext can only locate Element types: " + type.toString()); } return (T) elementMap.get((Cla...
@Override public <T> T findByPartialTextContent(Class<T> type, String partialTextContent) { By by = new ByPartialVisibleText(partialTextContent); <DeepExtract> if (!Element.class.isAssignableFrom(type)) { throw new DarcyException("An ElementContext can only locate Element types: " + type.toString()); } return (T) eleme...
darcy-webdriver
positive
6,056
@Override public void run() { BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); out = new DataOutputStream(conn.getOutputStream()); if (keepAlive) { if (closeOnDead) { (new Thread(getName() + ":init") { @Override public void run() { println(ALIVE); try { Thread.sleep(TIMEOUT); } catc...
@Override public void run() { BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); out = new DataOutputStream(conn.getOutputStream()); if (keepAlive) { if (closeOnDead) { (new Thread(getName() + ":init") { @Override public void run() { println(ALIVE); try { Thread.sleep(TIMEOUT); } catc...
fjage
positive
6,057
@Test public void test_inner_for_over_empty_input() { assertThat(TemplateParser.DEFAULT.parse("{% for a in (1..2) %}o{% for b in empty %} {% endfor %}{% endfor %}").render(), is("oo")); }
@Test public void test_inner_for_over_empty_input() { <DeepExtract> assertThat(TemplateParser.DEFAULT.parse("{% for a in (1..2) %}o{% for b in empty %} {% endfor %}{% endfor %}").render(), is("oo")); </DeepExtract> }
Liqp
positive
6,058
public synchronized boolean connect(T device, BleConnectCallback<T> callback) { connectCallback = callback; if (device == null) { doConnectException(null, BleStates.DeviceNull); return false; } if (device.isConnecting()) { return false; } if (!Ble.getInstance().isBleEnable()) { doConnectException(device, BleStates.Blue...
public synchronized boolean connect(T device, BleConnectCallback<T> callback) { connectCallback = callback; if (device == null) { doConnectException(null, BleStates.DeviceNull); return false; } if (device.isConnecting()) { return false; } if (!Ble.getInstance().isBleEnable()) { doConnectException(device, BleStates.Blue...
Android-BLE
positive
6,059
private void SetInnerBounds() { int X = getVirtBounds().centerX() + (int) ((axises[0]) * (getVirtBounds().width() / 2)); int Y = getVirtBounds().centerY() + (int) ((axises[1]) * (getVirtBounds().height() / 2)); if (X > getVirtBounds().centerX() + (getVirtBounds().width() / 2)) X = getVirtBounds().centerX() + (getVirtBo...
private void SetInnerBounds() { int X = getVirtBounds().centerX() + (int) ((axises[0]) * (getVirtBounds().width() / 2)); int Y = getVirtBounds().centerY() + (int) ((axises[1]) * (getVirtBounds().height() / 2)); if (X > getVirtBounds().centerX() + (getVirtBounds().width() / 2)) X = getVirtBounds().centerX() + (getVirtBo...
citra_android
positive
6,060
public static Locale resolveLocale(Locale localeFromClient) { final String localeFromAppOption = System.getProperty(AppOptions.LOCALE); Locale locale; if (localeFromAppOption == null) localeFromAppOption = ""; localeFromAppOption = localeFromAppOption.toLowerCase(); switch(localeFromAppOption) { case "ja": case "jp": l...
public static Locale resolveLocale(Locale localeFromClient) { final String localeFromAppOption = System.getProperty(AppOptions.LOCALE); <DeepExtract> Locale locale; if (localeFromAppOption == null) localeFromAppOption = ""; localeFromAppOption = localeFromAppOption.toLowerCase(); switch(localeFromAppOption) { case "ja"...
civilizer
positive
6,061
public void eventObserver(@Observes MicroservicesStartedEvent event) { return "normal"; return "normal"; return "normal"; semaphore.release(); }
public void eventObserver(@Observes MicroservicesStartedEvent event) { <DeepExtract> return "normal"; </DeepExtract> return "normal"; <DeepExtract> return "normal"; </DeepExtract> semaphore.release(); }
SilverWare
positive
6,062
private void initComponents(int centerX, int centerY) { if (new RLetter(centerX - 480, centerY) != null) { mLetters.add(new RLetter(centerX - 480, centerY)); } if (new ELetter(centerX - 340, centerY) != null) { mLetters.add(new ELetter(centerX - 340, centerY)); } if (new ALetter(centerX - 200, centerY) != null) { mLett...
private void initComponents(int centerX, int centerY) { if (new RLetter(centerX - 480, centerY) != null) { mLetters.add(new RLetter(centerX - 480, centerY)); } if (new ELetter(centerX - 340, centerY) != null) { mLetters.add(new ELetter(centerX - 340, centerY)); } if (new ALetter(centerX - 200, centerY) != null) { mLett...
ReadMark
positive
6,063
@Deprecated public void concatenate2CTM(AffineTransform at) throws IOException { writeAffineTransform(new Matrix(at).createAffineTransform()); writeOperator("cm"); }
@Deprecated public void concatenate2CTM(AffineTransform at) throws IOException { <DeepExtract> writeAffineTransform(new Matrix(at).createAffineTransform()); writeOperator("cm"); </DeepExtract> }
pint-publisher
positive
6,064
public synchronized String getCookie(WebAddress uri) { if (!mAcceptCookie || uri == null) { return null; } String[] hostAndPath; if (uri.getHost() != null && uri.getPath() != null) { String[] ret = new String[2]; ret[0] = uri.getHost().toLowerCase(); ret[1] = uri.getPath(); int index = ret[0].indexOf(PERIOD); if (index...
public synchronized String getCookie(WebAddress uri) { if (!mAcceptCookie || uri == null) { return null; } String[] hostAndPath; if (uri.getHost() != null && uri.getPath() != null) { String[] ret = new String[2]; ret[0] = uri.getHost().toLowerCase(); ret[1] = uri.getPath(); int index = ret[0].indexOf(PERIOD); if (index...
MyHttp
positive
6,065
public synchronized void start() { if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } if (mAcceptThread == null) { mAcceptThread = new AcceptThread(); mAcceptThread.start(); } mState = STATE_LISTEN; mHandl...
public synchronized void start() { if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } if (mAcceptThread == null) { mAcceptThread = new AcceptThread(); mAcceptThread.start(); } <DeepExtract> mState = STATE_...
TaxiLbs
positive
6,067
private void removeConnection() { int idx = list.getSelectedIndex(); if (idx < 0) return; configProvider.getConfig().getConnections().remove(idx); configProvider.writeConfig(); this.model.setElements(configProvider.getConfig().getConnections()); }
private void removeConnection() { int idx = list.getSelectedIndex(); if (idx < 0) return; configProvider.getConfig().getConnections().remove(idx); configProvider.writeConfig(); <DeepExtract> this.model.setElements(configProvider.getConfig().getConnections()); </DeepExtract> }
fsbrowser
positive
6,069
public Criteria andAddressLessThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address <=", value)); return (Criteria) this; }
public Criteria andAddressLessThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address <=", value)); </DeepExtract> return (Criteria) this; }
Hospital
positive
6,070
public void delete(Long id) throws Exception { return tagRepository.updateIsDelById(id, Boolean.TRUE); webProblemTagServiceImpl.deleteByTagId(id); webPaperTagServiceImpl.deleteByTagId(id); }
public void delete(Long id) throws Exception { <DeepExtract> return tagRepository.updateIsDelById(id, Boolean.TRUE); </DeepExtract> webProblemTagServiceImpl.deleteByTagId(id); webPaperTagServiceImpl.deleteByTagId(id); }
tiku
positive
6,071
public void add(int index, E element) { if (index > elementCount) { throw new ArrayIndexOutOfBoundsException(index + " > " + elementCount); } ensureCapacityHelper(elementCount + 1); System.arraycopy(elementData, index, elementData, index + 1, elementCount - index); elementData[index] = element; elementCount++; }
public void add(int index, E element) { <DeepExtract> if (index > elementCount) { throw new ArrayIndexOutOfBoundsException(index + " > " + elementCount); } ensureCapacityHelper(elementCount + 1); System.arraycopy(elementData, index, elementData, index + 1, elementCount - index); elementData[index] = element; elementCou...
ProjectStudy
positive
6,072
@Test void functionDoesNotExistNoException() throws PMException { pap -> { assertDoesNotThrow(() -> pap.pal().removeFunction("func")); }.run(new MemoryPAP()); try (Connection connection = testEnv.getConnection()) { PAP mysqlPAP = new MysqlPAP(connection); pap -> { assertDoesNotThrow(() -> pap.pal().removeFunction("func...
@Test void functionDoesNotExistNoException() throws PMException { <DeepExtract> pap -> { assertDoesNotThrow(() -> pap.pal().removeFunction("func")); }.run(new MemoryPAP()); try (Connection connection = testEnv.getConnection()) { PAP mysqlPAP = new MysqlPAP(connection); pap -> { assertDoesNotThrow(() -> pap.pal().remove...
policy-machine-core
positive
6,073
@Test public void shouldHandleDouble() { Codec<Double> doubleCodec = mapper.codecFor(primitive(DOUBLE)); assertThat(doubleCodec).isSameAs(mapper.cdouble); encodeAndDecode(doubleCodec, 0.0, "0x0000000000000000", 0.0); encodeAndDecode(doubleCodec, 86.765309, "0x4055b0fad2999568", 86.765309); encodeAndDecode(doubleCodec, ...
@Test public void shouldHandleDouble() { Codec<Double> doubleCodec = mapper.codecFor(primitive(DOUBLE)); assertThat(doubleCodec).isSameAs(mapper.cdouble); encodeAndDecode(doubleCodec, 0.0, "0x0000000000000000", 0.0); encodeAndDecode(doubleCodec, 86.765309, "0x4055b0fad2999568", 86.765309); encodeAndDecode(doubleCodec, ...
simulacron
positive
6,074
@Override public int user2uidx(I u) { return d.user2uidx(u); }
@Override public int user2uidx(I u) { <DeepExtract> return d.user2uidx(u); </DeepExtract> }
kNNBandit
positive
6,075
public Map<Bytes, List<CounterColumn>> getSubCounterColumnsFromRows(String columnFamily, List<Bytes> rowKeys, String superColName, boolean reversed, ConsistencyLevel cLevel) throws PelopsException { return getCounterColumnsFromRows(newColumnParent(newColumnParent(columnFamily, superColName)), rowKeys, columnsPredicateA...
public Map<Bytes, List<CounterColumn>> getSubCounterColumnsFromRows(String columnFamily, List<Bytes> rowKeys, String superColName, boolean reversed, ConsistencyLevel cLevel) throws PelopsException { <DeepExtract> return getCounterColumnsFromRows(newColumnParent(newColumnParent(columnFamily, superColName)), rowKeys, col...
scale7-pelops
positive
6,076
void writeBr(Token token) { if (requestedMoeBeginStripComment != null) { requestNewline(); } if (requestedWhitespace == BLANK_LINE && (postWriteModifiedContinuingListCount.isPositive() || continuingFooterTag)) { requestedWhitespace = NEWLINE; } if (requestedWhitespace == BLANK_LINE) { writeBlankLine(); requestedWhitesp...
void writeBr(Token token) { if (requestedMoeBeginStripComment != null) { requestNewline(); } if (requestedWhitespace == BLANK_LINE && (postWriteModifiedContinuingListCount.isPositive() || continuingFooterTag)) { requestedWhitespace = NEWLINE; } if (requestedWhitespace == BLANK_LINE) { writeBlankLine(); requestedWhitesp...
google-java-format
positive
6,077
public <X0, X1, X2, X3, X4, X5, X6, X7> Decade<A, B, X0, X1, X2, X3, X4, X5, X6, X7> add(final Octet<X0, X1, X2, X3, X4, X5, X6, X7> tuple) { return new Triplet<A, B, X0>(this.val0, this.val1, tuple); }
public <X0, X1, X2, X3, X4, X5, X6, X7> Decade<A, B, X0, X1, X2, X3, X4, X5, X6, X7> add(final Octet<X0, X1, X2, X3, X4, X5, X6, X7> tuple) { <DeepExtract> return new Triplet<A, B, X0>(this.val0, this.val1, tuple); </DeepExtract> }
nlp-lang
positive
6,080
@Test public void reuse() { DataSeries series = new DataSeries(); assertEquals(0, series.size()); series.addPoint(1, 2); assertEquals(1, series.size()); DataSeries series = new DataSeries(); assertEquals(0, series.size()); series.addPoint(1, 2); assertEquals(1, series.size()); series.reset(); assertEquals(0, series.siz...
@Test public void reuse() { DataSeries series = new DataSeries(); assertEquals(0, series.size()); series.addPoint(1, 2); assertEquals(1, series.size()); <DeepExtract> DataSeries series = new DataSeries(); assertEquals(0, series.size()); series.addPoint(1, 2); assertEquals(1, series.size()); series.reset(); assertEquals...
BASElineFlightComputer
positive
6,081
public CursoredList<Long> getFollowerIds(long userId) { requireEitherUserOrAppAuthorization(); LinkedMultiValueMap<String, String> parameters = new LinkedMultiValueMap<String, String>(); parameters.set("cursor", String.valueOf(-1)); parameters.set("user_id", String.valueOf(userId)); return restTemplate.getForObject(bui...
public CursoredList<Long> getFollowerIds(long userId) { <DeepExtract> requireEitherUserOrAppAuthorization(); LinkedMultiValueMap<String, String> parameters = new LinkedMultiValueMap<String, String>(); parameters.set("cursor", String.valueOf(-1)); parameters.set("user_id", String.valueOf(userId)); return restTemplate.ge...
spring-social-twitter
positive
6,082
public static void main(String[] args) { int N = 4; printProcess(1, N, true); }
public static void main(String[] args) { int N = 4; <DeepExtract> printProcess(1, N, true); </DeepExtract> }
ZuoChengyun
positive
6,083
public void cardsChanged() { if (stack != null) { setEmptyViewsVisible(stack.getNumberOfCards() == 0); emptyTextView.setText("Add a Card to \"" + stack.getName() + "\""); } else { setEmptyViewsVisible(true); emptyTextView.setText("First select a stack!"); } cardList.setFastScrollAlwaysVisible(stack.getNumberOfCards() >...
public void cardsChanged() { <DeepExtract> if (stack != null) { setEmptyViewsVisible(stack.getNumberOfCards() == 0); emptyTextView.setText("Add a Card to \"" + stack.getName() + "\""); } else { setEmptyViewsVisible(true); emptyTextView.setText("First select a stack!"); } </DeepExtract> cardList.setFastScrollAlwaysVisib...
Stacks-Flashcards
positive
6,084
public void onClick(DialogInterface dialog, int which) { if (PathfinderOpenReferenceActivity.isTabletLayout(getActivity())) { SectionListFragment list = (SectionListFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.section_list_fragment); list.refresh(dbWrangler); } else { Intent showContent = n...
public void onClick(DialogInterface dialog, int which) { <DeepExtract> if (PathfinderOpenReferenceActivity.isTabletLayout(getActivity())) { SectionListFragment list = (SectionListFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.section_list_fragment); list.refresh(dbWrangler); } else { Intent s...
PathfinderOpenReference
positive
6,085
static boolean glob(byte[] pattern, byte[] name) { if (name.length > 0 && name[0] == '.') { if (pattern.length > 0 && pattern[0] == '.') { if (pattern.length == 2 && pattern[1] == '*') return true; return glob(pattern, 0 + 1, name, 0 + 1); } return false; } return glob(pattern, 0, name, 0); }
static boolean glob(byte[] pattern, byte[] name) { <DeepExtract> if (name.length > 0 && name[0] == '.') { if (pattern.length > 0 && pattern[0] == '.') { if (pattern.length == 2 && pattern[1] == '*') return true; return glob(pattern, 0 + 1, name, 0 + 1); } return false; } return glob(pattern, 0, name, 0); </DeepExtract>...
sshxcute
positive
6,086
private void postMetricFromEvent(JetstreamEvent event) { MetricDef metricDef = new MetricDef(); metricDef.setMetricName((String) event.get(VALIDATION_TYPE)); Long time = (Long) event.get("timestamp"); if (currentMaxTime < time) { currentMaxTime = time; } long metricTime = (time / ONE_HOUR) * ONE_HOUR; try { String grou...
private void postMetricFromEvent(JetstreamEvent event) { MetricDef metricDef = new MetricDef(); metricDef.setMetricName((String) event.get(VALIDATION_TYPE)); Long time = (Long) event.get("timestamp"); if (currentMaxTime < time) { currentMaxTime = time; } long metricTime = (time / ONE_HOUR) * ONE_HOUR; try { String grou...
realtime-analytics
positive
6,087
@Override public boolean preRotate(float degrees) { throw new IllegalStateException("Matrix can not be modified"); return false; }
@Override public boolean preRotate(float degrees) { <DeepExtract> throw new IllegalStateException("Matrix can not be modified"); </DeepExtract> return false; }
Transitions-Everywhere
positive
6,089
@Test public void resolveViewNameTabletDeviceNormalPrefixForwardToAbsoluteUrl() throws Exception { this.viewName = "forward:https://spring.io"; device.setDeviceType(DeviceType.TABLET); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); viewResolver.setTabletPrefix("tablet/"); expect(delegateViewResolve...
@Test public void resolveViewNameTabletDeviceNormalPrefixForwardToAbsoluteUrl() throws Exception { this.viewName = "forward:https://spring.io"; device.setDeviceType(DeviceType.TABLET); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); viewResolver.setTabletPrefix("tablet/"); <DeepExtract> expect(deleg...
spring-mobile
positive
6,090
public void trace(final String message) { System.out.println(message); }
public void trace(final String message) { <DeepExtract> System.out.println(message); </DeepExtract> }
log4jdbc
positive
6,091
@Test void Success() throws PMException { pap -> { pap.graph().createObjectAttribute("oa1", SUPER_OA); pap.graph().createObjectAttribute("oa2", toProperties("k", "v"), SUPER_OA, "oa1"); assertTrue(pap.graph().nodeExists("oa1")); assertTrue(pap.graph().nodeExists("oa2")); assertEquals("v", pap.graph().getNode("oa2").get...
@Test void Success() throws PMException { <DeepExtract> pap -> { pap.graph().createObjectAttribute("oa1", SUPER_OA); pap.graph().createObjectAttribute("oa2", toProperties("k", "v"), SUPER_OA, "oa1"); assertTrue(pap.graph().nodeExists("oa1")); assertTrue(pap.graph().nodeExists("oa2")); assertEquals("v", pap.graph().getN...
policy-machine-core
positive
6,092
boolean remove(K key, boolean mutateLocal) { if (isClosed()) throw new IllegalStateException("Cache already closed: " + tcache.id()); kvUtil.verifyKeyNotNull(key); final DeleteAction<K, V, Object> action; boolean twoArgRemove = (null != null); if (twoArgRemove) { AccessTimeObjectHolder<V> holder = tcache.peekHolder(key...
boolean remove(K key, boolean mutateLocal) { if (isClosed()) throw new IllegalStateException("Cache already closed: " + tcache.id()); kvUtil.verifyKeyNotNull(key); <DeepExtract> final DeleteAction<K, V, Object> action; boolean twoArgRemove = (null != null); if (twoArgRemove) { AccessTimeObjectHolder<V> holder = tcache....
triava
positive
6,093
private static Opcode[] getOpcodes() { Opcode[] op = new Opcode[1]; op[0] = getOpcodeUdt(0); return op; }
private static Opcode[] getOpcodes() { Opcode[] op = new Opcode[1]; <DeepExtract> op[0] = getOpcodeUdt(0); </DeepExtract> return op; }
apg-java
positive
6,094
private long getLicenseGoodAfterDate(final Properties properties) { if (properties == null) { return this.parseDate(this.promptForString("Please enter an activation/good-after date for this license (YYYY-MM-DD hh:mm:ss or blank): ")); } if (properties.getProperty(ConsoleLicenseGenerator.PROPERTY_LICENSE_GOOD_AFTER_DATE...
private long getLicenseGoodAfterDate(final Properties properties) { if (properties == null) { return this.parseDate(this.promptForString("Please enter an activation/good-after date for this license (YYYY-MM-DD hh:mm:ss or blank): ")); } <DeepExtract> if (properties.getProperty(ConsoleLicenseGenerator.PROPERTY_LICENSE_G...
java-license-manager
positive
6,095
public static synchronized void create(String[] packages, boolean springOn) { webapp = new Webapp(packages, springOn); List<Class<?>> classes = new ArrayList<>(); for (ResourceRegister resourceRegister : ResourceRegisters.getInstance().getResourceRegisters()) { resourceRegister.register(); } try { for (String scanPacka...
public static synchronized void create(String[] packages, boolean springOn) { webapp = new Webapp(packages, springOn); <DeepExtract> List<Class<?>> classes = new ArrayList<>(); for (ResourceRegister resourceRegister : ResourceRegisters.getInstance().getResourceRegisters()) { resourceRegister.register(); } try { for (St...
dorado
positive
6,096
private void renderEffect(TextureManager manager, int x, int y) { GL11.glDepthFunc(GL11.GL_GREATER); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false); manager.bindTexture(field_110798_h); zLevel -= 50.0F; GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR); GL11.glColor4f(0.5F,...
private void renderEffect(TextureManager manager, int x, int y) { GL11.glDepthFunc(GL11.GL_GREATER); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false); manager.bindTexture(field_110798_h); zLevel -= 50.0F; GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR); GL11.glColor4f(0.5F,...
TinkersSteelworks
positive
6,097
List<Long> highScoresFromPreferencesForCurrentLevel() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); String scoresAsString = prefs.getString(highScorePrefsKeyForLevel(currentLevel), ""); if (scoresAsString.length() > 0) { try { String[] fields = scoresAsString.split(","); L...
List<Long> highScoresFromPreferencesForCurrentLevel() { <DeepExtract> SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); String scoresAsString = prefs.getString(highScorePrefsKeyForLevel(currentLevel), ""); if (scoresAsString.length() > 0) { try { String[] fields = scoresAsString...
Vector-Pinball
positive
6,098
@Restricted(DoNotUse.class) @RequirePOST public FormValidation doCheckName(@QueryParameter String value, @RelativePath("../..") @QueryParameter("endPointUrl") String endPointUrlCloud, @RelativePath("../../..") @QueryParameter("endPointUrl") String endPointUrlTemplate, @RelativePath("../..") @QueryParameter("ignoreSsl")...
@Restricted(DoNotUse.class) @RequirePOST public FormValidation doCheckName(@QueryParameter String value, @RelativePath("../..") @QueryParameter("endPointUrl") String endPointUrlCloud, @RelativePath("../../..") @QueryParameter("endPointUrl") String endPointUrlTemplate, @RelativePath("../..") @QueryParameter("ignoreSsl")...
openstack-cloud-plugin
positive
6,099
private void setNumCodes(int newNumCodes) { View list = findViewById(R.id.obd_list); if (list != null) { list.setBackgroundResource((newNumCodes & 0x80) != 0 ? R.drawable.mil_on : R.drawable.mil_off); } if (menu != null) { MenuItem item = menu.findItem(R.id.service_freezeframes); if (item != null) { item.setEnabled((ne...
private void setNumCodes(int newNumCodes) { View list = findViewById(R.id.obd_list); if (list != null) { list.setBackgroundResource((newNumCodes & 0x80) != 0 ? R.drawable.mil_on : R.drawable.mil_off); } <DeepExtract> if (menu != null) { MenuItem item = menu.findItem(R.id.service_freezeframes); if (item != null) { item....
AndrOBD
positive
6,100
@Override public final void renderForeground() { for (int i = 0; i < itemCount; i++) { plotShape(i); rotateShape(i); moveShape(i); } rotateRespawnPoint(); if (respawnShapeCount++ == respawnShapeLimit) { modifyEllipseShape(); } }
@Override public final void renderForeground() { for (int i = 0; i < itemCount; i++) { plotShape(i); rotateShape(i); moveShape(i); } <DeepExtract> rotateRespawnPoint(); if (respawnShapeCount++ == respawnShapeLimit) { modifyEllipseShape(); } </DeepExtract> }
DemoFX
positive
6,101
public static int compare(String a, String b) { Version versionA; try { Matcher matcher = pattern.matcher(a); if (matcher.matches()) versionA = new Version(Integer.parseInt(matcher.group(1)), Integer.parseInt(matcher.group(2)), false); matcher = patternWithBeta.matcher(a); if (matcher.matches()) versionA = new Version(...
public static int compare(String a, String b) { Version versionA; try { Matcher matcher = pattern.matcher(a); if (matcher.matches()) versionA = new Version(Integer.parseInt(matcher.group(1)), Integer.parseInt(matcher.group(2)), false); matcher = patternWithBeta.matcher(a); if (matcher.matches()) versionA = new Version(...
TheWitness-LockScreen
positive
6,103
@Override public void write(WriteBuffer buff, DatabaseKey key) { writeLength(buff, key.getValue().length()); buff.put(key.getValue().getBytes()); }
@Override public void write(WriteBuffer buff, DatabaseKey key) { <DeepExtract> writeLength(buff, key.getValue().length()); buff.put(key.getValue().getBytes()); </DeepExtract> }
claudb
positive
6,104
public void start() { if (mCacheDispatcher != null) { mCacheDispatcher.quit(); } for (int i = 0; i < mDispatchers.length; i++) { if (mDispatchers[i] != null) { mDispatchers[i].quit(); } } mCacheDispatcher = new CacheDispatcher(mCacheQueue, mNetworkQueue, mCache, mDelivery); mCacheDispatcher.start(); for (int i = 0; i <...
public void start() { <DeepExtract> if (mCacheDispatcher != null) { mCacheDispatcher.quit(); } for (int i = 0; i < mDispatchers.length; i++) { if (mDispatchers[i] != null) { mDispatchers[i].quit(); } } </DeepExtract> mCacheDispatcher = new CacheDispatcher(mCacheQueue, mNetworkQueue, mCache, mDelivery); mCacheDispatcher...
grapevine
positive
6,105
public Criteria andDeletedEqualTo(Byte value) { if (value == null) { throw new RuntimeException("Value for " + "deleted" + " cannot be null"); } criteria.add(new Criterion("deleted =", value)); return (Criteria) this; }
public Criteria andDeletedEqualTo(Byte value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "deleted" + " cannot be null"); } criteria.add(new Criterion("deleted =", value)); </DeepExtract> return (Criteria) this; }
springcloud-e-book
positive
6,106
private void md5Update(byte[] inbuf, int inputLen) { byte[] block = new byte[64]; int index = (int) (this.count[0] >>> 3) & 63; if ((this.count[0] += (long) (inputLen << 3)) < (long) (inputLen << 3)) { ++this.count[1]; } this.count[1] += (long) (inputLen >>> 29); int partLen = 64 - index; if (inputLen >= partLen) { thi...
private void md5Update(byte[] inbuf, int inputLen) { byte[] block = new byte[64]; int index = (int) (this.count[0] >>> 3) & 63; if ((this.count[0] += (long) (inputLen << 3)) < (long) (inputLen << 3)) { ++this.count[1]; } this.count[1] += (long) (inputLen >>> 29); int partLen = 64 - index; if (inputLen >= partLen) { thi...
goku-im
positive
6,107
public static boolean isSupportsSubTasks(TaskRepository repository) { String property = repository.getProperty(SUPPORTS_SUBTASKS); if (property == null) return false; return Boolean.parseBoolean(property); }
public static boolean isSupportsSubTasks(TaskRepository repository) { <DeepExtract> String property = repository.getProperty(SUPPORTS_SUBTASKS); if (property == null) return false; return Boolean.parseBoolean(property); </DeepExtract> }
mylyn-mantis
positive
6,108
public Criteria andBirthyearGreaterThanOrEqualTo(Date value) { if (value == null) { throw new RuntimeException("Value for " + "birthyear" + " cannot be null"); } addCriterion("birthYear >=", new java.sql.Date(value.getTime()), "birthyear"); return (Criteria) this; }
public Criteria andBirthyearGreaterThanOrEqualTo(Date value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "birthyear" + " cannot be null"); } addCriterion("birthYear >=", new java.sql.Date(value.getTime()), "birthyear"); </DeepExtract> return (Criteria) this; }
Student-Information-Management-System
positive
6,109
static DoubleMatrix1D kron(DoubleMatrix1D a, DoubleMatrix1D b) { DoubleMatrix1D res = DoubleFactory1D.sparse.make((int) (a.size() * b.size())); IntArrayList indexList = new IntArrayList(); DoubleArrayList valueList = new DoubleArrayList(); this.x.getNonZeros(indexList, valueList); for (int cont = 0; cont < indexList.si...
static DoubleMatrix1D kron(DoubleMatrix1D a, DoubleMatrix1D b) { DoubleMatrix1D res = DoubleFactory1D.sparse.make((int) (a.size() * b.size())); IntArrayList indexList = new IntArrayList(); DoubleArrayList valueList = new DoubleArrayList(); <DeepExtract> this.x.getNonZeros(indexList, valueList); </DeepExtract> for (int ...
JOM
positive
6,110
private void fetchDocumentIndicator(boolean isDocumentStart) { if (this.flowLevel != 0) { return; } while (this.indent > -1) { Mark mark = reader.getMark(); this.indent = this.indents.pop(); this.tokens.add(new BlockEndToken(mark, mark)); } SimpleKey key = possibleSimpleKeys.remove(flowLevel); if (key != null && key.is...
private void fetchDocumentIndicator(boolean isDocumentStart) { if (this.flowLevel != 0) { return; } while (this.indent > -1) { Mark mark = reader.getMark(); this.indent = this.indents.pop(); this.tokens.add(new BlockEndToken(mark, mark)); } <DeepExtract> SimpleKey key = possibleSimpleKeys.remove(flowLevel); if (key != ...
antigen
positive
6,111
public Criteria andServiceInterfaceIsNotNull() { if ("service_interface is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("service_interface is not null")); return (Criteria) this; }
public Criteria andServiceInterfaceIsNotNull() { <DeepExtract> if ("service_interface is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("service_interface is not null")); </DeepExtract> return (Criteria) this; }
dubbo-mock
positive
6,112
@Override protected Boolean doInBackground(Void... params) { try { mRepo.getGit().checkout().addPath(mPath).call(); } catch (StopTaskException e) { return false; } catch (Throwable e) { setException(e); return false; } return true; }
@Override protected Boolean doInBackground(Void... params) { <DeepExtract> try { mRepo.getGit().checkout().addPath(mPath).call(); } catch (StopTaskException e) { return false; } catch (Throwable e) { setException(e); return false; } return true; </DeepExtract> }
MGit
positive
6,113
private void printTimeCrystals() { endTime = System.currentTimeMillis(); ColorMain colorMain = ModuleManager.getModule(ColorMain.class); MessageBus.sendClientPrefixMessage((false ? colorMain.getDisabledColor() : colorMain.getEnabledColor()) + "3 crystal, time took: " + (endTime - startTime)); nCrystal = 0; startTime = ...
private void printTimeCrystals() { endTime = System.currentTimeMillis(); <DeepExtract> ColorMain colorMain = ModuleManager.getModule(ColorMain.class); MessageBus.sendClientPrefixMessage((false ? colorMain.getDisabledColor() : colorMain.getEnabledColor()) + "3 crystal, time took: " + (endTime - startTime)); </DeepExtrac...
gamesense-client
positive
6,114
public void addRule(ObservableValue<Boolean> rule, ValidationMessage message) { rules.add(rule); rule.addListener((observable, oldValue, newValue) -> { validateRule(newValue, message); }); if (rule.getValue()) { validationStatus.removeMessage(message); } else { validationStatus.addMessage(message); } }
public void addRule(ObservableValue<Boolean> rule, ValidationMessage message) { rules.add(rule); rule.addListener((observable, oldValue, newValue) -> { validateRule(newValue, message); }); <DeepExtract> if (rule.getValue()) { validationStatus.removeMessage(message); } else { validationStatus.addMessage(message); } </De...
javafx-qiniu-tinypng-client
positive
6,115
public Criteria andTradeStatusBetween(Boolean value1, Boolean value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "tradeStatus" + " cannot be null"); } criteria.add(new Criterion("trade_status between", value1, value2)); return (Criteria) this; }
public Criteria andTradeStatusBetween(Boolean value1, Boolean value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "tradeStatus" + " cannot be null"); } criteria.add(new Criterion("trade_status between", value1, value2)); </DeepExtract> return (Criteria) thi...
springcloud-e-book
positive
6,116
public Builder clone() { if (buildPartial() instanceof hip.ch3.proto.StockProtos.Stock) { return mergeFrom((hip.ch3.proto.StockProtos.Stock) buildPartial()); } else { super.mergeFrom(buildPartial()); return this; } }
public Builder clone() { <DeepExtract> if (buildPartial() instanceof hip.ch3.proto.StockProtos.Stock) { return mergeFrom((hip.ch3.proto.StockProtos.Stock) buildPartial()); } else { super.mergeFrom(buildPartial()); return this; } </DeepExtract> }
hiped2
positive
6,117
public Criteria andAddressNotEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address <>", value)); return (Criteria) this; }
public Criteria andAddressNotEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address <>", value)); </DeepExtract> return (Criteria) this; }
spring-boot-all
positive
6,118
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, getAccountBytes()); } if (((bitField...
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { <DeepExtract> int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, getAccountBytes()); } ...
NettyProtobufWebsocket
positive
6,120
private static String toString(ObjectValue vakue, int ntabs) { if (vakue == null) { return null; } SimpleToStringBuilder sb = new SimpleToStringBuilder("ObjectValue", ntabs); builder.append(nlt).append("attribute").append(" = ").append(vakue.getAttribute().getName()); return this; builder.append(nlt).append("value").ap...
private static String toString(ObjectValue vakue, int ntabs) { if (vakue == null) { return null; } SimpleToStringBuilder sb = new SimpleToStringBuilder("ObjectValue", ntabs); builder.append(nlt).append("attribute").append(" = ").append(vakue.getAttribute().getName()); return this; <DeepExtract> builder.append(nlt).appe...
eav-model-pattern
positive
6,121
private void setVideoURI(Uri uri, Map<String, String> headers) { mUri = uri; mHeaders = headers; mSeekWhenPrepared = 0; if (mUri == null || mSurfaceHolder == null) { return; } release(false); AudioManager am = (AudioManager) mAppContext.getSystemService(Context.AUDIO_SERVICE); am.requestAudioFocus(null, AudioManager.ST...
private void setVideoURI(Uri uri, Map<String, String> headers) { mUri = uri; mHeaders = headers; mSeekWhenPrepared = 0; <DeepExtract> if (mUri == null || mSurfaceHolder == null) { return; } release(false); AudioManager am = (AudioManager) mAppContext.getSystemService(Context.AUDIO_SERVICE); am.requestAudioFocus(null, A...
MKVideoPlayer
positive
6,123
public void enableVoiceRecognition(android.support.v4.app.Fragment context) { mContainerSupportFragment = context; mic.setVisibility((!isMic || isMicEnabled()) ? VISIBLE : INVISIBLE); }
public void enableVoiceRecognition(android.support.v4.app.Fragment context) { mContainerSupportFragment = context; <DeepExtract> mic.setVisibility((!isMic || isMicEnabled()) ? VISIBLE : INVISIBLE); </DeepExtract> }
NHentai-android
positive
6,124
public Criteria andEndDateBetween(Date value1, Date value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "endDate" + " cannot be null"); } criteria.add(new Criterion("end_date between", value1, value2)); return (Criteria) this; }
public Criteria andEndDateBetween(Date value1, Date value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "endDate" + " cannot be null"); } criteria.add(new Criterion("end_date between", value1, value2)); </DeepExtract> return (Criteria) this; }
CuitJavaEEPractice
positive
6,125
public Line CheckWin(int row, int column) { Point currentCell = new Point(column, row); backDir = new Point(-1, 0); frontDir = new Point(1, 0); String currentData = this.getValueAt(currentCell.x, currentCell.y); if (currentData.equals(" ")) { winPath = null; } int count = 1; Point from, to, temp; from = currentCell; wh...
public Line CheckWin(int row, int column) { Point currentCell = new Point(column, row); backDir = new Point(-1, 0); frontDir = new Point(1, 0); <DeepExtract> String currentData = this.getValueAt(currentCell.x, currentCell.y); if (currentData.equals(" ")) { winPath = null; } int count = 1; Point from, to, temp; from = c...
CaroOnline_SocketJava
positive
6,126
public final void setLimitNumber(int limitNumber) { this.mLimitNumber = limitNumber; if (mSavePolicy == BaseGridView.SAVE_LIMITED_CHILD) { if (mLimitNumber <= 0) { throw new IllegalArgumentException(); } if (mChildStates == null || mChildStates.maxSize() != mLimitNumber) { mChildStates = new LruCache<String, SparseArra...
public final void setLimitNumber(int limitNumber) { this.mLimitNumber = limitNumber; <DeepExtract> if (mSavePolicy == BaseGridView.SAVE_LIMITED_CHILD) { if (mLimitNumber <= 0) { throw new IllegalArgumentException(); } if (mChildStates == null || mChildStates.maxSize() != mLimitNumber) { mChildStates = new LruCache<Stri...
V14Leanback
positive
6,127
private void initViewPager() { imageBrowserAdapter = new MyAdapter(); viewPagerBrowser.setAdapter(imageBrowserAdapter); viewPagerBrowser.setCurrentItem(currentPosition); if (transformType == ImageBrowserConfig.TransformType.Transform_Default) { viewPagerBrowser.setPageTransformer(true, new DefaultTransformer()); } else...
private void initViewPager() { imageBrowserAdapter = new MyAdapter(); viewPagerBrowser.setAdapter(imageBrowserAdapter); viewPagerBrowser.setCurrentItem(currentPosition); <DeepExtract> if (transformType == ImageBrowserConfig.TransformType.Transform_Default) { viewPagerBrowser.setPageTransformer(true, new DefaultTransfor...
MNImageBrowser
positive
6,128
public static boolean isEquals(JSONObject define, Object obj) { if (!(obj instanceof TypeDefine)) { return false; } TypeDefine t = (TypeDefine) obj; JSONObject j1 = (JSONObject) define.clone(); JSONObject j2 = (JSONObject) t.getDefine().clone(); j1.remove(IGNORE_ABOVE_STR); j2.remove(IGNORE_ABOVE_STR); if (!j1.contains...
public static boolean isEquals(JSONObject define, Object obj) { if (!(obj instanceof TypeDefine)) { return false; } TypeDefine t = (TypeDefine) obj; JSONObject j1 = (JSONObject) define.clone(); JSONObject j2 = (JSONObject) t.getDefine().clone(); j1.remove(IGNORE_ABOVE_STR); j2.remove(IGNORE_ABOVE_STR); if (!j1.contains...
ES-Fastloader
positive
6,129
@Test void testDetectedRootPath_AppendPath_FallbackToExisting() { context.create().resource("/content/abc"); RootPathResolver underTest = prepareComponent(PN_APPEND_PATH, "abc/def"); underTest.setRootPathDetector((cmp, request) -> "/content"); assertEquals("/content/abc", underTest.get()); Map<String, Object> expectedP...
@Test void testDetectedRootPath_AppendPath_FallbackToExisting() { context.create().resource("/content/abc"); RootPathResolver underTest = prepareComponent(PN_APPEND_PATH, "abc/def"); underTest.setRootPathDetector((cmp, request) -> "/content"); <DeepExtract> assertEquals("/content/abc", underTest.get()); Map<String, Obj...
wcm-io-wcm
positive
6,130
private void internalKill(String pid, boolean force) throws IOException, InterruptedException { Details details = new Details(exhibitor); File binDirectory = new File(details.zooKeeperDirectory, "bin"); File zkServerScript = new File(binDirectory, "zkServer.sh"); Details details = new Details(exhibitor); File binDirect...
private void internalKill(String pid, boolean force) throws IOException, InterruptedException { Details details = new Details(exhibitor); File binDirectory = new File(details.zooKeeperDirectory, "bin"); File zkServerScript = new File(binDirectory, "zkServer.sh"); <DeepExtract> Details details = new Details(exhibitor); ...
exhibitor
positive
6,134
public void resetToDefault(ServerCommandSource source) { try { for (Validator<T> validator : this.validators) { defaultValue = validator.validate(source, this, defaultValue, defaultAsString); if (defaultValue == null) { Messenger.m(source, "r 错误的值 " + name + ": " + defaultAsString); return null; } } if (!defaul...
public void resetToDefault(ServerCommandSource source) { <DeepExtract> try { for (Validator<T> validator : this.validators) { defaultValue = validator.validate(source, this, defaultValue, defaultAsString); if (defaultValue == null) { Messenger.m(source, "r 错误的值 " + name + ": " + defaultAsString); return null; }...
fabric-carpetmod_1.14.4_Chinese-ver
positive
6,135
public void removeProfile(@NonNull IProfile profile) { int found = getPositionByIdentifier(profile.getIdentifier()); if (found > -1) { mAccountHeaderBuilder.mProfiles.remove(found); } mAccountHeaderBuilder.updateHeaderAndList(); }
public void removeProfile(@NonNull IProfile profile) { <DeepExtract> int found = getPositionByIdentifier(profile.getIdentifier()); if (found > -1) { mAccountHeaderBuilder.mProfiles.remove(found); } mAccountHeaderBuilder.updateHeaderAndList(); </DeepExtract> }
MaterialDrawer-Xamarin
positive
6,136
public A build() throws IllegalArgumentException { A args; try { for (Constructor<?> constructor : this.getClass().getEnclosingClass().getDeclaredConstructors()) { if (constructor.getParameterCount() == 0) { args = (A) constructor.newInstance(); } } throw new RuntimeException(this.getClass().getEnclosingClass() + " mus...
public A build() throws IllegalArgumentException { <DeepExtract> A args; try { for (Constructor<?> constructor : this.getClass().getEnclosingClass().getDeclaredConstructors()) { if (constructor.getParameterCount() == 0) { args = (A) constructor.newInstance(); } } throw new RuntimeException(this.getClass().getEnclosingC...
minio-java
positive
6,137
public static void configureF(final APowerTile pp, final byte E, final byte U, final byte pump) { pp.configure(F_XR * Math.pow(F_CE, E) / (U * F_CU + 1), F_MS * Math.pow(F_CE, E) / (U * F_CU + 1) + (pump > 0 ? 65536 * PL_BP / (pump * PL_CU + 1) + 1020 * PF_BP / (pump * PF_CU + 1) : 0)); }
public static void configureF(final APowerTile pp, final byte E, final byte U, final byte pump) { <DeepExtract> pp.configure(F_XR * Math.pow(F_CE, E) / (U * F_CU + 1), F_MS * Math.pow(F_CE, E) / (U * F_CU + 1) + (pump > 0 ? 65536 * PL_BP / (pump * PL_CU + 1) + 1020 * PF_BP / (pump * PF_CU + 1) : 0)); </DeepExtract> }
QuarryPlus
positive
6,138
public double lineCoverage() { final int sum = lineMissed + lineCovered; return sum == 0 ? 100 : 100d * lineCovered / sum; }
public double lineCoverage() { <DeepExtract> final int sum = lineMissed + lineCovered; return sum == 0 ? 100 : 100d * lineCovered / sum; </DeepExtract> }
code-assert
positive
6,139
public static Date getLastDayOfPreviousMonth(Date date) { Calendar lCalendar = Calendar.getInstance(); lCalendar.setTime(date); lCalendar.set(Calendar.DAY_OF_MONTH, 1); Date lTmpDate = lCalendar.getTime(); Calendar lCalendar = Calendar.getInstance(); lCalendar.setTime(lTmpDate); lCalendar.add(Calendar.DAY_OF_YEAR, -1);...
public static Date getLastDayOfPreviousMonth(Date date) { Calendar lCalendar = Calendar.getInstance(); lCalendar.setTime(date); lCalendar.set(Calendar.DAY_OF_MONTH, 1); Date lTmpDate = lCalendar.getTime(); <DeepExtract> Calendar lCalendar = Calendar.getInstance(); lCalendar.setTime(lTmpDate); lCalendar.add(Calendar.DAY...
AHaH
positive
6,140
public static void asyncGet(String baseUrl, Map<String, String> params, Callback callback) { OkHttpClient client = OkHttp3Util.getInstance(); String url = UrlUtil.urlJoin(baseUrl, params); LOGGER.debug("OkHttp3 async get url:{}", url); Call call = initCall(client, url, null); call.enqueue(callback); }
public static void asyncGet(String baseUrl, Map<String, String> params, Callback callback) { <DeepExtract> OkHttpClient client = OkHttp3Util.getInstance(); String url = UrlUtil.urlJoin(baseUrl, params); LOGGER.debug("OkHttp3 async get url:{}", url); Call call = initCall(client, url, null); call.enqueue(callback); </Dee...
ApplicationPower
positive
6,141
@Test public void testRenameToExistingNameFailsWithGoogleIssuer() { String accountName1 = "johndoe@gmail.com"; AccountIndex index1 = index(accountName1, GOOGLE_ISSUER); String accountName2 = "another@dasher.com"; AccountIndex index2 = index(accountName2, GOOGLE_ISSUER); accountDb.add(accountName1, SECRET, OtpType.TOTP,...
@Test public void testRenameToExistingNameFailsWithGoogleIssuer() { <DeepExtract> String accountName1 = "johndoe@gmail.com"; AccountIndex index1 = index(accountName1, GOOGLE_ISSUER); String accountName2 = "another@dasher.com"; AccountIndex index2 = index(accountName2, GOOGLE_ISSUER); accountDb.add(accountName1, SECRET,...
google-authenticator-android
positive
6,142
public void onClickStart(View view) { if ((mediaPlayer.isPlaying() || mediaPlayer.isLooping())) { return; } mediaPlayer.playMedia(this, mediaSurface); }
public void onClickStart(View view) { if ((mediaPlayer.isPlaying() || mediaPlayer.isLooping())) { return; } <DeepExtract> mediaPlayer.playMedia(this, mediaSurface); </DeepExtract> }
android-openGL-canvas
positive
6,143
@Override public boolean hasNext() { if (size() != iter_size) { throw new ConcurrentModificationException(); } return map_iterator.hasNext(); }
@Override public boolean hasNext() { <DeepExtract> if (size() != iter_size) { throw new ConcurrentModificationException(); } </DeepExtract> return map_iterator.hasNext(); }
javaalgorithm
positive
6,144
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { HttpSession session = null; try { try { session = req.getSession(true); } catch (Exception e) { Log.error(e, "PingSession1.doGet(...): error getting session"); throw e; } Integer ival = (Integer) session.getAttrib...
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { <DeepExtract> HttpSession session = null; try { try { session = req.getSession(true); } catch (Exception e) { Log.error(e, "PingSession1.doGet(...): error getting session"); throw e; } Integer ival = (Integer) ses...
jboss-daytrader
positive
6,145
private void writeNull() throws java.io.IOException { byte[] val_bytes = new byte[4]; ByteBuffer bb = ByteBuffer.wrap(val_bytes); bb.order(java.nio.ByteOrder.BIG_ENDIAN); bb.putInt(0); sock.getOutputStream().write(val_bytes); }
private void writeNull() throws java.io.IOException { <DeepExtract> byte[] val_bytes = new byte[4]; ByteBuffer bb = ByteBuffer.wrap(val_bytes); bb.order(java.nio.ByteOrder.BIG_ENDIAN); bb.putInt(0); sock.getOutputStream().write(val_bytes); </DeepExtract> }
jelectrum
positive
6,146
@SuppressWarnings("deprecation") protected void finalize() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; btllibJNI.delete_SeqReader(swigCPtr); } swigCPtr = 0; } }
@SuppressWarnings("deprecation") protected void finalize() { <DeepExtract> if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; btllibJNI.delete_SeqReader(swigCPtr); } swigCPtr = 0; } </DeepExtract> }
abyss
positive
6,147