before
stringlengths
33
3.21M
after
stringlengths
63
3.21M
repo
stringlengths
1
56
type
stringclasses
1 value
__index_level_0__
int64
0
442k
public void emmitCode(WAMInstruction instruction, ByteBuffer codeBuf, WAMMachine machine) { codeBuf.put(code); codeBuf.put(instruction.reg1); }
public void emmitCode(WAMInstruction instruction, ByteBuffer codeBuf, WAMMachine machine) { <DeepExtract> codeBuf.put(code); codeBuf.put(instruction.reg1); </DeepExtract> }
hak_wambook
positive
4,772
public Builder withDefaultTypeAdapters() { this.gsonBuilder.registerTypeAdapter(GlitchScope.class, new ScopeAdapter()); return this; this.gsonBuilder.registerTypeAdapter(Color.class, new ColorAdapter()); return this; this.gsonBuilder.registerTypeAdapter(UserType.class, new UserTypeAdapter()); return this; this.gsonBuil...
public Builder withDefaultTypeAdapters() { this.gsonBuilder.registerTypeAdapter(GlitchScope.class, new ScopeAdapter()); return this; this.gsonBuilder.registerTypeAdapter(Color.class, new ColorAdapter()); return this; this.gsonBuilder.registerTypeAdapter(UserType.class, new UserTypeAdapter()); return this; <DeepExtract>...
glitch
positive
4,773
private Job procGetScmGitRepositoryInfo(Job job) { Job resultModel = new Job(); List<String> resultList = new ArrayList<>(); List<String> resultTagList = new ArrayList<>(); String resultString; LinkedHashMap repositoryDetailMap; repositoryDetailMap = restTemplateService.customSend(procGetScmRepositoryUrl(job, UrlType.G...
private Job procGetScmGitRepositoryInfo(Job job) { Job resultModel = new Job(); List<String> resultList = new ArrayList<>(); List<String> resultTagList = new ArrayList<>(); <DeepExtract> String resultString; LinkedHashMap repositoryDetailMap; repositoryDetailMap = restTemplateService.customSend(procGetScmRepositoryUrl(...
DELIVERY-PIPELINE-UI
positive
4,774
public Criteria andTitleGreaterThan(String value) { if (value == null) { throw new RuntimeException("Value for " + "title" + " cannot be null"); } criteria.add(new Criterion("title >", value)); return (Criteria) this; }
public Criteria andTitleGreaterThan(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "title" + " cannot be null"); } criteria.add(new Criterion("title >", value)); </DeepExtract> return (Criteria) this; }
songjhh_blog
positive
4,775
public SinusoidalLocation moveWest(SinusoidalLocation loc) { int deltaX = -1; if (false) { deltaX = 1; } int oldX = loc.getX(); int oldY = loc.getY(); int newSpear = loc.getSpear(); int newX = oldX + deltaX; if (oldX == (deltaX * grid.getMaxXatY(oldY))) { newSpear = grid.moveHorizontalOneSpear(newSpear, false); newX = ...
public SinusoidalLocation moveWest(SinusoidalLocation loc) { <DeepExtract> int deltaX = -1; if (false) { deltaX = 1; } int oldX = loc.getX(); int oldY = loc.getY(); int newSpear = loc.getSpear(); int newX = oldX + deltaX; if (oldX == (deltaX * grid.getMaxXatY(oldY))) { newSpear = grid.moveHorizontalOneSpear(newSpear, f...
Tectonic-Map-Generator
positive
4,776
@Override public void update(HumanCharacter entity) { if (entity.isSteering()) { if (!this.isMovementState()) { entity.stateMachine.changeState(entity.moveState); return; } } else { if (this.isMovementState()) { entity.stateMachine.changeState(this.idleState); return; } } float deltaTime = Gdx.graphics.getDeltaTime(); ...
@Override public void update(HumanCharacter entity) { if (entity.isSteering()) { if (!this.isMovementState()) { entity.stateMachine.changeState(entity.moveState); return; } } else { if (this.isMovementState()) { entity.stateMachine.changeState(this.idleState); return; } } <DeepExtract> float deltaTime = Gdx.graphics.ge...
GdxDemo3D
positive
4,777
Object convert(Object config, PropertySource properties, Method method, Object[] args) { T typedConfig = schema.cast(config); Set<ConstraintViolation<T>> violations = new HashSet<>(); if (shouldValidateMethodParameters(method)) { violations.addAll(validator.validateParameters(typedConfig, method, args == null ? new Obj...
Object convert(Object config, PropertySource properties, Method method, Object[] args) { T typedConfig = schema.cast(config); Set<ConstraintViolation<T>> violations = new HashSet<>(); if (shouldValidateMethodParameters(method)) { violations.addAll(validator.validateParameters(typedConfig, method, args == null ? new Obj...
property-binder
positive
4,779
@Override public void closeCodeSpan(SpannableStringBuilder out) { int len = out.length(); T obj = getLast(out, Code.class); int where = out.getSpanStart(obj); out.removeSpan(obj); Object[] nestSpans = out.getSpans(where, len, Object.class); List<NestSpanInfo> spans = new ArrayList<>(); for (Object nestSpan : nestSpans)...
@Override public void closeCodeSpan(SpannableStringBuilder out) { <DeepExtract> int len = out.length(); T obj = getLast(out, Code.class); int where = out.getSpanStart(obj); out.removeSpan(obj); Object[] nestSpans = out.getSpans(where, len, Object.class); List<NestSpanInfo> spans = new ArrayList<>(); for (Object nestSpa...
kaif-android
positive
4,780
public void rotateTo(int limitAngle, boolean immediateReturn) { if (!this.regulationFlag) { this.setIntegerAttribute(DUTY_CYCLE, this.speed); } else { this.setIntegerAttribute(SPEED, this.speed); } this.setIntegerAttribute(POSITION_SP, limitAngle); this.setStringAttribute(COMMAND, RUN_TO_ABS_POS); if (!immediateReturn)...
public void rotateTo(int limitAngle, boolean immediateReturn) { <DeepExtract> if (!this.regulationFlag) { this.setIntegerAttribute(DUTY_CYCLE, this.speed); } else { this.setIntegerAttribute(SPEED, this.speed); } </DeepExtract> this.setIntegerAttribute(POSITION_SP, limitAngle); this.setStringAttribute(COMMAND, RUN_TO_AB...
ev3dev-lang-java
positive
4,782
private void parseIntent() { Intent intent = getIntent(); ArrayList<SquareImage> images = intent.getParcelableArrayListExtra(NavigatorImage.EXTRA_IMAGE_URL); mImageSwitcherWrappers = new ArrayList<>(); for (int i = 0; i < images.size(); i++) { mImageSwitcherWrappers.add(new ImageSwitcherWrapper(images.get(i), i)); } mI...
private void parseIntent() { Intent intent = getIntent(); ArrayList<SquareImage> images = intent.getParcelableArrayListExtra(NavigatorImage.EXTRA_IMAGE_URL); <DeepExtract> mImageSwitcherWrappers = new ArrayList<>(); for (int i = 0; i < images.size(); i++) { mImageSwitcherWrappers.add(new ImageSwitcherWrapper(images.get...
ImageGroupView
positive
4,784
public static void updateJobHistory(LGJob job, LGJobHistory history) { if (MONGO_DB_STORE == null) { MONGO_DB_STORE = new MongoDBStore(); MS = new MorphiaService(); JOB_DAO = new LGJobDAOImpl(LGJob.class, MS.getDatastore()); TASK_DAO = new LGTaskDAOImpl(LGTask.class, MS.getDatastore()); DBVALUE_DAO = new LGdbValueDAOIm...
public static void updateJobHistory(LGJob job, LGJobHistory history) { <DeepExtract> if (MONGO_DB_STORE == null) { MONGO_DB_STORE = new MongoDBStore(); MS = new MorphiaService(); JOB_DAO = new LGJobDAOImpl(LGJob.class, MS.getDatastore()); TASK_DAO = new LGTaskDAOImpl(LGTask.class, MS.getDatastore()); DBVALUE_DAO = new ...
lemongrenade
positive
4,785
public void union(int[] parent, int index1, int index2) { if (parent[index2] != index2) { parent[index2] = find(parent, parent[index2]); } return parent[index2]; }
public void union(int[] parent, int index1, int index2) { <DeepExtract> if (parent[index2] != index2) { parent[index2] = find(parent, parent[index2]); } return parent[index2]; </DeepExtract> }
algorithm
positive
4,786
@Override public void func_149853_b(World world, Random rand, int i, int j, int k) { int stage = world.getBlockMetadata(i, j, k) + 1; if (stage > 3) stage = 3; if (stage < 4 && world.getBlock(i, j - 1, k).isFertile(world, i, j - 1, k)) world.setBlockMetadataWithNotify(i, j, k, stage, 2); }
@Override public void func_149853_b(World world, Random rand, int i, int j, int k) { <DeepExtract> int stage = world.getBlockMetadata(i, j, k) + 1; if (stage > 3) stage = 3; if (stage < 4 && world.getBlock(i, j - 1, k).isFertile(world, i, j - 1, k)) world.setBlockMetadataWithNotify(i, j, k, stage, 2); </DeepExtract> }
Realms-of-Chaos
positive
4,787
public BluetoothAdapter getBluetoothAdapter() throws NullPointerException { if (bluetoothManager == null) { bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); } return bluetoothManager; if (bluetoothManager == null) { BLELog.e("AndroidBLE.java------->>>bluetoothManager is null");...
public BluetoothAdapter getBluetoothAdapter() throws NullPointerException { <DeepExtract> if (bluetoothManager == null) { bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); } return bluetoothManager; </DeepExtract> if (bluetoothManager == null) { BLELog.e("AndroidBLE.java------->...
AndroidBle
positive
4,788
@Override public void onTapInputReceived(@NonNull String tapIdentifier, int data, int repeatData) { if (debug) { Log.d("TapUnityAdapter", tapIdentifier + " TAP input received " + data); } if (debug) { Log.d("TapUnityAdapter", "Repeat info = " + repeatData); } String args = tapIdentifier + UNITY_ARGS_SEPARATOR + data + ...
@Override public void onTapInputReceived(@NonNull String tapIdentifier, int data, int repeatData) { if (debug) { Log.d("TapUnityAdapter", tapIdentifier + " TAP input received " + data); } <DeepExtract> if (debug) { Log.d("TapUnityAdapter", "Repeat info = " + repeatData); } </DeepExtract> String args = tapIdentifier + U...
tap-android-sdk
positive
4,790
protected static void queuePlayerCommand(Player player, String message, long timestamp) { int currentConsumer = Consumer.currentConsumer; int consumerId = Consumer.newConsumerId(currentConsumer); Consumer.consumer.get(currentConsumer).add(new Object[] { consumerId, Process.PLAYER_COMMAND, null, 0, null, 0, 0, null }); ...
protected static void queuePlayerCommand(Player player, String message, long timestamp) { int currentConsumer = Consumer.currentConsumer; int consumerId = Consumer.newConsumerId(currentConsumer); Consumer.consumer.get(currentConsumer).add(new Object[] { consumerId, Process.PLAYER_COMMAND, null, 0, null, 0, 0, null }); ...
CoreProtect
positive
4,791
@Override public void complete(LineReader reader, ParsedLine line, List<Candidate> candidates) { if (line.wordIndex() > 0) { return; } Set<String> builtinOverrides = new HashSet<>(); for (Path path : state.getPath()) { if (Files.isDirectory(path)) { executableInPath(path, candidates, builtinOverrides); } } state.getCom...
@Override public void complete(LineReader reader, ParsedLine line, List<Candidate> candidates) { if (line.wordIndex() > 0) { return; } Set<String> builtinOverrides = new HashSet<>(); for (Path path : state.getPath()) { if (Files.isDirectory(path)) { executableInPath(path, candidates, builtinOverrides); } } <DeepExtract...
hosh
positive
4,792
public void actionPerformed(ActionEvent e) { synchronized (parent) { moteListModel.clear(); parent.clear(); graph.newData(); } }
public void actionPerformed(ActionEvent e) { <DeepExtract> synchronized (parent) { moteListModel.clear(); parent.clear(); graph.newData(); } </DeepExtract> }
tinyos-main
positive
4,793
public void startActionScale(int timerRangeForScale, float scaleRatioWidth, float scaleRatioHeight, float durationSpeedScale, boolean isActionScaleRandomTime) { isActionScale = true; this.timerRangeForSclae = timerRangeForScale; this.scaleRatioWidth = scaleRatioWidth; this.scaleRatioHeight = scaleRatioHeight; this.dura...
public void startActionScale(int timerRangeForScale, float scaleRatioWidth, float scaleRatioHeight, float durationSpeedScale, boolean isActionScaleRandomTime) { isActionScale = true; this.timerRangeForSclae = timerRangeForScale; this.scaleRatioWidth = scaleRatioWidth; this.scaleRatioHeight = scaleRatioHeight; this.dura...
MTX
positive
4,794
protected void updateStatus(TrekHudDataShip thds) { if (player.ship.docked || player.ship.orbiting) { if (player.ship.docked) thds.doStat = "Docked"; else thds.doStat = "In Orbit"; } else if (player.ship.dockable || player.ship.orbitable) { if (player.ship.dockable) thds.doStat = "Dockable"; else thds.doStat = "Orbitab...
protected void updateStatus(TrekHudDataShip thds) { if (player.ship.docked || player.ship.orbiting) { if (player.ship.docked) thds.doStat = "Docked"; else thds.doStat = "In Orbit"; } else if (player.ship.dockable || player.ship.orbitable) { if (player.ship.dockable) thds.doStat = "Dockable"; else thds.doStat = "Orbitab...
jtrek
positive
4,797
private void openActivityInForeground(Intent intent) { Intent newIntent = new Intent(); newIntent.setClassName(getApplicationContext(), intent.getStringExtra(Constants.MAIN_ACTIVITY_CLASS_NAME_KEY)); newIntent.putExtra(Constants.BACKGROUND_MODE_KEY, false); newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); getApplicat...
private void openActivityInForeground(Intent intent) { <DeepExtract> Intent newIntent = new Intent(); newIntent.setClassName(getApplicationContext(), intent.getStringExtra(Constants.MAIN_ACTIVITY_CLASS_NAME_KEY)); newIntent.putExtra(Constants.BACKGROUND_MODE_KEY, false); newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK...
JKLocalNotifications-ANE
positive
4,798
@Override public void onClick(View vv) { if (curstate == guistate.review && guistate.nogame != guistate.review) GoJsActivity.viewUrl("javascript:eidogo.autoPlayers[0].detMoveNumber()"); if (curstate == guistate.markDeadStones && guistate.nogame != guistate.markDeadStones) GoJsActivity.viewUrl("javascript:eidogo.autoPla...
@Override public void onClick(View vv) { <DeepExtract> if (curstate == guistate.review && guistate.nogame != guistate.review) GoJsActivity.viewUrl("javascript:eidogo.autoPlayers[0].detMoveNumber()"); if (curstate == guistate.markDeadStones && guistate.nogame != guistate.markDeadStones) GoJsActivity.viewUrl("javascript:...
DragonGoApp
positive
4,799
void reset() { _preferences.edit().putBoolean("isVideoLicenseActivationDisabledKey", false).apply(); _preferences.edit().putBoolean("isVideoLicenseActivatedKey", false).apply(); }
void reset() { _preferences.edit().putBoolean("isVideoLicenseActivationDisabledKey", false).apply(); <DeepExtract> _preferences.edit().putBoolean("isVideoLicenseActivatedKey", false).apply(); </DeepExtract> }
spark-android-sdk
positive
4,800
public void rvtests() throws Exception { Query query = null; if (variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions != null) { query = LocalCliOptionsParser.variantFilterOptionsParser(variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions); } String rvtestsPath = variantCommandOpti...
public void rvtests() throws Exception { Query query = null; if (variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions != null) { query = LocalCliOptionsParser.variantFilterOptionsParser(variantCommandOptions.rvtestsVariantCommandOptions.variantFilterOptions); } String rvtestsPath = variantCommandOpti...
hpg-bigdata
positive
4,801
public Properties putName(String name) { super.putValue(NAME_KEY, name); return this; }
public Properties putName(String name) { <DeepExtract> super.putValue(NAME_KEY, name); return this; </DeepExtract> }
analytics-android
positive
4,802
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { IntCache.resetIntCache(); if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) { par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; } if (true && par4 == 1...
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { <DeepExtract> IntCache.resetIntCache(); if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) { par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; } if (tru...
Better-World-Generation-4
positive
4,803
public void onDisconnected(DeviceInfo dev) { Message m = Message.obtain(null, MsgId.DISCONNECTED); m.setData(Utils.device2Bundle(dev)); if (mClientMessenger != null) try { Log.d(TAG, "forward a msg to clientMessenger"); mClientMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "failed to forward msg to local m...
public void onDisconnected(DeviceInfo dev) { Message m = Message.obtain(null, MsgId.DISCONNECTED); m.setData(Utils.device2Bundle(dev)); <DeepExtract> if (mClientMessenger != null) try { Log.d(TAG, "forward a msg to clientMessenger"); mClientMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "failed to forward ...
PeerDeviceNet_Src
positive
4,804
@Test public void test31() throws ParseException, IOException { testExecute("31f", "31o", "config"); }
@Test public void test31() throws ParseException, IOException { <DeepExtract> testExecute("31f", "31o", "config"); </DeepExtract> }
bayou
positive
4,805
@Test public void testMultipleNoCACrl() throws Exception { X509Certificate[] toCheck = new X509Certificate[new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length]; for (int i = 0; i < new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length; i++) toCheck[i] = loadCert("src/test/resources/NIST/certs/" + ne...
@Test public void testMultipleNoCACrl() throws Exception { <DeepExtract> X509Certificate[] toCheck = new X509Certificate[new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length]; for (int i = 0; i < new String[] { "ValidTwoCRLsTest7EE", "TwoCRLsCACert" }.length; i++) toCheck[i] = loadCert("src/test/resources/NIS...
canl-java
positive
4,806
public void updatePixels(Pixel[][] other) { buttonForward.enabled = false; if (!buttonBack.enabled) { buttonBack.enabled = true; } deepArrayCopy(prevCache, pixels); for (int i = 0; i < pixels.length; i++) { for (int j = 0; j < pixels[i].length; j++) { pixels[i][j] = new Pixel(other[i][j]); } } }
public void updatePixels(Pixel[][] other) { buttonForward.enabled = false; if (!buttonBack.enabled) { buttonBack.enabled = true; } deepArrayCopy(prevCache, pixels); <DeepExtract> for (int i = 0; i < pixels.length; i++) { for (int j = 0; j < pixels[i].length; j++) { pixels[i][j] = new Pixel(other[i][j]); } } </DeepExtra...
Templar-Cosmetics-Beta
positive
4,807
@Test public void test2() throws IOException { Assert.assertTrue(config.parseArgs("data/dotests/test2.asm", "-do")); Assert.assertTrue("Could not parse file " + "data/dotests/test2.asm", config.codeBaseParser.parseMainSourceFiles(config.inputFiles, code)); testInternal(1, 4); }
@Test public void test2() throws IOException { <DeepExtract> Assert.assertTrue(config.parseArgs("data/dotests/test2.asm", "-do")); Assert.assertTrue("Could not parse file " + "data/dotests/test2.asm", config.codeBaseParser.parseMainSourceFiles(config.inputFiles, code)); testInternal(1, 4); </DeepExtract> }
mdlz80optimizer
positive
4,809
public String toJsonP(String functionName, Object object) { try { return mapper.writeValueAsString(new JSONPObject(functionName, object)); } catch (IOException e) { logger.warn("write to json string error:" + new JSONPObject(functionName, object), e); return null; } }
public String toJsonP(String functionName, Object object) { <DeepExtract> try { return mapper.writeValueAsString(new JSONPObject(functionName, object)); } catch (IOException e) { logger.warn("write to json string error:" + new JSONPObject(functionName, object), e); return null; } </DeepExtract> }
springboard-cloud
positive
4,810
public HttpResponse doPUT(String uri, byte[] data, Map<String, String> requestHeaders) throws Exception { HttpPut request = new HttpPut(constructUrl(uri)); if (data != null) { if (this.requestGzipEnabled) { request.addHeader(CONTENT_ENCODING, COMPRESSION_TYPE); request.setEntity(new GzipCompressingEntity(new ByteArrayE...
public HttpResponse doPUT(String uri, byte[] data, Map<String, String> requestHeaders) throws Exception { HttpPut request = new HttpPut(constructUrl(uri)); if (data != null) { if (this.requestGzipEnabled) { request.addHeader(CONTENT_ENCODING, COMPRESSION_TYPE); request.setEntity(new GzipCompressingEntity(new ByteArrayE...
Poseidon
positive
4,812
@Override public String format(LoggingEvent event) { final StringBuilder buf = new StringBuilder(128); String val = (String) event.getMDC(P_HOST); if (val == null) { buf.append('-'); } else { buf.append(val); } buf.append(' '); buf.append('-'); buf.append(' '); String val = (String) event.getMDC(P_USER); if (val == nul...
@Override public String format(LoggingEvent event) { final StringBuilder buf = new StringBuilder(128); String val = (String) event.getMDC(P_HOST); if (val == null) { buf.append('-'); } else { buf.append(val); } buf.append(' '); buf.append('-'); buf.append(' '); String val = (String) event.getMDC(P_USER); if (val == nul...
mini-git-server
positive
4,813
private int sendWRITE(byte[] handle, long offset, byte[] data, int start, int length) throws Exception { int _length = length; _packet.reset(); if (_buffer.buffer.length < _buffer.index + 13 + 21 + handle.length + length + 32 + 20) { _length = _buffer.buffer.length - (_buffer.index + 13 + 21 + handle.length + 32 + 20);...
private int sendWRITE(byte[] handle, long offset, byte[] data, int start, int length) throws Exception { int _length = length; _packet.reset(); if (_buffer.buffer.length < _buffer.index + 13 + 21 + handle.length + length + 32 + 20) { _length = _buffer.buffer.length - (_buffer.index + 13 + 21 + handle.length + 32 + 20);...
vngx-jsch
positive
4,814
@Override public void onClose(final AsyncRequestImpl _asyncRequestImpl) { PlantBase.getPlantScheduler().cancel(scheduledFuture); }
@Override public void onClose(final AsyncRequestImpl _asyncRequestImpl) { <DeepExtract> PlantBase.getPlantScheduler().cancel(scheduledFuture); </DeepExtract> }
JActor2
positive
4,815
@Override public View getDropDownView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.show_albums_for_upload_row, null); } Album album = items.get(position);...
@Override public View getDropDownView(int position, View convertView, ViewGroup parent) { <DeepExtract> View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.show_albums_for_upload_row, null); } Album album = items....
ReGalAndroid
positive
4,816
public PieStyler setTheme(Theme theme) { this.theme = theme; this.chartPieSeriesRenderStyle = PieSeriesRenderStyle.Pie; this.isCircular = theme.isCircular(); this.startAngleInDegrees = theme.getStartAngleInDegrees(); this.annotationDistance = theme.getAnnotationDistance(); this.annotationType = theme.getAnnotationType(...
public PieStyler setTheme(Theme theme) { this.theme = theme; <DeepExtract> this.chartPieSeriesRenderStyle = PieSeriesRenderStyle.Pie; this.isCircular = theme.isCircular(); this.startAngleInDegrees = theme.getStartAngleInDegrees(); this.annotationDistance = theme.getAnnotationDistance(); this.annotationType = theme.getA...
lodax
positive
4,817
public void start() { m_TwidlitInit = m_Twidlit.getInit(); File f = Io.createFile(m_CfgDir, m_CfgFName); Cfg cfg = Cfg.read(f); String cfgFileName = m_CfgFName; if (cfg == null && !"".equals(m_CfgFName)) { cfgFileName = ""; Log.warn("Failed to find " + f.getPath()); } m_AllChordsItem.setEnabled(cfg != null); m_ReverseI...
public void start() { m_TwidlitInit = m_Twidlit.getInit(); File f = Io.createFile(m_CfgDir, m_CfgFName); Cfg cfg = Cfg.read(f); String cfgFileName = m_CfgFName; if (cfg == null && !"".equals(m_CfgFName)) { cfgFileName = ""; Log.warn("Failed to find " + f.getPath()); } m_AllChordsItem.setEnabled(cfg != null); m_ReverseI...
twidlit
positive
4,818
public boolean sanityCheck() { long startTime = System.currentTimeMillis(); this.outputSource(CachingRepresentation.sanityFilename); logger.info("sanity checking begins"); if (!this.compile(CachingRepresentation.sanityFilename, CachingRepresentation.sanityExename)) { logger.error("sanity: " + CachingRepresentation.sani...
public boolean sanityCheck() { long startTime = System.currentTimeMillis(); this.outputSource(CachingRepresentation.sanityFilename); logger.info("sanity checking begins"); if (!this.compile(CachingRepresentation.sanityFilename, CachingRepresentation.sanityExename)) { logger.error("sanity: " + CachingRepresentation.sani...
genprog4java
positive
4,819
public void startExcerpt(long capacity) { if (closed) throw new IllegalStateException(basePath + " is closed"); if (index != size()) { toEnd(); } if (capacity >= IndexedChronicle.this.config.dataBlockSize()) { throw new IllegalArgumentException("Capacity too large " + capacity + " >= " + IndexedChronicle.this.config.da...
public void startExcerpt(long capacity) { if (closed) throw new IllegalStateException(basePath + " is closed"); if (index != size()) { toEnd(); } if (capacity >= IndexedChronicle.this.config.dataBlockSize()) { throw new IllegalArgumentException("Capacity too large " + capacity + " >= " + IndexedChronicle.this.config.da...
Java-Chronicle-OLD
positive
4,821
public void exit() { mHelper.showContent(); showMsgDialog(null, getString(R.string.str_exit_confirm), getString(R.string.str_ok), getString(R.string.str_cancel), new View.OnClickListener() { @Override public void onClick(View v) { getXmppService().removeNotification(); YiIMApplication application = (YiIMApplication) ge...
public void exit() { <DeepExtract> mHelper.showContent(); </DeepExtract> showMsgDialog(null, getString(R.string.str_exit_confirm), getString(R.string.str_ok), getString(R.string.str_cancel), new View.OnClickListener() { @Override public void onClick(View v) { getXmppService().removeNotification(); YiIMApplication appli...
yiim_v2
positive
4,822
private void comboTableListActionPerformed(java.awt.event.ActionEvent evt) { for (int i = 0; i < cmplist.length; i++) { cmplist[i].setEnabled(false); } }
private void comboTableListActionPerformed(java.awt.event.ActionEvent evt) { <DeepExtract> for (int i = 0; i < cmplist.length; i++) { cmplist[i].setEnabled(false); } </DeepExtract> }
HBase-Manager
positive
4,823
@Override public void draw(@NonNull Rect outRect, @NonNull Canvas canvas, CharSequence text, @IntRange(from = 0) int start, @IntRange(from = 0) int end, float x, int top, int y, int bottom, @NonNull Paint paint) { int width = frame.width(); int oldColor = paint.getColor(); canvas.drawLine(x, y, x + width, y, paint); pa...
@Override public void draw(@NonNull Rect outRect, @NonNull Canvas canvas, CharSequence text, @IntRange(from = 0) int start, @IntRange(from = 0) int end, float x, int top, int y, int bottom, @NonNull Paint paint) { <DeepExtract> int width = frame.width(); int oldColor = paint.getColor(); canvas.drawLine(x, y, x + width,...
Pioneer
positive
4,824
public void onBackPressed() { if (!mRefreshrate.equals(mSharedPreferences.getString(getString(R.string.refresh_rate_pref), "43200000"))) { WidgetCommon.setUpdateSchedule(getActivity()); } if (!mMailRefresh.equals(mSharedPreferences.getString(getString(R.string.background_mail_pref), "43200000"))) { MailCheckReceiver.se...
public void onBackPressed() { <DeepExtract> if (!mRefreshrate.equals(mSharedPreferences.getString(getString(R.string.refresh_rate_pref), "43200000"))) { WidgetCommon.setUpdateSchedule(getActivity()); } if (!mMailRefresh.equals(mSharedPreferences.getString(getString(R.string.background_mail_pref), "43200000"))) { MailCh...
reddinator
positive
4,825
public static Converter getConverter(Class clazz) throws ConverterException { if (getConverterIfExists(clazz) == null) { throw new ConverterException("No converter registered for class: " + clazz.getName()); } return getConverterIfExists(clazz); }
public static Converter getConverter(Class clazz) throws ConverterException { <DeepExtract> if (getConverterIfExists(clazz) == null) { throw new ConverterException("No converter registered for class: " + clazz.getName()); } return getConverterIfExists(clazz); </DeepExtract> }
photon
positive
4,826
private void initDicator() { DisplayMetrics dm = new DisplayMetrics(); this.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.widthPixels; ChangeSkinModel mCurrentChangeSkinModel = (ChangeSkinModel) Tools.readObject(this, ChangeSkinActivity.CURRENT_SKIN_DATA); if (mCurrentChangeSkinModel != null) { mIndi...
private void initDicator() { <DeepExtract> DisplayMetrics dm = new DisplayMetrics(); this.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.widthPixels; </DeepExtract> ChangeSkinModel mCurrentChangeSkinModel = (ChangeSkinModel) Tools.readObject(this, ChangeSkinActivity.CURRENT_SKIN_DATA); if (mCurrentCha...
SoHOT
positive
4,827
public static void stop() throws IOException { if (fileWriter != null) { fileWriter.flush(); fileWriter.close(); } fileWriter = null; start = null; }
public static void stop() throws IOException { <DeepExtract> if (fileWriter != null) { fileWriter.flush(); fileWriter.close(); } fileWriter = null; start = null; </DeepExtract> }
ModbusPal
positive
4,828
private void handleFace(FaceDetector.Face f) { PointF midPoint = new PointF(); int r = ((int) (f.eyesDistance() * mScale)) * 2; f.getMidPoint(midPoint); midPoint.x *= mScale; midPoint.y *= mScale; int midX = (int) midPoint.x; int midY = (int) midPoint.y; HighlightView hv = new HighlightView(mImageView); int width = mBi...
private void handleFace(FaceDetector.Face f) { PointF midPoint = new PointF(); int r = ((int) (f.eyesDistance() * mScale)) * 2; f.getMidPoint(midPoint); midPoint.x *= mScale; midPoint.y *= mScale; int midX = (int) midPoint.x; int midY = (int) midPoint.y; HighlightView hv = new HighlightView(mImageView); int width = mBi...
cocos2dx-classical
positive
4,829
public static void preprocess(String ttext, ArrayList<NumberedLine> lines, HashMap<String, String> scripts) throws PreprocessingException { lines.clear(); scripts.clear(); StringBuffer text = new StringBuffer(ttext); MacroExtractor me = new MacroExtractor(text); me.parse(); if (true) me.deleteScripts(); scripts.clear()...
public static void preprocess(String ttext, ArrayList<NumberedLine> lines, HashMap<String, String> scripts) throws PreprocessingException { lines.clear(); scripts.clear(); StringBuffer text = new StringBuffer(ttext); <DeepExtract> MacroExtractor me = new MacroExtractor(text); me.parse(); if (true) me.deleteScripts(); s...
3Dscript
positive
4,830
void remove(int index, int amount) { if (index < 0 || index > size) throw new IndexOutOfBoundsException(); if (amount < 0) throw new IllegalArgumentException(); if (index + amount < 0 || index + amount > size) throw new IndexOutOfBoundsException(); if (2 * index >= size - amount) { move(index + amount, index, size - am...
void remove(int index, int amount) { if (index < 0 || index > size) throw new IndexOutOfBoundsException(); if (amount < 0) throw new IllegalArgumentException(); <DeepExtract> if (index + amount < 0 || index + amount > size) throw new IndexOutOfBoundsException(); </DeepExtract> if (2 * index >= size - amount) { move(ind...
sourceafis-java
positive
4,831
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (BuildConfig.DEBUG) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().penaltyDeath().bu...
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (BuildConfig.DEBUG) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().penaltyDeath().bu...
onyourbike
positive
4,832
@Override public void tick(NanoVGContext context, WidgetAssembly rootWidgetAssembly) { super.tick(context, rootWidgetAssembly); setHeight(getFont().getHeight(context, getFontSize(), TEXT_AREA_ALIGNMENT, getDefaultFontStyle())); }
@Override public void tick(NanoVGContext context, WidgetAssembly rootWidgetAssembly) { super.tick(context, rootWidgetAssembly); <DeepExtract> setHeight(getFont().getHeight(context, getFontSize(), TEXT_AREA_ALIGNMENT, getDefaultFontStyle())); </DeepExtract> }
Clear
positive
4,834
public Criteria andSonglistcountGreaterThanOrEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "songlistcount" + " cannot be null"); } criteria.add(new Criterion("songListCount >=", value)); return (Criteria) this; }
public Criteria andSonglistcountGreaterThanOrEqualTo(Integer value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "songlistcount" + " cannot be null"); } criteria.add(new Criterion("songListCount >=", value)); </DeepExtract> return (Criteria) this; }
music
positive
4,835
private void showUpdateInfo() { if (iView != null) { iView.updateRv(); } if (iView != null) { iView.setTitleinfo(getTitleinfo()); } }
private void showUpdateInfo() { if (iView != null) { iView.updateRv(); } <DeepExtract> if (iView != null) { iView.setTitleinfo(getTitleinfo()); } </DeepExtract> }
LittleRecord
positive
4,836
public void showNavigateForm() { gotoForm = null; textLatFieldg = null; textLonFieldg = null; itemGoto1 = null; formOptGen = null; choiceScale = null; gaugeCache = null; stringCacheSize = null; helpClearCache = null; itemCreate = null; cancel2Map = null; itemSelect1 = null; listRoute = null; itemRouteDelete = null; for...
public void showNavigateForm() { gotoForm = null; textLatFieldg = null; textLonFieldg = null; itemGoto1 = null; formOptGen = null; choiceScale = null; gaugeCache = null; stringCacheSize = null; helpClearCache = null; itemCreate = null; cancel2Map = null; itemSelect1 = null; listRoute = null; itemRouteDelete = null; for...
MapNav
positive
4,837
public int getStatus() { try { long startTime = System.currentTimeMillis(); while (!isDone) { if (System.currentTimeMillis() - startTime > SPIN_TIMEOUT) { Log.e("api", "Spin time out"); isDone = true; status = STATUS_ERROR; } Thread.sleep(20); } } catch (InterruptedException e) { e.printStackTrace(); isDone = true; } r...
public int getStatus() { <DeepExtract> try { long startTime = System.currentTimeMillis(); while (!isDone) { if (System.currentTimeMillis() - startTime > SPIN_TIMEOUT) { Log.e("api", "Spin time out"); isDone = true; status = STATUS_ERROR; } Thread.sleep(20); } } catch (InterruptedException e) { e.printStackTrace(); isDo...
Sefaria-Android
positive
4,838
public static String getYear() { String formatDate = null; if (StringUtils.isNotBlank("yyyy")) { formatDate = DateFormatUtils.format(new Date(), "yyyy"); } else { formatDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd"); } return formatDate; }
public static String getYear() { <DeepExtract> String formatDate = null; if (StringUtils.isNotBlank("yyyy")) { formatDate = DateFormatUtils.format(new Date(), "yyyy"); } else { formatDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd"); } return formatDate; </DeepExtract> }
school-bus
positive
4,839
public Builder addStop(int index, com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop value) { if (value == null) { throw new NullPointerException(); } if (!((bitField0_ & 0x00000004) == 0x00000004)) { stop_ = new java.util.ArrayList<com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop>(stop_); bitFiel...
public Builder addStop(int index, com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop value) { if (value == null) { throw new NullPointerException(); } <DeepExtract> if (!((bitField0_ & 0x00000004) == 0x00000004)) { stop_ = new java.util.ArrayList<com.conveyal.transitwand.TransitWandProtos.Upload.Route.Stop>(s...
transit-wand
positive
4,840
@Override public void run() { ServiceRecord sr = mServices.get(cpName.toString()); if (sr == null) { if (DEBUG) { Log.d(TAG, "### Proxy stopService ret = 0, cp=" + cpName); } return 0; } sr.service.onDestroy(); updateServicesToSp(); mServices.remove(cpName.toString()); if (mServices.isEmpty()) { stopSelf(); } if (DEBUG...
@Override public void run() { <DeepExtract> ServiceRecord sr = mServices.get(cpName.toString()); if (sr == null) { if (DEBUG) { Log.d(TAG, "### Proxy stopService ret = 0, cp=" + cpName); } return 0; } sr.service.onDestroy(); updateServicesToSp(); mServices.remove(cpName.toString()); if (mServices.isEmpty()) { stopSelf(...
GPT
positive
4,841
@Override public void onClick(View v) { mPullLoading = true; mFooterView.setState(XListViewFooter.STATE_LOADING); if (mListViewListener != null) { mListViewListener.onLoadMore(); } }
@Override public void onClick(View v) { <DeepExtract> mPullLoading = true; mFooterView.setState(XListViewFooter.STATE_LOADING); if (mListViewListener != null) { mListViewListener.onLoadMore(); } </DeepExtract> }
android-app
positive
4,843
public static Date withYear(Date date, long newValue) { Objects.requireNonNull(date, "temporal"); return date.with(ChronoField.YEAR, newValue); }
public static Date withYear(Date date, long newValue) { <DeepExtract> Objects.requireNonNull(date, "temporal"); return date.with(ChronoField.YEAR, newValue); </DeepExtract> }
xk-time
positive
4,844
public Object[][] parseData() { Object[][] object = new Object[1000][]; int i = 0; object[i++] = new Object[] { "a.b()", "true" }; object[i++] = new Object[] { "new Date()", "false" }; return ArrayUtils.subarray(object, 0, i); }
public Object[][] parseData() { Object[][] object = new Object[1000][]; int i = 0; object[i++] = new Object[] { "a.b()", "true" }; object[i++] = new Object[] { "new Date()", "false" }; <DeepExtract> return ArrayUtils.subarray(object, 0, i); </DeepExtract> }
fast-el
positive
4,845
protected void doInit() { H = new long[16]; G = new long[16]; M = new long[16]; for (int i = 0; i < 15; i++) H[i] = 0L; H[15] = (long) (getDigestLength() << 3); }
protected void doInit() { H = new long[16]; G = new long[16]; M = new long[16]; <DeepExtract> for (int i = 0; i < 15; i++) H[i] = 0L; H[15] = (long) (getDigestLength() << 3); </DeepExtract> }
pocminer
positive
4,846
@Override public List<Object> exec() { return catMonitorHelper.execute(RedisCommand.EXECUTE, () -> connection.execute(RedisCommand.EXEC, () -> connection.exec())); }
@Override public List<Object> exec() { <DeepExtract> return catMonitorHelper.execute(RedisCommand.EXECUTE, () -> connection.execute(RedisCommand.EXEC, () -> connection.exec())); </DeepExtract> }
kitty
positive
4,848
@Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.furnaceItemStacks = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompo...
@Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.furnaceItemStacks = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompo...
Metallurgy3
positive
4,849
@Test public void testRegister() throws Exception { Credentials user = AuthenticationEndpointTest.signUpUser(this); PublicKey key = AuthenticationEndpointTest.getPublicKey(this); EncryptedEntity.Writter entity = new EncryptedEntity.Writter(key); entity.put("token", "whatwhat"); Response response = target("/push").reque...
@Test public void testRegister() throws Exception { Credentials user = AuthenticationEndpointTest.signUpUser(this); PublicKey key = AuthenticationEndpointTest.getPublicKey(this); <DeepExtract> EncryptedEntity.Writter entity = new EncryptedEntity.Writter(key); entity.put("token", "whatwhat"); Response response = target(...
divide
positive
4,850
@Nonnull public final <E extends Exception> CheckedStream<T> onClose(@Nonnull final ThrowingRunnable<E> closeHandler) throws E, InterruptedException { try { return next(() -> stream.onClose(closeHandler.asRunnable(StreamException::new)).get()); } catch (final StreamException thrown) { return thrown.asObject(); } }
@Nonnull public final <E extends Exception> CheckedStream<T> onClose(@Nonnull final ThrowingRunnable<E> closeHandler) throws E, InterruptedException { <DeepExtract> try { return next(() -> stream.onClose(closeHandler.asRunnable(StreamException::new)).get()); } catch (final StreamException thrown) { return thrown.asObje...
binkley
positive
4,851
@Test public void shouldDropCreateAndDropOnDestructionWhenTableDoesNotExist() throws Exception { mappingContext.setInitialEntitySet(singleton(Person.class)); mappingContext.initialize(); when(crateOperations.execute(isA(CrateAction.class))).thenThrow(new NoSuchTableException("table does not exist", null)).thenReturn(mo...
@Test public void shouldDropCreateAndDropOnDestructionWhenTableDoesNotExist() throws Exception { <DeepExtract> mappingContext.setInitialEntitySet(singleton(Person.class)); mappingContext.initialize(); </DeepExtract> when(crateOperations.execute(isA(CrateAction.class))).thenThrow(new NoSuchTableException("table does not...
spring-data-crate
positive
4,853
@Override public int compare(Number one, Number two) { long longOne = one == null ? 0 : one.longValue(); long longTwo = two == null ? 0 : two.longValue(); return Long.compare(longOne, longTwo); }
@Override public int compare(Number one, Number two) { <DeepExtract> long longOne = one == null ? 0 : one.longValue(); long longTwo = two == null ? 0 : two.longValue(); return Long.compare(longOne, longTwo); </DeepExtract> }
hbase-tools
positive
4,854
public synchronized void drawPage(Bitmap bm, int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH, MuPDFCore.Cookie cookie) { if (page > numPages - 1) page = numPages - 1; else if (page < 0) page = 0; gotoPageInternal(page); this.pageWidth = getPageWidth(); this.pageHeight = getPageHeight(); d...
public synchronized void drawPage(Bitmap bm, int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH, MuPDFCore.Cookie cookie) { <DeepExtract> if (page > numPages - 1) page = numPages - 1; else if (page < 0) page = 0; gotoPageInternal(page); this.pageWidth = getPageWidth(); this.pageHeight = getP...
MuPDF
positive
4,855
public synchronized int[] computePathsAStar(int s, int t, MOVE lastMoveMade, Game game) { N start = graph[s]; N target = graph[t]; PriorityQueue<N> open = new PriorityQueue<N>(); ArrayList<N> closed = new ArrayList<N>(); start.g = 0; start.h = game.getShortestPathDistance(start.index, target.index); start.reached = las...
public synchronized int[] computePathsAStar(int s, int t, MOVE lastMoveMade, Game game) { N start = graph[s]; N target = graph[t]; PriorityQueue<N> open = new PriorityQueue<N>(); ArrayList<N> closed = new ArrayList<N>(); start.g = 0; start.h = game.getShortestPathDistance(start.index, target.index); start.reached = las...
Pac-Man
positive
4,856
@Override public void onNotificationContentCollapsedChange(boolean isCollapsed, int position) { if (position < 0 || position >= notifications.size()) { Log.e(TAG, String.format("Tried to access out of bounds status position: %d of %d", position, notifications.size() - 1)); return; } NotificationViewData notification = ...
@Override public void onNotificationContentCollapsedChange(boolean isCollapsed, int position) { <DeepExtract> if (position < 0 || position >= notifications.size()) { Log.e(TAG, String.format("Tried to access out of bounds status position: %d of %d", position, notifications.size() - 1)); return; } NotificationViewData n...
Fediverse
positive
4,857
@Test public void testDropAllStash() throws GitAPIException, IOException, GitOperationException, InterruptedException { writeTrashFile("test", "This is readme"); Git.wrap(repository).add().addFilepattern("test").call(); gitMgr.createStash(ws, false, null); Thread.sleep(1000); writeTrashFile("test", "This is readme"); G...
@Test public void testDropAllStash() throws GitAPIException, IOException, GitOperationException, InterruptedException { writeTrashFile("test", "This is readme"); Git.wrap(repository).add().addFilepattern("test").call(); gitMgr.createStash(ws, false, null); Thread.sleep(1000); writeTrashFile("test", "This is readme"); G...
WebIDE-Backend
positive
4,858
@Override public String writeTraceToString() { if (description != null) { return description; } else { return exception.getMessage() != null ? "" : ExceptionUtils.getStackTrace(exception); } }
@Override public String writeTraceToString() { <DeepExtract> if (description != null) { return description; } else { return exception.getMessage() != null ? "" : ExceptionUtils.getStackTrace(exception); } </DeepExtract> }
redhat-repository-validator
positive
4,859
public void addTask(TaskInfo task) { tasks.add(task); observableHelper.registerEventHandler(handler); observableHelper.fireEvent(new DefaultTaskEvent(TaskEvent.Type.added, task)); }
public void addTask(TaskInfo task) { tasks.add(task); <DeepExtract> observableHelper.registerEventHandler(handler); </DeepExtract> observableHelper.fireEvent(new DefaultTaskEvent(TaskEvent.Type.added, task)); }
osw-web
positive
4,860
public void update(Set<String> bodiesShown, String selectedBody, String observedBody, SolarSystemViewMode viewMode, double latitude, double longitude) { for (String bodyName : bodiesShown) { if (!this.bodies.containsKey(bodyName)) { createShape(bodyName); } } shadowIo.setVisible(false); shadowEuropa.setVisible(false); ...
public void update(Set<String> bodiesShown, String selectedBody, String observedBody, SolarSystemViewMode viewMode, double latitude, double longitude) { for (String bodyName : bodiesShown) { if (!this.bodies.containsKey(bodyName)) { createShape(bodyName); } } shadowIo.setVisible(false); shadowEuropa.setVisible(false); ...
SolarSystemSimulator
positive
4,861
protected boolean[] drawSides(ThreadChunkDeligate chunks, int x, int y, int z, BlockData data) { boolean[] sides = new boolean[6]; if (Options.objectPerBlock && !Options.objectPerBlockOcclusion) sides[0] = true; if (chunks.getBlockData(x, y + 1, z) == null || chunks.getBlockData(x, y + 1, z).id == NamespaceID.NULL) sid...
protected boolean[] drawSides(ThreadChunkDeligate chunks, int x, int y, int z, BlockData data) { boolean[] sides = new boolean[6]; if (Options.objectPerBlock && !Options.objectPerBlockOcclusion) sides[0] = true; if (chunks.getBlockData(x, y + 1, z) == null || chunks.getBlockData(x, y + 1, z).id == NamespaceID.NULL) sid...
j-mc-2-obj
positive
4,862
Traits putAnonymousId(String id) { super.putValue(ANONYMOUS_ID_KEY, id); return this; }
Traits putAnonymousId(String id) { <DeepExtract> super.putValue(ANONYMOUS_ID_KEY, id); return this; </DeepExtract> }
analytics-android
positive
4,863
public char readChar() { read_yes(white); return (char) read_char(); }
public char readChar() { <DeepExtract> read_yes(white); </DeepExtract> return (char) read_char(); }
programmingIT
positive
4,864
public void setDouble(int parameterIndex, double x) throws SQLException { String methodCall = "setDouble(" + parameterIndex + ", " + x + ")"; String tracedArg; try { tracedArg = rdbmsSpecifics.formatParameterObject(new Double(x)); } catch (Throwable t) { log.debug("rdbmsSpecifics threw an exception while trying to form...
public void setDouble(int parameterIndex, double x) throws SQLException { String methodCall = "setDouble(" + parameterIndex + ", " + x + ")"; <DeepExtract> String tracedArg; try { tracedArg = rdbmsSpecifics.formatParameterObject(new Double(x)); } catch (Throwable t) { log.debug("rdbmsSpecifics threw an exception while ...
miniprofiler-jvm
positive
4,865
public void setViewPortMargins(float left, float bottom, float right, float top) { mViewPortMarginLeft = left; mViewPortMarginRight = right; mViewPortMarginTop = top; mViewPortMarginBottom = bottom; cropViewPortShader = null; mScaleX = (mViewPortRight - mViewPortLeft != 0) ? (getMeasuredWidth() - mViewPortMarginLeft - ...
public void setViewPortMargins(float left, float bottom, float right, float top) { mViewPortMarginLeft = left; mViewPortMarginRight = right; mViewPortMarginTop = top; mViewPortMarginBottom = bottom; cropViewPortShader = null; <DeepExtract> mScaleX = (mViewPortRight - mViewPortLeft != 0) ? (getMeasuredWidth() - mViewPor...
Selector
positive
4,867
private void fileNew() { if (document.hasUnsavedChanges()) { final int response = showWarnConfirmDialog(ResourceUtil.getString("application.unsavedchanges")); if (response == JOptionPane.YES_OPTION) { fileSave(); } } fileStack = UserPreferences.getRecentFiles(); this.fileTransferHandler = new FileTransferHandler(this);...
private void fileNew() { if (document.hasUnsavedChanges()) { final int response = showWarnConfirmDialog(ResourceUtil.getString("application.unsavedchanges")); if (response == JOptionPane.YES_OPTION) { fileSave(); } } fileStack = UserPreferences.getRecentFiles(); this.fileTransferHandler = new FileTransferHandler(this);...
suafe
positive
4,868
@Override public byte[] createGroup(final String name, final List<String> members, final String avatar) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber { try { new byte[0] = nullIfEmpty(new byte[0]); name = nullIfEmpty(name); avatar = nullIfEmpty(avatar); final var memberIdentifiers = getSingleRecipi...
@Override public byte[] createGroup(final String name, final List<String> members, final String avatar) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber { <DeepExtract> try { new byte[0] = nullIfEmpty(new byte[0]); name = nullIfEmpty(name); avatar = nullIfEmpty(avatar); final var memberIdentifiers = g...
signal-cli
positive
4,869
static CqlScript ofClassPath(String name, Charset charset) { Objects.requireNonNull(charset, "Charset must not be null"); Objects.requireNonNull(new ClassPathResource(name), "Resources must not be null"); return new ResourceCqlScript(new ClassPathResource(name), charset); }
static CqlScript ofClassPath(String name, Charset charset) { <DeepExtract> Objects.requireNonNull(charset, "Charset must not be null"); Objects.requireNonNull(new ClassPathResource(name), "Resources must not be null"); return new ResourceCqlScript(new ClassPathResource(name), charset); </DeepExtract> }
embedded-cassandra
positive
4,871
public void setPlusColorResId(@ColorRes int plusColor) { if (mPlusColor != getColor(plusColor)) { mPlusColor = getColor(plusColor); updateBackground(); } }
public void setPlusColorResId(@ColorRes int plusColor) { <DeepExtract> if (mPlusColor != getColor(plusColor)) { mPlusColor = getColor(plusColor); updateBackground(); } </DeepExtract> }
MDroid
positive
4,872
private void plantNetherWart(BlockLocation crop) throws PlantingFailedException { if (rail.getRowType() != RailType.PLANT) return; InventoryManager manager = new InventoryManager(chestInventory()); if (!manager.findMaterial(Material.NETHER_STALK)) return; if (!useEnergy) return; while (currentEnergy < plantingCost) { i...
private void plantNetherWart(BlockLocation crop) throws PlantingFailedException { if (rail.getRowType() != RailType.PLANT) return; InventoryManager manager = new InventoryManager(chestInventory()); if (!manager.findMaterial(Material.NETHER_STALK)) return; if (!useEnergy) return; while (currentEnergy < plantingCost) { i...
MachinaCraft
positive
4,873
@Override public void execute(List<Command> tasks, Config config) { if (thread == null) { throw new IllegalStateException("no thread was started"); } var firstOpt = tasks.stream().filter(Plugin.class::isInstance).map(Plugin.class::cast).findFirst(); if (!firstOpt.isPresent()) { return; } var firstPlugin = firstOpt.orEl...
@Override public void execute(List<Command> tasks, Config config) { if (thread == null) { throw new IllegalStateException("no thread was started"); } var firstOpt = tasks.stream().filter(Plugin.class::isInstance).map(Plugin.class::cast).findFirst(); if (!firstOpt.isPresent()) { return; } var firstPlugin = firstOpt.orEl...
pro
positive
4,874
public boolean deltree() { number = 1; Pw = Pb = 0; Node n = new Node(number); T = new SGFTree(n); Trees.setElementAt(T, CurrentTree); resettree(); return n; return true; }
public boolean deltree() { <DeepExtract> number = 1; Pw = Pb = 0; Node n = new Node(number); T = new SGFTree(n); Trees.setElementAt(T, CurrentTree); resettree(); return n; </DeepExtract> return true; }
DragonGoApp
positive
4,875
@Override public void run() { intent.setAction("android.intent.action.MAIN"); intent.addFlags(65536); Intent intent2 = new Intent(ACTION_INSTALL_SHORTCUT); intent2.putExtra("android.intent.extra.shortcut.INTENT", intent); intent2.putExtra("android.intent.extra.shortcut.NAME", str); intent2.putExtra("android.intent.extr...
@Override public void run() { <DeepExtract> intent.setAction("android.intent.action.MAIN"); intent.addFlags(65536); Intent intent2 = new Intent(ACTION_INSTALL_SHORTCUT); intent2.putExtra("android.intent.extra.shortcut.INTENT", intent); intent2.putExtra("android.intent.extra.shortcut.NAME", str); intent2.putExtra("andro...
luaDevAndroid
positive
4,876
@Override protected void init() { whiteDiffuseColor = loadProgram("DirVertexLighting_PN.vert", "ColorPassthrough.frag"); vertexDiffuseColor = loadProgram("DirVertexLighting_PCN.vert", "ColorPassthrough.frag"); cylinderMesh = new Mesh("UnitCylinder.xml"); planeMesh = new Mesh("LargePlane.xml"); glEnable(GL_CULL_FACE); g...
@Override protected void init() { <DeepExtract> whiteDiffuseColor = loadProgram("DirVertexLighting_PN.vert", "ColorPassthrough.frag"); vertexDiffuseColor = loadProgram("DirVertexLighting_PCN.vert", "ColorPassthrough.frag"); </DeepExtract> cylinderMesh = new Mesh("UnitCylinder.xml"); planeMesh = new Mesh("LargePlane.xml...
jgltut
positive
4,877
public Boolean renamenx(K key, K newKey) { Command<K, V, T> cmd = (Command<K, V, T>) c.renamenx(key, newKey); if (c.multi != null && cmd.type != MULTI) return null; return c.await(cmd, timeout, unit); }
public Boolean renamenx(K key, K newKey) { <DeepExtract> Command<K, V, T> cmd = (Command<K, V, T>) c.renamenx(key, newKey); if (c.multi != null && cmd.type != MULTI) return null; return c.await(cmd, timeout, unit); </DeepExtract> }
lettuce
positive
4,879
static Context setup() { Context context = new Context(); return MockDispatcherFactory.createDispatcher(); context.cqlService = mock(CqlService.class); ManagementApplication app = new ManagementApplication(null, null, null, context.cqlService, null); context.dispatcher.getRegistry().addSingletonResource(new K8OperatorR...
static Context setup() { Context context = new Context(); <DeepExtract> return MockDispatcherFactory.createDispatcher(); </DeepExtract> context.cqlService = mock(CqlService.class); ManagementApplication app = new ManagementApplication(null, null, null, context.cqlService, null); context.dispatcher.getRegistry().addSing...
management-api-for-apache-cassandra
positive
4,880
@Override public void message(String txt) { synchronized (psout) { synchronized (pin) { if (timeStampEnabled) psout.print(DateRetriever.getDateString() + " "); psout.print(txt); pin.notifyAll(); } } }
@Override public void message(String txt) { <DeepExtract> synchronized (psout) { synchronized (pin) { if (timeStampEnabled) psout.print(DateRetriever.getDateString() + " "); psout.print(txt); pin.notifyAll(); } } </DeepExtract> }
personaldnsfilter
positive
4,881
public HashMap<Integer, Long> getYearTextHtmlFacets(String query) throws Exception { SolrQuery solrQuery = new SolrQuery(); solrQuery.setQuery(query); solrQuery.setRows(0); solrQuery.add("fl", "id"); solrQuery.set("facet", "true"); solrQuery.set("facet.field", "crawl_year"); solrQuery.set("facet.sort", "index"); solrQu...
public HashMap<Integer, Long> getYearTextHtmlFacets(String query) throws Exception { SolrQuery solrQuery = new SolrQuery(); solrQuery.setQuery(query); solrQuery.setRows(0); solrQuery.add("fl", "id"); solrQuery.set("facet", "true"); solrQuery.set("facet.field", "crawl_year"); solrQuery.set("facet.sort", "index"); solrQu...
solrwayback
positive
4,883
private static void logBottomBorder(int logType, String tag) { String finalTag = formatTag(tag); switch(logType) { case Log.ERROR: Log.e(finalTag, BOTTOM_BORDER); break; case Log.INFO: Log.i(finalTag, BOTTOM_BORDER); break; case Log.VERBOSE: Log.v(finalTag, BOTTOM_BORDER); break; case Log.WARN: Log.w(finalTag, BOTTOM_B...
private static void logBottomBorder(int logType, String tag) { <DeepExtract> String finalTag = formatTag(tag); switch(logType) { case Log.ERROR: Log.e(finalTag, BOTTOM_BORDER); break; case Log.INFO: Log.i(finalTag, BOTTOM_BORDER); break; case Log.VERBOSE: Log.v(finalTag, BOTTOM_BORDER); break; case Log.WARN: Log.w(fina...
SoHOT
positive
4,884
public void pushView(GraphicGraph graph, Graphics2D g2) { if (oldTx == null) { oldTx = g2.getTransform(); if (autoFit) autoFitView(g2); else userView(g2); } else { throw new RuntimeException("DefaultCamera.pushView() / popView() wrongly nested"); } double X = metrics.viewport[0]; double Y = metrics.viewport[1]; double ...
public void pushView(GraphicGraph graph, Graphics2D g2) { if (oldTx == null) { oldTx = g2.getTransform(); if (autoFit) autoFitView(g2); else userView(g2); } else { throw new RuntimeException("DefaultCamera.pushView() / popView() wrongly nested"); } <DeepExtract> double X = metrics.viewport[0]; double Y = metrics.viewpo...
gs-ui-swing
positive
4,885
private void createExcelField() { this.fields = new ArrayList<>(); Class<?> tempClass = clazz; List<Field> tempFields = new ArrayList<>(Arrays.asList(clazz.getDeclaredFields())); while (tempClass != null) { tempClass = tempClass.getSuperclass(); if (tempClass != null) { tempFields.addAll(Arrays.asList(tempClass.getDecl...
private void createExcelField() { this.fields = new ArrayList<>(); Class<?> tempClass = clazz; List<Field> tempFields = new ArrayList<>(Arrays.asList(clazz.getDeclaredFields())); while (tempClass != null) { tempClass = tempClass.getSuperclass(); if (tempClass != null) { tempFields.addAll(Arrays.asList(tempClass.getDecl...
RuoYi
positive
4,886
public static String dateToStringWithTime() { if (new java.util.Date() == null) { return null; } try { SimpleDateFormat sfDate = new SimpleDateFormat(DATETIME_PATTERN); sfDate.setLenient(false); return sfDate.format(new java.util.Date()); } catch (Exception e) { return null; } }
public static String dateToStringWithTime() { <DeepExtract> if (new java.util.Date() == null) { return null; } try { SimpleDateFormat sfDate = new SimpleDateFormat(DATETIME_PATTERN); sfDate.setLenient(false); return sfDate.format(new java.util.Date()); } catch (Exception e) { return null; } </DeepExtract> }
SpringMVC-Mybatis-shiro
positive
4,887
public Criteria andFullNameEqualTo(String value) { if (value == null) { throw new RuntimeException("Value for " + "fullName" + " cannot be null"); } criteria.add(new Criterion("full_name =", value)); return (Criteria) this; }
public Criteria andFullNameEqualTo(String value) { <DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "fullName" + " cannot be null"); } criteria.add(new Criterion("full_name =", value)); </DeepExtract> return (Criteria) this; }
common-admin
positive
4,888