before stringlengths 12 3.21M | after stringlengths 41 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
public void setBgSelector() {
StateListDrawable bg = new StateListDrawable();
gd_background.setColor(backgroundColor);
gd_background.setCornerRadius(cornerRadius);
gd_background.setStroke(strokeWidth, strokeColor);
bg.addState(new int[] { -android.R.attr.state_pressed }, gd_background);
if (Build.VERSION.SDK_INT >= Bui... | public void setBgSelector() {
StateListDrawable bg = new StateListDrawable();
<DeepExtract>
gd_background.setColor(backgroundColor);
gd_background.setCornerRadius(cornerRadius);
gd_background.setStroke(strokeWidth, strokeColor);
</DeepExtract>
bg.addState(new int[] { -android.R.attr.state_pressed }, gd_background);
if ... | Shopping | positive | 5,806 |
public void setSharingGroupObject(Group sharingGroupObject) {
this.sharingGroupObject = sharingGroupObject;
return id;
} | public void setSharingGroupObject(Group sharingGroupObject) {
this.sharingGroupObject = sharingGroupObject;
<DeepExtract>
return id;
</DeepExtract>
} | Timeline-App | positive | 5,808 |
@Override
public List<String> sort(List<String> imports) {
for (String anImport : imports) {
String orderItem = getBestMatchingImportOrderItem(anImport);
if (orderItem != null) {
matchingImports.putValue(orderItem, anImport);
} else {
notMatching.add(anImport);
}
}
notMatching.addAll(allImportOrderItems);
for (int i = ... | @Override
public List<String> sort(List<String> imports) {
for (String anImport : imports) {
String orderItem = getBestMatchingImportOrderItem(anImport);
if (orderItem != null) {
matchingImports.putValue(orderItem, anImport);
} else {
notMatching.add(anImport);
}
}
notMatching.addAll(allImportOrderItems);
for (int i = ... | EclipseCodeFormatter | positive | 5,809 |
public Criteria andTypeIn(List<String> values) {
if (values == null) {
throw new RuntimeException("Value for " + "type" + " cannot be null");
}
criteria.add(new Criterion("type in", values));
return (Criteria) this;
} | public Criteria andTypeIn(List<String> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "type" + " cannot be null");
}
criteria.add(new Criterion("type in", values));
</DeepExtract>
return (Criteria) this;
} | BookLibrarySystem | positive | 5,810 |
public List getElementListByName(String findName, boolean isRecursive) {
List result = new LinkedList();
if (new TagNodeNameCondition(findName) == null) {
return result;
}
for (int i = 0; i < children.size(); i++) {
Object item = children.get(i);
if (item instanceof TagNode) {
TagNode currNode = (TagNode) item;
if (new... | public List getElementListByName(String findName, boolean isRecursive) {
<DeepExtract>
List result = new LinkedList();
if (new TagNodeNameCondition(findName) == null) {
return result;
}
for (int i = 0; i < children.size(); i++) {
Object item = children.get(i);
if (item instanceof TagNode) {
TagNode currNode = (TagNode)... | TL-android-app | positive | 5,811 |
public static void main(String[] args) {
StackBasedOnLinkedList stack = new StackBasedOnLinkedList();
Node node = new Node(1, null);
if (top == null) {
top = node;
} else {
node.next = top;
top = node;
}
Node node = new Node(2, null);
if (top == null) {
top = node;
} else {
node.next = top;
top = node;
}
Node node = ne... | public static void main(String[] args) {
StackBasedOnLinkedList stack = new StackBasedOnLinkedList();
Node node = new Node(1, null);
if (top == null) {
top = node;
} else {
node.next = top;
top = node;
}
Node node = new Node(2, null);
if (top == null) {
top = node;
} else {
node.next = top;
top = node;
}
Node node = ne... | algorithm-tutorial | positive | 5,812 |
public Criteria andIdLessThanOrEqualTo(Long value) {
if (value == null) {
throw new RuntimeException("Value for " + "id" + " cannot be null");
}
criteria.add(new Criterion("id <=", value));
return (Criteria) this;
} | public Criteria andIdLessThanOrEqualTo(Long value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "id" + " cannot be null");
}
criteria.add(new Criterion("id <=", value));
</DeepExtract>
return (Criteria) this;
} | oauth2-resource | positive | 5,813 |
public static void setTranslucentForDrawerLayout(Activity activity, DrawerLayout drawerLayout, @IntRange(from = 0, to = 255) int statusBarAlpha) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VE... | public static void setTranslucentForDrawerLayout(Activity activity, DrawerLayout drawerLayout, @IntRange(from = 0, to = 255) int statusBarAlpha) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VE... | SsrjMvp | positive | 5,814 |
public boolean shutdown() {
final Disruptor<ValueWrapperEvent> temp = disruptor;
if (temp == null) {
return true;
}
this.eventStats.resetAll();
disruptor = null;
try {
temp.shutdown(DEFAULT_RINGBUFFER_SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS);
} catch (final TimeoutException e) {
System.err.println("Disruptor shutdow... | public boolean shutdown() {
final Disruptor<ValueWrapperEvent> temp = disruptor;
if (temp == null) {
return true;
}
this.eventStats.resetAll();
disruptor = null;
try {
temp.shutdown(DEFAULT_RINGBUFFER_SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS);
} catch (final TimeoutException e) {
System.err.println("Disruptor shutdow... | BizHttpRequestTest | positive | 5,816 |
public void run() {
World world = Minecraft.getMinecraft().theWorld;
Entity entity = world.getEntityByID(message.entityID);
if (entity != null) {
EntityCapability<?, ?, Entity> capability = EntityCapabilityHandler.getCapability(message.capability, entity);
if (capability != null) {
capability.readTrackingDataFromNBT(me... | public void run() {
<DeepExtract>
World world = Minecraft.getMinecraft().theWorld;
Entity entity = world.getEntityByID(message.entityID);
if (entity != null) {
EntityCapability<?, ?, Entity> capability = EntityCapabilityHandler.getCapability(message.capability, entity);
if (capability != null) {
capability.readTracking... | Mob-Grinding-Utils | positive | 5,817 |
private void updateTable() throws SBOLValidationException {
TopLevelTableModel tableModel = new TopLevelTableModel(getVariantsCollectionsAndDerivations());
table.setModel(tableModel);
final double factor = 10000;
TableColumnModel model = table.getColumnModel();
for (int columnIndex = 0; columnIndex < tableModel.getWidt... | private void updateTable() throws SBOLValidationException {
TopLevelTableModel tableModel = new TopLevelTableModel(getVariantsCollectionsAndDerivations());
table.setModel(tableModel);
<DeepExtract>
final double factor = 10000;
TableColumnModel model = table.getColumnModel();
for (int columnIndex = 0; columnIndex < tabl... | SBOLDesigner | positive | 5,818 |
public void flush() {
buffer.flip();
NetBuffer old = buffer;
buffer = writableChannel.getBufferFactory().createBuffer(initialSizeHint, dataBufferFactory);
buffer.appendByte((byte) old);
} | public void flush() {
buffer.flip();
NetBuffer old = buffer;
buffer = writableChannel.getBufferFactory().createBuffer(initialSizeHint, dataBufferFactory);
<DeepExtract>
buffer.appendByte((byte) old);
</DeepExtract>
} | Lealone-Plugins | positive | 5,819 |
public void makeCount(org.hibernate.Criteria entityCriteria) throws Exception {
Object countCriteria = entityCriteria;
if (Method_iterateOrderings == null) {
Method_iterateOrderings = countCriteria.getClass().getMethod("iterateOrderings");
}
Iterator<?> orderItr = (Iterator<?>) Method_iterateOrderings.invoke(countCrite... | public void makeCount(org.hibernate.Criteria entityCriteria) throws Exception {
Object countCriteria = entityCriteria;
if (Method_iterateOrderings == null) {
Method_iterateOrderings = countCriteria.getClass().getMethod("iterateOrderings");
}
Iterator<?> orderItr = (Iterator<?>) Method_iterateOrderings.invoke(countCrite... | coke | positive | 5,820 |
@Override
public void actionPerformed(ActionEvent actionEvent) {
Flog.log("Got action from chat button");
FlooHandler flooHandler = context.getFlooHandler();
if (flooHandler == null) {
return;
}
String chatContents = chatInput.getText().trim();
if (chatContents.length() < 1) {
return;
}
flooHandler.editorEventHandler.m... | @Override
public void actionPerformed(ActionEvent actionEvent) {
Flog.log("Got action from chat button");
<DeepExtract>
FlooHandler flooHandler = context.getFlooHandler();
if (flooHandler == null) {
return;
}
String chatContents = chatInput.getText().trim();
if (chatContents.length() < 1) {
return;
}
flooHandler.editor... | floobits-intellij | positive | 5,821 |
@Override
MustacheCompiler doInstantiate(ApplicationContext applicationContext, Environment environment, MustacheTemplateLoader templateLoader) throws Exception {
Mustache.Compiler compiler;
try {
compiler = applicationContext.getBean(Mustache.Compiler.class);
} catch (NoSuchBeanDefinitionException ex) {
log.warn(ex.ge... | @Override
MustacheCompiler doInstantiate(ApplicationContext applicationContext, Environment environment, MustacheTemplateLoader templateLoader) throws Exception {
<DeepExtract>
Mustache.Compiler compiler;
try {
compiler = applicationContext.getBean(Mustache.Compiler.class);
} catch (NoSuchBeanDefinitionException ex) {
... | springmvc-mustache | positive | 5,822 |
public static Builder newBuilder(com.game.pb.server.message.MessageObj.NetMessage prototype) {
if (prototype instanceof com.game.pb.server.message.MessageObj.NetMessage) {
return mergeFrom((com.game.pb.server.message.MessageObj.NetMessage) prototype);
} else {
super.mergeFrom(prototype);
return this;
}
} | public static Builder newBuilder(com.game.pb.server.message.MessageObj.NetMessage prototype) {
<DeepExtract>
if (prototype instanceof com.game.pb.server.message.MessageObj.NetMessage) {
return mergeFrom((com.game.pb.server.message.MessageObj.NetMessage) prototype);
} else {
super.mergeFrom(prototype);
return this;
}
</... | game-server | positive | 5,823 |
@Test
public void testSinceBeginningDateRangeWithShallowCloning() {
InputBuilder inputBuilder = initInputBuilder().addSinceDate(SinceDateArgumentType.FIRST_COMMIT_DATE_SHORTHAND).addUntilDate("2/3/2019").addShallowCloning();
if (true || didNotCloneRepoNormally) {
inputBuilder = inputBuilder.addFreshCloning();
}
RepoSen... | @Test
public void testSinceBeginningDateRangeWithShallowCloning() {
InputBuilder inputBuilder = initInputBuilder().addSinceDate(SinceDateArgumentType.FIRST_COMMIT_DATE_SHORTHAND).addUntilDate("2/3/2019").addShallowCloning();
<DeepExtract>
if (true || didNotCloneRepoNormally) {
inputBuilder = inputBuilder.addFreshClonin... | RepoSense | positive | 5,826 |
@Override
public void caseAOfexprExprFunction(AOfexprExprFunction node) {
if (new UnaryOperatorCompiler(this, node.getExprFunction()) != ExpressionCompiler.this)
throw new RuntimeException("unexpected switch");
invokeOperator(UnaryOperator.TIME, exprString);
} | @Override
public void caseAOfexprExprFunction(AOfexprExprFunction node) {
<DeepExtract>
if (new UnaryOperatorCompiler(this, node.getExprFunction()) != ExpressionCompiler.this)
throw new RuntimeException("unexpected switch");
invokeOperator(UnaryOperator.TIME, exprString);
</DeepExtract>
} | arden2bytecode | positive | 5,827 |
@Test
public void shouldDeserializeAccount() throws Exception {
final String json = Resource.readResource("accounts/account.json", this).readUtf8();
final TypeToken<DataWrapper<DynamicResource>> typeToken = new TypeToken<DataWrapper<DynamicResource>>() {
};
final DataWrapper<DynamicResource> wrapper = gson.fromJson(jso... | @Test
public void shouldDeserializeAccount() throws Exception {
<DeepExtract>
final String json = Resource.readResource("accounts/account.json", this).readUtf8();
final TypeToken<DataWrapper<DynamicResource>> typeToken = new TypeToken<DataWrapper<DynamicResource>>() {
};
final DataWrapper<DynamicResource> wrapper = gso... | coinbase-java | positive | 5,828 |
public Criteria andOuIdGreaterThanOrEqualTo(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "ouId" + " cannot be null");
}
criteria.add(new Criterion("ou_id >=", value));
return (Criteria) this;
} | public Criteria andOuIdGreaterThanOrEqualTo(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "ouId" + " cannot be null");
}
criteria.add(new Criterion("ou_id >=", value));
</DeepExtract>
return (Criteria) this;
} | tools-bar | positive | 5,829 |
@SuppressWarnings("unchecked")
@Test
public void testComplexObjectBehavior2() throws Exception {
Identity id = Identity.root().createChild("waffle", "ketchup");
ComplexThing ct = new ComplexThing();
this.numbers = Lists.<Integer>newArrayList(1, 2, 3, 4, 5);
this.name = "fred";
space.store(id, ct);
String nums = space.g... | @SuppressWarnings("unchecked")
@Test
public void testComplexObjectBehavior2() throws Exception {
Identity id = Identity.root().createChild("waffle", "ketchup");
ComplexThing ct = new ComplexThing();
this.numbers = Lists.<Integer>newArrayList(1, 2, 3, 4, 5);
<DeepExtract>
this.name = "fred";
</DeepExtract>
space.store(i... | atlas | positive | 5,830 |
@Test
public void evictAll_namespaceExpirationRequired_true() throws Exception {
CacheNamespace cacheNamespace = new CacheNamespace("people", true);
spyMemcachedAdapter.evictAll(cacheNamespace);
verify(memcachedClient).incr(eq("hXm.people@"), eq(1), longCaptor.capture(), eq(DEFAULT_NAMESPACE_SEQUENCE_EXPIRY_SECONDS));
... | @Test
public void evictAll_namespaceExpirationRequired_true() throws Exception {
CacheNamespace cacheNamespace = new CacheNamespace("people", true);
spyMemcachedAdapter.evictAll(cacheNamespace);
verify(memcachedClient).incr(eq("hXm.people@"), eq(1), longCaptor.capture(), eq(DEFAULT_NAMESPACE_SEQUENCE_EXPIRY_SECONDS));
... | hibernate4-memcached | positive | 5,831 |
public void POSIRED7(double aDateJulian, int IS, double[] XYZ, double[] VXYZ) {
double[] ELEM = new double[7];
double[] DLO = new double[9];
double T;
T = (aDateJulian - 2444240.0) / 365.25;
for (int IS = 1; IS <= 8; IS++) {
if (IS != 7) {
double S = 0;
for (int I = 1; I <= NTR[5][IS]; I++) {
S = S + getSERIES(I, 1, 2,... | public void POSIRED7(double aDateJulian, int IS, double[] XYZ, double[] VXYZ) {
double[] ELEM = new double[7];
double[] DLO = new double[9];
double T;
T = (aDateJulian - 2444240.0) / 365.25;
for (int IS = 1; IS <= 8; IS++) {
if (IS != 7) {
double S = 0;
for (int I = 1; I <= NTR[5][IS]; I++) {
S = S + getSERIES(I, 1, 2,... | SolarSystemSimulator | positive | 5,832 |
@Override
public void onClick(final View v) {
if (onConfirmListener != null)
onConfirmListener.confirmed(varName, value);
dismiss();
} | @Override
public void onClick(final View v) {
<DeepExtract>
if (onConfirmListener != null)
onConfirmListener.confirmed(varName, value);
</DeepExtract>
dismiss();
} | math-dragon | positive | 5,833 |
@Override
public void run() {
if (!isBound && _isRunning) {
final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
notificationManager.notify(ConfigOptions.NOTIFICATION_ID_PLAYER, buildNotification());
}
} | @Override
public void run() {
<DeepExtract>
if (!isBound && _isRunning) {
final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
notificationManager.notify(ConfigOptions.NOTIFICATION_ID_PLAYER, buildNotification());
}
</DeepExtract>
} | yashlang | positive | 5,834 |
@Test(expected = IllegalArgumentException.class)
public void testPresenceChannelName() {
return new ChannelImpl("presence-my-channel", factory);
} | @Test(expected = IllegalArgumentException.class)
public void testPresenceChannelName() {
<DeepExtract>
return new ChannelImpl("presence-my-channel", factory);
</DeepExtract>
} | pusher-websocket-java | positive | 5,835 |
@Override
public void onInitialized() {
super.onInitialized();
mContrast = mContrast;
setFloat(mContrastLocation, mContrast);
} | @Override
public void onInitialized() {
super.onInitialized();
<DeepExtract>
mContrast = mContrast;
setFloat(mContrastLocation, mContrast);
</DeepExtract>
} | MagicShow | positive | 5,836 |
@Override
public void run() {
if (dialog.getType() != TYPE_PROGRESS)
throw new IllegalArgumentException("dialog is not a progress dialog");
final ProgressDialog progressDialog = (ProgressDialog) dialog;
mPosition = position;
mText = text;
if (sCallbacks != null)
sCallbacks.onProgressUpdate(progressDialog);
} | @Override
public void run() {
if (dialog.getType() != TYPE_PROGRESS)
throw new IllegalArgumentException("dialog is not a progress dialog");
final ProgressDialog progressDialog = (ProgressDialog) dialog;
<DeepExtract>
mPosition = position;
mText = text;
</DeepExtract>
if (sCallbacks != null)
sCallbacks.onProgressUpdate(... | LunVlc | positive | 5,837 |
private void btn_NaActionPerformed(java.awt.event.ActionEvent evt) {
lbl.setText(btn_Na.getText());
X_Z.setText(11 + "");
X_A.removeAllItems();
String[] val = new String[24];
for (int i = 22; i <= val.length; i++) {
val[i] = Integer.toString(i + 0);
X_A.addItem(val[i]);
}
} | private void btn_NaActionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
lbl.setText(btn_Na.getText());
X_Z.setText(11 + "");
X_A.removeAllItems();
String[] val = new String[24];
for (int i = 22; i <= val.length; i++) {
val[i] = Integer.toString(i + 0);
X_A.addItem(val[i]);
}
</DeepExtract>
} | ERSN-OpenMC | positive | 5,839 |
public KinesisVideoClientConfiguration build() {
final String region = this.region;
final String endpoint = this.endpoint;
if (region == null && endpoint == null) {
this.withRegion(KinesisVideoClientConfigurationDefaults.US_WEST_2);
this.withEndpoint(KinesisVideoClientConfigurationDefaults.getControlPlaneEndpoint(this.... | public KinesisVideoClientConfiguration build() {
<DeepExtract>
final String region = this.region;
final String endpoint = this.endpoint;
if (region == null && endpoint == null) {
this.withRegion(KinesisVideoClientConfigurationDefaults.US_WEST_2);
this.withEndpoint(KinesisVideoClientConfigurationDefaults.getControlPlane... | amazon-kinesis-video-streams-producer-sdk-java | positive | 5,840 |
private KieAddressManager configKieAddressManager(ConfigBootstrapProperties configProperties) {
List<String> addresses = URLUtil.dealMultiUrl(configProperties.getServerAddr());
LOGGER.info("initialize config server type={}, address={}.", configProperties.getServerType(), addresses);
return new KieAddressManager(address... | private KieAddressManager configKieAddressManager(ConfigBootstrapProperties configProperties) {
List<String> addresses = URLUtil.dealMultiUrl(configProperties.getServerAddr());
LOGGER.info("initialize config server type={}, address={}.", configProperties.getServerType(), addresses);
<DeepExtract>
return new KieAddressM... | spring-cloud-huawei | positive | 5,841 |
public Criteria andAddressIsNull() {
if ("address is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("address is null"));
return (Criteria) this;
} | public Criteria andAddressIsNull() {
<DeepExtract>
if ("address is null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("address is null"));
</DeepExtract>
return (Criteria) this;
} | Hospital | positive | 5,842 |
public static int indexOf(String s, String pattern) {
int i = 0;
int j = 0;
int slen = s.length();
int plen = pattern.length();
int[] next = new int[plen];
int j = 0;
int k = -1;
int len = pattern.length();
next[0] = -1;
while (j < len - 1) {
if (k == -1 || pattern.charAt(k) == pattern.charAt(j)) {
j++;
k++;
next[j] = ... | public static int indexOf(String s, String pattern) {
int i = 0;
int j = 0;
int slen = s.length();
int plen = pattern.length();
int[] next = new int[plen];
<DeepExtract>
int j = 0;
int k = -1;
int len = pattern.length();
next[0] = -1;
while (j < len - 1) {
if (k == -1 || pattern.charAt(k) == pattern.charAt(j)) {
j++;
k... | dragonshard | positive | 5,844 |
public void activateMenuItem(Page pageLoaded) {
for (NavLink item : allMenuItems) {
item.setActive(false);
}
NavLink activeMenuItem;
switch(pageLoaded) {
case WelcomeScreen:
activeMenuItem = welcomeScreen;
case UserPage:
activeMenuItem = userPage;
case DocumentCreator:
activeMenuItem = documentCreator;
case Settings:
a... | public void activateMenuItem(Page pageLoaded) {
for (NavLink item : allMenuItems) {
item.setActive(false);
}
<DeepExtract>
NavLink activeMenuItem;
switch(pageLoaded) {
case WelcomeScreen:
activeMenuItem = welcomeScreen;
case UserPage:
activeMenuItem = userPage;
case DocumentCreator:
activeMenuItem = documentCreator;
ca... | FilmTit | positive | 5,845 |
public void render(FrameBuffer dest) {
if (enabled && capturing) {
capturing = false;
hasCaptured = true;
composite.end();
return composite.getResultBuffer();
}
return null;
if (!hasCaptured) {
return;
}
Array<PostProcessorEffect> items = enabledEffects;
int count = items.size;
if (count > 0) {
Gdx.gl.glDisable(GL20.GL... | public void render(FrameBuffer dest) {
<DeepExtract>
if (enabled && capturing) {
capturing = false;
hasCaptured = true;
composite.end();
return composite.getResultBuffer();
}
return null;
</DeepExtract>
if (!hasCaptured) {
return;
}
Array<PostProcessorEffect> items = enabledEffects;
int count = items.size;
if (count > ... | exterminate | positive | 5,846 |
public void newTurnStart() {
manaCrystal = Math.min(manaCrystal + 1, CRYSTAL_LIMIT);
alive = manaCrystal;
alive += save;
save = 0;
locked = 0;
locked = overload;
overload = 0;
} | public void newTurnStart() {
manaCrystal = Math.min(manaCrystal + 1, CRYSTAL_LIMIT);
alive = manaCrystal;
alive += save;
save = 0;
locked = 0;
<DeepExtract>
locked = overload;
overload = 0;
</DeepExtract>
} | hearthstone | positive | 5,848 |
public int provideDumpInterval() {
return 1000;
} | public int provideDumpInterval() {
<DeepExtract>
return 1000;
</DeepExtract>
} | PlayTogether | positive | 5,849 |
public void mouseEntered(java.awt.event.MouseEvent evt) {
this.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
} | public void mouseEntered(java.awt.event.MouseEvent evt) {
<DeepExtract>
this.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
</DeepExtract>
} | searchgui | positive | 5,850 |
public static void init(FMLInitializationEvent event) {
if (enableHammer) {
GameRegistry.addRecipe(new ItemStack(itemCarpentersHammer, 1), new Object[] { "XX ", " YX", " Y ", 'X', Items.iron_ingot, 'Y', BlockRegistry.blockCarpentersBlock });
}
if (enableChisel) {
GameRegistry.addRecipe(new ItemStack(itemCarpentersChise... | public static void init(FMLInitializationEvent event) {
<DeepExtract>
if (enableHammer) {
GameRegistry.addRecipe(new ItemStack(itemCarpentersHammer, 1), new Object[] { "XX ", " YX", " Y ", 'X', Items.iron_ingot, 'Y', BlockRegistry.blockCarpentersBlock });
}
if (enableChisel) {
GameRegistry.addRecipe(new ItemStack(itemC... | carpentersblocks | positive | 5,851 |
public void initAttr() {
this.color = mBorderColor;
isColor = true;
invalidate();
mBorderPaint.setStrokeWidth(mBorderWidth);
if (CIRCLE.equals(type)) {
mRadius = (mSize - 2 * mBorderWidth) / 2;
} else if (ROUND.equals(type)) {
mRoundRectF = new RectF(mBorderWidth, mBorderWidth, getWidth() - mBorderWidth, getHeight() - ... | public void initAttr() {
<DeepExtract>
this.color = mBorderColor;
isColor = true;
invalidate();
</DeepExtract>
mBorderPaint.setStrokeWidth(mBorderWidth);
if (CIRCLE.equals(type)) {
mRadius = (mSize - 2 * mBorderWidth) / 2;
} else if (ROUND.equals(type)) {
mRoundRectF = new RectF(mBorderWidth, mBorderWidth, getWidth() -... | BookReader | positive | 5,852 |
@Test
public void should_execute_and_compute_valid_measures_on_UTF8_with_BOM_file_french() {
String relativePath = "my-feature-bom-fr.feature";
DefaultInputFile inputFile = new DefaultInputFile("moduleKey", relativePath).setModuleBaseDir(baseDir.toPath()).setType(InputFile.Type.MAIN).setLanguage(GherkinLanguage.KEY);
c... | @Test
public void should_execute_and_compute_valid_measures_on_UTF8_with_BOM_file_french() {
String relativePath = "my-feature-bom-fr.feature";
DefaultInputFile inputFile = new DefaultInputFile("moduleKey", relativePath).setModuleBaseDir(baseDir.toPath()).setType(InputFile.Type.MAIN).setLanguage(GherkinLanguage.KEY);
c... | sonar-gherkin-plugin | positive | 5,853 |
@Override
public void onClick(View view) {
MediaPlayer mediaPlayer = MediaPlayer.create(getActivity().getBaseContext(), R.raw.keyok2);
mediaPlayer.start();
mOnTrydesktopInteractionListener.onTrydesktopModeChange(1);
} | @Override
public void onClick(View view) {
MediaPlayer mediaPlayer = MediaPlayer.create(getActivity().getBaseContext(), R.raw.keyok2);
mediaPlayer.start();
<DeepExtract>
mOnTrydesktopInteractionListener.onTrydesktopModeChange(1);
</DeepExtract>
} | Trycorder5 | positive | 5,854 |
private int getMinIndexOfReaders(Lock l) {
if (!lockSet.contains(l)) {
lockSet.add(l);
view.put(l, new EfficientLinkedList<ClockPair>());
stackBottomPointerForReader.put(l, new HashMap<Thread, EfficientNode<ClockPair>>());
stackBottomPointerIndexForReader.put(l, new HashMap<Thread, Integer>());
stackEmptyForReader.put(... | private int getMinIndexOfReaders(Lock l) {
<DeepExtract>
if (!lockSet.contains(l)) {
lockSet.add(l);
view.put(l, new EfficientLinkedList<ClockPair>());
stackBottomPointerForReader.put(l, new HashMap<Thread, EfficientNode<ClockPair>>());
stackBottomPointerIndexForReader.put(l, new HashMap<Thread, Integer>());
stackEmpty... | rapid | positive | 5,855 |
private static void install(ClassLoader loader, List<? extends File> additionalClassPathEntries, File optimizedDirectory) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {
Field pathListField;
for (Class<?> clazz = loader.getClass(); clazz ... | private static void install(ClassLoader loader, List<? extends File> additionalClassPathEntries, File optimizedDirectory) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {
Field pathListField;
for (Class<?> clazz = loader.getClass(); clazz ... | fastdex | positive | 5,856 |
public void pred4x4(int[] src, int src_offset, int[] topright, int topright_offset, int stride) {
int a0 = src[src_offset - stride + 0];
int a1 = src[src_offset - stride + 1];
int a2 = src[src_offset - stride + 2];
int a3 = src[src_offset - stride + 3];
src[src_offset + 0 * stride + 0] = a0;
src[src_offset + 0 * stride... | public void pred4x4(int[] src, int src_offset, int[] topright, int topright_offset, int stride) {
<DeepExtract>
int a0 = src[src_offset - stride + 0];
int a1 = src[src_offset - stride + 1];
int a2 = src[src_offset - stride + 2];
int a3 = src[src_offset - stride + 3];
src[src_offset + 0 * stride + 0] = a0;
src[src_offse... | h264j | positive | 5,857 |
private int curToOpac(final IBlockState state) {
return MathHelper.clamp(state.getLightOpacity(), 1, MAX_LIGHT);
} | private int curToOpac(final IBlockState state) {
<DeepExtract>
return MathHelper.clamp(state.getLightOpacity(), 1, MAX_LIGHT);
</DeepExtract>
} | carpetmod112 | positive | 5,858 |
private void startMuteAnimation() {
if (mMuteAnimationSet != null && mMuteAnimationSet.isRunning()) {
mMuteAnimationSet.cancel();
}
if (mMuteAnimationSet != null) {
mMuteAnimationSet.start();
}
} | private void startMuteAnimation() {
<DeepExtract>
if (mMuteAnimationSet != null && mMuteAnimationSet.isRunning()) {
mMuteAnimationSet.cancel();
}
</DeepExtract>
if (mMuteAnimationSet != null) {
mMuteAnimationSet.start();
}
} | SamsungOneUi | positive | 5,859 |
public Criteria andYearRangeLessThanOrEqualTo(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "yearRange" + " cannot be null");
}
criteria.add(new Criterion("year_range <=", value));
return (Criteria) this;
} | public Criteria andYearRangeLessThanOrEqualTo(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "yearRange" + " cannot be null");
}
criteria.add(new Criterion("year_range <=", value));
</DeepExtract>
return (Criteria) this;
} | emotional_analysis | positive | 5,860 |
@Override
public void onComplete(InputStream result) {
this.sessionState.check();
JSONObject result = result.execute();
LiveOperation.Builder builder = new LiveOperation.Builder(result.getMethod(), result.getPath()).result(result);
return builder.build();
} | @Override
public void onComplete(InputStream result) {
<DeepExtract>
this.sessionState.check();
JSONObject result = result.execute();
LiveOperation.Builder builder = new LiveOperation.Builder(result.getMethod(), result.getPath()).result(result);
return builder.build();
</DeepExtract>
} | LiveSDK-for-Android | positive | 5,861 |
@Override
public void updateView() {
Flags flags = simulator.getFlags();
jS.setText(flags.getFlag(Flag.S).toString());
jCy.setText(flags.getFlag(Flag.Cy).toString());
jZ.setText(flags.getFlag(Flag.Z).toString());
jAc.setText(flags.getFlag(Flag.Ac).toString());
jP.setText(flags.getFlag(Flag.P).toString());
jA.setText(si... | @Override
public void updateView() {
Flags flags = simulator.getFlags();
jS.setText(flags.getFlag(Flag.S).toString());
jCy.setText(flags.getFlag(Flag.Cy).toString());
jZ.setText(flags.getFlag(Flag.Z).toString());
jAc.setText(flags.getFlag(Flag.Ac).toString());
jP.setText(flags.getFlag(Flag.P).toString());
jA.setText(si... | 8085 | positive | 5,862 |
@Test
@DataSet("yml/user.yml")
public void shouldNotFindConnectionLeakWhenConnectionIsClosed() throws SQLException {
Connection connection = getConnection();
try (Statement stmt = connection.createStatement()) {
ResultSet resultSet = stmt.executeQuery("select count(*) from user");
assertThat(resultSet.next()).isTrue();... | @Test
@DataSet("yml/user.yml")
public void shouldNotFindConnectionLeakWhenConnectionIsClosed() throws SQLException {
<DeepExtract>
Connection connection = getConnection();
try (Statement stmt = connection.createStatement()) {
ResultSet resultSet = stmt.executeQuery("select count(*) from user");
assertThat(resultSet.nex... | dbunit-rules | positive | 5,863 |
@Override
public Map<String, Class<?>> getTypeMap() throws SQLException {
if (this.isClosed) {
throw new SQLException("connection closed");
}
return this.connection.getTypeMap();
} | @Override
public Map<String, Class<?>> getTypeMap() throws SQLException {
<DeepExtract>
if (this.isClosed) {
throw new SQLException("connection closed");
}
</DeepExtract>
return this.connection.getTypeMap();
} | clearpool | positive | 5,864 |
public Channel withCh_code(String ch_code) {
this.ch_code = ch_code;
return this;
} | public Channel withCh_code(String ch_code) {
<DeepExtract>
this.ch_code = ch_code;
</DeepExtract>
return this;
} | BaiChengNews | positive | 5,865 |
private String getBinaryFileNameFromCurrentDiffLine() {
String[] filePaths = StringUtils.substringAfter(line, UnifiedDiffValues.getBinaryFilesDifferPrefix(line)).trim().split(BLANK);
if (filePaths.length > 0) {
return filePaths[0].trim();
}
return "";
} | private String getBinaryFileNameFromCurrentDiffLine() {
<DeepExtract>
String[] filePaths = StringUtils.substringAfter(line, UnifiedDiffValues.getBinaryFilesDifferPrefix(line)).trim().split(BLANK);
if (filePaths.length > 0) {
return filePaths[0].trim();
}
return "";
</DeepExtract>
} | diff-to-html | positive | 5,866 |
static AccessPredicate hasAllRoles(final String... roles) {
requireNonNull(roles, "roles");
requireNonNull(Arrays.asList(roles), "roles");
return hasAnyRole(Arrays.asList(Arrays.asList(roles)));
} | static AccessPredicate hasAllRoles(final String... roles) {
requireNonNull(roles, "roles");
<DeepExtract>
requireNonNull(Arrays.asList(roles), "roles");
return hasAnyRole(Arrays.asList(Arrays.asList(roles)));
</DeepExtract>
} | grpc-spring-boot-starter | positive | 5,867 |
@Test
public void testDivImproper() {
assertEquals("3", three_I_two.div(one_I_two).toString());
assertEquals("9/2", three_I_two.div(one_I_three).toString());
assertEquals("1", three_I_two.div(three_I_two).toString());
} | @Test
public void testDivImproper() {
assertEquals("3", three_I_two.div(one_I_two).toString());
assertEquals("9/2", three_I_two.div(one_I_three).toString());
<DeepExtract>
assertEquals("1", three_I_two.div(three_I_two).toString());
</DeepExtract>
} | CSE331 | positive | 5,868 |
private void drawCatWrapAround(PImage img, boolean flipHorizontally) {
pg.pushMatrix();
pg.translate(pos.x, pos.y);
if (pos.x < size / 2f) {
pg.translate(width, 0);
}
if (pos.x > width - size / 2f) {
pg.translate(-width, 0);
}
if (pos.y < size / 2f) {
pg.translate(0, height);
}
if (pos.y > height - size / 2f) {
pg.tran... | private void drawCatWrapAround(PImage img, boolean flipHorizontally) {
pg.pushMatrix();
pg.translate(pos.x, pos.y);
if (pos.x < size / 2f) {
pg.translate(width, 0);
}
if (pos.x > width - size / 2f) {
pg.translate(-width, 0);
}
if (pos.y < size / 2f) {
pg.translate(0, height);
}
if (pos.y > height - size / 2f) {
pg.tran... | Sketches | positive | 5,869 |
@EventHandler
public void effect(MTProjectileHitEvent event) {
Player player = event.getPlayer();
ItemStack tool = event.getTool();
if (!player.hasPermission("minetinker.modifiers.ender.use")) {
return;
}
if (!modManager.hasMod(tool, this)) {
return;
}
if (!player.isSneaking()) {
return;
}
Location loc = event.getEvent... | @EventHandler
public void effect(MTProjectileHitEvent event) {
Player player = event.getPlayer();
ItemStack tool = event.getTool();
if (!player.hasPermission("minetinker.modifiers.ender.use")) {
return;
}
if (!modManager.hasMod(tool, this)) {
return;
}
if (!player.isSneaking()) {
return;
}
Location loc = event.getEvent... | MineTinker | positive | 5,871 |
private long getLastAutoIncrementId(String tableName) throws DbException {
long id = -1;
Cursor cursor;
try {
cursor = database.rawQuery("SELECT seq FROM sqlite_sequence WHERE name='" + tableName + "' LIMIT 1".getSql(), "SELECT seq FROM sqlite_sequence WHERE name='" + tableName + "' LIMIT 1".getBindArgsAsStrArray());
}... | private long getLastAutoIncrementId(String tableName) throws DbException {
long id = -1;
<DeepExtract>
Cursor cursor;
try {
cursor = database.rawQuery("SELECT seq FROM sqlite_sequence WHERE name='" + tableName + "' LIMIT 1".getSql(), "SELECT seq FROM sqlite_sequence WHERE name='" + tableName + "' LIMIT 1".getBindArgsAs... | xUtils3 | positive | 5,872 |
@Test
public void testArgumentDouble1() throws Exception {
reparseSingleArgument(1.0, EQUALS_COMPARATOR);
} | @Test
public void testArgumentDouble1() throws Exception {
<DeepExtract>
reparseSingleArgument(1.0, EQUALS_COMPARATOR);
</DeepExtract>
} | JavaOSC | positive | 5,874 |
public static final ChannelBuffer createREQMODWithPreviewLastChunk() throws UnsupportedEncodingException {
ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
buffer.writeBytes("0".getBytes("ASCII"));
buffer.writeBytes(IcapCodecUtil.CRLF);
buffer.writeBytes(IcapCodecUtil.CRLF);
return buffer;
} | public static final ChannelBuffer createREQMODWithPreviewLastChunk() throws UnsupportedEncodingException {
ChannelBuffer buffer = ChannelBuffers.dynamicBuffer();
<DeepExtract>
buffer.writeBytes("0".getBytes("ASCII"));
buffer.writeBytes(IcapCodecUtil.CRLF);
buffer.writeBytes(IcapCodecUtil.CRLF);
</DeepExtract>
return bu... | netty-icap | positive | 5,876 |
public static com.conveyal.transitwand.TransitWandProtos.Upload parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvali... | public static com.conveyal.transitwand.TransitWandProtos.Upload parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
<DeepExtract>
com.conveyal.transitwand.TransitWandProtos.Upload.Route.Point result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(re... | transit-wand | positive | 5,877 |
private void createNameDesc(Document doc, Element node, String name, String desc) {
Element textNode = (Element) doc.createElement(NAME);
node.appendChild(textNode);
if (name == null)
return textNode;
textNode.appendChild(doc.createTextNode(name));
return textNode;
Element textNode = (Element) doc.createElement(DESCRIP... | private void createNameDesc(Document doc, Element node, String name, String desc) {
Element textNode = (Element) doc.createElement(NAME);
node.appendChild(textNode);
if (name == null)
return textNode;
textNode.appendChild(doc.createTextNode(name));
return textNode;
<DeepExtract>
Element textNode = (Element) doc.createE... | xState | positive | 5,878 |
private void defaultBright() {
if (mConfigBean.getBrightness() == -1) {
return;
}
int bright = 0;
try {
bright = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS);
} catch (Settings.SettingNotFoundException e) {
e.printStackTrace();
}
brightSeekBar.setProgress(bright);
mConfigBean... | private void defaultBright() {
if (mConfigBean.getBrightness() == -1) {
return;
}
int bright = 0;
try {
bright = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS);
} catch (Settings.SettingNotFoundException e) {
e.printStackTrace();
}
brightSeekBar.setProgress(bright);
mConfigBean... | BookReader | positive | 5,880 |
@Override
public void init() {
JsonObject manifest = null;
try (ZipFile zipFile = new ZipFile(file)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
if (entry.getName().equals("pack_manifest.json"))
throw new InvalidResourcePackE... | @Override
public void init() {
JsonObject manifest = null;
try (ZipFile zipFile = new ZipFile(file)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
if (entry.getName().equals("pack_manifest.json"))
throw new InvalidResourcePackE... | ProtocolSupportPocketStuff | positive | 5,881 |
public String getFidOfFR() {
if (this.moduleFreeReportFilePath == null)
return null;
if (this.frProp == null)
synchronized (this.obj) {
if (this.frProp == null)
this.frProp = getProperties(this.moduleFreeReportFilePath);
}
return this.frProp.getProperty("fid");
} | public String getFidOfFR() {
<DeepExtract>
if (this.moduleFreeReportFilePath == null)
return null;
if (this.frProp == null)
synchronized (this.obj) {
if (this.frProp == null)
this.frProp = getProperties(this.moduleFreeReportFilePath);
}
return this.frProp.getProperty("fid");
</DeepExtract>
} | ncc-dev-tools | positive | 5,882 |
@Override
public void onRendererInitializationError(Exception e) {
Log.e(TAG, "internalError [" + getSessionTimeString() + ", " + "rendererInitError" + "]", e);
} | @Override
public void onRendererInitializationError(Exception e) {
<DeepExtract>
Log.e(TAG, "internalError [" + getSessionTimeString() + ", " + "rendererInitError" + "]", e);
</DeepExtract>
} | iview-android-tv | positive | 5,883 |
@Before
public void initRepo() {
try {
FileUtils.touch(new File(repoFooDir, "readme.txt"));
} catch (IOException e) {
throw new RuntimeException(e);
}
try {
FileUtils.touch(new File(repoFooDir, "README.MD"));
} catch (IOException e) {
throw new RuntimeException(e);
}
try {
FileUtils.touch(new File(repoFooDir, "example-... | @Before
public void initRepo() {
try {
FileUtils.touch(new File(repoFooDir, "readme.txt"));
} catch (IOException e) {
throw new RuntimeException(e);
}
try {
FileUtils.touch(new File(repoFooDir, "README.MD"));
} catch (IOException e) {
throw new RuntimeException(e);
}
try {
FileUtils.touch(new File(repoFooDir, "example-... | redhat-repository-validator | positive | 5,884 |
public void selectionGrowsAt(double x, double y) {
renderer.selectionGrowsAt(x, y);
if (DefaultApplication.isInstance) {
DefaultApplication.checkTitle();
DefaultApplication.setAliasing(graph.hasAttribute("ui.antialias"));
}
render(getGraphics());
} | public void selectionGrowsAt(double x, double y) {
renderer.selectionGrowsAt(x, y);
<DeepExtract>
if (DefaultApplication.isInstance) {
DefaultApplication.checkTitle();
DefaultApplication.setAliasing(graph.hasAttribute("ui.antialias"));
}
render(getGraphics());
</DeepExtract>
} | gs-ui-javafx | positive | 5,885 |
private static boolean Instruction_1(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "Instruction_1"))
return false;
Marker m = enter_section_(b);
if (!recursion_guard_(b, l + 1, "Mnemonic"))
r = false;
boolean r;
Marker m = enter_section_(b, l + 1, _NONE_, MNEMONIC, "<mnemonic>");
r = consumeTokenSmart(b, GENERAL_O... | private static boolean Instruction_1(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "Instruction_1"))
return false;
Marker m = enter_section_(b);
<DeepExtract>
if (!recursion_guard_(b, l + 1, "Mnemonic"))
r = false;
boolean r;
Marker m = enter_section_(b, l + 1, _NONE_, MNEMONIC, "<mnemonic>");
r = consumeTokenSmar... | JetBrains-NASM-Language | positive | 5,886 |
private void bang() {
ValueAnimator valueAnimator = new ValueAnimator().ofFloat(0, 1).setDuration(ANIMATE_DURATION);
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
progress = (float) animation.getAnimatedValue();
invalidate... | private void bang() {
ValueAnimator valueAnimator = new ValueAnimator().ofFloat(0, 1).setDuration(ANIMATE_DURATION);
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
progress = (float) animation.getAnimatedValue();
invalidate... | Endoscope | positive | 5,887 |
public void h264_qpel_mc_func(int[] dst_base, int dst_offset, int[] src_base, int src_offset, int stride) {
pixels_c(0, 2, dst_base, dst_offset, src_base, src_offset, stride, 2);
} | public void h264_qpel_mc_func(int[] dst_base, int dst_offset, int[] src_base, int src_offset, int stride) {
<DeepExtract>
pixels_c(0, 2, dst_base, dst_offset, src_base, src_offset, stride, 2);
</DeepExtract>
} | h264j | positive | 5,888 |
@Test
public void mustDequeueInAndRequeueIn() {
expected = Arrays.asList(new Message("http:id", "dst:id1", "payload1"), new Message("http:id", "dst:id2", "payload2"), new Message("http:id", "dst:id3", "payload3"));
fixture.queueIn("id", 0, expected);
actual = fixture.dequeueIn("id");
assertEquals(expected.size(), actua... | @Test
public void mustDequeueInAndRequeueIn() {
expected = Arrays.asList(new Message("http:id", "dst:id1", "payload1"), new Message("http:id", "dst:id2", "payload2"), new Message("http:id", "dst:id3", "payload3"));
fixture.queueIn("id", 0, expected);
actual = fixture.dequeueIn("id");
<DeepExtract>
assertEquals(expected... | actors | positive | 5,889 |
public Criteria andFileNotBetween(String value1, String value2) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "file" + " cannot be null");
}
criteria.add(new Criterion("file not between", value1, value2));
return (Criteria) this;
} | public Criteria andFileNotBetween(String value1, String value2) {
<DeepExtract>
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "file" + " cannot be null");
}
criteria.add(new Criterion("file not between", value1, value2));
</DeepExtract>
return (Criteria) this;
} | einvoice | positive | 5,890 |
public void write(org.apache.thrift.protocol.TProtocol oprot, notifyWithoutOneway_result struct) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (struct.testException != null) {
oprot.writeFieldBegin(TEST_EXCEPTION_FIELD_DESC);
struct.testException.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop... | public void write(org.apache.thrift.protocol.TProtocol oprot, notifyWithoutOneway_result struct) throws TException {
<DeepExtract>
</DeepExtract>
oprot.writeStructBegin(STRUCT_DESC);
<DeepExtract>
</DeepExtract>
if (struct.testException != null) {
<DeepExtract>
</DeepExtract>
oprot.writeFieldBegin(TEST_EXCEPTION_FIELD_... | Firefly | positive | 5,891 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
if (sharedPref.getBoolean("pref_keep_screen_on", true)) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
if (savedInstanceState ==... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
if (sharedPref.getBoolean("pref_keep_screen_on", true)) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
if (savedInstanceState ==... | privacy-friendly-sudoku | positive | 5,892 |
public void mouseMoved(MouseEvent evt) {
if (viewer.rfb != null && rfb.inNormalProtocol) {
if (true) {
softCursorMove(evt.getX(), evt.getY());
}
synchronized (rfb) {
try {
rfb.writePointerEvent(evt);
} catch (Exception e) {
e.printStackTrace();
}
rfb.notify();
}
}
} | public void mouseMoved(MouseEvent evt) {
<DeepExtract>
if (viewer.rfb != null && rfb.inNormalProtocol) {
if (true) {
softCursorMove(evt.getX(), evt.getY());
}
synchronized (rfb) {
try {
rfb.writePointerEvent(evt);
} catch (Exception e) {
e.printStackTrace();
}
rfb.notify();
}
}
</DeepExtract>
} | Cloud_Game | positive | 5,893 |
public IfContext elsedo(FaAction a) {
if (a == null)
throw new NullPointerException("parameter a==null");
if (m.containsKey(ELSE)) {
throw new IllegalStateException("context already registered");
}
m.put(ELSE, a);
return this;
} | public IfContext elsedo(FaAction a) {
<DeepExtract>
if (a == null)
throw new NullPointerException("parameter a==null");
if (m.containsKey(ELSE)) {
throw new IllegalStateException("context already registered");
}
m.put(ELSE, a);
return this;
</DeepExtract>
} | monqjfa | positive | 5,894 |
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
final Cursor c = (Cursor) lv.getItemAtPosition(position);
Note n = NoteManager.CursorToNote(c);
noteSelectedListener.onNoteView(n);
} | public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
final Cursor c = (Cursor) lv.getItemAtPosition(position);
Note n = NoteManager.CursorToNote(c);
<DeepExtract>
noteSelectedListener.onNoteView(n);
</DeepExtract>
} | PinDroid | positive | 5,895 |
public static Url newHttpGetUrl(String url) {
Url u = new Url();
u.setUrl(url);
u.setRequestConfigClass(null);
u.setParserClass(null);
u.setProtocolState(Url.PROTOCOL_STATE_HTTP);
u.setRequestState(Url.REQUEST_STATE_GET);
return u;
} | public static Url newHttpGetUrl(String url) {
<DeepExtract>
Url u = new Url();
u.setUrl(url);
u.setRequestConfigClass(null);
u.setParserClass(null);
u.setProtocolState(Url.PROTOCOL_STATE_HTTP);
u.setRequestState(Url.REQUEST_STATE_GET);
return u;
</DeepExtract>
} | SpiderJackson | positive | 5,896 |
@Override
public void login(View view) {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, new LoginFragment()).commit();
} | @Override
public void login(View view) {
<DeepExtract>
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, new LoginFragment()).commit();
</DeepExtract>
} | situp_android_proj | positive | 5,897 |
@Override
public void onFail(String errMsg) {
if (!mView.isActive()) {
return;
}
mView.stopLoading();
mView.showMassage(new Exception(errMsg).getMessage());
} | @Override
public void onFail(String errMsg) {
<DeepExtract>
if (!mView.isActive()) {
return;
}
mView.stopLoading();
mView.showMassage(new Exception(errMsg).getMessage());
</DeepExtract>
} | ClassSchedule | positive | 5,898 |
public boolean restoreAccessibilityFocus(CalendarDay day) {
if ((day.year != mYear) || (day.month != mMonth) || (day.day > mNumCells)) {
return false;
}
getAccessibilityNodeProvider(MonthView.this).performAction(day.day, AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS, null);
return true;
} | public boolean restoreAccessibilityFocus(CalendarDay day) {
if ((day.year != mYear) || (day.month != mMonth) || (day.day > mNumCells)) {
return false;
}
<DeepExtract>
getAccessibilityNodeProvider(MonthView.this).performAction(day.day, AccessibilityNodeInfoCompat.ACTION_ACCESSIBILITY_FOCUS, null);
</DeepExtract>
return ... | HijriDatePicker | positive | 5,899 |
@Override
public void onUpdate(ListDataEvent e) {
if (null != null && null.getValueIsAdjusting()) {
return;
}
if (queueList.getMaxSelectionIndex() >= queueListModel.getSize()) {
return;
}
int size = queueList.getSelectedIndices().length;
SMS sms = (SMS) queueList.getSelectedValue();
Object[] smses = queueList.getSelect... | @Override
public void onUpdate(ListDataEvent e) {
<DeepExtract>
if (null != null && null.getValueIsAdjusting()) {
return;
}
if (queueList.getMaxSelectionIndex() >= queueListModel.getSize()) {
return;
}
int size = queueList.getSelectedIndices().length;
SMS sms = (SMS) queueList.getSelectedValue();
Object[] smses = queue... | esmska | positive | 5,900 |
public Criteria andUpdateByNotBetween(Long value1, Long value2) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "updateBy" + " cannot be null");
}
criteria.add(new Criterion("update_by not between", value1, value2));
return (Criteria) this;
} | public Criteria andUpdateByNotBetween(Long value1, Long value2) {
<DeepExtract>
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "updateBy" + " cannot be null");
}
criteria.add(new Criterion("update_by not between", value1, value2));
</DeepExtract>
return (Criteria) this;
} | CRM | positive | 5,901 |
public Criteria andUsernameGreaterThanOrEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "username" + " cannot be null");
}
criteria.add(new Criterion("username >=", value));
return (Criteria) this;
} | public Criteria andUsernameGreaterThanOrEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "username" + " cannot be null");
}
criteria.add(new Criterion("username >=", value));
</DeepExtract>
return (Criteria) this;
} | springboot-ssm | positive | 5,902 |
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
Log.i(TAG, "onProgressChanged: -->" + (ITEM_HEIGHT_MIN + progress * ITEM_HEIGHT_STEP) * 3);
if (isServiceRunning) {
getContext().startService(new Intent(getContext(), EasyTouchLinearService.class));
} else {
ViewGroup.LayoutParam... | @Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
Log.i(TAG, "onProgressChanged: -->" + (ITEM_HEIGHT_MIN + progress * ITEM_HEIGHT_STEP) * 3);
<DeepExtract>
if (isServiceRunning) {
getContext().startService(new Intent(getContext(), EasyTouchLinearService.class));
} else {
ViewGro... | EasyTouch | positive | 5,903 |
private static String getTextFromResource(Context context, String filename, long offset, int length) {
Resources resources = context.getApplicationContext().getResources();
String packageName = resources.getResourcePackageName(R.id.dummy_placeholder);
InputStream stream = resources.openRawResource(resources.getIdentifi... | private static String getTextFromResource(Context context, String filename, long offset, int length) {
Resources resources = context.getApplicationContext().getResources();
String packageName = resources.getResourcePackageName(R.id.dummy_placeholder);
InputStream stream = resources.openRawResource(resources.getIdentifi... | google-authenticator-android | positive | 5,904 |
public void gcTraceRemoved(GCTrace gcTrace) {
model.fireTableDataChanged();
table.clearSelection();
} | public void gcTraceRemoved(GCTrace gcTrace) {
<DeepExtract>
model.fireTableDataChanged();
table.clearSelection();
</DeepExtract>
} | gchisto | positive | 5,905 |
@Override
public void onCreate() {
super.onCreate();
app = this;
if (MsfSdkUtils.isMainProcess(this)) {
ILiveLog.setLogLevel(ILiveLog.TILVBLogLevel.DEBUG);
ILiveSDK.getInstance().initSdk(this, 1400059239, 21019);
ILVLiveManager.getInstance().init(new ILVLiveConfig().setLiveMsgListener(MessageObservable.getInstance()));... | @Override
public void onCreate() {
super.onCreate();
app = this;
if (MsfSdkUtils.isMainProcess(this)) {
ILiveLog.setLogLevel(ILiveLog.TILVBLogLevel.DEBUG);
ILiveSDK.getInstance().initSdk(this, 1400059239, 21019);
ILVLiveManager.getInstance().init(new ILVLiveConfig().setLiveMsgListener(MessageObservable.getInstance()));... | AdouLive | positive | 5,906 |
public static void main(String[] args) {
int port = args.length > 0 ? Integer.parseInt(args[0]) : 43658;
String url = args.length > 0 ? args[1] : "http://localhost/#Calc";
try {
InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(LDAP_BASE);
config.setListenerConfigs(new InMemoryListenerConfig("lis... | public static void main(String[] args) {
<DeepExtract>
int port = args.length > 0 ? Integer.parseInt(args[0]) : 43658;
String url = args.length > 0 ? args[1] : "http://localhost/#Calc";
try {
InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(LDAP_BASE);
config.setListenerConfigs(new InMemoryListe... | learnjavabug | positive | 5,907 |
@Override
public void on(String num) {
num = num.trim();
if (num.length() < 2) {
A.toast(R.string.err_name);
return;
}
if (num.equals(numSel))
return;
if (prefs.get(num) != null) {
A.toast(String.format(A.s(R.string.err_exists), num));
return;
}
setTitle(num.trim());
changed = true;
} | @Override
public void on(String num) {
num = num.trim();
if (num.length() < 2) {
A.toast(R.string.err_name);
return;
}
if (num.equals(numSel))
return;
if (prefs.get(num) != null) {
A.toast(String.format(A.s(R.string.err_exists), num));
return;
}
<DeepExtract>
setTitle(num.trim());
</DeepExtract>
changed = true;
} | sanity | positive | 5,908 |
@Override
protected int computeVerticalScrollOffset() {
return !isHorizontalMode() ? mCurrentScrollOffset : 0;
} | @Override
protected int computeVerticalScrollOffset() {
<DeepExtract>
return !isHorizontalMode() ? mCurrentScrollOffset : 0;
</DeepExtract>
} | ExpectLauncher | positive | 5,909 |
protected RevCommit getCommit() {
RevCommit commit = JGitUtils.getCommit(r, objectId);
if (commit == null) {
error(MessageFormat.format(getString("gb.failedToFindCommit"), objectId, repositoryName, getPageName()), null, LogPage.class, WicketUtils.newRepositoryParameter(repositoryName));
}
if (submodules == null) {
subm... | protected RevCommit getCommit() {
RevCommit commit = JGitUtils.getCommit(r, objectId);
if (commit == null) {
error(MessageFormat.format(getString("gb.failedToFindCommit"), objectId, repositoryName, getPageName()), null, LogPage.class, WicketUtils.newRepositoryParameter(repositoryName));
}
<DeepExtract>
if (submodules =... | gerrit-gitblit-plugin | positive | 5,910 |
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
mBounds.set(bounds);
float scale;
float dx;
float dy;
switch(mScaleType) {
case CENTER:
mBorderRect.set(mBounds);
mBorderRect.inset((mBorderWidth) / 2, (mBorderWidth) / 2);
mShaderMatrix.reset();
mShaderMatrix.setTranslate((int) ((mBor... | @Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
mBounds.set(bounds);
<DeepExtract>
float scale;
float dx;
float dy;
switch(mScaleType) {
case CENTER:
mBorderRect.set(mBounds);
mBorderRect.inset((mBorderWidth) / 2, (mBorderWidth) / 2);
mShaderMatrix.reset();
mShaderMatrix.setTranslat... | MyBlogDemo | positive | 5,911 |
@Override
public boolean onLayoutChild(CoordinatorLayout parent, final V child, int layoutDirection) {
parent.onLayoutChild(child, layoutDirection);
if (child instanceof BottomNavigationBar) {
mViewRef = new WeakReference<>((BottomNavigationBar) child);
}
child.post(new Runnable() {
@Override
public void run() {
mBotto... | @Override
public boolean onLayoutChild(CoordinatorLayout parent, final V child, int layoutDirection) {
parent.onLayoutChild(child, layoutDirection);
if (child instanceof BottomNavigationBar) {
mViewRef = new WeakReference<>((BottomNavigationBar) child);
}
child.post(new Runnable() {
@Override
public void run() {
mBotto... | JD-Mall-Master | positive | 5,912 |
@Override
protected void onPostExecute(List<MapDownload> result) {
super.onPostExecute(result);
if (checkDialog != null && checkDialog.isShowing()) {
checkDialog.dismiss();
}
mOnlineResults = result;
DialogPreferenceMapsGroup group = null;
String name;
int j = 0;
for (int i = 0; i < mOnlineResults.size(); i++) {
if (i ... | @Override
protected void onPostExecute(List<MapDownload> result) {
super.onPostExecute(result);
if (checkDialog != null && checkDialog.isShowing()) {
checkDialog.dismiss();
}
mOnlineResults = result;
<DeepExtract>
DialogPreferenceMapsGroup group = null;
String name;
int j = 0;
for (int i = 0; i < mOnlineResults.size();... | radiocells-scanner-android | positive | 5,913 |
public static void setScale() {
setXscale(DEFAULT_XMIN, DEFAULT_XMAX);
setYscale(DEFAULT_YMIN, DEFAULT_YMAX);
} | public static void setScale() {
setXscale(DEFAULT_XMIN, DEFAULT_XMAX);
<DeepExtract>
setYscale(DEFAULT_YMIN, DEFAULT_YMAX);
</DeepExtract>
} | skeleton-sp18 | positive | 5,914 |
@Override
protected void initView() {
ButterKnife.bind(this);
DaggerMainActivityComponent component = (DaggerMainActivityComponent) DaggerMainActivityComponent.builder().mainActivityModule(new MainActivityModule(this, this)).build();
component.in(this);
gankPresenter.init();
fragmentManager = getSupportFragmentManager(... | @Override
protected void initView() {
ButterKnife.bind(this);
DaggerMainActivityComponent component = (DaggerMainActivityComponent) DaggerMainActivityComponent.builder().mainActivityModule(new MainActivityModule(this, this)).build();
component.in(this);
gankPresenter.init();
fragmentManager = getSupportFragmentManager(... | Ganks | positive | 5,915 |
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
Log.d(TAG, "Intent action: " + intent.getAction());
if (intent.getAction().equals(Intent.ACTION_VIEW)) {
intent.setAction(Intent.ACTION_MAIN);
openRecipe(intent);
}
} | @Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
<DeepExtract>
Log.d(TAG, "Intent action: " + intent.getAction());
if (intent.getAction().equals(Intent.ACTION_VIEW)) {
intent.setAction(Intent.ACTION_MAIN);
openRecipe(intent);
}
</DeepExtract>
} | BrewShopApp | positive | 5,917 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.