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 Dimension getPreferredSize() { return new Dimension(getCubeViewWidth(cubieSize, gap, size), getCubeViewHeight(cubieSize, gap, size)); }
@Override public Dimension getPreferredSize() { <DeepExtract> return new Dimension(getCubeViewWidth(cubieSize, gap, size), getCubeViewHeight(cubieSize, gap, size)); </DeepExtract> }
tnoodle-lib
positive
435,637
@Override public ResultSet getResultSet() throws SQLException { if (isClosed) { throw new SQLException("Statement was previously closed."); } return lastResultSet; }
@Override public ResultSet getResultSet() throws SQLException { <DeepExtract> if (isClosed) { throw new SQLException("Statement was previously closed."); } </DeepExtract> return lastResultSet; }
mongodb-jdbc-driver
positive
435,638
public final LC leftToRight(boolean b) { this.leftToRight = b ? Boolean.TRUE : Boolean.FALSE; return this; }
public final LC leftToRight(boolean b) { <DeepExtract> this.leftToRight = b ? Boolean.TRUE : Boolean.FALSE; </DeepExtract> return this; }
BurpFlashCSRFBuilder
positive
435,640
public void begin(float red, float green, float blue, float alpha, float[] vpMatrix) { GLES20.glUseProgram(mProgram.getHandle()); float[] color = { red, green, blue, alpha }; GLES20.glUniform4fv(mColorHandle, 1, color, 0); GLES20.glActiveTexture(GLES20.GL_TEXTURE0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureId)...
public void begin(float red, float green, float blue, float alpha, float[] vpMatrix) { <DeepExtract> GLES20.glUseProgram(mProgram.getHandle()); float[] color = { red, green, blue, alpha }; GLES20.glUniform4fv(mColorHandle, 1, color, 0); GLES20.glActiveTexture(GLES20.GL_TEXTURE0); GLES20.glBindTexture(GLES20.GL_TEXTURE_...
kwikEFIS
positive
435,642
@Test public void canResetFileAttributes() throws Exception { tool.createASetOfFiles(5); State state = (State) initCommand.execute(context); assertThat(state.getModificationCounts().getAdded()).isEqualTo(5); int fileResetCount = (int) resetFileAttributesCommand.execute(context); assertThat(fileResetCount).isEqualTo(0);...
@Test public void canResetFileAttributes() throws Exception { tool.createASetOfFiles(5); State state = (State) initCommand.execute(context); assertThat(state.getModificationCounts().getAdded()).isEqualTo(5); int fileResetCount = (int) resetFileAttributesCommand.execute(context); assertThat(fileResetCount).isEqualTo(0);...
fim
positive
435,643
public static void main(String[] args) { Stack stack = new Stack(new Node(), new Node()); stack.stackBottom = stack.stackTop; stack.stackTop.next = null; Node newNode = new Node(3); newNode.next = stack.stackTop; stack.stackTop = newNode; Node newNode = new Node(4); newNode.next = stack.stackTop; stack.stackTop = newNo...
public static void main(String[] args) { Stack stack = new Stack(new Node(), new Node()); stack.stackBottom = stack.stackTop; stack.stackTop.next = null; Node newNode = new Node(3); newNode.next = stack.stackTop; stack.stackTop = newNode; Node newNode = new Node(4); newNode.next = stack.stackTop; stack.stackTop = newNo...
java-tutorial
positive
435,644
@Override protected View createSuccessView() { view = View.inflate(getApplicationContext(), R.layout.activity_detail, null); FrameLayout fl_appinfo = (FrameLayout) view.findViewById(R.id.fl_appinfo); HorizontalScrollView hl_screen_shots = (HorizontalScrollView) view.findViewById(R.id.hl_screen_shots); FrameLayout fl_ch...
@Override protected View createSuccessView() { <DeepExtract> view = View.inflate(getApplicationContext(), R.layout.activity_detail, null); FrameLayout fl_appinfo = (FrameLayout) view.findViewById(R.id.fl_appinfo); HorizontalScrollView hl_screen_shots = (HorizontalScrollView) view.findViewById(R.id.hl_screen_shots); Fra...
miappstore
positive
435,647
@Override public void onCreate(Database db) { Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION); LoginWechatUserDao.createTable(db, false); WechatAuthenticationBeanDao.createTable(db, false); WechatMessageDao.createTable(db, false); WechatUserBeanDao.createTable(db, false); }
@Override public void onCreate(Database db) { Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION); <DeepExtract> LoginWechatUserDao.createTable(db, false); WechatAuthenticationBeanDao.createTable(db, false); WechatMessageDao.createTable(db, false); WechatUserBeanDao.createTable(db, false); </DeepE...
wechatrobot
positive
435,648
@Override public void hide() { if (mSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) { return; } if (mFabBtn.getVisibility() == View.VISIBLE) { mFabBtn.animate().scaleX(0).scaleY(0).setDuration(150).setListener(mFabHideAnimatorListener).setInterpolator(new DecelerateInterpolator()).start(); } }
@Override public void hide() { if (mSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) { return; } <DeepExtract> if (mFabBtn.getVisibility() == View.VISIBLE) { mFabBtn.animate().scaleX(0).scaleY(0).setDuration(150).setListener(mFabHideAnimatorListener).setInterpolator(new DecelerateInterpolator()).start();...
XMShare
positive
435,651
@Override public void afterTextChanged(Editable s) { if (binding.laserSearch.getText().toString().isEmpty()) { binding.laserSearchClear.setImageResource(R.drawable.search); binding.laserSearchClear.setClickable(false); } else { binding.laserSearchClear.setImageResource(R.drawable.search_clear); binding.laserSearchClear...
@Override public void afterTextChanged(Editable s) { <DeepExtract> if (binding.laserSearch.getText().toString().isEmpty()) { binding.laserSearchClear.setImageResource(R.drawable.search); binding.laserSearchClear.setClickable(false); } else { binding.laserSearchClear.setImageResource(R.drawable.search_clear); binding.la...
BASElineFlightComputer
positive
435,652
@Override public void e(Throwable t) { Log.getStackTraceString(t) = String.format("{ %s } %s", 'e', Log.getStackTraceString(t)); switch('e') { case 'd': case 'i': case 'w': System.out.println(Log.getStackTraceString(t)); break; case 'e': case 'f': System.err.println(Log.getStackTraceString(t)); break; } }
@Override public void e(Throwable t) { <DeepExtract> Log.getStackTraceString(t) = String.format("{ %s } %s", 'e', Log.getStackTraceString(t)); switch('e') { case 'd': case 'i': case 'w': System.out.println(Log.getStackTraceString(t)); break; case 'e': case 'f': System.err.println(Log.getStackTraceString(t)); break; } <...
WMRouter
positive
435,653
@Override protected void onDestroy() { JActivityManager.getInstance().removeActivity(this); this.unregisterReceiver(this.mBroadcastReceiver); this.mBroadcastReceiver = null; this.filter = null; if (this.mActivityParameters != null) { this.mActivityParameters.clear(); } this.mActivityParameters = null; if (this.mActivit...
@Override protected void onDestroy() { JActivityManager.getInstance().removeActivity(this); this.unregisterReceiver(this.mBroadcastReceiver); this.mBroadcastReceiver = null; this.filter = null; if (this.mActivityParameters != null) { this.mActivityParameters.clear(); } this.mActivityParameters = null; <DeepExtract> if ...
J-AndroidFramework
positive
435,656
private OnErrorCallback givenAnErrorCallbackThatCapturesError() { OnErrorCallback onErrorCallback = mock(OnErrorCallback.class); when(onErrorCallback.onError(any(Error.class))).thenReturn(true); return onErrorCallback; }
private OnErrorCallback givenAnErrorCallbackThatCapturesError() { <DeepExtract> OnErrorCallback onErrorCallback = mock(OnErrorCallback.class); when(onErrorCallback.onError(any(Error.class))).thenReturn(true); return onErrorCallback; </DeepExtract> }
Rosie
positive
435,657
public static String formatDecimal(double number, int digits) { try { if (digits == 0) { int r0 = (int) Math.round((float) number); number = r0; } else if (digits > 0) { if (digits > 9) digits = 9; StringBuffer a = new StringBuffer(); for (int i = 0; i < digits; i++) { if (i == 0) a.append("."); a.append("0"); } Decima...
public static String formatDecimal(double number, int digits) { <DeepExtract> try { if (digits == 0) { int r0 = (int) Math.round((float) number); number = r0; } else if (digits > 0) { if (digits > 9) digits = 9; StringBuffer a = new StringBuffer(); for (int i = 0; i < digits; i++) { if (i == 0) a.append("."); a.append(...
UIUtil
positive
435,658
@Test public void testRemoveSecond() { List<String> exclusions = new ArrayList<>(List.of("A", "B")); updateExclusions(exclusions, 1, ""); assertEquals(List.of("A"), exclusions); }
@Test public void testRemoveSecond() { <DeepExtract> List<String> exclusions = new ArrayList<>(List.of("A", "B")); updateExclusions(exclusions, 1, ""); assertEquals(List.of("A"), exclusions); </DeepExtract> }
Santulator
positive
435,659
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { activity.resetMovieDetailsBundle(); activity.setRestoreMovieDetailsAdapterState(true); activity.setRestoreMovieDetailsState(false); activity.setOrientationChanged(false); activity.resetCastDetailsBundle(); activity.resetTvDetai...
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { activity.resetMovieDetailsBundle(); activity.setRestoreMovieDetailsAdapterState(true); activity.setRestoreMovieDetailsState(false); activity.setOrientationChanged(false); activity.resetCastDetailsBundle(); activity.resetTvDetai...
moviedb-android
positive
435,660
public void init(FMLInitializationEvent e) { GameRegistry.registerWorldGenerator(new BushWorldGen(), 0); GameRegistry.registerWorldGenerator(new FruitTreeWorldGen(), 0); GameRegistry.registerWorldGenerator(new BeehiveWorldGen(), 0); HarvestCraft.config.configureGardenDrops(); RecipeRegistry.registerRecipes(); SeedDropR...
public void init(FMLInitializationEvent e) { GameRegistry.registerWorldGenerator(new BushWorldGen(), 0); GameRegistry.registerWorldGenerator(new FruitTreeWorldGen(), 0); GameRegistry.registerWorldGenerator(new BeehiveWorldGen(), 0); <DeepExtract> HarvestCraft.config.configureGardenDrops(); RecipeRegistry.registerRecipe...
harvestcraft
positive
435,661
private char[] get14Buffer(byte[] data, String encoding) throws IOException { if (!Charset.isSupported(encoding)) throw new IOException("Unsupported encoding " + encoding); Charset charset = Charset.forName(encoding); CharsetDecoder cd = charset.newDecoder().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableChara...
private char[] get14Buffer(byte[] data, String encoding) throws IOException { if (!Charset.isSupported(encoding)) throw new IOException("Unsupported encoding " + encoding); Charset charset = Charset.forName(encoding); CharsetDecoder cd = charset.newDecoder().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableChara...
sitemesh2
positive
435,663
public static char getChar(Field f, Object o) throws IllegalArgumentException, IllegalAccessException { if (Modifier.isStatic(f.getModifiers())) { Class<?> c = f.getDeclaringClass(); try { Field sf = c.getDeclaredField("$$crijSFHelper"); sf.setAccessible(true); CRIJSFHelper sfHelper = (CRIJSFHelper) sf.get(null); if (s...
public static char getChar(Field f, Object o) throws IllegalArgumentException, IllegalAccessException { <DeepExtract> if (Modifier.isStatic(f.getModifiers())) { Class<?> c = f.getDeclaringClass(); try { Field sf = c.getDeclaredField("$$crijSFHelper"); sf.setAccessible(true); CRIJSFHelper sfHelper = (CRIJSFHelper) sf.ge...
crochet
positive
435,664
public static void main(String[] args) throws IOException { Path path = Paths.get("src/com/chuidiang/ejemplos/java_nio/ReadFile.java"); ByteBuffer buffer = ByteBuffer.allocate(100); String fileEncoding = System.getProperty("file.encoding"); try (FileChannel channel = FileChannel.open(path, StandardOpenOption.READ)) { w...
public static void main(String[] args) throws IOException { Path path = Paths.get("src/com/chuidiang/ejemplos/java_nio/ReadFile.java"); ByteBuffer buffer = ByteBuffer.allocate(100); String fileEncoding = System.getProperty("file.encoding"); try (FileChannel channel = FileChannel.open(path, StandardOpenOption.READ)) { w...
chuidiang-ejemplos
positive
435,665
@Override public void granted() { mIat = SpeechRecognizer.createRecognizer(MainActivity.this, mInitListener); Log.i(TAG, "onCreate: mIat == null ?" + mIat); mIatDialog = new RecognizerDialog(MainActivity.this, mInitListener); FlowerCollector.onEvent(MainActivity.this, "iat_recognize"); mSearchEt.setText(""); mIatResult...
@Override public void granted() { mIat = SpeechRecognizer.createRecognizer(MainActivity.this, mInitListener); Log.i(TAG, "onCreate: mIat == null ?" + mIat); mIatDialog = new RecognizerDialog(MainActivity.this, mInitListener); FlowerCollector.onEvent(MainActivity.this, "iat_recognize"); mSearchEt.setText(""); mIatResult...
AndroidLearnProject
positive
435,666
protected ClassDataCacher getClassDataCacher() { ReflectUtils instance = (instanceStorage == null ? null : instanceStorage.get()); if (instance == null) { instance = ReflectUtils.setInstance(null); } return instance; }
protected ClassDataCacher getClassDataCacher() { <DeepExtract> ReflectUtils instance = (instanceStorage == null ? null : instanceStorage.get()); if (instance == null) { instance = ReflectUtils.setInstance(null); } return instance; </DeepExtract> }
reflectutils
positive
435,668
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle args = getArguments(); if (args != null) { mCurrentPosition = args.getInt(ARG_SECTION_NUMBER); } try { InputStream is = getActivity().getAssets().open("data.json"); int size = is.available(); byte[] buffer = new byte[...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle args = getArguments(); if (args != null) { mCurrentPosition = args.getInt(ARG_SECTION_NUMBER); } <DeepExtract> try { InputStream is = getActivity().getAssets().open("data.json"); int size = is.available(); byte[] buff...
app-sample-android-phonegap
positive
435,669
public Product[] getDefaultResources() { if (isSiliconMine()) { final Product[] resources = new Product[1]; final Product resource = this.resources[0]; final int baseTime = 2400 / (getDefaultYield() + 1) + 1; final int multiple = (int) Math.floor(59.9 / baseTime) + 1; resources[0] = new Product(resource.getWare(), mult...
public Product[] getDefaultResources() { <DeepExtract> if (isSiliconMine()) { final Product[] resources = new Product[1]; final Product resource = this.resources[0]; final int baseTime = 2400 / (getDefaultYield() + 1) + 1; final int multiple = (int) Math.floor(59.9 / baseTime) + 1; resources[0] = new Product(resource.g...
xadrian
positive
435,670
public void run() { btn.setEnabled(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) btn.animate().alpha(1).scaleX(1).scaleY(1); else btn.setVisibility(View.VISIBLE); }
public void run() { <DeepExtract> btn.setEnabled(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) btn.animate().alpha(1).scaleX(1).scaleY(1); else btn.setVisibility(View.VISIBLE); </DeepExtract> }
NBAPlus
positive
435,671
@Test public void getString() throws VPackException { final VPackSlice slice = new VPackSlice(new byte[] { 0x4b, 72, 97, 108, 108, 111, 32, 87, 101, 108, 116, 33 }); assertThat(slice.getAsString(), is("Hallo Welt!")); final VPackSlice slice = new VPackSlice(new byte[] { 0x4c, 72, 101, 108, 108, 111, 32, 87, 111, 114, 1...
@Test public void getString() throws VPackException { final VPackSlice slice = new VPackSlice(new byte[] { 0x4b, 72, 97, 108, 108, 111, 32, 87, 101, 108, 116, 33 }); assertThat(slice.getAsString(), is("Hallo Welt!")); final VPackSlice slice = new VPackSlice(new byte[] { 0x4c, 72, 101, 108, 108, 111, 32, 87, 111, 114, 1...
java-velocypack
positive
435,673
public void actionPerformed(java.awt.event.ActionEvent evt) { if (actionReplay.getFoundAddresses().isEmpty()) { actionReplay.newSearchInMemory((byte) Integer.parseInt(textFindData.getText(), 16)); } else { actionReplay.continueSearch((byte) Integer.parseInt(textFindData.getText(), 16)); } updateListPossibleCodes(); }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> if (actionReplay.getFoundAddresses().isEmpty()) { actionReplay.newSearchInMemory((byte) Integer.parseInt(textFindData.getText(), 16)); } else { actionReplay.continueSearch((byte) Integer.parseInt(textFindData.getText(), 16)); } updateListPossib...
halfnes
positive
435,674
@Test public void incr() throws Exception { String key = keyPrefix + "_INCR_TEST_KEY"; assertEquals(1, executeSingleIntegerResult("INCR " + key)); assertEquals(2, executeSingleIntegerResult("INCR " + key)); execute("DEL " + key); }
@Test public void incr() throws Exception { String key = keyPrefix + "_INCR_TEST_KEY"; assertEquals(1, executeSingleIntegerResult("INCR " + key)); assertEquals(2, executeSingleIntegerResult("INCR " + key)); <DeepExtract> execute("DEL " + key); </DeepExtract> }
jdbc-redis
positive
435,676
@Test public void test16() { for (String text : "I will delete something") { assertNotNull(mEditor.commitFinalResult(text)); } assertThat(mEditor.getText().toString(), is("I will delete something")); }
@Test public void test16() { for (String text : "I will delete something") { assertNotNull(mEditor.commitFinalResult(text)); } <DeepExtract> assertThat(mEditor.getText().toString(), is("I will delete something")); </DeepExtract> }
speechutils
positive
435,679
public static String localDate2string(LocalDate localDate) { DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd"); format.withLocale(Locale.getDefault()); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); return sdf.format(localDate); }
public static String localDate2string(LocalDate localDate) { DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd"); format.withLocale(Locale.getDefault()); <DeepExtract> SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); return sdf.format(localDate); </DeepExtract> }
Box
positive
435,680
public void v(@NonNull Object... data) { if (!should(LEVEL_VERBOSE)) return; StringBuilder message = new StringBuilder(); Throwable throwable = null; for (Object object : data) { if (object instanceof Throwable) { throwable = (Throwable) object; } message.append(object); message.append(" "); } String string = message.t...
public void v(@NonNull Object... data) { <DeepExtract> if (!should(LEVEL_VERBOSE)) return; StringBuilder message = new StringBuilder(); Throwable throwable = null; for (Object object : data) { if (object instanceof Throwable) { throwable = (Throwable) object; } message.append(object); message.append(" "); } String stri...
Lassi-Android
positive
435,681
@Override public ValidateAccessRights cannotCreatePage(String templatePath) { List<Resource> resources = resolveResources(); List<Group> groups = resolveGroups(); for (Group group : groups) { for (Resource resource : resources) { validators.add((authorizable, resource, checkAccessGranted) -> new CreatePageAccessValidat...
@Override public ValidateAccessRights cannotCreatePage(String templatePath) { <DeepExtract> List<Resource> resources = resolveResources(); List<Group> groups = resolveGroups(); for (Group group : groups) { for (Resource resource : resources) { validators.add((authorizable, resource, checkAccessGranted) -> new CreatePag...
aem-easy-content-upgrade
positive
435,682
public JSON queryTestFUnctionByProject(String projectID) throws Exception { if (projectRepository.findById(projectID) == null) { throw new Exception("Can't find project by id : " + projectID); } Project project = projectRepository.findById(projectID); List<TestFunction> testFunctions = project.getTestFunctions(); JSONA...
public JSON queryTestFUnctionByProject(String projectID) throws Exception { if (projectRepository.findById(projectID) == null) { throw new Exception("Can't find project by id : " + projectID); } Project project = projectRepository.findById(projectID); List<TestFunction> testFunctions = project.getTestFunctions(); <Deep...
dev-stc
positive
435,684
public List<UserInfo.Menu> findMenuByRole(List<Role> roles) { if (roles.stream().anyMatch(role -> SecurityConsts.ROLE_SUPER_ADMIN.equals(role.getRole()))) { menus = menuDao.findAll(); } else { menus = menuDao.findByRole(roles.stream().map(Role::getId).collect(Collectors.toList())); } List<UserInfo.Menu> result = Lists....
public List<UserInfo.Menu> findMenuByRole(List<Role> roles) { if (roles.stream().anyMatch(role -> SecurityConsts.ROLE_SUPER_ADMIN.equals(role.getRole()))) { menus = menuDao.findAll(); } else { menus = menuDao.findByRole(roles.stream().map(Role::getId).collect(Collectors.toList())); } <DeepExtract> List<UserInfo.Menu> r...
morphling
positive
435,685
public static void main(String[] args) throws Exception { File file = new File(DEST); file.getParentFile().mkdirs(); Listing_08_06_ReplaceIcon application = new Listing_08_06_ReplaceIcon(); application.arguments = args; manipulatePdf2(ADVERTISEMENT, DEST); }
public static void main(String[] args) throws Exception { File file = new File(DEST); file.getParentFile().mkdirs(); Listing_08_06_ReplaceIcon application = new Listing_08_06_ReplaceIcon(); application.arguments = args; <DeepExtract> manipulatePdf2(ADVERTISEMENT, DEST); </DeepExtract> }
i7js-book
positive
435,689
public static int i(String tag, String msg) { String priorityString = INFO == ASSERT ? "ASSERT" : INFO == DEBUG ? "DEBUG" : INFO == ERROR ? "ERROR" : INFO == INFO ? "INFO" : INFO == VERBOSE ? "VERBOSE" : INFO == WARN ? "WARN" : "UNKNOWN"; String s = "" + priorityString + " " + tag + " " + msg; System.out.println(s); ...
public static int i(String tag, String msg) { <DeepExtract> String priorityString = INFO == ASSERT ? "ASSERT" : INFO == DEBUG ? "DEBUG" : INFO == ERROR ? "ERROR" : INFO == INFO ? "INFO" : INFO == VERBOSE ? "VERBOSE" : INFO == WARN ? "WARN" : "UNKNOWN"; String s = "" + priorityString + " " + tag + " " + msg; System.ou...
virtual_robot
positive
435,691
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_opengl); Log.d(TAG, "getIncomingIntent: checking for incoming intent."); if (getIntent().hasExtra(getString(R.string.user_stories)) && getIntent().hasExtra(getString(R.string.res...
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_opengl); <DeepExtract> Log.d(TAG, "getIncomingIntent: checking for incoming intent."); if (getIntent().hasExtra(getString(R.string.user_stories)) && getIntent().hasExtra(getStrin...
Android-Instagram-Clone
positive
435,692
@Override public void enterMainClass(@NotNull MinijavaParser.MainClassContext ctx) { Klass klass = klasses.get(ctx.Identifier(0).getText()); currentScope = klass; scopes.put(ctx, currentScope); }
@Override public void enterMainClass(@NotNull MinijavaParser.MainClassContext ctx) { Klass klass = klasses.get(ctx.Identifier(0).getText()); currentScope = klass; <DeepExtract> scopes.put(ctx, currentScope); </DeepExtract> }
MiniJava-Compiler
positive
435,694
@Transient public Service toApi(IPackageDAO packageDAO) { Service service = new Service(); this.id = this.id; this.name = this.name; this.description = this.description; this.initScript = this.initScript; if (packageDAO != null) { service.setPackages(packageDAO.findByIds(new ArrayList<>(this.packages)).stream().map(EPa...
@Transient public Service toApi(IPackageDAO packageDAO) { Service service = new Service(); this.id = this.id; this.name = this.name; this.description = this.description; <DeepExtract> this.initScript = this.initScript; </DeepExtract> if (packageDAO != null) { service.setPackages(packageDAO.findByIds(new ArrayList<>(thi...
cloudconductor-server
positive
435,696
@Override public void processPacket(Packet packet) { if (provider == null) { provider = new DummyProvider(); } if (packet.getElemName().equals(Iq.ELEM_NAME) && packet.getType() == StanzaType.set) { Element register = packet.getElement().getChild("register", XMLNS); if (register != null && provider.getName().equals(regi...
@Override public void processPacket(Packet packet) { <DeepExtract> if (provider == null) { provider = new DummyProvider(); } </DeepExtract> if (packet.getElemName().equals(Iq.ELEM_NAME) && packet.getType() == StanzaType.set) { Element register = packet.getElement().getChild("register", XMLNS); if (register != null && p...
tigase-extension
positive
435,697
public void curveTo(double xc1, double yc1, double xc2, double yc2, double x1, double y1) { CubicCurveTo curveTo = new CubicCurveTo(xc1, yc1, xc2, yc2, x1, y1); getElements().add(curveTo); if (xc1 < minX) minX = xc1; if (xc1 > maxX) maxX = xc1; if (yc1 < minY) minY = yc1; if (yc1 > maxY) maxY = yc1; if (xc1 < minX) min...
public void curveTo(double xc1, double yc1, double xc2, double yc2, double x1, double y1) { CubicCurveTo curveTo = new CubicCurveTo(xc1, yc1, xc2, yc2, x1, y1); getElements().add(curveTo); if (xc1 < minX) minX = xc1; if (xc1 > maxX) maxX = xc1; if (yc1 < minY) minY = yc1; if (yc1 > maxY) maxY = yc1; if (xc1 < minX) min...
gs-ui-javafx
positive
435,698
@Test public void testSessionFileClearDrawName() { mainModel.sessionFileProperty().set(SESSION_FILE); sessionModel.setDrawName(""); String actual = mainModel.titleProperty().get(); assertEquals("Untitled (saved.file) - Santulator", actual, "Title"); }
@Test public void testSessionFileClearDrawName() { mainModel.sessionFileProperty().set(SESSION_FILE); sessionModel.setDrawName(""); <DeepExtract> String actual = mainModel.titleProperty().get(); assertEquals("Untitled (saved.file) - Santulator", actual, "Title"); </DeepExtract> }
Santulator
positive
435,699
@Override public void onComplete(JSONObject result) throws JSONException { Babayaga.track(context, Babayaga.Event.VOTE_IDEA, getId()); Babayaga.track(context, Babayaga.Event.SUBSCRIBE_IDEA, getId()); super.load(result.getJSONObject("suggestion")); title = getString(result.getJSONObject("suggestion"), "title"); text = g...
@Override public void onComplete(JSONObject result) throws JSONException { Babayaga.track(context, Babayaga.Event.VOTE_IDEA, getId()); Babayaga.track(context, Babayaga.Event.SUBSCRIBE_IDEA, getId()); <DeepExtract> super.load(result.getJSONObject("suggestion")); title = getString(result.getJSONObject("suggestion"), "tit...
uservoice-android-sdk
positive
435,700
public Criteria andSystolicPressureLessThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "systolicPressure" + " cannot be null"); } criteria.add(new Criterion("systolic_pressure <=", value)); return (Criteria) this; }
public Criteria andSystolicPressureLessThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "systolicPressure" + " cannot be null"); } criteria.add(new Criterion("systolic_pressure <=", value)); </DeepExtract> return (Criteria) this; }
health_online
positive
435,701
public GeodesicData ArcDirect(double lat1, double lon1, double azi1, double a12) { if (!true) GeodesicMask.STANDARD |= GeodesicMask.DISTANCE_IN; return new GeodesicLine(this, lat1, lon1, azi1, GeodesicMask.STANDARD).Position(true, a12, GeodesicMask.STANDARD); }
public GeodesicData ArcDirect(double lat1, double lon1, double azi1, double a12) { <DeepExtract> if (!true) GeodesicMask.STANDARD |= GeodesicMask.DISTANCE_IN; return new GeodesicLine(this, lat1, lon1, azi1, GeodesicMask.STANDARD).Position(true, a12, GeodesicMask.STANDARD); </DeepExtract> }
proj4j
positive
435,702
private void encode(SpeechContext context) { this.frameWindow.rewind(); this.encodeModel.inputs(0).rewind(); while (!this.frameWindow.isEmpty()) { this.encodeModel.inputs(0).putFloat(this.frameWindow.read()); } this.encodeModel.run(); this.encodeWindow.rewind().seek(this.encodeWidth); while (this.encodeModel.outputs(0)...
private void encode(SpeechContext context) { this.frameWindow.rewind(); this.encodeModel.inputs(0).rewind(); while (!this.frameWindow.isEmpty()) { this.encodeModel.inputs(0).putFloat(this.frameWindow.read()); } this.encodeModel.run(); this.encodeWindow.rewind().seek(this.encodeWidth); while (this.encodeModel.outputs(0)...
spokestack-android
positive
435,704
@Override public Status update(String bucket, String key, HashMap<String, ByteIterator> values) { int totalSize = 0; int fieldCount = values.size(); Object keyToSearch = values.keySet().toArray()[0]; byte[] sourceArray = values.get(keyToSearch).toArray(); int sizeArray = sourceArray.length; if (false) { totalSize = siz...
@Override public Status update(String bucket, String key, HashMap<String, ByteIterator> values) { <DeepExtract> int totalSize = 0; int fieldCount = values.size(); Object keyToSearch = values.keySet().toArray()[0]; byte[] sourceArray = values.get(keyToSearch).toArray(); int sizeArray = sourceArray.length; if (false) { t...
anna
positive
435,707
public void runtimeOnlyNative(String bundleId) { SwtPlatform platform = SwtPlatform.getRunning(); dep(JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, bundleId + "." + platform); }
public void runtimeOnlyNative(String bundleId) { <DeepExtract> SwtPlatform platform = SwtPlatform.getRunning(); dep(JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, bundleId + "." + platform); </DeepExtract> }
goomph
positive
435,709
@Override public int delete(@NonNull Uri uri, String selection, String[] selectionArgs) { Log.d(TAG, "deleting" + " on " + (uri == null ? "null" : uri) + " selection = " + selection + " selectionArgs = "); if (selectionArgs != null && selectionArgs.length > 0) for (String args : selectionArgs) Log.d(TAG, args + " "); s...
@Override public int delete(@NonNull Uri uri, String selection, String[] selectionArgs) { <DeepExtract> Log.d(TAG, "deleting" + " on " + (uri == null ? "null" : uri) + " selection = " + selection + " selectionArgs = "); if (selectionArgs != null && selectionArgs.length > 0) for (String args : selectionArgs) Log.d(TAG, ...
Android-App-Development
positive
435,710
public void actionPerformed(java.awt.event.ActionEvent evt) { if (!isInputValid()) { JOptionPane.showMessageDialog(this, resources.getString("createDialogInvalidInput")); } else { setStartRequested(true); setVisible(false); } }
public void actionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> if (!isInputValid()) { JOptionPane.showMessageDialog(this, resources.getString("createDialogInvalidInput")); } else { setStartRequested(true); setVisible(false); } </DeepExtract> }
dbschools
positive
435,719
private void outputMeasureInfo(MeasureState state) { return endTime - startTime; if (isEnd(state)) { long total = timeUsed; finalAvg = total / state.getMeasurements() / 1000000.0; finalTotal = total / 1000000000.0; finalTps = state.getMeasurements() / (total / BY_SECONDS); StringBuilder sb = new StringBuilder("\n"); sb...
private void outputMeasureInfo(MeasureState state) { <DeepExtract> return endTime - startTime; </DeepExtract> if (isEnd(state)) { long total = timeUsed; finalAvg = total / state.getMeasurements() / 1000000.0; finalTotal = total / 1000000000.0; finalTps = state.getMeasurements() / (total / BY_SECONDS); StringBuilder sb ...
PalDB
positive
435,720
@Override public void didSave(DidSaveTextDocumentParams params) { if (realTimeProblems) { return; } TextDocumentIdentifier textDocument = params.getTextDocument(); String textDocumentUri = textDocument.getUri(); if (!textDocumentUri.endsWith(FILE_EXTENSION_AS) && !textDocumentUri.endsWith(FILE_EXTENSION_MXML)) { return...
@Override public void didSave(DidSaveTextDocumentParams params) { if (realTimeProblems) { return; } TextDocumentIdentifier textDocument = params.getTextDocument(); String textDocumentUri = textDocument.getUri(); if (!textDocumentUri.endsWith(FILE_EXTENSION_AS) && !textDocumentUri.endsWith(FILE_EXTENSION_MXML)) { return...
vscode-as3mxml
positive
435,722
public static void main(String[] args) { String host = args[0]; int port = Integer.parseInt(args[1]); HeartBeat2 hb = new HeartBeat2(host, port); try { byte[] data = "Ping!".getBytes("UTF-8"); InetAddress addr = InetAddress.getByName(myHost); DatagramPacket pack = new DatagramPacket(data, data.length, addr, myPort); Da...
public static void main(String[] args) { String host = args[0]; int port = Integer.parseInt(args[1]); HeartBeat2 hb = new HeartBeat2(host, port); <DeepExtract> try { byte[] data = "Ping!".getBytes("UTF-8"); InetAddress addr = InetAddress.getByName(myHost); DatagramPacket pack = new DatagramPacket(data, data.length, add...
learningjava
positive
435,723
public void newProject() { jsmodel = new JSmoothModelBean(); jsmodel.setSkeletonName(getInitialSkeletonName()); JSmoothModelBean.Property[] modelProps = new JSmoothModelBean.Property[getInititalSkeletonProperties().length]; String sysoutProps = ""; for (int i = 0; i < getInititalSkeletonProperties().length; i++) { mode...
public void newProject() { jsmodel = new JSmoothModelBean(); jsmodel.setSkeletonName(getInitialSkeletonName()); <DeepExtract> JSmoothModelBean.Property[] modelProps = new JSmoothModelBean.Property[getInititalSkeletonProperties().length]; String sysoutProps = ""; for (int i = 0; i < getInititalSkeletonProperties().lengt...
JSmooth
positive
435,725
public void setIndex(int index) { if (index < 0 && currentPipelineIndex >= 0) { lastUserPipelineIdx = currentPipelineIndex; } if (userPipelineSettings.size() - 1 < index) { logger.warn("User attempted to set index to non-existent pipeline!"); return; } currentPipelineIndex = index; if (index >= 0) { var desiredPipeline...
public void setIndex(int index) { <DeepExtract> if (index < 0 && currentPipelineIndex >= 0) { lastUserPipelineIdx = currentPipelineIndex; } if (userPipelineSettings.size() - 1 < index) { logger.warn("User attempted to set index to non-existent pipeline!"); return; } currentPipelineIndex = index; if (index >= 0) { var d...
photonvision
positive
435,727
public DynamicByteBuffer fillWith(byte b, int size) { if (autoExpand) { expand(size); } while (size-- > 0) { _buf.put(b); } return this; }
public DynamicByteBuffer fillWith(byte b, int size) { <DeepExtract> if (autoExpand) { expand(size); } </DeepExtract> while (size-- > 0) { _buf.put(b); } return this; }
netx
positive
435,728
@NotNull @Override public String classpath() { return String.format("%s%s%s", DOUBLE_QUOT, delegate.classpath(), DOUBLE_QUOT); }
@NotNull @Override public String classpath() { <DeepExtract> return String.format("%s%s%s", DOUBLE_QUOT, delegate.classpath(), DOUBLE_QUOT); </DeepExtract> }
graalvm-native-image-plugin
positive
435,729
@Override public final void addDependency(String dependent, Collection<String> dependsOn) { Node n = dependencies_.get(dependent); if (null == n) { n = new Node(dependent); dependencies_.put(dependent, n); } List<String> e = Collections.emptyList(); for (String s : dependsOn) { Node n0 = createNode_(s, e); n.addDependO...
@Override public final void addDependency(String dependent, Collection<String> dependsOn) { <DeepExtract> Node n = dependencies_.get(dependent); if (null == n) { n = new Node(dependent); dependencies_.put(dependent, n); } List<String> e = Collections.emptyList(); for (String s : dependsOn) { Node n0 = createNode_(s, e)...
greenscript
positive
435,730
public ClientAuthorizationRequestProvider getClientAuthorizationRequestProviderFromIniFileWithNoPropertiesSet() throws Exception { String prefix = UUID.randomUUID().toString(); file = File.createTempFile(prefix, null); file.deleteOnExit(); return new FromHereCredentialsIniFile(file, FromHereCredentialsIniStreamTest.TES...
public ClientAuthorizationRequestProvider getClientAuthorizationRequestProviderFromIniFileWithNoPropertiesSet() throws Exception { <DeepExtract> String prefix = UUID.randomUUID().toString(); file = File.createTempFile(prefix, null); file.deleteOnExit(); </DeepExtract> return new FromHereCredentialsIniFile(file, FromHer...
here-aaa-java-sdk
positive
435,732
public static <T> String and(T[] elements, BiConsumer<? super T, StringBuilder> consumer) { var builder = new StringBuilder(); var i = 0; for (var element : elements) { consumer.accept(element, builder); if (i < elements.size() - 2) { builder.append(", "); } else if (i < elements.size() - 1) { builder.append(' ').appen...
public static <T> String and(T[] elements, BiConsumer<? super T, StringBuilder> consumer) { <DeepExtract> var builder = new StringBuilder(); var i = 0; for (var element : elements) { consumer.accept(element, builder); if (i < elements.size() - 2) { builder.append(", "); } else if (i < elements.size() - 1) { builder.app...
elementary
positive
435,733
@Override public void onClick(View view) { Action act = (Action) view.getTag(); if (DBG) Log.v(TAG, "onClickActionView - " + act.entry.ID + ", " + act); act.execute(view.getContext()); }
@Override public void onClick(View view) { Action act = (Action) view.getTag(); <DeepExtract> if (DBG) Log.v(TAG, "onClickActionView - " + act.entry.ID + ", " + act); </DeepExtract> act.execute(view.getContext()); }
Android-Notification
positive
435,734
private void overlayChartAdded(XYChart<X, Y> chart) { chart.getStylesheets().add(OVERLAY_CHART_CSS); chart.setTitle(null); makeTransparentToMouseEvents(chart, Utils.getPlotContent(chart)); chart.getXAxis().setOpacity(0); chart.getXAxis().setAutoRanging(false); bindAxisBounds(chart.getXAxis(), baseChart.getXAxis()); if ...
private void overlayChartAdded(XYChart<X, Y> chart) { chart.getStylesheets().add(OVERLAY_CHART_CSS); chart.setTitle(null); makeTransparentToMouseEvents(chart, Utils.getPlotContent(chart)); chart.getXAxis().setOpacity(0); chart.getXAxis().setAutoRanging(false); bindAxisBounds(chart.getXAxis(), baseChart.getXAxis()); <De...
extjfx
positive
435,735
@Override public void sendMailToAdmin(final String title, final String content) { retryTemplate.execute(retryContext -> { try { MimeMessage message = sender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(message, true, CharEncoding.UTF_8); helper.setFrom(from); helper.setTo(adminMails); if (null ...
@Override public void sendMailToAdmin(final String title, final String content) { <DeepExtract> retryTemplate.execute(retryContext -> { try { MimeMessage message = sender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(message, true, CharEncoding.UTF_8); helper.setFrom(from); helper.setTo(adminMai...
cymbal
positive
435,736
public void cleanUpBuffers(float r, float g, float b, float a) { final boolean wasCapturing = this.capturing; if (!wasCapturing) { begin(); } Gdx.gl.glClearColor(r, g, b, a); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); if (capturing) { bufDst.end(); } VfxFrameBuffer tmp = this.bufDst; bufDst = bufSrc; bufSrc = tmp; if (c...
public void cleanUpBuffers(float r, float g, float b, float a) { final boolean wasCapturing = this.capturing; if (!wasCapturing) { begin(); } Gdx.gl.glClearColor(r, g, b, a); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); <DeepExtract> if (capturing) { bufDst.end(); } VfxFrameBuffer tmp = this.bufDst; bufDst = bufSrc; bufSr...
gdx-vfx
positive
435,737
public java.lang.Integer getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift...
public java.lang.Integer getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift...
know_how_know_why
positive
435,738
public void label(mindustry.net.NetConnection playerConnection, java.lang.String message, float duration, float worldx, float worldy) { original = Vars.net; staticNet.setNet(net).setProvider(provider); Vars.net = staticNet; mindustry.gen.Call.label(playerConnection, message, duration, worldx, worldy); Vars.net = origin...
public void label(mindustry.net.NetConnection playerConnection, java.lang.String message, float duration, float worldx, float worldy) { original = Vars.net; staticNet.setNet(net).setProvider(provider); Vars.net = staticNet; mindustry.gen.Call.label(playerConnection, message, duration, worldx, worldy); <DeepExtract> Var...
Mindustry-Ozone
positive
435,739
public BigDecimal decodeBigDecimal(EncodedNumber encoded, int precision) throws DecodeException { BigInteger significant; context.checkSameContext(encoded); final BigInteger value = encoded.getValue(); if (value.compareTo(context.getPublicKey().getModulus()) > 0) throw new DecodeException("The significand of the encode...
public BigDecimal decodeBigDecimal(EncodedNumber encoded, int precision) throws DecodeException { <DeepExtract> BigInteger significant; context.checkSameContext(encoded); final BigInteger value = encoded.getValue(); if (value.compareTo(context.getPublicKey().getModulus()) > 0) throw new DecodeException("The significand...
javallier
positive
435,740
public void warn(Marker marker, String format, Object... argArray) { if (isLoggable(Level.WARN, marker)) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); log(Level.WARN, marker, ft.getMessage(), ft.getThrowable()); } }
public void warn(Marker marker, String format, Object... argArray) { <DeepExtract> if (isLoggable(Level.WARN, marker)) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); log(Level.WARN, marker, ft.getMessage(), ft.getThrowable()); } </DeepExtract> }
beacon-simulator-android
positive
435,741
protected void updatePreview(final ValueChange change) { boolean roiChanged = false; Roi roi = imagePlus.getRoi(); if (roi == null || roi.getType() != Roi.RECTANGLE) { imagePlus.setRoi(rectangle); impRansacError.setRoi(rectangle); roi = imagePlus.getRoi(); roiChanged = true; } final Rectangle roiBounds = roi.getBounds(...
protected void updatePreview(final ValueChange change) { boolean roiChanged = false; Roi roi = imagePlus.getRoi(); if (roi == null || roi.getType() != Roi.RECTANGLE) { imagePlus.setRoi(rectangle); impRansacError.setRoi(rectangle); roi = imagePlus.getRoi(); roiChanged = true; } final Rectangle roiBounds = roi.getBounds(...
RS-FISH
positive
435,742
@Override public void initCreateModel() { mTitleEdt.requestFocus(); InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); mTitleEdt.addTextChangedListener(mEditImpl); mUserNameEdt.addTextChanged...
@Override public void initCreateModel() { mTitleEdt.requestFocus(); InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); <DeepExtract> mTitleEdt.addTextChangedListener(mEditImpl); mUserNameEdt....
Memo
positive
435,743
@Override public boolean removeNamedPolicy(String ptype, String... params) { try { READ_WRITE_LOCK.writeLock().lock(); return () -> super.removeNamedPolicy(ptype, params).get(); } finally { READ_WRITE_LOCK.writeLock().unlock(); } }
@Override public boolean removeNamedPolicy(String ptype, String... params) { <DeepExtract> try { READ_WRITE_LOCK.writeLock().lock(); return () -> super.removeNamedPolicy(ptype, params).get(); } finally { READ_WRITE_LOCK.writeLock().unlock(); } </DeepExtract> }
jcasbin
positive
435,745
@Before public void setUp() throws Exception { server = new TestWebServer(); tracker = new CountTracker(RegistryService.getMetricRegistry(), HttpAsyncClientRuleHelper.ROOT_NAME, "method", "status"); CloseableHttpAsyncClient client = HttpAsyncClients.createDefault(); client.start(); return client; tracker.registerTimer(...
@Before public void setUp() throws Exception { server = new TestWebServer(); tracker = new CountTracker(RegistryService.getMetricRegistry(), HttpAsyncClientRuleHelper.ROOT_NAME, "method", "status"); <DeepExtract> CloseableHttpAsyncClient client = HttpAsyncClients.createDefault(); client.start(); return client; </DeepEx...
JInsight
positive
435,746
public static void main(String[] args) { int row = n - 1; int v = 1; int w = weights[row]; for (; v < total + 1; v++) { state[row][v] = values[row] * v / w; } for (int r = row - 1; r >= 0; r--) { w = weights[r]; for (int c = 1; c < total + 1; c++) { if (c >= w) { int v1 = values[r] + state[r][c - w]; int v2 = state[r +...
public static void main(String[] args) { <DeepExtract> int row = n - 1; int v = 1; int w = weights[row]; for (; v < total + 1; v++) { state[row][v] = values[row] * v / w; } for (int r = row - 1; r >= 0; r--) { w = weights[r]; for (int c = 1; c < total + 1; c++) { if (c >= w) { int v1 = values[r] + state[r][c - w]; int ...
Algorithm_LanQiao
positive
435,747
@Test void testRenditionName() { transformerDebug.setIsTRouter(true); monitorLogs(Level.DEBUG); TransformRequest request = TransformRequest.builder().withSourceSize(1234L).withInternalContext(InternalContext.initialise(null)).withClientData(RepositoryClientData.builder().withRenditionName("renditionName").build().toStr...
@Test void testRenditionName() { <DeepExtract> transformerDebug.setIsTRouter(true); monitorLogs(Level.DEBUG); TransformRequest request = TransformRequest.builder().withSourceSize(1234L).withInternalContext(InternalContext.initialise(null)).withClientData(RepositoryClientData.builder().withRenditionName("renditionName")...
alfresco-transform-core
positive
435,749
@Override public boolean validateFromSharedPreferences(SharedPreferences sharedPreferences, String key) { String value = sharedPreferences.getString(key, "0:00"); return true; }
@Override public boolean validateFromSharedPreferences(SharedPreferences sharedPreferences, String key) { String value = sharedPreferences.getString(key, "0:00"); <DeepExtract> return true; </DeepExtract> }
trackworktime
positive
435,751
public void disable() { disabled = true; circuit.disable(); if (!ChunkLocation.fromLocation(activationBlock).isChunkLoaded()) return; try { BlockState state = activationBlock.getBlock().getState(); if (state == null || !(state instanceof Sign)) return; final Sign sign = (Sign) state; String line; if (true) { String sig...
public void disable() { disabled = true; circuit.disable(); if (!ChunkLocation.fromLocation(activationBlock).isChunkLoaded()) return; try { BlockState state = activationBlock.getBlock().getState(); if (state == null || !(state instanceof Sign)) return; final Sign sign = (Sign) state; String line; if (true) { String sig...
RedstoneChips
positive
435,752
public Criteria andTypeidGreaterThan(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "typeid" + " cannot be null"); } criteria.add(new Criterion("typeId >", value)); return (Criteria) this; }
public Criteria andTypeidGreaterThan(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "typeid" + " cannot be null"); } criteria.add(new Criterion("typeId >", value)); </DeepExtract> return (Criteria) this; }
Ordering
positive
435,753
@Override public void sendSimpleMail(List<String> to, String title, String message) { try { Integer sslPort = 465; simpleEmail = new SimpleEmail(); simpleEmail.setHostName(this.host); simpleEmail.setSmtpPort(this.port); simpleEmail.setAuthentication(this.username, this.password); simpleEmail.setFrom(this.from); simpleE...
@Override public void sendSimpleMail(List<String> to, String title, String message) { <DeepExtract> try { Integer sslPort = 465; simpleEmail = new SimpleEmail(); simpleEmail.setHostName(this.host); simpleEmail.setSmtpPort(this.port); simpleEmail.setAuthentication(this.username, this.password); simpleEmail.setFrom(this....
minsx-framework
positive
435,754
private void setValueInternal(int current, boolean notifyChange) { if (mValue == current) { return; } if (mWrapSelectorWheel) { current = getWrappedSelectorIndex(current); } else { current = Math.max(current, mMinValue); current = Math.min(current, mMaxValue); } int previous = mValue; mValue = current; if (mScrollState...
private void setValueInternal(int current, boolean notifyChange) { if (mValue == current) { return; } if (mWrapSelectorWheel) { current = getWrappedSelectorIndex(current); } else { current = Math.max(current, mMinValue); current = Math.min(current, mMaxValue); } int previous = mValue; mValue = current; if (mScrollState...
ExpectLauncher
positive
435,757
@Override public void onDrawFrame(GL10 gl) { if (!mIsActive) return; GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); State state = Renderer.getInstance().begin(); Renderer.getInstance().drawVideoBackground(); GLES20.glEnable(GLES20.GL_DEPTH_TEST); GLES20.glEnable(GLES20.GL_CULL_FACE); GLES20.gl...
@Override public void onDrawFrame(GL10 gl) { if (!mIsActive) return; <DeepExtract> GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); State state = Renderer.getInstance().begin(); Renderer.getInstance().drawVideoBackground(); GLES20.glEnable(GLES20.GL_DEPTH_TEST); GLES20.glEnable(GLES20.GL_CULL_FA...
Vuforia-Samples-Android-Studio
positive
435,758
@PostMapping("/checkout/{id}") public Result checkoutStatus(@PathVariable String id) { OfficialWebsiteAboutUs aboutUs = officialWebsiteAboutUsService.findById(id); if (ENABLE_FLAG_TRUE.equals(aboutUs.getIsEnable())) { aboutUs.setIsEnable(ENABLE_FLAG_FALSE); } else if (ENABLE_FLAG_FALSE.equals(aboutUs.getIsEnable())) { ...
@PostMapping("/checkout/{id}") public Result checkoutStatus(@PathVariable String id) { OfficialWebsiteAboutUs aboutUs = officialWebsiteAboutUsService.findById(id); if (ENABLE_FLAG_TRUE.equals(aboutUs.getIsEnable())) { aboutUs.setIsEnable(ENABLE_FLAG_FALSE); } else if (ENABLE_FLAG_FALSE.equals(aboutUs.getIsEnable())) { ...
non-zero
positive
435,759
private long validateAndGetVersion(String path) { Path parent = new Path(path).getParent(); if (!normalizePath(path).getParent().equals(normalizePath(root))) { throw new RuntimeException(path + " " + parent + " is not part of the versioned store located at " + root); } Long v; String name = new Path(path).getName(); if...
private long validateAndGetVersion(String path) { Path parent = new Path(path).getParent(); if (!normalizePath(path).getParent().equals(normalizePath(root))) { throw new RuntimeException(path + " " + parent + " is not part of the versioned store located at " + root); } <DeepExtract> Long v; String name = new Path(path)...
dfs-datastores
positive
435,760
@Override public void onStart(Intent intent, int startId) { if (log) Log.d(getClass().getSimpleName(), "on start "); if (intent != null && intent.hasExtra("SMS")) { if (intent.getStringExtra("SMS").equals("START") && !state) { startServiceWork(); } if (intent.getStringExtra("SMS").equals("STOP") && state) { stopService...
@Override public void onStart(Intent intent, int startId) { if (log) Log.d(getClass().getSimpleName(), "on start "); <DeepExtract> if (intent != null && intent.hasExtra("SMS")) { if (intent.getStringExtra("SMS").equals("START") && !state) { startServiceWork(); } if (intent.getStringExtra("SMS").equals("STOP") && state)...
OsMoDroid
positive
435,762
public String getString(String path) { Object v = get(path); if (v == null) { return null; } if (String.class.isAssignableFrom(v.getClass())) { return (T) v; } else { return null; } }
public String getString(String path) { <DeepExtract> Object v = get(path); if (v == null) { return null; } if (String.class.isAssignableFrom(v.getClass())) { return (T) v; } else { return null; } </DeepExtract> }
playblock
positive
435,764
public String getGroupInviteEmail(String email) throws IOException, TemplateException { Template template = cfg.getTemplate("/email/group/invite_response.ftl"); Map<String, Object> prop = new HashMap<>(); prop.put("mainDomain", Main.DOMAIN); prop.put("email", email); StringWriter out = new StringWriter(); template.proc...
public String getGroupInviteEmail(String email) throws IOException, TemplateException { Template template = cfg.getTemplate("/email/group/invite_response.ftl"); Map<String, Object> prop = new HashMap<>(); prop.put("mainDomain", Main.DOMAIN); prop.put("email", email); <DeepExtract> StringWriter out = new StringWriter();...
Papka24-core
positive
435,765
public void setValue2(String value2) { this.value2 = value2; try { try { zk.delete("/data", -1); } catch (NoNodeException ignored) { } zk.create("/data", ("value1=" + value1 + " ; value2=" + value2).getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (InterruptedException e) { e.printStackTrace(); } catch ...
public void setValue2(String value2) { this.value2 = value2; <DeepExtract> try { try { zk.delete("/data", -1); } catch (NoNodeException ignored) { } zk.create("/data", ("value1=" + value1 + " ; value2=" + value2).getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } catch (InterruptedException e) { e.printStackTra...
incubator-retired-s4
positive
435,770
public void testReferencesInModes() { myFixture.configureByFiles("Modes.g4"); myFixture.getEditor().getCaretModel().moveToOffset(85); PsiElement psiElement = resolveRefAtCaret(); if (psiElement != null) { assertEquals(ModeSpecNode.class, psiElement.getClass()); if (element -> { assertEquals("MY_MODE", element.getName()...
public void testReferencesInModes() { myFixture.configureByFiles("Modes.g4"); myFixture.getEditor().getCaretModel().moveToOffset(85); <DeepExtract> PsiElement psiElement = resolveRefAtCaret(); if (psiElement != null) { assertEquals(ModeSpecNode.class, psiElement.getClass()); if (element -> { assertEquals("MY_MODE", ele...
intellij-plugin-v4
positive
435,771
protected void generateGlobalConfig() { httpGlobalConfig = ViseHttp.CONFIG(); if (httpGlobalConfig.getBaseUrl() == null) { httpGlobalConfig.baseUrl(ApiHost.getHost()); } if (httpGlobalConfig.getBaseUrl() != null) { this.baseUrl = httpGlobalConfig.getBaseUrl(); } return (R) this; if (httpGlobalConfig.getConverterFactory...
protected void generateGlobalConfig() { httpGlobalConfig = ViseHttp.CONFIG(); if (httpGlobalConfig.getBaseUrl() == null) { httpGlobalConfig.baseUrl(ApiHost.getHost()); } <DeepExtract> if (httpGlobalConfig.getBaseUrl() != null) { this.baseUrl = httpGlobalConfig.getBaseUrl(); } return (R) this; </DeepExtract> if (httpGlo...
XSnow
positive
435,772
private int calculateCurrentReducedComparableIndex(String reducedPart) { int index = 0; for (String reduced : reducedComparableLineParts) { if (reducedPart.equals(reduced)) { index++; } } return index; }
private int calculateCurrentReducedComparableIndex(String reducedPart) { <DeepExtract> int index = 0; for (String reduced : reducedComparableLineParts) { if (reducedPart.equals(reduced)) { index++; } } return index; </DeepExtract> }
eclipse-yaml-editor
positive
435,773
public void testNewFile() throws Exception { expect(fileSystem.exists(f("/codebase/foo"))).andReturn(true); expect(fileSystem.exists(f("/writer/foo"))).andReturn(false); expect(fileSystem.isExecutable(f("/codebase/foo"))).andReturn(false); expect(fileSystem.isExecutable(f("/writer/foo"))).andReturn(false); fileSystem.m...
public void testNewFile() throws Exception { expect(fileSystem.exists(f("/codebase/foo"))).andReturn(true); expect(fileSystem.exists(f("/writer/foo"))).andReturn(false); expect(fileSystem.isExecutable(f("/codebase/foo"))).andReturn(false); expect(fileSystem.isExecutable(f("/writer/foo"))).andReturn(false); fileSystem.m...
MOE
positive
435,774
public Map<T, Long> getCountsThenAdvanceWindow() { Map<T, Long> counts = objCounter.getCounts(); objCounter.wipeZeros(); objCounter.wipeSlot(tailSlot); headSlot = tailSlot; tailSlot = slotAfter(tailSlot); return counts; }
public Map<T, Long> getCountsThenAdvanceWindow() { Map<T, Long> counts = objCounter.getCounts(); objCounter.wipeZeros(); objCounter.wipeSlot(tailSlot); <DeepExtract> headSlot = tailSlot; tailSlot = slotAfter(tailSlot); </DeepExtract> return counts; }
storm-applications
positive
435,775
@Override public Boolean makeJidBytes(JidFactory jidFactory, byte[] bytes) throws Exception { if (len > -1) return false; value = createSubordinate(jidFactory, bytes); int l = Util.stringLength(jidFactory) + value.getSerializedLength(); change(l); serializedBytes = null; serializedOffset = -1; return true; }
@Override public Boolean makeJidBytes(JidFactory jidFactory, byte[] bytes) throws Exception { if (len > -1) return false; <DeepExtract> value = createSubordinate(jidFactory, bytes); int l = Util.stringLength(jidFactory) + value.getSerializedLength(); change(l); serializedBytes = null; serializedOffset = -1; </DeepExtra...
JID
positive
435,776
public String getHotspotLocalIpAddress() { String ipAddress = "192.168.43.1"; DhcpInfo dhcpInfo = mWifiManager.getDhcpInfo(); int address = dhcpInfo.serverAddress; return (address & 0xFF) + "." + ((address >> 8) & 0xFF) + "." + ((address >> 16) & 0xFF) + "." + (address >> 24 & 0xFF); return ipAddress; }
public String getHotspotLocalIpAddress() { String ipAddress = "192.168.43.1"; DhcpInfo dhcpInfo = mWifiManager.getDhcpInfo(); int address = dhcpInfo.serverAddress; <DeepExtract> return (address & 0xFF) + "." + ((address >> 8) & 0xFF) + "." + ((address >> 16) & 0xFF) + "." + (address >> 24 & 0xFF); </DeepExtract> return...
XMShare
positive
435,777
@Override protected void computeWithoutTime() { arcOfNode = new HashMap<Integer, Arc>(); contractions = new LinkedList<Couple<Integer, HashSet<Integer>>>(); arcContractionLink = new HashMap<Arc, Arc>(); virtCost = new HashMap<Arc, Integer>(); HashSet<Arc> h = new HashSet<Arc>(); for (Integer v : instance.getGraph().get...
@Override protected void computeWithoutTime() { arcOfNode = new HashMap<Integer, Arc>(); contractions = new LinkedList<Couple<Integer, HashSet<Integer>>>(); arcContractionLink = new HashMap<Arc, Arc>(); virtCost = new HashMap<Arc, Integer>(); HashSet<Arc> h = new HashSet<Arc>(); for (Integer v : instance.getGraph().get...
DSTAlgoEvaluation
positive
435,779
@Override public void onSuccess(Response response) { mCamEncoder.requestThumbnailOnDeltaFrameWithScaling(10, 1); Log.i(TAG, "got StartStreamResponse"); checkArgument(response instanceof HlsStream, "Got unexpected StartStream Response"); mStream = (HlsStream) response; if (mConfig.shouldAttachLocation()) { Kickflip.addL...
@Override public void onSuccess(Response response) { mCamEncoder.requestThumbnailOnDeltaFrameWithScaling(10, 1); Log.i(TAG, "got StartStreamResponse"); checkArgument(response instanceof HlsStream, "Got unexpected StartStream Response"); <DeepExtract> mStream = (HlsStream) response; if (mConfig.shouldAttachLocation()) {...
kickflip-android-sdk
positive
435,780
@Override public void setByte(int index, byte value) { Records.verifyType(index, HiveType.BYTE, schema); rowData[index] = value; }
@Override public void setByte(int index, byte value) { <DeepExtract> Records.verifyType(index, HiveType.BYTE, schema); rowData[index] = value; </DeepExtract> }
hive-io-experimental
positive
435,781
@AfterClass public static void clean() { File path = new File("/tmp/test-unit-memory/"); Boolean resultat = true; if (path.exists()) { File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { resultat &= deleteDirectory(files[i]); } else { resultat &= files[i].delete(); } ...
@AfterClass public static void clean() { File path = new File("/tmp/test-unit-memory/"); <DeepExtract> Boolean resultat = true; if (path.exists()) { File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { resultat &= deleteDirectory(files[i]); } else { resultat &= files[i...
sparqled
positive
435,782
@Override public void clientOnConnect(AioClientChannel channel) { clientIniting = false; this.cc = channel; synchronized (cq) { if (cq.size() != 0) { writeClientFromQueue(); } } }
@Override public void clientOnConnect(AioClientChannel channel) { clientIniting = false; this.cc = channel; <DeepExtract> synchronized (cq) { if (cq.size() != 0) { writeClientFromQueue(); } } </DeepExtract> }
waterwave
positive
435,783
public CountRequestBuilder<JsonInput, JsonOutput> queryBuilder(QueryBuilder queryBuilder) { request.query(jsonToString(queryBuilder)); return this; return this; }
public CountRequestBuilder<JsonInput, JsonOutput> queryBuilder(QueryBuilder queryBuilder) { <DeepExtract> request.query(jsonToString(queryBuilder)); return this; </DeepExtract> return this; }
elasticshell
positive
435,785
public void handleEventEnable(String param) { int[] newIndexes = Arrays.copyOf(selectedIndexes, selectedIndexes.length + 1); newIndexes[selectedIndexes.length] = Integer.valueOf(param); listener.selectIndexes(newIndexes); }
public void handleEventEnable(String param) { <DeepExtract> int[] newIndexes = Arrays.copyOf(selectedIndexes, selectedIndexes.length + 1); newIndexes[selectedIndexes.length] = Integer.valueOf(param); listener.selectIndexes(newIndexes); </DeepExtract> }
dynaform
positive
435,787