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 void mouseClicked(java.awt.event.MouseEvent evt) {
if (evt.getButton() == MouseEvent.BUTTON3) {
TableHelper.SetSelectedRow(ContentTable, evt.getPoint());
TableListObject objectModel = TableHelper.GetCurrentTableSelectRowObject(ContentTable);
if (objectModel != null) {
switch(objectModel.TableType) {
case QueueLi... | public void mouseClicked(java.awt.event.MouseEvent evt) {
<DeepExtract>
if (evt.getButton() == MouseEvent.BUTTON3) {
TableHelper.SetSelectedRow(ContentTable, evt.getPoint());
TableListObject objectModel = TableHelper.GetCurrentTableSelectRowObject(ContentTable);
if (objectModel != null) {
switch(objectModel.TableType) ... | MQAdminTool | positive | 436,970 |
@Test
public void yamlConfigClassLoader() throws IOException {
Path filePath = Paths.get(TestUtils.getTestResourcePath(), "configs/loader", "yamlConfigLoaderTest.yaml");
YamlConfigLoaderStrategy jsonConfigLoaderStrategy = new YamlConfigLoaderStrategy(new FileInputStream(filePath.toString()), TestUtils.getTestResourcePa... | @Test
public void yamlConfigClassLoader() throws IOException {
Path filePath = Paths.get(TestUtils.getTestResourcePath(), "configs/loader", "yamlConfigLoaderTest.yaml");
YamlConfigLoaderStrategy jsonConfigLoaderStrategy = new YamlConfigLoaderStrategy(new FileInputStream(filePath.toString()), TestUtils.getTestResourcePa... | dsm | positive | 436,971 |
@Test(enabled = false)
public void should_not_publish_queued_status_because_of_checkout_rule() {
return prepareVcs("vcs1", "111", "rev1_2", SetVcsRootIdMode.EXT_ID);
final SVcsRoot vcsRoot = myBuildType.getVcsRoots().iterator().next();
CheckoutRules checkoutRules = new CheckoutRules("+:src => .");
myBuildType.setChecko... | @Test(enabled = false)
public void should_not_publish_queued_status_because_of_checkout_rule() {
return prepareVcs("vcs1", "111", "rev1_2", SetVcsRootIdMode.EXT_ID);
final SVcsRoot vcsRoot = myBuildType.getVcsRoots().iterator().next();
CheckoutRules checkoutRules = new CheckoutRules("+:src => .");
myBuildType.setChecko... | commit-status-publisher | positive | 436,972 |
@Override
public void onCreate() {
super.onCreate();
configParams = new ConfigParams();
configParams.readConfig();
Config config = Config.getInstance();
if (configParams.autoStart == null)
configParams.autoStart = config.getProperty("pzp.autoStart");
synchronized (PzpService.class) {
theService = this;
for (PzpServiceL... | @Override
public void onCreate() {
super.onCreate();
<DeepExtract>
configParams = new ConfigParams();
configParams.readConfig();
Config config = Config.getInstance();
if (configParams.autoStart == null)
configParams.autoStart = config.getProperty("pzp.autoStart");
</DeepExtract>
synchronized (PzpService.class) {
theSer... | Webinos-Platform | positive | 436,973 |
private void updateMenu() {
IStructuredSelection selection = (IStructuredSelection) scriptsViewer.getSelection();
super.setEnabled(selection.size() > 0);
updateButtons();
refresh();
scriptsViewer.getTree().setEnabled(selection.size() > 0);
super.setEnabled(selection.size() > 0);
updateButtons();
refresh();
scriptsViewe... | private void updateMenu() {
IStructuredSelection selection = (IStructuredSelection) scriptsViewer.getSelection();
<DeepExtract>
super.setEnabled(selection.size() > 0);
updateButtons();
refresh();
scriptsViewer.getTree().setEnabled(selection.size() > 0);
</DeepExtract>
super.setEnabled(selection.size() > 0);
updateButto... | Composer-Eclipse-Plugin | positive | 436,975 |
@SuppressLint("InlinedApi")
public Notification build() {
if (mChannelBuilder.getImportance() == NotificationManager.IMPORTANCE_NONE) {
switch(mPriority) {
case NotificationCompat.PRIORITY_MIN:
mChannelBuilder.setImportance(NotificationManager.IMPORTANCE_MIN);
break;
case NotificationCompat.PRIORITY_LOW:
mChannelBuilde... | @SuppressLint("InlinedApi")
public Notification build() {
if (mChannelBuilder.getImportance() == NotificationManager.IMPORTANCE_NONE) {
switch(mPriority) {
case NotificationCompat.PRIORITY_MIN:
mChannelBuilder.setImportance(NotificationManager.IMPORTANCE_MIN);
break;
case NotificationCompat.PRIORITY_LOW:
mChannelBuilde... | AndroidUSBCamera | positive | 436,976 |
@Override
public String getPathToScriptEventHandlerScript() {
return getProperty(PropertiesConstants.SCRIPT_EVENT_HANDLER_SCRIPT_PATH, null);
} | @Override
public String getPathToScriptEventHandlerScript() {
<DeepExtract>
return getProperty(PropertiesConstants.SCRIPT_EVENT_HANDLER_SCRIPT_PATH, null);
</DeepExtract>
} | jsflight | positive | 436,977 |
public Builder mergeFrom(protoc.ServiceProto.InitializeRequest other) {
if (other == protoc.ServiceProto.InitializeRequest.getDefaultInstance())
return this;
if (other.getPlayerNumber() != false) {
setPlayerNumber(other.getPlayerNumber());
}
if (!other.getPlayerName().isEmpty()) {
playerName_ = other.playerName_;
onCha... | public Builder mergeFrom(protoc.ServiceProto.InitializeRequest other) {
if (other == protoc.ServiceProto.InitializeRequest.getDefaultInstance())
return this;
if (other.getPlayerNumber() != false) {
setPlayerNumber(other.getPlayerNumber());
}
if (!other.getPlayerName().isEmpty()) {
playerName_ = other.playerName_;
onCha... | FightingICE | positive | 436,979 |
public void write(org.apache.thrift.protocol.TProtocol oprot, muteSource_args struct) throws org.apache.thrift.TException {
if (dimensions != null) {
dimensions.validate();
}
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sourceName != null) {
oprot.writeFieldBegin(SOURCE_NAME_FIELD_DESC);
oprot.writeString(struct.sou... | public void write(org.apache.thrift.protocol.TProtocol oprot, muteSource_args struct) throws org.apache.thrift.TException {
<DeepExtract>
if (dimensions != null) {
dimensions.validate();
}
</DeepExtract>
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sourceName != null) {
oprot.writeFieldBegin(SOURCE_NAME_FIELD_DESC);... | obs-video-scheduler | positive | 436,981 |
@Override
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable, "SaturativeThread #" + this.a.getAndIncrement());
synchronized (mThreads) {
mThreads.add(thread);
}
return thread;
} | @Override
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable, "SaturativeThread #" + this.a.getAndIncrement());
<DeepExtract>
synchronized (mThreads) {
mThreads.add(thread);
}
</DeepExtract>
return thread;
} | ACDD | positive | 436,982 |
static String addViewChecker(String name) {
try {
String className = name.getClass().getName();
if (viewCheckers.containsKey(className))
return className;
viewCheckers.put(className, name);
return className;
} catch (Exception x) {
return null;
}
} | static String addViewChecker(String name) {
<DeepExtract>
try {
String className = name.getClass().getName();
if (viewCheckers.containsKey(className))
return className;
viewCheckers.put(className, name);
return className;
} catch (Exception x) {
return null;
}
</DeepExtract>
} | appdoctor | positive | 436,983 |
public TRexClientResult<StubResult> setVlan(int portIdx, List<Integer> vlanIds) {
Map<String, Object> parameters = new HashMap<>();
parameters.put(PORT_ID, portIdx);
parameters.put("vlan", vlanIds);
parameters.put("block", false);
LOGGER.debug("Call {} method.", "set_vlan");
if (!this.supportedCmds.contains("set_vlan")... | public TRexClientResult<StubResult> setVlan(int portIdx, List<Integer> vlanIds) {
Map<String, Object> parameters = new HashMap<>();
parameters.put(PORT_ID, portIdx);
parameters.put("vlan", vlanIds);
parameters.put("block", false);
<DeepExtract>
LOGGER.debug("Call {} method.", "set_vlan");
if (!this.supportedCmds.contai... | trex-java-sdk | positive | 436,984 |
public long getCounter(String key) throws TException {
oprot_.writeMessageBegin(new TMessage("getCounter", TMessageType.CALL, seqid_));
getCounter_args args = new getCounter_args();
args.key = key;
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
TMessage msg = iprot_.readMessageBegin();
if ... | public long getCounter(String key) throws TException {
oprot_.writeMessageBegin(new TMessage("getCounter", TMessageType.CALL, seqid_));
getCounter_args args = new getCounter_args();
args.key = key;
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
<DeepExtract>
TMessage msg = iprot_.readMessa... | Scribe-log4j-Appender | positive | 436,986 |
@Override
public String toString() {
return getRawMember().getName();
} | @Override
public String toString() {
<DeepExtract>
return getRawMember().getName();
</DeepExtract>
} | java-classmate | positive | 436,988 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, 0));
get_args args = new get_args();
this.id = id;
setIdIsSet(true);
return this;
schemes.get(prot.getScheme()).getSch... | public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, 0));
get_args args = new get_args();
this.id = id;
setIdIsSet(true);
return this;
<DeepExtract>
schemes.get(prot.getSc... | Firefly | positive | 436,990 |
public void nextColor() {
int tmp = getPlayerColor() << 1;
if (tmp > StateColor.BLUE) {
tmp = StateColor.RED;
}
this.playerColor = tmp;
} | public void nextColor() {
int tmp = getPlayerColor() << 1;
if (tmp > StateColor.BLUE) {
tmp = StateColor.RED;
}
<DeepExtract>
this.playerColor = tmp;
</DeepExtract>
} | rgb4 | positive | 436,991 |
@OnClick(R.id.activity_enter_source_phrase_next_label)
public void enterSourcePhraseNextLabelClicked() {
if (!nextButton.isClickable())
return;
getContextFromIntent().setSourceText(sourcePhraseTextView.getText().toString());
startNextActivity(EnterSourcePhraseActivity.this, EnterTranslatedPhraseActivity.class);
} | @OnClick(R.id.activity_enter_source_phrase_next_label)
public void enterSourcePhraseNextLabelClicked() {
if (!nextButton.isClickable())
return;
<DeepExtract>
getContextFromIntent().setSourceText(sourcePhraseTextView.getText().toString());
</DeepExtract>
startNextActivity(EnterSourcePhraseActivity.this, EnterTranslatedP... | translation-cards | positive | 436,992 |
@Test
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public void testConcurrentPaymentsWithOverflowOverFirstTier() throws InterruptedException {
final Date blockTime = Date.valueOf("1970-01-02");
final TestTier t1 = new TestTier(1, "1970-01-01", "1970-01-03", new BigDecimal("0.25"), totalTomicsAmount().divide(... | @Test
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public void testConcurrentPaymentsWithOverflowOverFirstTier() throws InterruptedException {
final Date blockTime = Date.valueOf("1970-01-02");
final TestTier t1 = new TestTier(1, "1970-01-01", "1970-01-03", new BigDecimal("0.25"), totalTomicsAmount().divide(... | ICOnator-backend | positive | 436,994 |
@Override
public ScreenLocation getCenter() {
return new DefaultScreenLocation(screen, getX() + getWidth() / 2, getY() + getHeight() / 2);
} | @Override
public ScreenLocation getCenter() {
<DeepExtract>
return new DefaultScreenLocation(screen, getX() + getWidth() / 2, getY() + getHeight() / 2);
</DeepExtract>
} | sikuli-api | positive | 436,996 |
public void setup() {
table.clear();
table.button("@mods", Icon.book, Vars.ui.mods::show).growX();
table.row();
table.row();
ad(Manifest.envInf);
ad(Manifest.uiDebug);
ad(Manifest.experiment);
ad(Manifest.logView);
ad(Manifest.taskList);
ad(Manifest.bundleViewer);
ad(Manifest.warning);
for (OzoneDialog o : dialogs) ad(... | public void setup() {
table.clear();
table.button("@mods", Icon.book, Vars.ui.mods::show).growX();
table.row();
table.row();
<DeepExtract>
ad(Manifest.envInf);
ad(Manifest.uiDebug);
ad(Manifest.experiment);
ad(Manifest.logView);
ad(Manifest.taskList);
ad(Manifest.bundleViewer);
ad(Manifest.warning);
for (OzoneDialog o ... | Mindustry-Ozone | positive | 436,997 |
public void fillBeyondarObjectScreenPositions(BeyondarObject beyondarObject) {
float[] eye = mFloat4ArrayPool.poll();
if (eye == null) {
eye = new float[4];
}
getScreenCoordinates(beyondarObject.getBottomLeft().x, beyondarObject.getBottomLeft().y, beyondarObject.getBottomLeft().z, beyondarObject.getScreenPositionBottom... | public void fillBeyondarObjectScreenPositions(BeyondarObject beyondarObject) {
float[] eye = mFloat4ArrayPool.poll();
if (eye == null) {
eye = new float[4];
}
getScreenCoordinates(beyondarObject.getBottomLeft().x, beyondarObject.getBottomLeft().y, beyondarObject.getBottomLeft().z, beyondarObject.getScreenPositionBottom... | beyondar | positive | 436,999 |
public static void setFullScreenWithTranslate(Activity activity) {
Window window = activity.getWindow();
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
setStatusBarColo... | public static void setFullScreenWithTranslate(Activity activity) {
Window window = activity.getWindow();
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
<DeepExtract>
se... | OkCalendar | positive | 437,000 |
private void enableFast() {
realCheckBox.setSelected(false);
speedTextField.setEnabled(false);
fastCheckBox.setSelected(true);
enableFast(true);
speed = validateSpeed();
eventNum = validateEventNum();
durationSec = validateDurationSec();
} | private void enableFast() {
realCheckBox.setSelected(false);
speedTextField.setEnabled(false);
fastCheckBox.setSelected(true);
enableFast(true);
<DeepExtract>
speed = validateSpeed();
eventNum = validateEventNum();
durationSec = validateDurationSec();
</DeepExtract>
} | gchisto | positive | 437,003 |
@Override
public BvvHandle[] getValue() {
List<SwingBvvHandleWidget.RenamableBvvHandle> selected = list.getSelectedValuesList();
return selected.stream().map((e) -> e.bvvh).collect(Collectors.toList()).toArray(new BvvHandle[selected.size()]);
} | @Override
public BvvHandle[] getValue() {
<DeepExtract>
List<SwingBvvHandleWidget.RenamableBvvHandle> selected = list.getSelectedValuesList();
return selected.stream().map((e) -> e.bvvh).collect(Collectors.toList()).toArray(new BvvHandle[selected.size()]);
</DeepExtract>
} | bigdataviewer-playground | positive | 437,004 |
public boolean isEgg() {
if (this == AUnitType.Zerg_Egg) {
return true;
}
if (AUnitType.Zerg_Egg == null) {
return false;
}
if (AUnitType.Zerg_Egg instanceof AUnitType) {
AUnitType other = (AUnitType) AUnitType.Zerg_Egg;
return ut.name().equals(other.ut.name());
} else if (AUnitType.Zerg_Egg instanceof UnitType) {
Unit... | public boolean isEgg() {
<DeepExtract>
if (this == AUnitType.Zerg_Egg) {
return true;
}
if (AUnitType.Zerg_Egg == null) {
return false;
}
if (AUnitType.Zerg_Egg instanceof AUnitType) {
AUnitType other = (AUnitType) AUnitType.Zerg_Egg;
return ut.name().equals(other.ut.name());
} else if (AUnitType.Zerg_Egg instanceof Un... | Atlantis | positive | 437,005 |
private InstructionParsed parseBranchbyteShort(final int curPos, final PosDataInputStream pdis) throws IOException {
InstructionParsed parsed = new InstructionParsed(curPos, this.code);
Instruction result = Instruction.UNKNOWN;
for (Instruction i : Instruction.values()) {
if (i.code == pdis.readShort()) {
result = i;
b... | private InstructionParsed parseBranchbyteShort(final int curPos, final PosDataInputStream pdis) throws IOException {
InstructionParsed parsed = new InstructionParsed(curPos, this.code);
<DeepExtract>
Instruction result = Instruction.UNKNOWN;
for (Instruction i : Instruction.values()) {
if (i.code == pdis.readShort()) {... | freeinternals | positive | 437,006 |
public void write(org.apache.thrift.protocol.TProtocol oprot, sendMobileMessage_result struct) throws org.apache.thrift.TException {
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop... | public void write(org.apache.thrift.protocol.TProtocol oprot, sendMobileMessage_result struct) throws org.apache.thrift.TException {
<DeepExtract>
</DeepExtract>
oprot.writeStructBegin(STRUCT_DESC);
<DeepExtract>
</DeepExtract>
if (struct.isSetSuccess()) {
<DeepExtract>
</DeepExtract>
oprot.writeFieldBegin(SUCCESS_FIEL... | imooc-Docker-Kubernetes-k8s | positive | 437,007 |
protected TrekDamageStat doDamageInstant(TrekObject from, double rawDamage, String type, boolean showAttacker) {
double shielddrop = TrekMath.getShieldDrop(rawDamage, this.shieldStrength);
double intDamage = 0;
double shieldsafterdrop = 0;
boolean nebulaEffect = false;
if (TrekUtilities.isObjectShip(this)) {
TrekShip s... | protected TrekDamageStat doDamageInstant(TrekObject from, double rawDamage, String type, boolean showAttacker) {
<DeepExtract>
double shielddrop = TrekMath.getShieldDrop(rawDamage, this.shieldStrength);
double intDamage = 0;
double shieldsafterdrop = 0;
boolean nebulaEffect = false;
if (TrekUtilities.isObjectShip(this)... | jtrek | positive | 437,008 |
protected void suitePreSetUp() throws Exception {
fakeFtpServer = new FakeFtpServer();
fakeFtpServer.setServerControlPort(9879);
fakeFtpServer.addUserAccount(new UserAccount("ftp", "ftp", "/"));
FileSystem fileSystem = new UnixFakeFileSystem();
fileSystem.add(new FileEntry("/files/file1.txt", "MULEINACTION"));
fakeFtpS... | protected void suitePreSetUp() throws Exception {
<DeepExtract>
fakeFtpServer = new FakeFtpServer();
fakeFtpServer.setServerControlPort(9879);
fakeFtpServer.addUserAccount(new UserAccount("ftp", "ftp", "/"));
FileSystem fileSystem = new UnixFakeFileSystem();
fileSystem.add(new FileEntry("/files/file1.txt", "MULEINACTIO... | mule-in-action | positive | 437,010 |
public Criteria andTelephoneLessThanOrEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "telephone" + " cannot be null");
}
criteria.add(new Criterion("TELEPHONE <=", value));
return (Criteria) this;
} | public Criteria andTelephoneLessThanOrEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "telephone" + " cannot be null");
}
criteria.add(new Criterion("TELEPHONE <=", value));
</DeepExtract>
return (Criteria) this;
} | console | positive | 437,011 |
public void loadMoreEnd(List<T> data, boolean gone) {
if (data == null || data.isEmpty()) {
return;
}
this.mData.addAll(data);
notifyItemRangeInserted(mData.size() - data.size() + getFetchMoreViewCount(), data.size());
if (getLoadMoreViewCount() == 0) {
return;
}
mLoading = false;
mNextLoadEnable = false;
mLoadMoreView... | public void loadMoreEnd(List<T> data, boolean gone) {
<DeepExtract>
if (data == null || data.isEmpty()) {
return;
}
this.mData.addAll(data);
notifyItemRangeInserted(mData.size() - data.size() + getFetchMoreViewCount(), data.size());
</DeepExtract>
if (getLoadMoreViewCount() == 0) {
return;
}
mLoading = false;
mNextLoad... | NIM_Android_AVChatKit | positive | 437,012 |
public void floatViewHide() {
synchronized (instance) {
floatViewBeans.clear();
}
QPMApiTemplateManager.getInstance().clear();
if (floatViewBaseComponent != null) {
QPMPluginManager.getInstance().getPluginControler().stopService(floatViewBaseComponent);
floatViewBaseComponent = null;
}
if (false) {
if (QPMModeManager.g... | public void floatViewHide() {
synchronized (instance) {
floatViewBeans.clear();
}
QPMApiTemplateManager.getInstance().clear();
if (floatViewBaseComponent != null) {
QPMPluginManager.getInstance().getPluginControler().stopService(floatViewBaseComponent);
floatViewBaseComponent = null;
}
if (false) {
if (QPMModeManager.g... | QPM | positive | 437,013 |
@Test
public void generatedTest9() {
double[][] points = new double[][] { { 2, 12, 18, 4 }, { 0, 14, 16, 7 }, { 2, 2, 13, 13 }, { 4, 5, 0, 15 }, { 18, 6, 14, 4 }, { 13, 18, 4, 19 }, { 0, 8, 8, 7 }, { 8, 4, 3, 3 }, { 2, 3, 13, 16 }, { 16, 6, 14, 11 }, { 13, 19, 2, 17 }, { 1, 3, 12, 10 }, { 5, 8, 3, 19 }, { 11, 12, 0, 0 ... | @Test
public void generatedTest9() {
double[][] points = new double[][] { { 2, 12, 18, 4 }, { 0, 14, 16, 7 }, { 2, 2, 13, 13 }, { 4, 5, 0, 15 }, { 18, 6, 14, 4 }, { 13, 18, 4, 19 }, { 0, 8, 8, 7 }, { 8, 4, 3, 3 }, { 2, 3, 13, 16 }, { 16, 6, 14, 11 }, { 13, 19, 2, 17 }, { 1, 3, 12, 10 }, { 5, 8, 3, 19 }, { 11, 12, 0, 0 ... | non-dominated-sorting | positive | 437,015 |
@Override
public void didMediaComplete(Object arg, ARDataTransferMedia media, ARDATATRANSFER_ERROR_ENUM error) {
List<Listener> listenersCpy = new ArrayList<>(mListeners);
for (Listener listener : listenersCpy) {
listener.onDownloadComplete(media.getName());
}
mCurrentDownloadIndex++;
if (mCurrentDownloadIndex > mNbMed... | @Override
public void didMediaComplete(Object arg, ARDataTransferMedia media, ARDATATRANSFER_ERROR_ENUM error) {
<DeepExtract>
List<Listener> listenersCpy = new ArrayList<>(mListeners);
for (Listener listener : listenersCpy) {
listener.onDownloadComplete(media.getName());
}
</DeepExtract>
mCurrentDownloadIndex++;
if (m... | MyoParrot | positive | 437,016 |
public String catchPhrase() {
@SuppressWarnings("unchecked")
List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject("company.buzzwords");
List<String> words = new ArrayList<String>();
for (List<String> list : catchPhraseLists) {
words.add(list.get(faker.random().nextInt(list.si... | public String catchPhrase() {
@SuppressWarnings("unchecked")
List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject("company.buzzwords");
<DeepExtract>
List<String> words = new ArrayList<String>();
for (List<String> list : catchPhraseLists) {
words.add(list.get(faker.random().n... | javafaker | positive | 437,017 |
@Override
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
res.setContentType("text/html");
java.io.PrintWriter out = res.getWriter();
String userID = null;
Collection<?> holdingDataBeans = null;
StringBuffer output = new StringBuffer(100);
output.append("<html>... | @Override
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
<DeepExtract>
res.setContentType("text/html");
java.io.PrintWriter out = res.getWriter();
String userID = null;
Collection<?> holdingDataBeans = null;
StringBuffer output = new StringBuffer(100);
output.... | sample.daytrader7 | positive | 437,018 |
public HighlightGuideView addGuideImage(View targetView, Drawable guideDrawable, int width, int height, int relativeX, int relativeY) {
ImageView guideImageView = new ImageView(getContext());
guideImageView.setImageDrawable(guideDrawable);
if (targetView != null && !mGuideViewsMap.containsKey(targetView.hashCode())) {
... | public HighlightGuideView addGuideImage(View targetView, Drawable guideDrawable, int width, int height, int relativeX, int relativeY) {
ImageView guideImageView = new ImageView(getContext());
guideImageView.setImageDrawable(guideDrawable);
<DeepExtract>
if (targetView != null && !mGuideViewsMap.containsKey(targetView.h... | QuickDevFramework | positive | 437,023 |
@Override
public final void perform(UiController uiController, View view) {
(RecyclerView) view.getAdapter().notifyItemRangeRemoved(removePosition, itemCount);
} | @Override
public final void perform(UiController uiController, View view) {
<DeepExtract>
(RecyclerView) view.getAdapter().notifyItemRangeRemoved(removePosition, itemCount);
</DeepExtract>
} | ChipsLayoutManager | positive | 437,025 |
@Override
public void onStart() {
if (isStarted) {
return;
}
logger.info("Start recording");
scaledDistanceFilter = mConfig.getDistanceFilter();
isStarted = true;
if (!isStarted) {
return;
}
logger.info("Setting pace: {}", false);
Boolean wasMoving = isMoving;
isMoving = false;
isAcquiringStationaryLocation = false;
is... | @Override
public void onStart() {
if (isStarted) {
return;
}
logger.info("Start recording");
scaledDistanceFilter = mConfig.getDistanceFilter();
isStarted = true;
<DeepExtract>
if (!isStarted) {
return;
}
logger.info("Setting pace: {}", false);
Boolean wasMoving = isMoving;
isMoving = false;
isAcquiringStationaryLocati... | background-geolocation-android | positive | 437,028 |
public String build() {
StringBuilder xml = new StringBuilder();
xml.append("<xml>");
if (es != null && es.size() > 0) {
for (E e : es) {
xml.append(e.render());
}
}
xml.append("</xml>");
return xml.toString();
} | public String build() {
<DeepExtract>
StringBuilder xml = new StringBuilder();
xml.append("<xml>");
if (es != null && es.size() > 0) {
for (E e : es) {
xml.append(e.render());
}
}
xml.append("</xml>");
return xml.toString();
</DeepExtract>
} | wechat | positive | 437,030 |
public void initializeSimulationsAndNetworks() throws MapLoadingException, Exception {
zoomSlider.setValue(Settings.ZOOM_MIN_LEVEL);
graph.changeState(DrawingState.none);
boolean loadSuccessful = false;
try {
Logger.info(LocaleUtils.translate("loading_project_from") + " " + file.getName() + "...");
Project project = Pr... | public void initializeSimulationsAndNetworks() throws MapLoadingException, Exception {
zoomSlider.setValue(Settings.ZOOM_MIN_LEVEL);
<DeepExtract>
graph.changeState(DrawingState.none);
</DeepExtract>
boolean loadSuccessful = false;
try {
Logger.info(LocaleUtils.translate("loading_project_from") + " " + file.getName() +... | ceons | positive | 437,031 |
private int compareSkipListKeyOfPrimitive(long key1, int namespace1, long key2, int namespace2) {
MemorySegment b1 = MemorySegmentFactory.wrap(skipListKeySerializerForPrimitive.serialize(key1, namespace1));
MemorySegment b2 = MemorySegmentFactory.wrap(skipListKeySerializerForPrimitive.serialize(key2, namespace2));
retu... | private int compareSkipListKeyOfPrimitive(long key1, int namespace1, long key2, int namespace2) {
<DeepExtract>
MemorySegment b1 = MemorySegmentFactory.wrap(skipListKeySerializerForPrimitive.serialize(key1, namespace1));
MemorySegment b2 = MemorySegmentFactory.wrap(skipListKeySerializerForPrimitive.serialize(key2, name... | flink-spillable-statebackend | positive | 437,032 |
public Criteria andORealRentNotEqualTo(Float value) {
if (value == null) {
throw new RuntimeException("Value for " + "oRealRent" + " cannot be null");
}
criteria.add(new Criterion("o_real_rent <>", value));
return (Criteria) this;
} | public Criteria andORealRentNotEqualTo(Float value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "oRealRent" + " cannot be null");
}
criteria.add(new Criterion("o_real_rent <>", value));
</DeepExtract>
return (Criteria) this;
} | webike | positive | 437,036 |
public void unMark(BlockPos pos) {
int y_layer = pos.getY() >> 4;
if (data[y_layer] == null) {
data[y_layer] = new Element();
}
storage[getIndex(pos)] &= 127;
} | public void unMark(BlockPos pos) {
int y_layer = pos.getY() >> 4;
if (data[y_layer] == null) {
data[y_layer] = new Element();
}
<DeepExtract>
storage[getIndex(pos)] &= 127;
</DeepExtract>
} | Tiquality | positive | 437,037 |
public double nextDouble() throws ParseException {
int startOffset = offset;
int startOffset = offset;
for (; offset < rawString.length(); offset++) {
char c = rawString.charAt(offset);
if (!(Character.isDigit(c) || c == '.' || c == '-' || c == '+')) {
if (offset != startOffset && (c == 'e' || c == 'E'))
continue;
brea... | public double nextDouble() throws ParseException {
int startOffset = offset;
int startOffset = offset;
for (; offset < rawString.length(); offset++) {
char c = rawString.charAt(offset);
if (!(Character.isDigit(c) || c == '.' || c == '-' || c == '+')) {
if (offset != startOffset && (c == 'e' || c == 'E'))
continue;
brea... | spatial4j | positive | 437,038 |
public Optional<Double> getElementalDPS() {
Optional<Map<String, Object>> props = Optional.ofNullable(getProperties());
Optional<Double> quality = props.map(e -> (Map<String, Object>) e.get(getBaseItemType().displayName())).map(e -> (Double) e.get("Elemental DPS"));
return quality;
} | public Optional<Double> getElementalDPS() {
<DeepExtract>
Optional<Map<String, Object>> props = Optional.ofNullable(getProperties());
Optional<Double> quality = props.map(e -> (Map<String, Object>) e.get(getBaseItemType().displayName())).map(e -> (Double) e.get("Elemental DPS"));
return quality;
</DeepExtract>
} | blackmarket | positive | 437,041 |
private static void sort(Comparable[] arr, int low, int high, Comparable[] aux) {
if (low >= high)
return;
int mid = low + (high - low) / 2;
sort(arr, low, mid, aux);
sort(arr, mid + 1, high, aux);
int i = low;
int j = mid + 1;
for (int k = low; k <= high; k++) aux[k] = arr[k];
int k = low;
while (i <= mid && j <= high... | private static void sort(Comparable[] arr, int low, int high, Comparable[] aux) {
if (low >= high)
return;
int mid = low + (high - low) / 2;
sort(arr, low, mid, aux);
sort(arr, mid + 1, high, aux);
<DeepExtract>
int i = low;
int j = mid + 1;
for (int k = low; k <= high; k++) aux[k] = arr[k];
int k = low;
while (i <= mi... | algorithm-primer | positive | 437,042 |
@Override
public void onConnectionRejected() {
rejectionCount++;
buffer.putLongOrdered(toOffset(REJECTED_COUNT_OFFSET), rejectionCount);
} | @Override
public void onConnectionRejected() {
rejectionCount++;
<DeepExtract>
buffer.putLongOrdered(toOffset(REJECTED_COUNT_OFFSET), rejectionCount);
</DeepExtract>
} | babl | positive | 437,043 |
@Override
public final void performClick() {
if (!isDialogShown()) {
showDialog(null);
}
} | @Override
public final void performClick() {
<DeepExtract>
if (!isDialogShown()) {
showDialog(null);
}
</DeepExtract>
} | AndroidMaterialPreferences | positive | 437,044 |
@Override
public T get(DataFetchingEnvironment environment) throws Exception {
for (DataFetcherHandlerInterceptor interceptor : interceptors) {
if (!interceptor.preHandle(environment)) {
throw new IllegalStateException("handler graphql pre interceptor fail! stop chain. interceptor:" + interceptor);
}
}
T result = deleg... | @Override
public T get(DataFetchingEnvironment environment) throws Exception {
for (DataFetcherHandlerInterceptor interceptor : interceptors) {
if (!interceptor.preHandle(environment)) {
throw new IllegalStateException("handler graphql pre interceptor fail! stop chain. interceptor:" + interceptor);
}
}
T result = deleg... | Arc | positive | 437,045 |
@Override
public void converterChanged(SliceSources slice) {
sliceGuiState.values().forEach(SliceGuiState::updateDisplaySettings);
} | @Override
public void converterChanged(SliceSources slice) {
<DeepExtract>
sliceGuiState.values().forEach(SliceGuiState::updateDisplaySettings);
</DeepExtract>
} | ijp-imagetoatlas | positive | 437,046 |
public void render(SpriteBatch sb) {
for (Iterator<DeathScreenFloatyEffect> i = particles.iterator(); i.hasNext(); ) {
DeathScreenFloatyEffect e = i.next();
if (e.renderBehind) {
e.render(sb);
}
e.update();
if (e.isDone) {
i.remove();
}
}
AbstractDungeon.player.render(sb);
if (monsters != null) {
monsters.render(sb);
}... | public void render(SpriteBatch sb) {
for (Iterator<DeathScreenFloatyEffect> i = particles.iterator(); i.hasNext(); ) {
DeathScreenFloatyEffect e = i.next();
if (e.renderBehind) {
e.render(sb);
}
e.update();
if (e.isDone) {
i.remove();
}
}
AbstractDungeon.player.render(sb);
if (monsters != null) {
monsters.render(sb);
}... | Slay-the-Spire-Together | positive | 437,048 |
@Override
public double toTBs(double value) {
BigDecimal val = new BigDecimal(value);
BigDecimal bDivisor = new BigDecimal(TERABYTES);
return val.divide(bDivisor).setScale(PRECISION, RoundingMode.HALF_UP).doubleValue();
} | @Override
public double toTBs(double value) {
<DeepExtract>
BigDecimal val = new BigDecimal(value);
BigDecimal bDivisor = new BigDecimal(TERABYTES);
return val.divide(bDivisor).setScale(PRECISION, RoundingMode.HALF_UP).doubleValue();
</DeepExtract>
} | hodor | positive | 437,049 |
private ShardConfig getLatest(boolean checkIsNext) {
Result result = execute(new Query(-1));
Result secondTry = execute(new Query(-1));
assertEquals(result, secondTry);
assertTrue(result instanceof ShardConfig);
ShardConfig config = (ShardConfig) result;
if (-1 >= INITIAL_CONFIG_NUM) {
assertTrue(-1 >= config.configNum... | private ShardConfig getLatest(boolean checkIsNext) {
<DeepExtract>
Result result = execute(new Query(-1));
Result secondTry = execute(new Query(-1));
assertEquals(result, secondTry);
assertTrue(result instanceof ShardConfig);
ShardConfig config = (ShardConfig) result;
if (-1 >= INITIAL_CONFIG_NUM) {
assertTrue(-1 >= co... | dslabs | positive | 437,050 |
public void addGaSynthesis(final ScGaSynthesis sc_ga_synthesis) {
try {
new ScUiModifier(ScUiThread.this, this).enqueueTo();
} catch (ScUiQueueableInactive e) {
e.printStackTrace();
}
} | public void addGaSynthesis(final ScGaSynthesis sc_ga_synthesis) {
<DeepExtract>
try {
new ScUiModifier(ScUiThread.this, this).enqueueTo();
} catch (ScUiQueueableInactive e) {
e.printStackTrace();
}
</DeepExtract>
} | skalch | positive | 437,051 |
@Deprecated
public void drawXObject(PDXObject xobject, AffineTransform transform) throws IOException {
if (inTextMode) {
throw new IllegalStateException("Error: drawXObject is not allowed within a text block.");
}
if (xobject instanceof PDImageXObject) {
xObjectPrefix = "Im";
} else {
xObjectPrefix = "Form";
}
COSName ... | @Deprecated
public void drawXObject(PDXObject xobject, AffineTransform transform) throws IOException {
if (inTextMode) {
throw new IllegalStateException("Error: drawXObject is not allowed within a text block.");
}
if (xobject instanceof PDImageXObject) {
xObjectPrefix = "Im";
} else {
xObjectPrefix = "Form";
}
COSName ... | pint-publisher | positive | 437,054 |
public JsonWriter value(double value) throws IOException {
if (Double.isNaN(value) || Double.isInfinite(value)) {
throw new IllegalArgumentException("Numeric values must be finite, but was " + value);
}
if (deferredName != null) {
beforeName();
string(deferredName);
deferredName = null;
}
switch(peek()) {
case NONEMPTY... | public JsonWriter value(double value) throws IOException {
if (Double.isNaN(value) || Double.isInfinite(value)) {
throw new IllegalArgumentException("Numeric values must be finite, but was " + value);
}
if (deferredName != null) {
beforeName();
string(deferredName);
deferredName = null;
}
<DeepExtract>
switch(peek()) {... | JustJson | positive | 437,056 |
public void initWithMessage(Activity mActivity, JSONObject message_info, View.OnClickListener mSpaceClickListener) {
try {
this.message_info = new JSONObject(message_info.toString());
} catch (JSONException e) {
e.printStackTrace();
}
this.mSpaceClickListener = mSpaceClickListener;
activity = mActivity;
sentMessage = A... | public void initWithMessage(Activity mActivity, JSONObject message_info, View.OnClickListener mSpaceClickListener) {
try {
this.message_info = new JSONObject(message_info.toString());
} catch (JSONException e) {
e.printStackTrace();
}
this.mSpaceClickListener = mSpaceClickListener;
activity = mActivity;
sentMessage = A... | Android-chat-app_Medix | positive | 437,057 |
public Calendar<ITEM> withWeek(LocalDate today) {
ZonedDateTime.now(getZoneId()).with(today).with(ChronoField.DAY_OF_WEEK, getFirstVisibleDayOfWeek()) = ZonedDateTime.now(getZoneId()).with(today).with(ChronoField.DAY_OF_WEEK, getFirstVisibleDayOfWeek()).withZoneSameLocal(getZoneId()).with(LocalTime.MIN);
startDate = Zo... | public Calendar<ITEM> withWeek(LocalDate today) {
ZonedDateTime.now(getZoneId()).with(today).with(ChronoField.DAY_OF_WEEK, getFirstVisibleDayOfWeek()) = ZonedDateTime.now(getZoneId()).with(today).with(ChronoField.DAY_OF_WEEK, getFirstVisibleDayOfWeek()).withZoneSameLocal(getZoneId()).with(LocalTime.MIN);
startDate = Zo... | calendar-component | positive | 437,059 |
public void clearAll() {
db = mDbHelper.getWritableDatabase();
return this;
db.execSQL("delete from Clock");
db.execSQL("update sqlite_sequence set seq = 0 where name = 'Clock' ");
mDbHelper.close();
} | public void clearAll() {
db = mDbHelper.getWritableDatabase();
return this;
db.execSQL("delete from Clock");
db.execSQL("update sqlite_sequence set seq = 0 where name = 'Clock' ");
<DeepExtract>
mDbHelper.close();
</DeepExtract>
} | ToDoList | positive | 437,061 |
public Criteria andBrandIdIsNull() {
if ("BRAND_ID is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("BRAND_ID is null"));
return (Criteria) this;
} | public Criteria andBrandIdIsNull() {
<DeepExtract>
if ("BRAND_ID is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("BRAND_ID is null"));
</DeepExtract>
return (Criteria) this;
} | ECPS | positive | 437,063 |
public static TreeInfo walk(File start) {
TreeInfo result = new TreeInfo();
for (File item : start.listFiles()) {
if (item.isDirectory()) {
result.dirs.add(item);
result.addAll(recurseDirs(item, ".*"));
} else {
if (item.getName().matches(".*")) {
result.files.add(item);
}
}
}
return result;
} | public static TreeInfo walk(File start) {
<DeepExtract>
TreeInfo result = new TreeInfo();
for (File item : start.listFiles()) {
if (item.isDirectory()) {
result.dirs.add(item);
result.addAll(recurseDirs(item, ".*"));
} else {
if (item.getName().matches(".*")) {
result.files.add(item);
}
}
}
return result;
</DeepExtract... | LearningOfThinkInJava | positive | 437,065 |
@Test
public void recognizesDependencyToConstantViaStaticImportInMethod() {
analyzeFile("../../src/test/java/de/is24/deadcode4j/analyzer/constants/ClassUsingConstantViaStaticImportInMethod.java");
objectUnderTest.finishAnalysis(analysisContext);
assertDependencyExists("de.is24.deadcode4j.analyzer.constants.ClassUsingCo... | @Test
public void recognizesDependencyToConstantViaStaticImportInMethod() {
analyzeFile("../../src/test/java/de/is24/deadcode4j/analyzer/constants/ClassUsingConstantViaStaticImportInMethod.java");
objectUnderTest.finishAnalysis(analysisContext);
<DeepExtract>
assertDependencyExists("de.is24.deadcode4j.analyzer.constant... | deadcode4j | positive | 437,066 |
public void removeWallet(String address, Context context) {
int position = -1;
for (int i = 0; i < mapdb.size(); i++) {
if (mapdb.get(i).getPubKey().equalsIgnoreCase(address)) {
position = i;
break;
}
}
if (position >= 0) {
if (mapdb.get(position) instanceof FullWallet)
new File(context.getFilesDir(), address.substring... | public void removeWallet(String address, Context context) {
int position = -1;
for (int i = 0; i < mapdb.size(); i++) {
if (mapdb.get(i).getPubKey().equalsIgnoreCase(address)) {
position = i;
break;
}
}
if (position >= 0) {
if (mapdb.get(position) instanceof FullWallet)
new File(context.getFilesDir(), address.substring... | Lunary-Ethereum-Wallet | positive | 437,067 |
public Result deleteMail(@PathParam("mailId") @DbId final Long mailId, @Attribute("userId") @DbId final Long userId, final Context context) {
if (context.getValidation().hasViolations()) {
return ApiResults.badRequest(context.getValidation().getViolations());
}
final Mail mail = Mail.find(mailId);
if (mail == null) {
r... | public Result deleteMail(@PathParam("mailId") @DbId final Long mailId, @Attribute("userId") @DbId final Long userId, final Context context) {
<DeepExtract>
if (context.getValidation().hasViolations()) {
return ApiResults.badRequest(context.getValidation().getViolations());
}
final Mail mail = Mail.find(mailId);
if (mai... | XCMailr | positive | 437,068 |
public void disableLeafField() {
super.setEnabled(true);
lblName.setEnabled(true);
txtName.setEnabled(true);
lblSubfield.setEnabled(false);
txtSubField.setEnabled(false);
lblNum.setEnabled(true);
txtNum.setEnabled(true);
lblType.setEnabled(true);
cmbType.setEnabled(true);
lblLenght.setEnabled(true);
lblLenValue.setEnab... | public void disableLeafField() {
<DeepExtract>
super.setEnabled(true);
lblName.setEnabled(true);
txtName.setEnabled(true);
lblSubfield.setEnabled(false);
txtSubField.setEnabled(false);
lblNum.setEnabled(true);
txtNum.setEnabled(true);
lblType.setEnabled(true);
cmbType.setEnabled(true);
lblLenght.setEnabled(true);
lblLe... | ISO8583 | positive | 437,069 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Intent intent = getIntent();
mapUrl = intent.getStringExtra(EXTRA_IMAGE_URL);
setContentView(R.layout.fragment_map);
ImageView iv = (ImageView) findViewById(R.id.iv_map);
LOGGER.info("Loading map from " + mapUrl);
G... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Intent intent = getIntent();
mapUrl = intent.getStringExtra(EXTRA_IMAGE_URL);
<DeepExtract>
setContentView(R.layout.fragment_map);
ImageView iv = (ImageView) findViewById(R.id.iv_map);
LOGGER.info("Loading map from ... | white-label-event-app | positive | 437,070 |
@Override
public void checkin(final String spotId, final double latitude, final double longitude, final String message, final String groupId, final GetIdCallbackHandler handler) {
try {
JSONObject params = createRequestJSONObject(message, latitude, longitude, Visibility.group, groupId);
getContainer().send("/checkins/"... | @Override
public void checkin(final String spotId, final double latitude, final double longitude, final String message, final String groupId, final GetIdCallbackHandler handler) {
<DeepExtract>
try {
JSONObject params = createRequestJSONObject(message, latitude, longitude, Visibility.group, groupId);
getContainer().sen... | mixiAndroidSDKWrapper | positive | 437,071 |
public boolean isBypassDownloadManager() {
boolean deviceDefault = false;
if (devicePrefsSpec != null) {
Object val = devicePrefsSpec.getDefaultValues().get(BYPASS_DOWNLOAD_MANAGER);
if (val != null)
deviceDefault = (Boolean) val;
}
return prefs.getBoolean(BYPASS_DOWNLOAD_MANAGER, deviceDefault);
} | public boolean isBypassDownloadManager() {
<DeepExtract>
boolean deviceDefault = false;
if (devicePrefsSpec != null) {
Object val = devicePrefsSpec.getDefaultValues().get(BYPASS_DOWNLOAD_MANAGER);
if (val != null)
deviceDefault = (Boolean) val;
}
return prefs.getBoolean(BYPASS_DOWNLOAD_MANAGER, deviceDefault);
</DeepEx... | mythling | positive | 437,072 |
public void setTitleRightImageButton(CharSequence title, CharSequence subTitle, int id, onRightImageButtonClickListener listener) {
if (title != null) {
mStvTitle.setText(title);
} else {
mStvTitle.setVisibility(View.GONE);
}
if (subTitle != null) {
mHtvSubTitle.setText(subTitle);
} else {
mHtvSubTitle.setVisibility(Vi... | public void setTitleRightImageButton(CharSequence title, CharSequence subTitle, int id, onRightImageButtonClickListener listener) {
<DeepExtract>
if (title != null) {
mStvTitle.setText(title);
} else {
mStvTitle.setVisibility(View.GONE);
}
if (subTitle != null) {
mHtvSubTitle.setText(subTitle);
} else {
mHtvSubTitle.se... | Android-OpenSource-momo | positive | 437,074 |
public CompositeBuilder addUuid(String value) {
parts.add(BufferHelper.fromUuid(value));
length += BufferHelper.fromUuid(value).rewind().remaining();
return this;
} | public CompositeBuilder addUuid(String value) {
<DeepExtract>
parts.add(BufferHelper.fromUuid(value));
length += BufferHelper.fromUuid(value).rewind().remaining();
return this;
</DeepExtract>
} | scale7-pelops | positive | 437,075 |
@Test
public void predefinedMessageTest() throws Exception {
final CountDownLatch l = new CountDownLatch(1);
Config config = new Config.Builder().port(port).host("127.0.0.1").resource("/suspend", new AtmosphereHandler() {
private final AtomicBoolean b = new AtomicBoolean(false);
@Override
public void onRequest(Atmosphe... | @Test
public void predefinedMessageTest() throws Exception {
final CountDownLatch l = new CountDownLatch(1);
Config config = new Config.Builder().port(port).host("127.0.0.1").resource("/suspend", new AtmosphereHandler() {
private final AtomicBoolean b = new AtomicBoolean(false);
@Override
public void onRequest(Atmosphe... | wasync | positive | 437,076 |
public static int checkKnowLog(BigInteger c, BigInteger d, BigInteger g, BigInteger x, int version) throws SMException {
BigInteger gd = g.modPow(d, MODULUS_S);
BigInteger xc = x.modPow(c, MODULUS_S);
BigInteger gdxc = gd.multiply(xc).mod(MODULUS_S);
BigInteger hgdxc;
try {
MessageDigest sha256 = MessageDigest.getInsta... | public static int checkKnowLog(BigInteger c, BigInteger d, BigInteger g, BigInteger x, int version) throws SMException {
BigInteger gd = g.modPow(d, MODULUS_S);
BigInteger xc = x.modPow(c, MODULUS_S);
BigInteger gdxc = gd.multiply(xc).mod(MODULUS_S);
<DeepExtract>
BigInteger hgdxc;
try {
MessageDigest sha256 = MessageD... | otr4j | positive | 437,077 |
public byte[] compose() {
packet = new ArrayList<Byte>();
packet.add(OFFSET_SOF, SOF);
packet.add(OFFSET_LENGTH, getLength());
packet.add(OFFSET_NULL, NULL);
packet.add(OFFSET_CMD, (byte) command);
if (this.payload != null) {
this.packet.addAll(OFFSET_PAYLOAD, this.payload);
}
byte[] crc16 = CRC16.calculate(toBytes(), ... | public byte[] compose() {
packet = new ArrayList<Byte>();
packet.add(OFFSET_SOF, SOF);
packet.add(OFFSET_LENGTH, getLength());
packet.add(OFFSET_NULL, NULL);
packet.add(OFFSET_CMD, (byte) command);
if (this.payload != null) {
this.packet.addAll(OFFSET_PAYLOAD, this.payload);
}
byte[] crc16 = CRC16.calculate(toBytes(), ... | xDrip | positive | 437,078 |
@Override
public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
if (cs.getString(columnIndex) == null) {
return null;
}
return ArrayUtil.contains(this.type.getInterfaces(), BaseEnum.class) ? Arrays.stream(this.type.getEnumConstants()).filter(baseEnum -> ((BaseEnum) baseEnum).eq(cs.getS... | @Override
public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
<DeepExtract>
if (cs.getString(columnIndex) == null) {
return null;
}
return ArrayUtil.contains(this.type.getInterfaces(), BaseEnum.class) ? Arrays.stream(this.type.getEnumConstants()).filter(baseEnum -> ((BaseEnum) baseEn... | albedo | positive | 437,079 |
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
iprot.readStructBegin();
while (true) {
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch(field.id) {
case 1:
if (field.type == org.apache.thrift7.protocol.TType... | public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
<DeepExtract>
</DeepExtract>
iprot.readStructBegin();
<DeepExtract>
</DeepExtract>
while (true) {
<DeepExtract>
</DeepExtract>
field = iprot.readFieldBegin();
<DeepExtract>
</DeepExtract>
if (field.type == org.apache.th... | storm-kestrel | positive | 437,080 |
public ListNode reverseList(ListNode head) {
if (head == null || head.next == null)
return head;
ListNode secondElem = head.next;
head.next = null;
ListNode rev = reverseList(secondElem);
if (rev == null && head == null)
rev = null;
else if (rev == null || head == null)
rev = rev == null ? head : rev;
else {
ListNode h... | public ListNode reverseList(ListNode head) {
if (head == null || head.next == null)
return head;
ListNode secondElem = head.next;
head.next = null;
ListNode rev = reverseList(secondElem);
<DeepExtract>
if (rev == null && head == null)
rev = null;
else if (rev == null || head == null)
rev = rev == null ? head : rev;
els... | coding | positive | 437,081 |
@Override
public boolean onLongClick(View view) {
DialogFragment dialog = new DownloadContextMenu();
Bundle args = new Bundle();
args.putLong(DownloadContextMenu.EXTRA_GALLERY, download.getId());
args.putString(DownloadContextMenu.EXTRA_TITLE, download.getGallery().getTitle());
dialog.setArguments(args);
dialog.show(((... | @Override
public boolean onLongClick(View view) {
<DeepExtract>
DialogFragment dialog = new DownloadContextMenu();
Bundle args = new Bundle();
args.putLong(DownloadContextMenu.EXTRA_GALLERY, download.getId());
args.putString(DownloadContextMenu.EXTRA_TITLE, download.getGallery().getTitle());
dialog.setArguments(args);
... | ehreader-android | positive | 437,082 |
@Override
public void init(LayoutInflater inflater, ViewGroup container) {
context = inflater.getContext();
view = inflater.inflate(R.layout.item_file, container, false);
mFileIcon = (ImageView) view.findViewById(R.id.fileIcon);
mFileName = (TextView) view.findViewById(R.id.fileName);
mTimeSize = (TextView) view.findVi... | @Override
public void init(LayoutInflater inflater, ViewGroup container) {
context = inflater.getContext();
view = inflater.inflate(R.layout.item_file, container, false);
<DeepExtract>
mFileIcon = (ImageView) view.findViewById(R.id.fileIcon);
mFileName = (TextView) view.findViewById(R.id.fileName);
mTimeSize = (TextVie... | FlyWoo | positive | 437,083 |
public boolean roomInInventory(ItemStack item) {
if ((SLOT_INVENTORY_START == -1) || (SLOT_INVENTORY_END == -1)) {
return false;
}
if (item.isEmpty()) {
return false;
}
int stackSize = item.getCount();
boolean hasRoom = false;
for (int i = SLOT_INVENTORY_START; i <= SLOT_INVENTORY_END; i++) {
if (slots[i].isEmpty()) {
... | public boolean roomInInventory(ItemStack item) {
if ((SLOT_INVENTORY_START == -1) || (SLOT_INVENTORY_END == -1)) {
return false;
}
if (item.isEmpty()) {
return false;
}
int stackSize = item.getCount();
boolean hasRoom = false;
for (int i = SLOT_INVENTORY_START; i <= SLOT_INVENTORY_END; i++) {
if (slots[i].isEmpty()) {
... | ProgressiveAutomation | positive | 437,087 |
public static String mid(String str, int pos, int len) {
if (str == null) {
return null;
}
if (len < 0 || pos > str.length()) {
return EMPTY;
}
if (pos < 0) {
pos = 0;
}
if (str.length() <= pos + len) {
return str.substring(pos);
}
if (pos == null) {
return null;
}
if (pos + len < 0) {
pos + len = pos.length() + pos + ... | public static String mid(String str, int pos, int len) {
if (str == null) {
return null;
}
if (len < 0 || pos > str.length()) {
return EMPTY;
}
if (pos < 0) {
pos = 0;
}
if (str.length() <= pos + len) {
return str.substring(pos);
}
<DeepExtract>
if (pos == null) {
return null;
}
if (pos + len < 0) {
pos + len = pos.len... | xposed-art | positive | 437,088 |
@Override
public RequestResult get(String path) {
if (stop)
throw new IllegalStateException("BatchRequest already executed");
return this.operations.record(Methods.GET, path, null, getBaseUri());
} | @Override
public RequestResult get(String path) {
<DeepExtract>
if (stop)
throw new IllegalStateException("BatchRequest already executed");
return this.operations.record(Methods.GET, path, null, getBaseUri());
</DeepExtract>
} | neo4j-java-rest-binding | positive | 437,089 |
public static void openPage(MainActivity activity, String url, boolean headless) {
Bundle args = new Bundle();
args.putBoolean("headless", headless);
if (null != null && null != null) {
args.putStringArray("tabs", null);
args.putStringArray("tabUrls", null);
}
args.putString("url", url);
FragmentWeb fragment = new Frag... | public static void openPage(MainActivity activity, String url, boolean headless) {
<DeepExtract>
Bundle args = new Bundle();
args.putBoolean("headless", headless);
if (null != null && null != null) {
args.putStringArray("tabs", null);
args.putStringArray("tabUrls", null);
}
args.putString("url", url);
FragmentWeb fragm... | SteamTrade | positive | 437,094 |
@Override
public String execute() {
uploadPermNews(loadAccessToken(), accessToken, items);
} | @Override
public String execute() {
<DeepExtract>
uploadPermNews(loadAccessToken(), accessToken, items);
</DeepExtract>
} | wechat | positive | 437,095 |
public void editPressureReading(long oldId, PressureReading reading) {
realm.beginTransaction();
getPressureReading(oldId).deleteFromRealm();
realm.commitTransaction();
realm.beginTransaction();
reading.setId(getNextKey("pressure"));
realm.copyToRealm(reading);
realm.commitTransaction();
} | public void editPressureReading(long oldId, PressureReading reading) {
realm.beginTransaction();
getPressureReading(oldId).deleteFromRealm();
realm.commitTransaction();
<DeepExtract>
realm.beginTransaction();
reading.setId(getNextKey("pressure"));
realm.copyToRealm(reading);
realm.commitTransaction();
</DeepExtract>
} | glucosio-android | positive | 437,099 |
@Test
void testFirefoxArm() {
WebDriverManager wdm = WebDriverManager.firefoxdriver();
wdm.forceDownload();
wdm.driverVersion("0.29.1").mac().arch64().setup();
String driverPath = wdm.getDownloadedDriverPath();
log.debug("Driver path (arch={} driverVersion={} OS={}) {}", wdm.config().getArchitecture(), wdm.config().get... | @Test
void testFirefoxArm() {
WebDriverManager wdm = WebDriverManager.firefoxdriver();
wdm.forceDownload();
<DeepExtract>
wdm.driverVersion("0.29.1").mac().arch64().setup();
String driverPath = wdm.getDownloadedDriverPath();
log.debug("Driver path (arch={} driverVersion={} OS={}) {}", wdm.config().getArchitecture(), wd... | webdrivermanager | positive | 437,100 |
public byte[] getBytes() {
SecureRandom realRandomGenerator = new SecureRandom();
byte[] result = new byte[0 + Math.abs(realRandomGenerator.nextInt()) % 256];
realRandomGenerator.nextBytes(result);
return result;
} | public byte[] getBytes() {
<DeepExtract>
SecureRandom realRandomGenerator = new SecureRandom();
byte[] result = new byte[0 + Math.abs(realRandomGenerator.nextInt()) % 256];
realRandomGenerator.nextBytes(result);
return result;
</DeepExtract>
} | matasano-cryptopals-solutions | positive | 437,101 |
@Override
public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand hand) {
ItemStack itemStackIn = playerIn.getHeldItem(hand);
if (!worldIn.isRemote) {
return new ActionResult(ActionResultType.PASS, itemStackIn);
}
final float PARTIAL_TICKS = 1.0F;
Vector3d playerLook = playerIn.getLoo... | @Override
public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand hand) {
ItemStack itemStackIn = playerIn.getHeldItem(hand);
if (!worldIn.isRemote) {
return new ActionResult(ActionResultType.PASS, itemStackIn);
}
final float PARTIAL_TICKS = 1.0F;
Vector3d playerLook = playerIn.getLoo... | MinecraftByExample | positive | 437,102 |
public void l(int textID) {
if (null == mToast) {
return;
}
mToast.setText(textID);
mToast.setDuration(Toast.LENGTH_LONG);
mToast.show();
} | public void l(int textID) {
if (null == mToast) {
return;
}
mToast.setText(textID);
<DeepExtract>
mToast.setDuration(Toast.LENGTH_LONG);
mToast.show();
</DeepExtract>
} | OkCalendar | positive | 437,104 |
public synchronized void beginTask(String shortText, String longText, boolean inline, int tasklevel) {
if (silent >= 0)
return;
boolean active = (loglevel & tasklevel) > 0;
if (!active) {
tasks.push(null);
return;
}
if (!lightweight.empty() && lightweight.peek()) {
lightweight.pop();
lightweight.push(false);
out.printl... | public synchronized void beginTask(String shortText, String longText, boolean inline, int tasklevel) {
if (silent >= 0)
return;
boolean active = (loglevel & tasklevel) > 0;
if (!active) {
tasks.push(null);
return;
}
if (!lightweight.empty() && lightweight.peek()) {
lightweight.pop();
lightweight.push(false);
out.printl... | sugarj | positive | 437,105 |
public Criteria andChildordertypeIn(List<Integer> values) {
if (values == null) {
throw new RuntimeException("Value for " + "childordertype" + " cannot be null");
}
criteria.add(new Criterion("childOrderType in", values));
return (Criteria) this;
} | public Criteria andChildordertypeIn(List<Integer> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "childordertype" + " cannot be null");
}
criteria.add(new Criterion("childOrderType in", values));
</DeepExtract>
return (Criteria) this;
} | garbage-collection | positive | 437,107 |
public static boolean setUseMTRFont(boolean value) {
useMTRFont = value;
System.out.println("Wrote MTR mod config to file");
final JsonObject jsonConfig = new JsonObject();
jsonConfig.addProperty(USE_MTR_FONT_KEY, useMTRFont);
jsonConfig.addProperty(SHOW_ANNOUNCEMENT_MESSAGES, showAnnouncementMessages);
jsonConfig.addP... | public static boolean setUseMTRFont(boolean value) {
useMTRFont = value;
<DeepExtract>
System.out.println("Wrote MTR mod config to file");
final JsonObject jsonConfig = new JsonObject();
jsonConfig.addProperty(USE_MTR_FONT_KEY, useMTRFont);
jsonConfig.addProperty(SHOW_ANNOUNCEMENT_MESSAGES, showAnnouncementMessages);
j... | Minecraft-Transit-Railway | positive | 437,110 |
private void copyBigDataBase() throws IOException {
String outFileName = DB_PATH + DB_NAME;
OutputStream myOutput = new FileOutputStream(outFileName);
for (int i = ASSETS_SUFFIX_BEGIN; i < ASSETS_SUFFIX_END + 1; i++) {
myInput = myContext.getAssets().open(ASSETS_NAME + "." + i);
byte[] buffer = new byte[1024];
int leng... | private void copyBigDataBase() throws IOException {
String outFileName = DB_PATH + DB_NAME;
OutputStream myOutput = new FileOutputStream(outFileName);
for (int i = ASSETS_SUFFIX_BEGIN; i < ASSETS_SUFFIX_END + 1; i++) {
myInput = myContext.getAssets().open(ASSETS_NAME + "." + i);
byte[] buffer = new byte[1024];
int leng... | iBuka | positive | 437,111 |
@Override
public void destroy() throws Exception {
log.info("清除applicationContext = {}", SpringUtil.applicationContext);
SpringUtil.applicationContext = null;
} | @Override
public void destroy() throws Exception {
<DeepExtract>
log.info("清除applicationContext = {}", SpringUtil.applicationContext);
SpringUtil.applicationContext = null;
</DeepExtract>
} | lion | positive | 437,112 |
private void init_mapView() {
mMapView = (MapView) findViewById(R.id.myOSMmapview);
MapController mController = mMapView.getController();
mMapView.setTileSource(TileSourceFactory.MAPNIK);
mMapView.setBuiltInZoomControls(true);
mMapView.setMultiTouchControls(true);
LatLng latLng;
LocationManager locationManager = (Locat... | private void init_mapView() {
mMapView = (MapView) findViewById(R.id.myOSMmapview);
MapController mController = mMapView.getController();
mMapView.setTileSource(TileSourceFactory.MAPNIK);
mMapView.setBuiltInZoomControls(true);
mMapView.setMultiTouchControls(true);
<DeepExtract>
LatLng latLng;
LocationManager locationMa... | phimpme-android-v1 | positive | 437,113 |
@Override
public void updateMeasureState(TextPaint __paint) {
int oldStyle;
Typeface old = __paint.getTypeface();
if (old == null) {
oldStyle = 0;
} else {
oldStyle = old.getStyle();
}
int fake = oldStyle & ~typeface.getStyle();
if ((fake & Typeface.BOLD) != 0) {
__paint.setFakeBoldText(true);
}
if ((fake & Typeface.IT... | @Override
public void updateMeasureState(TextPaint __paint) {
<DeepExtract>
int oldStyle;
Typeface old = __paint.getTypeface();
if (old == null) {
oldStyle = 0;
} else {
oldStyle = old.getStyle();
}
int fake = oldStyle & ~typeface.getStyle();
if ((fake & Typeface.BOLD) != 0) {
__paint.setFakeBoldText(true);
}
if ((fake... | android-libs | positive | 437,114 |
public void setTitleRightText(CharSequence title, CharSequence subTitle, CharSequence rightText) {
if (title != null) {
mStvTitle.setText(title);
} else {
mStvTitle.setVisibility(View.GONE);
}
if (subTitle != null) {
mHtvSubTitle.setText(subTitle);
} else {
mHtvSubTitle.setVisibility(View.GONE);
}
if (mHtvRightText != ... | public void setTitleRightText(CharSequence title, CharSequence subTitle, CharSequence rightText) {
<DeepExtract>
if (title != null) {
mStvTitle.setText(title);
} else {
mStvTitle.setVisibility(View.GONE);
}
if (subTitle != null) {
mHtvSubTitle.setText(subTitle);
} else {
mHtvSubTitle.setVisibility(View.GONE);
}
</DeepE... | Android-OpenSource-momo | positive | 437,115 |
@Override
public void animateTo(GeoPointImpl geoPoint) {
mapController.setCenter((GeoPoint) (GeoPoint) geoPoint);
} | @Override
public void animateTo(GeoPointImpl geoPoint) {
<DeepExtract>
mapController.setCenter((GeoPoint) (GeoPoint) geoPoint);
</DeepExtract>
} | c-geo | positive | 437,117 |
public Criteria andPrincipalIn(List<String> values) {
if (values == null) {
throw new RuntimeException("Value for " + "principal" + " cannot be null");
}
criteria.add(new Criterion("principal in", values));
return (Criteria) this;
} | public Criteria andPrincipalIn(List<String> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "principal" + " cannot be null");
}
criteria.add(new Criterion("principal in", values));
</DeepExtract>
return (Criteria) this;
} | Whome | positive | 437,118 |
PayloadBuilder writeCoords(Coords coords) {
buffer.writeVarInt(coords.getZ());
packet = null;
return this;
} | PayloadBuilder writeCoords(Coords coords) {
<DeepExtract>
buffer.writeVarInt(coords.getZ());
packet = null;
return this;
</DeepExtract>
} | BoundingBoxOutlineReloaded | positive | 437,119 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.