before stringlengths 12 3.21M | after stringlengths 41 3.21M | repo stringlengths 1 56 | type stringclasses 1
value | __index_level_0__ int64 0 442k |
|---|---|---|---|---|
public static boolean compareAnnotatedCallable(AnnotatedCallable<?> m1, AnnotatedCallable<?> m2) {
if (!m1.getJavaMember().equals(m2.getJavaMember())) {
return false;
}
if (!compareAnnotated(m1, m2)) {
return false;
}
if (m1.getParameters().size() != m2.getParameters().size()) {
return false;
}
for (int i = 0; i < m1.g... | public static boolean compareAnnotatedCallable(AnnotatedCallable<?> m1, AnnotatedCallable<?> m2) {
if (!m1.getJavaMember().equals(m2.getJavaMember())) {
return false;
}
if (!compareAnnotated(m1, m2)) {
return false;
}
<DeepExtract>
if (m1.getParameters().size() != m2.getParameters().size()) {
return false;
}
for (int i... | extensions | positive | 4,154 |
@Override
final void sendFormatted(String formatted) {
tasks.offer(() -> {
for (EventSource subscriber : subscribers) {
subscriber.sendFormatted(formatted);
}
});
trySchedule();
} | @Override
final void sendFormatted(String formatted) {
<DeepExtract>
tasks.offer(() -> {
for (EventSource subscriber : subscribers) {
subscriber.sendFormatted(formatted);
}
});
trySchedule();
</DeepExtract>
} | titanite | positive | 4,155 |
public void onPause() {
AsyncTask<?, ?, ?> task = inactivityTask;
if (task != null) {
task.cancel(true);
inactivityTask = null;
}
activity.unregisterReceiver(powerStatusReceiver);
} | public void onPause() {
<DeepExtract>
AsyncTask<?, ?, ?> task = inactivityTask;
if (task != null) {
task.cancel(true);
inactivityTask = null;
}
</DeepExtract>
activity.unregisterReceiver(powerStatusReceiver);
} | sichu_android | positive | 4,156 |
public void update(IBlockReader world, BlockPos pos) {
TKBNetworkHandler.INSTANCE.sendToAllWatching(new SyncLabelPacket(getHost().getPos(), serializeSync()), getHost().getWorld(), getHost().getPos());
} | public void update(IBlockReader world, BlockPos pos) {
<DeepExtract>
TKBNetworkHandler.INSTANCE.sendToAllWatching(new SyncLabelPacket(getHost().getPos(), serializeSync()), getHost().getWorld(), getHost().getPos());
</DeepExtract>
} | Technicalities | positive | 4,157 |
public static String getOriginalPug2ResourcePath(String fileName) throws FileNotFoundException, URISyntaxException {
String path = Paths.get(TestFileHelper.class.getResource(TESTFILE_PUG2_ORIGINAL_FOLDER + fileName).toURI()).toString();
LoggerFactory.getLogger(TestFileHelper.class.getClass()).debug(path);
return path;
... | public static String getOriginalPug2ResourcePath(String fileName) throws FileNotFoundException, URISyntaxException {
<DeepExtract>
String path = Paths.get(TestFileHelper.class.getResource(TESTFILE_PUG2_ORIGINAL_FOLDER + fileName).toURI()).toString();
LoggerFactory.getLogger(TestFileHelper.class.getClass()).debug(path);... | pug4j | positive | 4,158 |
public Criteria andN_titleLessThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "n_title" + " cannot be null");
}
criteria.add(new Criterion("n_title <", value));
return (Criteria) this;
} | public Criteria andN_titleLessThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "n_title" + " cannot be null");
}
criteria.add(new Criterion("n_title <", value));
</DeepExtract>
return (Criteria) this;
} | BaiChengNews | positive | 4,159 |
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
isDragging = true;
if (!isShowing) {
$.id(R.id.app_video_top_box).visible();
if (!isLive) {
showBottomControl(true);
}
if (!fullScreenOnly) {
$.id(R.id.app_video_fullscreen).visible();
}
isShowing = true;
onControlPanelVisibilityChangeListener.change(true);
... | @Override
public void onStartTrackingTouch(SeekBar seekBar) {
isDragging = true;
<DeepExtract>
if (!isShowing) {
$.id(R.id.app_video_top_box).visible();
if (!isLive) {
showBottomControl(true);
}
if (!fullScreenOnly) {
$.id(R.id.app_video_fullscreen).visible();
}
isShowing = true;
onControlPanelVisibilityChangeListener.... | MKVideoPlayer | positive | 4,160 |
@Test
public void addTuple() throws Exception {
byte[] data = BTreeLeafPage.createEmptyPageData();
BTreeLeafPage page0 = new BTreeLeafPage(pid, data, 0);
BTreeLeafPage page1 = new BTreeLeafPage(pid, data, 1);
ArrayList<Tuple> tuples = new ArrayList<Tuple>();
for (int[] tuple : EXAMPLE_VALUES) {
Tuple tup = new Tuple(Ut... | @Test
public void addTuple() throws Exception {
byte[] data = BTreeLeafPage.createEmptyPageData();
BTreeLeafPage page0 = new BTreeLeafPage(pid, data, 0);
BTreeLeafPage page1 = new BTreeLeafPage(pid, data, 1);
ArrayList<Tuple> tuples = new ArrayList<Tuple>();
for (int[] tuple : EXAMPLE_VALUES) {
Tuple tup = new Tuple(Ut... | simple-db | positive | 4,161 |
public void validateMetricDefAdded() {
MetricDefinitionAndTenantId metricDefinitionAndTenantId = new MetricDefinitionAndTenantId(metricDef1, TENANT_ID);
assertNull(bolt.metricDefToSubAlarmStatsRepos.get(metricDefinitionAndTenantId));
final MkTupleParam tupleParam = new MkTupleParam();
tupleParam.setFields(AlarmCreation... | public void validateMetricDefAdded() {
MetricDefinitionAndTenantId metricDefinitionAndTenantId = new MetricDefinitionAndTenantId(metricDef1, TENANT_ID);
assertNull(bolt.metricDefToSubAlarmStatsRepos.get(metricDefinitionAndTenantId));
<DeepExtract>
final MkTupleParam tupleParam = new MkTupleParam();
tupleParam.setFields... | monasca-thresh | positive | 4,162 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_notification);
findPreference("notifications_new_message_ringtone").setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
sBindPreferenceSummaryToValueListener.onPreferen... | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_notification);
<DeepExtract>
findPreference("notifications_new_message_ringtone").setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
sBindPreferenceSummaryToValueListe... | aad | positive | 4,163 |
public String countByExample(UserExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("wk_user");
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (false) {
parmPhrase1 = "%s #{example.ored... | public String countByExample(UserExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("wk_user");
<DeepExtract>
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (false) {
parmPhrase1 = "%s ... | wukong-framework | positive | 4,164 |
private GenerationTaskResult launchBundleGeneration(String bundleName) {
if (telosysProject == null || model == null) {
throw new RuntimeException("Launcher is not initialized");
}
if (specificDestinationFolder != null) {
String newDestinationFolder = StrUtil.replaceVar(specificDestinationFolder, "${BUNDLE}", bundleNam... | private GenerationTaskResult launchBundleGeneration(String bundleName) {
<DeepExtract>
if (telosysProject == null || model == null) {
throw new RuntimeException("Launcher is not initialized");
}
</DeepExtract>
if (specificDestinationFolder != null) {
String newDestinationFolder = StrUtil.replaceVar(specificDestinationF... | telosys-cli | positive | 4,165 |
public void crush(int mx, int my) {
int screen_x = (mc.displayWidth / 2);
int screen_y = (mc.displayHeight / 2);
this.x = mx - this.move_x;
this.y = my - this.move_y;
if (this.x + this.width >= screen_x) {
this.x = screen_x - this.width - 1;
}
if (this.x <= 0) {
this.x = 1;
}
if (this.y + this.height >= screen_y) {
thi... | public void crush(int mx, int my) {
int screen_x = (mc.displayWidth / 2);
int screen_y = (mc.displayHeight / 2);
this.x = mx - this.move_x;
<DeepExtract>
this.y = my - this.move_y;
</DeepExtract>
if (this.x + this.width >= screen_x) {
this.x = screen_x - this.width - 1;
}
if (this.x <= 0) {
this.x = 1;
}
if (this.y + t... | wurstplus-two | positive | 4,166 |
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("DROP TABLE IF EXISTS " + SHADERS);
db.execSQL("CREATE TABLE " + SHADERS + " (" + SHADERS_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + SHADERS_FRAGMENT_SHADER + " TEXT NOT NULL," + SHADERS_THUMB + " BLOB," + SHADERS_NAME + " TEXT," + SHADERS_CREATED + " DAT... | @Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("DROP TABLE IF EXISTS " + SHADERS);
db.execSQL("CREATE TABLE " + SHADERS + " (" + SHADERS_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + SHADERS_FRAGMENT_SHADER + " TEXT NOT NULL," + SHADERS_THUMB + " BLOB," + SHADERS_NAME + " TEXT," + SHADERS_CREATED + " DAT... | ShaderEditor | positive | 4,167 |
public void testIntNumberType() throws Exception {
JsonArray array1 = Json.createArrayBuilder().add(Integer.MIN_VALUE).add(Integer.MAX_VALUE).add(Integer.MIN_VALUE + 1).add(Integer.MAX_VALUE - 1).add(12).add(12l).add(new BigInteger("0")).build();
for (JsonValue value : array1) {
assertEquals(true, ((JsonNumber) value).... | public void testIntNumberType() throws Exception {
JsonArray array1 = Json.createArrayBuilder().add(Integer.MIN_VALUE).add(Integer.MAX_VALUE).add(Integer.MIN_VALUE + 1).add(Integer.MAX_VALUE - 1).add(12).add(12l).add(new BigInteger("0")).build();
for (JsonValue value : array1) {
assertEquals(true, ((JsonNumber) value).... | jsonp | positive | 4,168 |
public boolean doCaptcha(String captchaToken) {
Session session;
Subject subject = SecurityUtils.getSubject();
Session session = subject.getSession();
if (session == null) {
throw new UnknownSessionException("Unable found required Session");
} else {
session = session;
}
if (session.getAttribute(AppConstants.CAPTCHA_NA... | public boolean doCaptcha(String captchaToken) {
<DeepExtract>
Session session;
Subject subject = SecurityUtils.getSubject();
Session session = subject.getSession();
if (session == null) {
throw new UnknownSessionException("Unable found required Session");
} else {
session = session;
}
</DeepExtract>
if (session.getAttr... | dreampie | positive | 4,169 |
void registerBreakpoint(InstrumentedCodeBreakpoint breakPoint) {
synchronized (threadMap) {
ThreadInfo info = getThreadInfoTolerant(breakPoint.getThread());
info.breakPoints.add(breakPoint);
breakPoint.setOwner(this);
}
} | void registerBreakpoint(InstrumentedCodeBreakpoint breakPoint) {
<DeepExtract>
synchronized (threadMap) {
ThreadInfo info = getThreadInfoTolerant(breakPoint.getThread());
info.breakPoints.add(breakPoint);
breakPoint.setOwner(this);
}
</DeepExtract>
} | thread-weaver | positive | 4,170 |
public void jump() {
this.isJumping = true;
if (currentAnimation() == currLeftAnim || currentAnimation() == stillLeft || currentAnimation() == changeRight) {
if (inWater) {
if (dy < 0) {
setAnimation(swimActiveLeft);
frameMode = 12;
} else {
setAnimation(swimPassiveLeft);
frameMode = 13;
}
return;
} else {
setAnimation... | public void jump() {
<DeepExtract>
this.isJumping = true;
</DeepExtract>
if (currentAnimation() == currLeftAnim || currentAnimation() == stillLeft || currentAnimation() == changeRight) {
if (inWater) {
if (dy < 0) {
setAnimation(swimActiveLeft);
frameMode = 12;
} else {
setAnimation(swimPassiveLeft);
frameMode = 13;
}
... | -Android-Super-Mario | positive | 4,171 |
@Override
public void process(final Throwable exception) throws Exception {
System.out.println("Get => " + exception);
System.out.println("Set " + request.getValue() + " => " + null);
rp.processResponse(null);
} | @Override
public void process(final Throwable exception) throws Exception {
System.out.println("Get => " + exception);
<DeepExtract>
System.out.println("Set " + request.getValue() + " => " + null);
rp.processResponse(null);
</DeepExtract>
} | JActor | positive | 4,172 |
@Before
public void setUp() throws Exception {
try {
this.logPath = Files.createTempDirectory("elegitLogs");
} catch (IOException e) {
e.printStackTrace();
}
this.logPath.toFile().deleteOnExit();
System.setProperty("logFolder", logPath.toString());
this.directoryPath = Files.createTempDirectory("unitTestRepos");
direct... | @Before
public void setUp() throws Exception {
<DeepExtract>
try {
this.logPath = Files.createTempDirectory("elegitLogs");
} catch (IOException e) {
e.printStackTrace();
}
this.logPath.toFile().deleteOnExit();
System.setProperty("logFolder", logPath.toString());
</DeepExtract>
this.directoryPath = Files.createTempDirec... | Elegit | positive | 4,173 |
public <R> R applyMutation(P1 param1, P2 param2, P3 param3, QuadFunction<P1, P2, P3, ? super C, R> mutativeFunc) {
final MutationNode<P1, P2, P3, C> myNode = new MutationNode<P1, P2, P3, C>(param1, param2, param3, mutativeFunc);
Combined<P1, P2, P3, C> curComb = combinedRef;
while (true) {
final MutationNode<P1, P2, P3... | public <R> R applyMutation(P1 param1, P2 param2, P3 param3, QuadFunction<P1, P2, P3, ? super C, R> mutativeFunc) {
final MutationNode<P1, P2, P3, C> myNode = new MutationNode<P1, P2, P3, C>(param1, param2, param3, mutativeFunc);
Combined<P1, P2, P3, C> curComb = combinedRef;
<DeepExtract>
while (true) {
final MutationN... | ConcurrencyFreaks | positive | 4,174 |
@Get("html")
public Representation handleGetHTML() throws Exception {
Map<String, Object> variablesForTemplate = new HashMap<String, Object>();
Collection ehrColl;
XMLResource resource;
Node ehrNode;
NodeModel freeMarkerNodeModel;
try {
ehrColl = ((XMLDBHelper) dbHelper).getRootCollection().getChildCollection("EHR");
r... | @Get("html")
public Representation handleGetHTML() throws Exception {
Map<String, Object> variablesForTemplate = new HashMap<String, Object>();
<DeepExtract>
Collection ehrColl;
XMLResource resource;
Node ehrNode;
NodeModel freeMarkerNodeModel;
try {
ehrColl = ((XMLDBHelper) dbHelper).getRootCollection().getChildCollec... | EEE | positive | 4,175 |
public static AresSecurityConfiguration generateConfiguration(TestContext context) {
var config = AresSecurityConfigurationBuilder.create();
config.configureFromContext(context);
config.withPath(Path.of(""));
config.addWhitelistedClassNames(generateClassWhiteList(context));
config.withPathWhitelist(generatePathWhiteLis... | public static AresSecurityConfiguration generateConfiguration(TestContext context) {
var config = AresSecurityConfigurationBuilder.create();
config.configureFromContext(context);
config.withPath(Path.of(""));
config.addWhitelistedClassNames(generateClassWhiteList(context));
config.withPathWhitelist(generatePathWhiteLis... | Ares | positive | 4,176 |
public void registerProperties(PropertiesApplicator applicator) {
if (features != null) {
for (FeaturePattern feature : features) {
checkNotNull(emptyToNull(feature.getFeature().getName()), "Empty feature name found");
applicator.register(feature);
}
}
this.userFiles = userFiles != null ? userFiles : new FnPatternList(... | public void registerProperties(PropertiesApplicator applicator) {
if (features != null) {
for (FeaturePattern feature : features) {
checkNotNull(emptyToNull(feature.getFeature().getName()), "Empty feature name found");
applicator.register(feature);
}
}
<DeepExtract>
this.userFiles = userFiles != null ? userFiles : new ... | Launcher | positive | 4,177 |
protected void skipTestIfGroovyPluginDisabled() {
testEnabled = pluginShouldBeEnabled(OptionalPluginTestDependency.Groovy);
Assert.assertEquals(testEnabled, isPluginEnabled(OptionalPluginTestDependency.Groovy));
} | protected void skipTestIfGroovyPluginDisabled() {
<DeepExtract>
testEnabled = pluginShouldBeEnabled(OptionalPluginTestDependency.Groovy);
Assert.assertEquals(testEnabled, isPluginEnabled(OptionalPluginTestDependency.Groovy));
</DeepExtract>
} | testme-idea | positive | 4,178 |
public removeSource_result getResult(I iface, removeSource_args args) throws org.apache.thrift.TException {
removeSource_result result = new removeSource_result();
send_removeSource(args.sceneName, args.sourceName);
recv_removeSource();
return result;
} | public removeSource_result getResult(I iface, removeSource_args args) throws org.apache.thrift.TException {
removeSource_result result = new removeSource_result();
<DeepExtract>
send_removeSource(args.sceneName, args.sourceName);
recv_removeSource();
</DeepExtract>
return result;
} | obs-video-scheduler | positive | 4,179 |
public Criteria andNameIsNotNull() {
if ("name is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("name is not null"));
return (Criteria) this;
} | public Criteria andNameIsNotNull() {
<DeepExtract>
if ("name is not null" == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion("name is not null"));
</DeepExtract>
return (Criteria) this;
} | flink-sql-computing-platform | positive | 4,180 |
public static prototest.Ex.TireMaker parseFrom(java.io.InputStream input) throws java.io.IOException {
prototest.Ex.Hobby result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
} | public static prototest.Ex.TireMaker parseFrom(java.io.InputStream input) throws java.io.IOException {
<DeepExtract>
prototest.Ex.Hobby result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInvalidProtocolBufferException();
}
return result;
</DeepExtract>
} | hive-protobuf | positive | 4,181 |
public void setCurValue(int value) {
if (mValue == value) {
return;
}
if (mWrapSelectorWheel) {
value = getWrappedSelectorIndex(value);
} else {
value = Math.max(value, mMinValue);
value = Math.min(value, mMaxValue);
}
int previous = mValue;
mValue = value;
updateInputTextView();
if (false) {
notifyChange(previous, val... | public void setCurValue(int value) {
<DeepExtract>
if (mValue == value) {
return;
}
if (mWrapSelectorWheel) {
value = getWrappedSelectorIndex(value);
} else {
value = Math.max(value, mMinValue);
value = Math.min(value, mMaxValue);
}
int previous = mValue;
mValue = value;
updateInputTextView();
if (false) {
notifyChange... | qnscalesdk | positive | 4,182 |
public void setup() {
surface.setLocation(viewport_x, viewport_y);
font = createFont("data/SourceCodePro-Regular.ttf", 12);
release();
world = new DwWorld(this, 18);
setParticleSpawnProperties(spawn_type);
initScene();
frameRate(120);
} | public void setup() {
surface.setLocation(viewport_x, viewport_y);
font = createFont("data/SourceCodePro-Regular.ttf", 12);
<DeepExtract>
release();
world = new DwWorld(this, 18);
setParticleSpawnProperties(spawn_type);
initScene();
</DeepExtract>
frameRate(120);
} | LiquidFunProcessing | positive | 4,183 |
public void transformSelect(Cursor result) throws SQLiteException {
columnNames = Arrays.asList(result.getColumnNames());
List<List<String>> result = new ArrayList<>();
final int numColumns = result.getColumnCount();
while (result.moveToNext()) {
ArrayList<String> flatList = new ArrayList<>();
for (int column = 0; colu... | public void transformSelect(Cursor result) throws SQLiteException {
columnNames = Arrays.asList(result.getColumnNames());
<DeepExtract>
List<List<String>> result = new ArrayList<>();
final int numColumns = result.getColumnCount();
while (result.moveToNext()) {
ArrayList<String> flatList = new ArrayList<>();
for (int co... | pandora | positive | 4,184 |
public void focusLost(java.awt.event.FocusEvent evt) {
sineGen.catchup = catchupCheckBox.isSelected();
} | public void focusLost(java.awt.event.FocusEvent evt) {
<DeepExtract>
sineGen.catchup = catchupCheckBox.isSelected();
</DeepExtract>
} | ModbusPal | positive | 4,185 |
@Override
public void removeStaleIndices() {
getIndexModel().deleteEdgeEndpoints(this, getIndexTs());
} | @Override
public void removeStaleIndices() {
<DeepExtract>
getIndexModel().deleteEdgeEndpoints(this, getIndexTs());
</DeepExtract>
} | hgraphdb | positive | 4,186 |
public static ExtensionFactory<Cluster> cluster() {
return (ExtensionFactory<E>) EXTENSION_FACTORY.get(Cluster.class);
} | public static ExtensionFactory<Cluster> cluster() {
<DeepExtract>
return (ExtensionFactory<E>) EXTENSION_FACTORY.get(Cluster.class);
</DeepExtract>
} | catty | positive | 4,187 |
public static Instant toBeijingInstant(LocalDateTime ldt) {
return Instant.ofEpochMilli(ZoneOffset.of("+08:00").getTime());
} | public static Instant toBeijingInstant(LocalDateTime ldt) {
<DeepExtract>
return Instant.ofEpochMilli(ZoneOffset.of("+08:00").getTime());
</DeepExtract>
} | program-logic | positive | 4,188 |
private void setSurface(int id, Surface surface, SurfaceHolder surfaceHolder) {
if (mSurfacesState.get() != SURFACE_STATE_INIT)
throw new IllegalStateException("Can't set view when already attached. " + "Current state: " + mSurfacesState.get() + ", " + "mSurfaces[ID_VIDEO]: " + mSurfaceHelpers[ID_VIDEO] + " / " + mSurf... | private void setSurface(int id, Surface surface, SurfaceHolder surfaceHolder) {
<DeepExtract>
if (mSurfacesState.get() != SURFACE_STATE_INIT)
throw new IllegalStateException("Can't set view when already attached. " + "Current state: " + mSurfacesState.get() + ", " + "mSurfaces[ID_VIDEO]: " + mSurfaceHelpers[ID_VIDEO] +... | libvlc-sdk-android | positive | 4,189 |
public Criteria andBirthyearEqualTo(Date value) {
if (value == null) {
throw new RuntimeException("Value for " + "birthyear" + " cannot be null");
}
addCriterion("birthYear =", new java.sql.Date(value.getTime()), "birthyear");
return (Criteria) this;
} | public Criteria andBirthyearEqualTo(Date value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "birthyear" + " cannot be null");
}
addCriterion("birthYear =", new java.sql.Date(value.getTime()), "birthyear");
</DeepExtract>
return (Criteria) this;
} | SpringBoot_EducationalMS | positive | 4,190 |
public void keyReleased(java.awt.event.KeyEvent evt) {
boolean tick = o.engine.isFunction(jTextFieldRst1.getText());
tickCross("Rst1", tick);
} | public void keyReleased(java.awt.event.KeyEvent evt) {
<DeepExtract>
boolean tick = o.engine.isFunction(jTextFieldRst1.getText());
tickCross("Rst1", tick);
</DeepExtract>
} | 8085simulator | positive | 4,191 |
@Override
public void onPageSelected(int position) {
for (int i = 0; i < getChildCount(); i++) {
View view = getChildAt(i);
if (view instanceof TextView) {
((TextView) view).setTextColor(getResources().getColor(R.color.common_text_color));
}
}
View view = getChildAt(position);
if (view instanceof TextView) {
if (change... | @Override
public void onPageSelected(int position) {
for (int i = 0; i < getChildCount(); i++) {
View view = getChildAt(i);
if (view instanceof TextView) {
((TextView) view).setTextColor(getResources().getColor(R.color.common_text_color));
}
}
<DeepExtract>
View view = getChildAt(position);
if (view instanceof TextView... | SoHOT | positive | 4,192 |
@Override
public void prepare() {
if (mDataNotSet)
return;
super.calcMinMax(mFixedYValues);
if (!mFixedYValues) {
float space = Math.abs(Math.abs(Math.max(Math.abs(mYChartMax), Math.abs(mYChartMin))) / 100f * 20f);
if (Math.abs(mYChartMax - mYChartMin) < 0.00001f) {
if (Math.abs(mYChartMax) < 10f)
space = 1f;
else
spac... | @Override
public void prepare() {
if (mDataNotSet)
return;
super.calcMinMax(mFixedYValues);
if (!mFixedYValues) {
float space = Math.abs(Math.abs(Math.max(Math.abs(mYChartMax), Math.abs(mYChartMin))) / 100f * 20f);
if (Math.abs(mYChartMax - mYChartMin) < 0.00001f) {
if (Math.abs(mYChartMax) < 10f)
space = 1f;
else
spac... | MPChartLib | positive | 4,194 |
@Test
public void at_empty_middle_argument_separated_by_twospaces() throws Exception {
Content content = new Content("*Settings\nDocumentation <arg><cursor><argend> next");
ParsedString argument = content.ps("arg-argend", 1, ArgumentType.SETTING_VAL).setHasSpaceAfter(true);
int lineNo = 1;
List<RobotLine> lines = Rob... | @Test
public void at_empty_middle_argument_separated_by_twospaces() throws Exception {
Content content = new Content("*Settings\nDocumentation <arg><cursor><argend> next");
ParsedString argument = content.ps("arg-argend", 1, ArgumentType.SETTING_VAL).setHasSpaceAfter(true);
int lineNo = 1;
<DeepExtract>
List<RobotLin... | RobotFramework-EclipseIDE | positive | 4,197 |
public void notParticipating() throws InterruptedException, BrokenBarrierException {
awaitLatch.countDown();
awaitLatch.await();
} | public void notParticipating() throws InterruptedException, BrokenBarrierException {
<DeepExtract>
awaitLatch.countDown();
awaitLatch.await();
</DeepExtract>
} | simple-db-hw-2021 | positive | 4,198 |
public void put(final short n) {
throw new UnsupportedOperationException(this.getClass().getName() + " put");
} | public void put(final short n) {
<DeepExtract>
throw new UnsupportedOperationException(this.getClass().getName() + " put");
</DeepExtract>
} | fineio | positive | 4,199 |
@Override
public void onCreate() {
super.onCreate();
mDbHandlerThread = new HandlerThread(getClass().getSimpleName());
mDbHandlerThread.start();
mContentResolver = BaseTvInputService.this.getContentResolver();
ComponentName component = new ComponentName(BaseTvInputService.this.getPackageName(), BaseTvInputService.this.... | @Override
public void onCreate() {
super.onCreate();
mDbHandlerThread = new HandlerThread(getClass().getSimpleName());
mDbHandlerThread.start();
mContentResolver = BaseTvInputService.this.getContentResolver();
<DeepExtract>
ComponentName component = new ComponentName(BaseTvInputService.this.getPackageName(), BaseTvInpu... | androidtv-sample-inputs | positive | 4,200 |
public Transfer cancel() throws PagarMeException {
validateId();
final PagarMeRequest request = new PagarMeRequest(HttpMethod.POST, String.format("/%s/%s/cancel", getClassName(), getId()));
request.getParameters().put("amount", amount);
request.getParameters().put("recipient_id", getRecipientId());
request.getParameter... | public Transfer cancel() throws PagarMeException {
validateId();
final PagarMeRequest request = new PagarMeRequest(HttpMethod.POST, String.format("/%s/%s/cancel", getClassName(), getId()));
request.getParameters().put("amount", amount);
request.getParameters().put("recipient_id", getRecipientId());
request.getParameter... | pagarme-java | positive | 4,201 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recharge_deposit);
mMyData = BaseApplication.getInstance().getMyData();
mWXApi = WXAPIFactory.createWXAPI(this, AppConstants.WXApp_id);
mIsWXRegistApp = mWXApi.registerApp(AppConstants.WXA... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recharge_deposit);
mMyData = BaseApplication.getInstance().getMyData();
mWXApi = WXAPIFactory.createWXAPI(this, AppConstants.WXApp_id);
mIsWXRegistApp = mWXApi.registerApp(AppConstants.WXA... | Electrocar-master | positive | 4,202 |
@Override
public boolean onTouch(final View v, final MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {
if (mFlingTracker == null || mFlingTracker.isFinished()) {
setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE);
}
requestParentListViewToNotInterceptTouchEvents(false... | @Override
public boolean onTouch(final View v, final MotionEvent event) {
<DeepExtract>
if (event.getAction() == MotionEvent.ACTION_UP) {
if (mFlingTracker == null || mFlingTracker.isFinished()) {
setCurrentScrollState(OnScrollStateChangedListener.ScrollState.SCROLL_STATE_IDLE);
}
requestParentListViewToNotInterceptTou... | TradeIn | positive | 4,203 |
public void setPosition(String string, float x, float y, float z) {
while (this.sndSystem.randomNumberGenerator == null && running) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
this.refresh();
VoiceChatClient.getSoundManager().reload();
}
this.sndSystem.setPosition(string, x, y, z)... | public void setPosition(String string, float x, float y, float z) {
<DeepExtract>
while (this.sndSystem.randomNumberGenerator == null && running) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
this.refresh();
VoiceChatClient.getSoundManager().reload();
}
</DeepExtract>
this.sndSystem... | VoiceChat | positive | 4,204 |
private Token<PTokenId> nextSkipWhitespaceComment(TokenSequence<PTokenId> ts) {
if (!ts.moveNext()) {
return null;
}
while (ts.token() != null && (ts.token().id() == PTokenId.WHITESPACE || ts.token().id() == PTokenId.COMMENT || ts.token().id() == PTokenId.LINE_COMMENT)) {
if (!ts.moveNext()) {
return null;
}
}
return t... | private Token<PTokenId> nextSkipWhitespaceComment(TokenSequence<PTokenId> ts) {
if (!ts.moveNext()) {
return null;
}
<DeepExtract>
while (ts.token() != null && (ts.token().id() == PTokenId.WHITESPACE || ts.token().id() == PTokenId.COMMENT || ts.token().id() == PTokenId.LINE_COMMENT)) {
if (!ts.moveNext()) {
return null... | NetBeansPuppet | positive | 4,205 |
protected long encodeNewWalk(int sourceId, int sourceVertex, boolean hop) {
assert (sourceVertex % bucketSize < 128);
int hopbit = (hop ? 1 : 0);
return ((sourceId & 0xffffff) << 8) | ((sourceVertex % bucketSize & 0x7f) << 1) | hopbit;
} | protected long encodeNewWalk(int sourceId, int sourceVertex, boolean hop) {
<DeepExtract>
assert (sourceVertex % bucketSize < 128);
int hopbit = (hop ? 1 : 0);
return ((sourceId & 0xffffff) << 8) | ((sourceVertex % bucketSize & 0x7f) << 1) | hopbit;
</DeepExtract>
} | graphchi-java | positive | 4,206 |
@BeforeEach
void setup() throws IOException {
recipientKey = memoryKeyStore.generateKeyPair();
privacyGroupMembers = new String[] { encodeBytes(senderKey.bytesArray()), encodeBytes(recipientKey.bytesArray()) };
peer = new FakePeer(recipientKey);
networkNodes.addNode(Collections.singletonMap(recipientKey.bytes(), peer.g... | @BeforeEach
void setup() throws IOException {
recipientKey = memoryKeyStore.generateKeyPair();
privacyGroupMembers = new String[] { encodeBytes(senderKey.bytesArray()), encodeBytes(recipientKey.bytesArray()) };
peer = new FakePeer(recipientKey);
networkNodes.addNode(Collections.singletonMap(recipientKey.bytes(), peer.g... | orion | positive | 4,207 |
private boolean handleFailure(IOException e) throws IOException {
RouteSelector routeSelector = httpEngine.routeSelector;
if (routeSelector != null && httpEngine.connection != null) {
routeSelector.connectFailed(httpEngine.connection, e);
}
OutputStream requestBody = httpEngine.getRequestBody();
boolean canRetryRequest... | private boolean handleFailure(IOException e) throws IOException {
RouteSelector routeSelector = httpEngine.routeSelector;
if (routeSelector != null && httpEngine.connection != null) {
routeSelector.connectFailed(httpEngine.connection, e);
}
OutputStream requestBody = httpEngine.getRequestBody();
boolean canRetryRequest... | phonegap-custom-camera-plugin | positive | 4,208 |
private void init(AttributeSet attrs, int defStyle) {
final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ColorPicker, defStyle, 0);
final Resources b = getContext().getResources();
mColorWheelThickness = a.getDimensionPixelSize(R.styleable.ColorPicker_color_wheel_thickness, b.getDimensionPixelS... | private void init(AttributeSet attrs, int defStyle) {
final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ColorPicker, defStyle, 0);
final Resources b = getContext().getResources();
mColorWheelThickness = a.getDimensionPixelSize(R.styleable.ColorPicker_color_wheel_thickness, b.getDimensionPixelS... | BLImage | positive | 4,209 |
@Override
public void scrollToPosition(int position) {
if (position < 0 || position > getItemCount() - 1) {
return;
}
return Math.round(getIntervalDistance() * position);
if (mRecycle == null || mState == null) {
mSelectPosition = position;
} else {
layoutItems(mRecycle, mState, position > mSelectPosition ? SCROLL_RIGH... | @Override
public void scrollToPosition(int position) {
if (position < 0 || position > getItemCount() - 1) {
return;
}
<DeepExtract>
return Math.round(getIntervalDistance() * position);
</DeepExtract>
if (mRecycle == null || mState == null) {
mSelectPosition = position;
} else {
layoutItems(mRecycle, mState, position > ... | YCRefreshView | positive | 4,210 |
@Override
public void initialize(URL url, ResourceBundle rb) {
menuGerenciar.setText(idioma.getMensagem("gerenciar"));
menuGerenciarCategorias.setText(idioma.getMensagem("categorias"));
menuGerenciarItens.setText(idioma.getMensagem("itens"));
menuMovimentar.setText(idioma.getMensagem("movimentar"));
menuUtilitarios.set... | @Override
public void initialize(URL url, ResourceBundle rb) {
menuGerenciar.setText(idioma.getMensagem("gerenciar"));
menuGerenciarCategorias.setText(idioma.getMensagem("categorias"));
menuGerenciarItens.setText(idioma.getMensagem("itens"));
menuMovimentar.setText(idioma.getMensagem("movimentar"));
menuUtilitarios.set... | bgfinancas | positive | 4,211 |
void consume(Purchase itemInfo) throws IabException {
if (mDisposed)
throw new IllegalStateException("IabHelper was disposed of, so it cannot be used.");
if (!mSetupDone) {
logError("Illegal state for operation (" + "consume" + "): IAB helper is not set up.");
throw new IllegalStateException("IAB helper is not set up. ... | void consume(Purchase itemInfo) throws IabException {
if (mDisposed)
throw new IllegalStateException("IabHelper was disposed of, so it cannot be used.");
<DeepExtract>
if (!mSetupDone) {
logError("Illegal state for operation (" + "consume" + "): IAB helper is not set up.");
throw new IllegalStateException("IAB helper i... | partygame-cocos2d-x | positive | 4,212 |
private synchronized void rebuildJournal() throws IOException {
if (journalWriter != null) {
journalWriter.close();
}
Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE);
try {
out.write(MAGIC);
} catch (IOException e) {
hasErrors = true;
}
try {
out.write("\n");
} catch (IOException e) {... | private synchronized void rebuildJournal() throws IOException {
if (journalWriter != null) {
journalWriter.close();
}
Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE);
try {
out.write(MAGIC);
} catch (IOException e) {
hasErrors = true;
}
try {
out.write("\n");
} catch (IOException e) {... | dileber | positive | 4,213 |
public void setComponent(int component) {
if (0 == 0)
return props.put("COMP", new Integer(component));
else
return props.put("COMP" + "." + 0, new Integer(component));
} | public void setComponent(int component) {
<DeepExtract>
if (0 == 0)
return props.put("COMP", new Integer(component));
else
return props.put("COMP" + "." + 0, new Integer(component));
</DeepExtract>
} | geneaquilt | positive | 4,214 |
public void setSessionId(final String id) {
setOption(SESSIONID, Integer.toString(id));
} | public void setSessionId(final String id) {
<DeepExtract>
setOption(SESSIONID, Integer.toString(id));
</DeepExtract>
} | mangosteen | positive | 4,216 |
@Test
public void generatePage_generatesHooks() {
setUpWithJson(SAMPLE_JSON);
final Feature feature = features.get(1);
page = new FeatureReportPage(reportResult, configuration, feature);
page.generatePage();
DocumentAssertion document = documentFrom(page.getWebPage());
ElementAssertion secondElement = document.getFeatu... | @Test
public void generatePage_generatesHooks() {
setUpWithJson(SAMPLE_JSON);
final Feature feature = features.get(1);
page = new FeatureReportPage(reportResult, configuration, feature);
page.generatePage();
DocumentAssertion document = documentFrom(page.getWebPage());
ElementAssertion secondElement = document.getFeatu... | cucumber-reporting | positive | 4,217 |
@Override
public void enterFunctionType(SwiftParser.FunctionTypeContext ctx) {
Optional<ParseTree> arrowOptional = ctx.children.stream().filter(node -> node.getText().equals("->")).findFirst();
if (!arrowOptional.isPresent()) {
return;
}
ParseTree arrow = arrowOptional.get();
Token left = ParseTreeUtil.getStopTokenForN... | @Override
public void enterFunctionType(SwiftParser.FunctionTypeContext ctx) {
Optional<ParseTree> arrowOptional = ctx.children.stream().filter(node -> node.getText().equals("->")).findFirst();
if (!arrowOptional.isPresent()) {
return;
}
ParseTree arrow = arrowOptional.get();
Token left = ParseTreeUtil.getStopTokenForN... | tailor | positive | 4,219 |
public void keyReleased(java.awt.event.KeyEvent evt) {
int k = evt.getKeyCode();
jField2Left.setText(KeyEvent.getKeyText(k));
keys[1][2] = k;
} | public void keyReleased(java.awt.event.KeyEvent evt) {
<DeepExtract>
int k = evt.getKeyCode();
jField2Left.setText(KeyEvent.getKeyText(k));
keys[1][2] = k;
</DeepExtract>
} | halfnes | positive | 4,220 |
public Criteria andFromurlNotBetween(String value1, String value2) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "fromurl" + " cannot be null");
}
criteria.add(new Criterion("fromurl not between", value1, value2));
return (Criteria) this;
} | public Criteria andFromurlNotBetween(String value1, String value2) {
<DeepExtract>
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + "fromurl" + " cannot be null");
}
criteria.add(new Criterion("fromurl not between", value1, value2));
</DeepExtract>
return (Criteria) this;
} | zheng-lite | positive | 4,221 |
public static Date addMonths(int months) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(getNow());
calendar.add(Calendar.MONTH, months);
return calendar.getTime();
} | public static Date addMonths(int months) {
<DeepExtract>
Calendar calendar = Calendar.getInstance();
calendar.setTime(getNow());
calendar.add(Calendar.MONTH, months);
return calendar.getTime();
</DeepExtract>
} | goodcrawler | positive | 4,222 |
public void setRightTopCorner(int rightTopCorner) {
mRightTopCorner = rightTopCorner;
mCorners = new float[] { mLeftTopCorner, mLeftTopCorner, mRightTopCorner, mRightTopCorner, mRightBottomCorner, mRightBottomCorner, mLeftBottomCorner, mLeftBottomCorner };
addRoundRectPath(getWidth(), getHeight());
invalidate();
} | public void setRightTopCorner(int rightTopCorner) {
mRightTopCorner = rightTopCorner;
<DeepExtract>
mCorners = new float[] { mLeftTopCorner, mLeftTopCorner, mRightTopCorner, mRightTopCorner, mRightBottomCorner, mRightBottomCorner, mLeftBottomCorner, mLeftBottomCorner };
addRoundRectPath(getWidth(), getHeight());
invali... | MeiWidgetView | positive | 4,223 |
@Test
public void getWithIntegerResponseCode() throws RemoteException {
Bundle bundle = mDataConverter.convertToPurchaseResponseBundle(0, 0, 0, null);
Mockito.when(mService.getPurchases(mBillingContext.getApiVersion(), mBillingContext.getContext().getPackageName(), Constants.TYPE_IN_APP, null)).thenReturn(bundle);
Purc... | @Test
public void getWithIntegerResponseCode() throws RemoteException {
Bundle bundle = mDataConverter.convertToPurchaseResponseBundle(0, 0, 0, null);
<DeepExtract>
Mockito.when(mService.getPurchases(mBillingContext.getApiVersion(), mBillingContext.getContext().getPackageName(), Constants.TYPE_IN_APP, null)).thenReturn... | android-easy-checkout | positive | 4,225 |
@Test
public void testLimitOrderCreateTransaction() {
ECKey privateKey = new BrainKey(BILTHON_7_BRAIN_KEY, 0).getPrivateKey();
expiration = (System.currentTimeMillis() / 1000) + 60 * 60;
LimitOrderCreateOperation operation = new LimitOrderCreateOperation(seller, amountToSell, minToReceive, (int) expiration, false);
ope... | @Test
public void testLimitOrderCreateTransaction() {
ECKey privateKey = new BrainKey(BILTHON_7_BRAIN_KEY, 0).getPrivateKey();
expiration = (System.currentTimeMillis() / 1000) + 60 * 60;
LimitOrderCreateOperation operation = new LimitOrderCreateOperation(seller, amountToSell, minToReceive, (int) expiration, false);
ope... | graphenej | positive | 4,226 |
private synchronized void onBlockDownloaded(DownloadBlock block, TLBytes data) {
try {
if (block.task.file != null) {
block.task.file.seek(block.index * block.task.blockSize);
block.task.file.write(data.getData(), data.getOffset(), data.getLength());
} else {
return;
}
} catch (IOException e) {
Logger.e(TAG, e);
} fina... | private synchronized void onBlockDownloaded(DownloadBlock block, TLBytes data) {
try {
if (block.task.file != null) {
block.task.file.seek(block.index * block.task.blockSize);
block.task.file.write(data.getData(), data.getOffset(), data.getLength());
} else {
return;
}
} catch (IOException e) {
Logger.e(TAG, e);
} fina... | telegram-trivia-bot | positive | 4,227 |
public String getJvmArgsVariableName() {
return name;
} | public String getJvmArgsVariableName() {
<DeepExtract>
return name;
</DeepExtract>
} | docker-plugin | positive | 4,228 |
private View findOneVisibleChild(int fromIndex, int toIndex, boolean completelyVisible, boolean acceptPartiallyVisible) {
if (mOrientationHelper == null) {
mOrientationHelper = OrientationHelper.createOrientationHelper(this, mOrientation);
}
final int start = mOrientationHelper.getStartAfterPadding();
final int end = m... | private View findOneVisibleChild(int fromIndex, int toIndex, boolean completelyVisible, boolean acceptPartiallyVisible) {
<DeepExtract>
if (mOrientationHelper == null) {
mOrientationHelper = OrientationHelper.createOrientationHelper(this, mOrientation);
}
</DeepExtract>
final int start = mOrientationHelper.getStartAfte... | V14Leanback | positive | 4,229 |
private void initTransitions() {
PLFadeTransition fadeTransition = new PLFadeTransition(0, DURATION / 2, 0, 1);
mTransitionMaker.addTransition(mImageView, fadeTransition);
PLPositionTransition positionTransition = new PLPositionTransition(0, DURATION / 2, -mTitle.getWidth(), (int) mTitle.getY(), (int) mTitle.getX(), (i... | private void initTransitions() {
PLFadeTransition fadeTransition = new PLFadeTransition(0, DURATION / 2, 0, 1);
mTransitionMaker.addTransition(mImageView, fadeTransition);
PLPositionTransition positionTransition = new PLPositionTransition(0, DURATION / 2, -mTitle.getWidth(), (int) mTitle.getY(), (int) mTitle.getX(), (i... | eden | positive | 4,230 |
public static File testJar() {
File a = new File("forklift-test-consumer-0.1.jar");
if (a.exists())
return a;
File b = new File("forklift-test-consumer-0.1.jar");
if (b.exists())
return b;
URL url = Thread.currentThread().getContextClassLoader().getResource("forklift-test-consumer-0.1.jar");
if (url != null) {
File c =... | public static File testJar() {
<DeepExtract>
File a = new File("forklift-test-consumer-0.1.jar");
if (a.exists())
return a;
File b = new File("forklift-test-consumer-0.1.jar");
if (b.exists())
return b;
URL url = Thread.currentThread().getContextClassLoader().getResource("forklift-test-consumer-0.1.jar");
if (url != nu... | forklift | positive | 4,231 |
private Dialog<ButtonType> doShowDialog(Type type, String title, String message, List<ButtonType> buttons) {
return showNode(type, title, new Label(message), buttons, Collections.emptyList());
} | private Dialog<ButtonType> doShowDialog(Type type, String title, String message, List<ButtonType> buttons) {
<DeepExtract>
return showNode(type, title, new Label(message), buttons, Collections.emptyList());
</DeepExtract>
} | GemsFX | positive | 4,232 |
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setSupportActionBar(R.id.cnd_toolbar);
mVContent = findViewById(R.id.cnd_tv_content);
mDensity = getResources().getDisplayMetrics().density;
mDrawable = new CornerDrawable((int) (20 * mDensity), (int) (10 * mDen... | @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setSupportActionBar(R.id.cnd_toolbar);
mVContent = findViewById(R.id.cnd_tv_content);
mDensity = getResources().getDisplayMetrics().density;
mDrawable = new CornerDrawable((int) (20 * mDensity), (int) (10 * mDen... | ProjectX | positive | 4,234 |
@Test
public void deniesIfNotBannedWithAction() {
Person mod = db.mod();
Person banned = db.user1();
Person unrelated = db.person("user2");
MonitoredSubreddit sub = db.sub();
db.primarySub();
db.hma(sub, db.now(-59000));
HandledModAction hma1 = db.hma(sub, db.now(-40000));
db.bh(mod, banned, hma1, "msg", true);
Set<Str... | @Test
public void deniesIfNotBannedWithAction() {
Person mod = db.mod();
Person banned = db.user1();
Person unrelated = db.person("user2");
MonitoredSubreddit sub = db.sub();
db.primarySub();
db.hma(sub, db.now(-59000));
HandledModAction hma1 = db.hma(sub, db.now(-40000));
db.bh(mod, banned, hma1, "msg", true);
<DeepEx... | USLBot | positive | 4,235 |
@Override
public void pathDone() {
if (x0 != sx0 || y0 != sy0) {
addLine(x0, y0, sx0, sy0);
x0 = sx0;
y0 = sy0;
}
if (DO_MONITORS) {
rdrCtx.stats.mon_rdr_endRendering.start();
}
if (edgeMinY == Integer.MAX_VALUE) {
return;
}
final int spminX = FloatMath.max(FloatMath.ceil_int(edgeMinX - 0.5d), boundsMinX);
final int sp... | @Override
public void pathDone() {
if (x0 != sx0 || y0 != sy0) {
addLine(x0, y0, sx0, sy0);
x0 = sx0;
y0 = sy0;
}
<DeepExtract>
if (DO_MONITORS) {
rdrCtx.stats.mon_rdr_endRendering.start();
}
if (edgeMinY == Integer.MAX_VALUE) {
return;
}
final int spminX = FloatMath.max(FloatMath.ceil_int(edgeMinX - 0.5d), boundsMinX)... | marlin-fx | positive | 4,236 |
@Override
public synchronized void close() throws IOException {
if (closed) {
return;
}
closed = true;
int size = bufferedChunk.size();
if (size <= 0) {
return;
}
writeHex(size);
bufferedChunk.writeTo(socketOut);
bufferedChunk.reset();
socketOut.write(CRLF);
socketOut.write(FINAL_CHUNK);
} | @Override
public synchronized void close() throws IOException {
if (closed) {
return;
}
closed = true;
<DeepExtract>
int size = bufferedChunk.size();
if (size <= 0) {
return;
}
writeHex(size);
bufferedChunk.writeTo(socketOut);
bufferedChunk.reset();
socketOut.write(CRLF);
</DeepExtract>
socketOut.write(FINAL_CHUNK);
} | phonegap-custom-camera-plugin | positive | 4,237 |
@Override
public String getFeature(int wordId, int... fields) {
if (fields.length == 1) {
return extractSingleFeature(wordId, fields[0]);
}
if (fields.length == 0) {
return getAllFeatures(wordId);
}
if (fields.length == 1) {
return extractSingleFeature(wordId, fields[0]);
}
String[] allFeatures = getAllFeaturesArray(wo... | @Override
public String getFeature(int wordId, int... fields) {
if (fields.length == 1) {
return extractSingleFeature(wordId, fields[0]);
}
<DeepExtract>
if (fields.length == 0) {
return getAllFeatures(wordId);
}
if (fields.length == 1) {
return extractSingleFeature(wordId, fields[0]);
}
String[] allFeatures = getAllFe... | kuromoji | positive | 4,238 |
@Override
public void visit(SkyDriveAlbum album) {
if (mView == null) {
mView = inflateNewSkyDriveListItem();
}
ImageView img = (ImageView) mView.findViewById(R.id.skyDriveItemIcon);
img.setImageResource(R.drawable.folder_image);
TextView tv = (TextView) mView.findViewById(R.id.nameTextView);
tv.setText(album.getName()... | @Override
public void visit(SkyDriveAlbum album) {
if (mView == null) {
mView = inflateNewSkyDriveListItem();
}
ImageView img = (ImageView) mView.findViewById(R.id.skyDriveItemIcon);
img.setImageResource(R.drawable.folder_image);
TextView tv = (TextView) mView.findViewById(R.id.nameTextView);
tv.setText(album.getName()... | Videos | positive | 4,239 |
@Override
public void push(T element) {
if (size + 1 > elements.length) {
grow();
}
elements[size++] = element;
} | @Override
public void push(T element) {
<DeepExtract>
if (size + 1 > elements.length) {
grow();
}
</DeepExtract>
elements[size++] = element;
} | spork | positive | 4,240 |
private void performInsertLink(Object[] param) {
int selectionStart = mEditText.getSelectionStart();
if (param == null || param.length == 0) {
result = "[]()\n";
mEditText.getText().insert(selectionStart, result);
mEditText.setSelection(selectionStart + 1);
} else if (param.length == 1) {
result = "[" + param[0] + "]("... | private void performInsertLink(Object[] param) {
<DeepExtract>
</DeepExtract>
int selectionStart = mEditText.getSelectionStart();
<DeepExtract>
</DeepExtract>
if (param == null || param.length == 0) {
<DeepExtract>
</DeepExtract>
result = "[]()\n";
<DeepExtract>
</DeepExtract>
mEditText.getText().insert(selectionStart,... | MarkdownEditors | positive | 4,241 |
public String getModules() {
final StringBuffer sb = new StringBuffer();
if (modules != null) {
int i = 0;
for (final String module : modules) {
if (i++ > 0) {
sb.append(", ");
}
sb.append(module);
}
}
final StringBuffer sb = new StringBuffer();
int i = 0;
for (final String className : origins) {
if (i++ > 0) {
sb.appe... | public String getModules() {
final StringBuffer sb = new StringBuffer();
if (modules != null) {
int i = 0;
for (final String module : modules) {
if (i++ > 0) {
sb.append(", ");
}
sb.append(module);
}
}
<DeepExtract>
final StringBuffer sb = new StringBuffer();
int i = 0;
for (final String className : origins) {
if (i++ ... | sonos-java | positive | 4,242 |
protected void noViableAlt(int s, IntStream input) throws NoViableAltException {
if (recognizer.state.backtracking > 0) {
recognizer.state.failed = true;
return;
}
NoViableAltException nvae = new NoViableAltException(getDescription(), decisionNumber, s, input);
;
throw nvae;
} | protected void noViableAlt(int s, IntStream input) throws NoViableAltException {
if (recognizer.state.backtracking > 0) {
recognizer.state.failed = true;
return;
}
NoViableAltException nvae = new NoViableAltException(getDescription(), decisionNumber, s, input);
<DeepExtract>
;
</DeepExtract>
throw nvae;
} | jtcc | positive | 4,243 |
public void nodeNotFound(final Node controlNode, final Node testNode, final String msg) {
if ((msg != null) && (msg.getDifferences() != null)) {
addAll(msg.getDifferences());
return true;
}
return false;
} | public void nodeNotFound(final Node controlNode, final Node testNode, final String msg) {
<DeepExtract>
if ((msg != null) && (msg.getDifferences() != null)) {
addAll(msg.getDifferences());
return true;
}
return false;
</DeepExtract>
} | seleniumtestsframework | positive | 4,244 |
public static SlotMachine deserialize(Map<String, Object> map) {
SlotMachine machine = new SlotMachine((String) map.get("name"));
this.typeName = (String) map.get("type_name");
this.owner = (SlotMachineOwner) map.get("owner");
this.controller = (SimpleLocation) map.get("controller");
return machine;
} | public static SlotMachine deserialize(Map<String, Object> map) {
SlotMachine machine = new SlotMachine((String) map.get("name"));
this.typeName = (String) map.get("type_name");
this.owner = (SlotMachineOwner) map.get("owner");
<DeepExtract>
this.controller = (SimpleLocation) map.get("controller");
</DeepExtract>
return... | CasinoSlots | positive | 4,245 |
private final void setupMenu() {
final View mMoreDots = findViewById(R.id.menu_more), mMenuContent = findViewById(R.id.panelContent), mMenuHandle = findViewById(R.id.panelHandle);
final View mMoreDots = findViewById(R.id.menu_more), mMenuContent = findViewById(R.id.panelContent), mMenuHandle = findViewById(R.id.panelHa... | private final void setupMenu() {
final View mMoreDots = findViewById(R.id.menu_more), mMenuContent = findViewById(R.id.panelContent), mMenuHandle = findViewById(R.id.panelHandle);
final View mMoreDots = findViewById(R.id.menu_more), mMenuContent = findViewById(R.id.panelContent), mMenuHandle = findViewById(R.id.panelHa... | Seven--Calculator | positive | 4,246 |
@Override
public void rebind() {
setParams(Param.Texture, u_texture0);
this.gamma = this.gamma;
setParams(Param.Threshold, this.gamma);
setParams(Param.ThresholdInvTx, 1f / (1 - this.gamma)).endParams();
} | @Override
public void rebind() {
setParams(Param.Texture, u_texture0);
<DeepExtract>
this.gamma = this.gamma;
setParams(Param.Threshold, this.gamma);
setParams(Param.ThresholdInvTx, 1f / (1 - this.gamma)).endParams();
</DeepExtract>
} | GDX-RPG | positive | 4,248 |
public Criteria andGoodsCountNotEqualTo(Integer value) {
if (value == null) {
throw new RuntimeException("Value for " + "goodsCount" + " cannot be null");
}
criteria.add(new Criterion("goods_count <>", value));
return (Criteria) this;
} | public Criteria andGoodsCountNotEqualTo(Integer value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "goodsCount" + " cannot be null");
}
criteria.add(new Criterion("goods_count <>", value));
</DeepExtract>
return (Criteria) this;
} | ssmxiaomi | positive | 4,249 |
private void resetViewState() {
mCurrentScreenState = ScreenState.SCREEN_STATE_NORMAL;
mVideoControllerView.setCurrentScreenState(ScreenState.SCREEN_STATE_NORMAL);
PlayerManager.getInstance().setScreenState(ScreenState.SCREEN_STATE_NORMAL);
mCurrentState = PlayState.STATE_NORMAL;
onChangeUIState(PlayState.STATE_NORMAL)... | private void resetViewState() {
mCurrentScreenState = ScreenState.SCREEN_STATE_NORMAL;
mVideoControllerView.setCurrentScreenState(ScreenState.SCREEN_STATE_NORMAL);
PlayerManager.getInstance().setScreenState(ScreenState.SCREEN_STATE_NORMAL);
<DeepExtract>
mCurrentState = PlayState.STATE_NORMAL;
onChangeUIState(PlayState... | TigerVideo | positive | 4,250 |
public byte[] getBody() {
this.body = org.apache.thrift.TBaseHelper.rightSize(body) == null ? (ByteBuffer) null : ByteBuffer.wrap(Arrays.copyOf(org.apache.thrift.TBaseHelper.rightSize(body), org.apache.thrift.TBaseHelper.rightSize(body).length));
return this;
return body == null ? null : body.array();
} | public byte[] getBody() {
<DeepExtract>
this.body = org.apache.thrift.TBaseHelper.rightSize(body) == null ? (ByteBuffer) null : ByteBuffer.wrap(Arrays.copyOf(org.apache.thrift.TBaseHelper.rightSize(body), org.apache.thrift.TBaseHelper.rightSize(body).length));
return this;
</DeepExtract>
return body == null ? null : bo... | java-rpc-thrift | positive | 4,251 |
static ArrayTypeName get(GenericArrayType type, Map<Type, TypeVariableName> map) {
return new ArrayTypeName(get(type.getGenericComponentType(), map));
} | static ArrayTypeName get(GenericArrayType type, Map<Type, TypeVariableName> map) {
<DeepExtract>
return new ArrayTypeName(get(type.getGenericComponentType(), map));
</DeepExtract>
} | javapoet | positive | 4,252 |
@Override
protected SQLStmt get_query(Clock clock, WorkloadConfiguration wrklConf) {
int year = RandomParameters.randBetween(1993, 1997);
long date1 = RandomParameters.convertDatetoLong(year, 1, 1);
long date2 = RandomParameters.convertDatetoLong(year + 1, 1, 1);
Timestamp ts1 = new Timestamp(clock.transformTsFromSpecT... | @Override
protected SQLStmt get_query(Clock clock, WorkloadConfiguration wrklConf) {
<DeepExtract>
int year = RandomParameters.randBetween(1993, 1997);
long date1 = RandomParameters.convertDatetoLong(year, 1, 1);
long date2 = RandomParameters.convertDatetoLong(year + 1, 1, 1);
Timestamp ts1 = new Timestamp(clock.transf... | HTAPBench | positive | 4,253 |
public void update() {
AppInfo newApp = new AppInfo();
newApp.imageUrl = "路径已修改";
if (appList.size() > 0)
tvDb.update(newApp, "num%2=1");
appList.clear();
appList = tvDb.findAll(AppInfo.class);
lv_list.setAdapter(new DbListAdapter(this, appList));
} | public void update() {
AppInfo newApp = new AppInfo();
newApp.imageUrl = "路径已修改";
if (appList.size() > 0)
tvDb.update(newApp, "num%2=1");
<DeepExtract>
appList.clear();
appList = tvDb.findAll(AppInfo.class);
lv_list.setAdapter(new DbListAdapter(this, appList));
</DeepExtract>
} | tvframe | positive | 4,254 |
public void createMetaGenes(HashMap<String, MetaGene> allMetaGenes) {
this.metaGenes_ = new HashSet<MetaGene>();
final int mergeDist = (int) Math.floor(1000000 * Pascal.set.mergeGenesDistance_);
if (genes_.size() < 1)
return;
ArrayList<Gene> genesSorted = Gene.sortByPosition(genes_);
Iterator<Gene> iter = genesSorted.i... | public void createMetaGenes(HashMap<String, MetaGene> allMetaGenes) {
<DeepExtract>
this.metaGenes_ = new HashSet<MetaGene>();
</DeepExtract>
final int mergeDist = (int) Math.floor(1000000 * Pascal.set.mergeGenesDistance_);
if (genes_.size() < 1)
return;
ArrayList<Gene> genesSorted = Gene.sortByPosition(genes_);
Iterat... | Pascal | positive | 4,255 |
public List<Card> getDoneCards() {
List<Card> result = new ArrayList<Card>();
for (Card card : cards) {
if (Status.DONE.equals(card.getStatus())) {
result.add(card);
}
}
return result;
} | public List<Card> getDoneCards() {
<DeepExtract>
List<Card> result = new ArrayList<Card>();
for (Card card : cards) {
if (Status.DONE.equals(card.getStatus())) {
result.add(card);
}
}
return result;
</DeepExtract>
} | calopsita | positive | 4,256 |
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
mCrime.setTitle(s.toString());
CrimeLab.get(getActivity()).updateCrime(mCrime);
mCallbacks.onCrimeUpdated(mCrime);
} | @Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
mCrime.setTitle(s.toString());
<DeepExtract>
CrimeLab.get(getActivity()).updateCrime(mCrime);
mCallbacks.onCrimeUpdated(mCrime);
</DeepExtract>
} | Android-Programming-The-Big-Nerd-Ranch-Guide-3rd-Edition | positive | 4,257 |
public String toString(int maxCharacters) {
StringBuilder sb = new StringBuilder("[");
for (Iterator<Json> i = L.iterator(); i.hasNext(); ) {
Json value = i.next();
String s = value.isObject() ? ((ObjectJson) value).toStringImpl(maxCharacters, new IdentityHashMap<Json, Json>()) : value.isArray() ? ((ArrayJson) value).t... | public String toString(int maxCharacters) {
<DeepExtract>
StringBuilder sb = new StringBuilder("[");
for (Iterator<Json> i = L.iterator(); i.hasNext(); ) {
Json value = i.next();
String s = value.isObject() ? ((ObjectJson) value).toStringImpl(maxCharacters, new IdentityHashMap<Json, Json>()) : value.isArray() ? ((Array... | NiuBi | positive | 4,258 |
@Override
public void doRender(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
if (renderOutlines) {
GlStateManager.enableColorMaterial();
float h = (entity.ticksExisted % 80) / 80.0f;
GlStateManager.enableOutlineMode(Color.getHSBColor(h, 0.5f, 1.0f).getRGB());
}
if (standModel == nul... | @Override
public void doRender(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
if (renderOutlines) {
GlStateManager.enableColorMaterial();
float h = (entity.ticksExisted % 80) / 80.0f;
GlStateManager.enableOutlineMode(Color.getHSBColor(h, 0.5f, 1.0f).getRGB());
}
<DeepExtract>
if (sta... | SlashBlade | positive | 4,259 |
private void markContinuableAnnotation(String annotationClassDescriptor) {
processedAnnotations.add(annotationClassDescriptor);
continuableAnnotations.add(annotationClassDescriptor);
} | private void markContinuableAnnotation(String annotationClassDescriptor) {
<DeepExtract>
processedAnnotations.add(annotationClassDescriptor);
</DeepExtract>
continuableAnnotations.add(annotationClassDescriptor);
} | tascalate-javaflow | positive | 4,260 |
@Test
public void testRefreshFlowsQosToIdenticalQos() {
updateThenRefreshFlowsThenCheck(Arrays.asList(tapA1a), Arrays.asList(tapA1a));
for (Event event : eventsA[0]) {
eventTapWriter.write(event);
}
Collection<MockEventTapFlow> eventTapFlows = getEventTapFlows().get(key);
assertNotNull(eventTapFlows, context());
assert... | @Test
public void testRefreshFlowsQosToIdenticalQos() {
updateThenRefreshFlowsThenCheck(Arrays.asList(tapA1a), Arrays.asList(tapA1a));
for (Event event : eventsA[0]) {
eventTapWriter.write(event);
}
Collection<MockEventTapFlow> eventTapFlows = getEventTapFlows().get(key);
assertNotNull(eventTapFlows, context());
assert... | event-collector | positive | 4,261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.