before stringlengths 33 3.21M | after stringlengths 63 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
@Override
public void run() {
generateList("OS", currentSortRule);
} | @Override
public void run() {
<DeepExtract>
generateList("OS", currentSortRule);
</DeepExtract>
} | FreezeYou | positive | 3,496 |
public DataSet dataSet(Workout workout, List<Snapshot> snapshots) {
DataSource dataSource = new DataSource.Builder().setType(DataSource.TYPE_RAW).setDataType(type()).setAppPackageName(BuildConfig.APPLICATION_ID).build();
DataSet.Builder dataSet = DataSet.builder(dataSource);
int size = snapshots.size();
for (int i = 0;... | public DataSet dataSet(Workout workout, List<Snapshot> snapshots) {
DataSource dataSource = new DataSource.Builder().setType(DataSource.TYPE_RAW).setDataType(type()).setAppPackageName(BuildConfig.APPLICATION_ID).build();
DataSet.Builder dataSet = DataSet.builder(dataSource);
<DeepExtract>
int size = snapshots.size();
f... | coxswain | positive | 3,497 |
@Override
public List<Path> getPluginPaths() {
pluginsRoots.stream().flatMap(path -> streamFiles(path, new ZipFileFilter())).map(File::toPath).forEach(this::expandIfZip);
return super.getPluginPaths();
} | @Override
public List<Path> getPluginPaths() {
<DeepExtract>
pluginsRoots.stream().flatMap(path -> streamFiles(path, new ZipFileFilter())).map(File::toPath).forEach(this::expandIfZip);
</DeepExtract>
return super.getPluginPaths();
} | pf4j | positive | 3,498 |
public void replace(Applet applet) {
applet.stop();
applet.destroy();
this.applet = applet;
logger.info("Starting " + applet.getClass().getCanonicalName());
applet.setStub(this);
applet.setSize(getWidth(), getHeight());
add(applet, BorderLayout.CENTER);
logger.info("Initializing Minecraft...");
applet.init();
this.acti... | public void replace(Applet applet) {
applet.stop();
applet.destroy();
this.applet = applet;
<DeepExtract>
logger.info("Starting " + applet.getClass().getCanonicalName());
applet.setStub(this);
applet.setSize(getWidth(), getHeight());
add(applet, BorderLayout.CENTER);
logger.info("Initializing Minecraft...");
applet.ini... | SKMCLauncher | positive | 3,499 |
@Test
public void testMultiDiscard() throws Exception {
StatusReply set = client.set("testitnow", "willdo");
StatusReply multi = client.multi();
CompletableFuture<StatusReply> set1 = client.pipeline().set("testitnow", "notok");
client.discard();
assertEquals("willdo", new String(client.get("testitnow").data()));
Status... | @Test
public void testMultiDiscard() throws Exception {
StatusReply set = client.set("testitnow", "willdo");
StatusReply multi = client.multi();
CompletableFuture<StatusReply> set1 = client.pipeline().set("testitnow", "notok");
client.discard();
assertEquals("willdo", new String(client.get("testitnow").data()));
<DeepE... | redis-protocol | positive | 3,500 |
@Override
public String getProjectRepliesList(int id, Integer offset, Integer limit) {
return sProjectImpl.getProjectsList(id, offset, limit);
} | @Override
public String getProjectRepliesList(int id, Integer offset, Integer limit) {
<DeepExtract>
return sProjectImpl.getProjectsList(id, offset, limit);
</DeepExtract>
} | diycode-sdk | positive | 3,501 |
public String via() {
if (headerMaps.containsKey(HttpReqHead.VIA)) {
return headerMaps.get(HttpReqHead.VIA).getValue();
}
return null;
} | public String via() {
<DeepExtract>
if (headerMaps.containsKey(HttpReqHead.VIA)) {
return headerMaps.get(HttpReqHead.VIA).getValue();
}
return null;
</DeepExtract>
} | itoken | positive | 3,502 |
public final java_libbashParser.parens_return parens() throws RecognitionException {
java_libbashParser.parens_return retval = new java_libbashParser.parens_return();
return input.LT(1);
CommonTree root_0 = null;
Token LPAREN193 = null;
Token BLANK194 = null;
Token RPAREN195 = null;
CommonTree LPAREN193_tree = null;
Co... | public final java_libbashParser.parens_return parens() throws RecognitionException {
java_libbashParser.parens_return retval = new java_libbashParser.parens_return();
<DeepExtract>
return input.LT(1);
</DeepExtract>
CommonTree root_0 = null;
Token LPAREN193 = null;
Token BLANK194 = null;
Token RPAREN195 = null;
CommonT... | bash | positive | 3,503 |
@Theory
public void loadJmx(String command, AbstractCliTest i) throws Exception {
TestThread.JMXProcess process = disposer.register(TestThread.runJmxObservableProcess(false));
i.stdin("println D.load.jmx(D.args[0]).threads.where(nameIs('remotely-observed-thread'));%n");
i.run(command, process.JMX_CONNECTION);
assertTha... | @Theory
public void loadJmx(String command, AbstractCliTest i) throws Exception {
<DeepExtract>
TestThread.JMXProcess process = disposer.register(TestThread.runJmxObservableProcess(false));
i.stdin("println D.load.jmx(D.args[0]).threads.where(nameIs('remotely-observed-thread'));%n");
i.run(command, process.JMX_CONNECTI... | dumpling | positive | 3,504 |
public static QueryFixerOptions readUserInput(String[] args) {
CommandLine commandLine;
if (args.length == 0) {
System.out.println("Please provide arguments.");
commandLine = null;
}
CommandLineParser parser = new DefaultParser();
try {
commandLine = parser.parse(options, args);
} catch (ParseException e) {
System.out.... | public static QueryFixerOptions readUserInput(String[] args) {
<DeepExtract>
CommandLine commandLine;
if (args.length == 0) {
System.out.println("Please provide arguments.");
commandLine = null;
}
CommandLineParser parser = new DefaultParser();
try {
commandLine = parser.parse(options, args);
} catch (ParseException e)... | bigquery-utils | positive | 3,506 |
public S notExists(SQL sql) {
if ("NOT EXISTS" == null || "NOT EXISTS".length == 0) {
throw new IllegalArgumentException("keys cannot be null or []");
}
if ("NOT EXISTS".length == 1) {
return this.where("NOT EXISTS"[0], "", sql);
} else {
StringBuilder columnsAppender = new StringBuilder();
columnsAppender.append("(");... | public S notExists(SQL sql) {
<DeepExtract>
if ("NOT EXISTS" == null || "NOT EXISTS".length == 0) {
throw new IllegalArgumentException("keys cannot be null or []");
}
if ("NOT EXISTS".length == 1) {
return this.where("NOT EXISTS"[0], "", sql);
} else {
StringBuilder columnsAppender = new StringBuilder();
columnsAppende... | GyJdbc | positive | 3,507 |
public void new_(int cp_index) {
if (this.count >= this.maxLength) {
throw new CompileException("Write after end of stream.");
}
write(Bytecode.NEW.getBytecode() & 0xff);
write_u1(cp_index >> 8);
write_u1(cp_index);
} | public void new_(int cp_index) {
if (this.count >= this.maxLength) {
throw new CompileException("Write after end of stream.");
}
write(Bytecode.NEW.getBytecode() & 0xff);
<DeepExtract>
write_u1(cp_index >> 8);
write_u1(cp_index);
</DeepExtract>
} | BASICCompiler | positive | 3,508 |
private static void runBenchmark(final String[] args, final String packageName, final String applicationName, RWLogger outLogger) throws ParseException, IllegalArgumentException, IOException, InterruptedException, ExecutionException, TimeoutException, HelpException, ClassNotFoundException, InvocationTargetException, In... | private static void runBenchmark(final String[] args, final String packageName, final String applicationName, RWLogger outLogger) throws ParseException, IllegalArgumentException, IOException, InterruptedException, ExecutionException, TimeoutException, HelpException, ClassNotFoundException, InvocationTargetException, In... | SBK | positive | 3,510 |
@Override
public void caseInterfaceInvokeExpr(InterfaceInvokeExpr v) {
SootMethod method = v.getMethod();
SootMethodRef methodRef = v.getMethodRef();
if (methodRef.getSignature().equals("<android.telephony.SmsMessage: " + "android.telephony.SmsMessage createFromPdu(byte[])>")) {
ExpressionSet op1 = resolveValue(v.getAr... | @Override
public void caseInterfaceInvokeExpr(InterfaceInvokeExpr v) {
<DeepExtract>
SootMethod method = v.getMethod();
SootMethodRef methodRef = v.getMethodRef();
if (methodRef.getSignature().equals("<android.telephony.SmsMessage: " + "android.telephony.SmsMessage createFromPdu(byte[])>")) {
ExpressionSet op1 = resolv... | tiro | positive | 3,511 |
@Override
public void setSurface(Surface surface) throws IOException {
mCamera.setPreviewCallback(null);
mCamera.stopPreview();
if (surface != null) {
mSurfaceHolder = new DummySurfaceHolder(surface);
startPreview(mSurfaceHolder);
} else {
mSurfaceHolder = null;
startPreview(null);
}
} | @Override
public void setSurface(Surface surface) throws IOException {
<DeepExtract>
mCamera.setPreviewCallback(null);
mCamera.stopPreview();
</DeepExtract>
if (surface != null) {
mSurfaceHolder = new DummySurfaceHolder(surface);
startPreview(mSurfaceHolder);
} else {
mSurfaceHolder = null;
startPreview(null);
}
} | spynet-camera | positive | 3,512 |
public String getFieldName() {
if (this.fieldDescriptor == null) {
return "";
}
return this.name;
} | public String getFieldName() {
if (this.fieldDescriptor == null) {
return "";
}
<DeepExtract>
return this.name;
</DeepExtract>
} | xresloader | positive | 3,513 |
protected void init() {
source.addTextSourceListener(this);
ITextBlock[] blocks = source.getBlocks();
entries = new ArrayList<SearchScopeEntry>(blocks.length);
for (ITextBlock block : blocks) {
SearchScopeEntry entry = createEntry(block);
entries.add(entry);
}
Collections.sort(entries);
if (source.getSelection() != nul... | protected void init() {
source.addTextSourceListener(this);
ITextBlock[] blocks = source.getBlocks();
entries = new ArrayList<SearchScopeEntry>(blocks.length);
for (ITextBlock block : blocks) {
SearchScopeEntry entry = createEntry(block);
entries.add(entry);
}
Collections.sort(entries);
<DeepExtract>
if (source.getSele... | glance | positive | 3,514 |
@Override
public void actionPerformed(ActionEvent e) {
dispose();
} | @Override
public void actionPerformed(ActionEvent e) {
<DeepExtract>
dispose();
</DeepExtract>
} | hrider | positive | 3,515 |
@Test
public void testSkippedField2() throws IOException {
SortedMap<Key, Value> map = new TreeMap<>();
map.put(new Key("key1", "cf0", "cq1"), new Value("xxx"));
map.put(new Key("key1", "cf1", "cq1"), new Value("abc"));
map.put(new Key("key1", "cf1", "cq2"), new Value("def"));
SortedMapIterator parentIterator = new Sor... | @Test
public void testSkippedField2() throws IOException {
SortedMap<Key, Value> map = new TreeMap<>();
map.put(new Key("key1", "cf0", "cq1"), new Value("xxx"));
map.put(new Key("key1", "cf1", "cq1"), new Value("abc"));
map.put(new Key("key1", "cf1", "cq2"), new Value("def"));
<DeepExtract>
SortedMapIterator parentIter... | masc | positive | 3,516 |
@NonNull
public TSnackbarBig setColor(ColorStateList colors) {
final Button btn = mView.getActionView();
btn.setTextColor(colors);
return this;
final TextView tv = mView.getMessageView();
tv.setTextColor(colors);
return this;
return this;
} | @NonNull
public TSnackbarBig setColor(ColorStateList colors) {
final Button btn = mView.getActionView();
btn.setTextColor(colors);
return this;
<DeepExtract>
final TextView tv = mView.getMessageView();
tv.setTextColor(colors);
return this;
</DeepExtract>
return this;
} | GarbageSorting | positive | 3,517 |
public synchronized <T extends Event> void removeEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) {
typedEvents.removeIf(g -> g.filter == false && g.type == eventType && g.handle == eventHandler);
if (false)
n.removeEventFilter(eventType, eventHandler);
else
n.removeEventHandler(eventType, eve... | public synchronized <T extends Event> void removeEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) {
<DeepExtract>
typedEvents.removeIf(g -> g.filter == false && g.type == eventType && g.handle == eventHandler);
if (false)
n.removeEventFilter(eventType, eventHandler);
else
n.removeEventHandler(... | Simulizer | positive | 3,518 |
@JsonCreator
private static ServerDto.Builder create() {
return new AutoValue_ServerDto.Builder().setHostName(Optional.empty()).setStartupDateTime(Optional.empty());
} | @JsonCreator
private static ServerDto.Builder create() {
<DeepExtract>
return new AutoValue_ServerDto.Builder().setHostName(Optional.empty()).setStartupDateTime(Optional.empty());
</DeepExtract>
} | beadledom | positive | 3,519 |
@Override
public boolean showParticles() {
return false;
} | @Override
public boolean showParticles() {
<DeepExtract>
return false;
</DeepExtract>
} | SuperMassiveTech | positive | 3,520 |
public Tweet setStatus(Status status) {
this.status = status;
this.id = "" + status.getId();
this.sentence = new Sentence(status.getText());
if (status.getUser() != null) {
if (status.getUser().getLocation() != null)
this.userLocation = status.getUser().getLocation();
if (status.getUser().getDescription() != null)
this... | public Tweet setStatus(Status status) {
this.status = status;
<DeepExtract>
this.id = "" + status.getId();
this.sentence = new Sentence(status.getText());
if (status.getUser() != null) {
if (status.getUser().getLocation() != null)
this.userLocation = status.getUser().getLocation();
if (status.getUser().getDescription()... | geolocator-3.0 | positive | 3,521 |
public Criteria andConfigModeBetween(String value1, String value2) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "configMode" + " cannot be null");
}
criteria.add(new Criterion("config_mode between", value1, value2));
return (Criteria) this;
} | public Criteria andConfigModeBetween(String value1, String value2) {
<DeepExtract>
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "configMode" + " cannot be null");
}
criteria.add(new Criterion("config_mode between", value1, value2));
</DeepExtract>
return (Criteria) this;
} | AnyMock | positive | 3,522 |
@Override
public void calculateDamageDisplay(AbstractMonster mo) {
this.block = this.baseDamage + AbstractDungeon.player.exhaustPile.size() * this.magicNumber;
super.calculateCardDamage(mo);
} | @Override
public void calculateDamageDisplay(AbstractMonster mo) {
<DeepExtract>
this.block = this.baseDamage + AbstractDungeon.player.exhaustPile.size() * this.magicNumber;
super.calculateCardDamage(mo);
</DeepExtract>
} | STS_ThMod_MRS | positive | 3,523 |
public CCObserviableAttributeCollection Observe(Item item) {
CCObserviableAttributeCollection atts = new CCObserviableAttributeCollection();
atts.resourceType = CCResourceType.ITEM;
atts.resourceId = item.getRegistryName().toString();
List<String> valueMap = null;
if (!attributeMap.containsKey(CCAttributeId.ITEM_ID)) {... | public CCObserviableAttributeCollection Observe(Item item) {
CCObserviableAttributeCollection atts = new CCObserviableAttributeCollection();
atts.resourceType = CCResourceType.ITEM;
atts.resourceId = item.getRegistryName().toString();
<DeepExtract>
List<String> valueMap = null;
if (!attributeMap.containsKey(CCAttribute... | chaoscraft-mod | positive | 3,525 |
public String[] getDirectives(String key) {
if (directives == null) {
return new String[] {};
}
Object result = directives.get(key);
if (result == null) {
return new String[] {};
}
if (result instanceof String) {
return new String[] { (String) result };
}
@SuppressWarnings("unchecked")
List<String> valueList = (List<St... | public String[] getDirectives(String key) {
<DeepExtract>
if (directives == null) {
return new String[] {};
}
Object result = directives.get(key);
if (result == null) {
return new String[] {};
}
if (result instanceof String) {
return new String[] { (String) result };
}
@SuppressWarnings("unchecked")
List<String> valueL... | carbon-kernel | positive | 3,526 |
void exchange(final BigInteger amountInWei) {
atomicSwapSenderError = amountInWei.compareTo(MAX_VALUE) == 1;
if (atomicSwapSenderError) {
return;
}
BigInteger swapAmountOtherChain = amountInWei.multiply(this.atomicSwapSender_Exchange_exchangeRate);
swapAmountOtherChain = swapAmountOtherChain.divide(DECIMAL_POINT);
this... | void exchange(final BigInteger amountInWei) {
atomicSwapSenderError = amountInWei.compareTo(MAX_VALUE) == 1;
if (atomicSwapSenderError) {
return;
}
BigInteger swapAmountOtherChain = amountInWei.multiply(this.atomicSwapSender_Exchange_exchangeRate);
swapAmountOtherChain = swapAmountOtherChain.divide(DECIMAL_POINT);
<Dee... | sidechains-samples | positive | 3,527 |
public void setSys(AvalonSystem s) {
sys = s;
if (sys != null) {
AbstractSopcGenerator gen = GeneratorFactory.createGeneratorFor(sys, genType);
if (gen != null) {
if (gen.isTextOutput()) {
txtDts.setText(gen.getTextOutput((bi == null ? new BoardInfo() : bi)));
} else {
txtDts.setText(bin2HexString(gen.getBinaryOutput((... | public void setSys(AvalonSystem s) {
sys = s;
<DeepExtract>
if (sys != null) {
AbstractSopcGenerator gen = GeneratorFactory.createGeneratorFor(sys, genType);
if (gen != null) {
if (gen.isTextOutput()) {
txtDts.setText(gen.getTextOutput((bi == null ? new BoardInfo() : bi)));
} else {
txtDts.setText(bin2HexString(gen.get... | sopc2dts | positive | 3,529 |
public static final int resemblanceOrder(final int order1, final int order2, final int figure) {
int order = ORDER_INVALID;
int order1Reverse;
if (order1 == ORDER_NONE) {
order1Reverse = ORDER_NONE;
} else {
order1Reverse = -order1;
}
if ((order2 == TemporalRules.ORDER_NONE)) {
order = (figure > 20) ? order1 : order1Re... | public static final int resemblanceOrder(final int order1, final int order2, final int figure) {
int order = ORDER_INVALID;
<DeepExtract>
int order1Reverse;
if (order1 == ORDER_NONE) {
order1Reverse = ORDER_NONE;
} else {
order1Reverse = -order1;
}
</DeepExtract>
if ((order2 == TemporalRules.ORDER_NONE)) {
order = (fig... | opennars | positive | 3,530 |
@Override
public AstNode visitExpression_identifier(Expression_identifierContext ctx) {
if (this != null) {
return (T) this.accept(this);
}
return null;
} | @Override
public AstNode visitExpression_identifier(Expression_identifierContext ctx) {
<DeepExtract>
if (this != null) {
return (T) this.accept(this);
}
return null;
</DeepExtract>
} | jetbrick-template-2x | positive | 3,531 |
public int climbStairs2(int n) {
int[] memo = new int[n + 1];
if (0 > n)
return 0;
if (0 == n)
return 1;
if (memo[0] > 0)
return memo[0];
memo[0] = climbStairsHelper(0 + 1, n, memo) + climbStairsHelper(0 + 2, n, memo) + climbStairsHelper(0 + 3, n, memo);
return memo[0];
} | public int climbStairs2(int n) {
int[] memo = new int[n + 1];
<DeepExtract>
if (0 > n)
return 0;
if (0 == n)
return 1;
if (memo[0] > 0)
return memo[0];
memo[0] = climbStairsHelper(0 + 1, n, memo) + climbStairsHelper(0 + 2, n, memo) + climbStairsHelper(0 + 3, n, memo);
return memo[0];
</DeepExtract>
} | LintCode | positive | 3,532 |
private static void addTrailingDefaultLine(List<Text[]> result, ArgSpec arg, ColorScheme scheme) {
Text EMPTY = Ansi.EMPTY_TEXT;
return new Text[] { EMPTY, EMPTY, EMPTY, EMPTY, scheme.ansi().new Text(" Default: " + arg.defaultValueString()) }.isOption() ? addOption((OptionSpec) new Text[] { EMPTY, EMPTY, EMPTY, EMPTY,... | private static void addTrailingDefaultLine(List<Text[]> result, ArgSpec arg, ColorScheme scheme) {
Text EMPTY = Ansi.EMPTY_TEXT;
<DeepExtract>
return new Text[] { EMPTY, EMPTY, EMPTY, EMPTY, scheme.ansi().new Text(" Default: " + arg.defaultValueString()) }.isOption() ? addOption((OptionSpec) new Text[] { EMPTY, EMPTY,... | eclipstyle | positive | 3,533 |
@Override
public void onClick(DialogInterface dialog, int which) {
try {
dialog.dismiss();
} catch (Exception ignore) {
}
SharedPreferences.Editor editor = getSharedPreferences(getClass().getSimpleName(), Context.MODE_PRIVATE).edit();
editor.putBoolean(PREFERENCE_PERMISSION_DENIED + permission, true).commit();
mRequest... | @Override
public void onClick(DialogInterface dialog, int which) {
try {
dialog.dismiss();
} catch (Exception ignore) {
}
<DeepExtract>
SharedPreferences.Editor editor = getSharedPreferences(getClass().getSimpleName(), Context.MODE_PRIVATE).edit();
editor.putBoolean(PREFERENCE_PERMISSION_DENIED + permission, true).comm... | Android-RTEditor | positive | 3,534 |
public boolean isZero() {
if (RatNum.ZERO instanceof RatTerm) {
RatTerm rt = (RatTerm) RatNum.ZERO;
if (this.isNaN() && rt.isNaN()) {
return true;
} else {
return this.expt == rt.expt && this.coeff.equals(rt.coeff);
}
} else {
return false;
}
} | public boolean isZero() {
<DeepExtract>
if (RatNum.ZERO instanceof RatTerm) {
RatTerm rt = (RatTerm) RatNum.ZERO;
if (this.isNaN() && rt.isNaN()) {
return true;
} else {
return this.expt == rt.expt && this.coeff.equals(rt.coeff);
}
} else {
return false;
}
</DeepExtract>
} | CSE331 | positive | 3,538 |
@Override
public void visit(GreaterThanEquals arg0) {
Expression expression1 = arg0.getLeftExpression();
Expression expression2 = arg0.getRightExpression();
expression1.accept(this);
expression2.accept(this);
outputType.put(arg0, SQLtype.BOOL);
propagateScope(expression1, arg0);
propagateScope(expression2, arg0);
castI... | @Override
public void visit(GreaterThanEquals arg0) {
<DeepExtract>
Expression expression1 = arg0.getLeftExpression();
Expression expression2 = arg0.getRightExpression();
expression1.accept(this);
expression2.accept(this);
outputType.put(arg0, SQLtype.BOOL);
propagateScope(expression1, arg0);
propagateScope(expression2... | skinnerdb | positive | 3,539 |
public Object invokeWithoutCheck(Object bean) throws Exception {
try {
return getterMethod.invoke(bean);
} catch (IllegalAccessException e) {
throw new BristleRuntimeException(e.getMessage(), e);
} catch (InvocationTargetException e) {
throw new BristleRuntimeException(e.getMessage(), e);
}
} | public Object invokeWithoutCheck(Object bean) throws Exception {
<DeepExtract>
try {
return getterMethod.invoke(bean);
} catch (IllegalAccessException e) {
throw new BristleRuntimeException(e.getMessage(), e);
} catch (InvocationTargetException e) {
throw new BristleRuntimeException(e.getMessage(), e);
}
</DeepExtract>... | bristleback | positive | 3,540 |
private void setup() {
if (!mReady) {
mSetupPending = true;
return;
}
if (getWidth() == 0 && getHeight() == 0) {
return;
}
if (mBitmap == null) {
invalidate();
return;
}
mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
mBitmapPaint.setAntiAlias(true);
mBitmapPaint.setShader(mBitm... | private void setup() {
if (!mReady) {
mSetupPending = true;
return;
}
if (getWidth() == 0 && getHeight() == 0) {
return;
}
if (mBitmap == null) {
invalidate();
return;
}
mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
mBitmapPaint.setAntiAlias(true);
mBitmapPaint.setShader(mBitm... | ToDoList | positive | 3,541 |
public void writeFullyInt64(long address, long[] b, int off, int len) throws IOException {
data.offset(address - header.address);
data.writeFullyInt64(b, off, len);
} | public void writeFullyInt64(long address, long[] b, int off, int len) throws IOException {
<DeepExtract>
data.offset(address - header.address);
</DeepExtract>
data.writeFullyInt64(b, off, len);
} | org.cakelab.blender.io | positive | 3,542 |
public void testSelftRSA_PKCS1() {
short k = KeyBuilder.LENGTH_RSA_512 / Byte.SIZE;
short maxMsgLen = (short) (k - 11);
Cipher cipher = Cipher.getInstance(Cipher.ALG_RSA_PKCS1, false);
KeyPair kp = new KeyPair(KeyPair.ALG_RSA, KeyBuilder.LENGTH_RSA_512);
kp.genKeyPair();
cipher.init(kp.getPublic(), Cipher.MODE_ENCRYPT)... | public void testSelftRSA_PKCS1() {
short k = KeyBuilder.LENGTH_RSA_512 / Byte.SIZE;
short maxMsgLen = (short) (k - 11);
Cipher cipher = Cipher.getInstance(Cipher.ALG_RSA_PKCS1, false);
KeyPair kp = new KeyPair(KeyPair.ALG_RSA, KeyBuilder.LENGTH_RSA_512);
kp.genKeyPair();
cipher.init(kp.getPublic(), Cipher.MODE_ENCRYPT)... | jcardsim | positive | 3,543 |
public Criteria andBookIdIsNotNull() {
if ("book_id is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("book_id is not null"));
return (Criteria) this;
} | public Criteria andBookIdIsNotNull() {
<DeepExtract>
if ("book_id is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("book_id is not null"));
</DeepExtract>
return (Criteria) this;
} | springboot-BMSystem | positive | 3,544 |
public final AC shrinkWeight(float w, int... indexes) {
Float sw = new Float(w);
for (int i = indexes.length - 1; i >= 0; i--) {
int ix = indexes[i];
makeSize(ix);
cList.get(ix).setShrink(sw);
}
return this;
} | public final AC shrinkWeight(float w, int... indexes) {
<DeepExtract>
Float sw = new Float(w);
for (int i = indexes.length - 1; i >= 0; i--) {
int ix = indexes[i];
makeSize(ix);
cList.get(ix).setShrink(sw);
}
return this;
</DeepExtract>
} | miglayout | positive | 3,545 |
public static String generateSignedXml(final Map<String, String> data, String key, SignType signType) throws Exception {
String sign;
Set<String> keySet = data.keySet();
String[] keyArray = keySet.toArray(new String[keySet.size()]);
Arrays.sort(keyArray);
StringBuilder sb = new StringBuilder();
for (String k : keyArray... | public static String generateSignedXml(final Map<String, String> data, String key, SignType signType) throws Exception {
String sign;
Set<String> keySet = data.keySet();
String[] keyArray = keySet.toArray(new String[keySet.size()]);
Arrays.sort(keyArray);
StringBuilder sb = new StringBuilder();
for (String k : keyArray... | r-mall | positive | 3,547 |
public Criteria andWxNotIn(List<String> values) {
if (values == null) {
throw new RuntimeException("Value for " + "wx" + " cannot be null");
}
criteria.add(new Criterion("wx not in", values));
return (Criteria) this;
} | public Criteria andWxNotIn(List<String> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "wx" + " cannot be null");
}
criteria.add(new Criterion("wx not in", values));
</DeepExtract>
return (Criteria) this;
} | uccn | positive | 3,548 |
public Criteria andNumberGreaterThan(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "number" + " cannot be null");
}
criteria.add(new Criterion("number >", value));
return (Criteria) this;
} | public Criteria andNumberGreaterThan(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "number" + " cannot be null");
}
criteria.add(new Criterion("number >", value));
</DeepExtract>
return (Criteria) this;
} | SSM_VUE | positive | 3,550 |
private static final int[] body(int[] schedule, int Eswap0, int Eswap1) {
int left = 0;
int right = 0;
int t = 0;
for (int j = 0; j < 25; j++) {
for (int i = 0; i < ITERATIONS * 2; i += 4) {
left = D_ENCRYPT(left, right, i, Eswap0, Eswap1, schedule);
right = D_ENCRYPT(right, left, i + 2, Eswap0, Eswap1, schedule);
}
t ... | private static final int[] body(int[] schedule, int Eswap0, int Eswap1) {
int left = 0;
int right = 0;
int t = 0;
for (int j = 0; j < 25; j++) {
for (int i = 0; i < ITERATIONS * 2; i += 4) {
left = D_ENCRYPT(left, right, i, Eswap0, Eswap1, schedule);
right = D_ENCRYPT(right, left, i + 2, Eswap0, Eswap1, schedule);
}
t ... | deployr-rserve | positive | 3,551 |
@Override
public void onBackPressed() {
super.onBackPressed();
setResult(RESULT_CANCELED);
finish();
} | @Override
public void onBackPressed() {
super.onBackPressed();
<DeepExtract>
setResult(RESULT_CANCELED);
finish();
</DeepExtract>
} | iLiveSDK_Android_Suixinbo | positive | 3,552 |
public void one() {
Util.arrayFillNonAtomic(value, (short) 0, this.size, (byte) 0);
value[(short) (size - 1)] = 1;
} | public void one() {
<DeepExtract>
Util.arrayFillNonAtomic(value, (short) 0, this.size, (byte) 0);
</DeepExtract>
value[(short) (size - 1)] = 1;
} | JCMathLib | positive | 3,553 |
private void enableController() {
if (null == play_pauseButton)
return;
play_pauseButton.setClickable(true);
if (null == videoBar)
return;
videoBar.setClickable(true);
if (null == mContainerLayout)
return;
mContainerLayout.setClickable(true);
if (null == full_screenButton)
return;
full_screenButton.setClickable(true);
... | private void enableController() {
if (null == play_pauseButton)
return;
play_pauseButton.setClickable(true);
<DeepExtract>
if (null == videoBar)
return;
videoBar.setClickable(true);
</DeepExtract>
if (null == mContainerLayout)
return;
mContainerLayout.setClickable(true);
if (null == full_screenButton)
return;
full_scre... | YouKuPlayerDemo | positive | 3,554 |
public Builder stringField(String name) {
fields.add(new Field(name, FieldType.STRING));
return this;
} | public Builder stringField(String name) {
<DeepExtract>
fields.add(new Field(name, FieldType.STRING));
return this;
</DeepExtract>
} | exhibit | positive | 3,555 |
@Override
public void mouseEntered(MouseEvent evt) {
m_jlStatusBar.setText((String) m_keyStoreReportAction.getValue(Action.LONG_DESCRIPTION));
} | @Override
public void mouseEntered(MouseEvent evt) {
<DeepExtract>
m_jlStatusBar.setText((String) m_keyStoreReportAction.getValue(Action.LONG_DESCRIPTION));
</DeepExtract>
} | portecle | positive | 3,556 |
@SuppressWarnings("WeakerAccess")
public int getGreenInt() {
return ((int) getGreen()) & 0xff;
} | @SuppressWarnings("WeakerAccess")
public int getGreenInt() {
<DeepExtract>
return ((int) getGreen()) & 0xff;
</DeepExtract>
} | JavaOSC | positive | 3,557 |
public Criteria andN_dateNotIn(List<Date> values) {
if (values == null) {
throw new RuntimeException("Value for " + "n_date" + " cannot be null");
}
criteria.add(new Criterion("n_date not in", values));
return (Criteria) this;
} | public Criteria andN_dateNotIn(List<Date> values) {
<DeepExtract>
if (values == null) {
throw new RuntimeException("Value for " + "n_date" + " cannot be null");
}
criteria.add(new Criterion("n_date not in", values));
</DeepExtract>
return (Criteria) this;
} | BaiChengNews | positive | 3,558 |
@Override
public ServerDirectory createDirectory(AuthToken u, ServerPath serverPath) throws OWLServerException {
if (!loginService.checkAuthentication(u)) {
throw new AuthenticationFailedException();
}
return getDelegate().createDirectory(u, serverPath);
} | @Override
public ServerDirectory createDirectory(AuthToken u, ServerPath serverPath) throws OWLServerException {
<DeepExtract>
if (!loginService.checkAuthentication(u)) {
throw new AuthenticationFailedException();
}
</DeepExtract>
return getDelegate().createDirectory(u, serverPath);
} | protege-server | positive | 3,559 |
@Override
public void trace(final Marker marker, final String msg, final Throwable t) {
if (!TRACE.isGreaterOrEqual(minimum))
throw new IllegalStateException(format("%s logging disabled for logger \"%s\" [%s]", TRACE, getName(), getClass().getName()));
super.trace(marker, msg, t);
} | @Override
public void trace(final Marker marker, final String msg, final Throwable t) {
<DeepExtract>
if (!TRACE.isGreaterOrEqual(minimum))
throw new IllegalStateException(format("%s logging disabled for logger \"%s\" [%s]", TRACE, getName(), getClass().getName()));
</DeepExtract>
super.trace(marker, msg, t);
} | binkley | positive | 3,560 |
@Override
public synchronized void addVotingBlockToCache(Block block) {
if (block.getHeight() > height) {
this.blockCache.get(block.getHeight(), k -> new HashMap<>(7)).put(block.getHash(), block);
}
} | @Override
public synchronized void addVotingBlockToCache(Block block) {
<DeepExtract>
if (block.getHeight() > height) {
this.blockCache.get(block.getHeight(), k -> new HashMap<>(7)).put(block.getHash(), block);
}
</DeepExtract>
} | Swiftglobal | positive | 3,563 |
public static Type getBigMapKeyType(Field field) {
Type[] mapTypes;
if (BigMap.class.equals(field.getType())) {
if (field.getGenericType() instanceof ParameterizedType) {
ParameterizedType mapType = (ParameterizedType) field.getGenericType();
mapTypes = mapType.getActualTypeArguments();
}
mapTypes = null;
} else {
mapT... | public static Type getBigMapKeyType(Field field) {
<DeepExtract>
Type[] mapTypes;
if (BigMap.class.equals(field.getType())) {
if (field.getGenericType() instanceof ParameterizedType) {
ParameterizedType mapType = (ParameterizedType) field.getGenericType();
mapTypes = mapType.getActualTypeArguments();
}
mapTypes = null;... | spikeify | positive | 3,564 |
public static synchronized void saveFile(String fileIndex, String fileName, Map<String, String> contentList) {
try {
File fileDir = new File(fileIndex);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
String filePath = fileIndex + File.separator + fileName;
File file = new File(filePath);
if (!file.exists()) {
try {
file.... | public static synchronized void saveFile(String fileIndex, String fileName, Map<String, String> contentList) {
<DeepExtract>
try {
File fileDir = new File(fileIndex);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
String filePath = fileIndex + File.separator + fileName;
File file = new File(filePath);
if (!file.exists())... | FanucCNCInfo | positive | 3,565 |
public static void i(String tag, String message, int methodCount) {
if (methodCount < 0 || methodCount > MAX_METHOD_COUNT) {
throw new IllegalStateException("methodCount must be > 0 and < 5");
}
if (settings.logLevel == LogLevel.NONE) {
return;
}
logTopBorder(Log.INFO, tag);
logHeaderContent(Log.INFO, tag, methodCount)... | public static void i(String tag, String message, int methodCount) {
if (methodCount < 0 || methodCount > MAX_METHOD_COUNT) {
throw new IllegalStateException("methodCount must be > 0 and < 5");
}
<DeepExtract>
if (settings.logLevel == LogLevel.NONE) {
return;
}
logTopBorder(Log.INFO, tag);
logHeaderContent(Log.INFO, tag... | JianDan_AsyncHttpClient | positive | 3,566 |
public void startCountdown() {
mCountdownSpring.addListener(mSpringListener);
mCurrentCount = mStartCount;
setText(String.valueOf(mCurrentCount));
mCountdownSpring.setCurrentValue(0.01);
mCountdownSpring.setEndValue(1);
show();
if (mCountdownCallback != null) {
mCountdownCallback.onStart();
}
mCountdownSubscription = O... | public void startCountdown() {
mCountdownSpring.addListener(mSpringListener);
mCurrentCount = mStartCount;
<DeepExtract>
setText(String.valueOf(mCurrentCount));
mCountdownSpring.setCurrentValue(0.01);
mCountdownSpring.setEndValue(1);
show();
</DeepExtract>
if (mCountdownCallback != null) {
mCountdownCallback.onStart();... | AndroidPlayground | positive | 3,567 |
@Override
public IndexOperation remove(Iterable<T> objects) {
if (Expressive.isEmpty(objects)) {
return new IndexOperation(null);
}
List<K> ids = new ArrayList<>();
for (T object : objects) {
ids.add(metadata.getId(object));
}
return super.removeById(ids);
} | @Override
public IndexOperation remove(Iterable<T> objects) {
if (Expressive.isEmpty(objects)) {
return new IndexOperation(null);
}
List<K> ids = new ArrayList<>();
for (T object : objects) {
ids.add(metadata.getId(object));
}
<DeepExtract>
return super.removeById(ids);
</DeepExtract>
} | AppleSeed | positive | 3,568 |
@Test
public void unsampledSpan() {
brave.Span unsampledRemote = tracing.tracer().nextSpan(TraceContextOrSamplingFlags.NOT_SAMPLED).name("test").start(1L);
assertThat(unsampledRemote.isNoop()).isTrue();
assertThat(unsampledRemote.context().sampled()).isFalse();
assertThat(unsampledRemote.context().sampledLocal()).isFal... | @Test
<DeepExtract>
</DeepExtract>
public void unsampledSpan() {
<DeepExtract>
</DeepExtract>
brave.Span unsampledRemote = tracing.tracer().nextSpan(TraceContextOrSamplingFlags.NOT_SAMPLED).name("test").start(1L);
<DeepExtract>
</DeepExtract>
assertThat(unsampledRemote.isNoop()).isTrue();
<DeepExtract>
</DeepExtract>
a... | zipkin-reporter-java | positive | 3,569 |
private void showExitAlert() {
AlertDialog.Builder exitBuilder = new AlertDialog.Builder(MainActivity.this);
this.title = "Close application";
getActionBar().setTitle("Close application");
exitBuilder.setMessage("Do you really want to exit the application?");
exitBuilder.setNegativeButton("No", new DialogInterface.OnCl... | private void showExitAlert() {
AlertDialog.Builder exitBuilder = new AlertDialog.Builder(MainActivity.this);
<DeepExtract>
this.title = "Close application";
getActionBar().setTitle("Close application");
</DeepExtract>
exitBuilder.setMessage("Do you really want to exit the application?");
exitBuilder.setNegativeButton("... | owasp-seraphimdroid | positive | 3,570 |
public Criteria andPaidAmountNotEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "paidAmount" + " cannot be null");
}
criteria.add(new Criterion("paid_amount <>", value));
return (Criteria) this;
} | public Criteria andPaidAmountNotEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "paidAmount" + " cannot be null");
}
criteria.add(new Criterion("paid_amount <>", value));
</DeepExtract>
return (Criteria) this;
} | bw-pay | positive | 3,572 |
private void sendTeamPacket(int score, TeamMode mode) throws Throwable {
if (mode == TeamMode.ADD_PLAYERS || mode == TeamMode.REMOVE_PLAYERS) {
throw new UnsupportedOperationException();
}
int maxLength = hasLinesMaxLength() ? 16 : 1024;
Object packet = PACKET_SB_TEAM.invoke();
setField(packet, String.class, this.id + ... | private void sendTeamPacket(int score, TeamMode mode) throws Throwable {
if (mode == TeamMode.ADD_PLAYERS || mode == TeamMode.REMOVE_PLAYERS) {
throw new UnsupportedOperationException();
}
int maxLength = hasLinesMaxLength() ? 16 : 1024;
Object packet = PACKET_SB_TEAM.invoke();
setField(packet, String.class, this.id + ... | TemplatePlugin | positive | 3,574 |
@Subscribe(threadMode = ThreadMode.MAIN)
public void onFocalsDisconnected(FocalsDisconnectedEvent e) {
Log.i(TAG, "ConnectActivity::onFocalsDisconnected");
if (device_.shouldDiscover()) {
startDiscovery();
} else {
startConnecting();
}
} | @Subscribe(threadMode = ThreadMode.MAIN)
public void onFocalsDisconnected(FocalsDisconnectedEvent e) {
Log.i(TAG, "ConnectActivity::onFocalsDisconnected");
<DeepExtract>
if (device_.shouldDiscover()) {
startDiscovery();
} else {
startConnecting();
}
</DeepExtract>
} | openfocals | positive | 3,575 |
public void close() {
mCloseAnimatorSet.start();
for (ItemAnimator anim : mMenuItemAnimators) {
anim.startCloseAnimator();
}
mOpen = false;
if (onMenuToggleListener != null) {
onMenuToggleListener.onMenuToggle(true);
}
} | public void close() {
<DeepExtract>
mCloseAnimatorSet.start();
for (ItemAnimator anim : mMenuItemAnimators) {
anim.startCloseAnimator();
}
</DeepExtract>
mOpen = false;
if (onMenuToggleListener != null) {
onMenuToggleListener.onMenuToggle(true);
}
} | dttv-android | positive | 3,576 |
public static Date setDayStart(Date date) {
if (null == date) {
return null;
}
if (null == dateToLocalDateTime(date).withHour(0).withMinute(0).withSecond(0).withNano(0)) {
return null;
}
return Date.from(dateToLocalDateTime(date).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInsta... | public static Date setDayStart(Date date) {
if (null == date) {
return null;
}
<DeepExtract>
if (null == dateToLocalDateTime(date).withHour(0).withMinute(0).withSecond(0).withNano(0)) {
return null;
}
return Date.from(dateToLocalDateTime(date).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefa... | Doramon | positive | 3,577 |
@Override
public void banned(Jid actor, String reason) {
if (LogConstants.LOG_DEBUG) {
Log.d(TAG, "Banned from " + room + " by " + actor + ": " + reason);
}
ContentValues cvR = new ContentValues();
String message;
if (actor != null && actor.length() > 0)
message = mService.getString(true ? R.string.muc_banned_by : R.st... | @Override
public void banned(Jid actor, String reason) {
if (LogConstants.LOG_DEBUG) {
Log.d(TAG, "Banned from " + room + " by " + actor + ": " + reason);
}
<DeepExtract>
ContentValues cvR = new ContentValues();
String message;
if (actor != null && actor.length() > 0)
message = mService.getString(true ? R.string.muc_ba... | yaxim | positive | 3,578 |
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.pref_general_tax);
mSharedPreferences = android.preference.PreferenceManager.getDefaultSharedPreferences(getActivity());
if ("pref_tax".equals("pref_discount")) {
Preference preference = findPreferenc... | @Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.pref_general_tax);
mSharedPreferences = android.preference.PreferenceManager.getDefaultSharedPreferences(getActivity());
<DeepExtract>
if ("pref_tax".equals("pref_discount")) {
Preference preference =... | stockita-point-of-sale | positive | 3,580 |
public synchronized static void resetBitmapCache(int size) {
bitmapCacheSize = size;
if (null != bitmapMemoryCache) {
bitmapMemoryCache.removeAll();
bitmapMemoryCache = null;
}
} | public synchronized static void resetBitmapCache(int size) {
bitmapCacheSize = size;
<DeepExtract>
if (null != bitmapMemoryCache) {
bitmapMemoryCache.removeAll();
bitmapMemoryCache = null;
}
</DeepExtract>
} | bigapple | positive | 3,583 |
public Criteria andLicensePlateLessThanOrEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "licensePlate" + " cannot be null");
}
criteria.add(new Criterion("license_plate <=", value));
return (Criteria) this;
} | public Criteria andLicensePlateLessThanOrEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "licensePlate" + " cannot be null");
}
criteria.add(new Criterion("license_plate <=", value));
</DeepExtract>
return (Criteria) this;
} | spring-boot-learning-examples | positive | 3,584 |
public void exchange(Table table, int index) {
JettyLaunchConfigEntry entryA = entries.remove(index);
JettyLaunchConfigEntry entryB = entries.remove(index);
entryA.deleteItem(table);
entryB.deleteItem(table);
entries.add(entryA);
entryA.updateItem(index, listener, entries.size() - 1, false);
entries.add(entryB);
entryB... | public void exchange(Table table, int index) {
JettyLaunchConfigEntry entryA = entries.remove(index);
JettyLaunchConfigEntry entryB = entries.remove(index);
entryA.deleteItem(table);
entryB.deleteItem(table);
entries.add(entryA);
entryA.updateItem(index, listener, entries.size() - 1, false);
<DeepExtract>
entries.add(e... | eclipse-jetty-plugin | positive | 3,585 |
@Override
public List<CloudServiceInstance> getServiceInstancesByMetadataLabelSelector(String labelSelector) {
IntFunction<ListServiceInstancesRequest> pageRequestSupplier = page -> ListServiceInstancesRequest.builder().labelSelector(labelSelector).spaceId(getTargetSpaceGuid().toString()).page(page).build();
return fet... | @Override
public List<CloudServiceInstance> getServiceInstancesByMetadataLabelSelector(String labelSelector) {
IntFunction<ListServiceInstancesRequest> pageRequestSupplier = page -> ListServiceInstancesRequest.builder().labelSelector(labelSelector).spaceId(getTargetSpaceGuid().toString()).page(page).build();
<DeepExtra... | cf-java-client-sap | positive | 3,586 |
private static String inputStreamToString(InputStream in) throws IOException {
try {
StringWriter writer = new StringWriter();
char[] buffer = new char[1024];
int count;
while ((count = new InputStreamReader(in, UTF_8).read(buffer)) != -1) {
writer.write(buffer, 0, count);
}
return writer.toString();
} finally {
new In... | private static String inputStreamToString(InputStream in) throws IOException {
<DeepExtract>
try {
StringWriter writer = new StringWriter();
char[] buffer = new char[1024];
int count;
while ((count = new InputStreamReader(in, UTF_8).read(buffer)) != -1) {
writer.write(buffer, 0, count);
}
return writer.toString();
} fi... | AndroidDemos | positive | 3,587 |
public Criteria andPwdNotLike(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "pwd" + " cannot be null");
}
criteria.add(new Criterion("pwd not like", value));
return (Criteria) this;
} | public Criteria andPwdNotLike(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "pwd" + " cannot be null");
}
criteria.add(new Criterion("pwd not like", value));
</DeepExtract>
return (Criteria) this;
} | Hospital | positive | 3,588 |
public void onClick(View v) {
if (D)
Log.d(TAG, "doDiscovery()");
setProgressBarIndeterminateVisibility(true);
setTitle(R.string.scanning);
findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);
if (mBtAdapter.isDiscovering()) {
mBtAdapter.cancelDiscovery();
}
mBtAdapter.startDiscovery();
v.setVisibility(Vie... | public void onClick(View v) {
<DeepExtract>
if (D)
Log.d(TAG, "doDiscovery()");
setProgressBarIndeterminateVisibility(true);
setTitle(R.string.scanning);
findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);
if (mBtAdapter.isDiscovering()) {
mBtAdapter.cancelDiscovery();
}
mBtAdapter.startDiscovery();
</Dee... | BallCraft | positive | 3,589 |
public ActionScriptProjectData getProjectDataForSourceFile(Path path) {
String configFileName = null;
for (ActionScriptProjectData projectData : allProjectData) {
if (projectData.config == null) {
continue;
}
Path configFilePath = projectData.config.getConfigFilePath();
if (configFilePath == null) {
continue;
}
configF... | public ActionScriptProjectData getProjectDataForSourceFile(Path path) {
<DeepExtract>
String configFileName = null;
for (ActionScriptProjectData projectData : allProjectData) {
if (projectData.config == null) {
continue;
}
Path configFilePath = projectData.config.getConfigFilePath();
if (configFilePath == null) {
conti... | vscode-as3mxml | positive | 3,590 |
public S thenReturn(double... values) {
trainingContext().then(InterceptorUtils.constant(ArrayUtils.clone(values)));
return self();
@SuppressWarnings("unchecked")
final S self = (S) this;
return self;
} | public S thenReturn(double... values) {
trainingContext().then(InterceptorUtils.constant(ArrayUtils.clone(values)));
return self();
<DeepExtract>
@SuppressWarnings("unchecked")
final S self = (S) this;
return self;
</DeepExtract>
} | commons-proxy | positive | 3,591 |
@Test
public void testUpgrade() throws Exception {
hiveServer.createTable("CREATE TABLE " + hiveTableDesc.getTableName() + " (t1 TINYINT, s1 SMALLINT, i1 INT, l1 BIGINT, " + " f1 FLOAT, d1 DOUBLE) " + " ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'");
HiveOutputDescription outputDesc = new HiveOutputDescription();
ou... | @Test
public void testUpgrade() throws Exception {
hiveServer.createTable("CREATE TABLE " + hiveTableDesc.getTableName() + " (t1 TINYINT, s1 SMALLINT, i1 INT, l1 BIGINT, " + " f1 FLOAT, d1 DOUBLE) " + " ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'");
HiveOutputDescription outputDesc = new HiveOutputDescription();
ou... | hive-io-experimental | positive | 3,592 |
public Chunk generateChunk() {
System.out.println("---------- Generate chunk: " + _x + ", " + _z);
SmartRandom random = new SmartRandom(new Random(generateSeedForChunk(_worldSeed, _x, _z)));
Chunk chunk = _chunkManager.getChunk(_x, _z, true, false, false);
chunk.setGenerated(true);
chunk.setLoading(true);
_heightMap = ... | public Chunk generateChunk() {
System.out.println("---------- Generate chunk: " + _x + ", " + _z);
SmartRandom random = new SmartRandom(new Random(generateSeedForChunk(_worldSeed, _x, _z)));
Chunk chunk = _chunkManager.getChunk(_x, _z, true, false, false);
chunk.setGenerated(true);
chunk.setLoading(true);
_heightMap = ... | CraftMania | positive | 3,593 |
@Override
public <T> int insert(T entity, IncludeType includeType) {
if (entity == null)
return -1;
getInterceptorChain().beforePasreEntity(entity, SuidType.INSERT);
String sql = getObjToSQLRich().toInsertSQL(entity, includeType);
if (entity == null)
return;
HoneyContext.regEntityClass(entity.getClass());
sql = doAfter... | @Override
public <T> int insert(T entity, IncludeType includeType) {
if (entity == null)
return -1;
getInterceptorChain().beforePasreEntity(entity, SuidType.INSERT);
String sql = getObjToSQLRich().toInsertSQL(entity, includeType);
<DeepExtract>
if (entity == null)
return;
HoneyContext.regEntityClass(entity.getClass());... | honey | positive | 3,595 |
@Override
public void onError(int response, @Nonnull Exception e) {
Check.isTrue(Thread.holdsLock(mLock), "Must be synchronized");
countDown(1);
} | @Override
public void onError(int response, @Nonnull Exception e) {
<DeepExtract>
Check.isTrue(Thread.holdsLock(mLock), "Must be synchronized");
countDown(1);
</DeepExtract>
} | android-checkout | positive | 3,596 |
public long dateHeader(final String name, final long defaultValue) throws HttpRequestException {
try {
return closeOutput();
} catch (IOException e) {
throw new HttpRequestException(e);
}
return getConnection().getHeaderFieldDate(name, defaultValue);
} | public long dateHeader(final String name, final long defaultValue) throws HttpRequestException {
<DeepExtract>
try {
return closeOutput();
} catch (IOException e) {
throw new HttpRequestException(e);
}
</DeepExtract>
return getConnection().getHeaderFieldDate(name, defaultValue);
} | crud-rest-gen | positive | 3,597 |
@Override
public void onCreate() {
super.onCreate();
app = this;
P2PSpecial.getInstance().init(app, APPID, APPToken, APPVersion);
} | @Override
public void onCreate() {
super.onCreate();
app = this;
<DeepExtract>
P2PSpecial.getInstance().init(app, APPID, APPToken, APPVersion);
</DeepExtract>
} | GwellDemo | positive | 3,598 |
public void setStrokeWidth(float strokeWidth) {
mStrokeWidth = strokeWidth;
mPaint.setStrokeWidth(strokeWidth);
mCallback.invalidateDrawable(null);
} | public void setStrokeWidth(float strokeWidth) {
mStrokeWidth = strokeWidth;
mPaint.setStrokeWidth(strokeWidth);
<DeepExtract>
mCallback.invalidateDrawable(null);
</DeepExtract>
} | TencentNews | positive | 3,599 |
public CommandLine setToggleBooleanFlags(boolean newValue) {
this.toggleBooleanFlags = newValue;
return this;
for (CommandLine command : getCommandSpec().subcommands().values()) {
command.setToggleBooleanFlags(newValue);
}
return this;
} | public CommandLine setToggleBooleanFlags(boolean newValue) {
<DeepExtract>
this.toggleBooleanFlags = newValue;
return this;
</DeepExtract>
for (CommandLine command : getCommandSpec().subcommands().values()) {
command.setToggleBooleanFlags(newValue);
}
return this;
} | eclipstyle | positive | 3,600 |
@Test
public void getSubscriptions_forScreenName() {
mockServer.expect(requestTo("https://api.twitter.com/1.1/lists/subscriptions.json?screen_name=habuma")).andExpect(method(GET)).andRespond(withSuccess(jsonResource("list-of-lists"), APPLICATION_JSON));
assertEquals(2, twitter.listOperations().getSubscriptions("habuma"... | @Test
public void getSubscriptions_forScreenName() {
mockServer.expect(requestTo("https://api.twitter.com/1.1/lists/subscriptions.json?screen_name=habuma")).andExpect(method(GET)).andRespond(withSuccess(jsonResource("list-of-lists"), APPLICATION_JSON));
<DeepExtract>
assertEquals(2, twitter.listOperations().getSubscrip... | spring-social-twitter | positive | 3,601 |
public static double JaccardIndexIDImages(Element e1, Element e2, boolean split) {
Hashtable<String, Integer> hash1 = getLinksOrImage(e1, split, "img", "ID");
Hashtable<String, Integer> hash2 = getLinksOrImage(e2, split, "img", "ID");
int nbCommon = 0;
for (String s : hash1.keySet()) {
if (hash2.containsKey(s)) {
++nbC... | public static double JaccardIndexIDImages(Element e1, Element e2, boolean split) {
<DeepExtract>
Hashtable<String, Integer> hash1 = getLinksOrImage(e1, split, "img", "ID");
Hashtable<String, Integer> hash2 = getLinksOrImage(e2, split, "img", "ID");
int nbCommon = 0;
for (String s : hash1.keySet()) {
if (hash2.containsK... | pagelyzer | positive | 3,602 |
public Settings build() {
String overridesFiles = System.getProperty(OVERRIDES_FILE_SYSTEM_PROPERTY);
if (!Strings.isNullOrEmpty(overridesFiles)) {
String[] files = overridesFiles.split(",");
for (String file : files) {
if (!Strings.isNullOrEmpty(file)) {
file = file.trim();
log.info(String.format("loading overrides fr... | public Settings build() {
<DeepExtract>
String overridesFiles = System.getProperty(OVERRIDES_FILE_SYSTEM_PROPERTY);
if (!Strings.isNullOrEmpty(overridesFiles)) {
String[] files = overridesFiles.split(",");
for (String file : files) {
if (!Strings.isNullOrEmpty(file)) {
file = file.trim();
log.info(String.format("loadin... | commons | positive | 3,604 |
public static Date plusMonths(Date date, long amountToAdd) {
Objects.requireNonNull(date, "temporal");
return date.plus(amountToAdd, ChronoUnit.MONTHS);
} | public static Date plusMonths(Date date, long amountToAdd) {
<DeepExtract>
Objects.requireNonNull(date, "temporal");
return date.plus(amountToAdd, ChronoUnit.MONTHS);
</DeepExtract>
} | jstarcraft-nlp | positive | 3,605 |
public Table getVerboseTable(String name) throws JSONException, IOException {
String url = tableMap.get(name);
if (true)
url += "?v=true";
JSONObject jsonObject = Helper.getJSONObject(url);
Table newTable = new Table(name, jsonObject, true);
return newTable;
} | public Table getVerboseTable(String name) throws JSONException, IOException {
<DeepExtract>
String url = tableMap.get(name);
if (true)
url += "?v=true";
JSONObject jsonObject = Helper.getJSONObject(url);
Table newTable = new Table(name, jsonObject, true);
return newTable;
</DeepExtract>
} | resthub | positive | 3,606 |
public void editImage(View view) {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
if (intent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(intent, IMAGE_PICKER_REQUEST);
}
} | public void editImage(View view) {
<DeepExtract>
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
if (intent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(intent, IMAGE_PICKER_REQUEST);
}
</DeepExtract>
} | artcodes-android | positive | 3,607 |
public void uploadAction(String str) throws org.apache.thrift.TException {
uploadAction_args args = new uploadAction_args();
args.setStr(str);
sendBase("uploadAction", args);
uploadAction_result result = new uploadAction_result();
receiveBase(result, "uploadAction");
return;
} | public void uploadAction(String str) throws org.apache.thrift.TException {
uploadAction_args args = new uploadAction_args();
args.setStr(str);
sendBase("uploadAction", args);
<DeepExtract>
uploadAction_result result = new uploadAction_result();
receiveBase(result, "uploadAction");
return;
</DeepExtract>
} | netty-thrift | positive | 3,608 |
public static Entity executeQueryCount(Connection conn, String sql) throws SQLException {
Entity entity = new Entity();
this.sql = sql;
long start = System.currentTimeMillis();
Statement stmt = null;
ResultSet rs = null;
try {
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
entity.setQueryTime(System.curren... | public static Entity executeQueryCount(Connection conn, String sql) throws SQLException {
Entity entity = new Entity();
this.sql = sql;
long start = System.currentTimeMillis();
Statement stmt = null;
ResultSet rs = null;
try {
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
entity.setQueryTime(System.curren... | teiid-embedded-examples | positive | 3,609 |
@Test
public void doCreate__servletContextIsNotYetAvailableViaSrpingUtils_vaadinApplicationConfigurationHasSpringPropertiesPrefixedByVaadin() {
Mockito.when(webAppContext.getServletContext()).thenReturn(servletContext);
Mockito.when(servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUT... | @Test
public void doCreate__servletContextIsNotYetAvailableViaSrpingUtils_vaadinApplicationConfigurationHasSpringPropertiesPrefixedByVaadin() {
Mockito.when(webAppContext.getServletContext()).thenReturn(servletContext);
Mockito.when(servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUT... | spring | positive | 3,610 |
public int validate(String realm, String returnTo, boolean compatibility, boolean enforceRpId) {
if (DEBUG)
_log.debug("Verifying realm: " + realm + " on return URL: " + returnTo);
URL realmUrl;
try {
realmUrl = new URL(realm);
} catch (MalformedURLException e) {
_log.error("Invalid realm URL: " + realm, e);
result = M... | public int validate(String realm, String returnTo, boolean compatibility, boolean enforceRpId) {
<DeepExtract>
if (DEBUG)
_log.debug("Verifying realm: " + realm + " on return URL: " + returnTo);
URL realmUrl;
try {
realmUrl = new URL(realm);
} catch (MalformedURLException e) {
_log.error("Invalid realm URL: " + realm, ... | openid4java | positive | 3,611 |
public void widgetSelected(final SelectionEvent e) {
final SourceSelection selection = getSelection();
final Object[] objects = list.getListeners();
for (final Object object : objects) {
final ITextSourceListener listener = (ITextSourceListener) object;
listener.selectionChanged(selection);
}
} | public void widgetSelected(final SelectionEvent e) {
<DeepExtract>
final SourceSelection selection = getSelection();
final Object[] objects = list.getListeners();
for (final Object object : objects) {
final ITextSourceListener listener = (ITextSourceListener) object;
listener.selectionChanged(selection);
}
</DeepExtrac... | glance | positive | 3,613 |
public RecvMessage receive(String xml) {
XmlReaders readers = XmlReaders.create(xml);
RecvMessage msg = parse2RecvMessage(readers);
RecvMessageType type = RecvMessageType.from(msg.getMsgType());
if (RecvMessageType.EVENT == type) {
return parse2RecvEvent(readers, msg);
} else {
return parse2RecvMsg(readers, msg);
}
} | public RecvMessage receive(String xml) {
XmlReaders readers = XmlReaders.create(xml);
<DeepExtract>
RecvMessage msg = parse2RecvMessage(readers);
RecvMessageType type = RecvMessageType.from(msg.getMsgType());
if (RecvMessageType.EVENT == type) {
return parse2RecvEvent(readers, msg);
} else {
return parse2RecvMsg(reader... | wechat | positive | 3,614 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.