before stringlengths 33 3.21M | after stringlengths 63 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
public void onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss();
String label = etLabel.getText().toString().trim();
String xpub = xpubs.get(position).second;
int purpose = 44;
if (SamouraiSentinel.getInstance(XPUBListActivity.this).getBIP49().keySet().contains(xpub)) {
purpose = 49;
} else if (Samourai... | public void onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss();
String label = etLabel.getText().toString().trim();
String xpub = xpubs.get(position).second;
int purpose = 44;
if (SamouraiSentinel.getInstance(XPUBListActivity.this).getBIP49().keySet().contains(xpub)) {
purpose = 49;
} else if (Samourai... | sentinel-android | positive | 438,648 |
public void reset() {
mStartTime = 0;
if (mState == STATE_NOT_STARTED) {
return;
}
mState = STATE_NOT_STARTED;
if (mOnStateChangeListener != null) {
mOnStateChangeListener.onStateChange(STATE_NOT_STARTED);
}
postInvalidateOnAnimation();
} | public void reset() {
mStartTime = 0;
<DeepExtract>
if (mState == STATE_NOT_STARTED) {
return;
}
mState = STATE_NOT_STARTED;
if (mOnStateChangeListener != null) {
mOnStateChangeListener.onStateChange(STATE_NOT_STARTED);
}
</DeepExtract>
postInvalidateOnAnimation();
} | ScreenLocker | positive | 438,649 |
@Test
public void testMapStringLong() throws Exception {
QsonMapper mapper = new QsonMapper();
QsonParser parser = mapper.parserFor(new GenericType<Map<String, Long>>() {
});
Object target = mapper.read("{ \"one\": 1, \"two\": 2}", new GenericType<Map<String, Long>>() {
});
(obj) -> {
Map<String, Long> target = (Map<St... | @Test
public void testMapStringLong() throws Exception {
<DeepExtract>
QsonMapper mapper = new QsonMapper();
QsonParser parser = mapper.parserFor(new GenericType<Map<String, Long>>() {
});
Object target = mapper.read("{ \"one\": 1, \"two\": 2}", new GenericType<Map<String, Long>>() {
});
(obj) -> {
Map<String, Long> ta... | qson | positive | 438,651 |
public void stop() {
AgateGatewayActivator activator = new AgateGatewayActivator();
try {
long s = System.currentTimeMillis();
activator.start();
long e = System.currentTimeMillis();
LOG.info("application startup in {} ms.", (e - s));
} catch (Exception e) {
LOG.error("application startup error.", e);
activator.stop();... | public void stop() {
<DeepExtract>
AgateGatewayActivator activator = new AgateGatewayActivator();
try {
long s = System.currentTimeMillis();
activator.start();
long e = System.currentTimeMillis();
LOG.info("application startup in {} ms.", (e - s));
} catch (Exception e) {
LOG.error("application startup error.", e);
act... | agate | positive | 438,652 |
@DataPermissionMapping(value = DataPermissionConstants.Type.DEPARTMENT_CUSTOM, priority = 2, injectCustomData = true)
public List<SystemDepartmentListVO> custom(String customData) {
if (StringUtils.isBlank(customData)) {
return Collections.emptyList();
}
List<Integer> ids = new ArrayList<>();
String[] stringIds = custo... | @DataPermissionMapping(value = DataPermissionConstants.Type.DEPARTMENT_CUSTOM, priority = 2, injectCustomData = true)
public List<SystemDepartmentListVO> custom(String customData) {
if (StringUtils.isBlank(customData)) {
return Collections.emptyList();
}
List<Integer> ids = new ArrayList<>();
String[] stringIds = custo... | eva | positive | 438,653 |
public static void main(String[] args) throws Exception {
WaitMonitor monitor = new WaitMonitor();
String fileName = "articles.100000.txt";
Disposable subscriber = readWikiArticlesFromFile(fileName).flatMap(article -> wikiService.fetchArticleFlux(article).subscribeOn(io)).subscribeOn(io).subscribe(persistService::save,... | public static void main(String[] args) throws Exception {
<DeepExtract>
WaitMonitor monitor = new WaitMonitor();
String fileName = "articles.100000.txt";
Disposable subscriber = readWikiArticlesFromFile(fileName).flatMap(article -> wikiService.fetchArticleFlux(article).subscribeOn(io)).subscribeOn(io).subscribe(persist... | rxjava-katas | positive | 438,657 |
static int setBit(int value, int position) {
if (position < 0) {
throw new IllegalArgumentException("negative index " + position);
}
if (position >= Integer.SIZE) {
throw new IllegalArgumentException("index too large " + position + ">=" + Integer.SIZE);
}
return value | (1 << position);
} | static int setBit(int value, int position) {
<DeepExtract>
if (position < 0) {
throw new IllegalArgumentException("negative index " + position);
}
if (position >= Integer.SIZE) {
throw new IllegalArgumentException("index too large " + position + ">=" + Integer.SIZE);
}
</DeepExtract>
return value | (1 << position);
} | jNVMf | positive | 438,658 |
@Override
public SpheroidRegion setWorld(World world) {
center.setWorld(world);
surface = null;
cuboid = null;
return this;
} | @Override
public SpheroidRegion setWorld(World world) {
center.setWorld(world);
<DeepExtract>
surface = null;
cuboid = null;
</DeepExtract>
return this;
} | RedLib | positive | 438,659 |
@Test
public void testAddWithIssuer() {
String accountName = "johndoe@dasher.com";
accountDb.add(accountName, SECRET, OtpType.TOTP, null, null, GOOGLE_ISSUER);
assertThat(accountDb.getAccounts()).containsExactly(index(accountName, GOOGLE_ISSUER));
Integer expectedCounter = 0;
if (0 != null) {
expectedCounter = 0;
}
ass... | @Test
public void testAddWithIssuer() {
String accountName = "johndoe@dasher.com";
accountDb.add(accountName, SECRET, OtpType.TOTP, null, null, GOOGLE_ISSUER);
assertThat(accountDb.getAccounts()).containsExactly(index(accountName, GOOGLE_ISSUER));
Integer expectedCounter = 0;
if (0 != null) {
expectedCounter = 0;
}
ass... | google-authenticator-android | positive | 438,661 |
public void insertUpdate(DocumentEvent e) {
final String id = entry.getText();
String trytes = "";
for (int i = 0; i < id.length(); i++) {
final char c = id.charAt(i);
trytes += "9ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(c & 0x0f);
trytes += "9ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt((c >> 4) & 0x0f);
}
if (!currentId.isZero()) {
... | public void insertUpdate(DocumentEvent e) {
<DeepExtract>
final String id = entry.getText();
String trytes = "";
for (int i = 0; i < id.length(); i++) {
final char c = id.charAt(i);
trytes += "9ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(c & 0x0f);
trytes += "9ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt((c >> 4) & 0x0f);
}
if (!currentI... | qupla | positive | 438,662 |
public static void main(String[] args) {
Frog1 frog1 = new Frog1();
System.out.println("Bye!");
System.out.println("Frog1.dispose");
d.dispose();
p.dispose();
super.dispose();
} | public static void main(String[] args) {
Frog1 frog1 = new Frog1();
System.out.println("Bye!");
<DeepExtract>
System.out.println("Frog1.dispose");
d.dispose();
p.dispose();
super.dispose();
</DeepExtract>
} | Thinking-in-Java | positive | 438,663 |
public static void main(String[] args) {
BigObject bigObject = new BigObject(1857);
ReferenceQueue<BigObject> q = new ReferenceQueue<>();
PhantomReference<BigObject> pr = new PhantomReference<>(bigObject, q);
bigObject = null;
System.out.println("Invoking gc() first time:");
System.out.println("pr.isEnqueued = " + pr.i... | public static void main(String[] args) {
BigObject bigObject = new BigObject(1857);
ReferenceQueue<BigObject> q = new ReferenceQueue<>();
PhantomReference<BigObject> pr = new PhantomReference<>(bigObject, q);
bigObject = null;
System.out.println("Invoking gc() first time:");
System.out.println("pr.isEnqueued = " + pr.i... | java-language-features | positive | 438,664 |
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
vista = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_categoria_card_grid, parent, false);
RecyclerView.LayoutParams layParams = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRA... | @Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
vista = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_categoria_card_grid, parent, false);
RecyclerView.LayoutParams layParams = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRA... | curso-android-codejavu | positive | 438,665 |
public Criteria andProtocolIdIsNotNull() {
if ("protocol_id is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("protocol_id is not null"));
return (Criteria) this;
} | public Criteria andProtocolIdIsNotNull() {
<DeepExtract>
if ("protocol_id is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("protocol_id is not null"));
</DeepExtract>
return (Criteria) this;
} | dubbo-mock | positive | 438,666 |
@Override
public void init() throws Exception {
boolean restart = false;
Platform.setImplicitExit(false);
addTrayIcon();
Font.loadFont(POELevelFx.class.getResource("/fonts/Fontin-Regular.ttf").toExternalForm(), 10);
Font.loadFont(POELevelFx.class.getResource("/fonts/Fontin-Italic.ttf").toExternalForm(), 10);
Font.loadF... | @Override
public void init() throws Exception {
boolean restart = false;
<DeepExtract>
Platform.setImplicitExit(false);
addTrayIcon();
Font.loadFont(POELevelFx.class.getResource("/fonts/Fontin-Regular.ttf").toExternalForm(), 10);
Font.loadFont(POELevelFx.class.getResource("/fonts/Fontin-Italic.ttf").toExternalForm(), 1... | Path-of-Leveling | positive | 438,667 |
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults, Object object) {
boolean isActivity = object instanceof Activity;
boolean isSupportFragment = object instanceof Fragment;
boolean isAppFragment = object instanceof android.app.Fragment;
boolean isMinSdkM = Build.VERSION.SD... | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults, Object object) {
<DeepExtract>
boolean isActivity = object instanceof Activity;
boolean isSupportFragment = object instanceof Fragment;
boolean isAppFragment = object instanceof android.app.Fragment;
boolean isMinSdkM = Bu... | RePlugin-GameSdk | positive | 438,668 |
public final FBLoginOptions setPermissions(final Collection<FBPermission> permissions) {
setPermissionsJS(FBEnum.Util.joinApiValues(FBEnum.Util.toApiValues(permissions)));
return this;
} | public final FBLoginOptions setPermissions(final Collection<FBPermission> permissions) {
<DeepExtract>
setPermissionsJS(FBEnum.Util.joinApiValues(FBEnum.Util.toApiValues(permissions)));
</DeepExtract>
return this;
} | FacebookGWT | positive | 438,669 |
private static String updateUser(Auth0UserProfile user, String userId, String json, Request req) {
if (user == null) {
logMessageAndHalt(req, 404, String.format("Could not update user: User with id %s not found (or there are issues with the Auth0 configuration)", userId));
}
LOG.info("Updating user {}", user.getEmail()... | private static String updateUser(Auth0UserProfile user, String userId, String json, Request req) {
if (user == null) {
logMessageAndHalt(req, 404, String.format("Could not update user: User with id %s not found (or there are issues with the Auth0 configuration)", userId));
}
LOG.info("Updating user {}", user.getEmail()... | datatools-server | positive | 438,670 |
public boolean isCharging() {
int i = this.dataManager.get(MUSE_FLAGS);
return (i & 1) != 0;
} | public boolean isCharging() {
<DeepExtract>
int i = this.dataManager.get(MUSE_FLAGS);
return (i & 1) != 0;
</DeepExtract>
} | Soot | positive | 438,671 |
public static Enumeration getClients() {
String l, name;
Client c;
String[] cmd = { "p4", "clients" };
StringTokenizer st;
setCache();
synchronized (clients) {
if ((clients.getDelay() * 0.5) > ((new Date()).getTime() - load_time))
return;
try {
P4Process p = new P4Process(null);
p.exec(cmd);
while (null != (l = p.readL... | public static Enumeration getClients() {
<DeepExtract>
String l, name;
Client c;
String[] cmd = { "p4", "clients" };
StringTokenizer st;
setCache();
synchronized (clients) {
if ((clients.getDelay() * 0.5) > ((new Date()).getTime() - load_time))
return;
try {
P4Process p = new P4Process(null);
p.exec(cmd);
while (null !... | perforce-plugin | positive | 438,673 |
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_result_list, container, false);
ButterKnife.bind(this, v);
((Application) getActivity().getApplication()).getFragmentComponent().inject(t... | @Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_result_list, container, false);
ButterKnife.bind(this, v);
((Application) getActivity().getApplication()).getFragmentComponent().inject(t... | probe-android | positive | 438,674 |
@UiHandler("runButton")
void onRun(ClickEvent event) {
if (eventBus != null) {
eventBus.fireEventFromSource(new RunToNextBreakpointEvent(), this);
}
} | @UiHandler("runButton")
void onRun(ClickEvent event) {
<DeepExtract>
if (eventBus != null) {
eventBus.fireEventFromSource(new RunToNextBreakpointEvent(), this);
}
</DeepExtract>
} | nevada | positive | 438,675 |
public void populateData(Context context) {
data.clear();
CharSequence[] questions = context.getResources().getTextArray(R.array.questions_about_mygrades);
CharSequence[] answers = context.getResources().getTextArray(R.array.answers_about_mygrades);
String sectionTitle = context.getResources().getString(R.string.questi... | public void populateData(Context context) {
data.clear();
CharSequence[] questions = context.getResources().getTextArray(R.array.questions_about_mygrades);
CharSequence[] answers = context.getResources().getTextArray(R.array.answers_about_mygrades);
String sectionTitle = context.getResources().getString(R.string.questi... | mygrades-app | positive | 438,677 |
public boolean isVariableSetting() {
if (!isType(LineType.SETTING_TABLE_LINE)) {
return false;
}
if (arguments.size() < 2) {
return false;
}
ParsedString firstArgument = arguments.get(0);
if (firstArgument.getType() != ArgumentType.SETTING_KEY) {
return false;
}
return firstArgument.getValue().equals("Variables");
} | public boolean isVariableSetting() {
<DeepExtract>
if (!isType(LineType.SETTING_TABLE_LINE)) {
return false;
}
if (arguments.size() < 2) {
return false;
}
ParsedString firstArgument = arguments.get(0);
if (firstArgument.getType() != ArgumentType.SETTING_KEY) {
return false;
}
return firstArgument.getValue().equals("Var... | RobotFramework-EclipseIDE | positive | 438,678 |
@Override
public void rebuildTree() {
N first = queryDelegate.findFirst();
queryDelegate.resetFirst(first);
for (N node : queryDelegate.getSiblings(first.getId())) {
inserter.insert(node, getNodeInfo(first.getId()), NestedNodeMover.Mode.NEXT_SIBLING);
}
for (N child : queryDelegate.getChildren(first)) {
inserter.insert... | @Override
public void rebuildTree() {
N first = queryDelegate.findFirst();
queryDelegate.resetFirst(first);
for (N node : queryDelegate.getSiblings(first.getId())) {
inserter.insert(node, getNodeInfo(first.getId()), NestedNodeMover.Mode.NEXT_SIBLING);
}
<DeepExtract>
for (N child : queryDelegate.getChildren(first)) {
i... | nestedj | positive | 438,679 |
private boolean matchInstanceId(Element item, String id) {
String tmpId = getId(item, "rasd:InstanceID");
if (tmpId == null) {
return false;
}
if (tmpId.equals(id)) {
return true;
} else {
return false;
}
} | private boolean matchInstanceId(Element item, String id) {
<DeepExtract>
String tmpId = getId(item, "rasd:InstanceID");
if (tmpId == null) {
return false;
}
if (tmpId.equals(id)) {
return true;
} else {
return false;
}
</DeepExtract>
} | vmbkp | positive | 438,680 |
public static int larch(BlockPos pos) {
double noise = (Biome.FOLIAGE_NOISE.sample(pos.getX() / 30.0, pos.getZ() / 30.0, false) + 1) / 2.0;
(int) MathHelper.lerp(noise, 242, 242) = ((int) MathHelper.lerp(noise, 242, 242) << 16) & 0x00FF0000;
(int) MathHelper.lerp(noise, 190, 225) = ((int) MathHelper.lerp(noise, 190, 22... | public static int larch(BlockPos pos) {
double noise = (Biome.FOLIAGE_NOISE.sample(pos.getX() / 30.0, pos.getZ() / 30.0, false) + 1) / 2.0;
<DeepExtract>
(int) MathHelper.lerp(noise, 242, 242) = ((int) MathHelper.lerp(noise, 242, 242) << 16) & 0x00FF0000;
(int) MathHelper.lerp(noise, 190, 225) = ((int) MathHelper.lerp(... | ecotones | positive | 438,681 |
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void deleteDocument(AndroidFileSystem fs, Path path, Uri uri, boolean ifExists) throws IOException {
String mimeType;
final Cursor cursor;
try {
cursor = fs.getContentResolver().query(uri, MIME_TYPE_PROJECTION, null, null, null);
} catch (IllegalArgumentException e) {
mi... | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void deleteDocument(AndroidFileSystem fs, Path path, Uri uri, boolean ifExists) throws IOException {
<DeepExtract>
String mimeType;
final Cursor cursor;
try {
cursor = fs.getContentResolver().query(uri, MIME_TYPE_PROJECTION, null, null, null);
} catch (IllegalArgumentExc... | safs | positive | 438,683 |
private void registerBuiltInConverters() {
converterRegistry.put(Object.class, new BuiltIn.StringConverter());
converterRegistry.put(String.class, new BuiltIn.StringConverter());
converterRegistry.put(StringBuilder.class, new BuiltIn.StringBuilderConverter());
converterRegistry.put(CharSequence.class, new BuiltIn.CharS... | private void registerBuiltInConverters() {
converterRegistry.put(Object.class, new BuiltIn.StringConverter());
converterRegistry.put(String.class, new BuiltIn.StringConverter());
converterRegistry.put(StringBuilder.class, new BuiltIn.StringBuilderConverter());
converterRegistry.put(CharSequence.class, new BuiltIn.CharS... | gitruler | positive | 438,685 |
@Test
public void testLookupNode1a() {
String fooA = TemplateParser.DEFAULT.parse("{{foo.child.val}}").render(getDataAsFoo(new Pojo()));
assertThat(fooA, is(""));
} | @Test
public void testLookupNode1a() {
<DeepExtract>
String fooA = TemplateParser.DEFAULT.parse("{{foo.child.val}}").render(getDataAsFoo(new Pojo()));
assertThat(fooA, is(""));
</DeepExtract>
} | Liqp | positive | 438,686 |
public void revcovercall(double costofstock, double strike, double stockprice, double costofoption) {
PutCallPosition p = new PutCallPosition();
p.callprof(costofoption, strike, stockprice);
double stockprofit = p.getLongcallprofit();
double profit = (costofstock - stockprice);
revcoveredcall = profit + stockprofit;
} | public void revcovercall(double costofstock, double strike, double stockprice, double costofoption) {
PutCallPosition p = new PutCallPosition();
p.callprof(costofoption, strike, stockprice);
double stockprofit = p.getLongcallprofit();
double profit = (costofstock - stockprice);
<DeepExtract>
revcoveredcall = profit + s... | maygard | positive | 438,687 |
public RestTraversalDescription filter(ScriptLanguage language, String code) {
description.put("return_filter", toMap("language", language.name().toLowerCase(), "body", code));
return this;
} | public RestTraversalDescription filter(ScriptLanguage language, String code) {
<DeepExtract>
description.put("return_filter", toMap("language", language.name().toLowerCase(), "body", code));
return this;
</DeepExtract>
} | neo4j-java-rest-binding | positive | 438,688 |
public void setDefaultValueByCode(String code) {
EthnicEntity entity = new EthnicEntity();
entity.setCode(code);
if (entity instanceof String) {
setDefaultValueByName(entity.toString());
} else {
super.setDefaultValue(entity);
}
} | public void setDefaultValueByCode(String code) {
EthnicEntity entity = new EthnicEntity();
entity.setCode(code);
<DeepExtract>
if (entity instanceof String) {
setDefaultValueByName(entity.toString());
} else {
super.setDefaultValue(entity);
}
</DeepExtract>
} | AndroidPicker | positive | 438,689 |
@Test
public void testRepeatBeforeAfterEach() throws Exception {
List<String> events = Collections.synchronizedList(new ArrayList<String>());
TestSuite suite = TestSuite.create("my_suite").beforeEach(ctx -> {
events.add("before");
}).test("my_test", 3, ctx -> {
events.add("test");
}).afterEach(ctx -> {
events.add("afte... | @Test
public void testRepeatBeforeAfterEach() throws Exception {
List<String> events = Collections.synchronizedList(new ArrayList<String>());
TestSuite suite = TestSuite.create("my_suite").beforeEach(ctx -> {
events.add("before");
}).test("my_test", 3, ctx -> {
events.add("test");
}).afterEach(ctx -> {
events.add("afte... | vertx-unit | positive | 438,690 |
public void processReadBinary(APDU apdu) {
byte[] buf = apdu.getBuffer();
byte p1 = buf[ISO7816.OFFSET_P1];
byte p2 = buf[ISO7816.OFFSET_P2];
if (buf[ISO7816.OFFSET_INS] == (byte) 0xB1) {
ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
}
if (apdu.setIncomingAndReceive() != (short) 0) {
ISOException.throwIt(ISO7816... | public void processReadBinary(APDU apdu) {
byte[] buf = apdu.getBuffer();
byte p1 = buf[ISO7816.OFFSET_P1];
byte p2 = buf[ISO7816.OFFSET_P2];
if (buf[ISO7816.OFFSET_INS] == (byte) 0xB1) {
ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
}
if (apdu.setIncomingAndReceive() != (short) 0) {
ISOException.throwIt(ISO7816... | AppletPlayground | positive | 438,693 |
private Employee findEditorForWorkdayMorning(List<Employee> employees, DaySolution daySolution, Employee lastAssignee) {
int lastIndex;
if (lastAssignee == null) {
lastIndex = 0;
} else {
for (int i = 0; i < employees.size(); i++) {
if (employees.get(i).getKey().equals(lastAssignee.getKey())) {
lastIndex = 1 + i;
}
}
t... | private Employee findEditorForWorkdayMorning(List<Employee> employees, DaySolution daySolution, Employee lastAssignee) {
<DeepExtract>
int lastIndex;
if (lastAssignee == null) {
lastIndex = 0;
} else {
for (int i = 0; i < employees.size(); i++) {
if (employees.get(i).getKey().equals(lastAssignee.getKey())) {
lastIndex ... | shifts-solver | positive | 438,694 |
@Override
public void execute(Machine machine) {
NEONRegisterSet neonRegSet = machine.getNEONRegisterSet();
int[] sourceParts = DataTypeTools.createPartListFromWords(size, neonRegSet.getRegisterValues(registerType, sourceIndex));
int[] resultParts = new int[sourceParts.length];
if (instruction == EnumInstruction.vrecpe... | @Override
public void execute(Machine machine) {
NEONRegisterSet neonRegSet = machine.getNEONRegisterSet();
int[] sourceParts = DataTypeTools.createPartListFromWords(size, neonRegSet.getRegisterValues(registerType, sourceIndex));
int[] resultParts = new int[sourceParts.length];
if (instruction == EnumInstruction.vrecpe... | nevada | positive | 438,696 |
public static void main(String[] args) {
GitHubServiceFactory factory = GitHubServiceFactory.newInstance();
PullRequestService service = factory.createPullRequestService();
List<PullRequest> pullRequests = service.getPullRequests("technoweenie", "faraday");
for (PullRequest pullRequest : pullRequests) {
printResult(pul... | public static void main(String[] args) {
GitHubServiceFactory factory = GitHubServiceFactory.newInstance();
PullRequestService service = factory.createPullRequestService();
List<PullRequest> pullRequests = service.getPullRequests("technoweenie", "faraday");
for (PullRequest pullRequest : pullRequests) {
printResult(pul... | github-java-sdk | positive | 438,698 |
public boolean validateEnforce(Object... rvals) {
int expectedParamSize = getModel().model.entrySet().stream().filter(stringMapEntry -> stringMapEntry.getKey().equals("r")).flatMap(stringMapEntry -> stringMapEntry.getValue().entrySet().stream()).filter(stringAssertionEntry -> stringAssertionEntry.getKey().equals("r")).... | public boolean validateEnforce(Object... rvals) {
<DeepExtract>
int expectedParamSize = getModel().model.entrySet().stream().filter(stringMapEntry -> stringMapEntry.getKey().equals("r")).flatMap(stringMapEntry -> stringMapEntry.getValue().entrySet().stream()).filter(stringAssertionEntry -> stringAssertionEntry.getKey()... | jcasbin | positive | 438,699 |
private String argsToString() {
StringBuilder sb = new StringBuilder();
for (MyMapArgsEntryType arg : args) {
sb.append(arg.getKey()).append("=").append(arg.getValue());
}
return "Action{" + "actionName='" + actionName + '\'' + ", args=" + (args == null ? null : argsToString()) + ", refs=" + (args == null ? null : refe... | private String argsToString() {
StringBuilder sb = new StringBuilder();
for (MyMapArgsEntryType arg : args) {
sb.append(arg.getKey()).append("=").append(arg.getValue());
}
<DeepExtract>
return "Action{" + "actionName='" + actionName + '\'' + ", args=" + (args == null ? null : argsToString()) + ", refs=" + (args == null... | drools-mas | positive | 438,701 |
public void onDisable() {
getLogger().info("Thankyou for using MultiChat. Disabling...");
try {
File file = new File(configDir, "StaffChatInfo.dat");
FileOutputStream saveFile = new FileOutputStream(file);
ObjectOutputStream out = new ObjectOutputStream(saveFile);
out.writeObject(modchatpreferences);
out.close();
} cat... | public void onDisable() {
getLogger().info("Thankyou for using MultiChat. Disabling...");
try {
File file = new File(configDir, "StaffChatInfo.dat");
FileOutputStream saveFile = new FileOutputStream(file);
ObjectOutputStream out = new ObjectOutputStream(saveFile);
out.writeObject(modchatpreferences);
out.close();
} cat... | Development | positive | 438,702 |
@Override
public void onClick(View v) {
if (mWebView.canGoBack()) {
mWebView.goBack();
} else {
mWebView.stopLoading();
super.onBackPressed();
overridePendingTransition(R.anim.in_from_left, R.anim.out_to_right);
}
} | @Override
public void onClick(View v) {
<DeepExtract>
if (mWebView.canGoBack()) {
mWebView.goBack();
} else {
mWebView.stopLoading();
super.onBackPressed();
overridePendingTransition(R.anim.in_from_left, R.anim.out_to_right);
}
</DeepExtract>
} | Sukeda | positive | 438,704 |
@Test
public void anyNumberOfValuesCanBeSetToListParameters_ForNonEmptyDefaults() {
MyOptsWithDefaultValues opts = new MyOptsWithDefaultValues();
JCommander cmd = new JCommander(opts);
cmd.parse("-a", "anotherValue", "-a", "anotherValue2", "-b", "anotherValue3", "-b", "anotherValue4");
Assert.assertEquals(opts.list.siz... | @Test
public void anyNumberOfValuesCanBeSetToListParameters_ForNonEmptyDefaults() {
MyOptsWithDefaultValues opts = new MyOptsWithDefaultValues();
<DeepExtract>
JCommander cmd = new JCommander(opts);
cmd.parse("-a", "anotherValue", "-a", "anotherValue2", "-b", "anotherValue3", "-b", "anotherValue4");
Assert.assertEquals... | jcommander | positive | 438,713 |
public void setSize(int w, int h) {
width = w;
height = h;
if (fbo != null)
fbo.deleteFramebuffer();
fbo = new Framebuffer(parent.screen2DisplayX(width), parent.screen2DisplayY(height), false);
fbo.setFramebufferFilter(GL_NEAREST);
fbo.bindFramebuffer(false);
glClearColor(0.0f, 0.0f, 0.0f, 1.f);
glClear(GL_COLOR_BUFFER... | public void setSize(int w, int h) {
width = w;
height = h;
<DeepExtract>
if (fbo != null)
fbo.deleteFramebuffer();
fbo = new Framebuffer(parent.screen2DisplayX(width), parent.screen2DisplayY(height), false);
fbo.setFramebufferFilter(GL_NEAREST);
fbo.bindFramebuffer(false);
glClearColor(0.0f, 0.0f, 0.0f, 1.f);
glClear(G... | webdisplays | positive | 438,715 |
void flushTo(Topic<T> writer) {
ByteBuffer buffer = sendBuffer.getBuffer();
buffer.flip();
session.getWriter().send(buffer);
} | void flushTo(Topic<T> writer) {
ByteBuffer buffer = sendBuffer.getBuffer();
buffer.flip();
<DeepExtract>
session.getWriter().send(buffer);
</DeepExtract>
} | remoting | positive | 438,717 |
public byte[] digest(byte[] input, int offset, int len) {
if (offset + len >= input.length) {
for (int i = offset; i < input.length; i++) {
working[working_ptr >> 2] ^= ((int) input[i]) << ((working_ptr & 3) << 3);
working_ptr++;
if (working_ptr == 64) {
compress(working);
for (int j = 0; j < 16; j++) working[j] = 0;
w... | public byte[] digest(byte[] input, int offset, int len) {
<DeepExtract>
if (offset + len >= input.length) {
for (int i = offset; i < input.length; i++) {
working[working_ptr >> 2] ^= ((int) input[i]) << ((working_ptr & 3) << 3);
working_ptr++;
if (working_ptr == 64) {
compress(working);
for (int j = 0; j < 16; j++) wor... | wattzap-ce | positive | 438,719 |
public Criteria andPtidEqualTo(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "ptid" + " cannot be null");
}
criteria.add(new Criterion("ptid =", value));
return (Criteria) this;
} | public Criteria andPtidEqualTo(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "ptid" + " cannot be null");
}
criteria.add(new Criterion("ptid =", value));
</DeepExtract>
return (Criteria) this;
} | Gotrip | positive | 438,720 |
@Test
public void subscribe_usernameAndSlug() {
mockServer.expect(requestTo("https://api.twitter.com/1.1/lists/subscribers/create.json")).andExpect(method(POST)).andExpect(content().string("owner_screen_name=habuma&slug=somelist")).andRespond(withSuccess(jsonResource("single-list"), APPLICATION_JSON));
UserList list = ... | @Test
public void subscribe_usernameAndSlug() {
mockServer.expect(requestTo("https://api.twitter.com/1.1/lists/subscribers/create.json")).andExpect(method(POST)).andExpect(content().string("owner_screen_name=habuma&slug=somelist")).andRespond(withSuccess(jsonResource("single-list"), APPLICATION_JSON));
UserList list = ... | spring-social-twitter | positive | 438,723 |
public static String[] tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) {
if (str == null) {
return EMPTY_STRING_ARRAY;
}
StringTokenizer st = new StringTokenizer(str, delimiters);
List<String> tokens = new ArrayList<>();
while (st.hasMoreTokens()) {
String token = st.... | public static String[] tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) {
if (str == null) {
return EMPTY_STRING_ARRAY;
}
StringTokenizer st = new StringTokenizer(str, delimiters);
List<String> tokens = new ArrayList<>();
while (st.hasMoreTokens()) {
String token = st.... | Minis | positive | 438,725 |
public static void remove(Context context, String key) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = sp.edit();
editor.remove(key);
try {
if (sApplyMethod != null) {
sApplyMethod.invoke(editor);
return;
}
} catch (IllegalArgumentException e) {
} catch... | public static void remove(Context context, String key) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = sp.edit();
editor.remove(key);
<DeepExtract>
try {
if (sApplyMethod != null) {
sApplyMethod.invoke(editor);
return;
}
} catch (IllegalArgumentExceptio... | PicKing | positive | 438,727 |
@Override
public void onActionBack() {
mIsComplete = false;
Log.i(Constants.LOG_TAG, "event action view action back");
Log.i(Constants.LOG_TAG, "========playerview back pressed ==============playMode :" + mPlayMode + ", mPlayerViewCallback is null " + (mPlayerViewCallback == null));
if (MediaPlayerUtils.isWindowMode(m... | @Override
public void onActionBack() {
mIsComplete = false;
Log.i(Constants.LOG_TAG, "event action view action back");
<DeepExtract>
Log.i(Constants.LOG_TAG, "========playerview back pressed ==============playMode :" + mPlayMode + ", mPlayerViewCallback is null " + (mPlayerViewCallback == null));
if (MediaPlayerUtils.... | KSYMediaPlayerKit_Android | positive | 438,729 |
@Override
public void modifyCostForCombat(int amt) {
costModifier += amt;
cost = 0;
costForTurn = 0;
for (AbstractCard c : cards) {
if (c.cost < 0) {
cost = c.cost;
break;
}
cost += c.cost;
costForTurn += c.costForTurn;
if (c.isCostModified)
isCostModified = true;
if (c.isCostModifiedForTurn)
isCostModifiedForTurn = tr... | @Override
public void modifyCostForCombat(int amt) {
costModifier += amt;
<DeepExtract>
cost = 0;
costForTurn = 0;
for (AbstractCard c : cards) {
if (c.cost < 0) {
cost = c.cost;
break;
}
cost += c.cost;
costForTurn += c.costForTurn;
if (c.isCostModified)
isCostModified = true;
if (c.isCostModifiedForTurn)
isCostModifi... | Slay-the-Spire-Together | positive | 438,731 |
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_appdetails);
id = getIntent().getStringExtra("id");
bImageView = (ImageView) findViewById(R.id.imageview_appdetails_back);
viewPager = (ViewPager) findViewById(R.id.id_stickynavl... | @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_appdetails);
id = getIntent().getStringExtra("id");
bImageView = (ImageView) findViewById(R.id.imageview_appdetails_back);
viewPager = (ViewPager) findViewById(R.id.id_stickynavl... | EduBao | positive | 438,732 |
public void snapToDestination() {
final int screenWidth = getWidth();
final int destScreen = (getScrollX() + screenWidth / 2) / screenWidth;
destScreen = Math.max(0, Math.min(destScreen, getChildCount() - 1));
if (getScrollX() != (destScreen * getWidth())) {
final int delta = destScreen * getWidth() - getScrollX();
mSc... | public void snapToDestination() {
final int screenWidth = getWidth();
final int destScreen = (getScrollX() + screenWidth / 2) / screenWidth;
<DeepExtract>
destScreen = Math.max(0, Math.min(destScreen, getChildCount() - 1));
if (getScrollX() != (destScreen * getWidth())) {
final int delta = destScreen * getWidth() - get... | WifiChat | positive | 438,733 |
@Override
public void selectIndices(int index, int... indices) {
if (getSelectionMode().equals(SelectionMode.SINGLE)) {
clearSelection();
}
if (!selectedIndices.contains(index)) {
selectedIndices.add(index);
setSelectedIndex(index);
setSelectedItem(getTags().get(index));
}
for (int i : indices) {
select(i);
}
} | @Override
public void selectIndices(int index, int... indices) {
<DeepExtract>
if (getSelectionMode().equals(SelectionMode.SINGLE)) {
clearSelection();
}
if (!selectedIndices.contains(index)) {
selectedIndices.add(index);
setSelectedIndex(index);
setSelectedItem(getTags().get(index));
}
</DeepExtract>
for (int i : indi... | GemsFX | positive | 438,735 |
public WorldSaveType genereateAndSaveWorld() {
cc.loadingScreen.displayLoadingScreen(cc.langBundle.getText("WorldGenereator.generatingWorld"));
seed = System.currentTimeMillis();
if (isFlat) {
chunkGenerator = new ChunkGeneratorFlat(seed, flatLevel);
} else {
chunkGenerator = new ChunkGeneratorNormal(seed, generateTree... | public WorldSaveType genereateAndSaveWorld() {
cc.loadingScreen.displayLoadingScreen(cc.langBundle.getText("WorldGenereator.generatingWorld"));
seed = System.currentTimeMillis();
if (isFlat) {
chunkGenerator = new ChunkGeneratorFlat(seed, flatLevel);
} else {
chunkGenerator = new ChunkGeneratorNormal(seed, generateTree... | Comcraft | positive | 438,738 |
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (savedInstanceState == null) {
uri = (getArguments() != null ? (Uri) getArguments().getParcelable(EXTRA_CONTACT_URI) : null);
} else {
uri = ((Uri) savedInstanceState.getParcelable(EXTRA_CONTACT_URI));
}... | @Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (savedInstanceState == null) {
uri = (getArguments() != null ? (Uri) getArguments().getParcelable(EXTRA_CONTACT_URI) : null);
} else {
uri = ((Uri) savedInstanceState.getParcelable(EXTRA_CONTACT_URI));
}... | Trycorder5 | positive | 438,739 |
public String getErrorMessage() {
ExecutionException e;
try {
get();
e = null;
} catch (ExecutionException e) {
e = e;
} catch (CancellationException e) {
e = null;
}
if (e == null) {
return null;
}
Throwable throwable = e;
String message = null;
while (throwable != null) {
if (message == null) {
message = throwable.ge... | public String getErrorMessage() {
<DeepExtract>
ExecutionException e;
try {
get();
e = null;
} catch (ExecutionException e) {
e = e;
} catch (CancellationException e) {
e = null;
}
</DeepExtract>
if (e == null) {
return null;
}
Throwable throwable = e;
String message = null;
while (throwable != null) {
if (message == n... | libqi-java | positive | 438,740 |
@Override
public void onClick(View v) {
Intent intent = new Intent(this, CreateWalletActivity.class);
startActivity(intent);
finish();
} | @Override
public void onClick(View v) {
<DeepExtract>
Intent intent = new Intent(this, CreateWalletActivity.class);
startActivity(intent);
finish();
</DeepExtract>
} | tron-wallet-android | positive | 438,741 |
public int unique() {
position = 7;
position = 11;
position = 8;
return 0;
} | public int unique() {
position = 7;
<DeepExtract>
position = 11;
</DeepExtract>
position = 8;
return 0;
} | thread-weaver | positive | 438,743 |
@Override
public DB_ZenodoRecord value1(Integer value) {
set(0, value);
return this;
} | @Override
public DB_ZenodoRecord value1(Integer value) {
<DeepExtract>
set(0, value);
</DeepExtract>
return this;
} | wdumper | positive | 438,744 |
@Override
public boolean isTraceEnabled() {
return logger.isEnabledFor(convertsLogLevel(LogLevel.TRACE));
} | @Override
public boolean isTraceEnabled() {
<DeepExtract>
return logger.isEnabledFor(convertsLogLevel(LogLevel.TRACE));
</DeepExtract>
} | upgrade-framework | positive | 438,745 |
public String getWide(final int extCode) {
if (narrowMap.containsKey(extCode)) {
return narrowMap.get(extCode);
} else {
return wideMap.get(extCode);
}
} | public String getWide(final int extCode) {
<DeepExtract>
if (narrowMap.containsKey(extCode)) {
return narrowMap.get(extCode);
} else {
return wideMap.get(extCode);
}
</DeepExtract>
} | eb4j | positive | 438,746 |
public BaseActivity setBinding(@LayoutRes int layoutId) {
binding = DataBindingUtil.setContentView(this, layoutId);
initToolbar(R.id.toolBar);
return this;
} | public BaseActivity setBinding(@LayoutRes int layoutId) {
binding = DataBindingUtil.setContentView(this, layoutId);
<DeepExtract>
initToolbar(R.id.toolBar);
</DeepExtract>
return this;
} | DereHelper | positive | 438,747 |
private void microQrUserSizeComboActionPerformed(java.awt.event.ActionEvent evt) {
double bWidth;
double bHeight;
DrawSymbol drawSymbol = new DrawSymbol();
topPanel.removeAll();
drawSymbol.removeAll();
errorLabel.setText("");
if (dataInput.isEmpty()) {
errorLabel.setText("No input data");
topPanel.add(errorLabel);
topP... | private void microQrUserSizeComboActionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
double bWidth;
double bHeight;
DrawSymbol drawSymbol = new DrawSymbol();
topPanel.removeAll();
drawSymbol.removeAll();
errorLabel.setText("");
if (dataInput.isEmpty()) {
errorLabel.setText("No input data");
topPanel.add(err... | OkapiBarcode | positive | 438,748 |
public synchronized ProteusHandler post(final String template, Predicate predicate, HttpHandler handler) {
PathTemplateMatcher<RoutingMatch> matcher = matches.get(Methods.POST);
if (matcher == null) {
matches.put(Methods.POST, matcher = new PathTemplateMatcher<>());
}
RoutingMatch res = matcher.get(template);
if (res =... | public synchronized ProteusHandler post(final String template, Predicate predicate, HttpHandler handler) {
<DeepExtract>
PathTemplateMatcher<RoutingMatch> matcher = matches.get(Methods.POST);
if (matcher == null) {
matches.put(Methods.POST, matcher = new PathTemplateMatcher<>());
}
RoutingMatch res = matcher.get(templa... | proteus | positive | 438,749 |
@Override
public SavedSearch call() throws Exception {
return mClient.getSearch(mAuthenticationToken, guid);
} | @Override
public SavedSearch call() throws Exception {
<DeepExtract>
return mClient.getSearch(mAuthenticationToken, guid);
</DeepExtract>
} | evernote-sdk-android | positive | 438,750 |
public static <Id, T extends TreeNode<Id, T>> List<T> getLeaves(T parent) {
List<T> leaves = new ArrayList<>();
List<T> children = parent.getChildren();
if (CollectionUtils.isEmpty(children)) {
leaves.add(parent);
return;
}
for (T child : children) {
fillLeaf(child, leaves);
}
return leaves;
} | public static <Id, T extends TreeNode<Id, T>> List<T> getLeaves(T parent) {
List<T> leaves = new ArrayList<>();
<DeepExtract>
List<T> children = parent.getChildren();
if (CollectionUtils.isEmpty(children)) {
leaves.add(parent);
return;
}
for (T child : children) {
fillLeaf(child, leaves);
}
</DeepExtract>
return leaves... | mayfly | positive | 438,751 |
@Test
public void testOnScannedRobotNewEnemy1v1() {
mockRobotDefaults();
when(moveDataManager.hasEnemy("Shadow")).thenReturn(false);
MoveEnemy shadowData = mock(MoveEnemy.class);
if (true) {
when(moveDataManager.duelEnemy()).thenReturn(shadowData);
}
when(diamond.getOthers()).thenReturn(1);
DiamondWhoosh whoosh = newDi... | @Test
public void testOnScannedRobotNewEnemy1v1() {
<DeepExtract>
mockRobotDefaults();
when(moveDataManager.hasEnemy("Shadow")).thenReturn(false);
MoveEnemy shadowData = mock(MoveEnemy.class);
if (true) {
when(moveDataManager.duelEnemy()).thenReturn(shadowData);
}
when(diamond.getOthers()).thenReturn(1);
DiamondWhoosh ... | Diamond | positive | 438,752 |
private void timedReadThrottle(final String apiName, final String tableName, final int permits) {
if (readRateLimit(tableName) == null) {
throw new IllegalArgumentException("limiter for " + apiName + " on table " + tableName + " was null");
}
final Timer.Context throttleTimerCtxt = getTimerContext(String.format("%sThro... | private void timedReadThrottle(final String apiName, final String tableName, final int permits) {
<DeepExtract>
if (readRateLimit(tableName) == null) {
throw new IllegalArgumentException("limiter for " + apiName + " on table " + tableName + " was null");
}
final Timer.Context throttleTimerCtxt = getTimerContext(String.... | dynamodb-janusgraph-storage-backend | positive | 438,753 |
@Override
@CachePut(value = { "ueditor-blog" }, key = "'ueditor-blog:'+#a0.id")
public UEditorBlogDO updateSelective(UEditorBlogDO uEditorBlogDO) {
super.updateSelective(uEditorBlogDO);
return super.queryById(uEditorBlogDO.getId());
} | @Override
@CachePut(value = { "ueditor-blog" }, key = "'ueditor-blog:'+#a0.id")
public UEditorBlogDO updateSelective(UEditorBlogDO uEditorBlogDO) {
super.updateSelective(uEditorBlogDO);
<DeepExtract>
return super.queryById(uEditorBlogDO.getId());
</DeepExtract>
} | sanshanblog | positive | 438,755 |
@Override
public Object visit(ASTStrEnds node, Object data) throws VisitorException {
final StringBuilder sb = (StringBuilder) data;
sb.append("STRENDS" + "(");
if (node != null) {
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
node.jjtGetChild(i).jjtAccept(this, data);
if (i + 1 != node.jjtGetNumChildren()) {
sb... | @Override
public Object visit(ASTStrEnds node, Object data) throws VisitorException {
<DeepExtract>
final StringBuilder sb = (StringBuilder) data;
sb.append("STRENDS" + "(");
if (node != null) {
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
node.jjtGetChild(i).jjtAccept(this, data);
if (i + 1 != node.jjtGetNumCh... | sparqled | positive | 438,758 |
public File saveUrlToDocx(String url) throws Exception {
File file = new File(genFilePath() + ".docx");
url2word(url).save(file);
if (logger.isDebugEnabled()) {
logger.debug("Save to [.docx]: {}", file.getAbsolutePath());
}
return file;
} | public File saveUrlToDocx(String url) throws Exception {
<DeepExtract>
File file = new File(genFilePath() + ".docx");
url2word(url).save(file);
if (logger.isDebugEnabled()) {
logger.debug("Save to [.docx]: {}", file.getAbsolutePath());
}
return file;
</DeepExtract>
} | docx4j-template | positive | 438,759 |
protected void execute(Event event) {
Player p = this.p.getSingle(event);
String srv = this.srv.getSingle(event);
if (p == null || srv == null) {
return;
}
ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b);
try {
out.writeUTF("Connect");
out.writeUTF(srv);
} catch (IO... | protected void execute(Event event) {
Player p = this.p.getSingle(event);
String srv = this.srv.getSingle(event);
if (p == null || srv == null) {
return;
}
<DeepExtract>
ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b);
try {
out.writeUTF("Connect");
out.writeUTF(srv... | wildskript | positive | 438,760 |
public void dragdropAndWait(String locator, String movementsString) throws java.lang.Exception {
logger.warning("Action not implemented: dragdrop");
logger.info("Action ignored: waitForPageToLoad, timeout = " + "30000");
} | public void dragdropAndWait(String locator, String movementsString) throws java.lang.Exception {
logger.warning("Action not implemented: dragdrop");
<DeepExtract>
logger.info("Action ignored: waitForPageToLoad, timeout = " + "30000");
</DeepExtract>
} | selenium-client-factory | positive | 438,762 |
private Component[] createMenuItems() {
Tab[] tabs = new Tab[3];
final Tab tab = new Tab();
tab.add(new RouterLink("Public", PublicView.class));
ComponentUtil.setData(tab, Class.class, PublicView.class);
return tab;
if (accessChecker.hasAccess(PrivateView.class)) {
tabs[1] = createTab("Private", PrivateView.class);
} e... | private Component[] createMenuItems() {
Tab[] tabs = new Tab[3];
<DeepExtract>
final Tab tab = new Tab();
tab.add(new RouterLink("Public", PublicView.class));
ComponentUtil.setData(tab, Class.class, PublicView.class);
return tab;
</DeepExtract>
if (accessChecker.hasAccess(PrivateView.class)) {
tabs[1] = createTab("Priv... | spring | positive | 438,763 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_volley);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
ivTest = findViewById(R.id.imageView_test);
tvTest = findViewById(R.id.textView_test);
requestQueue = Volley.newRequestQueue... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_volley);
<DeepExtract>
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
ivTest = findViewById(R.id.imageView_test);
tvTest = findViewById(R.id.textView_test);
requestQueue = Volley.n... | Android-development-with-example | positive | 438,764 |
private void listGroupDescriptions(final String pattern) throws IOException {
if (mAuthenticatedUser == null) {
printStatusLine("480 Authentification required");
return;
}
mOutput.write("215 Information follows:");
mOutput.write(CRLF);
mOutput.flush();
synchronized (mMessageManager) {
for (final Board board : mMessageM... | private void listGroupDescriptions(final String pattern) throws IOException {
if (mAuthenticatedUser == null) {
printStatusLine("480 Authentification required");
return;
}
mOutput.write("215 Information follows:");
mOutput.write(CRLF);
mOutput.flush();
synchronized (mMessageManager) {
for (final Board board : mMessageM... | plugin-Freetalk | positive | 438,768 |
public static void w(String flag, Throwable throwable) {
if (DEBUG) {
Log.getStackTraceString(throwable) = makeMessage(flag, Log.getStackTraceString(throwable));
while (Log.getStackTraceString(throwable).length() > LOG_MAX_LENGTH) {
log(Log.getStackTraceString(throwable).substring(0, LOG_MAX_LENGTH), LEVEL_W);
Log.getS... | public static void w(String flag, Throwable throwable) {
<DeepExtract>
if (DEBUG) {
Log.getStackTraceString(throwable) = makeMessage(flag, Log.getStackTraceString(throwable));
while (Log.getStackTraceString(throwable).length() > LOG_MAX_LENGTH) {
log(Log.getStackTraceString(throwable).substring(0, LOG_MAX_LENGTH), LEVE... | SLWidget | positive | 438,770 |
@Issue("JENKINS-54126")
@Test
public void statWhenRootIs404() throws Exception {
githubApi.stubFor(get(urlEqualTo("/repos/cloudbeers/yolo/contents/?ref=refs%2Fpull%2F1%2Fmerge")).willReturn(aResponse().withStatus(404)).atPriority(0));
final GitHub github = Connector.connect("http://localhost:" + githubApi.port(), null)... | @Issue("JENKINS-54126")
@Test
public void statWhenRootIs404() throws Exception {
githubApi.stubFor(get(urlEqualTo("/repos/cloudbeers/yolo/contents/?ref=refs%2Fpull%2F1%2Fmerge")).willReturn(aResponse().withStatus(404)).atPriority(0));
<DeepExtract>
final GitHub github = Connector.connect("http://localhost:" + githubApi... | github-branch-source-plugin | positive | 438,771 |
private void init(Context context, AttributeSet attrs, int defStyle) {
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.sw_StarWarsTilesFrameLayout, defStyle, 0);
mAnimationDuration = a.getInt(R.styleable.sw_StarWarsTilesFrameLayout_sw_animationDuration, 1500);
mNumberOfTilesX = a.getInt(R.styleable.sw_... | private void init(Context context, AttributeSet attrs, int defStyle) {
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.sw_StarWarsTilesFrameLayout, defStyle, 0);
mAnimationDuration = a.getInt(R.styleable.sw_StarWarsTilesFrameLayout_sw_animationDuration, 1500);
mNumberOfTilesX = a.getInt(R.styleable.sw_... | Yalantis-Series | positive | 438,772 |
private static void addFile(String canonicalPath) throws IOException {
if (addedFiles.contains(canonicalPath))
return;
File f = new File(canonicalPath);
URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
Class<?> sysclass = URLClassLoader.class;
try {
Method method = sysclass.getDeclaredMet... | private static void addFile(String canonicalPath) throws IOException {
if (addedFiles.contains(canonicalPath))
return;
File f = new File(canonicalPath);
<DeepExtract>
URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
Class<?> sysclass = URLClassLoader.class;
try {
Method method = sysclass.... | CloudReports | positive | 438,774 |
private static STRING _STRING(Tree tree) {
for (int type : java_libbashParser.STRING) {
if (tree.getType() == type) {
return tree;
}
}
throw unsupported(tree);
STRINGBuilder builder = new STRINGBuilder();
for (int i = 0; i < tree.getChildCount(); i++) {
Tree child = tree.getChild(i);
builder.append(child);
}
return new... | private static STRING _STRING(Tree tree) {
for (int type : java_libbashParser.STRING) {
if (tree.getType() == type) {
return tree;
}
}
throw unsupported(tree);
STRINGBuilder builder = new STRINGBuilder();
for (int i = 0; i < tree.getChildCount(); i++) {
Tree child = tree.getChild(i);
builder.append(child);
}
<DeepExtra... | bash | positive | 438,775 |
public Fenix andGreaterThanEqual(String field, Object value, String name, boolean match) {
if (match) {
this.source.setPrefix(SymbolConst.AND).setSymbol(SymbolConst.GTE);
new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(name) ? StringHelper.fixDot(field) : name, value);
this.source.reset()... | public Fenix andGreaterThanEqual(String field, Object value, String name, boolean match) {
<DeepExtract>
if (match) {
this.source.setPrefix(SymbolConst.AND).setSymbol(SymbolConst.GTE);
new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(name) ? StringHelper.fixDot(field) : name, value);
this.... | fenix | positive | 438,776 |
public void setBetStates(ArrayList<BetState> states) {
this.betStates = states;
for (BetState state : states) {
if (state.getAction().equals("fold"))
this.activePlayers.remove(state.getPlayerID());
}
if (this.buttonID.equals(this.playerID)) {
this.isTheLastOne = true;
} else if (!this.activePlayers.get(0).equals(this.b... | public void setBetStates(ArrayList<BetState> states) {
this.betStates = states;
for (BetState state : states) {
if (state.getAction().equals("fold"))
this.activePlayers.remove(state.getPlayerID());
}
if (this.buttonID.equals(this.playerID)) {
this.isTheLastOne = true;
} else if (!this.activePlayers.get(0).equals(this.b... | texaspoker | positive | 438,777 |
public void stateChanged(javax.swing.event.ChangeEvent evt) {
this.hexMapPanel.getHexRenderer().setShowBorders(this.menuShowHexBorders.isSelected());
this.hexMapPanel.repaint();
} | public void stateChanged(javax.swing.event.ChangeEvent evt) {
<DeepExtract>
this.hexMapPanel.getHexRenderer().setShowBorders(this.menuShowHexBorders.isSelected());
this.hexMapPanel.repaint();
</DeepExtract>
} | jhexed | positive | 438,778 |
@Override
public void load(SuccessCallback<List<Data>> callback) {
this.mCallback = callback;
DbHelper.addChangedListener(mDataClass, this);
} | @Override
public void load(SuccessCallback<List<Data>> callback) {
this.mCallback = callback;
<DeepExtract>
DbHelper.addChangedListener(mDataClass, this);
</DeepExtract>
} | CNIm4Android | positive | 438,779 |
@Test
public final void testList() {
LocalCall<Boolean> call = Match.list("foo", "foo2", "foo3");
assertEquals("match.list", call.getPayload().get("fun"));
stubFor(any(urlMatching("/")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withHeader("Content-Type", "application/json").withBody(JSON_MATCH_OUTPUT... | @Test
public final void testList() {
LocalCall<Boolean> call = Match.list("foo", "foo2", "foo3");
assertEquals("match.list", call.getPayload().get("fun"));
<DeepExtract>
stubFor(any(urlMatching("/")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withHeader("Content-Type", "application/json").withBody(JSO... | salt-netapi-client | positive | 438,780 |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append('[');
if (false)
buffer.append(getColor());
buffer.append("UDPPacket");
if (false)
buffer.append(AnsiEscapeSequences.RESET);
buffer.append(": ");
buffer.append(getSourceAddress());
buffer.append('.');
buffer.append(IPPort.getName(getSour... | public String toString() {
<DeepExtract>
StringBuffer buffer = new StringBuffer();
buffer.append('[');
if (false)
buffer.append(getColor());
buffer.append("UDPPacket");
if (false)
buffer.append(AnsiEscapeSequences.RESET);
buffer.append(": ");
buffer.append(getSourceAddress());
buffer.append('.');
buffer.append(IPPort.g... | jpcap | positive | 438,781 |
public void getNodeSelectedByUser(NodeSelectionHandler handler, String text) {
if (!Global.isGuiMode()) {
throw new SinalgoFatalException("Invalid call to 'GUI.getNodeSelectedByUser()'. This method is not supported in batch mode.");
}
this.getUserSelectsNodeHandler().push(new Tuple<>(handler, text));
this.setUserSelect... | public void getNodeSelectedByUser(NodeSelectionHandler handler, String text) {
if (!Global.isGuiMode()) {
throw new SinalgoFatalException("Invalid call to 'GUI.getNodeSelectedByUser()'. This method is not supported in batch mode.");
}
this.getUserSelectsNodeHandler().push(new Tuple<>(handler, text));
this.setUserSelect... | sinalgo | positive | 438,782 |
public static JsonObject delete(final String url, final String creds, final String jsonObj) throws IOException {
final HttpURLConnection httpCon = createHttpCon(url, creds, "DELETE");
if (null != jsonObj && !"{}".equalsIgnoreCase(jsonObj.toString())) {
final OutputStreamWriter out = new OutputStreamWriter(httpCon.getOu... | public static JsonObject delete(final String url, final String creds, final String jsonObj) throws IOException {
<DeepExtract>
final HttpURLConnection httpCon = createHttpCon(url, creds, "DELETE");
if (null != jsonObj && !"{}".equalsIgnoreCase(jsonObj.toString())) {
final OutputStreamWriter out = new OutputStreamWriter... | serenity-jira | positive | 438,783 |
public int cfsetispeed(Termios termios, int speed) {
termios t = new termios(termios);
int ret = m_Clib.cfsetispeed(t, speed);
termios.c_iflag = c_iflag;
termios.c_oflag = c_oflag;
termios.c_cflag = c_cflag;
termios.c_lflag = c_lflag;
System.arraycopy(c_cc, 0, termios.c_cc, 0, termios.c_cc.length);
termios.c_ispeed = c... | public int cfsetispeed(Termios termios, int speed) {
termios t = new termios(termios);
int ret = m_Clib.cfsetispeed(t, speed);
<DeepExtract>
termios.c_iflag = c_iflag;
termios.c_oflag = c_oflag;
termios.c_cflag = c_cflag;
termios.c_lflag = c_lflag;
System.arraycopy(c_cc, 0, termios.c_cc, 0, termios.c_cc.length);
termio... | purejavacomm | positive | 438,784 |
public void applyBeauty() {
if (finalBmp != null && (smooth != 0 || whiteSkin != 0)) {
activity.changeMainBitmap(finalBmp, true);
}
this.smooth = 0;
this.whiteSkin = 0;
smoothValueBar.setProgress(0);
whiteValueBar.setProgress(0);
activity.mode = EditImageActivity.MODE_NONE;
activity.bottomGallery.setCurrentItem(MainMen... | public void applyBeauty() {
if (finalBmp != null && (smooth != 0 || whiteSkin != 0)) {
activity.changeMainBitmap(finalBmp, true);
}
<DeepExtract>
this.smooth = 0;
this.whiteSkin = 0;
smoothValueBar.setProgress(0);
whiteValueBar.setProgress(0);
activity.mode = EditImageActivity.MODE_NONE;
activity.bottomGallery.setCurre... | Ananas | positive | 438,785 |
private void refresh() {
if (contestReceiver != null) {
contestReceiver.stop();
contestReceiver = null;
}
if (taskReceiver != null) {
taskReceiver.stop();
taskReceiver = null;
}
Parser parser = (Parser) parserCombo.getSelectedItem();
final Description description = (Description) contestList.getSelectedValue();
int size... | private void refresh() {
if (contestReceiver != null) {
contestReceiver.stop();
contestReceiver = null;
}
if (taskReceiver != null) {
taskReceiver.stop();
taskReceiver = null;
}
Parser parser = (Parser) parserCombo.getSelectedItem();
final Description description = (Description) contestList.getSelectedValue();
<DeepExt... | idea-chelper | positive | 438,786 |
@Override
protected void setUpView() {
mTitle.setText(mDesc);
mToolbar.setTitleTextColor(getResources().getColor(android.R.color.white));
setSupportActionBar(mToolbar);
mToolbar.setNavigationIcon(R.mipmap.arrow_back);
mToolbar.setNavigationOnClickListener((view) -> finish());
if ((Boolean) SPUtil.get(WebDetailActivity.... | @Override
protected void setUpView() {
mTitle.setText(mDesc);
mToolbar.setTitleTextColor(getResources().getColor(android.R.color.white));
setSupportActionBar(mToolbar);
mToolbar.setNavigationIcon(R.mipmap.arrow_back);
mToolbar.setNavigationOnClickListener((view) -> finish());
<DeepExtract>
if ((Boolean) SPUtil.get(WebD... | EasyMvp | positive | 438,787 |
@Override
public void setOpen(boolean open) {
if (mFactor != 0 && mFactor != 1) {
return;
}
if (mAnimation != null) {
mAnimation.cancel();
}
mIsOpen = open;
mFactor = 1f;
if (mIsOpen) {
mPaintTrack.setColor(mColorTrackOpen);
} else {
mPaintTrack.setColor(mColorTrackOff);
}
invalidate();
} | @Override
public void setOpen(boolean open) {
if (mFactor != 0 && mFactor != 1) {
return;
}
<DeepExtract>
if (mAnimation != null) {
mAnimation.cancel();
}
</DeepExtract>
mIsOpen = open;
mFactor = 1f;
if (mIsOpen) {
mPaintTrack.setColor(mColorTrackOpen);
} else {
mPaintTrack.setColor(mColorTrackOff);
}
invalidate();
} | Common | positive | 438,788 |
public synchronized void requestReservedKey(int eventID, String keyChoice1, String keyChoice2, String keyChoice3) throws IOException {
writeBuffer.clear();
writeBuffer.position(16);
writeBuffer.putInt(eventID);
if ((keyChoice1 == null) ? "" : keyChoice1 == null) {
(keyChoice1 == null) ? "" : keyChoice1 = "";
}
byte[] b... | public synchronized void requestReservedKey(int eventID, String keyChoice1, String keyChoice2, String keyChoice3) throws IOException {
writeBuffer.clear();
writeBuffer.position(16);
writeBuffer.putInt(eventID);
if ((keyChoice1 == null) ? "" : keyChoice1 == null) {
(keyChoice1 == null) ? "" : keyChoice1 = "";
}
byte[] b... | jsimconnect | positive | 438,789 |
void addSectionMessage(@NotNull ConsoleContext consoleContext, @NotNull String message) {
this.insertNodeInto(new ConsoleTreeNode(message, ConsoleEntryType.MESSAGE), consoleContext.getContextNode());
this.nodesWereInserted(consoleContext.getContextNode(), new int[] { consoleContext.getContextNode().getChildCount() - 1 ... | void addSectionMessage(@NotNull ConsoleContext consoleContext, @NotNull String message) {
<DeepExtract>
this.insertNodeInto(new ConsoleTreeNode(message, ConsoleEntryType.MESSAGE), consoleContext.getContextNode());
this.nodesWereInserted(consoleContext.getContextNode(), new int[] { consoleContext.getContextNode().getChi... | IntelliJadPlus | positive | 438,790 |
public int getWidth(Rotation r) {
if (r.getAngle() == 0 || r.getAngle() == 2) {
return getWidth();
}
return bitPattern[0].length;
} | public int getWidth(Rotation r) {
if (r.getAngle() == 0 || r.getAngle() == 2) {
return getWidth();
}
<DeepExtract>
return bitPattern[0].length;
</DeepExtract>
} | SproutLife | positive | 438,791 |
@Override
public void onDraw(Canvas canvas) {
if (cameraManager == null) {
return;
}
Rect frame = cameraManager.getFramingRect();
if (frame == null) {
return;
}
int width = canvas.getWidth();
int height = canvas.getHeight();
paint.setColor(maskColor);
canvas.drawRect(0, 0, width, frame.top, paint);
canvas.drawRect(0, f... | @Override
public void onDraw(Canvas canvas) {
if (cameraManager == null) {
return;
}
Rect frame = cameraManager.getFramingRect();
if (frame == null) {
return;
}
int width = canvas.getWidth();
int height = canvas.getHeight();
paint.setColor(maskColor);
canvas.drawRect(0, 0, width, frame.top, paint);
canvas.drawRect(0, f... | ETHWallet | positive | 438,792 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.