before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean(getString(R.string.pref_key_wifi_only_transfers), isChecked);...
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { <DeepExtract> SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean(getString(R.string.pref_key_wifi_only_transfers...
rcloneExplorer
positive
3,728
private void init(Context context) { final View root = LayoutInflater.from(context).inflate(mLayout, this); mIvIcon = (ImageView) root.findViewById(R.id.iv_layout_notice_icon); mTvContent = (TextView) root.findViewById(R.id.tv_layout_notice_content); mTvButton = (TextView) root.findViewById(R.id.tv_layout_notice_button...
private void init(Context context) { final View root = LayoutInflater.from(context).inflate(mLayout, this); mIvIcon = (ImageView) root.findViewById(R.id.iv_layout_notice_icon); mTvContent = (TextView) root.findViewById(R.id.tv_layout_notice_content); mTvButton = (TextView) root.findViewById(R.id.tv_layout_notice_button...
Common
positive
3,730
public boolean addBusMacro(BusMacro bm) { 0x0000FF00 = 0x0000FF00 & 0x0000FF00; for (int y = bm.getRangeA().getYMin(); y <= bm.getRangeA().getYMax(); y++) { for (int x = bm.getRangeA().getXMin(); x <= bm.getRangeA().getXMax(); x++) { slices[x][y] = (slices[x][y] & ~0x0000FF00) | 0x0000FF00; } } return true; }
public boolean addBusMacro(BusMacro bm) { <DeepExtract> 0x0000FF00 = 0x0000FF00 & 0x0000FF00; for (int y = bm.getRangeA().getYMin(); y <= bm.getRangeA().getYMax(); y++) { for (int x = bm.getRangeA().getXMin(); x <= bm.getRangeA().getXMax(); x++) { slices[x][y] = (slices[x][y] & ~0x0000FF00) | 0x0000FF00; } } </DeepExtr...
reconos
positive
3,731
@Override public boolean removeAll(Collection<String> idlist) { DeleteResult result = mongoTemplate.remove(new Query(Criteria.where("_id").in(idlist)), getClassT()); return result.getDeletedCount() > 0; }
@Override <DeepExtract> </DeepExtract> public boolean removeAll(Collection<String> idlist) { <DeepExtract> </DeepExtract> DeleteResult result = mongoTemplate.remove(new Query(Criteria.where("_id").in(idlist)), getClassT()); <DeepExtract> </DeepExtract> return result.getDeletedCount() > 0; <DeepExtract> </DeepExtract> }
resys-one
positive
3,732
public Criteria andUsernameLessThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "username" + " cannot be null"); } criteria.add(new Criterion("username <=", value)); return (Criteria) this; }
public Criteria andUsernameLessThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "username" + " cannot be null"); } criteria.add(new Criterion("username <=", value)); </DeepExtract> return (Criteria) this; }
ssmBillBook
positive
3,735
@Override public int addUser(I i) { return this.d.addUser(i); }
@Override public int addUser(I i) { <DeepExtract> return this.d.addUser(i); </DeepExtract> }
kNNBandit
positive
3,736
public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; if (type == Type.COMBINED_ELEMENTS) return; if (type == Type.UNDETERMINED) type = Type.COMBINED_ELEMENTS; else type = Type.CONFLICTING; }
public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; <DeepExtract> if (type == Type.COMBINED_ELEMENTS) return; if (type == Type.UNDETERMINED) type = Type.COMBINED_ELEMENTS; else type = Type.CONFLICTING; </DeepExtract> }
SwissQRBill
positive
3,737
public KnnView<T> setMaxDataPoints(int maxDataPoints) { this.maxDataPoints = maxDataPoints; _tree = new KdTree.WeightedSqrEuclid<T>(formula.weights.length, maxDataPoints == 0 ? null : maxDataPoints); _tree.setWeights(formula.weights); return this; }
public KnnView<T> setMaxDataPoints(int maxDataPoints) { this.maxDataPoints = maxDataPoints; <DeepExtract> _tree = new KdTree.WeightedSqrEuclid<T>(formula.weights.length, maxDataPoints == 0 ? null : maxDataPoints); _tree.setWeights(formula.weights); </DeepExtract> return this; }
Diamond
positive
3,738
public Criteria andUserEmailNotLike(String value) { if (value == null) { throw new RuntimeException("Value for " + "userEmail" + " cannot be null"); } criteria.add(new Criterion("USER_EMAIL not like", value)); return (Criteria) this; }
public Criteria andUserEmailNotLike(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "userEmail" + " cannot be null"); } criteria.add(new Criterion("USER_EMAIL not like", value)); </DeepExtract> return (Criteria) this; }
console
positive
3,739
@Override public boolean hasPermissionForUser(String user, List<String> permission) { try { READ_WRITE_LOCK.readLock().lock(); return () -> super.hasPermissionForUser(user, permission).get(); } finally { READ_WRITE_LOCK.readLock().unlock(); } }
@Override public boolean hasPermissionForUser(String user, List<String> permission) { <DeepExtract> try { READ_WRITE_LOCK.readLock().lock(); return () -> super.hasPermissionForUser(user, permission).get(); } finally { READ_WRITE_LOCK.readLock().unlock(); } </DeepExtract> }
jcasbin
positive
3,740
public void move(NdefRecordModelNode node, NdefRecordModelParent nextParent, int nextIndex) { Activator.info("Move record at " + node.getParent().indexOf(node)); NdefModelMoveRecordOperation ndefModelRecordMoveOperation = new NdefModelMoveRecordOperation(node, nextParent, nextIndex); addStep(ndefModelRecordMoveOperatio...
public void move(NdefRecordModelNode node, NdefRecordModelParent nextParent, int nextIndex) { Activator.info("Move record at " + node.getParent().indexOf(node)); NdefModelMoveRecordOperation ndefModelRecordMoveOperation = new NdefModelMoveRecordOperation(node, nextParent, nextIndex); <DeepExtract> addStep(ndefModelReco...
nfc-eclipse-plugin
positive
3,741
public Distribution<T> scale(double d) { for (T k : keySet()) { put(k, get(k) * d); } return this; }
public Distribution<T> scale(double d) { <DeepExtract> for (T k : keySet()) { put(k, get(k) * d); } return this; </DeepExtract> }
MiCA
positive
3,742
@Before public final void setUp() { JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); jedisPoolConfig.setMaxTotal(8); jedisPoolConfig.setMaxIdle(8); jedisPoolConfig.setMinIdle(0); jedisPoolConfig.setMaxWaitMillis(15000); return jedisPoolConfig; jedisPool = createJedisPool(jedisPoolConfig); jedisTemplate = new Je...
@Before public final void setUp() { <DeepExtract> JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); jedisPoolConfig.setMaxTotal(8); jedisPoolConfig.setMaxIdle(8); jedisPoolConfig.setMinIdle(0); jedisPoolConfig.setMaxWaitMillis(15000); return jedisPoolConfig; </DeepExtract> jedisPool = createJedisPool(jedisPoolCo...
jedis-ms-sentinel
positive
3,743
public boolean moveNext() { if (cancelFlag.get()) { return false; } final Object[] row = rows.hasNext() ? Table.toArray(rows.next()) : null; if (row == null) { current = null; return false; } return alwaysReturnArray || row.length > 1 ? (E) row : (E) row[0]; return true; }
public boolean moveNext() { if (cancelFlag.get()) { return false; } final Object[] row = rows.hasNext() ? Table.toArray(rows.next()) : null; if (row == null) { current = null; return false; } <DeepExtract> return alwaysReturnArray || row.length > 1 ? (E) row : (E) row[0]; </DeepExtract> return true; }
kareldb
positive
3,744
public boolean loadString(String jsonString) { JsonReader reader = null; try { reader = new JsonReader(new StringReader(jsonString)); JsonParser parser = new JsonParser(); JsonElement element = parser.parse(reader); JsonElement itemElement = element.getAsJsonObject().get(WALLET_DATA_JSON_KEY); if (null == itemElement) ...
public boolean loadString(String jsonString) { <DeepExtract> JsonReader reader = null; try { reader = new JsonReader(new StringReader(jsonString)); JsonParser parser = new JsonParser(); JsonElement element = parser.parse(reader); JsonElement itemElement = element.getAsJsonObject().get(WALLET_DATA_JSON_KEY); if (null ==...
bctest
positive
3,745
@Override public void run() { try { LOGGER.info("Running groovy shell"); IO io = new IO(in, out, err); LOGGER.info("in: {} out: {} err: {}", in, out, err); Binding binding = new Binding(); binding.setVariable("out", io.out); Groovysh groovysh = new Groovysh(binding, io); InteractiveShellRunner isr = new InteractiveShe...
@Override public void run() { <DeepExtract> try { LOGGER.info("Running groovy shell"); IO io = new IO(in, out, err); LOGGER.info("in: {} out: {} err: {}", in, out, err); Binding binding = new Binding(); binding.setVariable("out", io.out); Groovysh groovysh = new Groovysh(binding, io); InteractiveShellRunner isr = new ...
artifactory_ssh_proxy
positive
3,746
public void manipulatePdf(String dest) throws IOException { PdfWriter writer = new PdfWriter(DEST, new WriterProperties().setPdfVersion(PdfVersion.PDF_1_5)); PdfDocument pdfDoc = new PdfDocument(writer); pdfDoc.getCatalog().setPageLayout(PdfName.UseOC); PdfCanvas canvas = new PdfCanvas(pdfDoc.addNewPage()); PdfLayer la...
public void manipulatePdf(String dest) throws IOException { PdfWriter writer = new PdfWriter(DEST, new WriterProperties().setPdfVersion(PdfVersion.PDF_1_5)); PdfDocument pdfDoc = new PdfDocument(writer); pdfDoc.getCatalog().setPageLayout(PdfName.UseOC); PdfCanvas canvas = new PdfCanvas(pdfDoc.addNewPage()); PdfLayer la...
i7js-book
positive
3,749
int inflateSync() { if (z == null) return Z_STREAM_ERROR; if (this.mode != BAD) { this.mode = BAD; this.marker = 0; } if ((n = z.avail_in) == 0) return Z_BUF_ERROR; p = z.next_in_index; m = this.marker; while (n != 0 && m < 4) { if (z.next_in[p] == mark[m]) { m++; } else if (z.next_in[p] != 0) { m = 0; } else { m = 4 -...
int inflateSync() { if (z == null) return Z_STREAM_ERROR; if (this.mode != BAD) { this.mode = BAD; this.marker = 0; } if ((n = z.avail_in) == 0) return Z_BUF_ERROR; p = z.next_in_index; m = this.marker; while (n != 0 && m < 4) { if (z.next_in[p] == mark[m]) { m++; } else if (z.next_in[p] != 0) { m = 0; } else { m = 4 -...
Testingbot-Tunnel
positive
3,750
public static List<MessageReaction> get(Long id, HashMap<String, Object> parameters, HashMap<String, Object> options) throws IOException { parameters = parameters != null ? parameters : new HashMap<String, Object>(); options = options != null ? options : new HashMap<String, Object>(); if (id == null && parameters.conta...
public static List<MessageReaction> get(Long id, HashMap<String, Object> parameters, HashMap<String, Object> options) throws IOException { <DeepExtract> parameters = parameters != null ? parameters : new HashMap<String, Object>(); options = options != null ? options : new HashMap<String, Object>(); if (id == null && pa...
files-sdk-java
positive
3,751
public Criteria andSexGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "sex" + " cannot be null"); } criteria.add(new Criterion("sex >", value)); return (Criteria) this; }
public Criteria andSexGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "sex" + " cannot be null"); } criteria.add(new Criterion("sex >", value)); </DeepExtract> return (Criteria) this; }
SpringBoot_EducationalMS
positive
3,753
@Override long alignToCacheLines(long a) { if (a == 0L) return 0L; long mask = ~(C3 / C1 - 1L); if (a > 0L) { long filled = a + C3 / C1 - 1L; if (filled > 0L) { return filled & mask; } else { long maxAlignedLong = Long.MAX_VALUE & mask; if (a <= maxAlignedLong) return maxAlignedLong; } } else { long filled = a - C3 / C...
@Override long alignToCacheLines(long a) { <DeepExtract> if (a == 0L) return 0L; long mask = ~(C3 / C1 - 1L); if (a > 0L) { long filled = a + C3 / C1 - 1L; if (filled > 0L) { return filled & mask; } else { long maxAlignedLong = Long.MAX_VALUE & mask; if (a <= maxAlignedLong) return maxAlignedLong; } } else { long fille...
Chronicle-Algorithms
positive
3,754
public void resolveConfigurations(Map<String, Map<Option<?>, Object>> map, Locale locale, HttpServletRequest request) { logger.debug("Resolving configurations for the locale {}...", locale); if (LibraryDetector.isJstlAvailable() && !LibraryDetector.isThymeleafAvailable() && userProperties != null) { if (!userProperties...
public void resolveConfigurations(Map<String, Map<Option<?>, Object>> map, Locale locale, HttpServletRequest request) { logger.debug("Resolving configurations for the locale {}...", locale); <DeepExtract> if (LibraryDetector.isJstlAvailable() && !LibraryDetector.isThymeleafAvailable() && userProperties != null) { if (!...
dandelion-datatables
positive
3,755
public static String nameOf(final CommandName name) { if (name instanceof NestedCommandNameImpl) { return nameOf(((NestedCommandNameImpl) name).parent) + " " + name.value(); } return name; }
public static String nameOf(final CommandName name) { if (name instanceof NestedCommandNameImpl) { return nameOf(((NestedCommandNameImpl) name).parent) + " " + name.value(); } <DeepExtract> return name; </DeepExtract> }
mini-git-server
positive
3,756
@Override public void onResponse(List<String> response) { Log.d("Activity", "response = " + response); returnedCount++; progressBar.setVisibility(View.GONE); if (returnedCount == 1) { textView.setText("10 Requests took " + (System.currentTimeMillis() - start)); } else { textView.setText("returnedCount = " + returnedCou...
@Override public void onResponse(List<String> response) { Log.d("Activity", "response = " + response); <DeepExtract> returnedCount++; progressBar.setVisibility(View.GONE); if (returnedCount == 1) { textView.setText("10 Requests took " + (System.currentTimeMillis() - start)); } else { textView.setText("returnedCount = "...
CrossBow
positive
3,757
public static void e(String message) { if (!isDebuggable()) return; className = new Throwable().getStackTrace()[1].getFileName(); methodName = new Throwable().getStackTrace()[1].getMethodName(); lineNumber = new Throwable().getStackTrace()[1].getLineNumber(); Log.e(className, createLog(message)); }
public static void e(String message) { if (!isDebuggable()) return; <DeepExtract> className = new Throwable().getStackTrace()[1].getFileName(); methodName = new Throwable().getStackTrace()[1].getMethodName(); lineNumber = new Throwable().getStackTrace()[1].getLineNumber(); </DeepExtract> Log.e(className, createLog(mess...
DouYuLiveSample
positive
3,758
@Override public boolean visit(final UndefinedLiteral node) { final int nodeStart = node.getStartPosition(); final int nodeEnd = nodeStart + node.getLength(); if (nodeEnd < this.fStart || this.fEnd < nodeStart) { return false; } if (nodeStart <= this.fStart && this.fEnd <= nodeEnd) { this.fCoveringNode = node; } if (th...
@Override public boolean visit(final UndefinedLiteral node) { <DeepExtract> final int nodeStart = node.getStartPosition(); final int nodeEnd = nodeStart + node.getLength(); if (nodeEnd < this.fStart || this.fEnd < nodeStart) { return false; } if (nodeStart <= this.fStart && this.fEnd <= nodeEnd) { this.fCoveringNode = ...
codemining-core
positive
3,759
@Override public default boolean action(Action action, Creature performer, boolean onSurface, BridgePart bridgePart, int encodedTile, short num, float counter) { return propagate(action, SERVER_PROPAGATION, ACTION_PERFORMER_PROPAGATION); }
@Override public default boolean action(Action action, Creature performer, boolean onSurface, BridgePart bridgePart, int encodedTile, short num, float counter) { <DeepExtract> return propagate(action, SERVER_PROPAGATION, ACTION_PERFORMER_PROPAGATION); </DeepExtract> }
WurmServerModLauncher
positive
3,760
public Criteria andStatusNotIn(List<Integer> values) { if (values == null) { throw new RuntimeException("Value for " + "status" + " cannot be null"); } criteria.add(new Criterion("status not in", values)); return (Criteria) this; }
public Criteria andStatusNotIn(List<Integer> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "status" + " cannot be null"); } criteria.add(new Criterion("status not in", values)); </DeepExtract> return (Criteria) this; }
cloud
positive
3,761
private void jButton_srSizeSectionActionPerformed(java.awt.event.ActionEvent evt) { spotReport.setSize(Size.SECTION); jButton_srSize.setText("Size: " + spotReport.getSize()); showCard("Spot Report Activity Card"); }
private void jButton_srSizeSectionActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> spotReport.setSize(Size.SECTION); jButton_srSize.setText("Size: " + spotReport.getSize()); showCard("Spot Report Activity Card"); </DeepExtract> }
vehicle-commander-java
positive
3,762
public void resetBlock() { setText(null); setTag(null); StateListDrawable background_drawable = new StateListDrawable(); background_drawable.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(getResources().getColor(R.color.silver))); background_drawable.addState(new int[] { android.R.attr.state_ena...
public void resetBlock() { setText(null); setTag(null); <DeepExtract> StateListDrawable background_drawable = new StateListDrawable(); background_drawable.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(getResources().getColor(R.color.silver))); background_drawable.addState(new int[] { android.R....
TaipeiTechStudent
positive
3,763
@Override public Point getGuiParts(List<Gui> parts, Map<Gui, Setting<?>> callbacks, Point origin) { GuiLegendLabel label = new GuiLegendLabel(0, origin.getX() - 150, origin.getY(), 300, Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT, Color.WHITE); super.addLine("betterHud.group." + this.name); lines.add(I18n.format(...
@Override public Point getGuiParts(List<Gui> parts, Map<Gui, Setting<?>> callbacks, Point origin) { GuiLegendLabel label = new GuiLegendLabel(0, origin.getX() - 150, origin.getY(), 300, Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT, Color.WHITE); <DeepExtract> super.addLine("betterHud.group." + this.name); lines.ad...
better-hud
positive
3,764
static void moveToFront(Ghost head, Ghost e) { e.prev.next = e.next; e.next.prev = e.prev; e.next = e.prev = null; e.prev = head; e.next = head.next; e.next.prev = e; head.next = e; }
static void moveToFront(Ghost head, Ghost e) { e.prev.next = e.next; e.next.prev = e.prev; e.next = e.prev = null; <DeepExtract> e.prev = head; e.next = head.next; e.next.prev = e; head.next = e; </DeepExtract> }
cache2k-benchmark
positive
3,766
@Test public void testConstructorWithArguments() { List<Object> objList = new ArrayList<>(); Map<String, String> obj1 = new HashMap<>(); obj1.put("key1", "value1"); obj1.put("key2", "value2"); objList.add(obj1); if (2 != 1) { Map<String, String> obj2 = new HashMap<>(); obj2.put("key3", "value3"); obj2.put("key4", "valu...
@Test public void testConstructorWithArguments() { List<Object> objList = new ArrayList<>(); <DeepExtract> Map<String, String> obj1 = new HashMap<>(); obj1.put("key1", "value1"); obj1.put("key2", "value2"); objList.add(obj1); if (2 != 1) { Map<String, String> obj2 = new HashMap<>(); obj2.put("key3", "value3"); obj2.put...
RESTest
positive
3,767
@Test public void testDeserializationAsInt02MillisecondsWithoutTimeZone() throws Exception { OffsetDateTime date = OffsetDateTime.ofInstant(Instant.ofEpochSecond(123456789L, 422000000), Z2); ObjectMapper m = newMapper().configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false); OffsetDateTime value =...
@Test public void testDeserializationAsInt02MillisecondsWithoutTimeZone() throws Exception { OffsetDateTime date = OffsetDateTime.ofInstant(Instant.ofEpochSecond(123456789L, 422000000), Z2); ObjectMapper m = newMapper().configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false); OffsetDateTime value =...
jackson-datatype-jsr310
positive
3,768
@Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setHasOptionsMenu(true); View view = inflater.inflate(R.layout.fragment_instances, container, false); ButterKnife.bind(this, view); instanceMap = new HashMap<>(); transferInstanceList = new ArrayList<>...
@Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setHasOptionsMenu(true); View view = inflater.inflate(R.layout.fragment_instances, container, false); ButterKnife.bind(this, view); instanceMap = new HashMap<>(); transferInstanceList = new ArrayList<>...
skunkworks-crow
positive
3,769
@Override public void keyReleased(KeyEvent e) { String oldCode = list.getSelectedValue(); String newCode = textureCodeField.getText(); if (newCode.length() == 0) return; ModelCreator.currentProject.UpdateTextureCode(oldCode, newCode); ignoreSelects = true; DefaultListModel<String> model = new DefaultListModel<String>()...
@Override public void keyReleased(KeyEvent e) { String oldCode = list.getSelectedValue(); String newCode = textureCodeField.getText(); if (newCode.length() == 0) return; ModelCreator.currentProject.UpdateTextureCode(oldCode, newCode); ignoreSelects = true; <DeepExtract> DefaultListModel<String> model = new DefaultListM...
vsmodelcreator
positive
3,770
@Override protected Void doInBackground(Void... params) { if (getActivity() == null) return null; Context context = getActivity(); if (!preferences.contains(PebbleNotificationCenter.SELECTED_PACKAGES)) return; List<String> list = new ArrayList<String>(); PreferencesUtil.loadCollection(preferences, list, PebbleNotificat...
@Override protected Void doInBackground(Void... params) { if (getActivity() == null) return null; Context context = getActivity(); <DeepExtract> if (!preferences.contains(PebbleNotificationCenter.SELECTED_PACKAGES)) return; List<String> list = new ArrayList<String>(); PreferencesUtil.loadCollection(preferences, list, P...
PebbleNotificationCenter-Android
positive
3,771
@Override public void testDoubleArray(double[] v) throws Exception { MessagePack msgpack = new MessagePack(); Template<double[]> tmpl = DoubleArrayTemplate.instance; BufferPacker packer = msgpack.createBufferPacker(); tmpl.write(packer, v); byte[] bytes = packer.toByteArray(); BufferUnpacker unpacker = msgpack.createBu...
@Override public void testDoubleArray(double[] v) throws Exception { MessagePack msgpack = new MessagePack(); Template<double[]> tmpl = DoubleArrayTemplate.instance; BufferPacker packer = msgpack.createBufferPacker(); tmpl.write(packer, v); byte[] bytes = packer.toByteArray(); BufferUnpacker unpacker = msgpack.createBu...
msgpack-java
positive
3,773
public Criteria andSelectEqualToColumn(TestEntity.Column column) { if (new StringBuilder("`select` = ").append(column.getEscapedColumnName()).toString() == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(new StringBuilder("`select` = ").append(column.getEscapedColu...
public Criteria andSelectEqualToColumn(TestEntity.Column column) { <DeepExtract> if (new StringBuilder("`select` = ").append(column.getEscapedColumnName()).toString() == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(new StringBuilder("`select` = ").append(column....
mybatis-generator-gui-extension
positive
3,774
public static void main(String[] args) { Empty empty = new Empty(); System.out.println("For string [" + "foo" + "] empty = " + isEmpty("foo")); System.out.println("For string [" + "bar" + "] empty = " + isEmpty("bar")); System.out.println("For string [" + "" + "] empty = " + isEmpty("")); }
public static void main(String[] args) { Empty empty = new Empty(); System.out.println("For string [" + "foo" + "] empty = " + isEmpty("foo")); System.out.println("For string [" + "bar" + "] empty = " + isEmpty("bar")); <DeepExtract> System.out.println("For string [" + "" + "] empty = " + isEmpty("")); </DeepExtract> }
edu
positive
3,775
@Override protected void notifyFocusGained(int virtualId, Rect bounds) { AccessibilityEvent event = AccessibilityEvent.obtain(); event.setEventType(AccessibilityEvent.TYPE_VIEW_FOCUSED); event.setSource(this, virtualId); event.setEnabled(true); event.setPackageName(getContext().getPackageName()); if (VERBOSE) { Log.v(T...
@Override protected void notifyFocusGained(int virtualId, Rect bounds) { <DeepExtract> AccessibilityEvent event = AccessibilityEvent.obtain(); event.setEventType(AccessibilityEvent.TYPE_VIEW_FOCUSED); event.setSource(this, virtualId); event.setEnabled(true); event.setPackageName(getContext().getPackageName()); if (VERB...
input-samples
positive
3,777
public void assertKeyInTable(String tableSummaryOrId, String key) { assertTablePresent(tableSummaryOrId); assertTrue("Could not find: [" + getMessage(key) + "]" + "in table [" + tableSummaryOrId + "]", getTestingEngine().getTable(tableSummaryOrId).hasText(getMessage(key))); }
public void assertKeyInTable(String tableSummaryOrId, String key) { <DeepExtract> assertTablePresent(tableSummaryOrId); assertTrue("Could not find: [" + getMessage(key) + "]" + "in table [" + tableSummaryOrId + "]", getTestingEngine().getTable(tableSummaryOrId).hasText(getMessage(key))); </DeepExtract> }
jwebunit
positive
3,778
@Override public void run() { File parent = (File) ((IStructuredSelection) getViewer().getSelection()).getFirstElement(); if (parent == null) { parent = getRootFolder(); } else if (!parent.isDirectory()) { parent = parent.getParentFile(); } if (parent.exists()) { NewFileDialog dialog = new NewFileDialog(getViewSite().g...
@Override public void run() { <DeepExtract> File parent = (File) ((IStructuredSelection) getViewer().getSelection()).getFirstElement(); if (parent == null) { parent = getRootFolder(); } else if (!parent.isDirectory()) { parent = parent.getParentFile(); } if (parent.exists()) { NewFileDialog dialog = new NewFileDialog(g...
archi-scripting-plugin
positive
3,779
@Override public void setDate(int parameterIndex, Date theDate, Calendar cal) throws SQLException { ensureCap(parameterIndex); setObj(parameterIndex, theDate != null ? new Timestamp(theDate.getTime()) : null); }
@Override public void setDate(int parameterIndex, Date theDate, Calendar cal) throws SQLException { <DeepExtract> ensureCap(parameterIndex); setObj(parameterIndex, theDate != null ? new Timestamp(theDate.getTime()) : null); </DeepExtract> }
SQLDroid
positive
3,780
public static void main(String[] args) { MarketplaceWebServiceOrdersAsyncClient client = MarketplaceWebServiceOrdersSampleConfig.getAsyncClient(); List<ListOrdersRequest> requestList = new ArrayList<ListOrdersRequest>(); ListOrdersRequest request = new ListOrdersRequest(); String sellerId = "example"; request.setSeller...
public static void main(String[] args) { MarketplaceWebServiceOrdersAsyncClient client = MarketplaceWebServiceOrdersSampleConfig.getAsyncClient(); List<ListOrdersRequest> requestList = new ArrayList<ListOrdersRequest>(); ListOrdersRequest request = new ListOrdersRequest(); String sellerId = "example"; request.setSeller...
amazon-mws-orders
positive
3,781
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); setContentView(R.layout.activity_home); ButterKnife.bind(this); StatusBarUtil.immersive(this); StatusBarUtil.setPaddingSmart(this, mIvHomeBanner); StatusB...
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); setContentView(R.layout.activity_home); ButterKnife.bind(this); <DeepExtract> StatusBarUtil.immersive(this); StatusBarUtil.setPaddingSmart(this, mIvHomeBa...
UGank
positive
3,783
public Criteria andCommentThreadIdGreaterThanOrEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "commentThreadId" + " cannot be null"); } criteria.add(new Criterion("comment_thread_id >=", value)); return (Criteria) this; }
public Criteria andCommentThreadIdGreaterThanOrEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "commentThreadId" + " cannot be null"); } criteria.add(new Criterion("comment_thread_id >=", value)); </DeepExtract> return (Criteria) this; }
ReptilianDemo
positive
3,784
private void copyFrom(Advertisement other) { if (this == other) { return; } return mStartTimeUtcMillis; return mStopTimeUtcMillis; return mType; return mRequestUrl; }
private void copyFrom(Advertisement other) { if (this == other) { return; } return mStartTimeUtcMillis; return mStopTimeUtcMillis; return mType; <DeepExtract> return mRequestUrl; </DeepExtract> }
xipl
positive
3,785
public Criteria andPasswordBetween(String value1, String value2) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "password" + " cannot be null"); } criteria.add(new Criterion("password between", value1, value2)); return (Criteria) this; }
public Criteria andPasswordBetween(String value1, String value2) { <DeepExtract> if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + "password" + " cannot be null"); } criteria.add(new Criterion("password between", value1, value2)); </DeepExtract> return (Criteria) this; }
answerWeb
positive
3,786
public static void main(String[] args) { ScriptEngineManager sem = new ScriptEngineManager(); ScriptEngine nashorn = sem.getEngineByName("nashorn"); try { nashorn.eval("load('PATH-TO/org/java8recipes/chapter18/js/helloNashorn.js')"); } catch (ScriptException ex) { Logger.getLogger(NashornInvoker.class.getName()).log(Le...
public static void main(String[] args) { ScriptEngineManager sem = new ScriptEngineManager(); ScriptEngine nashorn = sem.getEngineByName("nashorn"); try { nashorn.eval("load('PATH-TO/org/java8recipes/chapter18/js/helloNashorn.js')"); } catch (ScriptException ex) { Logger.getLogger(NashornInvoker.class.getName()).log(Le...
java-8-recipes
positive
3,787
@Override protected void onPostExecute(Object result) { ServiceSinkhole.reload("DNS cleanup", ActivityDns.this, false); if (adapter != null) adapter.changeCursor(DatabaseHelper.getInstance(this).getDns()); }
@Override protected void onPostExecute(Object result) { ServiceSinkhole.reload("DNS cleanup", ActivityDns.this, false); <DeepExtract> if (adapter != null) adapter.changeCursor(DatabaseHelper.getInstance(this).getDns()); </DeepExtract> }
tracker-control-android
positive
3,788
public static void doIt(BufferedReader r, PrintWriter w) { BulkArrayDeque c = new BulkArrayDeque(Integer.class); List<Integer> arr = new ArrayList<Integer>(); System.out.println("\nTest Case 1 - add 20 elements:"); for (int i = 0; i < 20; i++) c.add(i); for (int i = 0; i < 20; i++) arr.add(i); System.out.print("BulkArr...
public static void doIt(BufferedReader r, PrintWriter w) { BulkArrayDeque c = new BulkArrayDeque(Integer.class); List<Integer> arr = new ArrayList<Integer>(); System.out.println("\nTest Case 1 - add 20 elements:"); for (int i = 0; i < 20; i++) c.add(i); for (int i = 0; i < 20; i++) arr.add(i); System.out.print("BulkArr...
Carleton-University-CS-Guide
positive
3,789
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { send_put("get", new get()); recv_put(); send_put("put", new put()); ...
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { send_put("get", new get()); recv_put(); <DeepExtract> send_put("put"...
thrift-rpc
positive
3,790
public void changeCursorAndColumns(Cursor c, String[] from, int[] to) { mOriginalFrom = from; mTo = to; if (c != null) { int i; int count = mOriginalFrom.length; if (mFrom == null || mFrom.length != count) { mFrom = new int[count]; } for (i = 0; i < count; i++) { mFrom[i] = c.getColumnIndexOrThrow(mOriginalFrom[i]); } ...
public void changeCursorAndColumns(Cursor c, String[] from, int[] to) { mOriginalFrom = from; mTo = to; <DeepExtract> if (c != null) { int i; int count = mOriginalFrom.length; if (mFrom == null || mFrom.length != count) { mFrom = new int[count]; } for (i = 0; i < count; i++) { mFrom[i] = c.getColumnIndexOrThrow(mOrigin...
WristBilibili
positive
3,791
public static void checkGet(final String namespace, final long startTimestampMillis, final long endTimestampMillis, final Map<String, String> metadataQuery, final Map<String, String> dimensionsQuery) { checkNamespace(namespace); checkArgument(startTimestampMillis >= 0, "invalid start timestamp"); checkArgument(endTimes...
public static void checkGet(final String namespace, final long startTimestampMillis, final long endTimestampMillis, final Map<String, String> metadataQuery, final Map<String, String> dimensionsQuery) { checkNamespace(namespace); checkArgument(startTimestampMillis >= 0, "invalid start timestamp"); checkArgument(endTimes...
cantor
positive
3,792
public void worldDataBegin() { original = Vars.net; staticNet.setNet(net).setProvider(provider); Vars.net = staticNet; mindustry.gen.Call.worldDataBegin(); Vars.net = original; original = null; }
public void worldDataBegin() { original = Vars.net; staticNet.setNet(net).setProvider(provider); Vars.net = staticNet; mindustry.gen.Call.worldDataBegin(); <DeepExtract> Vars.net = original; original = null; </DeepExtract> }
Mindustry-Ozone
positive
3,794
protected InnerBuilder replaceHeaderWithUrl(String url, String key, String value) { if (UrlUtil.isUrl(url) && !TextUtils.isEmpty(key)) { Map<String, String> existHeaders = mUrlHeaders.get(url); if (existHeaders == null) { existHeaders = new HashMap<String, String>(); mUrlHeaders.put(url, existHeaders); } if (true) { if...
protected InnerBuilder replaceHeaderWithUrl(String url, String key, String value) { <DeepExtract> if (UrlUtil.isUrl(url) && !TextUtils.isEmpty(key)) { Map<String, String> existHeaders = mUrlHeaders.get(url); if (existHeaders == null) { existHeaders = new HashMap<String, String>(); mUrlHeaders.put(url, existHeaders); } ...
file-downloader
positive
3,795
@Override public void handleMessage(Message msg) { dismissDialog(); String msg = ""; if (mInputType == InputType.PLAIN_TEXT || mInputType == InputType.PASSWORD) { msg = mEditText.getText().toString(); } else { msg = content; } Log.d(TAG, "setResult:" + mResultMap); JSONObject ret2 = new JSONObject(); try { ret2.put("ro...
@Override public void handleMessage(Message msg) { <DeepExtract> dismissDialog(); String msg = ""; if (mInputType == InputType.PLAIN_TEXT || mInputType == InputType.PASSWORD) { msg = mEditText.getText().toString(); } else { msg = content; } Log.d(TAG, "setResult:" + mResultMap); JSONObject ret2 = new JSONObject(); try ...
qpysl4a
positive
3,797
public Criteria andAddressIn(List<String> values) { if (values == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address in", values)); return (Criteria) this; }
public Criteria andAddressIn(List<String> values) { <DeepExtract> if (values == null) { throw new RuntimeException("Value for " + "address" + " cannot be null"); } criteria.add(new Criterion("address in", values)); </DeepExtract> return (Criteria) this; }
health_online
positive
3,798
private ChannelHandler getChannelHandler(Object o) throws ClassNotFoundException, IllegalAccessException, InstantiationException { String className; if (o instanceof String) { String s = (String) o; if (s.indexOf('\n') > -1) s = s.substring(0, s.indexOf('\n')); className = s; } else if (o instanceof Element) { Element ...
private ChannelHandler getChannelHandler(Object o) throws ClassNotFoundException, IllegalAccessException, InstantiationException { String className; if (o instanceof String) { String s = (String) o; if (s.indexOf('\n') > -1) s = s.substring(0, s.indexOf('\n')); className = s; } else if (o instanceof Element) { Element ...
mallet
positive
3,799
@Override public void atTurnStart() { baseCard.isCostModified = this.isCostModified; baseCard.isCostModifiedForTurn = this.isCostModifiedForTurn; baseCard.costForTurn = this.costForTurn; baseCard.cost = this.cost; baseCard.atTurnStart(); }
@Override public void atTurnStart() { <DeepExtract> baseCard.isCostModified = this.isCostModified; baseCard.isCostModifiedForTurn = this.isCostModifiedForTurn; baseCard.costForTurn = this.costForTurn; baseCard.cost = this.cost; </DeepExtract> baseCard.atTurnStart(); }
sts-mad-science-mod
positive
3,801
protected void processBlock(byte[] data) { for (int i = 0; i < 16; i++) { M[i] = decodeBELong(data, i * 8); G[i] = M[i] ^ H[i]; } for (int r = 0; r < 14; r++) { G[0x0] ^= (long) (r) << 56; G[0x1] ^= (long) (0x10 + r) << 56; G[0x2] ^= (long) (0x20 + r) << 56; G[0x3] ^= (long) (0x30 + r) << 56; G[0x4] ^= (long) (0x40 + r...
protected void processBlock(byte[] data) { for (int i = 0; i < 16; i++) { M[i] = decodeBELong(data, i * 8); G[i] = M[i] ^ H[i]; } for (int r = 0; r < 14; r++) { G[0x0] ^= (long) (r) << 56; G[0x1] ^= (long) (0x10 + r) << 56; G[0x2] ^= (long) (0x20 + r) << 56; G[0x3] ^= (long) (0x30 + r) << 56; G[0x4] ^= (long) (0x40 + r...
burst-mining-system
positive
3,802
private void checkedSave(Permission p) throws IOException { Jenkins.getActiveInstance().checkPermission(p); Authentication old = SecurityContextHolder.getContext().getAuthentication(); SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM); try { save(); } finally { SecurityContextHolder.getContext().setAuthe...
private void checkedSave(Permission p) throws IOException { <DeepExtract> Jenkins.getActiveInstance().checkPermission(p); </DeepExtract> Authentication old = SecurityContextHolder.getContext().getAuthentication(); SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM); try { save(); } finally { SecurityContex...
kube-credentials-plugin
positive
3,803
@Override public void appendTo(AppendableExt app) throws IOException { app.append("WHEN ").append(_test).append(" THEN "); app.append(_result); }
@Override public void appendTo(AppendableExt app) throws IOException { app.append("WHEN ").append(_test).append(" THEN "); <DeepExtract> app.append(_result); </DeepExtract> }
sqlbuilder
positive
3,804
@Override public void show() { if (itemSize <= 0) { return; } listAdapter.notifyDataSetChanged(); if (listView != null) { listView.setAdapter(listAdapter); listView.setOnItemClickListener(itemListener); } super.show(); }
@Override public void show() { if (itemSize <= 0) { return; } <DeepExtract> listAdapter.notifyDataSetChanged(); if (listView != null) { listView.setAdapter(listAdapter); listView.setOnItemClickListener(itemListener); } </DeepExtract> super.show(); }
NIM_Android_AVChatKit
positive
3,805
public static void main(String[] args) { for (int i = 0; i < sort().length; i++) { System.out.println(sort()[i]); } }
public static void main(String[] args) { <DeepExtract> for (int i = 0; i < sort().length; i++) { System.out.println(sort()[i]); } </DeepExtract> }
framework-analysis
positive
3,806
@Deprecated public Set<Rel> getPermittedRelations(MPerm perm) { return FactionColl.get().get(perm); }
@Deprecated public Set<Rel> getPermittedRelations(MPerm perm) { <DeepExtract> return FactionColl.get().get(perm); </DeepExtract> }
Factions
positive
3,807
@Test public void testCommitAfterPoll(TestContext ctx) throws Exception { String topicName = "testCommitAfterPoll-" + this.getClass().getName(); String consumerId = topicName; Async batch = ctx.async(); AtomicInteger index = new AtomicInteger(); int numMessages = 10; kafkaCluster.useTo().produceStrings(numMessages, bat...
@Test public void testCommitAfterPoll(TestContext ctx) throws Exception { String topicName = "testCommitAfterPoll-" + this.getClass().getName(); String consumerId = topicName; Async batch = ctx.async(); AtomicInteger index = new AtomicInteger(); int numMessages = 10; kafkaCluster.useTo().produceStrings(numMessages, bat...
vertx-kafka-client
positive
3,808
private void notifyHierarchyChanged() { if (currentlyStickingView != null) { stopStickingCurrentlyStickingView(); } stickyViews.clear(); if (!detainStickyView(getChildAt(0)) && (getChildAt(0) instanceof ViewGroup)) { ViewGroup vg = (ViewGroup) getChildAt(0); for (int i = 0; i < vg.getChildCount(); i++) findStickyViews(...
private void notifyHierarchyChanged() { if (currentlyStickingView != null) { stopStickingCurrentlyStickingView(); } stickyViews.clear(); if (!detainStickyView(getChildAt(0)) && (getChildAt(0) instanceof ViewGroup)) { ViewGroup vg = (ViewGroup) getChildAt(0); for (int i = 0; i < vg.getChildCount(); i++) findStickyViews(...
SwipeRecyclerView
positive
3,809
public void setIdle() { currentlyBusy = false; currentImage = idleImage; SwingUtilities.invokeLater(() -> { jFrame.setIconImage(currentImage); trayIcon.setImage(currentImage); }); }
public void setIdle() { currentlyBusy = false; currentImage = idleImage; <DeepExtract> SwingUtilities.invokeLater(() -> { jFrame.setIconImage(currentImage); trayIcon.setImage(currentImage); }); </DeepExtract> }
dli-downloader
positive
3,811
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { if (DEBUGGING) { LogUtil.d(TAG, "beforeTextChanged, count=" + count); } }
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { <DeepExtract> if (DEBUGGING) { LogUtil.d(TAG, "beforeTextChanged, count=" + count); } </DeepExtract> }
FMap
positive
3,812
protected void addFilterOption(@Nonnull final String value) { Objects.requireNonNull(value, "parameter value cannot be null"); Objects.requireNonNull(new QueryOption("$filter", value), "parameter option cannot be null"); baseRequest.addQueryOption(new QueryOption("$filter", value)); }
protected void addFilterOption(@Nonnull final String value) { Objects.requireNonNull(value, "parameter value cannot be null"); <DeepExtract> Objects.requireNonNull(new QueryOption("$filter", value), "parameter option cannot be null"); baseRequest.addQueryOption(new QueryOption("$filter", value)); </DeepExtract> }
msgraph-sdk-java-core
positive
3,813
private void initData() { displayItemCount = offset * 2 + 1; views.removeAllViews(); for (String item : items) { views.addView(createView(item)); } int position = itemHeight * (selectedIndex - offset) / itemHeight + offset; int remainder = itemHeight * (selectedIndex - offset) % itemHeight; int divided = itemHeight * (...
private void initData() { displayItemCount = offset * 2 + 1; views.removeAllViews(); for (String item : items) { views.addView(createView(item)); } <DeepExtract> int position = itemHeight * (selectedIndex - offset) / itemHeight + offset; int remainder = itemHeight * (selectedIndex - offset) % itemHeight; int divided = ...
AndroidPicker_LikeiOS
positive
3,814
public static void showShortSnackbar(View parent, CharSequence text, @ColorInt int textColor, @ColorInt int bgColor, CharSequence actionText, int actionTextColor, View.OnClickListener listener) { snackbarWeakReference = new WeakReference<>(Snackbar.make(parent, text, Snackbar.LENGTH_SHORT)); Snackbar snackbar = snackba...
public static void showShortSnackbar(View parent, CharSequence text, @ColorInt int textColor, @ColorInt int bgColor, CharSequence actionText, int actionTextColor, View.OnClickListener listener) { <DeepExtract> snackbarWeakReference = new WeakReference<>(Snackbar.make(parent, text, Snackbar.LENGTH_SHORT)); Snackbar snac...
OdyAndroidStore
positive
3,816
@Override public void pause() { if (element == null) { throw new IllegalStateException("This music instance is already disposed"); } element.pause(); }
@Override public void pause() { <DeepExtract> if (element == null) { throw new IllegalStateException("This music instance is already disposed"); } </DeepExtract> element.pause(); }
teavm-libgdx
positive
3,817
@Test public void query7() throws Exception { try (Check check = new Check()) { try (TSVReader expected = new TSVReader(new File(lubm + "/answers/answers_query" + 7 + ".txt"))) { expected.next(); for (List<String> line : expected) { check.onceList(line); } } check.ignoreTooOften(); String prefix = "query" + 7 + "/"; fo...
@Test public void query7() throws Exception { <DeepExtract> try (Check check = new Check()) { try (TSVReader expected = new TSVReader(new File(lubm + "/answers/answers_query" + 7 + ".txt"))) { expected.next(); for (List<String> line : expected) { check.onceList(line); } } check.ignoreTooOften(); String prefix = "query"...
bashlog
positive
3,819
protected void setPaintColor(final int paintColor) { mPaintModeView.setPaintStrokeColor(paintColor); this.mPaintView.setColor(mPaintModeView.getStokenColor()); this.mPaintView.setWidth(mPaintModeView.getStokenWidth()); }
protected void setPaintColor(final int paintColor) { mPaintModeView.setPaintStrokeColor(paintColor); <DeepExtract> this.mPaintView.setColor(mPaintModeView.getStokenColor()); this.mPaintView.setWidth(mPaintModeView.getStokenWidth()); </DeepExtract> }
SimpleImageEditor
positive
3,820
public View setErrorLayout(@LayoutRes int layoutResId) { if (mErrorView != null) return mErrorView; ViewStub viewStub = (ViewStub) mView.findViewById(R.id.base_error_stub); if (viewStub != null) { viewStub.setLayoutResource(layoutResId); } ViewStub viewStub = (ViewStub) mView.findViewById(R.id.base_error_stub); if (vie...
public View setErrorLayout(@LayoutRes int layoutResId) { if (mErrorView != null) return mErrorView; ViewStub viewStub = (ViewStub) mView.findViewById(R.id.base_error_stub); if (viewStub != null) { viewStub.setLayoutResource(layoutResId); } <DeepExtract> ViewStub viewStub = (ViewStub) mView.findViewById(R.id.base_error_...
MeiBaseModule
positive
3,821
private void abortHttpDialog(XmlMAPDialog xmlMAPDialog) { this.setXmlMAPDialog(xmlMAPDialog); EventContext httpEventContext = getEventContextCMP(); if (httpEventContext == null) { if (super.logger.isWarningEnabled()) { super.logger.warning("When HTTP Dialog aborting no pending HTTP request is found"); return; } } try {...
private void abortHttpDialog(XmlMAPDialog xmlMAPDialog) { this.setXmlMAPDialog(xmlMAPDialog); EventContext httpEventContext = getEventContextCMP(); if (httpEventContext == null) { if (super.logger.isWarningEnabled()) { super.logger.warning("When HTTP Dialog aborting no pending HTTP request is found"); return; } } try {...
ussdgateway
positive
3,822
@Test public void testAgainstArrayDequeVariousTailHeadPositions() { this.deque.clear(); this.deque.head = this.deque.tail = 2; final Random rnd = new Random(randomLong()); final int rounds = 10000; final int modulo = 100; final ArrayDeque<KType> ad = new ArrayDeque<KType>(); for (int i = 0; i < rounds; i++) { KType k =...
@Test public void testAgainstArrayDequeVariousTailHeadPositions() { this.deque.clear(); this.deque.head = this.deque.tail = 2; <DeepExtract> final Random rnd = new Random(randomLong()); final int rounds = 10000; final int modulo = 100; final ArrayDeque<KType> ad = new ArrayDeque<KType>(); for (int i = 0; i < rounds; i+...
hppc
positive
3,823
private static void reqObject(String method, String url, Map<String, String> headers, HttpEntity entity, Context parent, ModelCallback<JSONObject> callback) { RequestAsyncTask<JSONObject> task = new RequestAsyncTask<JSONObject>(method, url, entity, false, false, parent, callback) { @Override protected JSONObject toJSON...
private static void reqObject(String method, String url, Map<String, String> headers, HttpEntity entity, Context parent, ModelCallback<JSONObject> callback) { RequestAsyncTask<JSONObject> task = new RequestAsyncTask<JSONObject>(method, url, entity, false, false, parent, callback) { @Override protected JSONObject toJSON...
buddycloud-android
positive
3,824
private void destroyBridgeButtonActionPerformed(java.awt.event.ActionEvent evt) { if (startFloor == Integer.MIN_VALUE) { return; } Map map = planner.getMapPanel().getMap(); Tile startTile = map.getTile(map.getTile(0, 0), startX, startY); if (startFloor >= 0 && startTile.getBridgePart() != null) { startTile.getBridgePar...
private void destroyBridgeButtonActionPerformed(java.awt.event.ActionEvent evt) { if (startFloor == Integer.MIN_VALUE) { return; } Map map = planner.getMapPanel().getMap(); Tile startTile = map.getTile(map.getTile(0, 0), startX, startY); if (startFloor >= 0 && startTile.getBridgePart() != null) { startTile.getBridgePar...
DeedPlanner-2
positive
3,826
private void addPersonAttributes(Patient pt, Element root, XformsService xformsService, User creator) throws Exception { List<String> names = DOMUtil.getModelComplexObsNodeNames(root.getOwnerDocument().getDocumentElement().getAttribute("id")); for (String name : names) saveComplexObsValue(DOMUtil.getElement(root.getOwn...
private void addPersonAttributes(Patient pt, Element root, XformsService xformsService, User creator) throws Exception { <DeepExtract> List<String> names = DOMUtil.getModelComplexObsNodeNames(root.getOwnerDocument().getDocumentElement().getAttribute("id")); for (String name : names) saveComplexObsValue(DOMUtil.getEleme...
buendia
positive
3,827
public void dilate(final double da, final double db, final double dc) { if (this.ra + da <= 0 || this.rb + db <= 0 || this.rc + dc <= 0) { throw new IllegalArgumentException("Ellipsoid cannot have semiaxis <= 0"); } this.ra = this.ra + da; this.rb = this.rb + db; this.rc = this.rc + dc; setEigenvalues(); }
public void dilate(final double da, final double db, final double dc) { <DeepExtract> if (this.ra + da <= 0 || this.rb + db <= 0 || this.rc + dc <= 0) { throw new IllegalArgumentException("Ellipsoid cannot have semiaxis <= 0"); } this.ra = this.ra + da; this.rb = this.rb + db; this.rc = this.rc + dc; setEigenvalues(); ...
BoneJ
positive
3,828
@Override public List<Function> findAllFunction() { return groupDao.findAll(); }
@Override public List<Function> findAllFunction() { <DeepExtract> return groupDao.findAll(); </DeepExtract> }
logistics-back
positive
3,829
@Override public void setImageDrawable(Drawable drawable) { super.setImageDrawable(drawable); if (isZoomEnabled) { super.setScaleType(ScaleType.MATRIX); updateBaseMatrix(getDrawable()); } else { resetMatrix(); } }
@Override public void setImageDrawable(Drawable drawable) { super.setImageDrawable(drawable); <DeepExtract> if (isZoomEnabled) { super.setScaleType(ScaleType.MATRIX); updateBaseMatrix(getDrawable()); } else { resetMatrix(); } </DeepExtract> }
ZUILib
positive
3,830
public static synchronized boolean appendFile(String filePath, String fileName, String content) { try { File fileDir = new File(filePath); if (!fileDir.exists()) { fileDir.mkdirs(); } String filePath = filePath + File.separator + fileName; File file = new File(filePath); if (!file.exists()) { try { file.createNewFile()...
public static synchronized boolean appendFile(String filePath, String fileName, String content) { <DeepExtract> try { File fileDir = new File(filePath); if (!fileDir.exists()) { fileDir.mkdirs(); } String filePath = filePath + File.separator + fileName; File file = new File(filePath); if (!file.exists()) { try { file.c...
FanucCNCInfo
positive
3,831
@Test public void container_tags_continue_to_support_original_model_rendering_methods() throws IOException { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(String.valueOf(null)); assertThat(stringBuilder.toString(), is("<div><div></div></div>")); }
@Test public void container_tags_continue_to_support_original_model_rendering_methods() throws IOException { StringBuilder stringBuilder = new StringBuilder(); <DeepExtract> stringBuilder.append(String.valueOf(null)); </DeepExtract> assertThat(stringBuilder.toString(), is("<div><div></div></div>")); }
j2html
positive
3,833
@Override public float floatValue() { return toLong(value); }
@Override public float floatValue() { <DeepExtract> return toLong(value); </DeepExtract> }
pancake-smarts
positive
3,834
private void resetFifo() { mCount = 0; mBufferIn = 0; mBufferOut = 0; mTimestamps = new long[mBufferCount]; mBufferRequested = new Semaphore(mBufferCount); mBufferCommitted = new Semaphore(0); mSum = new long[mSize]; mElapsed = new long[mSize]; mNow = SystemClock.elapsedRealtime(); mOldNow = mNow; mCount = 0; mDelta = ...
private void resetFifo() { mCount = 0; mBufferIn = 0; mBufferOut = 0; mTimestamps = new long[mBufferCount]; mBufferRequested = new Semaphore(mBufferCount); mBufferCommitted = new Semaphore(0); <DeepExtract> mSum = new long[mSize]; mElapsed = new long[mSize]; mNow = SystemClock.elapsedRealtime(); mOldNow = mNow; mCount ...
RtspServerAndVlcPlay
positive
3,835
private static boolean tupletype_2_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "tupletype_2_0_1")) return false; Marker m = enter_section_(b); if (!recursion_guard_(b, l + 1, "infixtype")) r = false; boolean r; Marker m = enter_section_(b, l + 1, _NONE_, "<infixtype>"); r = type(b, l + 1 + 1); r = r && infix...
private static boolean tupletype_2_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "tupletype_2_0_1")) return false; Marker m = enter_section_(b); <DeepExtract> if (!recursion_guard_(b, l + 1, "infixtype")) r = false; boolean r; Marker m = enter_section_(b, l + 1, _NONE_, "<infixtype>"); r = type(b, l + 1 + 1); ...
intellij-pony
positive
3,836
public void keyPressed(java.awt.event.KeyEvent evt) { if (evt.getKeyCode() == evt.VK_ENTER) { refreshStack(); } }
public void keyPressed(java.awt.event.KeyEvent evt) { <DeepExtract> if (evt.getKeyCode() == evt.VK_ENTER) { refreshStack(); } </DeepExtract> }
8085
positive
3,837
@Override public int compare(Problem_Index rhs, Problem_Index lhs) { int l; switch(lhs.getLevel()) { case "Easy": l = 0; case "Medium": l = 1; case "Hard": l = 2; default: l = 0; } int r; switch(rhs.getLevel()) { case "Easy": r = 0; case "Medium": r = 1; case "Hard": r = 2; default: r = 0; } if (l < r) return -1; else ...
@Override public int compare(Problem_Index rhs, Problem_Index lhs) { int l; switch(lhs.getLevel()) { case "Easy": l = 0; case "Medium": l = 1; case "Hard": l = 2; default: l = 0; } <DeepExtract> int r; switch(rhs.getLevel()) { case "Easy": r = 0; case "Medium": r = 1; case "Hard": r = 2; default: r = 0; } </DeepExtract...
LeeCo
positive
3,838
public synchronized void flush() throws IOException { if (journalWriter == null) { throw new IllegalStateException("cache is closed"); } while (size > maxSize) { final Map.Entry<String, Entry> toEvict = lruEntries.entrySet().iterator().next(); remove(toEvict.getKey()); } journalWriter.flush(); }
public synchronized void flush() throws IOException { if (journalWriter == null) { throw new IllegalStateException("cache is closed"); } <DeepExtract> while (size > maxSize) { final Map.Entry<String, Entry> toEvict = lruEntries.entrySet().iterator().next(); remove(toEvict.getKey()); } </DeepExtract> journalWriter.flush...
wanAndroid
positive
3,839
private String readContentFromPost(String URL, String data) throws IOException { if (debugCode) { System.out.println("gtlog: " + data); } URL postUrl = new URL(URL); HttpURLConnection connection = (HttpURLConnection) postUrl.openConnection(); connection.setConnectTimeout(2000); connection.setReadTimeout(2000); connecti...
private String readContentFromPost(String URL, String data) throws IOException { <DeepExtract> if (debugCode) { System.out.println("gtlog: " + data); } </DeepExtract> URL postUrl = new URL(URL); HttpURLConnection connection = (HttpURLConnection) postUrl.openConnection(); connection.setConnectTimeout(2000); connection.s...
YMall
positive
3,840
@Override protected void onNewIntent(Intent intent) { LocalBroadcastHelper.sendBroadcast(this, RingtoneService.ACTION_NOTIFY_MISSED); super.finish(); startActivity(intent); }
@Override protected void onNewIntent(Intent intent) { LocalBroadcastHelper.sendBroadcast(this, RingtoneService.ACTION_NOTIFY_MISSED); <DeepExtract> super.finish(); </DeepExtract> startActivity(intent); }
ClockPlus
positive
3,841
@Test public void testSue() { assertEquals("wrong key for '" + "Sue" + "'", "S000", SoundexComparator.soundex("Sue")); }
@Test public void testSue() { <DeepExtract> assertEquals("wrong key for '" + "Sue" + "'", "S000", SoundexComparator.soundex("Sue")); </DeepExtract> }
duke
positive
3,842
@Test public void parseCacheHeaders_normalExpire() { long now = System.currentTimeMillis(); headers.put("Date", rfc1123Date(now)); headers.put("Last-Modified", rfc1123Date(now - ONE_DAY_MILLIS)); headers.put("Expires", rfc1123Date(now + ONE_HOUR_MILLIS)); Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response)...
@Test public void parseCacheHeaders_normalExpire() { long now = System.currentTimeMillis(); headers.put("Date", rfc1123Date(now)); headers.put("Last-Modified", rfc1123Date(now - ONE_DAY_MILLIS)); headers.put("Expires", rfc1123Date(now + ONE_HOUR_MILLIS)); Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response)...
grapevine
positive
3,843
public void setUnitOfMeasure(int unitOfMeasure) { if (_text.length() > 0) { int[] kerning = calculateKerning(_text.toString(), OUTPUT_SCALE); float w = calculateWidth(_text.toString()) / OUTPUT_SCALE; float h = calculateFontHeight() / OUTPUT_SCALE; float x = _x / OUTPUT_SCALE; float y = _y / OUTPUT_SCALE; _printer.prin...
public void setUnitOfMeasure(int unitOfMeasure) { <DeepExtract> if (_text.length() > 0) { int[] kerning = calculateKerning(_text.toString(), OUTPUT_SCALE); float w = calculateWidth(_text.toString()) / OUTPUT_SCALE; float h = calculateFontHeight() / OUTPUT_SCALE; float x = _x / OUTPUT_SCALE; float y = _y / OUTPUT_SCALE;...
pcl-parser
positive
3,844
public void demorph(EntityLivingBase target) { if (Metamorph.proxy.config.disable_health) { return; } float maxHealth = target.getMaxHealth(); float currentHealth = target.getHealth(); float ratio = currentHealth / maxHealth; if (target instanceof EntityPlayer) { IMorphing capability = Morphing.get((EntityPlayer) targe...
public void demorph(EntityLivingBase target) { <DeepExtract> if (Metamorph.proxy.config.disable_health) { return; } float maxHealth = target.getMaxHealth(); float currentHealth = target.getHealth(); float ratio = currentHealth / maxHealth; if (target instanceof EntityPlayer) { IMorphing capability = Morphing.get((Entit...
metamorph
positive
3,845