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
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_third);
ib_qq = (ImageButton) findViewById(R.id.ib_qq);
ib_weixin = (ImageButton) findViewById(R.id.ib_weixin);
ib_xinlang = (ImageButton) findViewById(R.id.ib_xinlang);
animatorUtil = new... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_third);
ib_qq = (ImageButton) findViewById(R.id.ib_qq);
ib_weixin = (ImageButton) findViewById(R.id.ib_weixin);
ib_xinlang = (ImageButton) findViewById(R.id.ib_xinlang);
animatorUtil = new... | CollegeCommunity | positive | 439,236 |
@Test
void it_should_log_throwable_using_error_level(CaptureSystemOut sysOut) {
Exception ex = new RuntimeException("A runtime exception");
String message = "error message";
log.error(message, ex);
String out = sysOut.getOut();
assertThat(out).contains("ERROR");
assertThat(out).contains(ex.getMessage());
} | @Test
void it_should_log_throwable_using_error_level(CaptureSystemOut sysOut) {
Exception ex = new RuntimeException("A runtime exception");
String message = "error message";
log.error(message, ex);
<DeepExtract>
String out = sysOut.getOut();
assertThat(out).contains("ERROR");
assertThat(out).contains(ex.getMessage());
... | springmvc-mustache | positive | 439,237 |
@Test
public void testAwaitAsync() throws Exception {
Result result;
try {
result = new JUnitCore().run(new VertxUnitRunner(AwaitAsyncTestSuite.class));
} catch (InitializationError initializationError) {
throw new AssertionError(initializationError);
}
assertEquals(5, result.getRunCount());
assertEquals(3, result.getF... | @Test
public void testAwaitAsync() throws Exception {
<DeepExtract>
Result result;
try {
result = new JUnitCore().run(new VertxUnitRunner(AwaitAsyncTestSuite.class));
} catch (InitializationError initializationError) {
throw new AssertionError(initializationError);
}
</DeepExtract>
assertEquals(5, result.getRunCount())... | vertx-unit | positive | 439,240 |
@Override
public boolean deleteSurroundingText(int leftLength, int rightLength) {
if (composingCharCount != 0) {
}
int start = mCaretPosition - leftLength;
if (start < 0) {
start = 0;
}
int end = mCaretPosition + rightLength;
int docLength = hDoc.docLength();
if (end > (docLength - 1)) {
end = docLength - 1;
}
replaceC... | @Override
public boolean deleteSurroundingText(int leftLength, int rightLength) {
if (composingCharCount != 0) {
}
<DeepExtract>
int start = mCaretPosition - leftLength;
if (start < 0) {
start = 0;
}
int end = mCaretPosition + rightLength;
int docLength = hDoc.docLength();
if (end > (docLength - 1)) {
end = docLength -... | Frida-Injector-for-Android | positive | 439,241 |
public double barops(double asset, double strike, double cash, double volatility, double time, int tp) {
s = asset;
x = strike;
k = cash;
sigma = volatility;
t = time;
throw new UnsupportedOperationException("Not yet implemented");
} | public double barops(double asset, double strike, double cash, double volatility, double time, int tp) {
s = asset;
x = strike;
k = cash;
sigma = volatility;
t = time;
<DeepExtract>
throw new UnsupportedOperationException("Not yet implemented");
</DeepExtract>
} | maygard | positive | 439,242 |
public T enabled(boolean enabled) {
if (view != null) {
view.setEnabled(enabled);
}
return (T) this;
} | public T enabled(boolean enabled) {
if (view != null) {
view.setEnabled(enabled);
}
<DeepExtract>
return (T) this;
</DeepExtract>
} | androidquery | positive | 439,244 |
@Test
public void fillOneTableWithWrappedString() throws URISyntaxException, IOException {
JsonTemplate jsonTemplate = new JsonTemplate(getClass().getResource("/single_table_wrap.json").toURI());
List<Person> persons = new ArrayList<>();
persons.add(new Person("None12345678901234567890", "David12345678901234567890", "N... | @Test
public void fillOneTableWithWrappedString() throws URISyntaxException, IOException {
JsonTemplate jsonTemplate = new JsonTemplate(getClass().getResource("/single_table_wrap.json").toURI());
List<Person> persons = new ArrayList<>();
persons.add(new Person("None12345678901234567890", "David12345678901234567890", "N... | simple-escp | positive | 439,245 |
public void setSortingMode(String path, int column) {
ContentValues values = new ContentValues();
values.put(ALBUM_SORTING_MODE, column);
SQLiteDatabase db = this.getWritableDatabase();
db.update(TABLE_ALBUMS, values, ALBUM_PATH + "=?", new String[] { path });
db.close();
} | public void setSortingMode(String path, int column) {
ContentValues values = new ContentValues();
values.put(ALBUM_SORTING_MODE, column);
<DeepExtract>
SQLiteDatabase db = this.getWritableDatabase();
db.update(TABLE_ALBUMS, values, ALBUM_PATH + "=?", new String[] { path });
db.close();
</DeepExtract>
} | leafpicrevived | positive | 439,246 |
final public Expr FunctionCall() throws ParseException {
String iri;
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IRIref:
iri = IRIREF();
{
if (true)
fname = iri;
}
break;
case PNAME_NS:
case PNAME_LN:
iri = PrefixedName();
{
if (true)
fname = iri;
}
break;
default:
jj_la1[164] = jj_gen;
jj_consume_token(-1);
thro... | final public Expr FunctionCall() throws ParseException {
String iri;
switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IRIref:
iri = IRIREF();
{
if (true)
fname = iri;
}
break;
case PNAME_NS:
case PNAME_LN:
iri = PrefixedName();
{
if (true)
fname = iri;
}
break;
default:
jj_la1[164] = jj_gen;
jj_consume_token(-1);
thro... | RDFstarTools | positive | 439,247 |
private void refreshHeightCache() {
MapPanel panel = MineMap.INSTANCE.worldTabs.getSelectedMapPanel();
if (panel != null && panel.manager != null) {
cheating = Math.max(Configs.USER_PROFILE.getUserSettings().cheatingHeight, (int) (panel.manager.blocksPerFragment / 2 / panel.manager.pixelsPerFragment));
cheating = Math.... | private void refreshHeightCache() {
MapPanel panel = MineMap.INSTANCE.worldTabs.getSelectedMapPanel();
if (panel != null && panel.manager != null) {
cheating = Math.max(Configs.USER_PROFILE.getUserSettings().cheatingHeight, (int) (panel.manager.blocksPerFragment / 2 / panel.manager.pixelsPerFragment));
cheating = Math.... | Minemap | positive | 439,248 |
@Override
public String next() {
String dateTime = LocalDateTime.now().format(f);
return dateTime + "/" + nextSequence();
} | @Override
public String next() {
String dateTime = LocalDateTime.now().format(f);
<DeepExtract>
return dateTime + "/" + nextSequence();
</DeepExtract>
} | corejava | positive | 439,249 |
@Override
public boolean remove(Object o) {
int idx;
if (o instanceof Node) {
int i = 0;
for (Node node : this) {
if (((Node) o).getId() == node.getId()) {
idx = i;
}
i++;
}
idx = -1;
} else
throw new ClassCastException("Supplied object is not a Node");
if (idx >= 0) {
remove(idx);
return true;
} else
return false;
} | @Override
public boolean remove(Object o) {
<DeepExtract>
int idx;
if (o instanceof Node) {
int i = 0;
for (Node node : this) {
if (((Node) o).getId() == node.getId()) {
idx = i;
}
i++;
}
idx = -1;
} else
throw new ClassCastException("Supplied object is not a Node");
</DeepExtract>
if (idx >= 0) {
remove(idx);
return t... | graph-collections | positive | 439,250 |
public static cvg.sfmPipeline.main.PipelineOutMessage.Keypoints.cvKeypoint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
cvg.sfmPipeline.main.PipelineOutMessage.CvMatDimProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result).asInv... | public static cvg.sfmPipeline.main.PipelineOutMessage.Keypoints.cvKeypoint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
<DeepExtract>
cvg.sfmPipeline.main.PipelineOutMessage.CvMatDimProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException... | Android-SfM-client | positive | 439,251 |
protected byte[] getBody() {
byte[] bodyBytes = new byte[getCommandLength()];
Arrays.fill(bodyBytes, (byte) 0);
if (sourceAddr == null) {
sourceAddr = "";
}
if (timestamp == 0) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
timestamp = (calendar.get(Calendar.MONTH) + 1) * 0x5f5e100 + calend... | protected byte[] getBody() {
byte[] bodyBytes = new byte[getCommandLength()];
Arrays.fill(bodyBytes, (byte) 0);
if (sourceAddr == null) {
sourceAddr = "";
}
if (timestamp == 0) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
timestamp = (calendar.get(Calendar.MONTH) + 1) * 0x5f5e100 + calend... | SMS-China | positive | 439,252 |
@Override
long alignToGigabytes(long a) {
if (a == 0L)
return 0L;
long mask = ~(C7 / C6 - 1L);
if (a > 0L) {
long filled = a + C7 / C6 - 1L;
if (filled > 0L) {
return filled & mask;
} else {
long maxAlignedLong = Long.MAX_VALUE & mask;
if (a <= maxAlignedLong)
return maxAlignedLong;
}
} else {
long filled = a - C7 / C6... | @Override
long alignToGigabytes(long a) {
<DeepExtract>
if (a == 0L)
return 0L;
long mask = ~(C7 / C6 - 1L);
if (a > 0L) {
long filled = a + C7 / C6 - 1L;
if (filled > 0L) {
return filled & mask;
} else {
long maxAlignedLong = Long.MAX_VALUE & mask;
if (a <= maxAlignedLong)
return maxAlignedLong;
}
} else {
long filled... | Chronicle-Algorithms | positive | 439,253 |
public void logBestPairing(PairingGraph pairing) {
if (!matcherOffered) {
acceptsRootPairs = transparency.accepts("roots");
acceptsPairing = transparency.accepts("pairing");
acceptsBestPairing = transparency.accepts("best-pairing");
acceptsScore = transparency.accepts("score");
acceptsBestScore = transparency.accepts("... | public void logBestPairing(PairingGraph pairing) {
<DeepExtract>
if (!matcherOffered) {
acceptsRootPairs = transparency.accepts("roots");
acceptsPairing = transparency.accepts("pairing");
acceptsBestPairing = transparency.accepts("best-pairing");
acceptsScore = transparency.accepts("score");
acceptsBestScore = transpar... | sourceafis-java | positive | 439,255 |
@Test
public void testDataType() throws Exception {
assertEquals(_DataType(NO_COMMENTS, NO_ANNOTATIONS, "Foo", NO_FORMAL_TYPE_ARGUMENTS, NO_EXTENDS, NO_IMPLEMENTS, list(_Constructor(NO_COMMENTS, "Foo", Util.<Arg>list()))), parserImpl("Foo=Foo").dataType());
assertEquals(_DataType(NO_COMMENTS, NO_ANNOTATIONS, "Foo", lis... | @Test
public void testDataType() throws Exception {
assertEquals(_DataType(NO_COMMENTS, NO_ANNOTATIONS, "Foo", NO_FORMAL_TYPE_ARGUMENTS, NO_EXTENDS, NO_IMPLEMENTS, list(_Constructor(NO_COMMENTS, "Foo", Util.<Arg>list()))), parserImpl("Foo=Foo").dataType());
assertEquals(_DataType(NO_COMMENTS, NO_ANNOTATIONS, "Foo", lis... | jADT | positive | 439,256 |
@Override
public void init(SevenSky s) {
this.s = s;
starList = new ArrayList<Star>();
Geometry starquad = createFullScreenQuad();
starquad.setCullHint(Spatial.CullHint.Never);
Material mat = new Material(s.am, "MatDefs/Sky/SkySpriteStar.j3md");
mat.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Off);
ma... | @Override
public void init(SevenSky s) {
this.s = s;
starList = new ArrayList<Star>();
Geometry starquad = createFullScreenQuad();
starquad.setCullHint(Spatial.CullHint.Never);
Material mat = new Material(s.am, "MatDefs/Sky/SkySpriteStar.j3md");
mat.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Off);
ma... | SevenSky | positive | 439,258 |
@Override
public void run() {
llBottomControl.setVisibility(View.INVISIBLE);
pbBottom.setVisibility(View.VISIBLE);
setTitleVisibility(View.INVISIBLE);
ivStart.setVisibility(View.INVISIBLE);
} | @Override
public void run() {
<DeepExtract>
llBottomControl.setVisibility(View.INVISIBLE);
pbBottom.setVisibility(View.VISIBLE);
setTitleVisibility(View.INVISIBLE);
ivStart.setVisibility(View.INVISIBLE);
</DeepExtract>
} | ShangGuiGu321Meida | positive | 439,259 |
public static XPathException cannotInstall(Exception cause) {
XPathException ex = new XPathException(cause.getMessage(), cause);
StructuredQName qname = new StructuredQName(PREFIX, NS, "cannot-install");
ex.setErrorCodeQName(qname);
return ex;
} | public static XPathException cannotInstall(Exception cause) {
<DeepExtract>
XPathException ex = new XPathException(cause.getMessage(), cause);
StructuredQName qname = new StructuredQName(PREFIX, NS, "cannot-install");
ex.setErrorCodeQName(qname);
return ex;
</DeepExtract>
} | servlex | positive | 439,260 |
public String readerInfo() {
Map<String, Object> session = ServletActionContext.getContext().getSession();
Reader reader = (Reader) session.get("reader");
this.name = name;
this.phone = phone;
this.email = email;
Reader newReader = readerService.updateReaderInfo(reader);
int success = 0;
if (newReader != null) {
succes... | public String readerInfo() {
Map<String, Object> session = ServletActionContext.getContext().getSession();
Reader reader = (Reader) session.get("reader");
this.name = name;
this.phone = phone;
<DeepExtract>
this.email = email;
</DeepExtract>
Reader newReader = readerService.updateReaderInfo(reader);
int success = 0;
if... | LibrarySystem | positive | 439,262 |
@Before
public void setUp() throws Exception {
CustomLog.configLogger(TestUtil.LOG_PROPS);
int numBrokers = 1;
boolean trace_flag = true;
CloudSim.init(numBrokers, Calendar.getInstance(), trace_flag);
List<Host> hostList = new ArrayList<Host>();
List<Pe> peList = new ArrayList<>();
List<HddPe> hddList = new ArrayList<>... | @Before
public void setUp() throws Exception {
CustomLog.configLogger(TestUtil.LOG_PROPS);
int numBrokers = 1;
boolean trace_flag = true;
CloudSim.init(numBrokers, Calendar.getInstance(), trace_flag);
<DeepExtract>
List<Host> hostList = new ArrayList<Host>();
List<Pe> peList = new ArrayList<>();
List<HddPe> hddList = n... | CloudSimEx | positive | 439,263 |
public ImageIcon AuthIcon() {
try {
URL iconPath = getClass().getClassLoader().getResource(Auth);
return new ImageIcon(new ImageIcon(iconPath).getImage());
} catch (Exception ex) {
LogWriter.WriteToLog(ex.fillInStackTrace());
return new ImageIcon(createTransparentImage(1, 1));
}
} | public ImageIcon AuthIcon() {
<DeepExtract>
try {
URL iconPath = getClass().getClassLoader().getResource(Auth);
return new ImageIcon(new ImageIcon(iconPath).getImage());
} catch (Exception ex) {
LogWriter.WriteToLog(ex.fillInStackTrace());
return new ImageIcon(createTransparentImage(1, 1));
}
</DeepExtract>
} | MQAdminTool | positive | 439,264 |
public void startListening(String routeKey) {
deliveryFlux = creator.declare(exchange("globalReply").type("topic").durable(true)).then(creator.declare(queue(queueName).durable(false).autoDelete(true).exclusive(true))).then(creator.bind(binding("globalReply", routeKey, queueName))).thenMany(receiver.consumeAutoAck(queue... | public void startListening(String routeKey) {
deliveryFlux = creator.declare(exchange("globalReply").type("topic").durable(true)).then(creator.declare(queue(queueName).durable(false).autoDelete(true).exclusive(true))).then(creator.bind(binding("globalReply", routeKey, queueName))).thenMany(receiver.consumeAutoAck(queue... | reactive-commons-java | positive | 439,265 |
public static void main(String[] args) {
ObjValue ov = new ObjValue();
super.put("1", "1");
super.put("1.1", "11");
super.put("1.1.1", "1111");
super.put("1.1.1.1", "1111");
super.put("1.2", "12");
super.put("1.2.1", "121");
super.put("2", "2");
super.put("22", "22");
super.put("domain", "1");
super.put("domain._me_ta.... | public static void main(String[] args) {
ObjValue ov = new ObjValue();
super.put("1", "1");
super.put("1.1", "11");
super.put("1.1.1", "1111");
super.put("1.1.1.1", "1111");
super.put("1.2", "12");
super.put("1.2.1", "121");
super.put("2", "2");
super.put("22", "22");
super.put("domain", "1");
super.put("domain._me_ta.... | Fourinone | positive | 439,266 |
@Override
public void onTalkFailed(BaseException e) {
EZLog.d(TAG, "onTalkFailed");
EZLog.debugLog(TAG, "Talkback failed. " + e.toString());
closeTalkPopupWindow(true);
switch(e.getErrorCode()) {
case ErrorCode.ERROR_TRANSF_DEVICE_TALKING:
showToast(R.string.realplay_play_talkback_fail_ison);
break;
case ErrorCode.ERRO... | @Override
public void onTalkFailed(BaseException e) {
EZLog.d(TAG, "onTalkFailed");
<DeepExtract>
EZLog.debugLog(TAG, "Talkback failed. " + e.toString());
closeTalkPopupWindow(true);
switch(e.getErrorCode()) {
case ErrorCode.ERROR_TRANSF_DEVICE_TALKING:
showToast(R.string.realplay_play_talkback_fail_ison);
break;
case ... | EZOpenAPP-Lite-Android | positive | 439,267 |
public static void set(String color) {
switch(color) {
case "red":
theme = R.style.ThemeRed;
case "pink":
theme = R.style.ThemePink;
case "purple":
theme = R.style.ThemePurple;
case "indigo":
theme = R.style.ThemeIndigo;
case "blue":
theme = R.style.ThemeBlue;
case "teal":
theme = R.style.ThemeTeal;
case "green":
theme... | public static void set(String color) {
<DeepExtract>
switch(color) {
case "red":
theme = R.style.ThemeRed;
case "pink":
theme = R.style.ThemePink;
case "purple":
theme = R.style.ThemePurple;
case "indigo":
theme = R.style.ThemeIndigo;
case "blue":
theme = R.style.ThemeBlue;
case "teal":
theme = R.style.ThemeTeal;
case ... | pivisionM | positive | 439,270 |
public boolean existsWmsstore(String workspace, String wsName) {
String url = baseurl + "/rest/workspaces/" + workspace + "/coveragestores/" + wsName + ".xml";
String composed = Util.appendQuietOnNotFound(Util.DEFAULT_QUIET_ON_NOT_FOUND, url);
return HTTPUtils.exists(composed, username, password);
} | public boolean existsWmsstore(String workspace, String wsName) {
<DeepExtract>
String url = baseurl + "/rest/workspaces/" + workspace + "/coveragestores/" + wsName + ".xml";
String composed = Util.appendQuietOnNotFound(Util.DEFAULT_QUIET_ON_NOT_FOUND, url);
return HTTPUtils.exists(composed, username, password);
</DeepE... | geoserver-manager | positive | 439,272 |
@Test
public void testOrderSearch() {
SearchStrategy strategy = new SearchStrategy(new OrderSearch());
int target01 = strategy.find(origin01, origin01[expected01]);
Assertions.assertEquals(expected01, target01);
int target02 = strategy.find(origin02, origin02[expected02]);
Assertions.assertEquals(expected02, target02);... | @Test
public void testOrderSearch() {
SearchStrategy strategy = new SearchStrategy(new OrderSearch());
<DeepExtract>
int target01 = strategy.find(origin01, origin01[expected01]);
Assertions.assertEquals(expected01, target01);
int target02 = strategy.find(origin02, origin02[expected02]);
Assertions.assertEquals(expected... | algorithm-tutorial | positive | 439,273 |
public <T> T inputpoint(String correlationId, String sourceClassName, String name, StubableCode stubableCode, Set<String> matchingStubStrategies) {
boolean executeStubableCode = true;
if (reportGeneratorEnabled) {
Report report = getReportInProgress(correlationId, name, Checkpoint.TYPE_INPUTPOINT);
while (report != nul... | public <T> T inputpoint(String correlationId, String sourceClassName, String name, StubableCode stubableCode, Set<String> matchingStubStrategies) {
<DeepExtract>
boolean executeStubableCode = true;
if (reportGeneratorEnabled) {
Report report = getReportInProgress(correlationId, name, Checkpoint.TYPE_INPUTPOINT);
while ... | ibis-ladybug | positive | 439,274 |
private void initBase() {
paintTrack.setAntiAlias(true);
paintThumb.setAntiAlias(true);
paintStroke.setAntiAlias(true);
paintText.setAntiAlias(true);
paintStroke.setStrokeWidth(strokeWidth);
paintStroke.setStyle(Paint.Style.STROKE);
if (isChecked) {
setPaintOff();
} else {
setPaintOn();
}
setOnClickListener(this);
post... | private void initBase() {
<DeepExtract>
paintTrack.setAntiAlias(true);
paintThumb.setAntiAlias(true);
paintStroke.setAntiAlias(true);
paintText.setAntiAlias(true);
paintStroke.setStrokeWidth(strokeWidth);
paintStroke.setStyle(Paint.Style.STROKE);
if (isChecked) {
setPaintOff();
} else {
setPaintOn();
}
</DeepExtract>
s... | urtc-android-demo | positive | 439,275 |
public ConverterCache getConverterCache() {
if (closed) {
throw new HibersapException("The SessionManager has been closed, it must not be used anymore");
}
return this.converterCache;
} | public ConverterCache getConverterCache() {
<DeepExtract>
if (closed) {
throw new HibersapException("The SessionManager has been closed, it must not be used anymore");
}
</DeepExtract>
return this.converterCache;
} | hibersap | positive | 439,276 |
@Override
public void keyPressed(final KeyEvent keyEvent) {
prevbyte = controllerbyte;
if (!m.containsKey(keyEvent.getKeyCode())) {
return;
}
controllerbyte |= m.get(keyEvent.getKeyCode());
if ((controllerbyte & (BIT4 | BIT5)) == (BIT4 | BIT5)) {
controllerbyte &= ~(BIT4 | BIT5);
controllerbyte |= (prevbyte & ~(BIT4 | ... | @Override
public void keyPressed(final KeyEvent keyEvent) {
<DeepExtract>
prevbyte = controllerbyte;
if (!m.containsKey(keyEvent.getKeyCode())) {
return;
}
controllerbyte |= m.get(keyEvent.getKeyCode());
if ((controllerbyte & (BIT4 | BIT5)) == (BIT4 | BIT5)) {
controllerbyte &= ~(BIT4 | BIT5);
controllerbyte |= (prevby... | halfnes | positive | 439,278 |
public double[][] algorithmFloydWarshall() {
n = graph.getNumberOfVertices();
cost = new double[n][n];
int i, j;
for (i = 0; i < n; i++) for (j = 0; j < n; j++) {
cost[i][j] = Double.POSITIVE_INFINITY;
}
for (i = 0; i < n; i++) cost[i][i] = 0;
for (i = 0; i < n; i++) {
EdgeIterator edgeIterator = graph.edgeIterator(i);... | public double[][] algorithmFloydWarshall() {
<DeepExtract>
n = graph.getNumberOfVertices();
cost = new double[n][n];
int i, j;
for (i = 0; i < n; i++) for (j = 0; j < n; j++) {
cost[i][j] = Double.POSITIVE_INFINITY;
}
for (i = 0; i < n; i++) cost[i][i] = 0;
for (i = 0; i < n; i++) {
EdgeIterator edgeIterator = graph.ed... | vn-nlp-libraries | positive | 439,279 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_color);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplay... | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_color);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplay... | GreenMatter | positive | 439,280 |
@Override
public G getLeft() {
return this.location;
} | @Override
public G getLeft() {
<DeepExtract>
return this.location;
</DeepExtract>
} | genprog4java | positive | 439,281 |
public static void main(String[] args) {
DisplayArea da = new DisplayArea(null);
Translator emitter = new JavaTranslator(StringTokenizer.class);
emitter.apply();
displayDataState = DisplayDataState.INSIDE_CLASS;
clearText();
StyleConstants.setFontSize(style, 20);
StyleConstants.setBackground(style, theme.getBackgroundC... | public static void main(String[] args) {
DisplayArea da = new DisplayArea(null);
Translator emitter = new JavaTranslator(StringTokenizer.class);
emitter.apply();
<DeepExtract>
displayDataState = DisplayDataState.INSIDE_CLASS;
clearText();
StyleConstants.setFontSize(style, 20);
StyleConstants.setBackground(style, theme.... | android-classyshark | positive | 439,283 |
private void begin(Configuration configuration) throws IOException {
if (configuration == null) {
configuration = new Configuration.Builder().build();
}
final byte[] commandInitSequence = COMMAND_DEFAULT_INIT_SEQUENCE.clone();
return mHeatingDots;
return mHeatingTime;
return mHeatingInterval;
mUartDevice.write(commandI... | private void begin(Configuration configuration) throws IOException {
if (configuration == null) {
configuration = new Configuration.Builder().build();
}
final byte[] commandInitSequence = COMMAND_DEFAULT_INIT_SEQUENCE.clone();
return mHeatingDots;
return mHeatingTime;
return mHeatingInterval;
mUartDevice.write(commandI... | contrib-drivers | positive | 439,284 |
private static void rotateArray(int[] a, int k) {
if (a.length == 0 || a == null || k < 0) {
return;
}
k = k > a.length ? k % a.length : k;
int l = a.length - k;
while (0 <= l - 1) {
int tmp = a[0];
a[0] = a[l - 1];
a[l - 1] = tmp;
0++;
l - 1--;
}
while (l <= a.length - 1) {
int tmp = a[l];
a[l] = a[a.length - 1];
a[a.... | private static void rotateArray(int[] a, int k) {
if (a.length == 0 || a == null || k < 0) {
return;
}
k = k > a.length ? k % a.length : k;
int l = a.length - k;
while (0 <= l - 1) {
int tmp = a[0];
a[0] = a[l - 1];
a[l - 1] = tmp;
0++;
l - 1--;
}
while (l <= a.length - 1) {
int tmp = a[l];
a[l] = a[a.length - 1];
a[a.... | Hackerrank-Solutions | positive | 439,285 |
private Color findColor(Node n) {
int val = nodeStatus.getVal(n);
double ratio = (val - min) / (max - min);
(int) (510 * ratio) = Math.min(Math.max(0, (int) (510 * ratio)), 510);
int redValue;
int greenValue;
if ((int) (510 * ratio) < 255) {
redValue = 255;
greenValue = (int) Math.sqrt((int) (510 * ratio)) * 16;
if (gr... | private Color findColor(Node n) {
int val = nodeStatus.getVal(n);
double ratio = (val - min) / (max - min);
<DeepExtract>
(int) (510 * ratio) = Math.min(Math.max(0, (int) (510 * ratio)), 510);
int redValue;
int greenValue;
if ((int) (510 * ratio) < 255) {
redValue = 255;
greenValue = (int) Math.sqrt((int) (510 * ratio)... | wittgenstein | positive | 439,286 |
public static void main(String[] args) {
final StringStack first = new StringStackArray();
final StringStack second = new StringStackList();
first.push("The");
first.push("quick");
first.push("brown");
first.push("fox");
first.push("jumped");
first.push("over");
first.push("the");
first.push("lazy");
first.push("dog");... | public static void main(String[] args) {
final StringStack first = new StringStackArray();
final StringStack second = new StringStackList();
first.push("The");
first.push("quick");
first.push("brown");
first.push("fox");
first.push("jumped");
first.push("over");
first.push("the");
first.push("lazy");
first.push("dog");... | ProgrammingIITutorialQuestions | positive | 439,287 |
public static Builder newBuilder(org.sterl.proto.SocketRequest.RequestMessage.JumpData prototype) {
if (prototype instanceof org.sterl.proto.SocketRequest.RequestMessage.MoveData) {
return mergeFrom((org.sterl.proto.SocketRequest.RequestMessage.MoveData) prototype);
} else {
super.mergeFrom(prototype);
return this;
}
} | public static Builder newBuilder(org.sterl.proto.SocketRequest.RequestMessage.JumpData prototype) {
<DeepExtract>
if (prototype instanceof org.sterl.proto.SocketRequest.RequestMessage.MoveData) {
return mergeFrom((org.sterl.proto.SocketRequest.RequestMessage.MoveData) prototype);
} else {
super.mergeFrom(prototype);
re... | training | positive | 439,289 |
public void resetTextSize() {
super.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
mTextSize = getTextSize();
mMaxTextSize = mTextSize;
} | public void resetTextSize() {
<DeepExtract>
super.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
mTextSize = getTextSize();
</DeepExtract>
mMaxTextSize = mTextSize;
} | Seven--Calculator | positive | 439,291 |
public AjaxResult exportExcel(List<T> list, String sheetName) {
if (list == null) {
list = new ArrayList<T>();
}
this.list = list;
this.sheetName = sheetName;
this.type = Type.EXPORT;
createExcelField();
createWorkbook();
return exportExcel();
} | public AjaxResult exportExcel(List<T> list, String sheetName) {
<DeepExtract>
if (list == null) {
list = new ArrayList<T>();
}
this.list = list;
this.sheetName = sheetName;
this.type = Type.EXPORT;
createExcelField();
createWorkbook();
</DeepExtract>
return exportExcel();
} | practice | positive | 439,292 |
void updateDescendants(URL parent) {
URL protocolLess = parent.copyWithProtocol(null);
governors.entrySet().stream().filter(entry -> entry.getKey().isDescendant(protocolLess)).sorted(GOVERNORS_ASCENDING_COMPARATOR).forEach(entry -> this::update.accept(entry.getValue()));
} | void updateDescendants(URL parent) {
<DeepExtract>
URL protocolLess = parent.copyWithProtocol(null);
governors.entrySet().stream().filter(entry -> entry.getKey().isDescendant(protocolLess)).sorted(GOVERNORS_ASCENDING_COMPARATOR).forEach(entry -> this::update.accept(entry.getValue()));
</DeepExtract>
} | bluetooth-manager | positive | 439,293 |
@Override
public void processVmCreateAck(SimEvent ev) {
super.processVmCreateAck(ev);
SDNVm vm = (SDNVm) ev.getData();
Log.printLine(CloudSim.clock() + ": " + getName() + ": VM Created: " + vm + " in " + vm.getHost());
for (FlowConfig arc : this.flowMapVmId2Flow.values()) {
vnMapper.buildForwardingTable(arc.getSrcId(),... | @Override
public void processVmCreateAck(SimEvent ev) {
super.processVmCreateAck(ev);
SDNVm vm = (SDNVm) ev.getData();
Log.printLine(CloudSim.clock() + ": " + getName() + ": VM Created: " + vm + " in " + vm.getHost());
<DeepExtract>
for (FlowConfig arc : this.flowMapVmId2Flow.values()) {
vnMapper.buildForwardingTable(a... | cloudsimsdn | positive | 439,296 |
private void loadAndDisplayResults(final int limit) throws Exception {
couchbaseResult = couchbaseClient.loadRecords(configuration, database, new CouchbaseQuery(limit));
if (couchbaseResult.hasErrors()) {
throw new Exception(StringUtils.join(couchbaseResult.getErrors(), " "));
}
NoSqlTreeNode rootNode = CouchbaseTreeMo... | private void loadAndDisplayResults(final int limit) throws Exception {
couchbaseResult = couchbaseClient.loadRecords(configuration, database, new CouchbaseQuery(limit));
if (couchbaseResult.hasErrors()) {
throw new Exception(StringUtils.join(couchbaseResult.getErrors(), " "));
}
<DeepExtract>
NoSqlTreeNode rootNode = C... | nosql4idea | positive | 439,297 |
public void start() throws Exception {
if (!this.running.compareAndSet(false, true)) {
return;
}
if (this.transport == null)
this.transport = getDefaultTransport();
this.transport.connect(this.host, this.port);
final ComBinlogDumpPacket command = new ComBinlogDumpPacket();
command.setBinlogFlag(0);
command.setServerId(... | public void start() throws Exception {
if (!this.running.compareAndSet(false, true)) {
return;
}
if (this.transport == null)
this.transport = getDefaultTransport();
this.transport.connect(this.host, this.port);
<DeepExtract>
final ComBinlogDumpPacket command = new ComBinlogDumpPacket();
command.setBinlogFlag(0);
comman... | open-replicator | positive | 439,298 |
public DrawableSelectorBuilder setPressedColor(int color) {
mStateListDrawable.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(color));
return this;
return this;
} | public DrawableSelectorBuilder setPressedColor(int color) {
<DeepExtract>
mStateListDrawable.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(color));
return this;
</DeepExtract>
return this;
} | Utils-Everywhere | positive | 439,301 |
@Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
if (!(parent.getLayoutManager() instanceof LinearLayoutManager))
return;
RecyclerView.Adapter adapter = parent.getAdapter... | @Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
if (!(parent.getLayoutManager() instanceof LinearLayoutManager))
return;
RecyclerView.Adapter adapter = parent.getAdapter... | OmegaRecyclerView | positive | 439,303 |
@Test
public void test4_14_6() throws Exception {
List<String> crls = new ArrayList<String>();
for (int i = 1; i < new String[] { "distributionPoint2CACert", "distributionPoint2CACRL" }.length; i++) crls.add(new String[] { "distributionPoint2CACert", "distributionPoint2CACRL" }[i]);
crls.add(TRUST_ANCHOR_ROOT_CRL);
nis... | @Test
public void test4_14_6() throws Exception {
<DeepExtract>
List<String> crls = new ArrayList<String>();
for (int i = 1; i < new String[] { "distributionPoint2CACert", "distributionPoint2CACRL" }.length; i++) crls.add(new String[] { "distributionPoint2CACert", "distributionPoint2CACRL" }[i]);
crls.add(TRUST_ANCHOR_... | canl-java | positive | 439,304 |
private void renderText(GlcdFont font, String text) {
fontRenderer.renderFont(fontDisplay, font, text);
GraphicsContext gc = fontDisplay.getGraphicsContext2D();
gc.setFont(new Font("Consolas", 10));
gc.setFill(Color.DARKGRAY);
gc.setTextAlign(TextAlignment.CENTER);
gc.setTextBaseline(VPos.CENTER);
gc.setFontSmoothingTy... | private void renderText(GlcdFont font, String text) {
fontRenderer.renderFont(fontDisplay, font, text);
<DeepExtract>
GraphicsContext gc = fontDisplay.getGraphicsContext2D();
gc.setFont(new Font("Consolas", 10));
gc.setFill(Color.DARKGRAY);
gc.setTextAlign(TextAlignment.CENTER);
gc.setTextBaseline(VPos.CENTER);
gc.setF... | glcd-emulator | positive | 439,305 |
public static void initialize() {
if (ModOptions.enableDebugLogging)
register(new DebugHUD());
if (ModOptions.potionHudEnabled)
register(new PotionHUD());
overlays.add(new GuiHUDHandler());
} | public static void initialize() {
if (ModOptions.enableDebugLogging)
register(new DebugHUD());
if (ModOptions.potionHudEnabled)
register(new PotionHUD());
<DeepExtract>
overlays.add(new GuiHUDHandler());
</DeepExtract>
} | BetterRain | positive | 439,308 |
public void reverseFromNthNodeFromStart(int n) {
Node temp = root;
for (int x = 1; x <= n - 1; x++) {
temp = root.next;
if (temp == null) {
return;
}
}
Node previous = null;
Node current = temp.next;
Node next = null;
while (current != null) {
next = current.next;
current.next = previous;
previous = current;
current = ... | public void reverseFromNthNodeFromStart(int n) {
Node temp = root;
for (int x = 1; x <= n - 1; x++) {
temp = root.next;
if (temp == null) {
return;
}
}
<DeepExtract>
Node previous = null;
Node current = temp.next;
Node next = null;
while (current != null) {
next = current.next;
current.next = previous;
previous = curre... | Algorithms-and-Data-Structures-in-Java | positive | 439,309 |
public $ ids(int... ids) {
this.views.clear();
for (View view : views) {
if (view != null) {
if (view.getId() == ids[0]) {
this.rootView = view;
}
}
}
View v = null;
if (rootView != null)
v = rootView.findViewById(ids[0]);
if (v == null && context instanceof Activity)
v = ((Activity) context).findViewById(ids[0]);
retu... | public $ ids(int... ids) {
this.views.clear();
for (View view : views) {
if (view != null) {
if (view.getId() == ids[0]) {
this.rootView = view;
}
}
}
View v = null;
if (rootView != null)
v = rootView.findViewById(ids[0]);
if (v == null && context instanceof Activity)
v = ((Activity) context).findViewById(ids[0]);
retu... | droidQuery | positive | 439,310 |
public int nextGreaterElement(int n) {
char[] ch = ("" + n).toCharArray();
int index = ch.length - 2;
while (index >= 0 && ch[index] >= ch[index + 1]) index--;
if (index == -1)
return -1;
int index2 = ch.length - 1;
while (index2 >= index && ch[index2] <= ch[index]) index2--;
char temp = ch[index];
ch[index] = ch[index... | public int nextGreaterElement(int n) {
char[] ch = ("" + n).toCharArray();
int index = ch.length - 2;
while (index >= 0 && ch[index] >= ch[index + 1]) index--;
if (index == -1)
return -1;
int index2 = ch.length - 1;
while (index2 >= index && ch[index2] <= ch[index]) index2--;
char temp = ch[index];
ch[index] = ch[index... | youtube | positive | 439,311 |
@Override
public void encodeNetProtoBufMessageBody() throws CodecException, Exception {
LoginOnlineClientTcpMessagebuf.LoginOnlineClientTcpMessage.Builder builder = LoginOnlineClientTcpMessagebuf.LoginOnlineClientTcpMessage.newBuilder();
this.playerId = playerId;
byte[] bytes = builder.build().toByteArray();
this.getNe... | @Override
public void encodeNetProtoBufMessageBody() throws CodecException, Exception {
LoginOnlineClientTcpMessagebuf.LoginOnlineClientTcpMessage.Builder builder = LoginOnlineClientTcpMessagebuf.LoginOnlineClientTcpMessage.newBuilder();
<DeepExtract>
this.playerId = playerId;
</DeepExtract>
byte[] bytes = builder.buil... | twjitm-core | positive | 439,312 |
@Override
public CompletableFuture<HttpResponse<Void>> async() {
return new CallDiscarding();
} | @Override
public CompletableFuture<HttpResponse<Void>> async() {
<DeepExtract>
return new CallDiscarding();
</DeepExtract>
} | avaje-http | positive | 439,313 |
@Deprecated
@Override
public String encodeUrl(final String url) {
return url;
} | @Deprecated
@Override
public String encodeUrl(final String url) {
<DeepExtract>
return url;
</DeepExtract>
} | winstone | positive | 439,314 |
public Criteria andFromUseridLessThanOrEqualTo(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "fromUserid" + " cannot be null");
}
criteria.add(new Criterion("from_userid <=", value));
return (Criteria) this;
} | public Criteria andFromUseridLessThanOrEqualTo(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "fromUserid" + " cannot be null");
}
criteria.add(new Criterion("from_userid <=", value));
</DeepExtract>
return (Criteria) this;
} | chat-software | positive | 439,315 |
public void pred8x8(int[] src, int src_offset, int stride) {
pred8x8_top_dc_c(src, src_offset, stride);
pred4x4_dc_c(src, src_offset, null, 0, stride);
} | public void pred8x8(int[] src, int src_offset, int stride) {
<DeepExtract>
pred8x8_top_dc_c(src, src_offset, stride);
pred4x4_dc_c(src, src_offset, null, 0, stride);
</DeepExtract>
} | h264j | positive | 439,316 |
public static void fileExists(File file, String argFile) throws FileNotFoundException {
if (file == null) {
throw new IllegalArgumentException(argFile + " is null.");
}
if (!file.exists()) {
throw new FileNotFoundException(argFile);
}
} | public static void fileExists(File file, String argFile) throws FileNotFoundException {
<DeepExtract>
if (file == null) {
throw new IllegalArgumentException(argFile + " is null.");
}
</DeepExtract>
if (!file.exists()) {
throw new FileNotFoundException(argFile);
}
} | azure-kusto-java | positive | 439,317 |
@Override
protected void parseControllable(ComponentProvider provider, DEFINITION def) {
gauges.addAll(Readout.getReadouts(provider, frontLocomotiveRocking, ModelComponentType.COUPLED_X, ModelPosition.FRONT_LOCOMOTIVE, Readouts.COUPLED_FRONT));
gauges.addAll(Readout.getReadouts(provider, rearLocomotiveRocking, ModelCom... | @Override
protected void parseControllable(ComponentProvider provider, DEFINITION def) {
gauges.addAll(Readout.getReadouts(provider, frontLocomotiveRocking, ModelComponentType.COUPLED_X, ModelPosition.FRONT_LOCOMOTIVE, Readouts.COUPLED_FRONT));
gauges.addAll(Readout.getReadouts(provider, rearLocomotiveRocking, ModelCom... | ImmersiveRailroading | positive | 439,318 |
public void attach(@NonNull final ImageButton button, @NonNull final String session_id) {
button.setOnClickListener(new MyFavSessionButtonOnClickListener(session_id));
HashSet<ImageButton> buttons = sessionButtons.get(session_id);
if (buttons == null) {
buttons = new HashSet<>();
sessionButtons.put(session_id, buttons)... | public void attach(@NonNull final ImageButton button, @NonNull final String session_id) {
button.setOnClickListener(new MyFavSessionButtonOnClickListener(session_id));
HashSet<ImageButton> buttons = sessionButtons.get(session_id);
if (buttons == null) {
buttons = new HashSet<>();
sessionButtons.put(session_id, buttons)... | white-label-event-app | positive | 439,319 |
public void actionPerformed(ActionEvent pEvent) {
if (iCatSockAll.isSelected()) {
if (iCatSock1.isSelected() || iCatSock2.isSelected() || iCatSock3.isSelected() || iCatSock4.isSelected() || iCatSock5.isSelected() || iCatSock6.isSelected()) {
iCatSockAll.setSelected(false);
}
}
if (pEvent.getSource().equals(iCatSockAll)... | public void actionPerformed(ActionEvent pEvent) {
if (iCatSockAll.isSelected()) {
if (iCatSock1.isSelected() || iCatSock2.isSelected() || iCatSock3.isSelected() || iCatSock4.isSelected() || iCatSock5.isSelected() || iCatSock6.isSelected()) {
iCatSockAll.setSelected(false);
}
}
if (pEvent.getSource().equals(iCatSockAll)... | gomule | positive | 439,320 |
void notifyDeleted() {
running.set(false);
cancelConsumers();
stopDeliveryLoop();
} | void notifyDeleted() {
<DeepExtract>
running.set(false);
cancelConsumers();
stopDeliveryLoop();
</DeepExtract>
} | rabbitmq-mock | positive | 439,322 |
@Override
public Dimension getMinimumSize() {
return new Dimension(height * 2 + GUIConstants.SMALL_MARGIN, height);
} | @Override
public Dimension getMinimumSize() {
<DeepExtract>
return new Dimension(height * 2 + GUIConstants.SMALL_MARGIN, height);
</DeepExtract>
} | fsoinstaller | positive | 439,323 |
@Test
@Transactional
@WithMockUser(authorities = "SUPER-ADMIN")
public void getAllBalancesByCreatedByIsEqualToSomething() throws Exception {
balanceRepository.saveAndFlush(balance);
restBalanceMockMvc.perform(get("/api/balances?sort=id,desc&" + "createdBy.equals=" + DEFAULT_CREATED_BY)).andExpect(status().isOk()).andEx... | @Test
@Transactional
@WithMockUser(authorities = "SUPER-ADMIN")
public void getAllBalancesByCreatedByIsEqualToSomething() throws Exception {
balanceRepository.saveAndFlush(balance);
restBalanceMockMvc.perform(get("/api/balances?sort=id,desc&" + "createdBy.equals=" + DEFAULT_CREATED_BY)).andExpect(status().isOk()).andEx... | xm-ms-balance | positive | 439,324 |
@Override
protected void done(Object rvalue, Exception ex, boolean canceled) {
if (ex != null) {
ex.printStackTrace();
JOptionPane.showMessageDialog(JPanelCNCMilling.this, "Error during Milling (" + ex.toString() + ")");
}
if (GUIEvent == null) {
throw new RuntimeException("GUI EVENT NOT USED!");
}
GUIEvent.fired();
} | @Override
protected void done(Object rvalue, Exception ex, boolean canceled) {
if (ex != null) {
ex.printStackTrace();
JOptionPane.showMessageDialog(JPanelCNCMilling.this, "Error during Milling (" + ex.toString() + ")");
}
<DeepExtract>
if (GUIEvent == null) {
throw new RuntimeException("GUI EVENT NOT USED!");
}
GUIEve... | cncgcodecontroller | positive | 439,326 |
@Override
public void onError(Exception e) {
String errorString = null;
if (e instanceof UnsupportedDrmException) {
UnsupportedDrmException unsupportedDrmException = (UnsupportedDrmException) e;
errorString = getString(Util.SDK_INT < 18 ? R.string.video_error_drm_not_supported : unsupportedDrmException.reason == Unsupp... | @Override
public void onError(Exception e) {
String errorString = null;
if (e instanceof UnsupportedDrmException) {
UnsupportedDrmException unsupportedDrmException = (UnsupportedDrmException) e;
errorString = getString(Util.SDK_INT < 18 ? R.string.video_error_drm_not_supported : unsupportedDrmException.reason == Unsupp... | droidkaigi2016 | positive | 439,329 |
@Override
public String getDatabasePath() {
return compositeConfiguration.getString(DB_PATH.getKey());
} | @Override
public String getDatabasePath() {
<DeepExtract>
return compositeConfiguration.getString(DB_PATH.getKey());
</DeepExtract>
} | jbake | positive | 439,330 |
public void showMinutes(boolean animate) {
if (!mShowHours) {
return;
}
mShowHours = false;
if (animate) {
startHoursToMinutesAnimation();
}
if (mIs24HourMode) {
mOuterTextHours = mOuterHours24Texts;
mInnerTextHours = mInnerHours24Texts;
} else {
mOuterTextHours = mHours12Texts;
mInnerTextHours = mHours12Texts;
}
mMinu... | public void showMinutes(boolean animate) {
if (!mShowHours) {
return;
}
mShowHours = false;
if (animate) {
startHoursToMinutesAnimation();
}
<DeepExtract>
if (mIs24HourMode) {
mOuterTextHours = mOuterHours24Texts;
mInnerTextHours = mInnerHours24Texts;
} else {
mOuterTextHours = mHours12Texts;
mInnerTextHours = mHours12... | AppCompat-Extension-Library | positive | 439,331 |
public void actionPerformed(java.awt.event.ActionEvent evt) {
if (UseExternalEditor.isSelected()) {
return;
}
TextEditor1.get(iTab).paste();
FileChanged.set(iTab, true);
} | public void actionPerformed(java.awt.event.ActionEvent evt) {
<DeepExtract>
if (UseExternalEditor.isSelected()) {
return;
}
TextEditor1.get(iTab).paste();
FileChanged.set(iTab, true);
</DeepExtract>
} | ESPlorer | positive | 439,333 |
public void setLocationMeters(double xMeters, double yMeters) {
this.x = xMeters * VirtualField.PIXELS_PER_METER;
this.y = yMeters * VirtualField.PIXELS_PER_METER;
if (elementBody != null) {
Transform t = new Transform();
t.setTranslation(x / VirtualField.PIXELS_PER_METER, y / VirtualField.PIXELS_PER_METER);
t.setRotat... | public void setLocationMeters(double xMeters, double yMeters) {
<DeepExtract>
this.x = xMeters * VirtualField.PIXELS_PER_METER;
this.y = yMeters * VirtualField.PIXELS_PER_METER;
if (elementBody != null) {
Transform t = new Transform();
t.setTranslation(x / VirtualField.PIXELS_PER_METER, y / VirtualField.PIXELS_PER_METE... | virtual_robot | positive | 439,334 |
public com.google.assistant.embedded.v1alpha2.AudioInConfigOrBuilder getAudioInConfigOrBuilder() {
if (typeCase_ == 1) {
return (com.google.assistant.embedded.v1alpha2.AudioInConfig) type_;
}
return DEFAULT_INSTANCE;
} | public com.google.assistant.embedded.v1alpha2.AudioInConfigOrBuilder getAudioInConfigOrBuilder() {
if (typeCase_ == 1) {
return (com.google.assistant.embedded.v1alpha2.AudioInConfig) type_;
}
<DeepExtract>
return DEFAULT_INSTANCE;
</DeepExtract>
} | google-assistant-java-demo | positive | 439,335 |
public int testCall(int ii) {
return 123L + ii;
System.err.println("abc");
return;
return 123;
} | public int testCall(int ii) {
return 123L + ii;
System.err.println("abc");
<DeepExtract>
return;
</DeepExtract>
return 123;
} | bytekit | positive | 439,336 |
@Override
public void onClick(View v) {
if (!mIsMixing) {
Log.d(TAG, " start mix: ");
mAtomOpStart = true;
UCloudRtcSdkMixProfile mixProfile = UCloudRtcSdkMixProfile.getInstance().assembleUpdateMixParamsBuilder().type(UCloudRtcSdkMixProfile.MIX_TYPE_RELAY).layout(UCloudRtcSdkMixProfile.LAYOUT_CLASS_ROOM_2).resolution(1... | @Override
public void onClick(View v) {
<DeepExtract>
if (!mIsMixing) {
Log.d(TAG, " start mix: ");
mAtomOpStart = true;
UCloudRtcSdkMixProfile mixProfile = UCloudRtcSdkMixProfile.getInstance().assembleUpdateMixParamsBuilder().type(UCloudRtcSdkMixProfile.MIX_TYPE_RELAY).layout(UCloudRtcSdkMixProfile.LAYOUT_CLASS_ROOM_2... | urtc-android-demo | positive | 439,337 |
@Test
public void testOneSourceOneSegment() throws Exception {
final String streamName = RandomStringUtils.randomAlphabetic(20);
final String readerGroupName = FlinkPravegaUtils.generateRandomReaderGroupName();
PRAVEGA.operator().createTestStream(streamName, 1);
try (final EventStreamWriter<Integer> eventWriter = PRAVE... | @Test
public void testOneSourceOneSegment() throws Exception {
<DeepExtract>
final String streamName = RandomStringUtils.randomAlphabetic(20);
final String readerGroupName = FlinkPravegaUtils.generateRandomReaderGroupName();
PRAVEGA.operator().createTestStream(streamName, 1);
try (final EventStreamWriter<Integer> event... | flink-connectors | positive | 439,338 |
@Override
public void visit(TableNode tn) {
for (Node child : tn.getChildren()) {
child.accept(this);
}
} | @Override
public void visit(TableNode tn) {
<DeepExtract>
for (Node child : tn.getChildren()) {
child.accept(this);
}
</DeepExtract>
} | maven-confluence-plugin | positive | 439,339 |
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.mode_mix:
VIEW_MODE_CODE = Constants.MODE_MIX;
break;
case R.id.mode_no_image:
VIEW_MODE_CODE = Constants.MODE_NO_PIC;
break;
case R.id.mode_comic:
VIEW_MODE_CODE = Constants.MODE_COMMIC;
break;
}
AcApp.putInt("view_mod... | @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.mode_mix:
VIEW_MODE_CODE = Constants.MODE_MIX;
break;
case R.id.mode_no_image:
VIEW_MODE_CODE = Constants.MODE_NO_PIC;
break;
case R.id.mode_comic:
VIEW_MODE_CODE = Constants.MODE_COMMIC;
break;
}
AcApp.putInt("view_mod... | AcFun-Area63 | positive | 439,340 |
public Result visitTableScan(TableScan e) {
final String alias2 = SqlValidatorUtil.getAlias(new SqlIdentifier(e.getTable().getQualifiedName(), SqlParserPos.ZERO), -1);
final String alias3 = alias2 != null ? alias2 : "t";
final String alias4 = SqlValidatorUtil.uniquify(alias3, aliasSet, SqlValidatorUtil.EXPR_SUGGESTER);... | public Result visitTableScan(TableScan e) {
<DeepExtract>
final String alias2 = SqlValidatorUtil.getAlias(new SqlIdentifier(e.getTable().getQualifiedName(), SqlParserPos.ZERO), -1);
final String alias3 = alias2 != null ? alias2 : "t";
final String alias4 = SqlValidatorUtil.uniquify(alias3, aliasSet, SqlValidatorUtil.EX... | quark | positive | 439,341 |
public final void visitLink(final Link link) {
final IEdge edge = dotGraph.newEdge(vertexLUT.get(link.getStartNode().getName()), vertexLUT.get(link.getEndNode().getName()), currentLinkName, link);
final GrandUiPrefStore preferenceStore = Application.getInstance().getPreferenceStore();
if (link.hasAttributes(Link.ATTR_W... | public final void visitLink(final Link link) {
<DeepExtract>
final IEdge edge = dotGraph.newEdge(vertexLUT.get(link.getStartNode().getName()), vertexLUT.get(link.getEndNode().getName()), currentLinkName, link);
final GrandUiPrefStore preferenceStore = Application.getInstance().getPreferenceStore();
if (link.hasAttribut... | GrandUI | positive | 439,342 |
public static NumberParser longs() {
NumberFormat format = NumberFormat.getInstance();
format.setParseIntegerOnly(true);
return new NumberParser(format);
} | public static NumberParser longs() {
<DeepExtract>
NumberFormat format = NumberFormat.getInstance();
format.setParseIntegerOnly(true);
return new NumberParser(format);
</DeepExtract>
} | poiji | positive | 439,343 |
public ConfigFileCompleteData parseConfigFileAllOrFeatOpt(String configurationFileName, PrintStream error_stream) throws Exception {
ConfigFileCompleteData configurationFileData = null;
try {
configurationFileData = parseConfigFileAllHeaders(configurationFileName, error_stream);
} catch (Exception ex) {
}
if (configura... | public ConfigFileCompleteData parseConfigFileAllOrFeatOpt(String configurationFileName, PrintStream error_stream) throws Exception {
ConfigFileCompleteData configurationFileData = null;
try {
configurationFileData = parseConfigFileAllHeaders(configurationFileName, error_stream);
} catch (Exception ex) {
}
if (configura... | jSymbolic2 | positive | 439,345 |
protected void renderTileEntity() {
enableBlending();
ar.setStartTime(tileEntity.getTimer().getStart());
model.resetState();
if (direction == Door.DIR_SOUTH)
model.rotate(180, 0, 1, 0, 0, 0, 0);
if (direction == Door.DIR_EAST)
model.rotate(-90, 0, 1, 0, 0, 0, 0);
if (direction == Door.DIR_WEST)
model.rotate(90, 0, 1, 0... | protected void renderTileEntity() {
enableBlending();
ar.setStartTime(tileEntity.getTimer().getStart());
<DeepExtract>
model.resetState();
if (direction == Door.DIR_SOUTH)
model.rotate(180, 0, 1, 0, 0, 0, 0);
if (direction == Door.DIR_EAST)
model.rotate(-90, 0, 1, 0, 0, 0, 0);
if (direction == Door.DIR_WEST)
model.rota... | MalisisDoors | positive | 439,346 |
private void loadXMLSystem(String filename) {
this.sceneFilename = filename;
system.sceneName = filename.substring(0, filename.length() - 4);
System.out.println("loading " + filename);
factory.use = false;
deleteDisplayListRequest = true;
system.clear();
nextFrameNum = 0;
system.name = filename;
system.timestep = 0;
XM... | private void loadXMLSystem(String filename) {
this.sceneFilename = filename;
system.sceneName = filename.substring(0, filename.length() - 4);
System.out.println("loading " + filename);
factory.use = false;
deleteDisplayListRequest = true;
system.clear();
nextFrameNum = 0;
system.name = filename;
system.timestep = 0;
XM... | AdaptiveMerging | positive | 439,347 |
public Criteria andBz84LessThan(String value) {
if (value == null) {
throw new RuntimeException("Value for " + "bz84" + " cannot be null");
}
criteria.add(new Criterion("`bz84` <", value));
return (Criteria) this;
} | public Criteria andBz84LessThan(String value) {
<DeepExtract>
if (value == null) {
throw new RuntimeException("Value for " + "bz84" + " cannot be null");
}
criteria.add(new Criterion("`bz84` <", value));
</DeepExtract>
return (Criteria) this;
} | blockhealth | positive | 439,349 |
@SneakyThrows
public BladeFile put(String bucketName, InputStream stream, String key, boolean cover) {
if (!bucketExists(bucketName)) {
ossClient.createBucket(getBucketName(bucketName));
}
String originalName = key;
return ossRule.fileName(key);
if (cover) {
ossClient.putObject(getBucketName(bucketName), key, stream);
... | @SneakyThrows
public BladeFile put(String bucketName, InputStream stream, String key, boolean cover) {
if (!bucketExists(bucketName)) {
ossClient.createBucket(getBucketName(bucketName));
}
String originalName = key;
<DeepExtract>
return ossRule.fileName(key);
</DeepExtract>
if (cover) {
ossClient.putObject(getBucketNam... | blade-tool | positive | 439,350 |
@Override
public <T> void delete(List<T> entityList) {
Session session;
try {
session = sessionFactory.getCurrentSession();
} catch (Exception ignored) {
session = sessionFactory.openSession();
}
entityList.forEach(session::delete);
} | @Override
public <T> void delete(List<T> entityList) {
<DeepExtract>
Session session;
try {
session = sessionFactory.getCurrentSession();
} catch (Exception ignored) {
session = sessionFactory.openSession();
}
</DeepExtract>
entityList.forEach(session::delete);
} | niubi-job | positive | 439,351 |
public void invokeRefreshNewestAndRecommendedPodcasts() {
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(TIMEOUT * 1000).setConnectTimeout(TIMEOUT * 1000).build();
Credentials credentials = new UsernamePasswordCredentials("rest_user", "123rest");
AuthScope authscope = new AuthScope("localhost", 8... | public void invokeRefreshNewestAndRecommendedPodcasts() {
<DeepExtract>
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(TIMEOUT * 1000).setConnectTimeout(TIMEOUT * 1000).build();
Credentials credentials = new UsernamePasswordCredentials("rest_user", "123rest");
AuthScope authscope = new AuthScope(... | podcastpedia | positive | 439,352 |
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerAdvancedAchievementReception(PlayerAdvancedAchievementEvent event) {
Achievement achievement = event.getAchievement();
Player player = event.getPlayer();
if (!cacheManager.hasPlayerAchievement(player.getUniqueId(), achievement.g... | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerAdvancedAchievementReception(PlayerAdvancedAchievementEvent event) {
Achievement achievement = event.getAchievement();
Player player = event.getPlayer();
if (!cacheManager.hasPlayerAchievement(player.getUniqueId(), achievement.g... | advanced-achievements | positive | 439,356 |
public static final void downRight2Left(int i) {
int j1 = (973 - 197) / 5;
int k1 = (927 - 927) / 5;
StringBuffer stringbuffer = new StringBuffer();
stringbuffer.append(973).append(",").append(927);
int l1 = 0;
do {
if (l1 >= 5) {
stringbuffer.append(",").append(197).append(",").append(927);
exec("touch " + stringbuffe... | public static final void downRight2Left(int i) {
<DeepExtract>
int j1 = (973 - 197) / 5;
int k1 = (927 - 927) / 5;
StringBuffer stringbuffer = new StringBuffer();
stringbuffer.append(973).append(",").append(927);
int l1 = 0;
do {
if (l1 >= 5) {
stringbuffer.append(",").append(197).append(",").append(927);
exec("touch "... | ChangephoneUPoint | positive | 439,358 |
public void info(Marker marker, String format, Object... arguments) {
if (isLoggable(Level.INFO, marker)) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, arguments);
log(Level.INFO, marker, ft.getMessage(), ft.getThrowable());
}
} | public void info(Marker marker, String format, Object... arguments) {
<DeepExtract>
if (isLoggable(Level.INFO, marker)) {
FormattingTuple ft = MessageFormatter.arrayFormat(format, arguments);
log(Level.INFO, marker, ft.getMessage(), ft.getThrowable());
}
</DeepExtract>
} | beacon-simulator-android | positive | 439,359 |
private void resetLeft(float delta) {
mBorderBound.left += delta;
mBorderWidth = mBorderBound.width();
if (mBorderBound.left < mPreviewBound.left)
mBorderBound.left = mPreviewBound.left;
if (mBorderWidth < 2 * BORDER_CORNER_LENGTH)
mBorderBound.left = mBorderBound.right - 2 * BORDER_CORNER_LENGTH;
} | private void resetLeft(float delta) {
mBorderBound.left += delta;
mBorderWidth = mBorderBound.width();
<DeepExtract>
if (mBorderBound.left < mPreviewBound.left)
mBorderBound.left = mPreviewBound.left;
if (mBorderWidth < 2 * BORDER_CORNER_LENGTH)
mBorderBound.left = mBorderBound.right - 2 * BORDER_CORNER_LENGTH;
</DeepE... | ScreenCapture | positive | 439,360 |
public Spider repeatRequest(long period, Request request) {
if (getSpiderStatus() == SPIDER_STATUS_RUNNING) {
throw new SpiderException(String.format("Spider %s is already running!", name));
}
if (request != null) {
compositeDisposable.add(Flowable.interval(period, TimeUnit.MILLISECONDS).onBackpressureBuffer().subscrib... | public Spider repeatRequest(long period, Request request) {
<DeepExtract>
if (getSpiderStatus() == SPIDER_STATUS_RUNNING) {
throw new SpiderException(String.format("Spider %s is already running!", name));
}
</DeepExtract>
if (request != null) {
compositeDisposable.add(Flowable.interval(period, TimeUnit.MILLISECONDS).on... | NetDiscovery | positive | 439,361 |
public static ConstituencyBuilder constituency() {
withCode("E14000651").withName("Coventry South");
return this;
} | public static ConstituencyBuilder constituency() {
<DeepExtract>
withCode("E14000651").withName("Coventry South");
return this;
</DeepExtract>
} | vics | positive | 439,363 |
@Override
@SimCall
public void rmk(final SimCallback callback, final String vkeySource, final String vkeyTarget, final String funcscore) {
if (!basisOf.get(vkeySource).equals(basisOf.get(vkeyTarget))) {
throw new SimEngineException(String.format("Recommedation[%s_%s] must be between two vector set with same basis", vke... | @Override
@SimCall
public void rmk(final SimCallback callback, final String vkeySource, final String vkeyTarget, final String funcscore) {
<DeepExtract>
if (!basisOf.get(vkeySource).equals(basisOf.get(vkeyTarget))) {
throw new SimEngineException(String.format("Recommedation[%s_%s] must be between two vector set with sa... | simbase | positive | 439,366 |
@Override
public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
return StyleableProperties.STYLEABLES;
} | @Override
public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
<DeepExtract>
return StyleableProperties.STYLEABLES;
</DeepExtract>
} | jlatexmathfx | positive | 439,368 |
@AfterEach
@BeforeEach
public void setUpAndTearDown() throws IOException {
if (Files.exists(joalFoldersPath.getTorrentsDirPath())) {
Files.walk(joalFoldersPath.getTorrentsDirPath(), FileVisitOption.FOLLOW_LINKS).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
}
Files.createDirectory(joalFolde... | @AfterEach
@BeforeEach
public void setUpAndTearDown() throws IOException {
<DeepExtract>
if (Files.exists(joalFoldersPath.getTorrentsDirPath())) {
Files.walk(joalFoldersPath.getTorrentsDirPath(), FileVisitOption.FOLLOW_LINKS).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
}
Files.createDirec... | joal | positive | 439,370 |
public void endArray() {
writer.write(']');
context = context.getParent();
if (context == null) {
return;
}
final int state = context.getState();
int newState = -1;
switch(state) {
case PropertyKey:
newState = PropertyValue;
break;
case StartArray:
newState = ArrayValue;
break;
case ArrayValue:
break;
case StartObject:... | public void endArray() {
writer.write(']');
<DeepExtract>
context = context.getParent();
if (context == null) {
return;
}
final int state = context.getState();
int newState = -1;
switch(state) {
case PropertyKey:
newState = PropertyValue;
break;
case StartArray:
newState = ArrayValue;
break;
case ArrayValue:
break;
cas... | QuickMultidex | positive | 439,371 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.