before stringlengths 33 3.21M | after stringlengths 63 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
static <T> String checkAndProcessSelectField(T entity, String... fieldList) {
if (fieldList == null)
return null;
String packageAndClassName = entity.getClass().getName();
String columnsdNames = HoneyContext.getBeanField(packageAndClassName);
if (columnsdNames == null) {
Field[] fields = entity.getClass().getDeclaredFi... | static <T> String checkAndProcessSelectField(T entity, String... fieldList) {
if (fieldList == null)
return null;
String packageAndClassName = entity.getClass().getName();
String columnsdNames = HoneyContext.getBeanField(packageAndClassName);
if (columnsdNames == null) {
Field[] fields = entity.getClass().getDeclaredFi... | honey | positive | 436,208 |
public Object visit(AnyInteracts anyInteracts, Object extraData) {
if (anyInteracts == null) {
throw new NullPointerException("Null filter");
}
Expression e1 = anyInteracts.getExpression1();
Expression e2 = anyInteracts.getExpression2();
if (e1 instanceof Literal && e2 instanceof PropertyName) {
e1 = anyInteracts.getEx... | public Object visit(AnyInteracts anyInteracts, Object extraData) {
<DeepExtract>
if (anyInteracts == null) {
throw new NullPointerException("Null filter");
}
Expression e1 = anyInteracts.getExpression1();
Expression e2 = anyInteracts.getExpression2();
if (e1 instanceof Literal && e2 instanceof PropertyName) {
e1 = anyI... | elasticgeo | positive | 436,209 |
@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
if (mTabsActive) {
if (idx < mLastTab) {
ft.setCustomAnimations(R.animator.fragment_slide_right_enter, R.animator.fragment_slide_right_exit);
} else if (idx > mLastTab) {
ft.setCustomAnimations(R.animator.fragment_slide_left_enter, R.animator.fragme... | @Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
if (mTabsActive) {
if (idx < mLastTab) {
ft.setCustomAnimations(R.animator.fragment_slide_right_enter, R.animator.fragment_slide_right_exit);
} else if (idx > mLastTab) {
ft.setCustomAnimations(R.animator.fragment_slide_left_enter, R.animator.fragme... | ics-openconnect | positive | 436,210 |
@Override
public String getQueueARN() throws JMSException {
if (_isDeleted) {
throw new JMSException("This queue was deleted");
}
return _queueARN;
} | @Override
public String getQueueARN() throws JMSException {
<DeepExtract>
if (_isDeleted) {
throw new JMSException("This queue was deleted");
}
</DeepExtract>
return _queueARN;
} | nevado | positive | 436,211 |
public void insertUpdate(DocumentEvent e) {
iItemModel.refreshData();
String lTitle = iStashName;
if (iStash == null || iItemModel == null) {
lTitle += " (Disconnected)";
} else {
lTitle += " (" + iItemModel.getRowCount() + "/";
lTitle += iStash.getNrItems() + ")" + ((iStash.isModified()) ? "*" : "");
if (iStash.isSC()... | public void insertUpdate(DocumentEvent e) {
<DeepExtract>
iItemModel.refreshData();
String lTitle = iStashName;
if (iStash == null || iItemModel == null) {
lTitle += " (Disconnected)";
} else {
lTitle += " (" + iItemModel.getRowCount() + "/";
lTitle += iStash.getNrItems() + ")" + ((iStash.isModified()) ? "*" : "");
if ... | gomule | positive | 436,212 |
@Override
public void manualChoose(TextChannel channel, Member member, String enumName, String lowercaseDescriptor, Consumer<T> onSelect, String successTitle, Function<T, String> successDescription) {
var fontOptional = Arrays.stream(choosableEnum.getEnumConstants()).filter(enu -> enu.getName().equalsIgnoreCase(enumNam... | @Override
public void manualChoose(TextChannel channel, Member member, String enumName, String lowercaseDescriptor, Consumer<T> onSelect, String successTitle, Function<T, String> successDescription) {
var fontOptional = Arrays.stream(choosableEnum.getEnumConstants()).filter(enu -> enu.getName().equalsIgnoreCase(enumNam... | EmojIDE | positive | 436,213 |
@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());
AML aml = AML.getInstance();
System.out.println("Bui... | @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>
AML aml = AML.getInstan... | AML-Project | positive | 436,214 |
@Override
public UserRecord value9(String value) {
set(8, value);
return this;
} | @Override
public UserRecord value9(String value) {
<DeepExtract>
set(8, value);
</DeepExtract>
return this;
} | springboot-ssm | positive | 436,216 |
@Override
public Void call() {
selectedChild = index;
timeMatch = getChild(index);
return this;
return null;
} | @Override
public Void call() {
<DeepExtract>
selectedChild = index;
timeMatch = getChild(index);
return this;
</DeepExtract>
return null;
} | loom | positive | 436,218 |
@Override
public void requestAbortDownload() {
Message m = Message.obtain(null, MSG_REQUEST_ABORT_DOWNLOAD);
m.setData(new Bundle());
try {
mMsg.send(m);
} catch (RemoteException e) {
e.printStackTrace();
}
} | @Override
public void requestAbortDownload() {
<DeepExtract>
Message m = Message.obtain(null, MSG_REQUEST_ABORT_DOWNLOAD);
m.setData(new Bundle());
try {
mMsg.send(m);
} catch (RemoteException e) {
e.printStackTrace();
}
</DeepExtract>
} | baker-android | positive | 436,219 |
public void writeByteString(String s, int tag) {
if (bs.remaining() < 10 + s.length()) {
int n = (bs.capacity() + 10 + s.length()) * 2;
ByteBuffer bs2 = ByteBuffer.allocate(n);
bs2.put(bs.array(), 0, bs.position());
bs = bs2;
bs2 = null;
}
byte[] by = HexUtil.hexStr2Bytes(s);
if (by.length > 255) {
writeHead(TarsStruct... | public void writeByteString(String s, int tag) {
<DeepExtract>
if (bs.remaining() < 10 + s.length()) {
int n = (bs.capacity() + 10 + s.length()) * 2;
ByteBuffer bs2 = ByteBuffer.allocate(n);
bs2.put(bs.array(), 0, bs.position());
bs = bs2;
bs2 = null;
}
</DeepExtract>
byte[] by = HexUtil.hexStr2Bytes(s);
if (by.length ... | TarsJMeter | positive | 436,220 |
public void actionPerformed(ActionEvent e) {
zoomY.set(zoomY.get() - 1);
Image newImage;
if (zoomX.get() == 1 && zoomY.get() == 1) {
newImage = image;
} else {
newImage = image.getScaledInstance((int) (image.getWidth(frame) * Math.pow(2, zoomX.get())), (int) (image.getHeight(frame) * Math.pow(2, zoomY.get())), Image.SC... | public void actionPerformed(ActionEvent e) {
zoomY.set(zoomY.get() - 1);
<DeepExtract>
Image newImage;
if (zoomX.get() == 1 && zoomY.get() == 1) {
newImage = image;
} else {
newImage = image.getScaledInstance((int) (image.getWidth(frame) * Math.pow(2, zoomX.get())), (int) (image.getHeight(frame) * Math.pow(2, zoomY.get... | ocular | positive | 436,221 |
@Override
public void reload() throws IOException {
super.reload();
save();
} | @Override
<DeepExtract>
</DeepExtract>
public void reload() throws IOException {
<DeepExtract>
</DeepExtract>
super.reload();
<DeepExtract>
</DeepExtract>
save();
<DeepExtract>
</DeepExtract>
} | AT-Rewritten | positive | 436,223 |
public BuguQuery<T> mod(String key, int divisor, int remainder) {
if (Operator.MOD == null) {
condition.put(key, new int[] { divisor, remainder });
return;
}
Object obj = condition.get(key);
if (!(obj instanceof DBObject)) {
DBObject dbo = new BasicDBObject(Operator.MOD, new int[] { divisor, remainder });
condition.put... | public BuguQuery<T> mod(String key, int divisor, int remainder) {
<DeepExtract>
if (Operator.MOD == null) {
condition.put(key, new int[] { divisor, remainder });
return;
}
Object obj = condition.get(key);
if (!(obj instanceof DBObject)) {
DBObject dbo = new BasicDBObject(Operator.MOD, new int[] { divisor, remainder });... | bugu-mongo | positive | 436,224 |
public static void main(String[] args) throws Exception {
Path rootDir = Paths.get(".").normalize().toAbsolutePath();
if (!rootDir.endsWith(TEST_MODULE_NAME)) {
rootDir = Paths.get("." + File.separator + TEST_MODULE_NAME).normalize().toAbsolutePath();
}
final Path resourcesDir = rootDir.resolve("src").resolve("main").r... | public static void main(String[] args) throws Exception {
Path rootDir = Paths.get(".").normalize().toAbsolutePath();
if (!rootDir.endsWith(TEST_MODULE_NAME)) {
rootDir = Paths.get("." + File.separator + TEST_MODULE_NAME).normalize().toAbsolutePath();
}
final Path resourcesDir = rootDir.resolve("src").resolve("main").r... | jaxb2-rich-contract-plugin | positive | 436,227 |
@Override
public void onPageSelected(int position) {
for (int i = 0; i < 8; i++) {
if (i == position) {
btns[i].setEnabled(false);
} else {
btns[i].setEnabled(true);
}
}
} | @Override
public void onPageSelected(int position) {
<DeepExtract>
for (int i = 0; i < 8; i++) {
if (i == position) {
btns[i].setEnabled(false);
} else {
btns[i].setEnabled(true);
}
}
</DeepExtract>
} | XTaobao | positive | 436,231 |
@Test
public void publishLargerThanMaxMessageSize(TestContext context) {
this.async = context.async();
this.expectReceiveMsg = false;
try {
MemoryPersistence persistence = new MemoryPersistence();
MqttClient client = new MqttClient(String.format("ws://%s:%d", MQTT_SERVER_HOST, MQTT_SERVER_PORT), "12345", persistence);
... | @Test
public void publishLargerThanMaxMessageSize(TestContext context) {
<DeepExtract>
this.async = context.async();
this.expectReceiveMsg = false;
try {
MemoryPersistence persistence = new MemoryPersistence();
MqttClient client = new MqttClient(String.format("ws://%s:%d", MQTT_SERVER_HOST, MQTT_SERVER_PORT), "12345", ... | vertx-mqtt | positive | 436,232 |
@Override
public void onUnitRenegade(Unit u) {
if (A.now() <= 20) {
return;
}
OnUnitDestroyed.update(AUnit.createFrom(u));
AUnit newUnit = AUnit.createFrom(u);
OnUnitRenegade.update(newUnit);
} | @Override
public void onUnitRenegade(Unit u) {
<DeepExtract>
if (A.now() <= 20) {
return;
}
OnUnitDestroyed.update(AUnit.createFrom(u));
</DeepExtract>
AUnit newUnit = AUnit.createFrom(u);
OnUnitRenegade.update(newUnit);
} | Atlantis | positive | 436,233 |
public Criteria andMenuParm2IsNull() {
if ("MENU_PARM2 is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("MENU_PARM2 is null"));
return (Criteria) this;
} | public Criteria andMenuParm2IsNull() {
<DeepExtract>
if ("MENU_PARM2 is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("MENU_PARM2 is null"));
</DeepExtract>
return (Criteria) this;
} | console | positive | 436,234 |
@Override
public boolean onTouch(View v, MotionEvent event) {
x = event.getRawX();
y = event.getRawY();
mIsShow = false;
mIsHide = false;
if (mTimer != null && mTimerTask != null) {
mTimer.cancel();
mTimer = null;
mTimerTask = null;
}
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN:
state = MotionEvent.ACTION_... | @Override
public boolean onTouch(View v, MotionEvent event) {
<DeepExtract>
x = event.getRawX();
y = event.getRawY();
mIsShow = false;
mIsHide = false;
if (mTimer != null && mTimerTask != null) {
mTimer.cancel();
mTimer = null;
mTimerTask = null;
}
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN:
state = Motio... | RePlugin-GameSdk | positive | 436,235 |
private void showStateContent() {
fab.setVisibility(View.VISIBLE);
progress.setVisibility(View.GONE);
recyclerView.setVisibility(View.VISIBLE);
errorContainer.setVisibility(View.GONE);
final View root = getView();
if (root != null) {
final View cardHostScrollView = root.findViewById(R.id.cardHostScrollView);
ViewUtils.... | private void showStateContent() {
fab.setVisibility(View.VISIBLE);
progress.setVisibility(View.GONE);
recyclerView.setVisibility(View.VISIBLE);
errorContainer.setVisibility(View.GONE);
<DeepExtract>
final View root = getView();
if (root != null) {
final View cardHostScrollView = root.findViewById(R.id.cardHostScrollVie... | PainlessMusicPlayer | positive | 436,236 |
public static void v(final String tag, final String msg) {
if (logToFile && logWriter != null) {
try {
logWriter.write(dfm.format(new Date(System.currentTimeMillis())) + " " + "V" + "/" + tag + ": " + msg + "\n");
logWriter.flush();
} catch (final IOException e) {
android.util.Log.e(TAG, android.util.Log.getStackTraceS... | public static void v(final String tag, final String msg) {
if (logToFile && logWriter != null) {
try {
logWriter.write(dfm.format(new Date(System.currentTimeMillis())) + " " + "V" + "/" + tag + ": " + msg + "\n");
logWriter.flush();
} catch (final IOException e) {
android.util.Log.e(TAG, android.util.Log.getStackTraceS... | Humansense-Android-App | positive | 436,239 |
public synchronized void eraseToBeginOfLine() throws IOException {
try {
m_WriteLock.acquire();
m_TelnetIO.write(m_Terminal.getEraseSequence(EBOL));
if (m_Autoflush) {
flush();
}
} catch (InterruptedException ex) {
log.error("doErase(int)", ex);
} finally {
m_WriteLock.release();
}
} | public synchronized void eraseToBeginOfLine() throws IOException {
<DeepExtract>
try {
m_WriteLock.acquire();
m_TelnetIO.write(m_Terminal.getEraseSequence(EBOL));
if (m_Autoflush) {
flush();
}
} catch (InterruptedException ex) {
log.error("doErase(int)", ex);
} finally {
m_WriteLock.release();
}
</DeepExtract>
} | remotekeyboard | positive | 436,240 |
@Override
public void close() {
if (pinger >= 0) {
server.vertx().cancelTimer(pinger);
pinger = -1;
}
if (ponger >= 0) {
server.vertx().cancelTimer(ponger);
ponger = -1;
}
handler().onClose(this);
socket.close();
} | @Override
public void close() {
<DeepExtract>
if (pinger >= 0) {
server.vertx().cancelTimer(pinger);
pinger = -1;
}
if (ponger >= 0) {
server.vertx().cancelTimer(ponger);
ponger = -1;
}
</DeepExtract>
handler().onClose(this);
socket.close();
} | vertx-stomp | positive | 436,241 |
@Test
public void testEnumTypeFieldsClassBufferPackUnpack() throws Exception {
super.testEnumTypeFieldsClass();
} | @Test
public void testEnumTypeFieldsClassBufferPackUnpack() throws Exception {
<DeepExtract>
super.testEnumTypeFieldsClass();
</DeepExtract>
} | msgpack-java | positive | 436,242 |
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
mPrefs = new SelectProgramFragmentPreferences(getActivity().getApplicationContext());
Action action = (Action) getArguments().getSerializable(EXTRA_SAVED_ACTION);
if (action == Action.QUERY) {
searchAndDownloadButton = (FloatingActionButton) vi... | @Override
public void onViewCreated(View view, Bundle savedInstanceState) {
mPrefs = new SelectProgramFragmentPreferences(getActivity().getApplicationContext());
Action action = (Action) getArguments().getSerializable(EXTRA_SAVED_ACTION);
if (action == Action.QUERY) {
searchAndDownloadButton = (FloatingActionButton) vi... | dhis2-android-trackercapture | positive | 436,243 |
@Override
public void run() {
List<RouteWaypoint> waypoints = createWaypointsFromFTCRGeometry(routes.get(0).getGeometry(), waypointList);
calculateDefaultRoute(waypoints);
} | @Override
public void run() {
<DeepExtract>
List<RouteWaypoint> waypoints = createWaypointsFromFTCRGeometry(routes.get(0).getGeometry(), waypointList);
calculateDefaultRoute(waypoints);
</DeepExtract>
} | here-android-sdk-examples | positive | 436,244 |
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mActivity = requireActivity();
mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
mRecyclerView.addItemDecoration(new DividerItemDecoration(mActivity, DividerItemDecoration.VERTIC... | @Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mActivity = requireActivity();
mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
mRecyclerView.addItemDecoration(new DividerItemDecoration(mActivity, DividerItemDecoration.VERTIC... | XposedSmsCode | positive | 436,246 |
@Override
public Vertex addVertex(Object... keyValues) {
try {
R result = () -> {
makeActive();
ElementHelper.legalPropertyKeyValueArray(keyValues);
if (ElementHelper.getIdValue(keyValues).isPresent())
throw Vertex.Exceptions.userSuppliedIdsNotSupported();
String label = ElementHelper.getLabelValue(keyValues).orElse(OC... | @Override
public Vertex addVertex(Object... keyValues) {
<DeepExtract>
try {
R result = () -> {
makeActive();
ElementHelper.legalPropertyKeyValueArray(keyValues);
if (ElementHelper.getIdValue(keyValues).isPresent())
throw Vertex.Exceptions.userSuppliedIdsNotSupported();
String label = ElementHelper.getLabelValue(keyVal... | orientdb-gremlin | positive | 436,247 |
@Override
public int writeClassDef(ClassDef classDef) {
if (tableOfContents.classDefs.isElementFourByteAligned) {
if (true) {
alignToFourBytesWithZeroFill();
} else {
alignToFourBytes();
}
}
return super.writeClassDef(classDef);
} | @Override
public int writeClassDef(ClassDef classDef) {
<DeepExtract>
if (tableOfContents.classDefs.isElementFourByteAligned) {
if (true) {
alignToFourBytesWithZeroFill();
} else {
alignToFourBytes();
}
}
</DeepExtract>
return super.writeClassDef(classDef);
} | tinker-dex-dump | positive | 436,248 |
public void setBackIcon(int rid, OnClickListener click_call_back) {
if (back_icon == null) {
back_icon = (ImageView) mView.findViewById(R.id.title_imgv_left_icon);
back_icon.setClickable(true);
back_icon.setVisibility(View.VISIBLE);
}
setBackIcon(rid);
back_title.setOnClickListener(click_call_back);
} | public void setBackIcon(int rid, OnClickListener click_call_back) {
<DeepExtract>
if (back_icon == null) {
back_icon = (ImageView) mView.findViewById(R.id.title_imgv_left_icon);
back_icon.setClickable(true);
back_icon.setVisibility(View.VISIBLE);
}
</DeepExtract>
setBackIcon(rid);
back_title.setOnClickListener(click_ca... | MDroid | positive | 436,250 |
public boolean extract_boolean() {
if (!isInitialized)
throw wrapper.extractNotInitialized();
int tc = realType().kind().value();
if (tc != TCKind._tk_boolean) {
String tcName = getTCKindName(tc);
String expectedName = getTCKindName(TCKind._tk_boolean);
throw wrapper.extractWrongType(expectedName, tcName);
}
return (va... | public boolean extract_boolean() {
<DeepExtract>
if (!isInitialized)
throw wrapper.extractNotInitialized();
int tc = realType().kind().value();
if (tc != TCKind._tk_boolean) {
String tcName = getTCKindName(tc);
String expectedName = getTCKindName(TCKind._tk_boolean);
throw wrapper.extractWrongType(expectedName, tcName)... | javancss | positive | 436,251 |
public void run() {
JGAAP_UI_MainForm gui = new JGAAP_UI_MainForm();
gui.setVisible(true);
} | public void run() {
<DeepExtract>
JGAAP_UI_MainForm gui = new JGAAP_UI_MainForm();
gui.setVisible(true);
</DeepExtract>
} | JGAAP | positive | 436,252 |
@Override
public NQLObject visit(UnaryNotExpn e) {
if (log.isDebugEnabled()) {
_evalStack.append(" (");
_evalStack.append(e.getTreeNode().getText());
}
NQLObject result = e.getExpn().accept(this);
if (EvalHandler.isTrue(result))
notResult = Objects.create(false);
else
notResult = Objects.create(true);
if (log.isDebugEn... | @Override
public NQLObject visit(UnaryNotExpn e) {
if (log.isDebugEnabled()) {
_evalStack.append(" (");
_evalStack.append(e.getTreeNode().getText());
}
NQLObject result = e.getExpn().accept(this);
if (EvalHandler.isTrue(result))
notResult = Objects.create(false);
else
notResult = Objects.create(true);
<DeepExtract>
if ... | bowser | positive | 436,253 |
public UpdateUser mapUpdateUser(User user, DirContextOperations ldapUserData) {
UpdateUser.Builder updateBuilder = new UpdateUser.Builder();
for (String scimAttribute : scimLdapAttributes.scimAttributes()) {
String ldapValue = ldapUserData.getStringAttribute(scimLdapAttributes.toLdapAttribute(scimAttribute));
if (ldapV... | public UpdateUser mapUpdateUser(User user, DirContextOperations ldapUserData) {
UpdateUser.Builder updateBuilder = new UpdateUser.Builder();
for (String scimAttribute : scimLdapAttributes.scimAttributes()) {
String ldapValue = ldapUserData.getStringAttribute(scimLdapAttributes.toLdapAttribute(scimAttribute));
if (ldapV... | osiam | positive | 436,254 |
@Override
public void onClick(View view) {
if (mVisible) {
hide();
if (setPosManualBtn != null) {
setPosManualBtn.setVisibility(View.VISIBLE);
}
} else {
show();
if (setPosManualBtn != null) {
setPosManualBtn.setVisibility(View.INVISIBLE);
}
}
final float lat = cityList.get(citySp.getSelectedItemPosition()).Lat;
final ... | @Override
public void onClick(View view) {
if (mVisible) {
hide();
if (setPosManualBtn != null) {
setPosManualBtn.setVisibility(View.VISIBLE);
}
} else {
show();
if (setPosManualBtn != null) {
setPosManualBtn.setVisibility(View.INVISIBLE);
}
}
final float lat = cityList.get(citySp.getSelectedItemPosition()).Lat;
final ... | MuslimMateAndroid | positive | 436,258 |
private void deleteThisFromFile() {
deleteThisFromFile();
new File(location, name).delete();
} | private void deleteThisFromFile() {
<DeepExtract>
deleteThisFromFile();
new File(location, name).delete();
</DeepExtract>
} | Float-Tube | positive | 436,259 |
private JPanel createComponents() {
JLabel itemLabel = new JLabel("Add Item");
itemName = new JTextField(10);
itemName.setEnabled(true);
GridBagLayout gridLayout = new GridBagLayout();
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.gridwidth = 1;
gbc.gridheight = 1;
gbc.weightx = 2... | private JPanel createComponents() {
JLabel itemLabel = new JLabel("Add Item");
itemName = new JTextField(10);
itemName.setEnabled(true);
GridBagLayout gridLayout = new GridBagLayout();
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.gridwidth = 1;
gbc.gridheight = 1;
gbc.weightx = 2... | bagger | positive | 436,260 |
@Override
public void e(String tag, Throwable e) {
if (Log.getStackTraceString(e) == null) {
logE.log(tag, "null");
return;
}
if (Log.getStackTraceString(e).length() < MAX_LINE_LENGTH) {
logE.log(tag, Log.getStackTraceString(e));
return;
}
int subStart = 0;
int subEnd = MAX_LINE_LENGTH;
while (subEnd < Log.getStackTrac... | @Override
public void e(String tag, Throwable e) {
<DeepExtract>
if (Log.getStackTraceString(e) == null) {
logE.log(tag, "null");
return;
}
if (Log.getStackTraceString(e).length() < MAX_LINE_LENGTH) {
logE.log(tag, Log.getStackTraceString(e));
return;
}
int subStart = 0;
int subEnd = MAX_LINE_LENGTH;
while (subEnd < Lo... | QuickDevFramework | positive | 436,261 |
public GuiBase updateAdjustedMousePosition(int rawMouseX, int rawMouseY) {
this.adjustedMouseY = rawMouseY - getGuiPositionY();
return this;
} | public GuiBase updateAdjustedMousePosition(int rawMouseX, int rawMouseY) {
<DeepExtract>
this.adjustedMouseY = rawMouseY - getGuiPositionY();
return this;
</DeepExtract>
} | Equivalent-Exchange-3 | positive | 436,263 |
@Test
public void testGraphAttributeCreationWithInstantValue() {
Name name = TartanImplTestConstants.ATTR_DUMMY_ATTRIBUTE_NAME;
Instant attributeValue = Instant.now();
Metadata metadata = new MockMetadata();
GraphAttribute graphAttribute = new GraphAttribute(name, attributeValue, metadata);
assertEquals(graphAttribute.... | @Test
public void testGraphAttributeCreationWithInstantValue() {
Name name = TartanImplTestConstants.ATTR_DUMMY_ATTRIBUTE_NAME;
Instant attributeValue = Instant.now();
Metadata metadata = new MockMetadata();
GraphAttribute graphAttribute = new GraphAttribute(name, attributeValue, metadata);
<DeepExtract>
assertEquals(g... | universal-graph-client | positive | 436,264 |
private String getIndentBlanks(final int num) {
final StringBuilder builder = new StringBuilder();
for (int i = 0; i < num; i++) {
builder.append(' ');
}
float percentOfRoot = getPercentOfRoot();
if (0 > percentOfRoot) {
percentOfRoot = 0F;
}
final BigDecimal percenOfRoot = new BigDecimal(percentOfRoot, MATH_CONTEXT);
... | private String getIndentBlanks(final int num) {
final StringBuilder builder = new StringBuilder();
for (int i = 0; i < num; i++) {
builder.append(' ');
}
<DeepExtract>
float percentOfRoot = getPercentOfRoot();
if (0 > percentOfRoot) {
percentOfRoot = 0F;
}
final BigDecimal percenOfRoot = new BigDecimal(percentOfRoot, M... | latke | positive | 436,268 |
@Override
public byte[] fill(Random rng, byte[] data) {
int n = data.length;
for (int i = 0; i < n; i++) {
data[i] = (byte) (start + rng.nextInt(range));
}
return data;
} | @Override
public byte[] fill(Random rng, byte[] data) {
<DeepExtract>
int n = data.length;
for (int i = 0; i < n; i++) {
data[i] = (byte) (start + rng.nextInt(range));
}
return data;
</DeepExtract>
} | linkbench | positive | 436,271 |
public static float getScreenInchesByMetrics() {
if (sAppContext == null && Initializer.getAppContext() != null) {
init(Initializer.getAppContext());
}
return sScreenInchesByMetrics;
} | public static float getScreenInchesByMetrics() {
<DeepExtract>
if (sAppContext == null && Initializer.getAppContext() != null) {
init(Initializer.getAppContext());
}
</DeepExtract>
return sScreenInchesByMetrics;
} | StanKoUtils | positive | 436,272 |
@Override
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) componentTree.getLastSelectedPathComponent();
int id = Integer.parseInt(selectedNode.getUserObject().toString().replaceAll("Component ", ""));
selectedComp = id;
logger.info("Setting values for comp... | @Override
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) componentTree.getLastSelectedPathComponent();
int id = Integer.parseInt(selectedNode.getUserObject().toString().replaceAll("Component ", ""));
selectedComp = id;
<DeepExtract>
logger.info("Setting v... | Interface-tool | positive | 436,274 |
public int addVideoTrack(String compressionType, String compressorName, long timeScale, int width, int height, int depth, int syncInterval) throws IOException {
ensureOpen();
if (state == States.FINISHED) {
throw new IOException("Can not write into finished movie.");
}
if (state != States.STARTED) {
writeProlog();
mdat... | public int addVideoTrack(String compressionType, String compressorName, long timeScale, int width, int height, int depth, int syncInterval) throws IOException {
<DeepExtract>
ensureOpen();
if (state == States.FINISHED) {
throw new IOException("Can not write into finished movie.");
}
if (state != States.STARTED) {
write... | monte-screen-recorder | positive | 436,275 |
public final void bindTo(T item) {
subscription.set(Subscriptions.empty());
this.item = item;
subscription.set(onBind(item));
} | public final void bindTo(T item) {
<DeepExtract>
subscription.set(Subscriptions.empty());
</DeepExtract>
this.item = item;
subscription.set(onBind(item));
} | Qiitanium | positive | 436,276 |
@Test
public void mergeSorted2() throws Exception {
expected = Arrays.asList(0, 0, 3, 5, 6, 6, 7, 28);
input = Arrays.asList(Arrays.asList(3, 5, 7), Arrays.asList(0, 6), Arrays.asList(0, 6, 28));
assertEquals(expected, MergeSortedFiles.mergeSorted(input));
} | @Test
public void mergeSorted2() throws Exception {
expected = Arrays.asList(0, 0, 3, 5, 6, 6, 7, 28);
input = Arrays.asList(Arrays.asList(3, 5, 7), Arrays.asList(0, 6), Arrays.asList(0, 6, 28));
<DeepExtract>
assertEquals(expected, MergeSortedFiles.mergeSorted(input));
</DeepExtract>
} | elements-of-programming-interviews-solutions | positive | 436,277 |
public Criteria andBorrowerNameLessThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "borrowerName" + " cannot be null");
}
criteria.add(new Criterion("borrower_name <", value));
return (Criteria) this;
} | public Criteria andBorrowerNameLessThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "borrowerName" + " cannot be null");
}
criteria.add(new Criterion("borrower_name <", value));
</DeepExtract>
return (Criteria) this;
} | BookLibrarySystem | positive | 436,279 |
@Override
public void onDestroyActionMode(ActionMode mode) {
Log.d(TAG, "onDestroyActionMode: called.");
mProjectsRecyclerViewAdapter.clearSelection();
mActionMode = null;
if (mToolbar != null) {
mToolbar.setVisibility(View.VISIBLE);
}
} | @Override
public void onDestroyActionMode(ActionMode mode) {
Log.d(TAG, "onDestroyActionMode: called.");
mProjectsRecyclerViewAdapter.clearSelection();
mActionMode = null;
<DeepExtract>
if (mToolbar != null) {
mToolbar.setVisibility(View.VISIBLE);
}
</DeepExtract>
} | TabianConsulting | positive | 436,280 |
private HttpRequest.Builder newHead(String url) {
if (HttpRequest.BodyPublishers.noBody() == null) {
throw new IllegalArgumentException("body is null but required for " + VERB_HEAD + " to " + url);
}
return HttpRequest.newBuilder().uri(URI.create(url)).timeout(requestTimeout).method(VERB_HEAD, HttpRequest.BodyPublisher... | private HttpRequest.Builder newHead(String url) {
<DeepExtract>
if (HttpRequest.BodyPublishers.noBody() == null) {
throw new IllegalArgumentException("body is null but required for " + VERB_HEAD + " to " + url);
}
return HttpRequest.newBuilder().uri(URI.create(url)).timeout(requestTimeout).method(VERB_HEAD, HttpRequest... | avaje-http | positive | 436,283 |
public void copy(PLUSFile other) {
super.copy(other);
this.origPath = other.getOriginalPath();
this.file = other.getFile();
setObjectType(PLUS_TYPE_DATA);
setObjectSubtype(PLUS_SUBTYPE_FILE);
} | public void copy(PLUSFile other) {
super.copy(other);
this.origPath = other.getOriginalPath();
<DeepExtract>
this.file = other.getFile();
</DeepExtract>
setObjectType(PLUS_TYPE_DATA);
setObjectSubtype(PLUS_SUBTYPE_FILE);
} | plus | positive | 436,284 |
public void createRunOptionGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
{
group.setText(Messages.getString("StartupTab.runOptionGroup_Text"));
GridLayout layout = new GridLayout();
group.setLayout(layout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
group.setLayoutData(gd);
}
Composite... | public void createRunOptionGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
{
group.setText(Messages.getString("StartupTab.runOptionGroup_Text"));
GridLayout layout = new GridLayout();
group.setLayout(layout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
group.setLayoutData(gd);
}
Composite... | idf-eclipse-plugin | positive | 436,285 |
@Override
public void prepareTriangulation(Triangulatable t) {
super.prepareTriangulation(t);
xmax = xmin = _points.get(0).getX();
ymax = ymin = _points.get(0).getY();
for (TriangulationPoint p : _points) {
if (p.getX() > xmax)
xmax = p.getX();
if (p.getX() < xmin)
xmin = p.getX();
if (p.getY() > ymax)
ymax = p.getY();... | @Override
public void prepareTriangulation(Triangulatable t) {
super.prepareTriangulation(t);
xmax = xmin = _points.get(0).getX();
ymax = ymin = _points.get(0).getY();
for (TriangulationPoint p : _points) {
if (p.getX() > xmax)
xmax = p.getX();
if (p.getX() < xmin)
xmin = p.getX();
if (p.getY() > ymax)
ymax = p.getY();... | JCSG | positive | 436,286 |
public int getPrefsX() {
String c = getPrefsValue("x");
if (c == null) {
return Integer.MIN_VALUE;
} else {
return Integer.parseInt(c);
}
} | public int getPrefsX() {
<DeepExtract>
String c = getPrefsValue("x");
if (c == null) {
return Integer.MIN_VALUE;
} else {
return Integer.parseInt(c);
}
</DeepExtract>
} | dalgen | positive | 436,287 |
public Criteria andCellPhoneNumberLike(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "cellPhoneNumber" + " cannot be null");
}
criteria.add(new Criterion("cell_phone_number like", value));
return (Criteria) this;
} | public Criteria andCellPhoneNumberLike(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "cellPhoneNumber" + " cannot be null");
}
criteria.add(new Criterion("cell_phone_number like", value));
</DeepExtract>
return (Criteria) this;
} | CRM | positive | 436,288 |
@Override
public EarthquakeRecord value2(LocalDateTime value) {
set(1, value);
return this;
} | @Override
public EarthquakeRecord value2(LocalDateTime value) {
<DeepExtract>
set(1, value);
</DeepExtract>
return this;
} | blog2019 | positive | 436,290 |
private void showErrorChild(RemoteViews views, int errorStringResource, Context context) {
views.setTextViewText(R.id.textView_no_events, getString(errorStringResource));
views.setDisplayedChild(R.id.viewFlipper, 0);
Intent i = new Intent(context, MainActivity.class);
views.setOnClickPendingIntent(R.id.container, Pendi... | private void showErrorChild(RemoteViews views, int errorStringResource, Context context) {
views.setTextViewText(R.id.textView_no_events, getString(errorStringResource));
<DeepExtract>
views.setDisplayedChild(R.id.viewFlipper, 0);
</DeepExtract>
Intent i = new Intent(context, MainActivity.class);
views.setOnClickPendin... | frisbee | positive | 436,291 |
private void btnXoaTrangActionPerformed(java.awt.event.ActionEvent evt) {
txt_MaNhanVien.setText("");
txt_MaNhanVien.setEnabled(true);
txt_TenNhanVien.setText("");
date_ngaySinh.setDate(null);
txt_DiaChi.setText("");
cbb_VaiTro.setSelectedItem(null);
txt_SDT.setText("");
txt_Email.setText("");
txt_TaiKhoan.setText("");... | private void btnXoaTrangActionPerformed(java.awt.event.ActionEvent evt) {
txt_MaNhanVien.setText("");
txt_MaNhanVien.setEnabled(true);
txt_TenNhanVien.setText("");
date_ngaySinh.setDate(null);
txt_DiaChi.setText("");
cbb_VaiTro.setSelectedItem(null);
txt_SDT.setText("");
txt_Email.setText("");
txt_TaiKhoan.setText("");... | StoreManager | positive | 436,292 |
@Override
public String getCatalog() throws SQLException {
if (isClosed()) {
throw new SQLException("Connection with Redis is closed");
}
return null;
} | @Override
public String getCatalog() throws SQLException {
<DeepExtract>
if (isClosed()) {
throw new SQLException("Connection with Redis is closed");
}
</DeepExtract>
return null;
} | jdbc-redis | positive | 436,293 |
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
DeviceMemoryInfo info = new DeviceMemoryInfo(getActivity());
String total = Formatter.formatFileSize(getActivity(), info.getTotalInternalMemorySize());
String avail = Formatter.formatFileSize(getActivity(),... | @Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
DeviceMemoryInfo info = new DeviceMemoryInfo(getActivity());
String total = Formatter.formatFileSize(getActivity(), info.getTotalInternalMemorySize());
String avail = Formatter.formatFileSize(getActivity(),... | MemoryBooster-Android | positive | 436,295 |
public void drawPolygon(Polygon p) {
this.color = color.getAndroidColor();
paint.setStyle(Paint.Style.STROKE);
Path path = new Path();
path.moveTo(p.get(p.size() - 1).x, p.get(p.size() - 1).y);
for (int i = 0; i < p.size(); i++) {
Point from = p.get(i);
path.lineTo(from.x, from.y);
}
canvas.drawPath(path, paint);
} | public void drawPolygon(Polygon p) {
<DeepExtract>
this.color = color.getAndroidColor();
</DeepExtract>
paint.setStyle(Paint.Style.STROKE);
Path path = new Path();
path.moveTo(p.get(p.size() - 1).x, p.get(p.size() - 1).y);
for (int i = 0; i < p.size(); i++) {
Point from = p.get(i);
path.lineTo(from.x, from.y);
}
canvas... | CanZE | positive | 436,297 |
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_content, container, false);
mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.fragment_content_swiperefreshlayout);
m... | @Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_content, container, false);
<DeepExtract>
mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.fragment_content_swiperef... | HiReader | positive | 436,298 |
public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
InnerA obj = new InnerA();
InnerB obj = new InnerB();
final Method m = InnerB.class.getDeclaredMethod("printName");
m.invoke(obj);
} | public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
InnerA obj = new InnerA();
<DeepExtract>
InnerB obj = new InnerB();
final Method m = InnerB.class.getDeclaredMethod("printName");
m.invoke(obj);
</DeepExtract>
} | core-java | positive | 436,299 |
public static void postInit() {
for (ItemOre ore : OreRegistry.getItemOreRegistry()) {
SagMillRecipeManager.getInstance().addRecipe(new Recipe(new RecipeInput(new ItemStack(ore, 1, 1), true), SagMillRecipeManager.ORE_ENERGY_COST, RecipeBonusType.NONE, new RecipeOutput(new ItemStack(ore, 2, 2))));
}
} | public static void postInit() {
<DeepExtract>
for (ItemOre ore : OreRegistry.getItemOreRegistry()) {
SagMillRecipeManager.getInstance().addRecipe(new Recipe(new RecipeInput(new ItemStack(ore, 1, 1), true), SagMillRecipeManager.ORE_ENERGY_COST, RecipeBonusType.NONE, new RecipeOutput(new ItemStack(ore, 2, 2))));
}
</Deep... | ExNihiloAdscensio | positive | 436,301 |
public void fromInt64Array(long[] data) throws IOException {
if (!targetTypeList[0].equals(Byte.class))
throw new ClassCastException("cannot cast " + data.getClass().getSimpleName() + " to " + targetTypeList[0].getSimpleName() + ". You have to cast the pointer first.");
__io__block.writeFully(__io__address, data, 0, da... | public void fromInt64Array(long[] data) throws IOException {
<DeepExtract>
if (!targetTypeList[0].equals(Byte.class))
throw new ClassCastException("cannot cast " + data.getClass().getSimpleName() + " to " + targetTypeList[0].getSimpleName() + ". You have to cast the pointer first.");
__io__block.writeFully(__io__addres... | org.cakelab.blender.io | positive | 436,302 |
public float evaluate(float x) {
int bx0, bx1;
float rx0, rx1, sx, t, u, v;
if (start) {
start = false;
init();
}
t = x + N;
bx0 = ((int) t) & BM;
bx1 = (bx0 + 1) & BM;
rx0 = t - (int) t;
rx1 = rx0 - 1.0f;
sx = sCurve(rx0);
u = rx0 * g1[p[bx0]];
v = rx1 * g1[p[bx1]];
return 2.3f * lerp(sx, u, v);
} | public float evaluate(float x) {
<DeepExtract>
int bx0, bx1;
float rx0, rx1, sx, t, u, v;
if (start) {
start = false;
init();
}
t = x + N;
bx0 = ((int) t) & BM;
bx1 = (bx0 + 1) & BM;
rx0 = t - (int) t;
rx1 = rx0 - 1.0f;
sx = sCurve(rx0);
u = rx0 * g1[p[bx0]];
v = rx1 * g1[p[bx1]];
return 2.3f * lerp(sx, u, v);
</DeepEx... | instagram-filters-jhlabs-android | positive | 436,303 |
public Fluent mouseup(BiConsumer<Fluent, MouseEvent> listener) {
return listen(Event.MOUSEUP, event -> {
event.stopPropagation();
event -> {
event.stopPropagation();
listener.accept((Fluent) this, (MouseEvent) event);
}.accept((Fluent) this, event);
});
} | public Fluent mouseup(BiConsumer<Fluent, MouseEvent> listener) {
<DeepExtract>
return listen(Event.MOUSEUP, event -> {
event.stopPropagation();
event -> {
event.stopPropagation();
listener.accept((Fluent) this, (MouseEvent) event);
}.accept((Fluent) this, event);
});
</DeepExtract>
} | vertxui | positive | 436,304 |
@Override
public void loadDataSuccess(NoteBean bean) {
noteBean = bean;
setTitle();
lastBean = mDatas.get(0);
sortTv.setText(lastBean.getSortName());
cardItems = new ArrayList<>();
for (int i = 0; i < noteBean.getPayinfo().size(); i++) {
String itemStr = noteBean.getPayinfo().get(i).getPayName();
cardItems.add(itemStr)... | @Override
public void loadDataSuccess(NoteBean bean) {
noteBean = bean;
<DeepExtract>
setTitle();
lastBean = mDatas.get(0);
sortTv.setText(lastBean.getSortName());
cardItems = new ArrayList<>();
for (int i = 0; i < noteBean.getPayinfo().size(); i++) {
String itemStr = noteBean.getPayinfo().get(i).getPayName();
cardItem... | CocoBill | positive | 436,306 |
@Override
public <R> R matchLazy(BiFunction<? super Supplier<T>, ? super Sequence<T>, ? extends R> function, R otherwise) {
return (Supplier<T>) () -> head.apply(this.map(curry(cast(tail))));
} | @Override
public <R> R matchLazy(BiFunction<? super Supplier<T>, ? super Sequence<T>, ? extends R> function, R otherwise) {
<DeepExtract>
return (Supplier<T>) () -> head.apply(this.map(curry(cast(tail))));
</DeepExtract>
} | procrastination | positive | 436,307 |
private void opendVideo() {
if (TextUtils.isEmpty(path) || mContext == null || !isAttached) {
mainHandler.post(new Runnable() {
@Override
public void run() {
if (mediaListenerEvent != null)
mediaListenerEvent.eventError(MediaListenerEvent.EVENT_ERROR, true);
}
});
return;
}
if (libVLC == null) {
libVLC = VLCInstance.ge... | private void opendVideo() {
if (TextUtils.isEmpty(path) || mContext == null || !isAttached) {
mainHandler.post(new Runnable() {
@Override
public void run() {
if (mediaListenerEvent != null)
mediaListenerEvent.eventError(MediaListenerEvent.EVENT_ERROR, true);
}
});
return;
}
if (libVLC == null) {
libVLC = VLCInstance.ge... | VlcVideoView | positive | 436,308 |
private void ensureAmendedPublisherListExists() {
ensureLogsExists();
if (response.logs.amended == null) {
response.logs.amended = new EntityLists();
}
if (response.logs.amended.publishers == null) {
response.logs.amended.publishers = new ArrayList<>();
}
} | private void ensureAmendedPublisherListExists() {
<DeepExtract>
ensureLogsExists();
if (response.logs.amended == null) {
response.logs.amended = new EntityLists();
}
</DeepExtract>
if (response.logs.amended.publishers == null) {
response.logs.amended.publishers = new ArrayList<>();
}
} | TestingApp | positive | 436,310 |
@Override
public void itemStateChanged(ItemEvent e) {
this.readonlyFlag = e.getStateChange() == ItemEvent.SELECTED;
} | @Override
public void itemStateChanged(ItemEvent e) {
<DeepExtract>
this.readonlyFlag = e.getStateChange() == ItemEvent.SELECTED;
</DeepExtract>
} | NBStudio | positive | 436,313 |
private static short[] create__resolver_scanner_key_offsets() {
short[] r = new short[108];
r[0] = 0;
r[1] = 0;
r[2] = 21;
r[3] = 26;
r[4] = 30;
r[5] = 32;
r[6] = 34;
r[7] = 38;
r[8] = 40;
r[9] = 41;
r[10] = 42;
r[11] = 43;
r[12] = 48;
r[13] = 52;
r[14] = 56;
r[15] = 58;
r[16] = 61;
r[17] = 69;
r[18] = 73;
r[19] = 77;
... | private static short[] create__resolver_scanner_key_offsets() {
short[] r = new short[108];
<DeepExtract>
r[0] = 0;
r[1] = 0;
r[2] = 21;
r[3] = 26;
r[4] = 30;
r[5] = 32;
r[6] = 34;
r[7] = 38;
r[8] = 40;
r[9] = 41;
r[10] = 42;
r[11] = 43;
r[12] = 48;
r[13] = 52;
r[14] = 56;
r[15] = 58;
r[16] = 61;
r[17] = 69;
r[18] = 73... | jvyamlb | positive | 436,314 |
public static void show(Activity activity, String text, final Runnable onOK, final Runnable onCancel, boolean ignorable) {
boolean confirm = new UserPreferenceHelper(activity).getValue(R.string.key_setting_show_confirm_dialog, true);
if (!confirm && ignorable) {
onOK.run();
return;
}
final ConfirmDialogFragment fragmen... | public static void show(Activity activity, String text, final Runnable onOK, final Runnable onCancel, boolean ignorable) {
boolean confirm = new UserPreferenceHelper(activity).getValue(R.string.key_setting_show_confirm_dialog, true);
if (!confirm && ignorable) {
onOK.run();
return;
}
final ConfirmDialogFragment fragmen... | SmileEssence | positive | 436,316 |
public static Collection<? extends Certificate> readDERCertificates(InputStream input) throws IOException {
CertificateFactory factory;
try {
factory = CertificateFactory.getInstance("X.509", BouncyCastleProvider.PROVIDER_NAME);
} catch (CertificateException e) {
throw new RuntimeException("Can not initialize Certifica... | public static Collection<? extends Certificate> readDERCertificates(InputStream input) throws IOException {
<DeepExtract>
CertificateFactory factory;
try {
factory = CertificateFactory.getInstance("X.509", BouncyCastleProvider.PROVIDER_NAME);
} catch (CertificateException e) {
throw new RuntimeException("Can not initia... | canl-java | positive | 436,317 |
@Override
public String toString(Shape shape) {
return writeShape(shape, makeNumberFormat(6));
} | @Override
public String toString(Shape shape) {
<DeepExtract>
return writeShape(shape, makeNumberFormat(6));
</DeepExtract>
} | spatial4j | positive | 436,318 |
private void displayElement(Group group, Element el, float x, float y, float alpha) {
boolean isSelected = keyboardSelected(group.name + el.name) || isMouseOverScrollAware(0, y - cell, trayWidth, cell);
if (isSelected) {
el.lastSelected = frameCount;
grayScale = GRAYSCALE_TEXT_SELECTED;
} else {
float deselectionFadeou... | private void displayElement(Group group, Element el, float x, float y, float alpha) {
boolean isSelected = keyboardSelected(group.name + el.name) || isMouseOverScrollAware(0, y - cell, trayWidth, cell);
if (isSelected) {
el.lastSelected = frameCount;
grayScale = GRAYSCALE_TEXT_SELECTED;
} else {
float deselectionFadeou... | ProcessingSketches | positive | 436,322 |
public QueryField matches(Pattern pattern) {
putResult(pattern);
return this;
} | public QueryField matches(Pattern pattern) {
<DeepExtract>
putResult(pattern);
return this;
</DeepExtract>
} | mungbean | positive | 436,324 |
public long getExpiration(K key) {
Assert.notNull(key, "key");
ExpiringEntry<K, V> entry;
readLock.lock();
try {
entry = entries.get(key);
} finally {
readLock.unlock();
}
Assert.element(entry, key);
return TimeUnit.NANOSECONDS.toMillis(entry.expirationNanos.get());
} | public long getExpiration(K key) {
Assert.notNull(key, "key");
<DeepExtract>
ExpiringEntry<K, V> entry;
readLock.lock();
try {
entry = entries.get(key);
} finally {
readLock.unlock();
}
</DeepExtract>
Assert.element(entry, key);
return TimeUnit.NANOSECONDS.toMillis(entry.expirationNanos.get());
} | ProtocolSupportPocketStuff | positive | 436,325 |
private Enum<?> readEnum(final boolean readTag, final RuntimeEnumType constraint) throws IOException {
String writtenName;
if (readTag)
ensureTypeTag(null, TAG_STRING, readTypeTag());
final int nBytes = readSize();
if (nBytes > 0) {
writtenName = m_stringDecoder.decode(m_stream, nBytes);
} else {
writtenName = "";
}
re... | private Enum<?> readEnum(final boolean readTag, final RuntimeEnumType constraint) throws IOException {
<DeepExtract>
String writtenName;
if (readTag)
ensureTypeTag(null, TAG_STRING, readTypeTag());
final int nBytes = readSize();
if (nBytes > 0) {
writtenName = m_stringDecoder.decode(m_stream, nBytes);
} else {
writtenN... | mgen | positive | 436,326 |
public void verifyDirectoryWriteAccess(Path dirPath) throws IOException, HoyaException {
if (!fileSystem.exists(dirPath)) {
throw new FileNotFoundException(dirPath.toString());
}
Path tempFile = new Path(dirPath, "tmp-file-for-checks");
try {
FSDataOutputStream out = null;
out = fileSystem.create(tempFile, true);
IOUti... | public void verifyDirectoryWriteAccess(Path dirPath) throws IOException, HoyaException {
<DeepExtract>
if (!fileSystem.exists(dirPath)) {
throw new FileNotFoundException(dirPath.toString());
}
</DeepExtract>
Path tempFile = new Path(dirPath, "tmp-file-for-checks");
try {
FSDataOutputStream out = null;
out = fileSystem.... | hoya | positive | 436,330 |
private void setactivitiesEnabledFromString(String s) {
this.activitiesEnabled.clear();
for (String t : s.split(" ")) {
String add = t.trim();
if ("".equals(add))
continue;
this.activitiesEnabled.add(add);
}
} | private void setactivitiesEnabledFromString(String s) {
<DeepExtract>
this.activitiesEnabled.clear();
for (String t : s.split(" ")) {
String add = t.trim();
if ("".equals(add))
continue;
this.activitiesEnabled.add(add);
}
</DeepExtract>
} | BHBot | positive | 436,332 |
@Override
public boolean visit(CharacterSet characterSet) {
OutputStream out = new FileOutputStream(characterSet.getValue());
write("CHAR", out);
out.close();
stack.push(characterSet);
if (characterSet.getVersion() != null && characterSet.getVersion().length() > 0) {
write("VERS", characterSet.getVersion());
writeField... | @Override
public boolean visit(CharacterSet characterSet) {
OutputStream out = new FileOutputStream(characterSet.getValue());
write("CHAR", out);
out.close();
stack.push(characterSet);
<DeepExtract>
if (characterSet.getVersion() != null && characterSet.getVersion().length() > 0) {
write("VERS", characterSet.getVersion(... | gedcom5-java | positive | 436,333 |
public Movie getMovie(Long id) {
Movie movie = getService().getMovie(id);
Videos vids = getService().getVideos(movie.getId());
if (vids == null || vids.getResults() == null || vids.getResults().isEmpty()) {
return movie;
}
for (Videos.Video vid : vids.getResults()) {
if (vid.getType().equals("Trailer") && vid.getSite()... | public Movie getMovie(Long id) {
Movie movie = getService().getMovie(id);
<DeepExtract>
Videos vids = getService().getVideos(movie.getId());
if (vids == null || vids.getResults() == null || vids.getResults().isEmpty()) {
return movie;
}
for (Videos.Video vid : vids.getResults()) {
if (vid.getType().equals("Trailer") &&... | Amphitheatre | positive | 436,334 |
public void deleteTriple(Triple triple) {
if (threading) {
checkThreadStatus();
try {
queue.put(new TupleChange(false, store.getTablesDesc(), triple.getSubject(), triple.getPredicate(), triple.getObject()));
} catch (InterruptedException e) {
LOG.error("Issue adding to queue: " + e.getMessage());
throw new HBaseRdfExce... | public void deleteTriple(Triple triple) {
<DeepExtract>
if (threading) {
checkThreadStatus();
try {
queue.put(new TupleChange(false, store.getTablesDesc(), triple.getSubject(), triple.getPredicate(), triple.getObject()));
} catch (InterruptedException e) {
LOG.error("Issue adding to queue: " + e.getMessage());
throw ne... | hbase-rdf | positive | 436,336 |
static Typeface getRobotoMedium(Context context) {
synchronized (cache) {
if (!cache.containsKey("fonts/Roboto-Medium.ttf")) {
try {
Typeface t = Typeface.createFromAsset(context.getAssets(), "fonts/Roboto-Medium.ttf");
cache.put("fonts/Roboto-Medium.ttf", t);
} catch (Exception e) {
Log.e(TAG, "Could not get typeface ... | static Typeface getRobotoMedium(Context context) {
<DeepExtract>
synchronized (cache) {
if (!cache.containsKey("fonts/Roboto-Medium.ttf")) {
try {
Typeface t = Typeface.createFromAsset(context.getAssets(), "fonts/Roboto-Medium.ttf");
cache.put("fonts/Roboto-Medium.ttf", t);
} catch (Exception e) {
Log.e(TAG, "Could not... | Memo | positive | 436,339 |
public void assertAllLinks(String pattern) throws java.lang.Exception {
if (pattern instanceof String && getAllLinks() instanceof String) {
assertEquals((String) pattern, (String) getAllLinks());
} else if (pattern instanceof String && getAllLinks() instanceof String[]) {
assertEquals((String) pattern, (String[]) getAl... | public void assertAllLinks(String pattern) throws java.lang.Exception {
<DeepExtract>
if (pattern instanceof String && getAllLinks() instanceof String) {
assertEquals((String) pattern, (String) getAllLinks());
} else if (pattern instanceof String && getAllLinks() instanceof String[]) {
assertEquals((String) pattern, (S... | selenium-client-factory | positive | 436,343 |
@PreUpdate
public void updateDateUpdated() {
if (now() != null) {
this.dateUpdated = now();
}
} | @PreUpdate
public void updateDateUpdated() {
<DeepExtract>
if (now() != null) {
this.dateUpdated = now();
}
</DeepExtract>
} | starter-kit-spring-maven | positive | 436,345 |
@Override
public byte evaluate(IPAPointsToSetVariable lhs, IPAPointsToSetVariable rhs) {
for (Access accesse : accesses) {
final String name = accesse.variableName;
final String definer = accesse.variableDefiner;
final int vn = accesse.valueNumber;
if (AstTranslator.DEBUG_LEXICAL)
System.err.println(("looking up lexica... | @Override
public byte evaluate(IPAPointsToSetVariable lhs, IPAPointsToSetVariable rhs) {
<DeepExtract>
for (Access accesse : accesses) {
final String name = accesse.variableName;
final String definer = accesse.variableDefiner;
final int vn = accesse.valueNumber;
if (AstTranslator.DEBUG_LEXICAL)
System.err.println(("loo... | Incremental_Points_to_Analysis | positive | 436,346 |
@Test
public void testStartBackupScheduler() {
js = mock(JobScheduler.class);
ss = mock(SchedulerService.class);
jes = mock(JobExecutionService.class);
rts = new MockRecoverableThreadScheduler(0);
et = null;
bt = null;
est = null;
inject(ss, "recoverableThreadScheduler", rts);
inject(ss, "jobScheduler", js);
inject(ss,... | @Test
public void testStartBackupScheduler() {
<DeepExtract>
js = mock(JobScheduler.class);
ss = mock(SchedulerService.class);
jes = mock(JobExecutionService.class);
rts = new MockRecoverableThreadScheduler(0);
et = null;
bt = null;
est = null;
inject(ss, "recoverableThreadScheduler", rts);
inject(ss, "jobScheduler", j... | sherlock | positive | 436,347 |
@Override
public synchronized void updateElementType(String namespace, IMetaStoreElementType elementType) throws MetaStoreException {
boolean waiting = true;
long totalTime = 0L;
while (waiting) {
File lockFile = new File(rootFile, ".lock");
try {
if (lockFile.createNewFile()) {
return;
}
} catch (IOException e) {
thro... | @Override
public synchronized void updateElementType(String namespace, IMetaStoreElementType elementType) throws MetaStoreException {
<DeepExtract>
boolean waiting = true;
long totalTime = 0L;
while (waiting) {
File lockFile = new File(rootFile, ".lock");
try {
if (lockFile.createNewFile()) {
return;
}
} catch (IOExcep... | metastore | positive | 436,349 |
private String reorderedImportsString(ImmutableSortedSet<Import> imports) {
Preconditions.checkArgument(!imports.isEmpty(), "imports");
Import prevImport = imports.iterator().next();
StringBuilder sb = new StringBuilder();
for (Import currImport : imports) {
if (shouldInsertBlankLineFn.apply(prevImport, currImport)) {
... | private String reorderedImportsString(ImmutableSortedSet<Import> imports) {
Preconditions.checkArgument(!imports.isEmpty(), "imports");
Import prevImport = imports.iterator().next();
StringBuilder sb = new StringBuilder();
for (Import currImport : imports) {
if (shouldInsertBlankLineFn.apply(prevImport, currImport)) {
... | google-java-format | positive | 436,350 |
private String writeStrings(String[] strings) {
try {
return new ObjectMapper().writeValueAsString(strings);
} catch (JsonProcessingException e) {
Assert.fail(e.getMessage());
return null;
}
} | private String writeStrings(String[] strings) {
<DeepExtract>
try {
return new ObjectMapper().writeValueAsString(strings);
} catch (JsonProcessingException e) {
Assert.fail(e.getMessage());
return null;
}
</DeepExtract>
} | jsonrpc4j | positive | 436,352 |
@SuppressWarnings("deprecation")
private static void loadModule(String apk, String startClassName) {
Log.i("Xposed", "Loading modules from " + apk);
if (!new File(apk).exists()) {
log(" File does not exist");
return;
}
ClassLoader mcl = new PathClassLoader(apk, BOOTCLASSLOADER);
InputStream is = mcl.getResourceAsStrea... | @SuppressWarnings("deprecation")
private static void loadModule(String apk, String startClassName) {
<DeepExtract>
Log.i("Xposed", "Loading modules from " + apk);
</DeepExtract>
if (!new File(apk).exists()) {
log(" File does not exist");
return;
}
ClassLoader mcl = new PathClassLoader(apk, BOOTCLASSLOADER);
InputStrea... | xposed-art | positive | 436,353 |
@Override
protected TreeItem<RepoFile> getRootTreeItem(DirectoryRepoFile rootDirectory) {
TreeItem<RepoFile> item = new CheckBoxTreeItem<>(rootDirectory);
Text txt = new Text("select all");
txt.setFont(new Font(10));
checkBox = new CheckBoxTreeItem<>(null, txt);
checkBox.selectedProperty().addListener(((observable, old... | @Override
protected TreeItem<RepoFile> getRootTreeItem(DirectoryRepoFile rootDirectory) {
TreeItem<RepoFile> item = new CheckBoxTreeItem<>(rootDirectory);
<DeepExtract>
Text txt = new Text("select all");
txt.setFont(new Font(10));
checkBox = new CheckBoxTreeItem<>(null, txt);
checkBox.selectedProperty().addListener(((o... | Elegit | positive | 436,356 |
@RequestMapping(method = RequestMethod.GET, params = "toLocation")
@WSDoc("Fetch all non-retired alerts according to toLocation")
@ResponseBody()
public String searchByToLocation(@RequestParam("toLocation") String toLocation, HttpServletRequest request) throws ResponseException {
service = Context.getService(RaxaAlertS... | @RequestMapping(method = RequestMethod.GET, params = "toLocation")
@WSDoc("Fetch all non-retired alerts according to toLocation")
@ResponseBody()
public String searchByToLocation(@RequestParam("toLocation") String toLocation, HttpServletRequest request) throws ResponseException {
service = Context.getService(RaxaAlertS... | raxacore | positive | 436,357 |
@Test
public void fileToIgnoreListDontAllowDuplicates() {
FimIgnore fimIgnore = new FimIgnore();
FilePattern filePattern;
filePattern = new FilePattern("foo");
fimIgnore.getFilesToIgnoreLocally().add(filePattern);
FilePattern filePattern;
filePattern = new FilePattern("foo");
fimIgnore.getFilesToIgnoreLocally().add(fil... | @Test
public void fileToIgnoreListDontAllowDuplicates() {
FimIgnore fimIgnore = new FimIgnore();
<DeepExtract>
FilePattern filePattern;
filePattern = new FilePattern("foo");
fimIgnore.getFilesToIgnoreLocally().add(filePattern);
</DeepExtract>
FilePattern filePattern;
filePattern = new FilePattern("foo");
fimIgnore.getF... | fim | positive | 436,359 |
@Override
public Void inTransaction(Handle handle, TransactionStatus arg1) throws Exception {
handle.createStatement(getTableDrop(type, indexName)).execute();
try {
handle.createStatement(prefix + "drop_index").define("table_name", getTableName(type, indexName)).define("index_name", getIndexName(type, indexName)).execu... | @Override
public Void inTransaction(Handle handle, TransactionStatus arg1) throws Exception {
<DeepExtract>
handle.createStatement(getTableDrop(type, indexName)).execute();
try {
handle.createStatement(prefix + "drop_index").define("table_name", getTableName(type, indexName)).define("index_name", getIndexName(type, ind... | st9-proto-service | positive | 436,360 |
@Override
public void onClick(View v) {
for (int i = unitGroup.getChildCount() - 1; i > -1; i--) {
((CheckBox) unitGroup.getChildAt(i)).setChecked(false);
}
button.setChecked(true);
ISizeConverter.CONVERTER = converter;
for (WeakReference<LayerRoot> weakReference : weakReferences) {
LayerRoot layerRoot = weakReference.... | @Override
public void onClick(View v) {
for (int i = unitGroup.getChildCount() - 1; i > -1; i--) {
((CheckBox) unitGroup.getChildAt(i)).setChecked(false);
}
button.setChecked(true);
ISizeConverter.CONVERTER = converter;
<DeepExtract>
for (WeakReference<LayerRoot> weakReference : weakReferences) {
LayerRoot layerRoot = ... | SwissArmyKnife | positive | 436,362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.