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 Criteria andBizNatureNotBetween(Integer value1, Integer value2) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "bizNature" + " cannot be null");
}
criteria.add(new Criterion("biz_nature not between", value1, value2));
return (Criteria) this;
} | public Criteria andBizNatureNotBetween(Integer value1, Integer value2) {
<DeepExtract>
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "bizNature" + " cannot be null");
}
criteria.add(new Criterion("biz_nature not between", value1, value2));
</DeepExtract>
return (Criteria) th... | data-manage-parent | positive | 437,428 |
@Test
public void callsFromConstructorAreForwarded() {
NonInterfaceItem item1 = new NonInterfaceItem();
this.value = 20;
NonInterfaceItem item2 = new NonInterfaceItem();
this.value = 50;
assertEquals(70, sumFrom(asList(item1, item2)).getValue());
assertEquals(20, item1.getValue());
assertEquals(50, item2.getValue());
} | @Test
public void callsFromConstructorAreForwarded() {
NonInterfaceItem item1 = new NonInterfaceItem();
this.value = 20;
NonInterfaceItem item2 = new NonInterfaceItem();
<DeepExtract>
this.value = 50;
</DeepExtract>
assertEquals(70, sumFrom(asList(item1, item2)).getValue());
assertEquals(20, item1.getValue());
assertEq... | lambdaj | positive | 437,429 |
@Override
@Nullable
public List<?> getList(@NotNull String path) {
Object value = getObject(path);
if (List.class.isInstance(value)) {
return List.class.cast(value);
}
return null;
} | @Override
@Nullable
public List<?> getList(@NotNull String path) {
<DeepExtract>
Object value = getObject(path);
if (List.class.isInstance(value)) {
return List.class.cast(value);
}
return null;
</DeepExtract>
} | ConfigMe | positive | 437,432 |
public void sendKeepAliveMsg() throws Exception {
Buffer buf = new Buffer();
Packet packet = new Packet(buf);
packet.reset();
buf.putByte((byte) SSH_MSG_GLOBAL_REQUEST);
buf.putString(keepalivemsg);
buf.putByte((byte) 1);
while (in_kex) {
byte command = packet.buffer.getCommand();
if (command == SSH_MSG_KEXINIT || comm... | public void sendKeepAliveMsg() throws Exception {
Buffer buf = new Buffer();
Packet packet = new Packet(buf);
packet.reset();
buf.putByte((byte) SSH_MSG_GLOBAL_REQUEST);
buf.putString(keepalivemsg);
buf.putByte((byte) 1);
<DeepExtract>
while (in_kex) {
byte command = packet.buffer.getCommand();
if (command == SSH_MSG_K... | sshxcute | positive | 437,433 |
private static Image iconImage() {
BufferedImage image = new BufferedImage(32, 32, BufferedImage.TYPE_INT_RGB);
int[] pixels = new int[32 * 32];
int destIdx = 9 * 32 + 0;
for (int cy = 0; cy < 8; cy++) {
for (int cx = 0; cx < 8; cx++) {
int pixel = ((TOPAZ_8['I' - 32] >> 63 - cy * 8 - cx) & 1) == 0 ? 0 : toRgb24(0x07F)... | private static Image iconImage() {
BufferedImage image = new BufferedImage(32, 32, BufferedImage.TYPE_INT_RGB);
int[] pixels = new int[32 * 32];
int destIdx = 9 * 32 + 0;
for (int cy = 0; cy < 8; cy++) {
for (int cx = 0; cx < 8; cx++) {
int pixel = ((TOPAZ_8['I' - 32] >> 63 - cy * 8 - cx) & 1) == 0 ? 0 : toRgb24(0x07F)... | micromod | positive | 437,435 |
@Override
protected void onPostExecute(Void result) {
progress.dismiss();
getActivity().setResult(Activity.RESULT_OK);
getActivity().finish();
} | @Override
protected void onPostExecute(Void result) {
progress.dismiss();
<DeepExtract>
getActivity().setResult(Activity.RESULT_OK);
getActivity().finish();
</DeepExtract>
} | BlackList | positive | 437,438 |
@Override
public byte[] getContent() {
long len;
if (isExists) {
if (isDirectory) {
len = -1;
}
len = fileBlock.length();
} else {
len = 0;
}
if (len > Integer.MAX_VALUE) {
throw new ArrayIndexOutOfBoundsException();
}
if (isDirectory || len < 0) {
return null;
}
int size = (int) len;
byte[] result = new byte[size];
in... | @Override
public byte[] getContent() {
<DeepExtract>
long len;
if (isExists) {
if (isDirectory) {
len = -1;
}
len = fileBlock.length();
} else {
len = 0;
}
</DeepExtract>
if (len > Integer.MAX_VALUE) {
throw new ArrayIndexOutOfBoundsException();
}
if (isDirectory || len < 0) {
return null;
}
int size = (int) len;
byte[... | kiftd-source | positive | 437,439 |
public Criteria andCellPhoneNumberLessThanOrEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "cellPhoneNumber" + " cannot be null");
}
criteria.add(new Criterion("cell_phone_number <=", value));
return (Criteria) this;
} | public Criteria andCellPhoneNumberLessThanOrEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "cellPhoneNumber" + " cannot be null");
}
criteria.add(new Criterion("cell_phone_number <=", value));
</DeepExtract>
return (Criteria) this;
} | CRM | positive | 437,443 |
public static void sortTuple(double[] a, int fromIndex, int toIndex) {
if (fromIndex > toIndex) {
throw new IllegalArgumentException("fromIndex > toIndex");
}
if (fromIndex < 0) {
throw new ArrayIndexOutOfBoundsException(fromIndex);
}
if (toIndex > a.length >> 1) {
throw new ArrayIndexOutOfBoundsException(toIndex);
}
i... | public static void sortTuple(double[] a, int fromIndex, int toIndex) {
if (fromIndex > toIndex) {
throw new IllegalArgumentException("fromIndex > toIndex");
}
if (fromIndex < 0) {
throw new ArrayIndexOutOfBoundsException(fromIndex);
}
if (toIndex > a.length >> 1) {
throw new ArrayIndexOutOfBoundsException(toIndex);
}
<... | ytk-learn | positive | 437,445 |
public Object3D makeRing(double balls, double radius) {
double zoom = 100;
double rollInc = 1.0;
double pitchInc = 0.5;
double yawInc = 1.5;
double zOffset = 2.5;
Object3D obj3D = new Object3D(precalc);
obj3D.setZoom(zoom);
obj3D.setRollInc(rollInc);
obj3D.setPitchInc(pitchInc);
obj3D.setYawInc(yawInc);
obj3D.setzOffse... | public Object3D makeRing(double balls, double radius) {
double zoom = 100;
double rollInc = 1.0;
double pitchInc = 0.5;
double yawInc = 1.5;
double zOffset = 2.5;
Object3D obj3D = new Object3D(precalc);
obj3D.setZoom(zoom);
obj3D.setRollInc(rollInc);
obj3D.setPitchInc(pitchInc);
obj3D.setYawInc(yawInc);
obj3D.setzOffse... | DemoFX | positive | 437,446 |
@NotNull
@Override
public ByteStringAppender append(@NotNull byte[] str) {
if (str.order() == order())
while (str.remaining() >= 8) writeLong(str.getLong());
while (str.remaining() >= 1) writeByte(str.get());
return this;
} | @NotNull
@Override
public ByteStringAppender append(@NotNull byte[] str) {
<DeepExtract>
if (str.order() == order())
while (str.remaining() >= 8) writeLong(str.getLong());
while (str.remaining() >= 1) writeByte(str.get());
</DeepExtract>
return this;
} | Java-Chronicle | positive | 437,448 |
@Test
public void test() throws Exception {
int count = 0;
for (Event event : hypersistenceOptimizer.getEvents()) {
if (event.getClass().equals(EagerFetchingEvent.class)) {
count++;
}
}
assertSame(2, count);
int count = 0;
for (Event event : hypersistenceOptimizer.getEvents()) {
if (event.getClass().equals(ManyToManyLi... | @Test
public void test() throws Exception {
int count = 0;
for (Event event : hypersistenceOptimizer.getEvents()) {
if (event.getClass().equals(EagerFetchingEvent.class)) {
count++;
}
}
assertSame(2, count);
int count = 0;
for (Event event : hypersistenceOptimizer.getEvents()) {
if (event.getClass().equals(ManyToManyLi... | hypersistence-optimizer | positive | 437,449 |
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mViewRect.top = 0;
mViewRect.left = 0;
mViewRect.right = getWidth();
mViewRect.bottom = getHeight();
mBorderRect.top = mBorderSize / 2;
mBorderRect.left = mBorderSize / 2;
mBorderRect.right = getWidth() - m... | @Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mViewRect.top = 0;
mViewRect.left = 0;
mViewRect.right = getWidth();
mViewRect.bottom = getHeight();
mBorderRect.top = mBorderSize / 2;
mBorderRect.left = mBorderSize / 2;
mBorderRect.right = getWidth() - m... | CustomView | positive | 437,451 |
@Override
public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) {
Map<String, Object> attrs = metadata.getAnnotationAttributes(RedisClients.class.getName(), true);
if (attrs != null && attrs.containsKey("value")) {
AnnotationAttributes[] clients = (AnnotationAttributes[]) att... | @Override
public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) {
Map<String, Object> attrs = metadata.getAnnotationAttributes(RedisClients.class.getName(), true);
if (attrs != null && attrs.containsKey("value")) {
AnnotationAttributes[] clients = (AnnotationAttributes[]) att... | base-spring-boot | positive | 437,452 |
public static ImageSizeSelectionDialogFragment newInstance(Collection<ImageCompressionDescription> entries) {
ImageSizeSelectionDialogFragment f = new ImageSizeSelectionDialogFragment();
Bundle args = new Bundle();
f.setArguments(args);
mEntries = new ArrayList<ImageCompressionDescription>(entries);
return f;
} | public static ImageSizeSelectionDialogFragment newInstance(Collection<ImageCompressionDescription> entries) {
ImageSizeSelectionDialogFragment f = new ImageSizeSelectionDialogFragment();
Bundle args = new Bundle();
f.setArguments(args);
<DeepExtract>
mEntries = new ArrayList<ImageCompressionDescription>(entries);
</Dee... | matrix-android-console | positive | 437,453 |
@Override
public void insertUpdate(DocumentEvent de) {
if (de.getOffset() <= pos.getOffset()) {
updatePosition();
}
} | @Override
public void insertUpdate(DocumentEvent de) {
<DeepExtract>
if (de.getOffset() <= pos.getOffset()) {
updatePosition();
}
</DeepExtract>
} | processing-experimental | positive | 437,454 |
void init() {
Map<String, LoadedConfigProperty> loadedPropertyMap = new ConcurrentHashMap<>();
Map<String, ConfigSource> sources = settings.getSources();
for (String sourceName : sources.keySet()) {
ConfigSource source = sources.get(sourceName);
final Map<String, ConfigProperty> configMap;
Throwable error = null;
try {... | void init() {
<DeepExtract>
Map<String, LoadedConfigProperty> loadedPropertyMap = new ConcurrentHashMap<>();
Map<String, ConfigSource> sources = settings.getSources();
for (String sourceName : sources.keySet()) {
ConfigSource source = sources.get(sourceName);
final Map<String, ConfigProperty> configMap;
Throwable error... | scalecube-config | positive | 437,456 |
private void set(@Nonnull final Value[] values, @Nonnull final long[] ptrs) {
final int vlen = values.length;
if (vlen > Short.MAX_VALUE) {
throw new IllegalArgumentException("entries exceeds limit: " + vlen);
}
this.keys = values;
this.ptrs = ptrs;
this.valueCount = (short) vlen;
if (vlen > 1) {
final int prevPrefixLe... | private void set(@Nonnull final Value[] values, @Nonnull final long[] ptrs) {
final int vlen = values.length;
if (vlen > Short.MAX_VALUE) {
throw new IllegalArgumentException("entries exceeds limit: " + vlen);
}
this.keys = values;
this.ptrs = ptrs;
this.valueCount = (short) vlen;
if (vlen > 1) {
final int prevPrefixLe... | btree4j | positive | 437,458 |
@Override
public void onClick(View v) {
quickReturnEditText.setCursorVisible(true);
quickReturnView.animate().translationY(0.0f).setDuration(300).setInterpolator(new EaseInOutBezierInterpolator()).start();
quickReturnBackground.animate().translationY(0.0f).alpha(1.0f).setDuration(300).setInterpolator(new EaseInOutBezie... | @Override
public void onClick(View v) {
quickReturnEditText.setCursorVisible(true);
<DeepExtract>
quickReturnView.animate().translationY(0.0f).setDuration(300).setInterpolator(new EaseInOutBezierInterpolator()).start();
quickReturnBackground.animate().translationY(0.0f).alpha(1.0f).setDuration(300).setInterpolator(new ... | wally | positive | 437,459 |
public void actionPerformed(ActionEvent actionEvent) {
if (dialog.isShowing()) {
dialog.toFront();
} else {
dialog.setVisible(true);
}
} | public void actionPerformed(ActionEvent actionEvent) {
<DeepExtract>
if (dialog.isShowing()) {
dialog.toFront();
} else {
dialog.setVisible(true);
}
</DeepExtract>
} | swingset3 | positive | 437,460 |
public HomeTimelineRequest homeTimelines() throws IOException {
HomeTimelineRequest request = new HomeTimelineRequest();
super.initialize(request);
return request;
} | public HomeTimelineRequest homeTimelines() throws IOException {
HomeTimelineRequest request = new HomeTimelineRequest();
<DeepExtract>
super.initialize(request);
</DeepExtract>
return request;
} | android-oauth-client | positive | 437,462 |
public void update(float delta) {
double timeOfPacket = System.currentTimeMillis() - DELAY - ping;
ArrayList<WorldSnapshot> packetsToApply = getPacketsFromBeforeMillis(timeOfPacket, worldChangesSnapshotPackets);
for (WorldSnapshot packet : packetsToApply) {
world.applyChangesWorldSnapshot(packet);
}
this.removeFromColl... | public void update(float delta) {
double timeOfPacket = System.currentTimeMillis() - DELAY - ping;
ArrayList<WorldSnapshot> packetsToApply = getPacketsFromBeforeMillis(timeOfPacket, worldChangesSnapshotPackets);
for (WorldSnapshot packet : packetsToApply) {
world.applyChangesWorldSnapshot(packet);
}
this.removeFromColl... | ArchipeloClient | positive | 437,463 |
public static void main(String[] args) throws Exception {
CommandLine commandLine = null;
try {
commandLine = new DefaultParser().parse(OPTIONS, args);
} catch (ParseException e) {
HelpFormatter helpFormatter = new HelpFormatter();
helpFormatter.printHelp("java -jar org.mitre.quaerite.solrtools.WinnowAnalyzedElevate", ... | public static void main(String[] args) throws Exception {
CommandLine commandLine = null;
try {
commandLine = new DefaultParser().parse(OPTIONS, args);
} catch (ParseException e) {
HelpFormatter helpFormatter = new HelpFormatter();
helpFormatter.printHelp("java -jar org.mitre.quaerite.solrtools.WinnowAnalyzedElevate", ... | quaerite | positive | 437,464 |
public static InternedSnippet valueOf(Snippet snippet) {
if (snippet instanceof InternedSnippet) {
return (InternedSnippet) snippet;
}
final InternedSnippet internedSnippet = new InternedSnippet(snippet);
T cachedObj = cache.get(internedSnippet);
if (cachedObj != null) {
return cachedObj;
} else {
cache.put(internedSni... | public static InternedSnippet valueOf(Snippet snippet) {
if (snippet instanceof InternedSnippet) {
return (InternedSnippet) snippet;
}
final InternedSnippet internedSnippet = new InternedSnippet(snippet);
<DeepExtract>
T cachedObj = cache.get(internedSnippet);
if (cachedObj != null) {
return cachedObj;
} else {
cache.p... | sdk-client-tools-protex | positive | 437,466 |
public static void init() {
if (tasks == null) {
tasks = new AidaManager();
}
return tasks;
} | public static void init() {
<DeepExtract>
if (tasks == null) {
tasks = new AidaManager();
}
return tasks;
</DeepExtract>
} | aida | positive | 437,467 |
@Test
public void testWildcardQuery() {
assertTrue(QueryParserUtils.checkRecord("?q=qname:*.com", doc, dSchema));
assertTrue(QueryParserUtils.checkRecord("?q=qname:a.b.c.c*m", doc, dSchema));
assertTrue(QueryParserUtils.checkRecord("?q=qname:a.b*", doc, dSchema));
assertFalse(QueryParserUtils.checkRecord("?q=qname:*.or... | @Test
public void testWildcardQuery() {
assertTrue(QueryParserUtils.checkRecord("?q=qname:*.com", doc, dSchema));
assertTrue(QueryParserUtils.checkRecord("?q=qname:a.b.c.c*m", doc, dSchema));
assertTrue(QueryParserUtils.checkRecord("?q=qname:a.b*", doc, dSchema));
assertFalse(QueryParserUtils.checkRecord("?q=qname:*.or... | incubator-retired-pirk | positive | 437,468 |
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
@SuppressWarnings("ucd")
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
if (!(event.getBlock().getState() instanceof Sign))
return;
IC myIC;
myIC = TriggeredSignFactory.getTriggeredIC(event.getBlock(), null);
if (myIC == null)
myIC... | @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
@SuppressWarnings("ucd")
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
<DeepExtract>
if (!(event.getBlock().getState() instanceof Sign))
return;
IC myIC;
myIC = TriggeredSignFactory.getTriggeredIC(event.getBlock(), null);
if (myIC... | ByteCart | positive | 437,469 |
@Override
public void onClick(ClickEvent event) {
Comparison c = new Comparison(session);
addCondition(c);
return c;
fireDirty();
} | @Override
public void onClick(ClickEvent event) {
<DeepExtract>
Comparison c = new Comparison(session);
addCondition(c);
return c;
</DeepExtract>
fireDirty();
} | RedQueryBuilder | positive | 437,470 |
public void run() {
ImageIcon icon;
java.net.URL imgURL = getClass().getResource(image);
if (imgURL == null) {
try {
imgURL = new File(image).toURI().toURL();
icon = new ImageIcon(imgURL, null);
} catch (MalformedURLException e) {
icon = null;
}
} else {
icon = new ImageIcon(imgURL, null);
}
if (icon != null) {
int hin... | public void run() {
<DeepExtract>
ImageIcon icon;
java.net.URL imgURL = getClass().getResource(image);
if (imgURL == null) {
try {
imgURL = new File(image).toURI().toURL();
icon = new ImageIcon(imgURL, null);
} catch (MalformedURLException e) {
icon = null;
}
} else {
icon = new ImageIcon(imgURL, null);
}
</DeepExtract... | POSdeviceSimulator | positive | 437,471 |
public void setLastCleanup(long lastCleanup) {
SharedPreferences.Editor editor = prefs.edit();
if (lastCleanup instanceof String) {
editor.putString(LAST_CLEANUP, (String) lastCleanup);
} else if (lastCleanup instanceof Integer) {
editor.putInt(LAST_CLEANUP, (Integer) lastCleanup);
} else if (lastCleanup instanceof Lon... | public void setLastCleanup(long lastCleanup) {
<DeepExtract>
SharedPreferences.Editor editor = prefs.edit();
if (lastCleanup instanceof String) {
editor.putString(LAST_CLEANUP, (String) lastCleanup);
} else if (lastCleanup instanceof Integer) {
editor.putInt(LAST_CLEANUP, (Integer) lastCleanup);
} else if (lastCleanup ... | ttrss-reader-fork | positive | 437,472 |
public ArmyAdapter getArmyAdapter() {
if (closed) {
dbHelper = new BookDbHelper(context, dbName);
database = dbHelper.openDatabase();
closed = false;
}
return this;
return new ArmyAdapter(database, dbName);
} | public ArmyAdapter getArmyAdapter() {
<DeepExtract>
if (closed) {
dbHelper = new BookDbHelper(context, dbName);
database = dbHelper.openDatabase();
closed = false;
}
return this;
</DeepExtract>
return new ArmyAdapter(database, dbName);
} | PathfinderOpenReference | positive | 437,474 |
public static int getAnim(String name) {
String packageName = AppBase.app.getPackageName();
Resources res = AppBase.app.getResources();
int identifier = res.getIdentifier(name, "anim", packageName);
if (identifier == 0) {
}
return identifier;
} | public static int getAnim(String name) {
<DeepExtract>
String packageName = AppBase.app.getPackageName();
Resources res = AppBase.app.getResources();
int identifier = res.getIdentifier(name, "anim", packageName);
if (identifier == 0) {
}
return identifier;
</DeepExtract>
} | lefastdev | positive | 437,478 |
protected void decompileFunctor(byte[] code) {
Queue<Integer> instructions = getInstructionQueue();
for (int i = 0; i < code.length; ) {
byte instruction = code[i];
switch(instruction) {
case PUT_STRUC:
case GET_STRUC:
case SET_VAR:
case PUT_VAR:
case CALL:
{
instructions.offer(i);
break;
}
case UNIFY_VAR:
case GET_VAR... | protected void decompileFunctor(byte[] code) {
Queue<Integer> instructions = getInstructionQueue();
for (int i = 0; i < code.length; ) {
byte instruction = code[i];
switch(instruction) {
case PUT_STRUC:
case GET_STRUC:
case SET_VAR:
case PUT_VAR:
case CALL:
{
instructions.offer(i);
break;
}
case UNIFY_VAR:
case GET_VAR... | hak_wambook | positive | 437,480 |
@Override
public void withParameter(String name, long value) {
if (name == null || name.trim().isEmpty()) {
throw new DescriptorBuilderException("a valid parameter name is required");
}
if (value == null) {
throw new DescriptorBuilderException("parameter values cannot be null");
}
if (parameters.containsKey(name)) {
th... | @Override
public void withParameter(String name, long value) {
<DeepExtract>
if (name == null || name.trim().isEmpty()) {
throw new DescriptorBuilderException("a valid parameter name is required");
}
if (value == null) {
throw new DescriptorBuilderException("parameter values cannot be null");
}
if (parameters.containsK... | Flapi | positive | 437,481 |
@Override
public void rollback() throws SQLException {
if (!pooledObject.isBorrowed()) {
throw new SQLException("PooledConnection has been returned to pool");
}
connection.rollback();
} | @Override
public void rollback() throws SQLException {
<DeepExtract>
if (!pooledObject.isBorrowed()) {
throw new SQLException("PooledConnection has been returned to pool");
}
</DeepExtract>
connection.rollback();
} | jsql | positive | 437,482 |
private StringBuilder getItemDescription(int var1) {
this.mVirtualCursorIndexX = var1 % 11;
this.mVirtualCursorIndexY = var1 / 11;
if (SeslColorSwatchView.this.mColorSwatchDescription[this.mVirtualCursorIndexX][this.mVirtualCursorIndexY] == null) {
StringBuilder var2 = new StringBuilder();
var1 = this.mVirtualCursorInd... | private StringBuilder getItemDescription(int var1) {
<DeepExtract>
this.mVirtualCursorIndexX = var1 % 11;
this.mVirtualCursorIndexY = var1 / 11;
</DeepExtract>
if (SeslColorSwatchView.this.mColorSwatchDescription[this.mVirtualCursorIndexX][this.mVirtualCursorIndexY] == null) {
StringBuilder var2 = new StringBuilder();
... | SamsungOneUi | positive | 437,483 |
public void changeSortingMode(SortingMode sortingMode) {
this.sortingMode = sortingMode;
Collections.sort(albums, AlbumsComparators.getComparator(sortingMode, sortingOrder));
notifyDataSetChanged();
} | public void changeSortingMode(SortingMode sortingMode) {
this.sortingMode = sortingMode;
<DeepExtract>
Collections.sort(albums, AlbumsComparators.getComparator(sortingMode, sortingOrder));
notifyDataSetChanged();
</DeepExtract>
} | leafpicrevived | positive | 437,484 |
@Test
public void testInstallFromPath() throws Exception {
String path = getClass().getResource("/performanceTest.yml").getPath();
FreeStyleProject project = createFreeStyleProject();
FreeStyleBuildExt buildExt = new FreeStyleBuildExt(project);
FilePath workspace = new FilePath(Files.createTempDirectory(null).toFile())... | @Test
public void testInstallFromPath() throws Exception {
String path = getClass().getResource("/performanceTest.yml").getPath();
FreeStyleProject project = createFreeStyleProject();
FreeStyleBuildExt buildExt = new FreeStyleBuildExt(project);
FilePath workspace = new FilePath(Files.createTempDirectory(null).toFile())... | performance-plugin | positive | 437,487 |
public int getMinorOperatingSystemVersion() {
read(peHeaderOffset, 66, 2);
return valueBuffer.getShort() & 0xFFFF;
} | public int getMinorOperatingSystemVersion() {
<DeepExtract>
read(peHeaderOffset, 66, 2);
return valueBuffer.getShort() & 0xFFFF;
</DeepExtract>
} | jsign | positive | 437,488 |
@Override
public Void visitGetExpr(Expr.Get expr) {
for (Stmt statement : expr.object) {
resolve(statement);
}
return null;
} | @Override
public Void visitGetExpr(Expr.Get expr) {
<DeepExtract>
for (Stmt statement : expr.object) {
resolve(statement);
}
</DeepExtract>
return null;
} | Mani | positive | 437,489 |
@Test
public void testFindSmallBatchFetchOneByOne() throws Exception {
AtomicReference<ReadStream<JsonObject>> streamReference = new AtomicReference<>();
String collection = randomCollection();
CountDownLatch latch = new CountDownLatch(1);
AtomicReference<List<String>> foos = new AtomicReference<>();
mongoClient.create... | @Test
public void testFindSmallBatchFetchOneByOne() throws Exception {
<DeepExtract>
AtomicReference<ReadStream<JsonObject>> streamReference = new AtomicReference<>();
String collection = randomCollection();
CountDownLatch latch = new CountDownLatch(1);
AtomicReference<List<String>> foos = new AtomicReference<>();
mong... | vertx-mongo-client | positive | 437,491 |
public static String toCapitalizeCamelCase(String s) {
if (s == null) {
return null;
}
if (s == null) {
s = null;
}
s = s.toLowerCase();
StringBuilder sb = new StringBuilder(s.length());
boolean upperCase = false;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c == '_') {
upperCase = true;
} else if (... | public static String toCapitalizeCamelCase(String s) {
if (s == null) {
return null;
}
<DeepExtract>
if (s == null) {
s = null;
}
s = s.toLowerCase();
StringBuilder sb = new StringBuilder(s.length());
boolean upperCase = false;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c == '_') {
upperCase = tru... | jeebase | positive | 437,492 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
DeleteRickshaw dc = new DeleteRickshaw();
dc.setVisible(true);
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
this.setVisible(false);
DeleteRickshaw dc = new DeleteRickshaw();
dc.setVisible(true);
</DeepExtract>
} | vehler | positive | 437,493 |
public <T extends Identifiable> void deleteObject(Class<T> classs, String id) throws RedmineException {
final URI uri = getURIConfigurator().getObjectURI(classs, id);
final HttpDelete http = new HttpDelete(uri);
if (onBehalfOfUser != null) {
http.addHeader("X-Redmine-Switch-User", onBehalfOfUser);
}
return communicator... | public <T extends Identifiable> void deleteObject(Class<T> classs, String id) throws RedmineException {
final URI uri = getURIConfigurator().getObjectURI(classs, id);
final HttpDelete http = new HttpDelete(uri);
<DeepExtract>
if (onBehalfOfUser != null) {
http.addHeader("X-Redmine-Switch-User", onBehalfOfUser);
}
retur... | redmine-java-api | positive | 437,494 |
@AfterClass
public static void afterClass() {
setLanguageSettings(false, "en");
getDriver().manage().deleteCookieNamed("language");
} | @AfterClass
public static void afterClass() {
<DeepExtract>
setLanguageSettings(false, "en");
getDriver().manage().deleteCookieNamed("language");
</DeepExtract>
} | xwiki-enterprise | positive | 437,495 |
@Override
public void actionPerformed(ActionEvent event) {
detailView.remove(detailedMessageButton);
ExceptionDisplay display = new ExceptionDisplay();
if (result.getException() != null && result.getException().size() > 0) {
ex = result.getException();
} else {
ex = result.getDetailedMessage();
}
if (ex.size() > 0) {
d... | @Override
public void actionPerformed(ActionEvent event) {
detailView.remove(detailedMessageButton);
ExceptionDisplay display = new ExceptionDisplay();
if (result.getException() != null && result.getException().size() > 0) {
ex = result.getException();
} else {
ex = result.getDetailedMessage();
}
if (ex.size() > 0) {
d... | tmc-netbeans | positive | 437,496 |
public Criteria andNeedAsyncCallbackIsNotNull() {
if ("need_async_callback is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("need_async_callback is not null"));
return (Criteria) this;
} | public Criteria andNeedAsyncCallbackIsNotNull() {
<DeepExtract>
if ("need_async_callback is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("need_async_callback is not null"));
</DeepExtract>
return (Criteria) this;
} | AnyMock | positive | 437,497 |
@Test
public void stroke_pull() {
assertEquals("143", intToAch(STROKE_PULL.getLocation(), 3));
} | @Test
public void stroke_pull() {
<DeepExtract>
assertEquals("143", intToAch(STROKE_PULL.getLocation(), 3));
</DeepExtract>
} | waterrower-core | positive | 437,498 |
public void setHint(CharSequence text, int visibility) {
if (mVisibilityGoto != VISIBLE) {
return;
}
mTvContent.setText(text);
} | public void setHint(CharSequence text, int visibility) {
if (mVisibilityGoto != VISIBLE) {
return;
}
<DeepExtract>
mTvContent.setText(text);
</DeepExtract>
} | Common | positive | 437,499 |
public void add(List<I> seq) {
E current = startState;
int idx = 0;
while (idx < seq.size()) {
E n = getNext(current, seq.get(idx));
if (n == null)
break;
idx++;
current = n;
}
E current = current;
List<E> nodes = new ArrayList<E>();
if (seq.size() > idx) {
regRemove(current);
}
for (int i = idx; i < seq.size(); i++) {... | public void add(List<I> seq) {
E current = startState;
int idx = 0;
while (idx < seq.size()) {
E n = getNext(current, seq.get(idx));
if (n == null)
break;
idx++;
current = n;
}
<DeepExtract>
E current = current;
List<E> nodes = new ArrayList<E>();
if (seq.size() > idx) {
regRemove(current);
}
for (int i = idx; i < seq.... | fsa | positive | 437,500 |
public double tan(double angle) {
angle %= Math.PI * 2.0d;
if (angle < 0) {
angle += Math.PI * 2.0d;
}
return (angle);
return (mTan[angleToArrayPosition(angle)]);
} | public double tan(double angle) {
<DeepExtract>
angle %= Math.PI * 2.0d;
if (angle < 0) {
angle += Math.PI * 2.0d;
}
return (angle);
</DeepExtract>
return (mTan[angleToArrayPosition(angle)]);
} | MMO-Rulemasters-World | positive | 437,502 |
public List<Long> toList() {
ArrayList<Long> result = new ArrayList<>();
this.trav.traverse(result::add);
return result;
} | public List<Long> toList() {
ArrayList<Long> result = new ArrayList<>();
<DeepExtract>
this.trav.traverse(result::add);
</DeepExtract>
return result;
} | jayield | positive | 437,503 |
@Override
public <T> Request<?> sendPost(Object tag, String url, String cacheKey, RequestParams params, RequestCacheConfig cacheConfig, OnRequestListener<T> onRequestListener) {
MultipartGsonRequest<T> request = new MultipartGsonRequest<T>(cacheConfig, url, cacheKey, onRequestListener);
request.setRequestParams(params)... | @Override
public <T> Request<?> sendPost(Object tag, String url, String cacheKey, RequestParams params, RequestCacheConfig cacheConfig, OnRequestListener<T> onRequestListener) {
MultipartGsonRequest<T> request = new MultipartGsonRequest<T>(cacheConfig, url, cacheKey, onRequestListener);
request.setRequestParams(params)... | XDroidRequest | positive | 437,504 |
@Override
public void onAnimationEnd(Animator animation) {
removeView(view);
if (onStopAnimateListener != null) {
onStopAnimateListener.onBallDisappearAnimListener(bean.number);
}
if (!surplusBeanList.isEmpty()) {
addViewList(surplusBeanList.get(0), -1);
surplusBeanList.remove(0);
} else {
if (needShowDefaultDynamic &&... | @Override
public void onAnimationEnd(Animator animation) {
<DeepExtract>
removeView(view);
if (onStopAnimateListener != null) {
onStopAnimateListener.onBallDisappearAnimListener(bean.number);
}
if (!surplusBeanList.isEmpty()) {
addViewList(surplusBeanList.get(0), -1);
surplusBeanList.remove(0);
} else {
if (needShowDef... | CustomProject | positive | 437,505 |
public void deleteComponent(JComponent comp) {
JComponent parent = canvas;
widgetManager.remove(comp);
addedComponents.remove(comp.getName());
componentListCombobox.removeItem(comp.getName());
if (null != selectedComponent) {
null.requestFocus();
this.selectedComponent = null;
getComponentListCombobox().setSelectedItem... | public void deleteComponent(JComponent comp) {
JComponent parent = canvas;
widgetManager.remove(comp);
addedComponents.remove(comp.getName());
componentListCombobox.removeItem(comp.getName());
<DeepExtract>
if (null != selectedComponent) {
null.requestFocus();
this.selectedComponent = null;
getComponentListCombobox().s... | RITDevX | positive | 437,508 |
public void onClick(View v) {
threadThingInfo.setClicked(true);
mCommentsAdapter.notifyDataSetChanged();
Common.launchBrowser(activity, threadThingInfo.getUrl(), Util.createThreadUri(threadThingInfo).toString(), false, false, mSettings.isUseExternalBrowser(), mSettings.isSaveHistory());
} | public void onClick(View v) {
<DeepExtract>
threadThingInfo.setClicked(true);
mCommentsAdapter.notifyDataSetChanged();
</DeepExtract>
Common.launchBrowser(activity, threadThingInfo.getUrl(), Util.createThreadUri(threadThingInfo).toString(), false, false, mSettings.isUseExternalBrowser(), mSettings.isSaveHistory());
} | reddit-is-fun | positive | 437,510 |
static void initMCPermPrun() {
final int SYM_MASK = (1 << 4) - 1;
final int N_RAW = MPermMove.length;
final int N_SYM = CPermMove.length;
final int N_SIZE = N_RAW * N_SYM;
final int N_MOVES = MPermMove[0].length;
for (int i = 0; i < (N_RAW * N_SYM + 7) / 8; i++) {
MCPermPrun[i] = -1;
}
setPruning(MCPermPrun, 0, 0);
int... | static void initMCPermPrun() {
<DeepExtract>
final int SYM_MASK = (1 << 4) - 1;
final int N_RAW = MPermMove.length;
final int N_SYM = CPermMove.length;
final int N_SIZE = N_RAW * N_SYM;
final int N_MOVES = MPermMove[0].length;
for (int i = 0; i < (N_RAW * N_SYM + 7) / 8; i++) {
MCPermPrun[i] = -1;
}
setPruning(MCPermPr... | DCTimer-Android | positive | 437,511 |
public Set<Protos.TaskID> getActiveTasks() {
Set<Protos.TaskID> tasks;
if (activeTasks != null) {
tasks = new HashSet<Protos.TaskID>(activeTasks.size());
for (int i = 0; i < activeTasks.size(); i++) {
tasks.add(ByteBufferSupport.toTaskId(activeTasks.get(i)));
}
} else {
tasks = new HashSet<Protos.TaskID>(0);
}
return t... | public Set<Protos.TaskID> getActiveTasks() {
<DeepExtract>
Set<Protos.TaskID> tasks;
if (activeTasks != null) {
tasks = new HashSet<Protos.TaskID>(activeTasks.size());
for (int i = 0; i < activeTasks.size(); i++) {
tasks.add(ByteBufferSupport.toTaskId(activeTasks.get(i)));
}
} else {
tasks = new HashSet<Protos.TaskID>(... | incubator-myriad | positive | 437,514 |
@Override
public synchronized void load(final SingleCellArrayImg<T, ?> cell) {
CellLoaderLogger<T> logger = new CellLoaderLogger<>(cell);
logger.start();
long[] min = new long[cell.numDimensions()];
long[] max = new long[cell.numDimensions()];
cell.min(min);
cell.max(max);
assert cell.numDimensions() == DimensionOrder.... | @Override
public synchronized void load(final SingleCellArrayImg<T, ?> cell) {
CellLoaderLogger<T> logger = new CellLoaderLogger<>(cell);
logger.start();
long[] min = new long[cell.numDimensions()];
long[] max = new long[cell.numDimensions()];
cell.min(min);
cell.max(max);
assert cell.numDimensions() == DimensionOrder.... | bigdataprocessor2 | positive | 437,515 |
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_yc_web_view);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManag... | @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_yc_web_view);
<DeepExtract>
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) !... | YCWebView | positive | 437,516 |
private String calculateFromDateFormat(String origSemester) {
Integer extractedYear = 0;
Integer extractedMonth = 0;
String resultSemester = "";
Matcher matcher = semesterPattern.matcher(origSemester);
if (matcher.find()) {
try {
extractedMonth = Integer.parseInt(matcher.group(1));
} catch (NumberFormatException e) {
e... | private String calculateFromDateFormat(String origSemester) {
Integer extractedYear = 0;
Integer extractedMonth = 0;
String resultSemester = "";
Matcher matcher = semesterPattern.matcher(origSemester);
if (matcher.find()) {
try {
extractedMonth = Integer.parseInt(matcher.group(1));
} catch (NumberFormatException e) {
e... | mygrades-app | positive | 437,517 |
public Criteria andMp3urlEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "mp3url" + " cannot be null");
}
criteria.add(new Criterion("mp3url =", value));
return (Criteria) this;
} | public Criteria andMp3urlEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "mp3url" + " cannot be null");
}
criteria.add(new Criterion("mp3url =", value));
</DeepExtract>
return (Criteria) this;
} | ReptilianDemo | positive | 437,519 |
@Test
void test1_segment_using_valueof() throws IOException {
String message = "MSH|^~\\&|hl7Integration|hl7Integration|||||ADT^A01|||2.3|\r" + "EVN|A01|20130617154644\r" + "PID|1|465 306 5961|000010016^^^MR~000010017^^^MR~000010018^^^MR|407623|Wood^Patrick^^^MR||19700101|female|||High Street^^Oxford^^Ox1 4DP~George St... | @Test
void test1_segment_using_valueof() throws IOException {
String message = "MSH|^~\\&|hl7Integration|hl7Integration|||||ADT^A01|||2.3|\r" + "EVN|A01|20130617154644\r" + "PID|1|465 306 5961|000010016^^^MR~000010017^^^MR~000010018^^^MR|407623|Wood^Patrick^^^MR||19700101|female|||High Street^^Oxford^^Ox1 4DP~George St... | hl7v2-fhir-converter | positive | 437,521 |
private static byte[] encodeUrnUuid(String urn, int position, ByteBuffer bb) {
String uuidString = urn.substring(position, urn.length());
try {
uuid = UUID.fromString(uuidString);
} catch (IllegalArgumentException e) {
return null;
}
bb.order(ByteOrder.BIG_ENDIAN);
bb.putLong(uuid.getMostSignificantBits());
bb.putLong(... | private static byte[] encodeUrnUuid(String urn, int position, ByteBuffer bb) {
String uuidString = urn.substring(position, urn.length());
try {
uuid = UUID.fromString(uuidString);
} catch (IllegalArgumentException e) {
return null;
}
bb.order(ByteOrder.BIG_ENDIAN);
bb.putLong(uuid.getMostSignificantBits());
bb.putLong(... | physical-web | positive | 437,523 |
public Group build(User owner) {
Group group = new Group();
this.id = id;
this.name = name;
this.description = description;
this.picture = picture;
this.notifyLevel = notifyLevel;
this.joinAt = joinAt;
this.modifyAt = modifyAt;
group.setOwner(owner);
return group;
} | public Group build(User owner) {
Group group = new Group();
this.id = id;
this.name = name;
this.description = description;
this.picture = picture;
this.notifyLevel = notifyLevel;
this.joinAt = joinAt;
<DeepExtract>
this.modifyAt = modifyAt;
</DeepExtract>
group.setOwner(owner);
return group;
} | ITalker | positive | 437,524 |
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if (mGrammarFactory instanceof TextFactory) {
MDImageSpan[] images = getImages();
for (MDImageSpan image : images) {
Drawable drawable = image.getDrawable();
if (drawable != null) {
unscheduleDrawable(drawable);
}
image.onDetach();
}
}
} | @Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
<DeepExtract>
if (mGrammarFactory instanceof TextFactory) {
MDImageSpan[] images = getImages();
for (MDImageSpan image : images) {
Drawable drawable = image.getDrawable();
if (drawable != null) {
unscheduleDrawable(drawable);
}
image.onDeta... | RxMarkdown | positive | 437,526 |
@Test
public void shouldParseMultipleHostAndPorts() {
parameters.put(HOSTNAMES, "10.5.5.27:9300,10.5.5.28:9301,10.5.5.29:9302");
fixture = new ElasticSearchSink();
hasContext = true;
String[] expected = { "10.5.5.27:9300", "10.5.5.28:9301", "10.5.5.29:9302" };
assertArrayEquals(expected, fixture.getServerAddresses());
... | @Test
public void shouldParseMultipleHostAndPorts() {
parameters.put(HOSTNAMES, "10.5.5.27:9300,10.5.5.28:9301,10.5.5.29:9302");
fixture = new ElasticSearchSink();
<DeepExtract>
hasContext = true;
</DeepExtract>
String[] expected = { "10.5.5.27:9300", "10.5.5.28:9301", "10.5.5.29:9302" };
assertArrayEquals(expected, fi... | JavaBigData | positive | 437,527 |
public void refresh() {
currentStudy.getAnonymizedStudy().refreshChildSeries(queryOrthanc);
this.currentStudy = currentStudy;
clear();
for (Serie serie : currentStudy.getAnonymizedStudy().getSeries()) {
addRow(new Object[] { serie.getSerieDescription(), serie.getModality(), String.valueOf(serie.getNbInstances()), Strin... | public void refresh() {
currentStudy.getAnonymizedStudy().refreshChildSeries(queryOrthanc);
<DeepExtract>
this.currentStudy = currentStudy;
clear();
for (Serie serie : currentStudy.getAnonymizedStudy().getSeries()) {
addRow(new Object[] { serie.getSerieDescription(), serie.getModality(), String.valueOf(serie.getNbInsta... | Orthanc_Tools | positive | 437,528 |
public void insertAt(int row, E[] values) {
if (row == mRowGapStart)
return;
if (row > mRowGapStart) {
int moving = row + mRowGapLength - (mRowGapStart + mRowGapLength);
for (int i = mRowGapStart + mRowGapLength; i < mRowGapStart + mRowGapLength + moving; i++) {
int destrow = i - (mRowGapStart + mRowGapLength) + mRowGa... | public void insertAt(int row, E[] values) {
<DeepExtract>
if (row == mRowGapStart)
return;
if (row > mRowGapStart) {
int moving = row + mRowGapLength - (mRowGapStart + mRowGapLength);
for (int i = mRowGapStart + mRowGapLength; i < mRowGapStart + mRowGapLength + moving; i++) {
int destrow = i - (mRowGapStart + mRowGapLe... | Jota-Text-Editor-old | positive | 437,529 |
@Override
public void onItemClick(int postion, BlogList.Blog item) {
if (item == null) {
return;
}
Intent i = new Intent(BlogListActivity.this, BlogActivity.class);
i.putExtra(BlogActivity.EXTRA_BLOG_URL, item.getUrl());
ActivityNavigator.startActivity(BlogListActivity.this, i);
} | @Override
public void onItemClick(int postion, BlogList.Blog item) {
<DeepExtract>
if (item == null) {
return;
}
Intent i = new Intent(BlogListActivity.this, BlogActivity.class);
i.putExtra(BlogActivity.EXTRA_BLOG_URL, item.getUrl());
ActivityNavigator.startActivity(BlogListActivity.this, i);
</DeepExtract>
} | AndroidBlog | positive | 437,530 |
public String getTargetMimetypeExt(String targetMimetype, String sourceMimetype) {
StringBuilder sb = new StringBuilder("");
if (ExtensionService.getExtensionForTargetMimetype(targetMimetype, sourceMimetype) == null) {
sb.append(targetMimetype);
} else {
sb.append(ExtensionService.getExtensionForTargetMimetype(targetMi... | public String getTargetMimetypeExt(String targetMimetype, String sourceMimetype) {
<DeepExtract>
StringBuilder sb = new StringBuilder("");
if (ExtensionService.getExtensionForTargetMimetype(targetMimetype, sourceMimetype) == null) {
sb.append(targetMimetype);
} else {
sb.append(ExtensionService.getExtensionForTargetMim... | alfresco-transform-core | positive | 437,531 |
public void setMaxProgress(final int maxProgress) {
this.maxProgress = maxProgress;
final float maxAbsSize = Math.min(getWidth(), getHeight()) / 2f;
final float absSize = size < maxSize ? maxAbsSize * size / maxSize : maxAbsSize - 1;
path.reset();
if (progress == 0) {
path.close();
} else if (progress < maxProgress) {
... | public void setMaxProgress(final int maxProgress) {
this.maxProgress = maxProgress;
<DeepExtract>
final float maxAbsSize = Math.min(getWidth(), getHeight()) / 2f;
final float absSize = size < maxSize ? maxAbsSize * size / maxSize : maxAbsSize - 1;
path.reset();
if (progress == 0) {
path.close();
} else if (progress < m... | litecoin-wallet | positive | 437,532 |
@Override
protected Void doInBackground() throws Exception {
start = System.currentTimeMillis();
SearchWorker searchWorker = new SearchWorker(1);
searchWorker.execute();
return searchWorker.get(RIDICULOUSLY_LONG_WAIT_TIME, TimeUnit.MILLISECONDS);
for (int tricksSearchDepth = 2; tricksSearchDepth <= ProductionSettings.g... | @Override
protected Void doInBackground() throws Exception {
start = System.currentTimeMillis();
<DeepExtract>
SearchWorker searchWorker = new SearchWorker(1);
searchWorker.execute();
return searchWorker.get(RIDICULOUSLY_LONG_WAIT_TIME, TimeUnit.MILLISECONDS);
</DeepExtract>
for (int tricksSearchDepth = 2; tricksSearch... | gnubridge | positive | 437,533 |
private boolean moveEarth() {
progress++;
Block affectedblock = location.clone().add(direction).getBlock();
location = location.add(direction);
if (Tools.isRegionProtectedFromBuild(player, Abilities.IceSpike, location))
return false;
for (Entity en : Tools.getEntitiesAroundPoint(location, 1.4)) {
if (en instanceof Livi... | private boolean moveEarth() {
progress++;
Block affectedblock = location.clone().add(direction).getBlock();
location = location.add(direction);
if (Tools.isRegionProtectedFromBuild(player, Abilities.IceSpike, location))
return false;
for (Entity en : Tools.getEntitiesAroundPoint(location, 1.4)) {
if (en instanceof Livi... | MinecraftTLA | positive | 437,535 |
private void initialiseOutgoingCall(Intent intent) {
if (getCurrentCall() != null) {
getLogger().i("Attempting to initialise a second outgoing call but this is not currently supported");
startCallActivityForCurrentCall();
return;
}
mLogger.d("outgoingCall");
if (mPhoneAccount == null) {
mLogger.w("No sip account when t... | private void initialiseOutgoingCall(Intent intent) {
if (getCurrentCall() != null) {
getLogger().i("Attempting to initialise a second outgoing call but this is not currently supported");
startCallActivityForCurrentCall();
return;
}
mLogger.d("outgoingCall");
if (mPhoneAccount == null) {
mLogger.w("No sip account when t... | vialer-android | positive | 437,536 |
private void startBackgroundThread() {
backgroundThread = new HandlerThread("ocr_camera");
startBackgroundThread();
openCamera(preferredWidth, preferredHeight);
backgroundHandler = new Handler(backgroundThread.getLooper());
} | private void startBackgroundThread() {
backgroundThread = new HandlerThread("ocr_camera");
<DeepExtract>
startBackgroundThread();
openCamera(preferredWidth, preferredHeight);
</DeepExtract>
backgroundHandler = new Handler(backgroundThread.getLooper());
} | FaceLoginAndroid | positive | 437,539 |
public List<ACLMessage> getAgentAnswers(String msgId) {
QueryResults results = mind.getQueryResults("getAnswers", new Object[] { msgId, Variable.v, Variable.v });
Iterator<QueryResultsRow> iterator = results.iterator();
if (iterator.hasNext()) {
QueryResultsRow row = iterator.next();
List holders = (List) row.get("$ref... | public List<ACLMessage> getAgentAnswers(String msgId) {
<DeepExtract>
QueryResults results = mind.getQueryResults("getAnswers", new Object[] { msgId, Variable.v, Variable.v });
Iterator<QueryResultsRow> iterator = results.iterator();
if (iterator.hasNext()) {
QueryResultsRow row = iterator.next();
List holders = (List)... | drools-mas | positive | 437,541 |
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
Logger.log("onSizeChanged");
if (mIsVertical) {
mTransparentBitmap = Bitmap.createBitmap(h, w, Bitmap.Config.ARGB_4444);
} else {
mTransparentBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_4444);
}
m... | @Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
Logger.log("onSizeChanged");
if (mIsVertical) {
mTransparentBitmap = Bitmap.createBitmap(h, w, Bitmap.Config.ARGB_4444);
} else {
mTransparentBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_4444);
}
m... | SimpleImageEditor | positive | 437,542 |
public double[] arms(Object params, double[] xinit, int ninit, double[] xl, double[] xr, double[] convex, int npoint, boolean dometrop, double[] xprev, double[] xsamp, int nsamp, double[] qcent, double[] xcent, int ncent, int[] neval) throws Exception {
this.params = params;
Point pwork = new Point();
int msamp = 0;
fo... | public double[] arms(Object params, double[] xinit, int ninit, double[] xl, double[] xr, double[] convex, int npoint, boolean dometrop, double[] xprev, double[] xsamp, int nsamp, double[] qcent, double[] xcent, int ncent, int[] neval) throws Exception {
this.params = params;
Point pwork = new Point();
int msamp = 0;
fo... | promoss | positive | 437,543 |
@Override
public Vector3f findNearest(Vector3f point) {
float[] p = findNearest(v3fToFArr(point));
return new Vector3f(p[0], p[1], p[2]);
} | @Override
public Vector3f findNearest(Vector3f point) {
float[] p = findNearest(v3fToFArr(point));
<DeepExtract>
return new Vector3f(p[0], p[1], p[2]);
</DeepExtract>
} | gamioo | positive | 437,544 |
public static String encodePathSegment(String value) {
ArrayList<String> params = new ArrayList<String>();
boolean foundParam = false;
StringBuffer newSegment = new StringBuffer();
if (savePathParams(value, newSegment, params)) {
foundParam = true;
value = newSegment.toString();
}
String result = encodeFromArray(value,... | public static String encodePathSegment(String value) {
<DeepExtract>
ArrayList<String> params = new ArrayList<String>();
boolean foundParam = false;
StringBuffer newSegment = new StringBuffer();
if (savePathParams(value, newSegment, params)) {
foundParam = true;
value = newSegment.toString();
}
String result = encodeFr... | resteasy-mobile | positive | 437,545 |
public void tokenize2(String inputFile, String outputFile) {
List<String> result = new ArrayList<String>();
StringReader reader = new StringReader(inputFile);
if (TokenizerOptions.USE_SENTENCE_DETECTOR) {
try {
String[] sentences = sentenceDetector.detectSentences(reader);
for (String sentence : sentences) {
result.add... | public void tokenize2(String inputFile, String outputFile) {
<DeepExtract>
List<String> result = new ArrayList<String>();
StringReader reader = new StringReader(inputFile);
if (TokenizerOptions.USE_SENTENCE_DETECTOR) {
try {
String[] sentences = sentenceDetector.detectSentences(reader);
for (String sentence : sentences... | vn-nlp-libraries | positive | 437,547 |
@Override
public void doRenderLayer(@Nonnull EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
ItemStack itemstack = entitylivingbaseIn.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
if (itemstack.getIte... | @Override
public void doRenderLayer(@Nonnull EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
ItemStack itemstack = entitylivingbaseIn.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
if (itemstack.getIte... | ConstructsArmory | positive | 437,549 |
@Override
public void onCreate() {
super.onCreate();
mHandler = new Handler();
Intent intent = new Intent(this, FamiliarActivity.class);
int pendingIntentFlags = 0;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
pendingIntentFlags |= PendingIntent.FLAG_MUTABLE;
}
@SuppressLint("UnspecifiedI... | @Override
public void onCreate() {
super.onCreate();
mHandler = new Handler();
Intent intent = new Intent(this, FamiliarActivity.class);
int pendingIntentFlags = 0;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
pendingIntentFlags |= PendingIntent.FLAG_MUTABLE;
}
@SuppressLint("UnspecifiedI... | mtg-familiar | positive | 437,550 |
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch(position) {
case 0:
startActivity(new Intent(this, WebActivity.class));
break;
case 1:
startActivity(new Intent(this, CommonActivity.class).putExtra(TYPE_KEY, 0));
break;
case 2:
startActivity(new Intent(this, CommonActi... | @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
<DeepExtract>
switch(position) {
case 0:
startActivity(new Intent(this, WebActivity.class));
break;
case 1:
startActivity(new Intent(this, CommonActivity.class).putExtra(TYPE_KEY, 0));
break;
case 2:
startActivity(new Intent(th... | AgentWebX5 | positive | 437,551 |
@Nonnull
@Override
public Optional<String> extractDependee(@Nonnull Iterable<XmlElement> xmlElements, @Nonnull Optional<String> containedText) {
if (!containedText.isPresent()) {
return absent();
}
int lastDot = containedText.get().lastIndexOf('.');
if (lastDot < 1) {
return absent();
}
return of(containedText.get().su... | @Nonnull
@Override
public Optional<String> extractDependee(@Nonnull Iterable<XmlElement> xmlElements, @Nonnull Optional<String> containedText) {
<DeepExtract>
if (!containedText.isPresent()) {
return absent();
}
int lastDot = containedText.get().lastIndexOf('.');
if (lastDot < 1) {
return absent();
}
return of(containe... | deadcode4j | positive | 437,552 |
@BeforeEach
public void initCardData() {
int processNo = 0;
StepVerifier.create(repository.save(createSimpleArchivedCard(processNo++, firstPublisher, nowMinusThree, nowMinusTwo, nowMinusOne, login1, new String[] { "rte", "operator" }, new String[] { "entity1", "entity2" }))).expectNextCount(1).expectComplete().verify()... | @BeforeEach
public void initCardData() {
int processNo = 0;
StepVerifier.create(repository.save(createSimpleArchivedCard(processNo++, firstPublisher, nowMinusThree, nowMinusTwo, nowMinusOne, login1, new String[] { "rte", "operator" }, new String[] { "entity1", "entity2" }))).expectNextCount(1).expectComplete().verify()... | operatorfabric-core | positive | 437,553 |
public static void convertImageToBitmap(Image image, int width, int height, int[] output, byte[][] cachedYuvBytes) {
if (image == null)
return;
if (cachedYuvBytes == null || cachedYuvBytes.length != 3) {
cachedYuvBytes = new byte[3][];
}
Image.Plane[] planes = image.getPlanes();
for (int i = 0; i < planes.length; ++i) ... | public static void convertImageToBitmap(Image image, int width, int height, int[] output, byte[][] cachedYuvBytes) {
if (image == null)
return;
if (cachedYuvBytes == null || cachedYuvBytes.length != 3) {
cachedYuvBytes = new byte[3][];
}
Image.Plane[] planes = image.getPlanes();
for (int i = 0; i < planes.length; ++i) ... | Surviving-with-android | positive | 437,554 |
public void actionPerformed(ActionEvent e) {
java.io.File file = fileChooser.getSelectedFile();
dataPanel.toASCIIFile(file);
} | public void actionPerformed(ActionEvent e) {
<DeepExtract>
java.io.File file = fileChooser.getSelectedFile();
dataPanel.toASCIIFile(file);
</DeepExtract>
} | jmathplot | positive | 437,555 |
public static void main(String[] args) throws Exception {
JettyHTTPServerEngineFactory jettyHTTPServerEngineFactory = new JettyHTTPServerEngineFactory();
File keyStoreFile = new File(KEY_STORE_PATH_NAME);
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(new FileInputStream(keyStoreFile), KEY_STORE_PASS... | public static void main(String[] args) throws Exception {
<DeepExtract>
JettyHTTPServerEngineFactory jettyHTTPServerEngineFactory = new JettyHTTPServerEngineFactory();
File keyStoreFile = new File(KEY_STORE_PATH_NAME);
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(new FileInputStream(keyStoreFile), ... | chuidiang-ejemplos | positive | 437,557 |
public void setNeighbors(HashMap<Node<E>, Double> neighbors) {
TreeMap<Double, Node<E>> newCumulativeProbabilities = new TreeMap<>();
if (neighbors.size() != 0) {
double total = 0;
for (Node<E> n : neighbors.keySet()) {
newCumulativeProbabilities.put(total, n);
total += neighbors.get(n);
}
}
this.cumulativeProbabilitie... | public void setNeighbors(HashMap<Node<E>, Double> neighbors) {
<DeepExtract>
TreeMap<Double, Node<E>> newCumulativeProbabilities = new TreeMap<>();
if (neighbors.size() != 0) {
double total = 0;
for (Node<E> n : neighbors.keySet()) {
newCumulativeProbabilities.put(total, n);
total += neighbors.get(n);
}
}
this.cumulati... | bigquery-utils | positive | 437,558 |
public static void unwrap(File zip, File outputDir, NameMapper mapper) {
log.debug("Unwrapping '{}' into '{}'.", zip, outputDir);
iterate(zip, new Unwrapper(outputDir, mapper), null);
} | public static void unwrap(File zip, File outputDir, NameMapper mapper) {
log.debug("Unwrapping '{}' into '{}'.", zip, outputDir);
<DeepExtract>
iterate(zip, new Unwrapper(outputDir, mapper), null);
</DeepExtract>
} | zt-zip | positive | 437,561 |
public static int createcpuInfo(FlatBufferBuilder builder, long userTime, long niceTime, long systemTime, long idleTime, long ioWaitTime, long irqTime, long softIrqTime, float cpuUtilization, float ioUtilization, long cpuTime, int cpuNumber, byte offLine) {
builder.startObject(12);
builder.addLong(9, cpuTime, 0);
build... | public static int createcpuInfo(FlatBufferBuilder builder, long userTime, long niceTime, long systemTime, long idleTime, long ioWaitTime, long irqTime, long softIrqTime, float cpuUtilization, float ioUtilization, long cpuTime, int cpuNumber, byte offLine) {
builder.startObject(12);
builder.addLong(9, cpuTime, 0);
build... | OSMonitor | positive | 437,562 |
@Override
public void setInventorySlotContents(int i, ItemStack itemstack) {
this.contents = itemstack;
if (itemstack != null && itemstack.stackSize > this.getInventoryStackLimit()) {
itemstack.stackSize = this.getInventoryStackLimit();
}
super.markDirty();
if (worldObj != null && contents != null) {
itemEnt = new Enti... | @Override
public void setInventorySlotContents(int i, ItemStack itemstack) {
this.contents = itemstack;
if (itemstack != null && itemstack.stackSize > this.getInventoryStackLimit()) {
itemstack.stackSize = this.getInventoryStackLimit();
}
<DeepExtract>
super.markDirty();
if (worldObj != null && contents != null) {
item... | Artifacts | positive | 437,563 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
System.out.println("Screen selected: " + screencombo.getSelectedItem().toString());
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
for (int j = 0; j < gs.length; j++) {
if (gs[j].getID... | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
System.out.println("Screen selected: " + screencombo.getSelectedItem().toString());
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
for (int j = 0; j < gs.length; j++) {
i... | epicworship | positive | 437,564 |
public int popAt(int index) {
Stack stack = stacks.get(index);
int removed_item;
if (true)
removed_item = stack.pop();
else
removed_item = stack.removeBottom();
if (stack.isEmpty()) {
stacks.remove(index);
} else if (stacks.size() > index + 1) {
int v = leftShift(index + 1, false);
stack.push(v);
}
return removed_item;... | public int popAt(int index) {
<DeepExtract>
Stack stack = stacks.get(index);
int removed_item;
if (true)
removed_item = stack.pop();
else
removed_item = stack.removeBottom();
if (stack.isEmpty()) {
stacks.remove(index);
} else if (stacks.size() > index + 1) {
int v = leftShift(index + 1, false);
stack.push(v);
}
return... | ctci | positive | 437,565 |
public static <K, V> LongPollingMockConsumerSubject<K, V> assertTruth(final LongPollingMockConsumer<K, V> actual) {
Factory<LongPollingMockConsumerSubject<K, V>, LongPollingMockConsumer<K, V>> factory = LongPollingMockConsumerSubject.mockConsumers();
return assertAbout(factory).that(actual);
} | public static <K, V> LongPollingMockConsumerSubject<K, V> assertTruth(final LongPollingMockConsumer<K, V> actual) {
<DeepExtract>
Factory<LongPollingMockConsumerSubject<K, V>, LongPollingMockConsumer<K, V>> factory = LongPollingMockConsumerSubject.mockConsumers();
return assertAbout(factory).that(actual);
</DeepExtract... | parallel-consumer | positive | 437,568 |
@Override
public void onBindViewHolder(GroupViewHolder holder, int position) {
text.setText(mListItems.get(position).text);
} | @Override
public void onBindViewHolder(GroupViewHolder holder, int position) {
<DeepExtract>
text.setText(mListItems.get(position).text);
</DeepExtract>
} | SwipeRecyclerView | positive | 437,569 |
public SimpleObject search(RequestContext context) throws ResponseException {
Bookmark bookmark;
String since = context.getParameter("since");
if (since == null)
bookmark = null;
try {
bookmark = Bookmark.deserialize(since);
} catch (Exception e) {
throw new InvalidSearchException("Invalid bookmark \"" + since + "\": "... | public SimpleObject search(RequestContext context) throws ResponseException {
<DeepExtract>
Bookmark bookmark;
String since = context.getParameter("since");
if (since == null)
bookmark = null;
try {
bookmark = Bookmark.deserialize(since);
} catch (Exception e) {
throw new InvalidSearchException("Invalid bookmark \"" + ... | buendia | positive | 437,571 |
public Fenix orIsNull(String field, boolean match) {
if (match) {
this.source = this.source.setPrefix(SymbolConst.OR).setSymbol(true ? SymbolConst.IS_NULL : SymbolConst.IS_NOT_NULL);
new JavaSqlInfoBuilder(this.source).buildIsNullSql(field);
this.source.reset();
}
return this;
} | public Fenix orIsNull(String field, boolean match) {
<DeepExtract>
if (match) {
this.source = this.source.setPrefix(SymbolConst.OR).setSymbol(true ? SymbolConst.IS_NULL : SymbolConst.IS_NOT_NULL);
new JavaSqlInfoBuilder(this.source).buildIsNullSql(field);
this.source.reset();
}
return this;
</DeepExtract>
} | fenix | positive | 437,572 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.