before stringlengths 33 3.21M | after stringlengths 63 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
public static String encrypt160(String data) {
if (StringUtils.isBlank(data)) {
return null;
}
try {
MessageDigest messageDigest = MessageDigest.getInstance(RIPEMD_160);
messageDigest.update(data.getBytes(StandardCharsets.UTF_8));
byte[] bytes = messageDigest.digest();
return HexUtil.bytes2Hex(bytes);
} catch (Exceptio... | public static String encrypt160(String data) {
<DeepExtract>
if (StringUtils.isBlank(data)) {
return null;
}
try {
MessageDigest messageDigest = MessageDigest.getInstance(RIPEMD_160);
messageDigest.update(data.getBytes(StandardCharsets.UTF_8));
byte[] bytes = messageDigest.digest();
return HexUtil.bytes2Hex(bytes);
} c... | lion | positive | 435,325 |
private ClientZkOperations getClientZkOperations() {
var value = () -> clientZkOperations.get();
if (value != null) {
return value;
}
synchronized (LOCK) {
value = () -> clientZkOperations.get();
if (value != null) {
return value;
}
() -> clientZkOperations = ClientZkOperations.create(serviceEnvironmentConfig.getSignal... | private ClientZkOperations getClientZkOperations() {
<DeepExtract>
var value = () -> clientZkOperations.get();
if (value != null) {
return value;
}
synchronized (LOCK) {
value = () -> clientZkOperations.get();
if (value != null) {
return value;
}
() -> clientZkOperations = ClientZkOperations.create(serviceEnvironmentCo... | signal-cli | positive | 435,327 |
public void dragOver(final DropTargetDragEvent arg0) {
Point old = mouse;
mouse = arg0.getLocation();
repaint(old.x, old.y);
repaint(mouse.x, mouse.y);
} | public void dragOver(final DropTargetDragEvent arg0) {
<DeepExtract>
Point old = mouse;
mouse = arg0.getLocation();
repaint(old.x, old.y);
repaint(mouse.x, mouse.y);
</DeepExtract>
} | mallet | positive | 435,328 |
public void writeMessageBegin(TMessage message) throws TException {
this.byteDirectBuffer[0] = (byte) -126;
this.trans_.write(this.byteDirectBuffer);
this.byteDirectBuffer[0] = 0x1 | message.type << 5 & 0xFFFFFFE0;
this.trans_.write(this.byteDirectBuffer);
int idx = 0;
while (true) {
if ((message.seqid & 0xFFFFFF80) ==... | public void writeMessageBegin(TMessage message) throws TException {
this.byteDirectBuffer[0] = (byte) -126;
this.trans_.write(this.byteDirectBuffer);
this.byteDirectBuffer[0] = 0x1 | message.type << 5 & 0xFFFFFFE0;
this.trans_.write(this.byteDirectBuffer);
int idx = 0;
while (true) {
if ((message.seqid & 0xFFFFFF80) ==... | news-duplicated | positive | 435,329 |
public void moveTo(float targetX, float targetY) {
if (x == targetX && y == targetY)
return;
if (targetX < scene.getX() || !canMoveHorizontally()) {
targetX = scene.getX();
}
if (targetY < scene.getY() || !canMoveVertically()) {
targetY = scene.getY();
}
if (canMoveHorizontally()) {
if (!isWithinScene(targetX, 0)) {
ta... | public void moveTo(float targetX, float targetY) {
if (x == targetX && y == targetY)
return;
if (targetX < scene.getX() || !canMoveHorizontally()) {
targetX = scene.getX();
}
if (targetY < scene.getY() || !canMoveVertically()) {
targetY = scene.getY();
}
if (canMoveHorizontally()) {
if (!isWithinScene(targetX, 0)) {
ta... | MarteEngine | positive | 435,330 |
public static org.gbif.api.vocabulary.NamePart toGbif(NamePart notho) {
try {
return notho == null ? null : Enum.valueOf(org.gbif.api.vocabulary.NamePart.class, notho.name());
} catch (IllegalArgumentException e) {
LOG.warn("Unable to convert {} into {}", notho, org.gbif.api.vocabulary.NamePart.class);
return null;
}
} | public static org.gbif.api.vocabulary.NamePart toGbif(NamePart notho) {
<DeepExtract>
try {
return notho == null ? null : Enum.valueOf(org.gbif.api.vocabulary.NamePart.class, notho.name());
} catch (IllegalArgumentException e) {
LOG.warn("Unable to convert {} into {}", notho, org.gbif.api.vocabulary.NamePart.class);
re... | name-parser | positive | 435,331 |
private void ProblemBMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
filepath = JGAAPConstants.JGAAP_RESOURCE_PACKAGE + "aaac/problem" + "B" + "/load" + "B" + ".csv";
List<Document> documents = Collections.emptyList();
try {
documents = Utils.getDocumentsFromCSV(CSVIO.readCSV(com.jgaap.JGAAP.class.getResource... | private void ProblemBMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
filepath = JGAAPConstants.JGAAP_RESOURCE_PACKAGE + "aaac/problem" + "B" + "/load" + "B" + ".csv";
List<Document> documents = Collections.emptyList();
try {
documents = Utils.getDocumentsFromCSV(CSVIO.readCSV(com.jgaap.JGAAP.cla... | JGAAP | positive | 435,332 |
@Test
public void testPlotMultiple_largeCount_poc1() {
long testAccountId = 123456L;
long testNonce = 654321L;
int nonceCount = 33;
byte[] reference = new byte[nonceCount * MiningPlot.PLOT_SIZE];
for (int i = 0; i < nonceCount; i++) {
new MiningPlot(burstCrypto.getShabal256(), testAccountId, testNonce + i, (byte) 1, re... | @Test
public void testPlotMultiple_largeCount_poc1() {
<DeepExtract>
long testAccountId = 123456L;
long testNonce = 654321L;
int nonceCount = 33;
byte[] reference = new byte[nonceCount * MiningPlot.PLOT_SIZE];
for (int i = 0; i < nonceCount; i++) {
new MiningPlot(burstCrypto.getShabal256(), testAccountId, testNonce + i... | signumj | positive | 435,336 |
public <W extends IBaseTabPageAdapter<T, V>> W add(List<T> beans) {
list_bean.add(beans);
return (W) this;
notifyItemRangeInserted(list_bean.size() - beans.size(), beans.size());
return (W) this;
} | public <W extends IBaseTabPageAdapter<T, V>> W add(List<T> beans) {
<DeepExtract>
list_bean.add(beans);
return (W) this;
</DeepExtract>
notifyItemRangeInserted(list_bean.size() - beans.size(), beans.size());
return (W) this;
} | TabLayoutNiubility | positive | 435,338 |
private void updateCategory() {
mCategoryAdapter.reset(mData);
categoryListView.setItemChecked(0, true);
mChildrenAdapter.reset(mCategoryAdapter.getItem(0).getChildren());
} | private void updateCategory() {
mCategoryAdapter.reset(mData);
<DeepExtract>
categoryListView.setItemChecked(0, true);
mChildrenAdapter.reset(mCategoryAdapter.getItem(0).getChildren());
</DeepExtract>
} | EShop | positive | 435,339 |
public void windowClosing(WindowEvent e) {
PrefManager.get().setWindowState(frame.getExtendedState());
PrefManager.get().setSelectedPath(fc.getCurrentDirectory());
PrefManager.get().setPreferredSize(frame.getRootPane().getSize());
PrefManager.get().setWindowPos(frame.getX(), frame.getY());
if (isThreadDisplay()) {
Pref... | public void windowClosing(WindowEvent e) {
<DeepExtract>
PrefManager.get().setWindowState(frame.getExtendedState());
PrefManager.get().setSelectedPath(fc.getCurrentDirectory());
PrefManager.get().setPreferredSize(frame.getRootPane().getSize());
PrefManager.get().setWindowPos(frame.getX(), frame.getY());
if (isThreadDis... | tda | positive | 435,341 |
@Override
public void run() {
if (DEBUG) {
Log.i(TAG, "SlideActivity mFinishTask.run() finish activity.");
}
finish();
overridePendingTransition(0, 0);
onSlideBack();
} | @Override
public void run() {
if (DEBUG) {
Log.i(TAG, "SlideActivity mFinishTask.run() finish activity.");
}
<DeepExtract>
finish();
overridePendingTransition(0, 0);
onSlideBack();
</DeepExtract>
} | AccountBook | positive | 435,342 |
public static void main(String[] args) {
diameter m = new diameter();
BinaryTree tree = m.new BinaryTree();
display(this.root);
System.out.println(tree.diameter1());
} | public static void main(String[] args) {
diameter m = new diameter();
BinaryTree tree = m.new BinaryTree();
<DeepExtract>
display(this.root);
</DeepExtract>
System.out.println(tree.diameter1());
} | Java-Solutions | positive | 435,343 |
@Test
public void test1a() {
Object[] actual = new Object["".length];
boolean b = FORMAT.read("", actual);
assertArrayEquals("", actual);
assertTrue(b);
} | @Test
public void test1a() {
<DeepExtract>
Object[] actual = new Object["".length];
boolean b = FORMAT.read("", actual);
assertArrayEquals("", actual);
assertTrue(b);
</DeepExtract>
} | jdbdt | positive | 435,344 |
@Test
public void testUseRestoredStateForSnapshotIfFetcherNotInitialized() throws Exception {
Properties config = TestUtils.getStandardProperties();
List<Tuple2<StreamShardMetadata, SequenceNumber>> globalUnionState = new ArrayList<>(4);
list.add(Tuple2.of(KinesisDataFetcher.convertToStreamShardMetadata(new StreamShard... | @Test
public void testUseRestoredStateForSnapshotIfFetcherNotInitialized() throws Exception {
Properties config = TestUtils.getStandardProperties();
List<Tuple2<StreamShardMetadata, SequenceNumber>> globalUnionState = new ArrayList<>(4);
list.add(Tuple2.of(KinesisDataFetcher.convertToStreamShardMetadata(new StreamShard... | amazon-kinesis-connector-flink | positive | 435,345 |
public Map<String, Object> getHostMap() {
logger.entry(HOST_CONFIG);
audit.info("getConfig for {}", HOST_CONFIG);
Profiler profiler = new Profiler(ServiceLocator.class.getName());
profiler.setLogger(logger);
profiler.start("getConfig");
Map<String, Object> config = (Map<String, Object>) configImage.get(HOST_CONFIG);
if... | public Map<String, Object> getHostMap() {
<DeepExtract>
logger.entry(HOST_CONFIG);
audit.info("getConfig for {}", HOST_CONFIG);
Profiler profiler = new Profiler(ServiceLocator.class.getName());
profiler.setLogger(logger);
profiler.start("getConfig");
Map<String, Object> config = (Map<String, Object>) configImage.get(HO... | light | positive | 435,347 |
public void actionPerformed(ActionEvent e) {
try {
Desktop desktop = Desktop.getDesktop();
desktop.browse(new URI("http://groups.google.com/group/jbooktrader/topics?gvc=2"));
} catch (Throwable t) {
dispatcher.getEventReport().report(t);
MessageDialog.showException(t);
}
} | public void actionPerformed(ActionEvent e) {
<DeepExtract>
try {
Desktop desktop = Desktop.getDesktop();
desktop.browse(new URI("http://groups.google.com/group/jbooktrader/topics?gvc=2"));
} catch (Throwable t) {
dispatcher.getEventReport().report(t);
MessageDialog.showException(t);
}
</DeepExtract>
} | JBookTrader | positive | 435,349 |
@Override
public void onClick(View v) {
JobScheduler jobScheduler = (JobScheduler) getSystemService(JOB_SCHEDULER_SERVICE);
jobScheduler.cancelAll();
RecyclerView rv = (RecyclerView) findViewById(R.id.jobList);
JobScheduler jobScheduler = (JobScheduler) getSystemService(JOB_SCHEDULER_SERVICE);
List<JobInfo> jobList = j... | @Override
public void onClick(View v) {
JobScheduler jobScheduler = (JobScheduler) getSystemService(JOB_SCHEDULER_SERVICE);
jobScheduler.cancelAll();
<DeepExtract>
RecyclerView rv = (RecyclerView) findViewById(R.id.jobList);
JobScheduler jobScheduler = (JobScheduler) getSystemService(JOB_SCHEDULER_SERVICE);
List<JobInf... | Asynchronous-Android-Programming | positive | 435,350 |
public CameraPreset getPrevPlayerPosition(CameraPreset current) {
int prev_idx = current.idx - 1;
if (prev_idx < 0) {
prev_idx = this.playerPositions.size() - 1;
}
return this.playerPositions.get(prev_idx);
} | public CameraPreset getPrevPlayerPosition(CameraPreset current) {
int prev_idx = current.idx - 1;
if (prev_idx < 0) {
prev_idx = this.playerPositions.size() - 1;
}
<DeepExtract>
return this.playerPositions.get(prev_idx);
</DeepExtract>
} | minecraftxray | positive | 435,351 |
@Override
public Future<Void> watch(byte[]... keys) {
return execCmd(objectConverter, encode(channel.alloc(), voidConverter, encode(channel.alloc(), WATCH.raw, keys)));
} | @Override
public Future<Void> watch(byte[]... keys) {
<DeepExtract>
return execCmd(objectConverter, encode(channel.alloc(), voidConverter, encode(channel.alloc(), WATCH.raw, keys)));
</DeepExtract>
} | nedis | positive | 435,352 |
public void setStatus(int status) {
Optional<Status> op = Arrays.asList(Status.values()).parallelStream().filter(currentStatus -> currentStatus.code == status).findFirst();
if (op.isPresent()) {
this.status = op.get();
}
return null;
} | public void setStatus(int status) {
<DeepExtract>
Optional<Status> op = Arrays.asList(Status.values()).parallelStream().filter(currentStatus -> currentStatus.code == status).findFirst();
if (op.isPresent()) {
this.status = op.get();
}
return null;
</DeepExtract>
} | sentinel-dubbo | positive | 435,354 |
public void clearRemoveScratch() {
if (removeScratchGraphics != null) {
removeScratchGraphics.dispose();
}
this.removeScratch = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
this.removeScratchGraphics = new AwtGraphicsContext(this.removeScratch.createGraphics());
this.removeScratchDirtyRgn = null;
} | public void clearRemoveScratch() {
<DeepExtract>
if (removeScratchGraphics != null) {
removeScratchGraphics.dispose();
}
this.removeScratch = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
this.removeScratchGraphics = new AwtGraphicsContext(this.removeScratch.createGraphics());
this.removeScratchDirtyRg... | jmonet | positive | 435,355 |
public ResultMsg loginForQQ(String openId) {
if (null == null) {
null = "THIRD_EMPTY";
}
super.regist(openId, null);
return super.login(openId, null);
} | public ResultMsg loginForQQ(String openId) {
<DeepExtract>
if (null == null) {
null = "THIRD_EMPTY";
}
super.regist(openId, null);
return super.login(openId, null);
</DeepExtract>
} | design-samples | positive | 435,356 |
public void windowClosing(java.awt.event.WindowEvent evt) {
int option = JOptionPane.showConfirmDialog(null, java.util.ResourceBundle.getBundle("pl/wurmonline/deedplanner/forms/Bundle").getString("DO YOU REALLY WANT TO CLOSE PROGRAM? ALL UNSAVED CHANGES WILL BE LOST!"), java.util.ResourceBundle.getBundle("pl/wurmonline... | public void windowClosing(java.awt.event.WindowEvent evt) {
<DeepExtract>
int option = JOptionPane.showConfirmDialog(null, java.util.ResourceBundle.getBundle("pl/wurmonline/deedplanner/forms/Bundle").getString("DO YOU REALLY WANT TO CLOSE PROGRAM? ALL UNSAVED CHANGES WILL BE LOST!"), java.util.ResourceBundle.getBundle(... | DeedPlanner-2 | positive | 435,357 |
@Override
protected void onDetachedFromWindow() {
if (waypointMissionOperator != null && listener != null) {
waypointMissionOperator.removeListener(listener);
}
if (flightController != null) {
flightController.getSimulator().stop(null);
}
super.onDetachedFromWindow();
} | @Override
protected void onDetachedFromWindow() {
<DeepExtract>
if (waypointMissionOperator != null && listener != null) {
waypointMissionOperator.removeListener(listener);
}
</DeepExtract>
if (flightController != null) {
flightController.getSimulator().stop(null);
}
super.onDetachedFromWindow();
} | flyapp | positive | 435,359 |
public final void remove() {
Node<K, V> p = current;
if (p == null)
throw new IllegalStateException();
if (modCount != expectedModCount)
throw new ConcurrentModificationException();
current = null;
K key = p.key;
Node<K, V>[] tab;
Node<K, V> p;
int n, index;
if ((tab = table) != null && (n = tab.length) > 0 && (p = tab... | public final void remove() {
Node<K, V> p = current;
if (p == null)
throw new IllegalStateException();
if (modCount != expectedModCount)
throw new ConcurrentModificationException();
current = null;
K key = p.key;
<DeepExtract>
Node<K, V>[] tab;
Node<K, V> p;
int n, index;
if ((tab = table) != null && (n = tab.length) >... | SpringBootIntegration | positive | 435,360 |
@Override
public void load(ImageView view, String url, QAImageDisplayConfig config) {
if (!QAStringUtils.isEmpty(url)) {
if (ImageDownloader.Scheme.ofUri(url) == ImageDownloader.Scheme.UNKNOWN) {
if (url.toLowerCase().startsWith("/mnt/") || url.toLowerCase().startsWith("/mnt/") || url.toLowerCase().startsWith("/storage... | @Override
public void load(ImageView view, String url, QAImageDisplayConfig config) {
<DeepExtract>
if (!QAStringUtils.isEmpty(url)) {
if (ImageDownloader.Scheme.ofUri(url) == ImageDownloader.Scheme.UNKNOWN) {
if (url.toLowerCase().startsWith("/mnt/") || url.toLowerCase().startsWith("/mnt/") || url.toLowerCase().starts... | QuickAndroid | positive | 435,361 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
if (mnuInternalWindows.isSelected())
desktop.tileInternalFrames();
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
if (mnuInternalWindows.isSelected())
desktop.tileInternalFrames();
</DeepExtract>
} | drmips | positive | 435,362 |
public ImageContainer display(final View view, String uri, int requestWidth, int requestHeight, int defaultImageResId, int errorImageResId) {
BitmapDisplayConfig displayConfig = configMap.get(requestWidth + "-" + requestHeight + defaultImageResId + "_" + errorImageResId);
if (displayConfig == null) {
displayConfig = ge... | public ImageContainer display(final View view, String uri, int requestWidth, int requestHeight, int defaultImageResId, int errorImageResId) {
BitmapDisplayConfig displayConfig = configMap.get(requestWidth + "-" + requestHeight + defaultImageResId + "_" + errorImageResId);
if (displayConfig == null) {
displayConfig = ge... | volley | positive | 435,363 |
public Boolean isD3On() {
if (!parent.isDigitalEnabled(3)) {
return null;
}
if (3 >= 0 && 3 <= 7) {
return ByteUtils.getBit(dioLsb, 3 + 1);
} else {
return ByteUtils.getBit(dioMsb, 1);
}
} | public Boolean isD3On() {
<DeepExtract>
if (!parent.isDigitalEnabled(3)) {
return null;
}
if (3 >= 0 && 3 <= 7) {
return ByteUtils.getBit(dioLsb, 3 + 1);
} else {
return ByteUtils.getBit(dioMsb, 1);
}
</DeepExtract>
} | xbee-api | positive | 435,365 |
public void println() {
if (position == 0) {
for (int i = indentationLevel; i != 0; i--) {
out.print(" ");
position++;
}
}
out.println();
position = 0;
} | public void println() {
<DeepExtract>
if (position == 0) {
for (int i = indentationLevel; i != 0; i--) {
out.print(" ");
position++;
}
}
</DeepExtract>
out.println();
position = 0;
} | unluac | positive | 435,366 |
public boolean importTheme(JSONObject theme) {
if (!validateThemeJson(theme))
return false;
try {
customThemes.put("theme-" + UUID.randomUUID(), new Theme(theme).getTheme());
} catch (JSONException e) {
e.printStackTrace();
}
prefs.edit().putString("userThemes", customThemes.toString()).apply();
return true;
} | public boolean importTheme(JSONObject theme) {
if (!validateThemeJson(theme))
return false;
<DeepExtract>
try {
customThemes.put("theme-" + UUID.randomUUID(), new Theme(theme).getTheme());
} catch (JSONException e) {
e.printStackTrace();
}
prefs.edit().putString("userThemes", customThemes.toString()).apply();
</DeepExt... | reddinator | positive | 435,370 |
public void callServiceOnCreate(Service service, ServiceInfo stubInfo, ServiceInfo targetInfo) {
if (mRunningServiceMap.containsKey(service)) {
throw new IllegalStateException("duplicate service created! " + service);
}
Logger.d(TAG, String.format("callServiceOnCreate() service = %s, stubInfo = %s, targetInfo = %s", s... | public void callServiceOnCreate(Service service, ServiceInfo stubInfo, ServiceInfo targetInfo) {
if (mRunningServiceMap.containsKey(service)) {
throw new IllegalStateException("duplicate service created! " + service);
}
Logger.d(TAG, String.format("callServiceOnCreate() service = %s, stubInfo = %s, targetInfo = %s", s... | PluginM | positive | 435,371 |
@Override
public void onClick(View v) {
personList.clear();
for (int i = 0; i < 6; i++) {
Person person = new Person("name" + i, "" + i);
personList.add(person);
}
recyclerviewAdapter.setData(personList);
} | @Override
public void onClick(View v) {
<DeepExtract>
personList.clear();
for (int i = 0; i < 6; i++) {
Person person = new Person("name" + i, "" + i);
personList.add(person);
}
recyclerviewAdapter.setData(personList);
</DeepExtract>
} | XRefreshView | positive | 435,372 |
@Test
public void testStoreProfile() {
String profile = new JSONObject().put("test", "test").toString();
setProfile(profile);
assertEquals(profile, getProfile());
} | @Test
public void testStoreProfile() {
<DeepExtract>
String profile = new JSONObject().put("test", "test").toString();
setProfile(profile);
assertEquals(profile, getProfile());
</DeepExtract>
} | ZeroKit-Android-SDK | positive | 435,373 |
public void setFixedWidth(int width) {
this.fixedWidth = width;
this.columns = 0;
this.setFixedWidth(0);
} | public void setFixedWidth(int width) {
this.fixedWidth = width;
<DeepExtract>
this.columns = 0;
this.setFixedWidth(0);
</DeepExtract>
} | sinalgo | positive | 435,374 |
public void update(Observable o, Object arg) {
if (this.global.getBody().getChildren().length != 0) {
for (Control c : this.global.getBody().getChildren()) {
c.dispose();
}
}
if (this.node == null) {
return;
}
Composite parent = this.global.getBody();
this.toolkit.createLabel(parent, "Type").setLayoutData(new TableWrap... | public void update(Observable o, Object arg) {
<DeepExtract>
if (this.global.getBody().getChildren().length != 0) {
for (Control c : this.global.getBody().getChildren()) {
c.dispose();
}
}
if (this.node == null) {
return;
}
Composite parent = this.global.getBody();
this.toolkit.createLabel(parent, "Type").setLayoutData... | jbt | positive | 435,376 |
public boolean[] readDiscreteInputRange(int offset, int quantity) throws IllegalDataAddressException, IllegalDataValueException {
if (discreteInputs == null)
throw new IllegalDataAddressException(offset);
return discreteInputs.getRange(offset, quantity);
} | public boolean[] readDiscreteInputRange(int offset, int quantity) throws IllegalDataAddressException, IllegalDataValueException {
<DeepExtract>
if (discreteInputs == null)
throw new IllegalDataAddressException(offset);
</DeepExtract>
return discreteInputs.getRange(offset, quantity);
} | Androidmodbusrtu | positive | 435,377 |
@Test
public void struct8() {
assertEquals(SCHEMA_NAME, struct(SCHEMA_NAME, "f1", Type.INT32, false, 1, "f2", Type.INT32, false, 2, "f3", Type.INT32, false, 3, "f4", Type.INT32, false, 4, "f5", Type.INT32, false, 5, "f6", Type.INT32, false, 6, "f7", Type.INT32, false, 7, "f8", Type.INT32, false, 8).schema().name(), "st... | @Test
public void struct8() {
<DeepExtract>
assertEquals(SCHEMA_NAME, struct(SCHEMA_NAME, "f1", Type.INT32, false, 1, "f2", Type.INT32, false, 2, "f3", Type.INT32, false, 3, "f4", Type.INT32, false, 4, "f5", Type.INT32, false, 5, "f6", Type.INT32, false, 6, "f7", Type.INT32, false, 7, "f8", Type.INT32, false, 8).schema... | connect-utils | positive | 435,378 |
protected void requestData() {
if (mEmptyLayout != null)
mEmptyLayout.setErrorType(EmptyLayout.STATE_NETWORK_LOADING);
} | protected void requestData() {
<DeepExtract>
</DeepExtract>
if (mEmptyLayout != null)
<DeepExtract>
</DeepExtract>
mEmptyLayout.setErrorType(EmptyLayout.STATE_NETWORK_LOADING);
<DeepExtract>
</DeepExtract>
} | Akit-Reader | positive | 435,379 |
@Override
public void setView(View view) {
toast.setView(view);
try {
Field tnField = toast.getClass().getDeclaredField("mTN");
tnField.setAccessible(true);
mTN = tnField.get(toast);
show = mTN.getClass().getMethod("show");
hide = mTN.getClass().getMethod("hide");
Field tnParamsField = mTN.getClass().getDeclaredField("... | @Override
public void setView(View view) {
toast.setView(view);
<DeepExtract>
try {
Field tnField = toast.getClass().getDeclaredField("mTN");
tnField.setAccessible(true);
mTN = tnField.get(toast);
show = mTN.getClass().getMethod("show");
hide = mTN.getClass().getMethod("hide");
Field tnParamsField = mTN.getClass().getD... | jixieshou-autowatch-kuaishou | positive | 435,380 |
@JavascriptInterface
public void sendError(String msg) {
Log.d(TAG, "handleError: ====================== come in handleError");
Log.d(TAG, msg);
} | @JavascriptInterface
public void sendError(String msg) {
<DeepExtract>
Log.d(TAG, "handleError: ====================== come in handleError");
Log.d(TAG, msg);
</DeepExtract>
} | QPM | positive | 435,383 |
public static GlobalVariable newInstance() {
GlobalVariable globalVariable = new GlobalVariable();
this.name = PackageTemplateWrapper.ATTRIBUTE_BASE_NAME;
this.value = "Example";
isEnabled = true;
this.script = "";
return globalVariable;
} | public static GlobalVariable newInstance() {
GlobalVariable globalVariable = new GlobalVariable();
this.name = PackageTemplateWrapper.ATTRIBUTE_BASE_NAME;
this.value = "Example";
isEnabled = true;
<DeepExtract>
this.script = "";
</DeepExtract>
return globalVariable;
} | PackageTemplates | positive | 435,384 |
private long doLogRun(boolean dynamicSleepInterval) throws IOException, InterruptedException, ExecutionException {
final LogFileService logFileService = new LogFileService(testDir);
if (DETAILED_OUTPUT) {
System.out.println("Logging to " + testDir.toString());
}
long sleepCountdown = numberOfLogCallsBetweenSleeps;
try ... | private long doLogRun(boolean dynamicSleepInterval) throws IOException, InterruptedException, ExecutionException {
final LogFileService logFileService = new LogFileService(testDir);
<DeepExtract>
if (DETAILED_OUTPUT) {
System.out.println("Logging to " + testDir.toString());
}
</DeepExtract>
long sleepCountdown = number... | c5-replicator | positive | 435,385 |
@Override
public Packet getDescriptionPacket() {
NBTTagCompound tagCom = new NBTTagCompound();
super.writeToNBT(tagCom);
writeSyncableDataToNBT(tagCom);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tagCom);
} | @Override
public Packet getDescriptionPacket() {
NBTTagCompound tagCom = new NBTTagCompound();
<DeepExtract>
super.writeToNBT(tagCom);
writeSyncableDataToNBT(tagCom);
</DeepExtract>
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tagCom);
} | OpenSecurity | positive | 435,386 |
private static void assertSOAPBodiesAreEqual(SOAPMessage expected, SOAPMessage actual) throws Exception {
SOAPBody expectedBody = expected.getSOAPBody();
SOAPBody actualBody = actual.getSOAPBody();
SOAPBodyElement expectedElement = (SOAPBodyElement) expectedBody.getChildElements().next();
SOAPBodyElement actualElement ... | private static void assertSOAPBodiesAreEqual(SOAPMessage expected, SOAPMessage actual) throws Exception {
SOAPBody expectedBody = expected.getSOAPBody();
SOAPBody actualBody = actual.getSOAPBody();
SOAPBodyElement expectedElement = (SOAPBodyElement) expectedBody.getChildElements().next();
SOAPBodyElement actualElement ... | appengine-java-vm-runtime | positive | 435,391 |
@Override
public LevelIterator iterator() {
return new LevelIterator(tableCache, files, internalKeyComparator);
} | @Override
public LevelIterator iterator() {
<DeepExtract>
return new LevelIterator(tableCache, files, internalKeyComparator);
</DeepExtract>
} | Yasp | positive | 435,392 |
@Test
public void testMidCopyInResultMode() {
withConnectionSync(origConn -> c -> c.simpleQueryExec("CREATE TEMP TABLE testMidCopyInResultMode (foo VARCHAR(255), bar integer)").thenCompose(conn -> conn.simpleQuery("COPY testMidCopyInResultMode FROM STDIN CSV")).thenCompose(rConn -> rConn.sendCopyData("test1".getBytes(S... | @Test
public void testMidCopyInResultMode() {
<DeepExtract>
withConnectionSync(origConn -> c -> c.simpleQueryExec("CREATE TEMP TABLE testMidCopyInResultMode (foo VARCHAR(255), bar integer)").thenCompose(conn -> conn.simpleQuery("COPY testMidCopyInResultMode FROM STDIN CSV")).thenCompose(rConn -> rConn.sendCopyData("tes... | pgnio | positive | 435,394 |
@Override
public Dimension getMinimumSize() {
return new Dimension(0, 0);
} | @Override
public Dimension getMinimumSize() {
<DeepExtract>
return new Dimension(0, 0);
</DeepExtract>
} | SequencePlugin | positive | 435,396 |
public QueryBulider likeRight(String column, Object value) {
queryParams.add(new QueryParam(column, value, QueryType.LIKE_RIGHT));
queryBulider.refresh();
return this;
} | public QueryBulider likeRight(String column, Object value) {
<DeepExtract>
queryParams.add(new QueryParam(column, value, QueryType.LIKE_RIGHT));
queryBulider.refresh();
</DeepExtract>
return this;
} | plumdo-work | positive | 435,398 |
@JsonIgnore
public String putLabelProperty(String value) {
return (T) properties.put(LABEL_PROPERTY, value);
} | @JsonIgnore
public String putLabelProperty(String value) {
<DeepExtract>
return (T) properties.put(LABEL_PROPERTY, value);
</DeepExtract>
} | nuxeo-java-client | positive | 435,399 |
@Override
protected SQLStmt get_query(Clock clock, WorkloadConfiguration wrklConf) {
RandomParameters random = new RandomParameters("uniform");
String st1 = random.generateRandomCharacter();
String st2 = random.generateRandomCharacter();
String data = st1 + st2 + "%";
String su_comment = "%" + random.getRandomSuComment... | @Override
protected SQLStmt get_query(Clock clock, WorkloadConfiguration wrklConf) {
<DeepExtract>
RandomParameters random = new RandomParameters("uniform");
String st1 = random.generateRandomCharacter();
String st2 = random.generateRandomCharacter();
String data = st1 + st2 + "%";
String su_comment = "%" + random.getR... | HTAPBench | positive | 435,401 |
JToolBar createToolBar() {
toolBar = new JToolBar();
JButton button = new JButton(fileNewAction);
button.setText("");
toolBar.add(button);
JButton button = new JButton(fileOpenAction);
button.setText("");
toolBar.add(button);
JButton button = new JButton(fileSaveAction);
button.setText("");
toolBar.add(button);
toolBar... | JToolBar createToolBar() {
toolBar = new JToolBar();
JButton button = new JButton(fileNewAction);
button.setText("");
toolBar.add(button);
JButton button = new JButton(fileOpenAction);
button.setText("");
toolBar.add(button);
<DeepExtract>
JButton button = new JButton(fileSaveAction);
button.setText("");
toolBar.add(bu... | GiantTrees | positive | 435,404 |
@Override
public void init(File source, Binder binder) {
this.source = source;
this.binder = binder;
if (!destination.exists()) {
destination.mkdirs();
}
currentLogFolder = new File(destination, "current");
if (currentLogFolder.exists()) {
try {
FileUtils.deleteDirectory(currentLogFolder);
} catch (IOException e) {
log... | @Override
public void init(File source, Binder binder) {
this.source = source;
this.binder = binder;
<DeepExtract>
if (!destination.exists()) {
destination.mkdirs();
}
currentLogFolder = new File(destination, "current");
if (currentLogFolder.exists()) {
try {
FileUtils.deleteDirectory(currentLogFolder);
} catch (IOExce... | difido-reports | positive | 435,405 |
@SuppressWarnings("unused")
public void warnl(String message) {
Log.println(WARN, getTag(), message);
} | @SuppressWarnings("unused")
public void warnl(String message) {
<DeepExtract>
Log.println(WARN, getTag(), message);
</DeepExtract>
} | weechat-android | positive | 435,406 |
@Override
public void print(StatusLine statusLine) {
allRequests.add(executorService.submit(() -> {
try {
statusLine.writeTo(System.out);
} catch (IOException e) {
e.printStackTrace();
}
}));
} | @Override
public void print(StatusLine statusLine) {
<DeepExtract>
allRequests.add(executorService.submit(() -> {
try {
statusLine.writeTo(System.out);
} catch (IOException e) {
e.printStackTrace();
}
}));
</DeepExtract>
} | rawhttp | positive | 435,409 |
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
mSelectType = mTypeMap.get(position, TYPE_CLOSE);
pb.setProgress(mProgressMap.get(mSelectType, NO_VALUE));
if (mFragmentList.get(position) instanceof IProgressCallback) {
mSelectFragment = (IProgressCallback) mFragmentL... | @Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
mSelectType = mTypeMap.get(position, TYPE_CLOSE);
pb.setProgress(mProgressMap.get(mSelectType, NO_VALUE));
if (mFragmentList.get(position) instanceof IProgressCallback) {
mSelectFragment = (IProgressCallback) mFragmentL... | PLDroidMediaStreaming-ByteDance | positive | 435,410 |
public List<T> readAll() throws DataAccessException {
Class<?> entityClass;
ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();
Type type = parameterizedType.getActualTypeArguments()[0];
if (type instanceof Class<?>) {
entityClass = (Class<?>) type;
} else if (type instanceof Pa... | public List<T> readAll() throws DataAccessException {
<DeepExtract>
Class<?> entityClass;
ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();
Type type = parameterizedType.getActualTypeArguments()[0];
if (type instanceof Class<?>) {
entityClass = (Class<?>) type;
} else if (type... | webapp | positive | 435,411 |
@Test
void OverwriteSuccess() throws PMException {
pap -> {
pap.graph().createPolicyClass("pc1");
pap.graph().createUserAttribute("ua1", "pc1");
pap.graph().createObjectAttribute("oa1", "pc1");
pap.graph().setResourceAccessRights(new AccessRightSet("read", "write"));
pap.graph().associate("ua1", "oa1", new AccessRightS... | @Test
void OverwriteSuccess() throws PMException {
<DeepExtract>
pap -> {
pap.graph().createPolicyClass("pc1");
pap.graph().createUserAttribute("ua1", "pc1");
pap.graph().createObjectAttribute("oa1", "pc1");
pap.graph().setResourceAccessRights(new AccessRightSet("read", "write"));
pap.graph().associate("ua1", "oa1", ne... | policy-machine-core | positive | 435,412 |
public void start() {
mState = STATE_RUNNING;
mStopTimeInFuture = SystemClock.elapsedRealtime() + mMillisInTotal;
} | public void start() {
<DeepExtract>
mState = STATE_RUNNING;
</DeepExtract>
mStopTimeInFuture = SystemClock.elapsedRealtime() + mMillisInTotal;
} | ToDoList | positive | 435,416 |
private void handleGetParameterInfo(String[] parts) {
if (!checkDevice()) {
return;
}
GetParameterInfoCommand cmd = new GetParameterInfoCommand();
if (parts.length < 2) {
return false;
}
if (parts[1] != null && parts[1].startsWith("txnid=")) {
cmd.setTrxnId((parts[1].substring(6)));
return true;
}
return false;
debugSe... | private void handleGetParameterInfo(String[] parts) {
if (!checkDevice()) {
return;
}
GetParameterInfoCommand cmd = new GetParameterInfoCommand();
<DeepExtract>
if (parts.length < 2) {
return false;
}
if (parts[1] != null && parts[1].startsWith("txnid=")) {
cmd.setTrxnId((parts[1].substring(6)));
return true;
}
return ... | arcusipcd | positive | 435,417 |
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mTime);
calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute);
mTime = calendar.getTime();
updateTimeViews();
CheckBox transportBus = (CheckBox) findViewById(R.... | public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mTime);
calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute);
mTime = calendar.getTime();
<DeepExtract>
updateTimeViews();
CheckBox transportBus = (CheckBox) f... | sthlmtraveling | positive | 435,420 |
public byte[] fillTemplate(String filename, Movie movie) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfDocument pdfDoc = new PdfDocument(new PdfReader(filename), new PdfWriter(baos));
Document doc = new Document(pdfDoc);
PdfAcroForm form = PdfAcroForm.getAcroForm(pdfDoc, true);
PdfBu... | public byte[] fillTemplate(String filename, Movie movie) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfDocument pdfDoc = new PdfDocument(new PdfReader(filename), new PdfWriter(baos));
Document doc = new Document(pdfDoc);
PdfAcroForm form = PdfAcroForm.getAcroForm(pdfDoc, true);
PdfBu... | i7js-book | positive | 435,421 |
private static void chargeForEnchant(EntityPlayer player, Random rand, int amount) {
player.addExperienceLevel(-amount);
seeds.put(player.getUniqueID().toString(), rand.nextInt());
} | private static void chargeForEnchant(EntityPlayer player, Random rand, int amount) {
player.addExperienceLevel(-amount);
<DeepExtract>
seeds.put(player.getUniqueID().toString(), rand.nextInt());
</DeepExtract>
} | Et-Futurum | positive | 435,422 |
public void merge(User facebookUser) {
if (facebookUser == null)
return;
return firstName;
return lastName;
return birthday;
return email;
return gender;
return location;
} | public void merge(User facebookUser) {
if (facebookUser == null)
return;
return firstName;
return lastName;
return birthday;
return email;
return gender;
<DeepExtract>
return location;
</DeepExtract>
} | publicplay | positive | 435,423 |
public Criteria andChecknumNotEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "checknum" + " cannot be null");
}
criteria.add(new Criterion("checkNum <>", value));
return (Criteria) this;
} | public Criteria andChecknumNotEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "checknum" + " cannot be null");
}
criteria.add(new Criterion("checkNum <>", value));
</DeepExtract>
return (Criteria) this;
} | ehealth_start | positive | 435,425 |
private void setContent(ChatConversation data) {
int friendId = data.getContactId();
Profile profile = mProfileManager.get(friendId);
int friendId = profile.getUserId();
if (profile.isEmpty()) {
mAvatar.setVisibility(View.VISIBLE);
mAvatar.setImageResource(R.drawable.avatar_default);
mLoadingAvatar.setVisibility(View.G... | private void setContent(ChatConversation data) {
int friendId = data.getContactId();
Profile profile = mProfileManager.get(friendId);
<DeepExtract>
int friendId = profile.getUserId();
if (profile.isEmpty()) {
mAvatar.setVisibility(View.VISIBLE);
mAvatar.setImageResource(R.drawable.avatar_default);
mLoadingAvatar.setVis... | profile-sync | positive | 435,427 |
public static void glEndTransformFeedback() {
if (!isContextCompatible())
throw new IllegalStateException("The context should be created before invoking the GL functions");
nglEndTransformFeedback();
} | public static void glEndTransformFeedback() {
<DeepExtract>
if (!isContextCompatible())
throw new IllegalStateException("The context should be created before invoking the GL functions");
</DeepExtract>
nglEndTransformFeedback();
} | WebGL4J | positive | 435,428 |
@Override
public boolean isApplicationInstalled(IosAppBundleId bundleId) throws IosDeviceException {
if (!responsive) {
throw new IosDeviceException(this, String.format("Device %s not responsive", udid));
}
return applications.containsKey(bundleId);
} | @Override
public boolean isApplicationInstalled(IosAppBundleId bundleId) throws IosDeviceException {
<DeepExtract>
if (!responsive) {
throw new IosDeviceException(this, String.format("Device %s not responsive", udid));
}
</DeepExtract>
return applications.containsKey(bundleId);
} | ios-device-control | positive | 435,429 |
@Override
public void onStart(@SwipeLayout.Direction int direction, @FloatRange(from = 0F, to = 1F) float fraction) {
mSwiping = true;
if (mDismissRunnable != null) {
getChild().removeCallbacks(mDismissRunnable);
}
if (false && isShown() && getConfig().mDuration > 0) {
if (mDismissRunnable == null) {
mDismissRunnable =... | @Override
public void onStart(@SwipeLayout.Direction int direction, @FloatRange(from = 0F, to = 1F) float fraction) {
mSwiping = true;
if (mDismissRunnable != null) {
getChild().removeCallbacks(mDismissRunnable);
}
if (false && isShown() && getConfig().mDuration > 0) {
if (mDismissRunnable == null) {
mDismissRunnable =... | AnyLayer | positive | 435,432 |
public final void setMode(String channel, String mode) {
if (isConnected()) {
_inputThread.sendRawLine("MODE " + channel + " " + mode);
}
} | public final void setMode(String channel, String mode) {
<DeepExtract>
if (isConnected()) {
_inputThread.sendRawLine("MODE " + channel + " " + mode);
}
</DeepExtract>
} | Yaaic | positive | 435,433 |
@Override
protected Bitmap doInBackground(Integer... params) {
data = params[0];
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(context.getResources(), data, options);
options.inSampleSize = calculateInSampleSize(options, 141, 180);
opt... | @Override
protected Bitmap doInBackground(Integer... params) {
data = params[0];
<DeepExtract>
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(context.getResources(), data, options);
options.inSampleSize = calculateInSampleSize(options, ... | BuildmLearn-Toolkit-Android | positive | 435,434 |
protected static String emptyLines(int numberOfEmptyLines) {
final String lineSeparator = "\n";
String lines = "";
for (int i = 0; i <= numberOfEmptyLines; i++) {
lines += lineSeparator;
}
return lines;
} | protected static String emptyLines(int numberOfEmptyLines) {
final String lineSeparator = "\n";
<DeepExtract>
String lines = "";
for (int i = 0; i <= numberOfEmptyLines; i++) {
lines += lineSeparator;
}
return lines;
</DeepExtract>
} | markdown-doclet | positive | 435,435 |
@Deprecated
public void setDrawMarkerViews(boolean enabled) {
mDrawMarkers = enabled;
} | @Deprecated
public void setDrawMarkerViews(boolean enabled) {
<DeepExtract>
mDrawMarkers = enabled;
</DeepExtract>
} | cgm-scanner | positive | 435,436 |
public Curve sub(Curve curve1, Curve curve2) {
Curve ZERO_DELAY_INFINITE_BURST = Curve_ConstantPool.INFINITE_SERVICE_CURVE.get();
switch(CurveOperation.SUB) {
case ADD:
if (curve1.equals(ZERO_DELAY_INFINITE_BURST) || curve2.equals(ZERO_DELAY_INFINITE_BURST)) {
return ZERO_DELAY_INFINITE_BURST;
}
break;
case SUB:
if (cu... | public Curve sub(Curve curve1, Curve curve2) {
<DeepExtract>
Curve ZERO_DELAY_INFINITE_BURST = Curve_ConstantPool.INFINITE_SERVICE_CURVE.get();
switch(CurveOperation.SUB) {
case ADD:
if (curve1.equals(ZERO_DELAY_INFINITE_BURST) || curve2.equals(ZERO_DELAY_INFINITE_BURST)) {
return ZERO_DELAY_INFINITE_BURST;
}
break;
ca... | DNC | positive | 435,437 |
public void addVoiceInstant(final VoiceInstant instant) {
voiceSequence.add(instant);
double duration = instant.getDuration();
if (duration != -1.0) {
totalVoiceDuration += duration;
}
} | public void addVoiceInstant(final VoiceInstant instant) {
voiceSequence.add(instant);
<DeepExtract>
double duration = instant.getDuration();
if (duration != -1.0) {
totalVoiceDuration += duration;
}
</DeepExtract>
} | Modulo7 | positive | 435,438 |
@Override
protected void initViews() {
mTitle = new TransitionTextView(mContext);
mTitle.setText(TEXT_DISPLAY);
mTitle.setPadding(0, 0, 0, 0);
mTitle.setTextColor(Color.parseColor("#339900"));
mTitle.setTextSize(16);
mImageView = new PLImageView(mContext);
mImageView.setImageDrawable(mContext.getResources().getDrawable... | @Override
protected void initViews() {
mTitle = new TransitionTextView(mContext);
mTitle.setText(TEXT_DISPLAY);
mTitle.setPadding(0, 0, 0, 0);
mTitle.setTextColor(Color.parseColor("#339900"));
mTitle.setTextSize(16);
mImageView = new PLImageView(mContext);
mImageView.setImageDrawable(mContext.getResources().getDrawable... | eden | positive | 435,440 |
@Override
public void shutdown() {
myChannelsThread.join();
shutdownKernel();
} | @Override
public void shutdown() {
<DeepExtract>
myChannelsThread.join();
shutdownKernel();
</DeepExtract>
} | intellij-ipnb | positive | 435,441 |
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
Node root = null;
while (T-- > 0) {
int data = sc.nextInt();
root = insert(root, data);
}
Queue<Node> queue = new LinkedList<Node>();
queue.offer(root);
while (!queue.isEmpty()) {
Node head = queue.poll();
if (head == nu... | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
Node root = null;
while (T-- > 0) {
int data = sc.nextInt();
root = insert(root, data);
}
<DeepExtract>
Queue<Node> queue = new LinkedList<Node>();
queue.offer(root);
while (!queue.isEmpty()) {
Node head = queue.poll();
... | hackerrank | positive | 435,442 |
void processCurHBAndCollision(boolean checkReiterate) {
if (processedCollision)
return;
processedCollision = true;
HitBox a = cEvent.getFirst();
HitBox b = cEvent.getSecond();
if (cEvent.isCollision()) {
if (interactTester.canInteract(a, b)) {
a.overlapSet = overlapSetPool.add(a.overlapSet, b);
if (!overlapSetPool.wasS... | void processCurHBAndCollision(boolean checkReiterate) {
<DeepExtract>
if (processedCollision)
return;
processedCollision = true;
HitBox a = cEvent.getFirst();
HitBox b = cEvent.getSecond();
if (cEvent.isCollision()) {
if (interactTester.canInteract(a, b)) {
a.overlapSet = overlapSetPool.add(a.overlapSet, b);
if (!overl... | collider | positive | 435,443 |
public boolean restoreDatabase() {
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) == false) {
Log.w(cgSettings.tag, "Database wasn't restored: no external memory");
return false;
}
if (databaseRO != null) {
path = databaseRO.getPath();
if (databaseRO.inTransaction() == true) {
databaseRO.en... | public boolean restoreDatabase() {
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) == false) {
Log.w(cgSettings.tag, "Database wasn't restored: no external memory");
return false;
}
if (databaseRO != null) {
path = databaseRO.getPath();
if (databaseRO.inTransaction() == true) {
databaseRO.en... | c-geo | positive | 435,444 |
private void setViewDisappearing(View view) {
if (getViewStatus(view) == STATUS.DISAPPEARING) {
return;
}
mViewStatusMap.put(view, STATUS.DISAPPEARING);
if (null != mViewLifeCycleListener) {
mViewLifeCycleListener.onDisappearing(view);
}
} | private void setViewDisappearing(View view) {
if (getViewStatus(view) == STATUS.DISAPPEARING) {
return;
}
<DeepExtract>
mViewStatusMap.put(view, STATUS.DISAPPEARING);
</DeepExtract>
if (null != mViewLifeCycleListener) {
mViewLifeCycleListener.onDisappearing(view);
}
} | vlayout | positive | 435,446 |
public static long[] calElement(int y, int m, int d) {
long[] nongDate = new long[7];
int i = 0, temp = 0, leap = 0;
int i = 0, temp = 0, leap = 0;
int i = 0, temp = 0, leap = 0;
Date baseDate = new GregorianCalendar(0 + 1900, 0, 31).getTime();
Date objDate = new GregorianCalendar(y, m - 1, d).getTime();
long offset = ... | public static long[] calElement(int y, int m, int d) {
long[] nongDate = new long[7];
int i = 0, temp = 0, leap = 0;
int i = 0, temp = 0, leap = 0;
int i = 0, temp = 0, leap = 0;
Date baseDate = new GregorianCalendar(0 + 1900, 0, 31).getTime();
Date objDate = new GregorianCalendar(y, m - 1, d).getTime();
long offset = ... | OkCalendar | positive | 435,447 |
public void error(CharSequence charSequence) {
if (!currentContextReportedError) {
delegate.error(currentContext);
currentContextReportedError = true;
}
delegate.error(charSequence);
} | public void error(CharSequence charSequence) {
<DeepExtract>
if (!currentContextReportedError) {
delegate.error(currentContext);
currentContextReportedError = true;
}
</DeepExtract>
delegate.error(charSequence);
} | versions-maven-plugin | positive | 435,450 |
@Test
public void multilineReferencesHeader() throws IOException {
List<String> input = new LinkedList<String>();
input.add("References:");
input.add(" <message-id1@domain.freemail>");
input.add(" <message-id2@domain.freemail>");
List<String> output = new LinkedList<String>();
output.add("References: <message-id1@domai... | @Test
public void multilineReferencesHeader() throws IOException {
List<String> input = new LinkedList<String>();
input.add("References:");
input.add(" <message-id1@domain.freemail>");
input.add(" <message-id2@domain.freemail>");
List<String> output = new LinkedList<String>();
output.add("References: <message-id1@domai... | plugin-Freemail | positive | 435,452 |
public void sendClipboardContentText(String text, int size) {
final NetworkMessage message = new NetworkClipboardTextMessage(text, size);
try {
if (true) {
semaphore.acquire();
}
executor.execute(new MyExecutable(executor, semaphore, out, message));
} catch (RejectedExecutionException ex) {
semaphore.release();
} catch... | public void sendClipboardContentText(String text, int size) {
final NetworkMessage message = new NetworkClipboardTextMessage(text, size);
<DeepExtract>
try {
if (true) {
semaphore.acquire();
}
executor.execute(new MyExecutable(executor, semaphore, out, message));
} catch (RejectedExecutionException ex) {
semaphore.rele... | Dayon | positive | 435,453 |
public void updateCreature(TileMap map, int time) {
if (y < 0)
kill();
dx = -1f + (float) (2 * Math.random());
r += time / 1800.0f;
if (dy > -3f) {
dy = dy + getGravityFactor() * GRAVITY * time;
}
x += dx;
y += dy;
} | public void updateCreature(TileMap map, int time) {
<DeepExtract>
if (y < 0)
kill();
dx = -1f + (float) (2 * Math.random());
r += time / 1800.0f;
if (dy > -3f) {
dy = dy + getGravityFactor() * GRAVITY * time;
}
x += dx;
y += dy;
</DeepExtract>
} | -Android-Super-Mario | positive | 435,455 |
@Test
public void testGetDiffFiles_whenFileIsModifiedAndNewFileIsAdded() {
writeFile(TEST_FILE, "new_file_content");
fileUtils.writeStringUnchecked("file content", fileUtils.joinPaths(getWorkspaceFolder(TEST_WORKSPACE), "startup-os", "new_file.txt"));
final String lastCommitId = repo.commit(repo.getUncommittedFiles(), ... | @Test
public void testGetDiffFiles_whenFileIsModifiedAndNewFileIsAdded() {
writeFile(TEST_FILE, "new_file_content");
<DeepExtract>
fileUtils.writeStringUnchecked("file content", fileUtils.joinPaths(getWorkspaceFolder(TEST_WORKSPACE), "startup-os", "new_file.txt"));
</DeepExtract>
final String lastCommitId = repo.commit... | startup-os | positive | 435,456 |
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = LayoutRefreshViewBinding.inflate(inflater, container, false);
binding.getRoot().setFitsSystemWindows(true);
mRecyclerView = binding.recyclerView;
mRefreshLayout ... | @Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = LayoutRefreshViewBinding.inflate(inflater, container, false);
binding.getRoot().setFitsSystemWindows(true);
mRecyclerView = binding.recyclerView;
mRefreshLayout ... | JokeVideo | positive | 435,457 |
synchronized void receive(byte[] b, int off, int len) throws IOException {
if (!connected) {
throw new IOException("Pipe not connected");
} else if (closedByWriter || closedByReader) {
throw new IOException("Pipe closed");
} else if (readSide != null && !readSide.isAlive()) {
throw new IOException("Read end dead");
}
w... | synchronized void receive(byte[] b, int off, int len) throws IOException {
<DeepExtract>
if (!connected) {
throw new IOException("Pipe not connected");
} else if (closedByWriter || closedByReader) {
throw new IOException("Pipe closed");
} else if (readSide != null && !readSide.isAlive()) {
throw new IOException("Read e... | idea-chelper | positive | 435,458 |
@Test
public void testReferenceTypeFieldsClassNotNullablePackConvert() throws Exception {
super.testReferenceTypeFieldsClassNotNullable();
} | @Test
public void testReferenceTypeFieldsClassNotNullablePackConvert() throws Exception {
<DeepExtract>
super.testReferenceTypeFieldsClassNotNullable();
</DeepExtract>
} | msgpack-java | positive | 435,460 |
public void setSelectionContainer(RuleContainerComponent ruleContainer) {
this.ruleContainer = ruleContainer;
if (ruleListModel.size() == 0) {
rulesRegistry.addRule(createNewRule());
}
if (rulesList.getSelectedValue() == null && ruleListModel.size() > 0) {
rulesList.setSelectedIndex(ruleListModel.size() - 1);
return tr... | public void setSelectionContainer(RuleContainerComponent ruleContainer) {
this.ruleContainer = ruleContainer;
if (ruleListModel.size() == 0) {
rulesRegistry.addRule(createNewRule());
}
<DeepExtract>
if (rulesList.getSelectedValue() == null && ruleListModel.size() > 0) {
rulesList.setSelectedIndex(ruleListModel.size() -... | ReshaperForBurp | positive | 435,461 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.submenu_settings);
mListView = (ListView) findViewById(android.R.id.list);
mInflater = getLayoutInflater();
SubMenuDBHelper hlp = new SubMenuDBHelper(this, false);
mDatabase = hlp.getWritableDataba... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.submenu_settings);
mListView = (ListView) findViewById(android.R.id.list);
mInflater = getLayoutInflater();
SubMenuDBHelper hlp = new SubMenuDBHelper(this, false);
mDatabase = hlp.getWritableDataba... | android_packages_apps_Launcher | positive | 435,462 |
public static WebPanel rightLeftPanel(Integer minWidth, JComponent... comps) {
HorizontalFlowLayout layout = new HorizontalFlowLayout();
WebPanel panel = new WebPanel(layout);
panel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
for (JComponent button : comps) {
if (minWidth != null)
SizeUtils.setMinimumW... | public static WebPanel rightLeftPanel(Integer minWidth, JComponent... comps) {
<DeepExtract>
HorizontalFlowLayout layout = new HorizontalFlowLayout();
WebPanel panel = new WebPanel(layout);
panel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
for (JComponent button : comps) {
if (minWidth != null)
SizeUti... | fsbrowser | positive | 435,465 |
public void start(I iface, compare_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
checkReady();
compare_call method_call = new compare_call(args.uid1, args.uid2, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.ca... | public void start(I iface, compare_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
<DeepExtract>
checkReady();
compare_call method_call = new compare_call(args.uid1, args.uid2, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;... | thrift-rpc | positive | 435,466 |
private void resize(final int newSize) {
final int[] oldItems = _items;
if (newSize < 1) {
newSize = 1;
}
_items = new int[newSize];
java.util.Arrays.fill(_items, EMPTY);
_size = 0;
for (int i = 0; i < oldItems.length; i++) {
final int concept = oldItems[i];
if (concept >= 0) {
add(concept);
}
}
} | private void resize(final int newSize) {
final int[] oldItems = _items;
<DeepExtract>
if (newSize < 1) {
newSize = 1;
}
_items = new int[newSize];
java.util.Arrays.fill(_items, EMPTY);
_size = 0;
</DeepExtract>
for (int i = 0; i < oldItems.length; i++) {
final int concept = oldItems[i];
if (concept >= 0) {
add(concept)... | snorocket | positive | 435,467 |
public static boolean check_1_result(TransformStamped outpose, String source_frame, String target_frame, Time eval_time, double epsilon) {
if (!outpose.getHeader().getStamp().equals(eval_time)) {
throw new RuntimeException("check_1_result_check_stamps");
}
if (!outpose.getHeader().getFrameId().equals(source_frame)) {
t... | public static boolean check_1_result(TransformStamped outpose, String source_frame, String target_frame, Time eval_time, double epsilon) {
if (!outpose.getHeader().getStamp().equals(eval_time)) {
throw new RuntimeException("check_1_result_check_stamps");
}
if (!outpose.getHeader().getFrameId().equals(source_frame)) {
t... | Tango | positive | 435,469 |
@Override
public void visit(MethodDeclaration n, A arg) {
List<Symbol<?>> symbols = symbolTable.getScopes().peek().getSymbolsByLocation(n);
Scope scope = symbols.get(0).getInnerScope();
if (scope == null) {
scope = new Scope(symbols.get(0));
symbols.get(0).setInnerScope(scope);
}
Symbol<?> s = symbolTable.findSymbol(sc... | @Override
public void visit(MethodDeclaration n, A arg) {
List<Symbol<?>> symbols = symbolTable.getScopes().peek().getSymbolsByLocation(n);
Scope scope = symbols.get(0).getInnerScope();
if (scope == null) {
scope = new Scope(symbols.get(0));
symbols.get(0).setInnerScope(scope);
}
<DeepExtract>
Symbol<?> s = symbolTable... | javalang-compiler | positive | 435,470 |
private void compileQuery(Clause clause) throws SourceCodeException {
Map<Byte, Integer> varNames = new TreeMap<Byte, Integer>();
seenRegisters = new TreeSet<Integer>();
lastAllocatedRegister = 0;
numPermanentVars = 0;
SizeableList<L3Instruction> preFixInstructions = new SizeableLinkedList<L3Instruction>();
SizeableLis... | private void compileQuery(Clause clause) throws SourceCodeException {
Map<Byte, Integer> varNames = new TreeMap<Byte, Integer>();
seenRegisters = new TreeSet<Integer>();
lastAllocatedRegister = 0;
numPermanentVars = 0;
SizeableList<L3Instruction> preFixInstructions = new SizeableLinkedList<L3Instruction>();
SizeableLis... | hak_wambook | positive | 435,471 |
private void parseMember(Element member, String parentName) {
parseMessages(XmlElementUtil.getFirstElementByTagName(member, "Messages"), parentName, null);
if (XmlElementUtil.getFirstElementByTagName(member, "Accessors") != null) {
for (Element member : XmlElementUtil.getNamedChildElements(XmlElementUtil.getFirstElemen... | private void parseMember(Element member, String parentName) {
parseMessages(XmlElementUtil.getFirstElementByTagName(member, "Messages"), parentName, null);
<DeepExtract>
if (XmlElementUtil.getFirstElementByTagName(member, "Accessors") != null) {
for (Element member : XmlElementUtil.getNamedChildElements(XmlElementUtil.... | violations-plugin | positive | 435,472 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.