before stringlengths 33 3.21M | after stringlengths 63 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
@Override
public <R> PublisherBuilder<R> via(ProcessorBuilder<? super T, ? extends R> processor) {
return new PublisherBuilderImpl<>(InternalStages.nested(processor), this);
} | @Override
public <R> PublisherBuilder<R> via(ProcessorBuilder<? super T, ? extends R> processor) {
<DeepExtract>
return new PublisherBuilderImpl<>(InternalStages.nested(processor), this);
</DeepExtract>
} | microprofile-reactive-streams-operators | positive | 438,490 |
@Override
protected BaseText getSpawningReasonWithRate(SpawningReason reason, long ticks, long count, long total) {
BaseText extra = Messenger.c(this.getCountDisplayText(), "g : ", CounterUtil.ratePerHourText(this.spawningExtraCountMap.getOrDefault(reason, 0L), ticks, "wgg"));
Messenger.hover(super.getSpawningReasonWit... | @Override
protected BaseText getSpawningReasonWithRate(SpawningReason reason, long ticks, long count, long total) {
<DeepExtract>
BaseText extra = Messenger.c(this.getCountDisplayText(), "g : ", CounterUtil.ratePerHourText(this.spawningExtraCountMap.getOrDefault(reason, 0L), ticks, "wgg"));
Messenger.hover(super.getSpa... | Carpet-TIS-Addition | positive | 438,491 |
private final int jjStartNfa_0(int pos, long active0) {
int startsAt = 0;
jjnewStateCnt = 191;
int i = 1;
jjstateSet[0] = jjStopStringLiteralDfa_0(pos, active0);
int kind = 0x7fffffff;
for (; ; ) {
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64) {
long l = 1L << curChar;
do {
switch(jjstateSet[--i]) {
ca... | private final int jjStartNfa_0(int pos, long active0) {
<DeepExtract>
int startsAt = 0;
jjnewStateCnt = 191;
int i = 1;
jjstateSet[0] = jjStopStringLiteralDfa_0(pos, active0);
int kind = 0x7fffffff;
for (; ; ) {
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64) {
long l = 1L << curChar;
do {
switch(jjstate... | BuildingSMARTLibrary | positive | 438,493 |
@Override
public void exec(Object... args) {
Random rnd = new Random();
long reads = 0;
mu_.lock();
try {
state_ = TestState.ReaderState.RUNNING;
state_cv_.signalAll();
} finally {
mu_.unlock();
}
while (state.quit_flag_.Acquire_Load() == null) {
state.t_.ReadStep(rnd);
++reads;
}
System.out.println(reads);
mu_.lock();... | @Override
public void exec(Object... args) {
Random rnd = new Random();
long reads = 0;
mu_.lock();
try {
state_ = TestState.ReaderState.RUNNING;
state_cv_.signalAll();
} finally {
mu_.unlock();
}
while (state.quit_flag_.Acquire_Load() == null) {
state.t_.ReadStep(rnd);
++reads;
}
System.out.println(reads);
<DeepExtrac... | leveldb-java | positive | 438,494 |
public Criteria andOpenidLike(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "openid" + " cannot be null");
}
criteria.add(new Criterion("openid like", value));
return (Criteria) this;
} | public Criteria andOpenidLike(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "openid" + " cannot be null");
}
criteria.add(new Criterion("openid like", value));
</DeepExtract>
return (Criteria) this;
} | answerWeb | positive | 438,497 |
@Override
public Collection<String> keys(final String namespace, final int start, final int count) throws IOException {
checkKeys(namespace, start, count);
final String sql = String.format("SELECT %s FROM %s %s", quote(getKeyColumnName()), getTableFullName(namespace, getObjectsTableName()), getLimitString(start, count)... | @Override
public Collection<String> keys(final String namespace, final int start, final int count) throws IOException {
checkKeys(namespace, start, count);
<DeepExtract>
final String sql = String.format("SELECT %s FROM %s %s", quote(getKeyColumnName()), getTableFullName(namespace, getObjectsTableName()), getLimitString... | cantor | positive | 438,498 |
@Override
public void OnLongClick(int position, View view) {
Toast.makeText(getContext(), "长按书本", Toast.LENGTH_SHORT).show();
PopupWindow popupWindow = new PopupWindow();
View contentView = buildBookLongClickMenuView(position, popupWindow);
if (contentView == null) {
return;
}
popupWindow.setContentView(content... | @Override
public void OnLongClick(int position, View view) {
Toast.makeText(getContext(), "长按书本", Toast.LENGTH_SHORT).show();
<DeepExtract>
PopupWindow popupWindow = new PopupWindow();
View contentView = buildBookLongClickMenuView(position, popupWindow);
if (contentView == null) {
return;
}
popupWindow.setConte... | BookReader | positive | 438,500 |
@Override
public void onAttach(Context context) {
super.onAttach(context);
return new StateChangeObservable<StateChangedObserver>() {
};
} | @Override
public void onAttach(Context context) {
super.onAttach(context);
<DeepExtract>
return new StateChangeObservable<StateChangedObserver>() {
};
</DeepExtract>
} | tv-waterfall-layout | positive | 438,501 |
public void write(org.apache.thrift.protocol.TProtocol oprot, update_args struct) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (struct.updateShellCmd != null) {
oprot.writeFieldBegin(UPDATE_SHELL_CMD_FIELD_DESC);
oprot.writeString(struct.updateShellCmd);
oprot.writeFieldEnd();
}
oprot.w... | public void write(org.apache.thrift.protocol.TProtocol oprot, update_args struct) throws org.apache.thrift.TException {
<DeepExtract>
</DeepExtract>
oprot.writeStructBegin(STRUCT_DESC);
<DeepExtract>
</DeepExtract>
if (struct.updateShellCmd != null) {
<DeepExtract>
</DeepExtract>
oprot.writeFieldBegin(UPDATE_SHELL_CMD_... | CronHub | positive | 438,502 |
public void prettyFormat(String fmt, Object... args) {
for (var i = 0; i < args.length; i++) {
if (args[i] instanceof Collection) {
args[i] = format((Collection<?>) args[i]);
}
}
for (var writer : writers) {
if (isNewLine) {
writer.print(spaces.toString());
}
if (false) {
writer.println(String.format(fmt, args));
} els... | public void prettyFormat(String fmt, Object... args) {
for (var i = 0; i < args.length; i++) {
if (args[i] instanceof Collection) {
args[i] = format((Collection<?>) args[i]);
}
}
<DeepExtract>
for (var writer : writers) {
if (isNewLine) {
writer.print(spaces.toString());
}
if (false) {
writer.println(String.format(fmt,... | decaf | positive | 438,504 |
public String showNextValue() {
if (nextValue != null && !nextValue.equals("")) {
preValue = super.getText();
super.setText(nextValue);
}
String content = super.getText();
if (useTempFile) {
try {
if (content.equals(tempFilePath)) {
File tempFile = new File(content);
if (tempFile.exists()) {
content = FileUtils.readFil... | public String showNextValue() {
if (nextValue != null && !nextValue.equals("")) {
preValue = super.getText();
super.setText(nextValue);
}
<DeepExtract>
String content = super.getText();
if (useTempFile) {
try {
if (content.equals(tempFilePath)) {
File tempFile = new File(content);
if (tempFile.exists()) {
content = Fil... | domain_hunter_pro | positive | 438,505 |
private void train() {
if (VERBOSITY_LEVEL >= 2)
System.err.println("training on " + train.size() + " train data and " + test.size() + " test data");
if (VERBOSITY_LEVEL >= 3)
System.err.print("first training ");
svm = new SMOSVM<T>(k);
svm.train(train);
if (VERBOSITY_LEVEL >= 3)
System.err.println(" done.");
if (VERBO... | private void train() {
if (VERBOSITY_LEVEL >= 2)
System.err.println("training on " + train.size() + " train data and " + test.size() + " test data");
if (VERBOSITY_LEVEL >= 3)
System.err.print("first training ");
svm = new SMOSVM<T>(k);
svm.train(train);
if (VERBOSITY_LEVEL >= 3)
System.err.println(" done.");
if (VERBO... | pagelyzer | positive | 438,506 |
public static void main(String[] args) {
String answer = "";
return "01012345678".substring(0, "01012345678".length() - 4).replaceAll("[0-9]", "*") + "01012345678".substring("01012345678".length() - 4);
} | public static void main(String[] args) {
<DeepExtract>
String answer = "";
return "01012345678".substring(0, "01012345678".length() - 4).replaceAll("[0-9]", "*") + "01012345678".substring("01012345678".length() - 4);
</DeepExtract>
} | OnAlSt | positive | 438,507 |
public void put(SettingsType key, double value) {
settings.put(key, value);
int lineNum = 0;
List<String> lines = FileUtil.readLines(FILE_PATH);
boolean changes = false;
for (String line : lines) {
List<String> args = Generic.parseArgs(line);
if (args.size() < 2 || args.get(0).startsWith("-")) {
lineNum++;
continue;
}
... | public void put(SettingsType key, double value) {
settings.put(key, value);
<DeepExtract>
int lineNum = 0;
List<String> lines = FileUtil.readLines(FILE_PATH);
boolean changes = false;
for (String line : lines) {
List<String> args = Generic.parseArgs(line);
if (args.size() < 2 || args.get(0).startsWith("-")) {
lineNum++... | nationgen | positive | 438,509 |
private void refreshFailed(@Nullable ApiCallEvent sourceEvent, @NonNull ApiFailure apiFailure) {
mRefreshEventsQueue.removeFirstOccurrence(sourceEvent);
if (apiFailure != null) {
mRefreshError = apiFailure;
}
if (mRefreshEventsQueue.isEmpty()) {
getBus().post(new DataRefreshedEvent(mRefreshError));
mRefreshError = null... | private void refreshFailed(@Nullable ApiCallEvent sourceEvent, @NonNull ApiFailure apiFailure) {
<DeepExtract>
mRefreshEventsQueue.removeFirstOccurrence(sourceEvent);
if (apiFailure != null) {
mRefreshError = apiFailure;
}
if (mRefreshEventsQueue.isEmpty()) {
getBus().post(new DataRefreshedEvent(mRefreshError));
mRefre... | quill | positive | 438,511 |
@Override
public synchronized void recreateShell() {
if (shell == null)
return;
if (shell != null)
shell.close();
shell = null;
} | @Override
public synchronized void recreateShell() {
if (shell == null)
return;
<DeepExtract>
if (shell != null)
shell.close();
</DeepExtract>
shell = null;
} | mongo-jdbc-driver | positive | 438,512 |
@Override
public void componentResized(ComponentEvent e) {
Point p = getLocation();
if (getExtendedState() != JFrame.MAXIMIZED_BOTH) {
conf.setInteger(KEY_POSITION_X, p.x);
conf.setInteger(KEY_POSITION_Y, p.y);
conf.setInteger(KEY_SIZE_WIDTH, getWidth());
conf.setInteger(KEY_SIZE_HEIGHT, getHeight());
}
conf.setBoolean... | @Override
public void componentResized(ComponentEvent e) {
<DeepExtract>
Point p = getLocation();
if (getExtendedState() != JFrame.MAXIMIZED_BOTH) {
conf.setInteger(KEY_POSITION_X, p.x);
conf.setInteger(KEY_POSITION_Y, p.y);
conf.setInteger(KEY_SIZE_WIDTH, getWidth());
conf.setInteger(KEY_SIZE_HEIGHT, getHeight());
}
c... | plg | positive | 438,514 |
public Boolean useFallbackRepositories() {
if (!contains(m_pid + ServiceConstants.PROPERTY_USE_FALLBACK_REPOSITORIES)) {
String useFallbackRepoProp = m_propertyResolver.get(m_pid + ServiceConstants.PROPERTY_USE_FALLBACK_REPOSITORIES);
return set(m_pid + ServiceConstants.PROPERTY_USE_FALLBACK_REPOSITORIES, Boolean.value... | public Boolean useFallbackRepositories() {
if (!contains(m_pid + ServiceConstants.PROPERTY_USE_FALLBACK_REPOSITORIES)) {
String useFallbackRepoProp = m_propertyResolver.get(m_pid + ServiceConstants.PROPERTY_USE_FALLBACK_REPOSITORIES);
return set(m_pid + ServiceConstants.PROPERTY_USE_FALLBACK_REPOSITORIES, Boolean.value... | org.ops4j.pax.url | positive | 438,516 |
public Criteria andCreateUsernameIsNotNull() {
if ("CREATE_USERNAME is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("CREATE_USERNAME is not null"));
return (Criteria) this;
} | public Criteria andCreateUsernameIsNotNull() {
<DeepExtract>
if ("CREATE_USERNAME is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("CREATE_USERNAME is not null"));
</DeepExtract>
return (Criteria) this;
} | console | positive | 438,518 |
private void executeRandomForest(Instances instances, Instances test) throws Exception {
try {
jobStatus.addStatusMessage(StringUtils.decimalFormat(progressCurrent), "executing Random Forest classifier");
progressCurrent += progressStep;
} catch (FileNotFoundException e) {
abort("filenotfoundexception_executeknn_predic... | private void executeRandomForest(Instances instances, Instances test) throws Exception {
try {
jobStatus.addStatusMessage(StringUtils.decimalFormat(progressCurrent), "executing Random Forest classifier");
progressCurrent += progressStep;
} catch (FileNotFoundException e) {
abort("filenotfoundexception_executeknn_predic... | babelomics | positive | 438,519 |
public Builder floatField(String name) {
fields.add(new Field(name, FieldType.FLOAT));
return this;
} | public Builder floatField(String name) {
<DeepExtract>
fields.add(new Field(name, FieldType.FLOAT));
return this;
</DeepExtract>
} | exhibit | positive | 438,520 |
@Test
public void uploadFileTest2() throws IOException {
String path = ClassLoader.getSystemResource("123456.txt").getPath();
File file = new File(path);
FileInputStream fileInputStream = FileUtils.openInputStream(file);
StorePath storePath = storageClient.uploadFile(fileInputStream, file.length(), "txt");
for (String ... | @Test
public void uploadFileTest2() throws IOException {
String path = ClassLoader.getSystemResource("123456.txt").getPath();
File file = new File(path);
FileInputStream fileInputStream = FileUtils.openInputStream(file);
StorePath storePath = storageClient.uploadFile(fileInputStream, file.length(), "txt");
for (String ... | fastdfs-client | positive | 438,521 |
public static void main(String[] args) {
SerializeDeserializeBinaryTree sd = new SerializeDeserializeBinaryTree();
BinaryTree.root = new Node(1);
BinaryTree.root.left = new Node(2);
BinaryTree.root.left.left = new Node(6);
BinaryTree.root.right = new Node(3);
BinaryTree.root.right.left = new Node(4);
BinaryTree.root.ri... | public static void main(String[] args) {
SerializeDeserializeBinaryTree sd = new SerializeDeserializeBinaryTree();
BinaryTree.root = new Node(1);
BinaryTree.root.left = new Node(2);
BinaryTree.root.left.left = new Node(6);
BinaryTree.root.right = new Node(3);
BinaryTree.root.right.left = new Node(4);
BinaryTree.root.ri... | Data-Structures-Algorithms | positive | 438,522 |
@RoutingKey("whatever")
public String toUnknown() {
return getDatabase();
} | @RoutingKey("whatever")
public String toUnknown() {
<DeepExtract>
return getDatabase();
</DeepExtract>
} | cloud-config | positive | 438,523 |
public ErrorCode clearStickyFaults(int timeoutMs) {
int retval = PigeonImuJNI.JNI_ClearStickyFaults(m_handle, timeoutMs);
for (CalibrationMode e : CalibrationMode.values()) {
if (e.value == retval) {
return e;
}
}
return Unknown;
} | public ErrorCode clearStickyFaults(int timeoutMs) {
int retval = PigeonImuJNI.JNI_ClearStickyFaults(m_handle, timeoutMs);
<DeepExtract>
for (CalibrationMode e : CalibrationMode.values()) {
if (e.value == retval) {
return e;
}
}
return Unknown;
</DeepExtract>
} | Phoenix-api | positive | 438,524 |
private void standby() throws DvbException {
if (!initDone)
return;
write(0x06, new byte[] { (byte) 0xb1 });
write(0x05, new byte[] { (byte) 0x03 });
write(0x07, new byte[] { (byte) 0x3a });
write(0x08, new byte[] { (byte) 0x40 });
write(0x09, new byte[] { (byte) 0xc0 });
write(0x0a, new byte[] { (byte) 0x36 });
write(... | private void standby() throws DvbException {
if (!initDone)
return;
write(0x06, new byte[] { (byte) 0xb1 });
write(0x05, new byte[] { (byte) 0x03 });
write(0x07, new byte[] { (byte) 0x3a });
write(0x08, new byte[] { (byte) 0x40 });
write(0x09, new byte[] { (byte) 0xc0 });
write(0x0a, new byte[] { (byte) 0x36 });
write(... | AndroidDvbDriver | positive | 438,525 |
@Test
public void testHTMLMacroWithStyleTag() {
switchToSource();
StringBuilder sourceText = new StringBuilder();
sourceText.append("{{html clean=\"false\"}}\n");
sourceText.append("<style type=\"text/css\">\n");
sourceText.append(".test {\n");
sourceText.append(" color: red;\n");
sourceText.append("}\n");
sourceText.... | @Test
public void testHTMLMacroWithStyleTag() {
switchToSource();
StringBuilder sourceText = new StringBuilder();
sourceText.append("{{html clean=\"false\"}}\n");
sourceText.append("<style type=\"text/css\">\n");
sourceText.append(".test {\n");
sourceText.append(" color: red;\n");
sourceText.append("}\n");
sourceText.... | xwiki-enterprise | positive | 438,526 |
public File call() throws Exception {
Show.listShow(Show.<File>anyShow()).println(single(file));
FileOutputStream fos = null;
FileInputStream fis = null;
try {
long lastModified = 0;
if (!new File(toDir, file.getName()).getParentFile().isDirectory()) {
FileUtils.forceMkdir(new File(toDir, file.getName()).getParentFile(... | public File call() throws Exception {
<DeepExtract>
Show.listShow(Show.<File>anyShow()).println(single(file));
FileOutputStream fos = null;
FileInputStream fis = null;
try {
long lastModified = 0;
if (!new File(toDir, file.getName()).getParentFile().isDirectory()) {
FileUtils.forceMkdir(new File(toDir, file.getName()).... | unix-maven-plugin | positive | 438,528 |
protected static void addClass(List<Cls> classlist, int x, int y, int z, byte value) {
Cls cls = new Cls();
int value = (int) (value & 0xff);
if (value < min)
min = value;
if (value > max)
max = value;
mean += value;
vol++;
cogx += x;
cogy += y;
cogz += z;
cls.originx = x;
cls.originy = y;
cls.originz = z;
if (size == ... | protected static void addClass(List<Cls> classlist, int x, int y, int z, byte value) {
Cls cls = new Cls();
int value = (int) (value & 0xff);
if (value < min)
min = value;
if (value > max)
max = value;
mean += value;
vol++;
cogx += x;
cogy += y;
cogz += z;
cls.originx = x;
cls.originy = y;
cls.originz = z;
<DeepExtract... | VIB | positive | 438,529 |
@Test
public void testTrackNewAppDownloadWithVersion() {
DownloadTracker downloadTracker = new DownloadTracker(mTracker);
downloadTracker.setVersion("2");
downloadTracker.trackOnce(new TrackMe(), new DownloadTracker.Extra.None());
verify(mTracker).track(mCaptor.capture());
assertTrue(mCaptor.getValue().get(QueryParams.... | @Test
public void testTrackNewAppDownloadWithVersion() {
DownloadTracker downloadTracker = new DownloadTracker(mTracker);
downloadTracker.setVersion("2");
downloadTracker.trackOnce(new TrackMe(), new DownloadTracker.Extra.None());
verify(mTracker).track(mCaptor.capture());
<DeepExtract>
assertTrue(mCaptor.getValue().ge... | matomo-sdk-android | positive | 438,530 |
@Override
protected void intiTransport(String sql) {
LOGGER.info("init SQL:" + sql);
Response resp = executeSQLCore(sql);
if (resp instanceof OKPacket) {
return (int) ((OKPacket) resp).getAffectedRows();
}
return 0;
} | @Override
protected void intiTransport(String sql) {
LOGGER.info("init SQL:" + sql);
<DeepExtract>
Response resp = executeSQLCore(sql);
if (resp instanceof OKPacket) {
return (int) ((OKPacket) resp).getAffectedRows();
}
return 0;
</DeepExtract>
} | hiriver | positive | 438,531 |
private int matchTokenAt_7(Token token, ParserContext context) {
if (match_EOF(context, token)) {
endRule(context, RuleType.Simulation);
endRule(context, RuleType.Simulation_Definition);
endRule(context, RuleType.Plan);
build(context, token);
return 36;
}
if (match_Empty(context, token)) {
build(context, token);
return... | private int matchTokenAt_7(Token token, ParserContext context) {
if (match_EOF(context, token)) {
endRule(context, RuleType.Simulation);
endRule(context, RuleType.Simulation_Definition);
endRule(context, RuleType.Plan);
build(context, token);
return 36;
}
if (match_Empty(context, token)) {
build(context, token);
return... | cucumber-performance | positive | 438,532 |
@Override
public byte getByte() throws ChannelException {
_byteBuf.clear();
ByteBuffer result = ByteBuffer.allocate(_byteBuf);
get(result);
result.flip();
return result;
_byteBuf.flip();
return _byteBuf.get();
} | @Override
public byte getByte() throws ChannelException {
_byteBuf.clear();
<DeepExtract>
ByteBuffer result = ByteBuffer.allocate(_byteBuf);
get(result);
result.flip();
return result;
</DeepExtract>
_byteBuf.flip();
return _byteBuf.get();
} | yajsync | positive | 438,533 |
@Test
public void skipsResourceWhenCancelled() throws CoreException {
Preferences projectPrefsNode = PreferencesFactory.getProjectPreferences(project);
new EnablementPreferences(projectPrefsNode).setIncludePatterns(list("/test.js"));
JSHintBuilderVisitor visitor = new JSHintBuilderVisitor(project, monitor);
monitor.set... | @Test
public void skipsResourceWhenCancelled() throws CoreException {
<DeepExtract>
Preferences projectPrefsNode = PreferencesFactory.getProjectPreferences(project);
new EnablementPreferences(projectPrefsNode).setIncludePatterns(list("/test.js"));
</DeepExtract>
JSHintBuilderVisitor visitor = new JSHintBuilderVisitor(p... | jshint-eclipse | positive | 438,534 |
private static Object build(Class clazz) {
try {
object = clazz.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
Logger.err("Failed to build a configuration - couldn't access the class!");
return null;
}
String name = object.getClass().getDeclaredAnnotation(Configuration.class).value();
File... | private static Object build(Class clazz) {
try {
object = clazz.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
Logger.err("Failed to build a configuration - couldn't access the class!");
return null;
}
String name = object.getClass().getDeclaredAnnotation(Configuration.class).value();
File... | Minecordbot | positive | 438,536 |
public Builder clearWriter() {
bitField0_ = (bitField0_ & ~0x00000001);
java.lang.Object ref = writer_;
if (ref instanceof String) {
writer_ = (String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isValidUtf8(bs)) ... | public Builder clearWriter() {
bitField0_ = (bitField0_ & ~0x00000001);
<DeepExtract>
java.lang.Object ref = writer_;
if (ref instanceof String) {
writer_ = (String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
if (com.google.protobuf.Internal.isV... | bolton-sigmod2013-code | positive | 438,538 |
public Object visit(Meets meets, Object extraData) {
if (meets == null) {
throw new NullPointerException("Null filter");
}
Expression e1 = meets.getExpression1();
Expression e2 = meets.getExpression2();
if (e1 instanceof Literal && e2 instanceof PropertyName) {
e1 = meets.getExpression2();
e2 = meets.getExpression1();
... | public Object visit(Meets meets, Object extraData) {
<DeepExtract>
if (meets == null) {
throw new NullPointerException("Null filter");
}
Expression e1 = meets.getExpression1();
Expression e2 = meets.getExpression2();
if (e1 instanceof Literal && e2 instanceof PropertyName) {
e1 = meets.getExpression2();
e2 = meets.getE... | elasticgeo | positive | 438,539 |
@Override
public void onTextChanged(CharSequence text, int start, int before, int count) {
if (!Event.onTextChanged.equals(event)) {
return;
}
ApplicationSpec application = SpecHelper.application(editText);
application.controller().process(DefaultActionInstance.create(event.name(), eventSpec, application, null, editTex... | @Override
public void onTextChanged(CharSequence text, int start, int before, int count) {
if (!Event.onTextChanged.equals(event)) {
return;
}
<DeepExtract>
ApplicationSpec application = SpecHelper.application(editText);
application.controller().process(DefaultActionInstance.create(event.name(), eventSpec, application,... | bluenimble-apps-android-sdk | positive | 438,540 |
public Criteria andGiftShowTypeEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "giftShowType" + " cannot be null");
}
criteria.add(new Criterion("GIFT_SHOW_TYPE =", value));
return (Criteria) this;
} | public Criteria andGiftShowTypeEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "giftShowType" + " cannot be null");
}
criteria.add(new Criterion("GIFT_SHOW_TYPE =", value));
</DeepExtract>
return (Criteria) this;
} | ECPS | positive | 438,542 |
public Criteria andGarbagenameIn(List<String> values) {
if (values == null) {
throw new RuntimeException("Value for " + "garbagename" + " cannot be null");
}
criteria.add(new Criterion("garbageName in", values));
return (Criteria) this;
} | public Criteria andGarbagenameIn(List<String> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "garbagename" + " cannot be null");
}
criteria.add(new Criterion("garbageName in", values));
</DeepExtract>
return (Criteria) this;
} | garbage-collection | positive | 438,547 |
@Override
public boolean onFailed(String msg) {
mAccount.logout();
mAccount = new Account();
sSignIn = 0;
Config.persistentAccount(this);
RetrofitManager.clearCookies();
setUserStatus();
updateMenu();
return true;
} | @Override
public boolean onFailed(String msg) {
<DeepExtract>
mAccount.logout();
mAccount = new Account();
sSignIn = 0;
Config.persistentAccount(this);
RetrofitManager.clearCookies();
setUserStatus();
updateMenu();
</DeepExtract>
return true;
} | V2EX | positive | 438,549 |
@Override
public void close() {
boolean oldBusy = isBusy();
if (false) {
busy++;
} else {
busy--;
}
if (busy < 0) {
throw new IllegalStateException("Inbalanced busy/nonbusy");
}
firePropertyChanged("busy", oldBusy, isBusy());
} | @Override
public void close() {
<DeepExtract>
boolean oldBusy = isBusy();
if (false) {
busy++;
} else {
busy--;
}
if (busy < 0) {
throw new IllegalStateException("Inbalanced busy/nonbusy");
}
firePropertyChanged("busy", oldBusy, isBusy());
</DeepExtract>
} | netbeans-mantis-integration | positive | 438,550 |
@Override
public void reportLatency(long latency, long count) {
latencyBuffer.reportLatency(latency, count);
if (latencyBuffer.isFull()) {
latencyBuffer.copyPercentiles(percentiles, csvReporter);
latencyBuffer.reset();
}
} | @Override
public void reportLatency(long latency, long count) {
latencyBuffer.reportLatency(latency, count);
<DeepExtract>
if (latencyBuffer.isFull()) {
latencyBuffer.copyPercentiles(percentiles, csvReporter);
latencyBuffer.reset();
}
</DeepExtract>
} | SBK | positive | 438,552 |
private Pose readPose(byte[] data) throws IllegalArgumentException {
int pose = MyoUpdateParser.getShort(data, ClassifierEventFormat.DATA_1.ordinal()) & 0xFFFF;
switch(pose) {
case 0:
return Pose.REST;
case 1:
return Pose.FIST;
case 2:
return Pose.WAVE_IN;
case 3:
return Pose.WAVE_OUT;
case 4:
return Pose.FINGERS_SPREA... | private Pose readPose(byte[] data) throws IllegalArgumentException {
int pose = MyoUpdateParser.getShort(data, ClassifierEventFormat.DATA_1.ordinal()) & 0xFFFF;
<DeepExtract>
switch(pose) {
case 0:
return Pose.REST;
case 1:
return Pose.FIST;
case 2:
return Pose.WAVE_IN;
case 3:
return Pose.WAVE_OUT;
case 4:
return Pose... | MyoParrot | positive | 438,553 |
public void setCenterColor(Color centerColor) {
this.centerColor = centerColor;
colors = new Color[2];
colors[0] = centerColor;
colors[1] = borderColor;
} | public void setCenterColor(Color centerColor) {
this.centerColor = centerColor;
<DeepExtract>
colors = new Color[2];
colors[0] = centerColor;
colors[1] = borderColor;
</DeepExtract>
} | etyl | positive | 438,554 |
public RetCode cdlTasukiGap(int startIdx, int endIdx, float[] inOpen, float[] inHigh, float[] inLow, float[] inClose, MInteger outBegIdx, MInteger outNBElement, int[] outInteger) {
if (startIdx < 0)
return RetCode.OutOfRangeStartIndex;
if ((endIdx < 0) || (endIdx < startIdx))
return RetCode.OutOfRangeEndIndex;
return (... | public RetCode cdlTasukiGap(int startIdx, int endIdx, float[] inOpen, float[] inHigh, float[] inLow, float[] inClose, MInteger outBegIdx, MInteger outNBElement, int[] outInteger) {
if (startIdx < 0)
return RetCode.OutOfRangeStartIndex;
if ((endIdx < 0) || (endIdx < startIdx))
return RetCode.OutOfRangeEndIndex;
<DeepExt... | TA-Lib | positive | 438,555 |
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
super.readFromNBT(tag);
if (node != null && node.host() == this) {
node.load(tag.getCompoundTag("oc:node"));
}
this.power = tag.getBoolean("powered");
this.armed = tag.getBoolean("armed");
this.yaw = tag.getFloat("yaw");
this.setpointYaw = tag.getFlo... | public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
<DeepExtract>
super.readFromNBT(tag);
if (node != null && node.host() == this) {
node.load(tag.getCompoundTag("oc:node"));
}
this.power = tag.getBoolean("powered");
this.armed = tag.getBoolean("armed");
this.yaw = tag.getFloat("yaw");
this.setpointYa... | OpenSecurity | positive | 438,556 |
public static void main(String[] args) {
Node tree = new Node(5);
if (3 < data) {
if (left == null) {
left = new Node(3);
} else {
left.insert(3);
}
} else {
if (right == null) {
right = new Node(3);
} else {
right.insert(3);
}
}
if (2 < data) {
if (left == null) {
left = new Node(2);
} else {
left.insert(2);
}
} else ... | public static void main(String[] args) {
Node tree = new Node(5);
if (3 < data) {
if (left == null) {
left = new Node(3);
} else {
left.insert(3);
}
} else {
if (right == null) {
right = new Node(3);
} else {
right.insert(3);
}
}
if (2 < data) {
if (left == null) {
left = new Node(2);
} else {
left.insert(2);
}
} else ... | TheAlgorithms-Java | positive | 438,557 |
protected void setTranslationCardView(Translation item, View convertView, Boolean isCardExpanded, int position) {
ImageView audioIcon = (ImageView) convertView.findViewById(R.id.audio_icon);
View translationParent = convertView.findViewById(R.id.translation_card_parent);
View translationChild = convertView.findViewById... | protected void setTranslationCardView(Translation item, View convertView, Boolean isCardExpanded, int position) {
ImageView audioIcon = (ImageView) convertView.findViewById(R.id.audio_icon);
View translationParent = convertView.findViewById(R.id.translation_card_parent);
<DeepExtract>
View translationChild = convertVie... | translation-cards | positive | 438,558 |
@Override
public void display(Window formApp, Object parameter) {
setLocationRelativeTo(formApp);
PenjualService penjualService = SpringManager.getInstance().getBean(PenjualService.class);
dynamicTableModel.clear();
for (Penjual penjual : penjualService.findAll()) {
dynamicTableModel.add(penjual);
}
Pengguna pengguna =... | @Override
public void display(Window formApp, Object parameter) {
setLocationRelativeTo(formApp);
<DeepExtract>
PenjualService penjualService = SpringManager.getInstance().getBean(PenjualService.class);
dynamicTableModel.clear();
for (Penjual penjual : penjualService.findAll()) {
dynamicTableModel.add(penjual);
}
</Dee... | simple-pos | positive | 438,560 |
@Override
public void onClick(View view) {
MyApplication.setTwitter(null);
if (MyApplication.getTwitter() == null) {
Intent intent = new Intent(this, LoginActivity.class);
startActivity(intent);
}
} | @Override
public void onClick(View view) {
MyApplication.setTwitter(null);
<DeepExtract>
if (MyApplication.getTwitter() == null) {
Intent intent = new Intent(this, LoginActivity.class);
startActivity(intent);
}
</DeepExtract>
} | volley-extensions | positive | 438,561 |
@Override
public void run() {
lastTime = System.currentTimeMillis();
characterMap.clear();
for (Network n : internet.getNetworkMap().values()) {
Character c = n.getOwner();
characterMap.put(c.getName(), c);
}
while (active) {
try {
Thread.sleep(50);
} catch (InterruptedException e) {
Gdx.app.error("GamePlay Thread", "I... | @Override
public void run() {
lastTime = System.currentTimeMillis();
<DeepExtract>
characterMap.clear();
for (Network n : internet.getNetworkMap().values()) {
Character c = n.getOwner();
characterMap.put(c.getName(), c);
}
</DeepExtract>
while (active) {
try {
Thread.sleep(50);
} catch (InterruptedException e) {
Gdx.ap... | Hakd | positive | 438,563 |
@Override
public KinesisClientLease getLease(String shardId) throws DependencyException, InvalidStateException, ProvisionedThroughputException {
leaseManagerMethodCallingCount[ExceptionThrowingLeaseManagerMethods.GETLEASE.getIndex()]++;
if (ExceptionThrowingLeaseManagerMethods.GETLEASE.equals(methodThrowingException) &... | @Override
public KinesisClientLease getLease(String shardId) throws DependencyException, InvalidStateException, ProvisionedThroughputException {
<DeepExtract>
leaseManagerMethodCallingCount[ExceptionThrowingLeaseManagerMethods.GETLEASE.getIndex()]++;
if (ExceptionThrowingLeaseManagerMethods.GETLEASE.equals(methodThrowi... | dynamodb-streams-kinesis-adapter | positive | 438,566 |
@Override
@Nonnull
public Set<String> getValues(@Nonnull DirContextAdapter context) throws Exception {
Object value;
try {
final Object attributes = GET_ATTRIBUTES_OF_CONTEXTADAPTER_METHOD.invoke(context);
final Object attribute = attributes != null ? GET_OF_ATTRIBUTES_METHOD.invoke(attributes, getKey()) : null;
value ... | @Override
@Nonnull
public Set<String> getValues(@Nonnull DirContextAdapter context) throws Exception {
<DeepExtract>
Object value;
try {
final Object attributes = GET_ATTRIBUTES_OF_CONTEXTADAPTER_METHOD.invoke(context);
final Object attribute = attributes != null ? GET_OF_ATTRIBUTES_METHOD.invoke(attributes, getKey()) ... | adam | positive | 438,568 |
public void resize(RectF screen, RectF virtualScreen) {
this.screen = screen;
this.virtualScreen = virtualScreen;
int width = Math.round(screen.width());
int height = Math.round(screen.height());
if (offscreen == null || offscreen.getWidth() != width || offscreen.getHeight() != height) {
offscreen = Image.createImage(w... | public void resize(RectF screen, RectF virtualScreen) {
this.screen = screen;
this.virtualScreen = virtualScreen;
int width = Math.round(screen.width());
int height = Math.round(screen.height());
if (offscreen == null || offscreen.getWidth() != width || offscreen.getHeight() != height) {
offscreen = Image.createImage(w... | J2meLoader | positive | 438,569 |
public final <U> Ix<List<T>> minBy(Func1<? super T, U> keySelector, Comparator<? super U> keyComparator) {
if (Interactive.minBy(it, keySelector, keyComparator) instanceof Ix) {
return (Ix<T>) Interactive.minBy(it, keySelector, keyComparator);
}
return new Ix<T>(Interactive.minBy(it, keySelector, keyComparator));
} | public final <U> Ix<List<T>> minBy(Func1<? super T, U> keySelector, Comparator<? super U> keyComparator) {
<DeepExtract>
if (Interactive.minBy(it, keySelector, keyComparator) instanceof Ix) {
return (Ix<T>) Interactive.minBy(it, keySelector, keyComparator);
}
return new Ix<T>(Interactive.minBy(it, keySelector, keyCompa... | ixjava | positive | 438,570 |
@Test
public void testFilterableWhere3() throws SQLException {
final String sql = "select empno, gender, name from EMPS\n" + " where gender <> 'M' and empno > 125";
try {
checkSql(sql, model, expect);
return this;
} catch (SQLException e) {
throw TestUtil.rethrow(e);
}
} | @Test
public void testFilterableWhere3() throws SQLException {
final String sql = "select empno, gender, name from EMPS\n" + " where gender <> 'M' and empno > 125";
<DeepExtract>
try {
checkSql(sql, model, expect);
return this;
} catch (SQLException e) {
throw TestUtil.rethrow(e);
}
</DeepExtract>
} | kareldb | positive | 438,572 |
public static Person findByPrimaryKey(Database db, String email) throws Exception {
Person p = null;
if (db.query("select email, name, address, phone from tbPerson where email = '" + email + "'").next()) {
p = new Person(db.query("select email, name, address, phone from tbPerson where email = '" + email + "'").getStrin... | public static Person findByPrimaryKey(Database db, String email) throws Exception {
<DeepExtract>
Person p = null;
if (db.query("select email, name, address, phone from tbPerson where email = '" + email + "'").next()) {
p = new Person(db.query("select email, name, address, phone from tbPerson where email = '" + email +... | scc263 | positive | 438,573 |
public <V, P extends BaseParser<V>> P getParser(final Class<P> parserClass, final Object... arguments) throws Exception {
final ParserGenerator<V, P> generator = new ParserGenerator<>(parserClass, loaderList);
final Class<? extends P> c = generator.transformParser();
Constructor<?> constructor;
Class<?>[] argumentTypes... | public <V, P extends BaseParser<V>> P getParser(final Class<P> parserClass, final Object... arguments) throws Exception {
final ParserGenerator<V, P> generator = new ParserGenerator<>(parserClass, loaderList);
final Class<? extends P> c = generator.transformParser();
<DeepExtract>
Constructor<?> constructor;
Class<?>[]... | grappa | positive | 438,574 |
@Override
public Build apply(Build from) {
Build ret = new Build(from);
ret.setClient(client);
return ret;
} | @Override
public Build apply(Build from) {
<DeepExtract>
Build ret = new Build(from);
ret.setClient(client);
return ret;
</DeepExtract>
} | verigreen | positive | 438,576 |
public String changeString2(String str, int leftSize) {
if (leftSize <= 0 || str == null || str.length() <= leftSize) {
return "";
}
char[] chars = str.toCharArray();
int left = 0;
int right = str.length() - 1;
int lpart = leftSize;
int rpart = str.length() - leftSize;
int same = Math.min(lpart, rpart);
int diff = lpar... | public String changeString2(String str, int leftSize) {
if (leftSize <= 0 || str == null || str.length() <= leftSize) {
return "";
}
char[] chars = str.toCharArray();
int left = 0;
int right = str.length() - 1;
int lpart = leftSize;
int rpart = str.length() - leftSize;
int same = Math.min(lpart, rpart);
int diff = lpar... | LeetCodeAndSwordToOffer | positive | 438,578 |
public void addColorToVertex(float r, float g, float b, float a) {
if (!isUsing(AttributeType.Color)) {
this.attributeTypes.add(AttributeType.Color);
}
currentVertex.color.set(r, g, b, a);
} | public void addColorToVertex(float r, float g, float b, float a) {
<DeepExtract>
if (!isUsing(AttributeType.Color)) {
this.attributeTypes.add(AttributeType.Color);
}
</DeepExtract>
currentVertex.color.set(r, g, b, a);
} | FabulaEngine | positive | 438,582 |
private static int iBrent(double[] t, double[] ray, double[] surf) {
int MAXIT = 50;
double a, b, c, d = 0, e = 0, min1, min2;
double a, b, c, d = 0, e = 0, min1, min2;
a = t[0];
b = c = t[1];
double[] xyz = new double[3];
xyz[0] = ray[RTXL] + ray[RTUL] * a;
xyz[1] = ray[RTYL] + ray[RTVL] * a;
xyz[2] = Z.dGetZsurf(xyz[... | private static int iBrent(double[] t, double[] ray, double[] surf) {
int MAXIT = 50;
double a, b, c, d = 0, e = 0, min1, min2;
double a, b, c, d = 0, e = 0, min1, min2;
a = t[0];
b = c = t[1];
double[] xyz = new double[3];
xyz[0] = ray[RTXL] + ray[RTUL] * a;
xyz[1] = ray[RTYL] + ray[RTVL] * a;
xyz[2] = Z.dGetZsurf(xyz[... | BeamFour | positive | 438,584 |
@Override
public void visit(JenkinsTreeNode.BuildParameterNode buildParameterNode) {
final Jenkins jenkins = buildParameterNode.getJenkins();
append(buildLabel(jenkins), SimpleTextAttributes.REGULAR_ITALIC_ATTRIBUTES);
setToolTipText(jenkins.getServerUrl());
setIcon(AllIcons.Webreferences.Server);
} | @Override
public void visit(JenkinsTreeNode.BuildParameterNode buildParameterNode) {
<DeepExtract>
final Jenkins jenkins = buildParameterNode.getJenkins();
append(buildLabel(jenkins), SimpleTextAttributes.REGULAR_ITALIC_ATTRIBUTES);
setToolTipText(jenkins.getServerUrl());
setIcon(AllIcons.Webreferences.Server);
</DeepE... | jenkins-control-plugin | positive | 438,586 |
public static int orCardinality(final EWAHCompressedBitmap... bitmaps) {
if (bitmaps.length == 1)
return bitmaps[0].cardinality();
final BitCounter counter = new BitCounter();
if (bitmaps.length < 2)
throw new IllegalArgumentException("You should provide at least two bitmaps, provided " + bitmaps.length);
FastAggregati... | public static int orCardinality(final EWAHCompressedBitmap... bitmaps) {
if (bitmaps.length == 1)
return bitmaps[0].cardinality();
final BitCounter counter = new BitCounter();
<DeepExtract>
if (bitmaps.length < 2)
throw new IllegalArgumentException("You should provide at least two bitmaps, provided " + bitmaps.length);... | javaewah | positive | 438,587 |
public void receiveMessage(final String address, final GameControlReturnData message) {
if (lastGameControlData == null) {
return;
}
int changed = 0;
synchronized (robotsByAddress) {
if (message.teamNum != teamNumbers[TEAM_LEFT] && message.teamNum != teamNumbers[TEAM_RIGHT]) {
return;
}
r = robotsByAddress.get(address)... | public void receiveMessage(final String address, final GameControlReturnData message) {
if (lastGameControlData == null) {
return;
}
int changed = 0;
synchronized (robotsByAddress) {
if (message.teamNum != teamNumbers[TEAM_LEFT] && message.teamNum != teamNumbers[TEAM_RIGHT]) {
return;
}
r = robotsByAddress.get(address)... | GameController | positive | 438,590 |
public void searchListener() {
String[] queries = search.getText().toLowerCase().split(" ");
activeRows.clear();
textRows.forEach((textRow) -> {
boolean match = true;
for (String query : queries) {
if (!(textRow.getContent().toLowerCase().contains(query)))
match = false;
}
if (match)
activeRows.add(textRow);
});
textRo... | public void searchListener() {
String[] queries = search.getText().toLowerCase().split(" ");
activeRows.clear();
textRows.forEach((textRow) -> {
boolean match = true;
for (String query : queries) {
if (!(textRow.getContent().toLowerCase().contains(query)))
match = false;
}
if (match)
activeRows.add(textRow);
});
<DeepE... | JavaFXLibrary | positive | 438,592 |
public int getGuessCount() {
int count = 0;
for (int i = 0; i < solveInstructions.size(); i++) {
if ((solveInstructions.get(i)).getType() == LogType.GUESS)
count++;
}
return count;
} | public int getGuessCount() {
<DeepExtract>
int count = 0;
for (int i = 0; i < solveInstructions.size(); i++) {
if ((solveInstructions.get(i)).getType() == LogType.GUESS)
count++;
}
return count;
</DeepExtract>
} | privacy-friendly-sudoku | positive | 438,593 |
@Override
public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
try {
IMarker marker = breakpoint.getMarker();
JaguarPlugin.ui(marker.getResource().getProject(), this, "breakpoint [" + "removed" + "] @ " + marker.getAttribute("org.eclipse.jdt.debug.core.typeName") + ":" + marker.getAttribute("line... | @Override
public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
<DeepExtract>
try {
IMarker marker = breakpoint.getMarker();
JaguarPlugin.ui(marker.getResource().getProject(), this, "breakpoint [" + "removed" + "] @ " + marker.getAttribute("org.eclipse.jdt.debug.core.typeName") + ":" + marker.getA... | jaguar | positive | 438,595 |
private CodeBlock runtimeAnnotationExtractor(AnnotationSpec annotationSpec) {
TypeSpec annoExtractor = TypeSpec.anonymousClassBuilder("").addMethod(MethodSpec.methodBuilder("a").returns(Annotation.class).addParameter(ParameterSpec.builder(Object.class, "ah").addAnnotation(annotationSpec).build()).beginControlFlow("try"... | private CodeBlock runtimeAnnotationExtractor(AnnotationSpec annotationSpec) {
TypeSpec annoExtractor = TypeSpec.anonymousClassBuilder("").addMethod(MethodSpec.methodBuilder("a").returns(Annotation.class).addParameter(ParameterSpec.builder(Object.class, "ah").addAnnotation(annotationSpec).build()).beginControlFlow("try"... | Piston | positive | 438,597 |
public void setVaraliableList(String varilableStr) {
if (varilableStr == null) {
return;
}
if (varilableStr.startsWith("\"")) {
varilableStr = varilableStr.substring(1);
}
if (varilableStr.endsWith("\"")) {
varilableStr = varilableStr.substring(0, varilableStr.length() - 1);
}
String[] strs = varilableStr.trim().split(... | public void setVaraliableList(String varilableStr) {
<DeepExtract>
if (varilableStr == null) {
return;
}
if (varilableStr.startsWith("\"")) {
varilableStr = varilableStr.substring(1);
}
if (varilableStr.endsWith("\"")) {
varilableStr = varilableStr.substring(0, varilableStr.length() - 1);
}
String[] strs = varilableStr... | incubator-sdap-mudrod | positive | 438,598 |
@Override
public Alignment match(EntityType e, double thresh) throws UnsupportedEntityTypeException {
boolean check = false;
for (EntityType t : SUPPORT) {
if (t.equals(e)) {
check = true;
break;
}
}
if (!check)
throw new UnsupportedEntityTypeException(e.toString());
System.out.println("Running Value String Matcher");
... | @Override
public Alignment match(EntityType e, double thresh) throws UnsupportedEntityTypeException {
<DeepExtract>
boolean check = false;
for (EntityType t : SUPPORT) {
if (t.equals(e)) {
check = true;
break;
}
}
if (!check)
throw new UnsupportedEntityTypeException(e.toString());
</DeepExtract>
System.out.println("Run... | AML-Project | positive | 438,599 |
public void reset() {
mTagCloud.reset();
removeAllViews();
LogUtils.d("TAGCLLOUDTEST", "resetChildren and " + "tag size = " + mTagCloud.getTagList().size());
for (Tag tag : mTagCloud.getTagList()) {
addView(tag.getView());
}
} | public void reset() {
mTagCloud.reset();
<DeepExtract>
removeAllViews();
LogUtils.d("TAGCLLOUDTEST", "resetChildren and " + "tag size = " + mTagCloud.getTagList().size());
for (Tag tag : mTagCloud.getTagList()) {
addView(tag.getView());
}
</DeepExtract>
} | TasteNews | positive | 438,601 |
@Test(expected = TechnicalException.class)
public void testUploadImage_throwsExceptionIfJsonHasMissingKeys() throws Exception {
doThrow(JSONException.class).when(uploadResult).getBoolean(BioIdWebserviceClient.JSON_KEY_ACCEPTED);
bioIdWebserviceClient.uploadImage(img, bwsToken, DIRECTION, UPLOAD_INDEX);
} | @Test(expected = TechnicalException.class)
public void testUploadImage_throwsExceptionIfJsonHasMissingKeys() throws Exception {
doThrow(JSONException.class).when(uploadResult).getBoolean(BioIdWebserviceClient.JSON_KEY_ACCEPTED);
<DeepExtract>
bioIdWebserviceClient.uploadImage(img, bwsToken, DIRECTION, UPLOAD_INDEX);
</... | BWS-Android | positive | 438,602 |
@Override
public BaseByteBuffer<ByteBuffer> putDouble(int index, double value) {
checkIndex(index, 1 << 3);
int chunkIndex = findChunkIndex(index);
Chunk<ByteBuffer> c = chunkList.get(chunkIndex);
int baseOffset = getChunkBaseOffset(chunkIndex);
int endOffset = getChunkEndOffset(chunkIndex, baseOffset);
if (index + 8 <... | @Override
public BaseByteBuffer<ByteBuffer> putDouble(int index, double value) {
<DeepExtract>
checkIndex(index, 1 << 3);
int chunkIndex = findChunkIndex(index);
Chunk<ByteBuffer> c = chunkList.get(chunkIndex);
int baseOffset = getChunkBaseOffset(chunkIndex);
int endOffset = getChunkEndOffset(chunkIndex, baseOffset);
i... | Mycat-BigMemoryAPI | positive | 438,603 |
@Override
public void close() {
LOGGER.debug("Processed " + counter + " items in " + (System.nanoTime() - init) / 1_000_000 + " ms");
} | @Override
public void close() {
<DeepExtract>
LOGGER.debug("Processed " + counter + " items in " + (System.nanoTime() - init) / 1_000_000 + " ms");
</DeepExtract>
} | jfleet | positive | 438,604 |
@Override
public void onCreate() {
mInComingHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch(msg.what) {
case MessageConst.CLIENT_ACTION_START_RECORED:
if (mViaVoiceRecognizer != null)
mViaVoiceRecognizer.start();
break;
case MessageConst.CLIENT_ACTION_STOP_RECORED:
if (mViaVoiceRecog... | @Override
public void onCreate() {
mInComingHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch(msg.what) {
case MessageConst.CLIENT_ACTION_START_RECORED:
if (mViaVoiceRecognizer != null)
mViaVoiceRecognizer.start();
break;
case MessageConst.CLIENT_ACTION_STOP_RECORED:
if (mViaVoiceRecog... | open_weather | positive | 438,606 |
@Override
public void describeRedefinableClass(long classId, Class clazz) {
DescribeClassMessage describeClassMessage = new DescribeClassMessage(classId, true);
describeClassMessage.setClassLoaderId(classLoaderIdGenerator.getId(clazz.getClassLoader()));
ProtectionDomain protectionDomain = clazz.getProtectionDomain();
i... | @Override
public void describeRedefinableClass(long classId, Class clazz) {
DescribeClassMessage describeClassMessage = new DescribeClassMessage(classId, true);
describeClassMessage.setClassLoaderId(classLoaderIdGenerator.getId(clazz.getClassLoader()));
ProtectionDomain protectionDomain = clazz.getProtectionDomain();
i... | jsonde | positive | 438,607 |
@Test
public void orderCenterAnimation() {
for (int i = mCurrTab; i < 4; i++) {
onView(withId(R.id.pager)).perform(swipeLeft());
SystemClock.sleep(300);
}
mCurrTab = 4;
SystemClock.sleep(300);
onView(withId(R.id.sandbox_anim_orderm)).perform(click());
for (int i = mCurrTab; i < 5; i++) {
onView(withId(R.id.pager)).perf... | @Test
public void orderCenterAnimation() {
for (int i = mCurrTab; i < 4; i++) {
onView(withId(R.id.pager)).perform(swipeLeft());
SystemClock.sleep(300);
}
mCurrTab = 4;
SystemClock.sleep(300);
onView(withId(R.id.sandbox_anim_orderm)).perform(click());
<DeepExtract>
for (int i = mCurrTab; i < 5; i++) {
onView(withId(R.i... | WilliamChart | positive | 438,609 |
public void reset() {
super.reset();
resetThreadCountField(threadCountField);
this.queue = createQueue();
index = 1;
clearMessages();
setState(0);
} | public void reset() {
super.reset();
resetThreadCountField(threadCountField);
<DeepExtract>
this.queue = createQueue();
</DeepExtract>
index = 1;
clearMessages();
setState(0);
} | java-concurrent-animated | positive | 438,611 |
public Set<Integer> getTargets() {
HashSet<Integer> tMaps = new HashSet<Integer>();
boolean check = false;
for (Mapping m : targetMaps.keySet()) check = add(m) || check;
return check;
return tMaps;
} | public Set<Integer> getTargets() {
HashSet<Integer> tMaps = new HashSet<Integer>();
<DeepExtract>
boolean check = false;
for (Mapping m : targetMaps.keySet()) check = add(m) || check;
return check;
</DeepExtract>
return tMaps;
} | AML-Project | positive | 438,613 |
public void setFractionalMetrics(boolean fractionalMetrics) {
super.setFractionalMetrics(fractionalMetrics);
this.texBold = setupTexture(this.font.deriveFont(1), this.antiAlias, this.fractionalMetrics, this.boldChars);
this.texItalic = setupTexture(this.font.deriveFont(2), this.antiAlias, this.fractionalMetrics, this.i... | public void setFractionalMetrics(boolean fractionalMetrics) {
super.setFractionalMetrics(fractionalMetrics);
<DeepExtract>
this.texBold = setupTexture(this.font.deriveFont(1), this.antiAlias, this.fractionalMetrics, this.boldChars);
this.texItalic = setupTexture(this.font.deriveFont(2), this.antiAlias, this.fractionalM... | gamesense-client | positive | 438,614 |
static void deleteOldFiles(final Context context) {
if (Constants.IS_PARAMETER_CHECKING_ENABLED) {
if (null == context) {
throw new IllegalArgumentException("context cannot be null");
}
}
if (new File(context.getFilesDir(), "localytics").exists() && new File(context.getFilesDir(), "localytics").isDirectory()) {
for (fi... | static void deleteOldFiles(final Context context) {
if (Constants.IS_PARAMETER_CHECKING_ENABLED) {
if (null == context) {
throw new IllegalArgumentException("context cannot be null");
}
}
<DeepExtract>
if (new File(context.getFilesDir(), "localytics").exists() && new File(context.getFilesDir(), "localytics").isDirector... | Beats | positive | 438,615 |
public static void main(String[] args) {
LinearRegressionTrain l1 = new LinearRegressionTrain();
l = LoggerFactory.getLogger("APP");
Properties p_ = new Properties();
l1.setup(l, p_);
for (int c = 0; c < 5000; c++) {
map = new HashMap<String, String>();
map.put(AbstractTask.DEFAULT_KEY, "-71.106167," + c * 42.372802 + ... | public static void main(String[] args) {
LinearRegressionTrain l1 = new LinearRegressionTrain();
<DeepExtract>
l = LoggerFactory.getLogger("APP");
</DeepExtract>
Properties p_ = new Properties();
l1.setup(l, p_);
for (int c = 0; c < 5000; c++) {
map = new HashMap<String, String>();
map.put(AbstractTask.DEFAULT_KEY, "-7... | riot-bench | positive | 438,618 |
@Test
public void fireAndForget() throws InterruptedException {
RSocketStrategies strategies = RSocketStrategies.builder().build();
RSocketRequester.Builder builder = RSocketRequester.builder();
return builder.rsocketConnector(rSocketConnector -> rSocketConnector.reconnect(Retry.fixedDelay(2, Duration.ofSeconds(2)))).t... | @Test
public void fireAndForget() throws InterruptedException {
<DeepExtract>
RSocketStrategies strategies = RSocketStrategies.builder().build();
RSocketRequester.Builder builder = RSocketRequester.builder();
return builder.rsocketConnector(rSocketConnector -> rSocketConnector.reconnect(Retry.fixedDelay(2, Duration.ofS... | spring-boot-guide | positive | 438,621 |
public void deleteGame(int id) {
if (id == Profile.getInstance().getCurrentGame()) {
Profile.getInstance().setCurrentGame(Profile.NO_GAME);
Profile.getInstance().saveChanges();
}
FileManager.deleteGame(id);
XmlTree games = getGamesXml();
XmlTree newGames = new XmlTree(games.getName());
for (XmlTree g : games) {
if (Fil... | public void deleteGame(int id) {
if (id == Profile.getInstance().getCurrentGame()) {
Profile.getInstance().setCurrentGame(Profile.NO_GAME);
Profile.getInstance().saveChanges();
}
FileManager.deleteGame(id);
<DeepExtract>
XmlTree games = getGamesXml();
XmlTree newGames = new XmlTree(games.getName());
for (XmlTree g : ga... | SudoQ | positive | 438,623 |
@Test
public void listsDataStoresInOrderOfMostRecentToLeastRecent() throws Exception {
try (FilePersistence persistenceToReplacePrimary = logFileService.create(QUORUM_ID)) {
persistenceToReplacePrimary.append(serializedHeader(anOLogHeaderWithSeqNum(1)));
logFileService.append(QUORUM_ID, persistenceToReplacePrimary);
}
... | @Test
public void listsDataStoresInOrderOfMostRecentToLeastRecent() throws Exception {
try (FilePersistence persistenceToReplacePrimary = logFileService.create(QUORUM_ID)) {
persistenceToReplacePrimary.append(serializedHeader(anOLogHeaderWithSeqNum(1)));
logFileService.append(QUORUM_ID, persistenceToReplacePrimary);
}
... | c5-replicator | positive | 438,625 |
public double[] getLast(Instance inst) {
return Arrays.binarySearch(m_Instances, inst, m_Comparator);
if (index < 0)
result = new double[inst.numClasses()];
else
result = m_Last[index];
return result;
} | public double[] getLast(Instance inst) {
<DeepExtract>
return Arrays.binarySearch(m_Instances, inst, m_Comparator);
</DeepExtract>
if (index < 0)
result = new double[inst.numClasses()];
else
result = m_Last[index];
return result;
} | collective-classification-weka-package | positive | 438,626 |
public void deleteImage(IconData iconData) {
sImages.remove(iconData.getImageName());
String filename = iconData.getImageName();
File file = new File(mDirectory, filename);
if (file.exists())
file.delete();
} | public void deleteImage(IconData iconData) {
sImages.remove(iconData.getImageName());
<DeepExtract>
String filename = iconData.getImageName();
File file = new File(mDirectory, filename);
if (file.exists())
file.delete();
</DeepExtract>
} | tiktok-android | positive | 438,627 |
@Override
public void toggle() {
if (mEnableAsync) {
mAsyncSelect = !isChecked();
} else {
setSelected(!isChecked());
if (mOnCheckedChangeListener != null) {
mOnCheckedChangeListener.onCheckedChanged(this, !isChecked());
}
}
} | @Override
public void toggle() {
<DeepExtract>
if (mEnableAsync) {
mAsyncSelect = !isChecked();
} else {
setSelected(!isChecked());
if (mOnCheckedChangeListener != null) {
mOnCheckedChangeListener.onCheckedChanged(this, !isChecked());
}
}
</DeepExtract>
} | BingWallpaper | positive | 438,630 |
private static void test_independent_subs() {
int save = failCount;
try {
innerCheck("(?>^abc)", 0 | Pattern.MULTILINE | Pattern.DOTALL, "abc", new int[] { 0, 3, -2, -2 });
} catch (Exception e) {
++failCount;
}
if (failCount > save) {
System.err.println("Regex=\"" + "(?>^abc)" + "\"String=\"" + "abc" + "\"");
}
int sa... | private static void test_independent_subs() {
int save = failCount;
try {
innerCheck("(?>^abc)", 0 | Pattern.MULTILINE | Pattern.DOTALL, "abc", new int[] { 0, 3, -2, -2 });
} catch (Exception e) {
++failCount;
}
if (failCount > save) {
System.err.println("Regex=\"" + "(?>^abc)" + "\"String=\"" + "abc" + "\"");
}
int sa... | com.florianingerl.util.regex | positive | 438,632 |
public synchronized void addDrawAction(DrawAction action) {
actions.add(action);
valid = false;
fireEvent(null, EVENT_DRAWING_INVALIDATED);
DrawingEvent evt = new DrawingEvent(EVENT_DRAW_ACTION_ADDED, this, action);
for (DrawingListener listener : listeners) {
listener.eventFired(evt);
}
} | public synchronized void addDrawAction(DrawAction action) {
actions.add(action);
valid = false;
fireEvent(null, EVENT_DRAWING_INVALIDATED);
<DeepExtract>
DrawingEvent evt = new DrawingEvent(EVENT_DRAW_ACTION_ADDED, this, action);
for (DrawingListener listener : listeners) {
listener.eventFired(evt);
}
</DeepExtract>
} | Stacks-Flashcards | positive | 438,634 |
public final V put(K key, V value) {
if (key == null || value == null) {
throw new NullPointerException("key == null || value == null");
}
synchronized (this) {
putCount++;
size += safeSizeOf(key, value);
previous = map.put(key, value);
if (previous != null) {
size -= safeSizeOf(key, previous);
}
}
if (previous != null... | public final V put(K key, V value) {
if (key == null || value == null) {
throw new NullPointerException("key == null || value == null");
}
synchronized (this) {
putCount++;
size += safeSizeOf(key, value);
previous = map.put(key, value);
if (previous != null) {
size -= safeSizeOf(key, previous);
}
}
if (previous != null... | Pluto-Android | positive | 438,635 |
private void writePerMilTest(int numThreads, int writePerMil, TestCase stype) {
String indentedName = stype.toString() + " ".substring(stype.toString().length());
System.out.print("##### " + indentedName + " ##### ");
for (int i = 0; i < numThreads; i++) {
workerThreads[i] = new WorkerThre... | private void writePerMilTest(int numThreads, int writePerMil, TestCase stype) {
String indentedName = stype.toString() + " ".substring(stype.toString().length());
System.out.print("##### " + indentedName + " ##### ");
for (int i = 0; i < numThreads; i++) {
workerThreads[i] = new WorkerThre... | ConcurrencyFreaks | positive | 438,636 |
public List<Integer> preorderTraversal(TreeNode root) {
List<Integer> list = new ArrayList<>();
if (root == null) {
return;
}
list.add(root.val);
preorder(root.left, list);
preorder(root.right, list);
return list;
} | public List<Integer> preorderTraversal(TreeNode root) {
List<Integer> list = new ArrayList<>();
<DeepExtract>
if (root == null) {
return;
}
list.add(root.val);
preorder(root.left, list);
preorder(root.right, list);
</DeepExtract>
return list;
} | learning-note | positive | 438,637 |
public long extractUniqueFromOverlaps(String outFastaPath) throws IOException {
Timer timer = new Timer();
Set<String> containedSet = Collections.synchronizedSet(new HashSet<>());
HashMap<String, Histogram> histogramMap = new HashMap<>(100000);
final int minSegmentLength = minOverlapMatches;
PafReader reader = new PafR... | public long extractUniqueFromOverlaps(String outFastaPath) throws IOException {
Timer timer = new Timer();
Set<String> containedSet = Collections.synchronizedSet(new HashSet<>());
HashMap<String, Histogram> histogramMap = new HashMap<>(100000);
final int minSegmentLength = minOverlapMatches;
PafReader reader = new PafR... | RNA-Bloom | positive | 438,640 |
public static void main(String[] args) {
try {
Display.setDisplayMode(new DisplayMode(WINDOW_DIMENSIONS[0], WINDOW_DIMENSIONS[1]));
Display.setTitle(WINDOW_TITLE);
Display.create();
} catch (LWJGLException e) {
e.printStackTrace();
cleanUp(true);
}
frameBuffer = glGenFramebuffers();
glBindFramebuffer(GL_FRAMEBUFFER, fr... | public static void main(String[] args) {
try {
Display.setDisplayMode(new DisplayMode(WINDOW_DIMENSIONS[0], WINDOW_DIMENSIONS[1]));
Display.setTitle(WINDOW_TITLE);
Display.create();
} catch (LWJGLException e) {
e.printStackTrace();
cleanUp(true);
}
frameBuffer = glGenFramebuffers();
glBindFramebuffer(GL_FRAMEBUFFER, fr... | YouTube-tutorials | positive | 438,641 |
public void run() {
showSearchPanel();
Object mDreamManager = XposedHelpers.getObjectField(self, "mDreamManager");
if (mDreamManager != null) {
try {
XposedHelpers.callMethod(mDreamManager, "awaken");
} catch (Exception e) {
}
}
} | public void run() {
showSearchPanel();
<DeepExtract>
Object mDreamManager = XposedHelpers.getObjectField(self, "mDreamManager");
if (mDreamManager != null) {
try {
XposedHelpers.callMethod(mDreamManager, "awaken");
} catch (Exception e) {
}
}
</DeepExtract>
} | tabletkat | positive | 438,642 |
public static <T> T wrapAsyncCallbackProxy(Class<T> serviceInterface, AsyncCallback<?> callback, HsfService service, String groupName) {
if (serviceInterface == null) {
throw new IllegalArgumentException("serviceInterface can not be null.");
} else if (!serviceInterface.isInterface()) {
throw new IllegalArgumentExcepti... | public static <T> T wrapAsyncCallbackProxy(Class<T> serviceInterface, AsyncCallback<?> callback, HsfService service, String groupName) {
<DeepExtract>
if (serviceInterface == null) {
throw new IllegalArgumentException("serviceInterface can not be null.");
} else if (!serviceInterface.isInterface()) {
throw new IllegalA... | summercool-hsf-copy | positive | 438,643 |
public Criteria andTypeLessThan(JobType value) {
if (value == null) {
throw new RuntimeException("Value for " + "type" + " cannot be null");
}
criteria.add(new Criterion("type <", value));
return (Criteria) this;
} | public Criteria andTypeLessThan(JobType value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "type" + " cannot be null");
}
criteria.add(new Criterion("type <", value));
</DeepExtract>
return (Criteria) this;
} | flink-sql-computing-platform | positive | 438,644 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.