before
stringlengths
12
3.21M
after
stringlengths
41
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@SuppressWarnings("unchecked") @Test public void testNormal() { int capacity = 100; DirectBucketAllocator bucketAllocator = new DirectBucketAllocator(capacity); SortedMap<Integer, Integer> usedSpaces = bucketAllocator.getUsedSpace(); SortedMap<Integer, Integer> freeSpaces = bucketAllocator.getFreeSpaces(); int expected...
@SuppressWarnings("unchecked") @Test public void testNormal() { int capacity = 100; DirectBucketAllocator bucketAllocator = new DirectBucketAllocator(capacity); SortedMap<Integer, Integer> usedSpaces = bucketAllocator.getUsedSpace(); SortedMap<Integer, Integer> freeSpaces = bucketAllocator.getFreeSpaces(); int expected...
flink-spillable-statebackend
positive
4,705
private int fixupExprList(int start, int end) { int i, tkType; int[] indices = new int[2]; Token tk = null; for (i = start; i < end; i++) { tk = tokens.getToken(i); tkType = tk.getType(); if (tkType == FortranLexer.T_COMMA || tkType == FortranLexer.T_EOS) continue; indices[0] = i; indices[1] = end; if (arrayConstructor...
private int fixupExprList(int start, int end) { <DeepExtract> int i, tkType; int[] indices = new int[2]; Token tk = null; for (i = start; i < end; i++) { tk = tokens.getToken(i); tkType = tk.getType(); if (tkType == FortranLexer.T_COMMA || tkType == FortranLexer.T_EOS) continue; indices[0] = i; indices[1] = end; if (ar...
open-fortran-parser
positive
4,706
public static byte[] decryptBase64DES(byte[] data, byte[] key) { return desTemplate(base64Decode(data), key, DES_Algorithm, DES_Transformation, false); }
public static byte[] decryptBase64DES(byte[] data, byte[] key) { <DeepExtract> return desTemplate(base64Decode(data), key, DES_Algorithm, DES_Transformation, false); </DeepExtract> }
Engine
positive
4,707
public Criteria andProduct_idGreaterThan(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "product_id" + " cannot be null"); } criteria.add(new Criterion("product_id >", value)); return (Criteria) this; }
public Criteria andProduct_idGreaterThan(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "product_id" + " cannot be null"); } criteria.add(new Criterion("product_id >", value)); </DeepExtract> return (Criteria) this; }
Tmall_SSM
positive
4,708
public static Calendar getInstance(@Nullable Date date) { Calendar calendar = Calendar.getInstance(); if (date != null) { calendar.setTime(date); } int year = getYear(calendar); int month = getMonth(calendar); int day = getDay(calendar); calendar.clear(); calendar.set(year, month, day); return calendar; }
public static Calendar getInstance(@Nullable Date date) { Calendar calendar = Calendar.getInstance(); if (date != null) { calendar.setTime(date); } <DeepExtract> int year = getYear(calendar); int month = getMonth(calendar); int day = getDay(calendar); calendar.clear(); calendar.set(year, month, day); </DeepExtract> ret...
BMWidget
positive
4,710
public SliceValue setTarget(float target) { this.value = value; this.originValue = value; this.diff = 0; return this; this.diff = target - originValue; return this; }
public SliceValue setTarget(float target) { <DeepExtract> this.value = value; this.originValue = value; this.diff = 0; return this; </DeepExtract> this.diff = target - originValue; return this; }
hellocharts-android
positive
4,711
@Override protected void executeOnLoadDataSuccess(Entity entity) { mBlogDetail = (BlogDetail) entity; String content = AppContext.getFromAssets(CONTENT_TEMPLATE); if (content == null) content = ""; content = content.replace("{%skin%}", "day"); content = content.replace("{%title%}", mBlogTitle); content = content.replac...
@Override protected void executeOnLoadDataSuccess(Entity entity) { mBlogDetail = (BlogDetail) entity; <DeepExtract> String content = AppContext.getFromAssets(CONTENT_TEMPLATE); if (content == null) content = ""; content = content.replace("{%skin%}", "day"); content = content.replace("{%title%}", mBlogTitle); content = ...
Cotable
positive
4,712
public static sizzle.types.SizzleLocation.Location parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { if (!isInitialized()) { throw new com.google.protobuf.UninitializedMessageException(result).asInvalidProtocolBufferException(); } return buildPartial(); }
public static sizzle.types.SizzleLocation.Location parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { <DeepExtract> if (!isInitialized()) { throw new com.google.protobuf.UninitializedMessageException(result).asInvalidProtocolBufferException(); } return buildPartia...
Sizzle
positive
4,713
public static boolean isZh(CharSequence input) { return input != null && input.length() > 0 && Pattern.matches(REGEX_ZH, input); }
public static boolean isZh(CharSequence input) { <DeepExtract> return input != null && input.length() > 0 && Pattern.matches(REGEX_ZH, input); </DeepExtract> }
RxCore
positive
4,714
public void setContext(String[] context) { this.context = context; length = target.length(); for (String c : context) length += c.length(); }
public void setContext(String[] context) { this.context = context; <DeepExtract> length = target.length(); for (String c : context) length += c.length(); </DeepExtract> }
OpenEphyra
positive
4,715
private void heapSort() { int start = heapSize / 2 - 1; for (int x = start; x >= 0; x--) { maxHeapify(x); } for (int x = heapSize - 1; x > 0; x--) { swap(0, heapSize - 1); heapSize = heapSize - 1; maxHeapify(0); } heapSize = array.length; }
private void heapSort() { <DeepExtract> int start = heapSize / 2 - 1; for (int x = start; x >= 0; x--) { maxHeapify(x); } </DeepExtract> for (int x = heapSize - 1; x > 0; x--) { swap(0, heapSize - 1); heapSize = heapSize - 1; maxHeapify(0); } heapSize = array.length; }
Algorithms-and-Data-Structures-in-Java
positive
4,716
public Criteria andRoleIsNotNull() { if ("role is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("role is not null")); return (Criteria) this; }
public Criteria andRoleIsNotNull() { <DeepExtract> if ("role is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("role is not null")); </DeepExtract> return (Criteria) this; }
Examination_System
positive
4,717
private TransactionStatement parseCommit() { if (readIf("TRANSACTION")) { command = new TransactionStatement(session, SQLStatement.COMMIT_TRANSACTION); command.setTransactionName(readUniqueIdentifier()); return command; } command = new TransactionStatement(session, SQLStatement.COMMIT); if (!currentTokenQuoted && equal...
private TransactionStatement parseCommit() { if (readIf("TRANSACTION")) { command = new TransactionStatement(session, SQLStatement.COMMIT_TRANSACTION); command.setTransactionName(readUniqueIdentifier()); return command; } command = new TransactionStatement(session, SQLStatement.COMMIT); <DeepExtract> if (!currentTokenQ...
Lealone-Plugins
positive
4,718
public static FileTransfer[] getAllActiveFileTransfers() throws SkypeException { try { String command = "SEARCH " + "ACTIVEFILETRANSFERS"; String responseHeader = "FILETRANSFERS "; String response = getConnectorInstance().execute(command, responseHeader); String data = response.substring(responseHeader.length()); Strin...
public static FileTransfer[] getAllActiveFileTransfers() throws SkypeException { <DeepExtract> try { String command = "SEARCH " + "ACTIVEFILETRANSFERS"; String responseHeader = "FILETRANSFERS "; String response = getConnectorInstance().execute(command, responseHeader); String data = response.substring(responseHeader.le...
skype-java-api
positive
4,719
public Boolean move(final String key, final int dbIndex) { if (client.getIntegerReply(RedisCommand.MOVE, key, String.valueOf(dbIndex)) == null) { return null; } else { return client.getIntegerReply(RedisCommand.MOVE, key, String.valueOf(dbIndex)) == 1; } }
public Boolean move(final String key, final int dbIndex) { <DeepExtract> if (client.getIntegerReply(RedisCommand.MOVE, key, String.valueOf(dbIndex)) == null) { return null; } else { return client.getIntegerReply(RedisCommand.MOVE, key, String.valueOf(dbIndex)) == 1; } </DeepExtract> }
rjc
positive
4,721
public List<String> binaryTreePaths(TreeNode root) { List<String> res = new ArrayList<>(); if (root == null) { return res; } if (root.left == null && root.right == null) { res.add("" + root.val); } "" += root.val + "->"; if (root.left != null) { helper(root.left, res, ""); } if (root.right != null) { helper(root.right,...
public List<String> binaryTreePaths(TreeNode root) { List<String> res = new ArrayList<>(); if (root == null) { return res; } <DeepExtract> if (root.left == null && root.right == null) { res.add("" + root.val); } "" += root.val + "->"; if (root.left != null) { helper(root.left, res, ""); } if (root.right != null) { help...
Leetcode-for-Fun
positive
4,722
public boolean isEmbedField(Class<?> clazz, String fieldName) { boolean result = false; Field[] fields; String name = clazz.getName(); Field[] fields; boolean recycled = false; SoftReference<Field[]> sr = cache.get(name); if (sr != null) { fields = sr.get(); if (fields == null) { recycled = true; } else { fields = fiel...
public boolean isEmbedField(Class<?> clazz, String fieldName) { boolean result = false; <DeepExtract> Field[] fields; String name = clazz.getName(); Field[] fields; boolean recycled = false; SoftReference<Field[]> sr = cache.get(name); if (sr != null) { fields = sr.get(); if (fields == null) { recycled = true; } else {...
bugu-mongo
positive
4,723
@Override public void update(List<T> values) throws Exception { list.clear(); clearCalled = true; if (values != null) { list.addAll(values); } }
@Override public void update(List<T> values) throws Exception { list.clear(); clearCalled = true; <DeepExtract> if (values != null) { list.addAll(values); } </DeepExtract> }
amazon-kinesis-connector-flink
positive
4,724
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_setting, null); appUninstall = (ImageButton) view.findViewById(R.id.setting_uninstall); setNet = (ImageButton) view.findViewById(R.id.setting_...
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_setting, null); appUninstall = (ImageButton) view.findViewById(R.id.setting_uninstall); setNet = (ImageButton) view.findViewById(R.id.setting_...
android-tv-launcher
positive
4,725
public String getMakeSdCardPath() { File sdkPath = new File(getPlatformConfiguration().getAndroidSdkHome()); File[] possiblePaths = { new File(sdkPath, MessageFormat.format("tools/{0}", "mksdcard")), new File(sdkPath, MessageFormat.format("tools/{0}.exe", "mksdcard")), new File(sdkPath, MessageFormat.format("tools/{0}....
public String getMakeSdCardPath() { <DeepExtract> File sdkPath = new File(getPlatformConfiguration().getAndroidSdkHome()); File[] possiblePaths = { new File(sdkPath, MessageFormat.format("tools/{0}", "mksdcard")), new File(sdkPath, MessageFormat.format("tools/{0}.exe", "mksdcard")), new File(sdkPath, MessageFormat.form...
arquillian-droidium
positive
4,726
private static Pair<String, Integer> getParameterPropertyDirective(final String propertyKey, final String propertyKeyPrefix) { Pair<String, Integer> result = null; if (propertyKey.startsWith(propertyKeyPrefix)) { final String directive = propertyKey.substring(propertyKeyPrefix.length()); final int index = directive.ind...
private static Pair<String, Integer> getParameterPropertyDirective(final String propertyKey, final String propertyKeyPrefix) { <DeepExtract> Pair<String, Integer> result = null; if (propertyKey.startsWith(propertyKeyPrefix)) { final String directive = propertyKey.substring(propertyKeyPrefix.length()); final int index =...
www-project-csrfguard
positive
4,727
@Scheduled(cron = "${handle.testPrefix.expiration.cron}") @Override public void purgeOld() { if (expirationDays < 0) return; Date now = new Date(); Date old = DateUtils.addDays(now, -expirationDays); long count = 0; log.info("Start deleting datasets older than " + old); List<Dataset> datasets = Dataset.findDatasetsByPr...
@Scheduled(cron = "${handle.testPrefix.expiration.cron}") @Override public void purgeOld() { if (expirationDays < 0) return; Date now = new Date(); Date old = DateUtils.addDays(now, -expirationDays); <DeepExtract> long count = 0; log.info("Start deleting datasets older than " + old); List<Dataset> datasets = Dataset.fi...
mds
positive
4,728
public static String internalName(Class<?> clz) { return clz.getName().replace('.', '/'); }
public static String internalName(Class<?> clz) { <DeepExtract> return clz.getName().replace('.', '/'); </DeepExtract> }
ekstazi
positive
4,729
public void actionPerformed(java.awt.event.ActionEvent evt) { tableModel.addEmptyLine(); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> tableModel.addEmptyLine(); </DeepExtract> }
BurpSentinel
positive
4,730
@Override public void setElement(WebElement element) { this.element = element; return element.getAttribute("id"); }
@Override public void setElement(WebElement element) { this.element = element; <DeepExtract> return element.getAttribute("id"); </DeepExtract> }
nuxeo-distribution
positive
4,731
@Override public ExecutionPlan generatePlan() { if (activeParticipants.isEmpty()) { int mostReads = 0; for (int i = 0; i < readsPerNodes.length; i++) { if (readsPerNodes[i] > readsPerNodes[mostReads]) mostReads = i; } activeParticipants.add(mostReads); } if (activeParticipants.contains(localNodeId)) { execPlan.setParti...
@Override public ExecutionPlan generatePlan() { if (activeParticipants.isEmpty()) { int mostReads = 0; for (int i = 0; i < readsPerNodes.length; i++) { if (readsPerNodes[i] > readsPerNodes[mostReads]) mostReads = i; } activeParticipants.add(mostReads); } if (activeParticipants.contains(localNodeId)) { execPlan.setParti...
elasql
positive
4,733
@Override public void widgetSelected(SelectionEvent e) { browser.stop(); }
@Override public void widgetSelected(SelectionEvent e) { <DeepExtract> browser.stop(); </DeepExtract> }
DJ-Sweet
positive
4,735
@Override public Action getAction() { if ((isDelete || isPlay) && null == index) { throw new IllegalArgumentException("Time fragment index is expected, please type -i to specify"); } if (isTimeTunnel) { if (isBlank(classPattern)) { throw new IllegalArgumentException("Class-pattern is expected, please type the wildcard ...
@Override public Action getAction() { <DeepExtract> if ((isDelete || isPlay) && null == index) { throw new IllegalArgumentException("Time fragment index is expected, please type -i to specify"); } if (isTimeTunnel) { if (isBlank(classPattern)) { throw new IllegalArgumentException("Class-pattern is expected, please type...
greys-anatomy
positive
4,736
public Criteria andFphmLessThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "fphm" + " cannot be null"); } criteria.add(new Criterion("fphm <", value)); return (Criteria) this; }
public Criteria andFphmLessThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "fphm" + " cannot be null"); } criteria.add(new Criterion("fphm <", value)); </DeepExtract> return (Criteria) this; }
einvoice
positive
4,737
@Ignore @Test public void signOut() throws CandybeanException { try { if (isLeftMenuOpen()) return; swipe(0.1, 0.5, 0.9, 0.5, 0.2); iface.pause(1000); } catch (WebDriverException e) { return; } WebElement userDropDown = iface.wd.findElement(By.id("com.evernote:id/signed_in_user_area")); userDropDown.click(); iface.paus...
@Ignore @Test public void signOut() throws CandybeanException { try { if (isLeftMenuOpen()) return; swipe(0.1, 0.5, 0.9, 0.5, 0.2); iface.pause(1000); } catch (WebDriverException e) { return; } WebElement userDropDown = iface.wd.findElement(By.id("com.evernote:id/signed_in_user_area")); userDropDown.click(); iface.paus...
candybean
positive
4,738
public static void initYarnConf(Configuration yarnConf) { URL coreDefault = Utils.class.getClassLoader().getResource(Constants.CORE_DEFAULT_CONF); if (coreDefault != null) { yarnConf.addResource(coreDefault); } if (new File(Constants.CORE_SITE_CONF).exists()) { yarnConf.addResource(new Path(Constants.CORE_SITE_CONF)); ...
public static void initYarnConf(Configuration yarnConf) { URL coreDefault = Utils.class.getClassLoader().getResource(Constants.CORE_DEFAULT_CONF); if (coreDefault != null) { yarnConf.addResource(coreDefault); } if (new File(Constants.CORE_SITE_CONF).exists()) { yarnConf.addResource(new Path(Constants.CORE_SITE_CONF)); ...
TonY
positive
4,739
@Override public void onDrawerOpened(View drawerView) { if (mDrawerImage == null) { super.onDrawerOpened(drawerView); return; } if (animateEnabled) { mDrawerImage.setProgress(1.f); } if (mActivity != null && mActivity.getActionBar() != null) { try { Method setHomeActionContentDescription = ActionBar.class.getDeclaredMe...
@Override public void onDrawerOpened(View drawerView) { if (mDrawerImage == null) { super.onDrawerOpened(drawerView); return; } if (animateEnabled) { mDrawerImage.setProgress(1.f); } <DeepExtract> if (mActivity != null && mActivity.getActionBar() != null) { try { Method setHomeActionContentDescription = ActionBar.class...
Dali-Doodle
positive
4,740
public void refine(GraphicsContext3D gc) { long startTime = 0; if (DEBUG_PRINT) { startTime = System.currentTimeMillis(); System.out.println("refine.begin[" + startTime + "]"); } long start = System.currentTimeMillis(); m_renderList.beginFrame(); { Transform3D transform = m_parameters.getObjectToEyeTransform(); boolean...
public void refine(GraphicsContext3D gc) { long startTime = 0; if (DEBUG_PRINT) { startTime = System.currentTimeMillis(); System.out.println("refine.begin[" + startTime + "]"); } long start = System.currentTimeMillis(); m_renderList.beginFrame(); { Transform3D transform = m_parameters.getObjectToEyeTransform(); boolean...
walrus
positive
4,741
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { if (gossipRetryCount.getAndIncrement() < maxRetry) { retryExecutor.schedule(() -> { initializeGossipClient(); }, retryInterval, TimeUnit.MILLISECONDS); } else { LOG.debug("Could not connect to gossip server after max retries."); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { <DeepExtract> if (gossipRetryCount.getAndIncrement() < maxRetry) { retryExecutor.schedule(() -> { initializeGossipClient(); }, retryInterval, TimeUnit.MILLISECONDS); } else { LOG.debug("Could not connect to gossip server after max retri...
bigio
positive
4,742
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { if (_conn == null || _conn.isClosed()) { throw CassandraErrors.connectionClosedException(); } if (!quiet) { throw CassandraErrors.notSupportedException(); } return CassandraUtils.DUMMY_RESULT_SET; }
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { <DeepExtract> if (_conn == null || _conn.isClosed()) { throw CassandraErrors.connectionClosedException(); } </DeepExtract> if (!quiet) { throw CassandraErrors.notSupportedException(); } return CassandraUtils.DUMMY_RESULT...
cassandra-jdbc-driver
positive
4,743
@JmsListener(destination = "${queue.engineRequestQueue}", concurrency = "${jms-listener.concurrency}") public void receive(final Message msg) { if (msg == null) { logger.error("Received null message!"); return; } String correlationId; try { correlationId = msg.getJMSCorrelationID(); } catch (Exception ignore) { correla...
@JmsListener(destination = "${queue.engineRequestQueue}", concurrency = "${jms-listener.concurrency}") public void receive(final Message msg) { if (msg == null) { logger.error("Received null message!"); return; } <DeepExtract> String correlationId; try { correlationId = msg.getJMSCorrelationID(); } catch (Exception ign...
alfresco-transform-core
positive
4,744
@Override public String getString() { return "NULL"; }
@Override public String getString() { <DeepExtract> return "NULL"; </DeepExtract> }
Rider
positive
4,746
@Commit public void commit() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < name.length(); i++) { char charAt = name.charAt(i); if (i == 0 && true) sb.append(Character.toUpperCase(charAt)); else if (charAt == '.' || charAt == '_') sb.append(Character.toUpperCase(name.charAt(++i))); else sb.append(charAt)...
@Commit public void commit() { <DeepExtract> StringBuilder sb = new StringBuilder(); for (int i = 0; i < name.length(); i++) { char charAt = name.charAt(i); if (i == 0 && true) sb.append(Character.toUpperCase(charAt)); else if (charAt == '.' || charAt == '_') sb.append(Character.toUpperCase(name.charAt(++i))); else sb....
Piwigo-Java
positive
4,747
@Override public void configure(B builder) throws Exception { super.configure(builder); }
@Override <DeepExtract> </DeepExtract> public void configure(B builder) throws Exception { <DeepExtract> </DeepExtract> super.configure(builder); <DeepExtract> </DeepExtract> }
spring-security-javaconfig
positive
4,748
public Criteria andReadNumIsNotNull() { if ("read_num is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("read_num is not null")); return (Criteria) this; }
public Criteria andReadNumIsNotNull() { <DeepExtract> if ("read_num is not null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("read_num is not null")); </DeepExtract> return (Criteria) this; }
Maven_SSM
positive
4,749
@Test(expected = IllegalArgumentException.class) public void testRTriangle_IllegalArgumentException_1() { return new RTriangle(new RPoint2D(0, 0), new RPoint2D(2, 0), new RPoint2D(1, 0)); }
@Test(expected = IllegalArgumentException.class) public void testRTriangle_IllegalArgumentException_1() { <DeepExtract> return new RTriangle(new RPoint2D(0, 0), new RPoint2D(2, 0), new RPoint2D(1, 0)); </DeepExtract> }
CompGeom
positive
4,750
@Test public void testTryConsume_SynchronizedLimited() throws Throwable { int threadCount = 4; Function<Bucket, Long> action = b -> b.asBlocking().tryConsumeUninterruptibly(1, Duration.ofMillis(50), UninterruptibleBlockingStrategy.PARKING) ? 1L : 0L; int durationSeconds = System.getenv("CI") == null ? 5 : 1; Consumptio...
@Test public void testTryConsume_SynchronizedLimited() throws Throwable { int threadCount = 4; Function<Bucket, Long> action = b -> b.asBlocking().tryConsumeUninterruptibly(1, Duration.ofMillis(50), UninterruptibleBlockingStrategy.PARKING) ? 1L : 0L; <DeepExtract> int durationSeconds = System.getenv("CI") == null ? 5 :...
bucket4j
positive
4,751
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { String value; if (mEntryValues == null) { value = null; } else { value = mEntryValues[position].toString(); } if (position != mSelectedIndex && callChangeListener(value)) { setValue(position, value); } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { <DeepExtract> String value; if (mEntryValues == null) { value = null; } else { value = mEntryValues[position].toString(); } </DeepExtract> if (position != mSelectedIndex && callChangeListener(value)) { setValue(position, val...
ShadowsocksRR
positive
4,752
default T modify(Function<? super T, ? extends T> mutator) { T modified = mutator.apply(get()); delegate.set(converter.revertNonNull(modified)); return modified; }
default T modify(Function<? super T, ? extends T> mutator) { T modified = mutator.apply(get()); <DeepExtract> delegate.set(converter.revertNonNull(modified)); </DeepExtract> return modified; }
durian
positive
4,753
public Spell setCurrentSpellPosition(Player player, int id) throws IllegalArgumentException { PlayerSpellConfig psc = (PlayerSpellConfig) HPS.ConfigurationManager.getConfig(ConfigurationType.PLAYER_SPELL); List<String> spellsTheyKnow = psc.getStringListOrEmpty(player.getName()); if (spellsTheyKnow == null || id >= spel...
public Spell setCurrentSpellPosition(Player player, int id) throws IllegalArgumentException { PlayerSpellConfig psc = (PlayerSpellConfig) HPS.ConfigurationManager.getConfig(ConfigurationType.PLAYER_SPELL); List<String> spellsTheyKnow = psc.getStringListOrEmpty(player.getName()); if (spellsTheyKnow == null || id >= spel...
HarryPotterSpells
positive
4,754
@Override public int scrollHorizontallyBy(int dx, Recycler recycler, State state) { if (DEBUG) Log.v(getTag(), "scrollHorizontallyBy " + dx); if (!mLayoutEnabled || !hasDoneFirstLayout()) { return 0; } if (mRecycler != null || mState != null) { Log.e(TAG, "Recycler information was not released, bug!"); } mRecycler = re...
@Override public int scrollHorizontallyBy(int dx, Recycler recycler, State state) { if (DEBUG) Log.v(getTag(), "scrollHorizontallyBy " + dx); if (!mLayoutEnabled || !hasDoneFirstLayout()) { return 0; } if (mRecycler != null || mState != null) { Log.e(TAG, "Recycler information was not released, bug!"); } mRecycler = re...
tv-waterfall-layout
positive
4,755
ItemInfo infoForAnyChild(View child) { while ((parent = child.getParent()) != this) { if (parent == null || !(parent instanceof View)) { return null; } child = (View) parent; } for (int i = 0; i < mItems.size(); i++) { ItemInfo ii = mItems.get(i); if (mAdapter.isViewFromObject(child, ii.object)) { return ii; } } return...
ItemInfo infoForAnyChild(View child) { while ((parent = child.getParent()) != this) { if (parent == null || !(parent instanceof View)) { return null; } child = (View) parent; } <DeepExtract> for (int i = 0; i < mItems.size(); i++) { ItemInfo ii = mItems.get(i); if (mAdapter.isViewFromObject(child, ii.object)) { return ...
OkCalendar
positive
4,756
public Page<D> search(SearchPageable searchPageable) { Assert.notNull(searchPageable, "searchPageable must not be null."); final StringBuilder whereClause = new StringBuilder("WHERE "); final List<String> params = new ArrayList<>(); final Iterator<String> columnIterator = searchPageable.getColumns().iterator(); while (...
public Page<D> search(SearchPageable searchPageable) { Assert.notNull(searchPageable, "searchPageable must not be null."); final StringBuilder whereClause = new StringBuilder("WHERE "); final List<String> params = new ArrayList<>(); final Iterator<String> columnIterator = searchPageable.getColumns().iterator(); while (...
spring-cloud-dashboard
positive
4,757
public static void main(String[] args) { AntCompiler comp = new AntCompiler("ant-build.xml", "Izpack"); project.executeTarget("izpack-standalone"); }
public static void main(String[] args) { AntCompiler comp = new AntCompiler("ant-build.xml", "Izpack"); <DeepExtract> project.executeTarget("izpack-standalone"); </DeepExtract> }
setupmaker
positive
4,758
public static boolean isMobile4GConnected() { getConnectivityManager(); return isConnected(Mobile4G, sConnectivityManager.getActiveNetworkInfo()); }
public static boolean isMobile4GConnected() { <DeepExtract> getConnectivityManager(); return isConnected(Mobile4G, sConnectivityManager.getActiveNetworkInfo()); </DeepExtract> }
NoHttp
positive
4,759
public String encodeFullBech32m() { byte[] payload = new byte[1 + script.codeHash.length + 1 + script.args.length]; payload[0] = 0x00; int pos = 1; System.arraycopy(script.codeHash, 0, payload, pos, script.codeHash.length); pos += script.codeHash.length; payload[pos] = script.hashType.pack(); pos++; System.arraycopy(sc...
public String encodeFullBech32m() { byte[] payload = new byte[1 + script.codeHash.length + 1 + script.args.length]; payload[0] = 0x00; int pos = 1; System.arraycopy(script.codeHash, 0, payload, pos, script.codeHash.length); pos += script.codeHash.length; payload[pos] = script.hashType.pack(); pos++; System.arraycopy(sc...
ckb-sdk-java
positive
4,760
public void rewind() { i = null; i = tuples.iterator(); }
public void rewind() { i = null; <DeepExtract> i = tuples.iterator(); </DeepExtract> }
SimpleDB-Database-System
positive
4,761
public static boolean isMount(String url) { Pattern pattern = Pattern.compile(MOUNT_REGEX); Matcher matcher = pattern.matcher(url); return matcher.matches(); }
public static boolean isMount(String url) { <DeepExtract> Pattern pattern = Pattern.compile(MOUNT_REGEX); Matcher matcher = pattern.matcher(url); return matcher.matches(); </DeepExtract> }
B4D
positive
4,762
@Override public void onRefresh() { mRefreshLayout.setRefreshing(true); fetchFirstPage(); }
@Override public void onRefresh() { <DeepExtract> mRefreshLayout.setRefreshing(true); fetchFirstPage(); </DeepExtract> }
Derpibooru
positive
4,763
private void run() throws FileNotFoundException { System.out.println("GenerateFiles v0.01"); System.out.println(String.format("%d keywords loaded", keywords.length)); final File dataDir = new File(dataDirName, dataSetName); if (!dataDir.exists()) { dataDir.mkdirs(); println(String.format("Created dataset dir: %s", data...
private void run() throws FileNotFoundException { System.out.println("GenerateFiles v0.01"); System.out.println(String.format("%d keywords loaded", keywords.length)); final File dataDir = new File(dataDirName, dataSetName); if (!dataDir.exists()) { dataDir.mkdirs(); println(String.format("Created dataset dir: %s", data...
Mensa
positive
4,764
@Override public void removeUpdate(final DocumentEvent e) { if (!this.documentHasBeenChangedFlag) { this.documentHasBeenChangedFlag = true; if (this.currentOpenedFile != null) { this.menuFileSave.setEnabled(true); } setTitle("*" + getTitle()); } }
@Override public void removeUpdate(final DocumentEvent e) { <DeepExtract> if (!this.documentHasBeenChangedFlag) { this.documentHasBeenChangedFlag = true; if (this.currentOpenedFile != null) { this.menuFileSave.setEnabled(true); } setTitle("*" + getTitle()); } </DeepExtract> }
jprol
positive
4,765
public StridedInterval getValueOfGlobalRegion() { if (isTop()) { return StridedInterval.getTop(dataWidth); } else if (!valueSet.containsKey(GlobalRegion.getGlobalRegion())) { return StridedInterval.getTop(dataWidth); } return valueSet.get(GlobalRegion.getGlobalRegion()); }
public StridedInterval getValueOfGlobalRegion() { <DeepExtract> if (isTop()) { return StridedInterval.getTop(dataWidth); } else if (!valueSet.containsKey(GlobalRegion.getGlobalRegion())) { return StridedInterval.getTop(dataWidth); } return valueSet.get(GlobalRegion.getGlobalRegion()); </DeepExtract> }
bjoern
positive
4,767
@Test public void testSelfishMiner2() { final double[] pows = new double[] { 0.01, 0.50 }; final int runs = 2; final int hours = 5; final String nlName = RegistryNetworkLatencies.name(RegistryNetworkLatencies.Type.UNIFORM, 2000); final String bdlName = RegistryNodeBuilders.name(RegistryNodeBuilders.Location.RANDOM, tru...
@Test public void testSelfishMiner2() { <DeepExtract> final double[] pows = new double[] { 0.01, 0.50 }; final int runs = 2; final int hours = 5; final String nlName = RegistryNetworkLatencies.name(RegistryNetworkLatencies.Type.UNIFORM, 2000); final String bdlName = RegistryNodeBuilders.name(RegistryNodeBuilders.Locati...
wittgenstein
positive
4,768
private void initAbsListView() { setClickable(true); setFocusableInTouchMode(true); setWillNotDraw(false); setAlwaysDrawnWithCacheEnabled(false); if (mScrollingCacheEnabled && !true) { clearScrollingCache(); } mScrollingCacheEnabled = true; final ViewConfiguration configuration = ViewConfiguration.get(getContext()); mT...
private void initAbsListView() { setClickable(true); setFocusableInTouchMode(true); setWillNotDraw(false); setAlwaysDrawnWithCacheEnabled(false); <DeepExtract> if (mScrollingCacheEnabled && !true) { clearScrollingCache(); } mScrollingCacheEnabled = true; </DeepExtract> final ViewConfiguration configuration = ViewConfig...
MoGuJie
positive
4,769
public boolean query(char letter) { list.add(letter); if (list.size() - 1 < 0) return false; char ch = list.get(list.size() - 1); TrieNode cur = root.get(ch); if (cur == null) return false; if (cur.getEnd()) return true; return search(cur, list.size() - 1 - 1); }
public boolean query(char letter) { list.add(letter); <DeepExtract> if (list.size() - 1 < 0) return false; char ch = list.get(list.size() - 1); TrieNode cur = root.get(ch); if (cur == null) return false; if (cur.getEnd()) return true; return search(cur, list.size() - 1 - 1); </DeepExtract> }
OnlineJudge-Solutions
positive
4,770
public void run() { LOG.trace("Executing shutdown hook..."); stopAwait(); if (runner != null) { LOG.debug("Bringing down Runner..."); runner.shutdown(); runner = null; LOG.info("Pax Runner daemon stopped."); } }
public void run() { LOG.trace("Executing shutdown hook..."); <DeepExtract> stopAwait(); if (runner != null) { LOG.debug("Bringing down Runner..."); runner.shutdown(); runner = null; LOG.info("Pax Runner daemon stopped."); } </DeepExtract> }
org.ops4j.pax.runner
positive
4,771
public void emmitCode(WAMInstruction instruction, ByteBuffer codeBuf, WAMMachine machine) { codeBuf.put(code); codeBuf.put(instruction.reg1); }
public void emmitCode(WAMInstruction instruction, ByteBuffer codeBuf, WAMMachine machine) { <DeepExtract> codeBuf.put(code); codeBuf.put(instruction.reg1); </DeepExtract> }
hak_wambook
positive
4,772
public Builder withDefaultTypeAdapters() { this.gsonBuilder.registerTypeAdapter(GlitchScope.class, new ScopeAdapter()); return this; this.gsonBuilder.registerTypeAdapter(Color.class, new ColorAdapter()); return this; this.gsonBuilder.registerTypeAdapter(UserType.class, new UserTypeAdapter()); return this; this.gsonBuil...
public Builder withDefaultTypeAdapters() { this.gsonBuilder.registerTypeAdapter(GlitchScope.class, new ScopeAdapter()); return this; this.gsonBuilder.registerTypeAdapter(Color.class, new ColorAdapter()); return this; this.gsonBuilder.registerTypeAdapter(UserType.class, new UserTypeAdapter()); return this; <DeepExtract>...
glitch
positive
4,773
private Job procGetScmGitRepositoryInfo(Job job) { Job resultModel = new Job(); List<String> resultList = new ArrayList<>(); List<String> resultTagList = new ArrayList<>(); String resultString; LinkedHashMap repositoryDetailMap; repositoryDetailMap = restTemplateService.customSend(procGetScmRepositoryUrl(job, UrlType.G...
private Job procGetScmGitRepositoryInfo(Job job) { Job resultModel = new Job(); List<String> resultList = new ArrayList<>(); List<String> resultTagList = new ArrayList<>(); <DeepExtract> String resultString; LinkedHashMap repositoryDetailMap; repositoryDetailMap = restTemplateService.customSend(procGetScmRepositoryUrl(...
DELIVERY-PIPELINE-UI
positive
4,774
public Criteria andTitleGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "title" + " cannot be null"); } criteria.add(new Criterion("title >", value)); return (Criteria) this; }
public Criteria andTitleGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "title" + " cannot be null"); } criteria.add(new Criterion("title >", value)); </DeepExtract> return (Criteria) this; }
songjhh_blog
positive
4,775
public SinusoidalLocation moveWest(SinusoidalLocation loc) { int deltaX = -1; if (false) { deltaX = 1; } int oldX = loc.getX(); int oldY = loc.getY(); int newSpear = loc.getSpear(); int newX = oldX + deltaX; if (oldX == (deltaX * grid.getMaxXatY(oldY))) { newSpear = grid.moveHorizontalOneSpear(newSpear, false); newX = ...
public SinusoidalLocation moveWest(SinusoidalLocation loc) { <DeepExtract> int deltaX = -1; if (false) { deltaX = 1; } int oldX = loc.getX(); int oldY = loc.getY(); int newSpear = loc.getSpear(); int newX = oldX + deltaX; if (oldX == (deltaX * grid.getMaxXatY(oldY))) { newSpear = grid.moveHorizontalOneSpear(newSpear, f...
Tectonic-Map-Generator
positive
4,776
@Override public void update(HumanCharacter entity) { if (entity.isSteering()) { if (!this.isMovementState()) { entity.stateMachine.changeState(entity.moveState); return; } } else { if (this.isMovementState()) { entity.stateMachine.changeState(this.idleState); return; } } float deltaTime = Gdx.graphics.getDeltaTime(); ...
@Override public void update(HumanCharacter entity) { if (entity.isSteering()) { if (!this.isMovementState()) { entity.stateMachine.changeState(entity.moveState); return; } } else { if (this.isMovementState()) { entity.stateMachine.changeState(this.idleState); return; } } <DeepExtract> float deltaTime = Gdx.graphics.ge...
GdxDemo3D
positive
4,777
Object convert(Object config, PropertySource properties, Method method, Object[] args) { T typedConfig = schema.cast(config); Set<ConstraintViolation<T>> violations = new HashSet<>(); if (shouldValidateMethodParameters(method)) { violations.addAll(validator.validateParameters(typedConfig, method, args == null ? new Obj...
Object convert(Object config, PropertySource properties, Method method, Object[] args) { T typedConfig = schema.cast(config); Set<ConstraintViolation<T>> violations = new HashSet<>(); if (shouldValidateMethodParameters(method)) { violations.addAll(validator.validateParameters(typedConfig, method, args == null ? new Obj...
property-binder
positive
4,779
@Override public void closeCodeSpan(SpannableStringBuilder out) { int len = out.length(); T obj = getLast(out, Code.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 : nestSpans)...
@Override public void closeCodeSpan(SpannableStringBuilder out) { <DeepExtract> int len = out.length(); T obj = getLast(out, Code.class); int where = out.getSpanStart(obj); out.removeSpan(obj); Object[] nestSpans = out.getSpans(where, len, Object.class); List<NestSpanInfo> spans = new ArrayList<>(); for (Object nestSpa...
kaif-android
positive
4,780
public static SimulationEngineConfiguration createSimulationEngineConfigurationFromResourceDefault() { return BeansConfigurationHelper.parseSimulationEngineConfigurationFromResource("crystalball.cfg.xml", "simulationEngineConfiguration"); }
public static SimulationEngineConfiguration createSimulationEngineConfigurationFromResourceDefault() { <DeepExtract> return BeansConfigurationHelper.parseSimulationEngineConfigurationFromResource("crystalball.cfg.xml", "simulationEngineConfiguration"); </DeepExtract> }
activiti-crystalball
positive
4,781
public void rotateTo(int limitAngle, boolean immediateReturn) { if (!this.regulationFlag) { this.setIntegerAttribute(DUTY_CYCLE, this.speed); } else { this.setIntegerAttribute(SPEED, this.speed); } this.setIntegerAttribute(POSITION_SP, limitAngle); this.setStringAttribute(COMMAND, RUN_TO_ABS_POS); if (!immediateReturn)...
public void rotateTo(int limitAngle, boolean immediateReturn) { <DeepExtract> if (!this.regulationFlag) { this.setIntegerAttribute(DUTY_CYCLE, this.speed); } else { this.setIntegerAttribute(SPEED, this.speed); } </DeepExtract> this.setIntegerAttribute(POSITION_SP, limitAngle); this.setStringAttribute(COMMAND, RUN_TO_AB...
ev3dev-lang-java
positive
4,782
public Ordering f(Tree<PackageFileSystemObject<A>> a, Tree<PackageFileSystemObject<A>> b) { return RelativePath.ord.compare(a.root().getUnixFsObject().path, b.root().getUnixFsObject().path); }
public Ordering f(Tree<PackageFileSystemObject<A>> a, Tree<PackageFileSystemObject<A>> b) { <DeepExtract> return RelativePath.ord.compare(a.root().getUnixFsObject().path, b.root().getUnixFsObject().path); </DeepExtract> }
unix-maven-plugin
positive
4,783
private void parseIntent() { Intent intent = getIntent(); ArrayList<SquareImage> images = intent.getParcelableArrayListExtra(NavigatorImage.EXTRA_IMAGE_URL); mImageSwitcherWrappers = new ArrayList<>(); for (int i = 0; i < images.size(); i++) { mImageSwitcherWrappers.add(new ImageSwitcherWrapper(images.get(i), i)); } mI...
private void parseIntent() { Intent intent = getIntent(); ArrayList<SquareImage> images = intent.getParcelableArrayListExtra(NavigatorImage.EXTRA_IMAGE_URL); <DeepExtract> mImageSwitcherWrappers = new ArrayList<>(); for (int i = 0; i < images.size(); i++) { mImageSwitcherWrappers.add(new ImageSwitcherWrapper(images.get...
ImageGroupView
positive
4,784
public static void updateJobHistory(LGJob job, LGJobHistory history) { if (MONGO_DB_STORE == null) { MONGO_DB_STORE = new MongoDBStore(); MS = new MorphiaService(); JOB_DAO = new LGJobDAOImpl(LGJob.class, MS.getDatastore()); TASK_DAO = new LGTaskDAOImpl(LGTask.class, MS.getDatastore()); DBVALUE_DAO = new LGdbValueDAOIm...
public static void updateJobHistory(LGJob job, LGJobHistory history) { <DeepExtract> if (MONGO_DB_STORE == null) { MONGO_DB_STORE = new MongoDBStore(); MS = new MorphiaService(); JOB_DAO = new LGJobDAOImpl(LGJob.class, MS.getDatastore()); TASK_DAO = new LGTaskDAOImpl(LGTask.class, MS.getDatastore()); DBVALUE_DAO = new ...
lemongrenade
positive
4,785
public void union(int[] parent, int index1, int index2) { if (parent[index2] != index2) { parent[index2] = find(parent, parent[index2]); } return parent[index2]; }
public void union(int[] parent, int index1, int index2) { <DeepExtract> if (parent[index2] != index2) { parent[index2] = find(parent, parent[index2]); } return parent[index2]; </DeepExtract> }
algorithm
positive
4,786
@Override public void func_149853_b(World world, Random rand, int i, int j, int k) { int stage = world.getBlockMetadata(i, j, k) + 1; if (stage > 3) stage = 3; if (stage < 4 && world.getBlock(i, j - 1, k).isFertile(world, i, j - 1, k)) world.setBlockMetadataWithNotify(i, j, k, stage, 2); }
@Override public void func_149853_b(World world, Random rand, int i, int j, int k) { <DeepExtract> int stage = world.getBlockMetadata(i, j, k) + 1; if (stage > 3) stage = 3; if (stage < 4 && world.getBlock(i, j - 1, k).isFertile(world, i, j - 1, k)) world.setBlockMetadataWithNotify(i, j, k, stage, 2); </DeepExtract> }
Realms-of-Chaos
positive
4,787
public BluetoothAdapter getBluetoothAdapter() throws NullPointerException { if (bluetoothManager == null) { bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); } return bluetoothManager; if (bluetoothManager == null) { BLELog.e("AndroidBLE.java------->>>bluetoothManager is null");...
public BluetoothAdapter getBluetoothAdapter() throws NullPointerException { <DeepExtract> if (bluetoothManager == null) { bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); } return bluetoothManager; </DeepExtract> if (bluetoothManager == null) { BLELog.e("AndroidBLE.java------->...
AndroidBle
positive
4,788
@Override public void onTapInputReceived(@NonNull String tapIdentifier, int data, int repeatData) { if (debug) { Log.d("TapUnityAdapter", tapIdentifier + " TAP input received " + data); } if (debug) { Log.d("TapUnityAdapter", "Repeat info = " + repeatData); } String args = tapIdentifier + UNITY_ARGS_SEPARATOR + data + ...
@Override public void onTapInputReceived(@NonNull String tapIdentifier, int data, int repeatData) { if (debug) { Log.d("TapUnityAdapter", tapIdentifier + " TAP input received " + data); } <DeepExtract> if (debug) { Log.d("TapUnityAdapter", "Repeat info = " + repeatData); } </DeepExtract> String args = tapIdentifier + U...
tap-android-sdk
positive
4,790
protected static void queuePlayerCommand(Player player, String message, long timestamp) { int currentConsumer = Consumer.currentConsumer; int consumerId = Consumer.newConsumerId(currentConsumer); Consumer.consumer.get(currentConsumer).add(new Object[] { consumerId, Process.PLAYER_COMMAND, null, 0, null, 0, 0, null }); ...
protected static void queuePlayerCommand(Player player, String message, long timestamp) { int currentConsumer = Consumer.currentConsumer; int consumerId = Consumer.newConsumerId(currentConsumer); Consumer.consumer.get(currentConsumer).add(new Object[] { consumerId, Process.PLAYER_COMMAND, null, 0, null, 0, 0, null }); ...
CoreProtect
positive
4,791
@Override public void complete(LineReader reader, ParsedLine line, List<Candidate> candidates) { if (line.wordIndex() > 0) { return; } Set<String> builtinOverrides = new HashSet<>(); for (Path path : state.getPath()) { if (Files.isDirectory(path)) { executableInPath(path, candidates, builtinOverrides); } } state.getCom...
@Override public void complete(LineReader reader, ParsedLine line, List<Candidate> candidates) { if (line.wordIndex() > 0) { return; } Set<String> builtinOverrides = new HashSet<>(); for (Path path : state.getPath()) { if (Files.isDirectory(path)) { executableInPath(path, candidates, builtinOverrides); } } <DeepExtract...
hosh
positive
4,792
public void actionPerformed(ActionEvent e) { synchronized (parent) { moteListModel.clear(); parent.clear(); graph.newData(); } }
public void actionPerformed(ActionEvent e) { <DeepExtract> synchronized (parent) { moteListModel.clear(); parent.clear(); graph.newData(); } </DeepExtract> }
tinyos-main
positive
4,793
public void startActionScale(int timerRangeForScale, float scaleRatioWidth, float scaleRatioHeight, float durationSpeedScale, boolean isActionScaleRandomTime) { isActionScale = true; this.timerRangeForSclae = timerRangeForScale; this.scaleRatioWidth = scaleRatioWidth; this.scaleRatioHeight = scaleRatioHeight; this.dura...
public void startActionScale(int timerRangeForScale, float scaleRatioWidth, float scaleRatioHeight, float durationSpeedScale, boolean isActionScaleRandomTime) { isActionScale = true; this.timerRangeForSclae = timerRangeForScale; this.scaleRatioWidth = scaleRatioWidth; this.scaleRatioHeight = scaleRatioHeight; this.dura...
MTX
positive
4,794
protected void updateStatus(TrekHudDataShip thds) { if (player.ship.docked || player.ship.orbiting) { if (player.ship.docked) thds.doStat = "Docked"; else thds.doStat = "In Orbit"; } else if (player.ship.dockable || player.ship.orbitable) { if (player.ship.dockable) thds.doStat = "Dockable"; else thds.doStat = "Orbitab...
protected void updateStatus(TrekHudDataShip thds) { if (player.ship.docked || player.ship.orbiting) { if (player.ship.docked) thds.doStat = "Docked"; else thds.doStat = "In Orbit"; } else if (player.ship.dockable || player.ship.orbitable) { if (player.ship.dockable) thds.doStat = "Dockable"; else thds.doStat = "Orbitab...
jtrek
positive
4,797
private void openActivityInForeground(Intent intent) { Intent newIntent = new Intent(); newIntent.setClassName(getApplicationContext(), intent.getStringExtra(Constants.MAIN_ACTIVITY_CLASS_NAME_KEY)); newIntent.putExtra(Constants.BACKGROUND_MODE_KEY, false); newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); getApplicat...
private void openActivityInForeground(Intent intent) { <DeepExtract> Intent newIntent = new Intent(); newIntent.setClassName(getApplicationContext(), intent.getStringExtra(Constants.MAIN_ACTIVITY_CLASS_NAME_KEY)); newIntent.putExtra(Constants.BACKGROUND_MODE_KEY, false); newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK...
JKLocalNotifications-ANE
positive
4,798
@Override public void onClick(View vv) { if (curstate == guistate.review && guistate.nogame != guistate.review) GoJsActivity.viewUrl("javascript:eidogo.autoPlayers[0].detMoveNumber()"); if (curstate == guistate.markDeadStones && guistate.nogame != guistate.markDeadStones) GoJsActivity.viewUrl("javascript:eidogo.autoPla...
@Override public void onClick(View vv) { <DeepExtract> if (curstate == guistate.review && guistate.nogame != guistate.review) GoJsActivity.viewUrl("javascript:eidogo.autoPlayers[0].detMoveNumber()"); if (curstate == guistate.markDeadStones && guistate.nogame != guistate.markDeadStones) GoJsActivity.viewUrl("javascript:...
DragonGoApp
positive
4,799
void reset() { _preferences.edit().putBoolean("isVideoLicenseActivationDisabledKey", false).apply(); _preferences.edit().putBoolean("isVideoLicenseActivatedKey", false).apply(); }
void reset() { _preferences.edit().putBoolean("isVideoLicenseActivationDisabledKey", false).apply(); <DeepExtract> _preferences.edit().putBoolean("isVideoLicenseActivatedKey", false).apply(); </DeepExtract> }
spark-android-sdk
positive
4,800
public void rvtests() throws Exception { Query query = null; if (variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions != null) { query = LocalCliOptionsParser.variantFilterOptionsParser(variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions); } String rvtestsPath = variantCommandOpti...
public void rvtests() throws Exception { Query query = null; if (variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions != null) { query = LocalCliOptionsParser.variantFilterOptionsParser(variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions); } String rvtestsPath = variantCommandOpti...
hpg-bigdata
positive
4,801
public Properties putName(String name) { super.putValue(NAME_KEY, name); return this; }
public Properties putName(String name) { <DeepExtract> super.putValue(NAME_KEY, name); return this; </DeepExtract> }
analytics-android
positive
4,802
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { IntCache.resetIntCache(); if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) { par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; } if (true && par4 == 1...
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { <DeepExtract> IntCache.resetIntCache(); if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) { par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; } if (tru...
Better-World-Generation-4
positive
4,803
public void onDisconnected(DeviceInfo dev) { Message m = Message.obtain(null, MsgId.DISCONNECTED); m.setData(Utils.device2Bundle(dev)); if (mClientMessenger != null) try { Log.d(TAG, "forward a msg to clientMessenger"); mClientMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "failed to forward msg to local m...
public void onDisconnected(DeviceInfo dev) { Message m = Message.obtain(null, MsgId.DISCONNECTED); m.setData(Utils.device2Bundle(dev)); <DeepExtract> if (mClientMessenger != null) try { Log.d(TAG, "forward a msg to clientMessenger"); mClientMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "failed to forward ...
PeerDeviceNet_Src
positive
4,804
@Test public void test31() throws ParseException, IOException { testExecute("31f", "31o", "config"); }
@Test public void test31() throws ParseException, IOException { <DeepExtract> testExecute("31f", "31o", "config"); </DeepExtract> }
bayou
positive
4,805
@Test public void testMultipleNoCACrl() throws Exception { X509Certificate[] toCheck = new X509Certificate[new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length]; for (int i = 0; i < new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length; i++) toCheck[i] = loadCert("src/test/resources/NIST/certs/" + ne...
@Test public void testMultipleNoCACrl() throws Exception { <DeepExtract> X509Certificate[] toCheck = new X509Certificate[new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length]; for (int i = 0; i < new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length; i++) toCheck[i] = loadCert("src/test/resources/NIS...
canl-java
positive
4,806
public void updatePixels(Pixel[][] other) { buttonForward.enabled = false; if (!buttonBack.enabled) { buttonBack.enabled = true; } deepArrayCopy(prevCache, pixels); for (int i = 0; i < pixels.length; i++) { for (int j = 0; j < pixels[i].length; j++) { pixels[i][j] = new Pixel(other[i][j]); } } }
public void updatePixels(Pixel[][] other) { buttonForward.enabled = false; if (!buttonBack.enabled) { buttonBack.enabled = true; } deepArrayCopy(prevCache, pixels); <DeepExtract> for (int i = 0; i < pixels.length; i++) { for (int j = 0; j < pixels[i].length; j++) { pixels[i][j] = new Pixel(other[i][j]); } } </DeepExtra...
Templar-Cosmetics-Beta
positive
4,807
@Test public void test2() throws IOException { Assert.assertTrue(config.parseArgs("data/dotests/test2.asm", "-do")); Assert.assertTrue("Could not parse file " + "data/dotests/test2.asm", config.codeBaseParser.parseMainSourceFiles(config.inputFiles, code)); testInternal(1, 4); }
@Test public void test2() throws IOException { <DeepExtract> Assert.assertTrue(config.parseArgs("data/dotests/test2.asm", "-do")); Assert.assertTrue("Could not parse file " + "data/dotests/test2.asm", config.codeBaseParser.parseMainSourceFiles(config.inputFiles, code)); testInternal(1, 4); </DeepExtract> }
mdlz80optimizer
positive
4,809
public String toJsonP(String functionName, Object object) { try { return mapper.writeValueAsString(new JSONPObject(functionName, object)); } catch (IOException e) { logger.warn("write to json string error:" + new JSONPObject(functionName, object), e); return null; } }
public String toJsonP(String functionName, Object object) { <DeepExtract> try { return mapper.writeValueAsString(new JSONPObject(functionName, object)); } catch (IOException e) { logger.warn("write to json string error:" + new JSONPObject(functionName, object), e); return null; } </DeepExtract> }
springboard-cloud
positive
4,810
public static double ratioDelete(Element eDelta, Element eXML) { return ((double) nbBlockString(eDelta, "Delete")) / nbBlocks(eXML); }
public static double ratioDelete(Element eDelta, Element eXML) { <DeepExtract> return ((double) nbBlockString(eDelta, "Delete")) / nbBlocks(eXML); </DeepExtract> }
pagelyzer
positive
4,811
public HttpResponse doPUT(String uri, byte[] data, Map<String, String> requestHeaders) throws Exception { HttpPut request = new HttpPut(constructUrl(uri)); if (data != null) { if (this.requestGzipEnabled) { request.addHeader(CONTENT_ENCODING, COMPRESSION_TYPE); request.setEntity(new GzipCompressingEntity(new ByteArrayE...
public HttpResponse doPUT(String uri, byte[] data, Map<String, String> requestHeaders) throws Exception { HttpPut request = new HttpPut(constructUrl(uri)); if (data != null) { if (this.requestGzipEnabled) { request.addHeader(CONTENT_ENCODING, COMPRESSION_TYPE); request.setEntity(new GzipCompressingEntity(new ByteArrayE...
Poseidon
positive
4,812
@Override public String format(LoggingEvent event) { final StringBuilder buf = new StringBuilder(128); String val = (String) event.getMDC(P_HOST); if (val == null) { buf.append('-'); } else { buf.append(val); } buf.append(' '); buf.append('-'); buf.append(' '); String val = (String) event.getMDC(P_USER); if (val == nul...
@Override public String format(LoggingEvent event) { final StringBuilder buf = new StringBuilder(128); String val = (String) event.getMDC(P_HOST); if (val == null) { buf.append('-'); } else { buf.append(val); } buf.append(' '); buf.append('-'); buf.append(' '); String val = (String) event.getMDC(P_USER); if (val == nul...
mini-git-server
positive
4,813
private int sendWRITE(byte[] handle, long offset, byte[] data, int start, int length) throws Exception { int _length = length; _packet.reset(); if (_buffer.buffer.length < _buffer.index + 13 + 21 + handle.length + length + 32 + 20) { _length = _buffer.buffer.length - (_buffer.index + 13 + 21 + handle.length + 32 + 20);...
private int sendWRITE(byte[] handle, long offset, byte[] data, int start, int length) throws Exception { int _length = length; _packet.reset(); if (_buffer.buffer.length < _buffer.index + 13 + 21 + handle.length + length + 32 + 20) { _length = _buffer.buffer.length - (_buffer.index + 13 + 21 + handle.length + 32 + 20);...
vngx-jsch
positive
4,814
@Override public void onClose(final AsyncRequestImpl _asyncRequestImpl) { PlantBase.getPlantScheduler().cancel(scheduledFuture); }
@Override public void onClose(final AsyncRequestImpl _asyncRequestImpl) { <DeepExtract> PlantBase.getPlantScheduler().cancel(scheduledFuture); </DeepExtract> }
JActor2
positive
4,815