id
int64
22
34.9k
original_code
stringlengths
31
107k
code_wo_comment
stringlengths
29
77.3k
cleancode
stringlengths
25
62.1k
repo
stringlengths
6
65
label
listlengths
4
4
25,273
@Override public IASTTranslationUnit getTranslationUnit(IFile fileToParse) throws UnsupportedDialectException { //TODO - At this time, we purely delegate blindly //In the future, we may need to delegate based upon context provided return defaultService.getTranslationUnit(fileToParse); }
@Override public IASTTranslationUnit getTranslationUnit(IFile fileToParse) throws UnsupportedDialectException { return defaultService.getTranslationUnit(fileToParse); }
@override public iasttranslationunit gettranslationunit(ifile filetoparse) throws unsupporteddialectexception { return defaultservice.gettranslationunit(filetoparse); }
seemoo-lab/polypyus_pdom
[ 0, 1, 0, 0 ]
25,274
@Override public IASTTranslationUnit getTranslationUnit(IFile fileToParse, ICodeReaderFactory fileCreator) throws UnsupportedDialectException { //TODO - At this time, we purely delegate blindly //In the future, we may need to delegate based upon context provided return defaultService.getTranslationUnit(...
@Override public IASTTranslationUnit getTranslationUnit(IFile fileToParse, ICodeReaderFactory fileCreator) throws UnsupportedDialectException { return defaultService.getTranslationUnit(fileToParse, fileCreator ); }
@override public iasttranslationunit gettranslationunit(ifile filetoparse, icodereaderfactory filecreator) throws unsupporteddialectexception { return defaultservice.gettranslationunit(filetoparse, filecreator ); }
seemoo-lab/polypyus_pdom
[ 0, 1, 0, 0 ]
25,275
@Override public IASTTranslationUnit getTranslationUnit(IFile fileToParse, ICodeReaderFactory fileCreator, IParserConfiguration configuration) throws UnsupportedDialectException { //TODO - At this time, we purely delegate blindly //In the future, we may need to delegate based upon context provided re...
@Override public IASTTranslationUnit getTranslationUnit(IFile fileToParse, ICodeReaderFactory fileCreator, IParserConfiguration configuration) throws UnsupportedDialectException { return defaultService.getTranslationUnit(fileToParse, fileCreator, configuration ); }
@override public iasttranslationunit gettranslationunit(ifile filetoparse, icodereaderfactory filecreator, iparserconfiguration configuration) throws unsupporteddialectexception { return defaultservice.gettranslationunit(filetoparse, filecreator, configuration ); }
seemoo-lab/polypyus_pdom
[ 0, 1, 0, 0 ]
25,276
@Override public IASTCompletionNode getCompletionNode(IFile fileToParse, int offset, ICodeReaderFactory fileCreator) throws UnsupportedDialectException { //TODO - At this time, we purely delegate blindly //In the future, we may need to delegate based upon context provided return def...
@Override public IASTCompletionNode getCompletionNode(IFile fileToParse, int offset, ICodeReaderFactory fileCreator) throws UnsupportedDialectException { return defaultService.getCompletionNode(fileToParse, offset, fileCreator); }
@override public iastcompletionnode getcompletionnode(ifile filetoparse, int offset, icodereaderfactory filecreator) throws unsupporteddialectexception { return defaultservice.getcompletionnode(filetoparse, offset, filecreator); }
seemoo-lab/polypyus_pdom
[ 0, 1, 0, 0 ]
25,277
@Override public IASTCompletionNode getCompletionNode(IStorage fileToParse, IProject project, int offset, ICodeReaderFactory fileCreator) throws UnsupportedDialectException { //TODO - At this time, we purely delegate blindly //In the future, we may need to delegate based upon context provid...
@Override public IASTCompletionNode getCompletionNode(IStorage fileToParse, IProject project, int offset, ICodeReaderFactory fileCreator) throws UnsupportedDialectException { return defaultService.getCompletionNode(fileToParse, project, offset, fileCreator); }
@override public iastcompletionnode getcompletionnode(istorage filetoparse, iproject project, int offset, icodereaderfactory filecreator) throws unsupporteddialectexception { return defaultservice.getcompletionnode(filetoparse, project, offset, filecreator); }
seemoo-lab/polypyus_pdom
[ 0, 1, 0, 0 ]
17,091
@Override public List<SpawnResult> writeOutputToFile( AbstractAction action, ActionExecutionContext actionExecutionContext, DeterministicWriter deterministicWriter, boolean makeExecutable, boolean isRemotable) throws ExecException { Path outputPath = actionExecutionContext.ge...
@Override public List<SpawnResult> writeOutputToFile( AbstractAction action, ActionExecutionContext actionExecutionContext, DeterministicWriter deterministicWriter, boolean makeExecutable, boolean isRemotable) throws ExecException { Path outputPath = actionExecutionContext.ge...
@override public list<spawnresult> writeoutputtofile( abstractaction action, actionexecutioncontext actionexecutioncontext, deterministicwriter deterministicwriter, boolean makeexecutable, boolean isremotable) throws execexception { path outputpath = actionexecutioncontext.getinputpath(iterables.getonlyelement(action.g...
sevki/bazel
[ 0, 1, 0, 0 ]
733
public static void stopTimerQueue() { singleton.stop(); singleton.queue = new PriorityQueue(); }
public static void stopTimerQueue() { singleton.stop(); singleton.queue = new PriorityQueue(); }
public static void stoptimerqueue() { singleton.stop(); singleton.queue = new priorityqueue(); }
rondinelisaad/lockss-daemon
[ 0, 0, 1, 0 ]
25,316
@Deprecated // caused issues https://github.com/holgerbrandl/r4intellij/issues/79 private static ArrayList<String> getInstallationFromPaths(@NotNull final String scriptName, @NotNull final String[] paths) { final ArrayList<String> result = new ArrayList<String>(); for (String path : paths) { ...
@Deprecated private static ArrayList<String> getInstallationFromPaths(@NotNull final String scriptName, @NotNull final String[] paths) { final ArrayList<String> result = new ArrayList<String>(); for (String path : paths) { final VirtualFile rootVDir = LocalFileSystem.getInsta...
@deprecated private static arraylist<string> getinstallationfrompaths(@notnull final string scriptname, @notnull final string[] paths) { final arraylist<string> result = new arraylist<string>(); for (string path : paths) { final virtualfile rootvdir = localfilesystem.getinstance().findfilebypath(path); if (rootvdir != ...
rillig/r4intellij
[ 0, 0, 1, 0 ]
784
@Test @Ignore //Fix or deprecate fromExecutor, this test might randomly hang on CI public void rejectedExecutionExceptionOnErrorSignalExecutor() throws InterruptedException { Exception exception = new IllegalStateException(); final AtomicReference<Throwable> throwableInOnOperatorError = new AtomicReference...
@Test @Ignore public void rejectedExecutionExceptionOnErrorSignalExecutor() throws InterruptedException { Exception exception = new IllegalStateException(); final AtomicReference<Throwable> throwableInOnOperatorError = new AtomicReference<>(); final AtomicReference<Object> dataInOnOperatorError = new Ato...
@test @ignore public void rejectedexecutionexceptiononerrorsignalexecutor() throws interruptedexception { exception exception = new illegalstateexception(); final atomicreference<throwable> throwableinonoperatorerror = new atomicreference<>(); final atomicreference<object> datainonoperatorerror = new atomicreference<>(...
steppedreckoner/reactor-core
[ 0, 0, 0, 1 ]
25,367
void stopSolver() { if (solverFuture != null) { // TODO what happens if solver hasn't started yet (solve() is called asynchronously) solver.terminateEarly(); // make sure solver has terminated and propagate exceptions try { solverFuture.get(); ...
void stopSolver() { if (solverFuture != null) { solver.terminateEarly(); try { solverFuture.get(); solverFuture = null; } catch (InterruptedException e) { Thread.currentThread().interrupt(); ...
void stopsolver() { if (solverfuture != null) { solver.terminateearly(); try { solverfuture.get(); solverfuture = null; } catch (interruptedexception e) { thread.currentthread().interrupt(); throw new runtimeexception("failed to stop solver", e); } catch (executionexception e) { throw new runtimeexception("failed to st...
rsynek-bot-account/optaweb-vehicle-routing
[ 1, 0, 0, 0 ]
813
@Override public boolean asyncCheckpoint(long fileId) throws AlluxioTException { return false; }
@Override public boolean asyncCheckpoint(long fileId) throws AlluxioTException { return false; }
@override public boolean asynccheckpoint(long fileid) throws alluxiotexception { return false; }
shaneknapp/tachyon
[ 1, 0, 0, 0 ]
825
private Instance marshall(ServiceInstance serviceInstance) { String hostname = serviceInstance.getHost(); String cluster = getClusterName(serviceInstance); Boolean status = Boolean.TRUE; //TODO: where to get? if (hostname != null && cluster != null && status != null) { Instance instance = new Instance(hostna...
private Instance marshall(ServiceInstance serviceInstance) { String hostname = serviceInstance.getHost(); String cluster = getClusterName(serviceInstance); Boolean status = Boolean.TRUE; if (hostname != null && cluster != null && status != null) { Instance instance = new Instance(hostname, cluster, status); ...
private instance marshall(serviceinstance serviceinstance) { string hostname = serviceinstance.gethost(); string cluster = getclustername(serviceinstance); boolean status = boolean.true; if (hostname != null && cluster != null && status != null) { instance instance = new instance(hostname, cluster, status); instance.ge...
royclarkson/spring-cloud-netflix
[ 1, 1, 0, 0 ]
17,289
@PostConstruct public void setup(){ //Do not use getClass() here... a typical weld issue... endpointUrl=appConfiguration.getBaseEndpoint() + ServiceProviderConfigWS.class.getAnnotation(Path.class).value(); }
@PostConstruct public void setup(){ endpointUrl=appConfiguration.getBaseEndpoint() + ServiceProviderConfigWS.class.getAnnotation(Path.class).value(); }
@postconstruct public void setup(){ endpointurl=appconfiguration.getbaseendpoint() + serviceproviderconfigws.class.getannotation(path.class).value(); }
shoebkhan09/oxTrust
[ 0, 0, 1, 0 ]
25,484
@Test public void testUserDefinedAggregateFunctionImplementsInterface() { final String empDept = JdbcTest.EmpDeptTableFactory.class.getName(); final String mySum3 = Smalls.MySum3.class.getName(); final String model = "{\n" + " version: '1.0',\n" + " schemas: [\n" + " {\n" ...
@Test public void testUserDefinedAggregateFunctionImplementsInterface() { final String empDept = JdbcTest.EmpDeptTableFactory.class.getName(); final String mySum3 = Smalls.MySum3.class.getName(); final String model = "{\n" + " version: '1.0',\n" + " schemas: [\n" + " {\n" ...
@test public void testuserdefinedaggregatefunctionimplementsinterface() { final string empdept = jdbctest.empdepttablefactory.class.getname(); final string mysum3 = smalls.mysum3.class.getname(); final string model = "{\n" + " version: '1.0',\n" + " schemas: [\n" + " {\n" + " name: 'adhoc',\n" + " tables: [\n" + " {\n"...
sarasara100/Quicksql
[ 0, 0, 0, 1 ]
25,500
@Override public void generateNormalAppearance() { PDAnnotationInk ink = (PDAnnotationInk) getAnnotation(); PDColor color = ink.getColor(); if (color == null || color.getComponents().length == 0) { return; } // PDF spec does not mention /Border for ink...
@Override public void generateNormalAppearance() { PDAnnotationInk ink = (PDAnnotationInk) getAnnotation(); PDColor color = ink.getColor(); if (color == null || color.getComponents().length == 0) { return; } AnnotationBorder ab = AnnotationBord...
@override public void generatenormalappearance() { pdannotationink ink = (pdannotationink) getannotation(); pdcolor color = ink.getcolor(); if (color == null || color.getcomponents().length == 0) { return; } annotationborder ab = annotationborder.getannotationborder(ink, ink.getborderstyle()); if (float.compare(ab.widt...
steven-g/pdfbox
[ 1, 0, 0, 0 ]
987
private OuterJoinPushDownResult processLimitedOuterJoin(RowExpression inheritedPredicate, RowExpression outerEffectivePredicate, RowExpression innerEffectivePredicate, RowExpression joinPredicate, Collection<VariableReferenceExpression> outerVariables) { checkArgument(Iterables.all(VariablesExtracto...
private OuterJoinPushDownResult processLimitedOuterJoin(RowExpression inheritedPredicate, RowExpression outerEffectivePredicate, RowExpression innerEffectivePredicate, RowExpression joinPredicate, Collection<VariableReferenceExpression> outerVariables) { checkArgument(Iterables.all(VariablesExtracto...
private outerjoinpushdownresult processlimitedouterjoin(rowexpression inheritedpredicate, rowexpression outereffectivepredicate, rowexpression innereffectivepredicate, rowexpression joinpredicate, collection<variablereferenceexpression> outervariables) { checkargument(iterables.all(variablesextractor.extractunique(oute...
shrinidhijoshi/presto
[ 1, 0, 0, 0 ]
17,401
public static SqlTypeName zetaSqlTypeToCalciteType(TypeKind zetaSqlType) { switch (zetaSqlType) { case TYPE_INT64: return SqlTypeName.BIGINT; case TYPE_NUMERIC: return SqlTypeName.DECIMAL; case TYPE_DOUBLE: return SqlTypeName.DOUBLE; case TYPE_STRING: return S...
public static SqlTypeName zetaSqlTypeToCalciteType(TypeKind zetaSqlType) { switch (zetaSqlType) { case TYPE_INT64: return SqlTypeName.BIGINT; case TYPE_NUMERIC: return SqlTypeName.DECIMAL; case TYPE_DOUBLE: return SqlTypeName.DOUBLE; case TYPE_STRING: return S...
public static sqltypename zetasqltypetocalcitetype(typekind zetasqltype) { switch (zetasqltype) { case type_int64: return sqltypename.bigint; case type_numeric: return sqltypename.decimal; case type_double: return sqltypename.double; case type_string: return sqltypename.varchar; case type_timestamp: return sqltypename....
stephenoken/beam
[ 0, 1, 0, 0 ]
33,808
private boolean checkPermission(Cluster cluster, boolean readOnly) { for (GrantedAuthority grantedAuthority : securityHelper.getCurrentAuthorities()) { if (grantedAuthority instanceof AmbariGrantedAuthority) { AmbariGrantedAuthority authority = (AmbariGrantedAuthority) grantedAuthority; ...
private boolean checkPermission(Cluster cluster, boolean readOnly) { for (GrantedAuthority grantedAuthority : securityHelper.getCurrentAuthorities()) { if (grantedAuthority instanceof AmbariGrantedAuthority) { AmbariGrantedAuthority authority = (AmbariGrantedAuthority) grantedAuthority; ...
private boolean checkpermission(cluster cluster, boolean readonly) { for (grantedauthority grantedauthority : securityhelper.getcurrentauthorities()) { if (grantedauthority instanceof ambarigrantedauthority) { ambarigrantedauthority authority = (ambarigrantedauthority) grantedauthority; privilegeentity privilegeentity ...
runningt/ambari
[ 1, 0, 0, 0 ]
1,051
@Override public ShuffleDataModel.KValueTypeId getKValueTypeId() { int val = ngetKValueTypeId(this.pointerToStore); if (val==ShuffleDataModel.KValueTypeId.Int.state){ return ShuffleDataModel.KValueTypeId.Int; } else if (val == ShuffleDataModel.KValueTypeId.Long.state){ ...
@Override public ShuffleDataModel.KValueTypeId getKValueTypeId() { int val = ngetKValueTypeId(this.pointerToStore); if (val==ShuffleDataModel.KValueTypeId.Int.state){ return ShuffleDataModel.KValueTypeId.Int; } else if (val == ShuffleDataModel.KValueTypeId.Long.state){ ...
@override public shuffledatamodel.kvaluetypeid getkvaluetypeid() { int val = ngetkvaluetypeid(this.pointertostore); if (val==shuffledatamodel.kvaluetypeid.int.state){ return shuffledatamodel.kvaluetypeid.int; } else if (val == shuffledatamodel.kvaluetypeid.long.state){ return shuffledatamodel.kvaluetypeid.long; } else ...
sparkle-plugin/sparkle
[ 1, 0, 0, 0 ]
9,251
public Optional<ClassName> copierClassFor(MemberModel memberModel) { if (canCopyReference(memberModel)) { return Optional.empty(); } if (canUseStandardCopier(memberModel)) { return Optional.of(ClassName.get(StandardMemberCopier.class)); } // FIXME: Ugly ha...
public Optional<ClassName> copierClassFor(MemberModel memberModel) { if (canCopyReference(memberModel)) { return Optional.empty(); } if (canUseStandardCopier(memberModel)) { return Optional.of(ClassName.get(StandardMemberCopier.class)); } ...
public optional<classname> copierclassfor(membermodel membermodel) { if (cancopyreference(membermodel)) { return optional.empty(); } if (canusestandardcopier(membermodel)) { return optional.of(classname.get(standardmembercopier.class)); } string shapename = membermodel.getc2jshape(); if (shapename.substring(0, 1).tolow...
slachiewicz/aws-sdk-java-v2
[ 1, 0, 0, 0 ]
1,396
private synchronized void fillCostMapWithGeometries() { if (mGeometryList.isEmpty()) { Log.wtf(TAG, "Empty geometries list"); setValid(false); return; } // Get the grid boundaries to determine the size of the cost map. double[][] positions = findGeomet...
private synchronized void fillCostMapWithGeometries() { if (mGeometryList.isEmpty()) { Log.wtf(TAG, "Empty geometries list"); setValid(false); return; } double[][] positions = findGeometriesBoundaries(); if (positions == null) { Log...
private synchronized void fillcostmapwithgeometries() { if (mgeometrylist.isempty()) { log.wtf(tag, "empty geometries list"); setvalid(false); return; } double[][] positions = findgeometriesboundaries(); if (positions == null) { log.wtf(tag, "could not find grid boundaries"); setvalid(false); return; } makegrid(positio...
rhickman/cellbots3
[ 1, 0, 0, 0 ]
1,397
private synchronized double[][] findGeometriesBoundaries() { if (mGeometryList.isEmpty()) { Log.wtf(TAG, "Empty geometries list"); return null; } double minX = Double.MAX_VALUE; double maxX = -Double.MAX_VALUE; double minY = Double.MAX_VALUE; doubl...
private synchronized double[][] findGeometriesBoundaries() { if (mGeometryList.isEmpty()) { Log.wtf(TAG, "Empty geometries list"); return null; } double minX = Double.MAX_VALUE; double maxX = -Double.MAX_VALUE; double minY = Double.MAX_VALUE; doubl...
private synchronized double[][] findgeometriesboundaries() { if (mgeometrylist.isempty()) { log.wtf(tag, "empty geometries list"); return null; } double minx = double.max_value; double maxx = -double.max_value; double miny = double.max_value; double maxy = -double.max_value; for (geometry g : mgeometrylist) { int size ...
rhickman/cellbots3
[ 1, 0, 0, 0 ]
34,326
public String exportAll(String filename) throws IOException { // currently only support python - maybe in future we'll support js too String python = LangUtils.toPython(); Files.write(Paths.get(filename), python.toString().getBytes()); info("saved %s to %s", getName(), filename); return python; }
public String exportAll(String filename) throws IOException { String python = LangUtils.toPython(); Files.write(Paths.get(filename), python.toString().getBytes()); info("saved %s to %s", getName(), filename); return python; }
public string exportall(string filename) throws ioexception { string python = langutils.topython(); files.write(paths.get(filename), python.tostring().getbytes()); info("saved %s to %s", getname(), filename); return python; }
srayner/myrobotlab
[ 1, 0, 0, 0 ]
26,189
private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed try { // TODO add your handling code here: try { clip.stop(); } catch(Exception e) { } try { C...
private void addButtonActionPerformed(java.awt.event.ActionEvent evt) { try { try { clip.stop(); } catch(Exception e) { } try { Class.forName("oracle.jdbc.driver.OracleDriver"); } catch (ClassNotFo...
private void addbuttonactionperformed(java.awt.event.actionevent evt) { try { try { clip.stop(); } catch(exception e) { } try { class.forname("oracle.jdbc.driver.oracledriver"); } catch (classnotfoundexception ex) { logger.getlogger(adminview.class.getname()).log(level.severe, null, ex); } connection con=drivermanager....
shivamkumar78/Music_Application
[ 0, 1, 0, 0 ]
26,190
private void addArtistActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addArtistActionPerformed // TODO add your handling code here: try { // TODO add your handling code here: searchText.setText(""); try { Class.forName("oracle.jdbc.d...
private void addArtistActionPerformed(java.awt.event.ActionEvent evt) { try { searchText.setText(""); try { Class.forName("oracle.jdbc.driver.OracleDriver"); } catch (ClassNotFoundException ex) { Logger.getLogger(AdminView.cl...
private void addartistactionperformed(java.awt.event.actionevent evt) { try { searchtext.settext(""); try { class.forname("oracle.jdbc.driver.oracledriver"); } catch (classnotfoundexception ex) { logger.getlogger(adminview.class.getname()).log(level.severe, null, ex); } jtextfield name = new jtextfield(); jtextfield ab...
shivamkumar78/Music_Application
[ 0, 1, 0, 0 ]
26,191
private void addAlbumActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addAlbumActionPerformed // TODO add your handling code here: try { // TODO add your handling code here: try { Class.forName("oracle.jdbc.driver.OracleDriver"); } ca...
private void addAlbumActionPerformed(java.awt.event.ActionEvent evt) { try { try { Class.forName("oracle.jdbc.driver.OracleDriver"); } catch (ClassNotFoundException ex) { Logger.getLogger(AdminView.class.getName()).log(Level.SEVERE, null...
private void addalbumactionperformed(java.awt.event.actionevent evt) { try { try { class.forname("oracle.jdbc.driver.oracledriver"); } catch (classnotfoundexception ex) { logger.getlogger(adminview.class.getname()).log(level.severe, null, ex); } jtextfield name = new jtextfield(); object[] input = { "name : ", name, };...
shivamkumar78/Music_Application
[ 0, 1, 0, 0 ]
26,243
public RunResult run(RunDecision runDecision) throws DetectUserFriendlyException, InterruptedException, IntegrationException { //TODO: Better way for run manager to get dependencies so he can be tested. (And better ways of creating his objects) final DetectConfiguration detectConfiguration = detectConte...
public RunResult run(RunDecision runDecision) throws DetectUserFriendlyException, InterruptedException, IntegrationException { final DetectConfiguration detectConfiguration = detectContext.getBean(DetectConfiguration.class); final DetectConfigurationFactory detectConfigurationFactory = detectCon...
public runresult run(rundecision rundecision) throws detectuserfriendlyexception, interruptedexception, integrationexception { final detectconfiguration detectconfiguration = detectcontext.getbean(detectconfiguration.class); final detectconfigurationfactory detectconfigurationfactory = detectcontext.getbean(detectconfi...
selaliadobor-wt/synopsys-detect
[ 1, 0, 0, 0 ]
18,139
public float getBending_damping() throws IOException { if ((__io__pointersize == 8)) { return __io__block.readFloat(__io__address + 160); } else { return __io__block.readFloat(__io__address + 156); } }
public float getBending_damping() throws IOException { if ((__io__pointersize == 8)) { return __io__block.readFloat(__io__address + 160); } else { return __io__block.readFloat(__io__address + 156); } }
public float getbending_damping() throws ioexception { if ((__io__pointersize == 8)) { return __io__block.readfloat(__io__address + 160); } else { return __io__block.readfloat(__io__address + 156); } }
sirivus/studioonline
[ 1, 0, 0, 0 ]
18,140
public void setBending_damping(float bending_damping) throws IOException { if ((__io__pointersize == 8)) { __io__block.writeFloat(__io__address + 160, bending_damping); } else { __io__block.writeFloat(__io__address + 156, bending_damping); } }
public void setBending_damping(float bending_damping) throws IOException { if ((__io__pointersize == 8)) { __io__block.writeFloat(__io__address + 160, bending_damping); } else { __io__block.writeFloat(__io__address + 156, bending_damping); } }
public void setbending_damping(float bending_damping) throws ioexception { if ((__io__pointersize == 8)) { __io__block.writefloat(__io__address + 160, bending_damping); } else { __io__block.writefloat(__io__address + 156, bending_damping); } }
sirivus/studioonline
[ 1, 0, 0, 0 ]
18,263
public static <T> VectorModel minimize(LossDefinition<T> lossDefinition, Collection<Observation<T>> observations, int dimensionality, double learningRate, ...
public static <T> VectorModel minimize(LossDefinition<T> lossDefinition, Collection<Observation<T>> observations, int dimensionality, double learningRate, ...
public static <t> vectormodel minimize(lossdefinition<t> lossdefinition, collection<observation<t>> observations, int dimensionality, double learningrate, int numrepetitions, double minstepsize) { final random random = new random(); vectormodel bestmodel = null; double bestloss = double.nan; for (int repetition = 0; re...
stratosphere/metadata-store
[ 1, 0, 0, 0 ]
18,305
public Session getSession(String sessionId) { // TODO lock sessions to prevent fetching an expired session? Session session = sessions.get(sessionId); if (session == null) { String msg = String.format("Session: %s does not exist.", sessionId); LOG.error(msg); throw new SqlGatewayException(msg); } ses...
public Session getSession(String sessionId) { Session session = sessions.get(sessionId); if (session == null) { String msg = String.format("Session: %s does not exist.", sessionId); LOG.error(msg); throw new SqlGatewayException(msg); } session.touch(); return session; }
public session getsession(string sessionid) { session session = sessions.get(sessionid); if (session == null) { string msg = string.format("session: %s does not exist.", sessionid); log.error(msg); throw new sqlgatewayexception(msg); } session.touch(); return session; }
romainr/flink-sql-gateway
[ 0, 1, 0, 0 ]
34,775
public void sendHandshakeRecord(TlsHandshakeMessage handshakeMessage) { TlsPlaintextRecord record = new TlsPlaintextRecord(TlsConstants.HANDSHAKE, version); TlsHandshakeFragment fragment = new HandshakeFragment(handshakeMessage); record.setFragment(fragment); byte[] encoded = record.enco...
public void sendHandshakeRecord(TlsHandshakeMessage handshakeMessage) { TlsPlaintextRecord record = new TlsPlaintextRecord(TlsConstants.HANDSHAKE, version); TlsHandshakeFragment fragment = new HandshakeFragment(handshakeMessage); record.setFragment(fragment); byte[] encoded = record.enco...
public void sendhandshakerecord(tlshandshakemessage handshakemessage) { tlsplaintextrecord record = new tlsplaintextrecord(tlsconstants.handshake, version); tlshandshakefragment fragment = new handshakefragment(handshakemessage); record.setfragment(fragment); byte[] encoded = record.encode(); bytebuffer buffer = bytebu...
swbrenneis/secomm-tls-java
[ 0, 1, 0, 0 ]
34,776
public void sendAlertRecord(AlertFragment alertFragment) { TlsPlaintextRecord record = new TlsPlaintextRecord(TlsConstants.ALERT, version); record.setFragment(alertFragment); byte[] encoded = record.encode(); ByteBuffer buffer = ByteBuffer.wrap(encoded); connectionManager.write(b...
public void sendAlertRecord(AlertFragment alertFragment) { TlsPlaintextRecord record = new TlsPlaintextRecord(TlsConstants.ALERT, version); record.setFragment(alertFragment); byte[] encoded = record.encode(); ByteBuffer buffer = ByteBuffer.wrap(encoded); connectionManager.write(b...
public void sendalertrecord(alertfragment alertfragment) { tlsplaintextrecord record = new tlsplaintextrecord(tlsconstants.alert, version); record.setfragment(alertfragment); byte[] encoded = record.encode(); bytebuffer buffer = bytebuffer.wrap(encoded); connectionmanager.write(buffer, new completionhandler<integer, co...
swbrenneis/secomm-tls-java
[ 0, 1, 0, 0 ]
2,041
public String getPrimaryKeyColumn(String tableName) { // FIXME: Currently working for PostgreSQL only if (this.dbSystem.equals("POSTGRESQL")) { String sqlPrimaryKey = "SELECT a.attname FROM pg_index i JOIN pg_attribute a ON a.attrelid = i.indrelid AND a.attnum = ANY(i.indkey) WHERE i.indrelid = '" + tableName + ...
public String getPrimaryKeyColumn(String tableName) { if (this.dbSystem.equals("POSTGRESQL")) { String sqlPrimaryKey = "SELECT a.attname FROM pg_index i JOIN pg_attribute a ON a.attrelid = i.indrelid AND a.attnum = ANY(i.indkey) WHERE i.indrelid = '" + tableName + "'::regclass AND i.indisprimary;"; return (St...
public string getprimarykeycolumn(string tablename) { if (this.dbsystem.equals("postgresql")) { string sqlprimarykey = "select a.attname from pg_index i join pg_attribute a on a.attrelid = i.indrelid and a.attnum = any(i.indkey) where i.indrelid = '" + tablename + "'::regclass and i.indisprimary;"; return (string) find...
smartdatalake/simsearch
[ 1, 1, 0, 0 ]
18,449
public static BufferedImage getPDFPageImage(File pdfFile, int pageNumber) throws Exception { PDDocument document = null; BufferedImage pageImage = null; try { document = PDDocument.load(pdfFile); if (document.isEncrypted()) { throw new Exception("Cannot re...
public static BufferedImage getPDFPageImage(File pdfFile, int pageNumber) throws Exception { PDDocument document = null; BufferedImage pageImage = null; try { document = PDDocument.load(pdfFile); if (document.isEncrypted()) { throw new Exception("Cannot re...
public static bufferedimage getpdfpageimage(file pdffile, int pagenumber) throws exception { pddocument document = null; bufferedimage pageimage = null; try { document = pddocument.load(pdffile); if (document.isencrypted()) { throw new exception("cannot read an encrypted pdf file."); } pdfrenderer pdfrenderer = new pdf...
rquast/formreturn
[ 0, 0, 0, 0 ]
10,298
@Override public void close() { // Stop the thread. interrupt(); // After the interrupt, the run() method will stop Tun2Socks, and then complete. // We need to wait until that is finished before closing the TUN device. try { join(); } catch (InterruptedException e) { // This is wei...
@Override public void close() { interrupt(); try { join(); } catch (InterruptedException e) { LogWrapper.report(e); } try { tunFd.close(); } catch (IOException e) { LogWrapper.report(e); } }
@override public void close() { interrupt(); try { join(); } catch (interruptedexception e) { logwrapper.report(e); } try { tunfd.close(); } catch (ioexception e) { logwrapper.report(e); } }
superhero75/Intra
[ 0, 0, 1, 0 ]
10,520
@Override public Builder setPath(Path absolutePath, Path ideallyRelative) throws IOException { // TODO(plamenko): this check should not be necessary, but otherwise some tests fail due to // FileHashLoader throwing NoSuchFileException which doesn't get correctly propagated. if (inputSizeLimit != Lo...
@Override public Builder setPath(Path absolutePath, Path ideallyRelative) throws IOException { if (inputSizeLimit != Long.MAX_VALUE) { sizeLimiter.add(fileHashLoader.getSize(absolutePath)); } super.setPath(absolutePath, ideallyRelative); return this; }
@override public builder setpath(path absolutepath, path ideallyrelative) throws ioexception { if (inputsizelimit != long.max_value) { sizelimiter.add(filehashloader.getsize(absolutepath)); } super.setpath(absolutepath, ideallyrelative); return this; }
stefb965/buck
[ 0, 0, 1, 0 ]
18,792
@Test public void testallocateContainerDistributesAllocation() throws Exception { /* This is a lame test, we should really be testing something like z-score or make sure that we don't have 3sigma kind of events. Too lazy to write all that code. This test very lamely tests if we have more than 5 separa...
@Test public void testallocateContainerDistributesAllocation() throws Exception { Set<UUID> pipelineList = new TreeSet<>(); for (int x = 0; x < 30; x++) { ContainerInfo containerInfo = containerManager.allocateContainer( replicationType, replicationFactor, OzoneConsts.OZONE); Assert....
@test public void testallocatecontainerdistributesallocation() throws exception { set<uuid> pipelinelist = new treeset<>(); for (int x = 0; x < 30; x++) { containerinfo containerinfo = containermanager.allocatecontainer( replicationtype, replicationfactor, ozoneconsts.ozone); assert.assertnotnull(containerinfo); assert...
smengcl/hadoop-ozone
[ 1, 0, 0, 0 ]
10,608
@BeforeClass public static void createInput() throws IOException { // TODO: set up your sample input object here. input = null; }
@BeforeClass public static void createInput() throws IOException { input = null; }
@beforeclass public static void createinput() throws ioexception { input = null; }
rt-di/usageserver
[ 0, 1, 0, 0 ]
18,984
private void newNoMatchStopsRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newNoMatchStopsRadioButtonActionPerformed // TODO change text on button to add updateStopCategory(gtfsUploadNoConflict, 0); dontuploadAllBtn.setEnabled(true); }
private void newNoMatchStopsRadioButtonActionPerformed(java.awt.event.ActionEvent evt) { updateStopCategory(gtfsUploadNoConflict, 0); dontuploadAllBtn.setEnabled(true); }
private void newnomatchstopsradiobuttonactionperformed(java.awt.event.actionevent evt) { updatestopcategory(gtfsuploadnoconflict, 0); dontuploadallbtn.setenabled(true); }
reubot/gtfs-osm-sync
[ 0, 1, 0, 0 ]
19,409
private static int offsetToLine(String text, int offset) { return offsetToLine(text, 0, offset); }
private static int offsetToLine(String text, int offset) { return offsetToLine(text, 0, offset); }
private static int offsettoline(string text, int offset) { return offsettoline(text, 0, offset); }
sylviawan/oop_assignment1
[ 1, 0, 0, 0 ]
19,410
private static int offsetToLine(String text, int start, int offset) { int line = 0; while (offset >= start) { offset = text.lastIndexOf('\n', offset-1); line++; } return line - 1; }
private static int offsetToLine(String text, int start, int offset) { int line = 0; while (offset >= start) { offset = text.lastIndexOf('\n', offset-1); line++; } return line - 1; }
private static int offsettoline(string text, int start, int offset) { int line = 0; while (offset >= start) { offset = text.lastindexof('\n', offset-1); line++; } return line - 1; }
sylviawan/oop_assignment1
[ 1, 0, 0, 0 ]
19,420
@Test(dataProvider = "collectionsAndVersion") public void testIteration(CollectionOp op, ProtocolVersion version) throws IOException { Map<String, String> dataIn = new HashMap<>(); dataIn.put("aKey", "aValue"); dataIn.put("bKey", "bValue"); RemoteCache<Object, Object> cacheToUse; Remote...
@Test(dataProvider = "collectionsAndVersion") public void testIteration(CollectionOp op, ProtocolVersion version) throws IOException { Map<String, String> dataIn = new HashMap<>(); dataIn.put("aKey", "aValue"); dataIn.put("bKey", "bValue"); RemoteCache<Object, Object> cacheToUse; Remote...
@test(dataprovider = "collectionsandversion") public void testiteration(collectionop op, protocolversion version) throws ioexception { map<string, string> datain = new hashmap<>(); datain.put("akey", "avalue"); datain.put("bkey", "bvalue"); remotecache<object, object> cachetouse; remotecachemanager temporarymanager; if...
shawkins/infinispan-1
[ 0, 0, 1, 0 ]
11,310
public static int insertWMFromFile(String species, String wmname, String wmversion, String wmtype, String wmfile) throws SQLException, NotFoundException, UnknownRol...
public static int insertWMFromFile(String species, String wmname, String wmversion, String wmtype, String wmfile) throws SQLException, NotFoundException, UnknownRol...
public static int insertwmfromfile(string species, string wmname, string wmversion, string wmtype, string wmfile) throws sqlexception, notfoundexception, unknownroleexception, filenotfoundexception, parseexception, ioexception { weightmatrix matrix; system.err.println("name " + wmname + " version " + wmversion + " type...
seqcode/seqcode-core
[ 0, 1, 0, 0 ]
11,311
public static int insertWMFromFile(String species, String wmname, String wmversion, String wmtype, String wmfile, String bgFreq) throws SQLException, NotFoundException, UnknownRoleException, FileNotFoundException, ParseException, IOException { WeightMatrix matrix; if (wmtype.matches(".*TAMO.*")) { matr...
public static int insertWMFromFile(String species, String wmname, String wmversion, String wmtype, String wmfile, String bgFreq) throws SQLException, NotFoundException, UnknownRoleException, FileNotFoundException, ParseException, IOException { WeightMatrix matrix; if (wmtype.matches(".*TAMO.*")) { matr...
public static int insertwmfromfile(string species, string wmname, string wmversion, string wmtype, string wmfile, string bgfreq) throws sqlexception, notfoundexception, unknownroleexception, filenotfoundexception, parseexception, ioexception { weightmatrix matrix; if (wmtype.matches(".*tamo.*")) { matrix = pwmparser.re...
seqcode/seqcode-core
[ 0, 1, 0, 0 ]
19,634
@Override public MergerToken createSetNotNullToDb(DbEntity entity, DbAttribute column) { return new SetNotNullToDb(entity, column) { @Override public List<String> createSql(DbAdapter adapter) { /* * TODO: we generate this query as in ingres db documen...
@Override public MergerToken createSetNotNullToDb(DbEntity entity, DbAttribute column) { return new SetNotNullToDb(entity, column) { @Override public List<String> createSql(DbAdapter adapter) { StringBuilder sqlBuffer = new StringBuilder(); ...
@override public mergertoken createsetnotnulltodb(dbentity entity, dbattribute column) { return new setnotnulltodb(entity, column) { @override public list<string> createsql(dbadapter adapter) { stringbuilder sqlbuffer = new stringbuilder(); quotingstrategy context = adapter.getquotingstrategy(); sqlbuffer.append("alter...
rohankumardubey/cayenne
[ 0, 0, 1, 0 ]
19,696
public static CDI<Object> current() { if (INSTANCE == null) { INSTANCE = ServiceLoader.load(CDIProvider.class).iterator().next().getCDI(); } return INSTANCE; //X TODO implement! }
public static CDI<Object> current() { if (INSTANCE == null) { INSTANCE = ServiceLoader.load(CDIProvider.class).iterator().next().getCDI(); } return INSTANCE; }
public static cdi<object> current() { if (instance == null) { instance = serviceloader.load(cdiprovider.class).iterator().next().getcdi(); } return instance; }
salyh/geronimo-specs
[ 0, 1, 0, 0 ]
19,697
public static void setCDIProvider(CDIProvider provider) { //X TODO implement! if (provider == null) { INSTANCE = null; } else { INSTANCE = provider.getCDI(); } }
public static void setCDIProvider(CDIProvider provider) { if (provider == null) { INSTANCE = null; } else { INSTANCE = provider.getCDI(); } }
public static void setcdiprovider(cdiprovider provider) { if (provider == null) { instance = null; } else { instance = provider.getcdi(); } }
salyh/geronimo-specs
[ 1, 1, 0, 0 ]
19,886
@Override @Committing @PureWithSideEffects @SuppressWarnings("UseSpecificCatch") public void run() { try { final @Nonnull String address = getSocket().getInetAddress().getHostAddress(); Log.debugging("Received a request from $.", address); final @Nonnull Time ...
@Override @Committing @PureWithSideEffects @SuppressWarnings("UseSpecificCatch") public void run() { try { final @Nonnull String address = getSocket().getInetAddress().getHostAddress(); Log.debugging("Received a request from $.", address); final @Nonnull Time ...
@override @committing @purewithsideeffects @suppresswarnings("usespecificcatch") public void run() { try { final @nonnull string address = getsocket().getinetaddress().gethostaddress(); log.debugging("received a request from $.", address); final @nonnull time start = timebuilder.build(); @nullable encryption<signature<...
stephaniestroka/digitalid-core
[ 1, 0, 0, 0 ]
3,591
public static void popupManager(final View view, final SoundObject soundObject){ // Declare PopupMenu and assign it to the design created in longclick.xml PopupMenu popup = new PopupMenu(view.getContext(), view); popup.getMenuInflater().inflate(R.menu.longclick, popup.getMenu()); // Hand...
public static void popupManager(final View view, final SoundObject soundObject){ PopupMenu popup = new PopupMenu(view.getContext(), view); popup.getMenuInflater().inflate(R.menu.longclick, popup.getMenu()); popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() ...
public static void popupmanager(final view view, final soundobject soundobject){ popupmenu popup = new popupmenu(view.getcontext(), view); popup.getmenuinflater().inflate(r.menu.longclick, popup.getmenu()); popup.setonmenuitemclicklistener(new popupmenu.onmenuitemclicklistener() { @override public boolean onmenuitemcli...
scubedcombd/Sacred_Games_Soundboard
[ 1, 0, 0, 0 ]
3,789
private void addNoteAsFingerMarker(byte[] dat) { final int command = dat[0] & 0xf0; final int channel = dat[0] & 0x0f; int note = dat[1]; final int velocity = dat[2]; // if (type == NOTE_ON || type == NOTE_OFF) if ((command & 0x80) == 0x80) { // only show if channel switch is on if (GuitarChannel.isC...
private void addNoteAsFingerMarker(byte[] dat) { final int command = dat[0] & 0xf0; final int channel = dat[0] & 0x0f; int note = dat[1]; final int velocity = dat[2]; if ((command & 0x80) == 0x80) { if (GuitarChannel.isChannelEnabled(chanTog, channel)) { GuitarChannel guitarchannel = GuitarChannel...
private void addnoteasfingermarker(byte[] dat) { final int command = dat[0] & 0xf0; final int channel = dat[0] & 0x0f; int note = dat[1]; final int velocity = dat[2]; if ((command & 0x80) == 0x80) { if (guitarchannel.ischannelenabled(chantog, channel)) { guitarchannel guitarchannel = guitarchannel.get(gchannels, channe...
rsampson/GuitarView
[ 0, 0, 1, 0 ]
3,880
@Test public void shouldReturnExpectedResponseWhenGetRequestMadeOverSslWithTlsVersion_1_3() throws Exception { // The following is a bad practice: conditionally running this test only if 'TLSv1.3' is supported by the JDK if (new HashSet<>(asList(SslUtils.enabledProtocols())).contains(TLS_v1_3)) { ...
@Test public void shouldReturnExpectedResponseWhenGetRequestMadeOverSslWithTlsVersion_1_3() throws Exception { if (new HashSet<>(asList(SslUtils.enabledProtocols())).contains(TLS_v1_3)) { makeRequestAndAssert(buildHttpClient(TLS_v1_3)); } else { assertThat(true).isTru...
@test public void shouldreturnexpectedresponsewhengetrequestmadeoversslwithtlsversion_1_3() throws exception { if (new hashset<>(aslist(sslutils.enabledprotocols())).contains(tls_v1_3)) { makerequestandassert(buildhttpclient(tls_v1_3)); } else { assertthat(true).istrue(); } }
rohankumardubey/stubby4j
[ 0, 0, 0, 1 ]
12,261
public void register() { if (!isRegistered) { VirtualFileManager.getInstance().addAsyncFileListener((@NotNull List<? extends VFileEvent> events) -> { for (VFileEvent event : events) { if (event instanceof VFileDeleteEvent) { // TODO run con...
public void register() { if (!isRegistered) { VirtualFileManager.getInstance().addAsyncFileListener((@NotNull List<? extends VFileEvent> events) -> { for (VFileEvent event : events) { if (event instanceof VFileDeleteEvent) { ...
public void register() { if (!isregistered) { virtualfilemanager.getinstance().addasyncfilelistener((@notnull list<? extends vfileevent> events) -> { for (vfileevent event : events) { if (event instanceof vfiledeleteevent) { system.out.println("deleted : " + event.getfile()); } } return null; }, () -> {}); isregistered...
soungminjoo/httpflow-intellij-plugin
[ 0, 1, 0, 0 ]
20,616
private void setBandInfo(DataChoice dataChoice, AddeImageInfo aii) { BandInfo bi = (BandInfo) dataChoice.getId(); List<BandInfo> bandInfos = (List<BandInfo>) getProperty(PROP_BANDINFO, (Object) null); boolean hasBand = true; //If this data source has been changed after we hav...
private void setBandInfo(DataChoice dataChoice, AddeImageInfo aii) { BandInfo bi = (BandInfo) dataChoice.getId(); List<BandInfo> bandInfos = (List<BandInfo>) getProperty(PROP_BANDINFO, (Object) null); boolean hasBand = true; if (bandInfos != nu...
private void setbandinfo(datachoice datachoice, addeimageinfo aii) { bandinfo bi = (bandinfo) datachoice.getid(); list<bandinfo> bandinfos = (list<bandinfo>) getproperty(prop_bandinfo, (object) null); boolean hasband = true; if (bandinfos != null) { hasband = bandinfos.contains(bi); if ( !hasband) { } if ( !hasband && ...
slclark/IDV
[ 0, 1, 0, 0 ]
20,666
public List<DijkstraNode> getNeighbors() { // TODO // Check if on edge of map - breaks if we're on the pixel right next // to the edge. List<DijkstraNode> neighborNodeList = new ArrayList<DijkstraNode>(); Coordinate currentCoordinate = this.getPosition(); int currentX = c...
public List<DijkstraNode> getNeighbors() { List<DijkstraNode> neighborNodeList = new ArrayList<DijkstraNode>(); Coordinate currentCoordinate = this.getPosition(); int currentX = currentCoordinate.getX(); int currentY = currentCoordinate.getY(); Coo...
public list<dijkstranode> getneighbors() { list<dijkstranode> neighbornodelist = new arraylist<dijkstranode>(); coordinate currentcoordinate = this.getposition(); int currentx = currentcoordinate.getx(); int currenty = currentcoordinate.gety(); coordinate coordinateleft = new coordinate(currentx - 1, currenty); coordin...
sapols/JPL-CUSeniorProjects
[ 0, 1, 0, 0 ]
12,757
protected Entry getSpreadEntry(Request request, ServiceInput dpi, Entry sample, String climstartYear, String climendYear) throws Exception { Entry sprdEntry = null; //System.err.println("Creating spread"); //String...
protected Entry getSpreadEntry(Request request, ServiceInput dpi, Entry sample, String climstartYear, String climendYear) throws Exception { Entry sprdEntry = null; String statName = "ens01"; ...
protected entry getspreadentry(request request, serviceinput dpi, entry sample, string climstartyear, string climendyear) throws exception { entry sprdentry = null; string statname = "ens01"; list<entry> mean = findstatisticentry(request, sample, statname); if ((mean == null) || mean.isempty()) { sprdentry = sample; } ...
suvarchal/ramadda
[ 1, 0, 0, 0 ]
13,239
private static void displayExceptionPrivate(JFrame aFrame, Throwable aE) { StringWriter tempStringWriter = new StringWriter(); PrintWriter tempPrintWriter = new PrintWriter(tempStringWriter); aE.printStackTrace(tempPrintWriter); tempPrintWriter.close(); final JDialog tempDialog = new JDialog(aFrame, "Error: "...
private static void displayExceptionPrivate(JFrame aFrame, Throwable aE) { StringWriter tempStringWriter = new StringWriter(); PrintWriter tempPrintWriter = new PrintWriter(tempStringWriter); aE.printStackTrace(tempPrintWriter); tempPrintWriter.close(); final JDialog tempDialog = new JDialog(aFrame, "Error: "...
private static void displayexceptionprivate(jframe aframe, throwable ae) { stringwriter tempstringwriter = new stringwriter(); printwriter tempprintwriter = new printwriter(tempstringwriter); ae.printstacktrace(tempprintwriter); tempprintwriter.close(); final jdialog tempdialog = new jdialog(aframe, "error: " + ae.getm...
rscadrde/projekt-task-capturing
[ 1, 0, 0, 0 ]
13,240
private static void displayTextPrivate(JFrame aFrame, String aTitle, String aText, boolean aModalFlag, List<Action> anActions) { final JDialog tempDialog = new JDialog(aFrame, aTitle); tempDialog.setModal(aModalFlag); Dimension tempScreen = Toolkit.getDefaultToolkit().getScreenSize(); tempDialog.setSize(tempScr...
private static void displayTextPrivate(JFrame aFrame, String aTitle, String aText, boolean aModalFlag, List<Action> anActions) { final JDialog tempDialog = new JDialog(aFrame, aTitle); tempDialog.setModal(aModalFlag); Dimension tempScreen = Toolkit.getDefaultToolkit().getScreenSize(); tempDialog.setSize(tempScr...
private static void displaytextprivate(jframe aframe, string atitle, string atext, boolean amodalflag, list<action> anactions) { final jdialog tempdialog = new jdialog(aframe, atitle); tempdialog.setmodal(amodalflag); dimension tempscreen = toolkit.getdefaulttoolkit().getscreensize(); tempdialog.setsize(tempscreen.widt...
rscadrde/projekt-task-capturing
[ 1, 0, 0, 0 ]
21,707
private synchronized Bitmap getBitmapFromEntryIfNeeded(String entryName, boolean recycle) { Bitmap bitmap = null; ImageState status = imageState.get(entryName); if (status == null || status.equals(ImageState.UNKNOWN)) { ZipEntry entry = mZip.getEntry(entryName); try { File fi...
private synchronized Bitmap getBitmapFromEntryIfNeeded(String entryName, boolean recycle) { Bitmap bitmap = null; ImageState status = imageState.get(entryName); if (status == null || status.equals(ImageState.UNKNOWN)) { ZipEntry entry = mZip.getEntry(entryName); try { File fi...
private synchronized bitmap getbitmapfromentryifneeded(string entryname, boolean recycle) { bitmap bitmap = null; imagestate status = imagestate.get(entryname); if (status == null || status.equals(imagestate.unknown)) { zipentry entry = mzip.getentry(entryname); try { file file = extract(entry, entry.getname()); bitmap...
remco138/ocrmangareaderforandroid
[ 0, 0, 1, 0 ]
13,922
public void setSimpleTag() { /* TODO: clear previously-set field and avoid memory leak */ t = Tag.SIMPLE_TAG; }
public void setSimpleTag() { t = Tag.SIMPLE_TAG; }
public void setsimpletag() { t = tag.simple_tag; }
syntakker/atd
[ 0, 1, 0, 0 ]
22,202
public EasySource getInnerText(char open, char close) { StringBuffer code = new StringBuffer(); int brace_counter = 0; while (true) { if (pos >= src.length) { return null; } char c = src[pos]; if (c == open) { // TODO: what about open and close inside strings ? brace_counter++; // code.app...
public EasySource getInnerText(char open, char close) { StringBuffer code = new StringBuffer(); int brace_counter = 0; while (true) { if (pos >= src.length) { return null; } char c = src[pos]; if (c == open) { brace_counter++; } if (c == close) { if (brace_counter > 0) ...
public easysource getinnertext(char open, char close) { stringbuffer code = new stringbuffer(); int brace_counter = 0; while (true) { if (pos >= src.length) { return null; } char c = src[pos]; if (c == open) { brace_counter++; } if (c == close) { if (brace_counter > 0) brace_counter--; else { pos++; break; } } code.app...
rhulha/EasyLang
[ 1, 0, 0, 0 ]
14,027
public void finalizeReports(String currentSessionId) { // TODO: Need to implement procedure to skip finalizing the current session when this is // called on app start, but keep the current session when called at crash time. Currently // this only works when called at app start. List<File> sessionDirec...
public void finalizeReports(String currentSessionId) { List<File> sessionDirectories = capAndGetOpenSessions(currentSessionId); for (File sessionDirectory : sessionDirectories) { final List<File> eventFiles = getFilesInDirectory( sessionDirectory, (f, name) -> name.star...
public void finalizereports(string currentsessionid) { list<file> sessiondirectories = capandgetopensessions(currentsessionid); for (file sessiondirectory : sessiondirectories) { final list<file> eventfiles = getfilesindirectory( sessiondirectory, (f, name) -> name.startswith(event_file_name_prefix)); collections.sort(...
sevax88/firebase-android-sdk
[ 0, 1, 1, 0 ]
30,415
private Optional<List<Relation>> processDefaultRelation(final Relation relation, final List<Long> parents) { final List<Relation> createdRelations = new ArrayList<>(); final List<RelationMember> members = new ArrayList<>(); boolean isModified = false; for (final RelationM...
private Optional<List<Relation>> processDefaultRelation(final Relation relation, final List<Long> parents) { final List<Relation> createdRelations = new ArrayList<>(); final List<RelationMember> members = new ArrayList<>(); boolean isModified = false; for (final RelationM...
private optional<list<relation>> processdefaultrelation(final relation relation, final list<long> parents) { final list<relation> createdrelations = new arraylist<>(); final list<relationmember> members = new arraylist<>(); boolean ismodified = false; for (final relationmember member : relation.getmembers()) { switch (...
savannahostrowski/atlas
[ 1, 0, 0, 0 ]
14,066
@JsonGetter("accessToken") public String getAccessToken ( ) { return this.accessToken; }
@JsonGetter("accessToken") public String getAccessToken ( ) { return this.accessToken; }
@jsongetter("accesstoken") public string getaccesstoken ( ) { return this.accesstoken; }
serkaneren78/konkod-android-sdk
[ 0, 0, 0, 0 ]
14,067
@JsonSetter("accessToken") public void setAccessToken (String value) { this.accessToken = value; notifyObservers(this.accessToken); }
@JsonSetter("accessToken") public void setAccessToken (String value) { this.accessToken = value; notifyObservers(this.accessToken); }
@jsonsetter("accesstoken") public void setaccesstoken (string value) { this.accesstoken = value; notifyobservers(this.accesstoken); }
serkaneren78/konkod-android-sdk
[ 0, 0, 0, 0 ]
14,068
@JsonGetter("tokeType") public String getTokeType ( ) { return this.tokeType; }
@JsonGetter("tokeType") public String getTokeType ( ) { return this.tokeType; }
@jsongetter("toketype") public string gettoketype ( ) { return this.toketype; }
serkaneren78/konkod-android-sdk
[ 0, 0, 0, 0 ]
14,069
@JsonSetter("tokeType") public void setTokeType (String value) { this.tokeType = value; notifyObservers(this.tokeType); }
@JsonSetter("tokeType") public void setTokeType (String value) { this.tokeType = value; notifyObservers(this.tokeType); }
@jsonsetter("toketype") public void settoketype (string value) { this.toketype = value; notifyobservers(this.toketype); }
serkaneren78/konkod-android-sdk
[ 0, 0, 0, 0 ]
14,070
@JsonGetter("expiresIn") public Long getExpiresIn ( ) { return this.expiresIn; }
@JsonGetter("expiresIn") public Long getExpiresIn ( ) { return this.expiresIn; }
@jsongetter("expiresin") public long getexpiresin ( ) { return this.expiresin; }
serkaneren78/konkod-android-sdk
[ 0, 0, 0, 0 ]
14,071
@JsonSetter("expiresIn") public void setExpiresIn (Long value) { this.expiresIn = value; notifyObservers(this.expiresIn); }
@JsonSetter("expiresIn") public void setExpiresIn (Long value) { this.expiresIn = value; notifyObservers(this.expiresIn); }
@jsonsetter("expiresin") public void setexpiresin (long value) { this.expiresin = value; notifyobservers(this.expiresin); }
serkaneren78/konkod-android-sdk
[ 0, 0, 0, 0 ]
30,633
public static SourceFileModule resolve(File rootDir, File dir, String target) throws IOException, JSONException { // NOTE(Zhen): Ignore CoreModule for now to enable a more flexible semantic modeling // if (NodejsRequiredCoreModule.isCoreModule(target)) return NodejsRequiredCoreModule.make(target); ...
public static SourceFileModule resolve(File rootDir, File dir, String target) throws IOException, JSONException { if (target.startsWith("./") || target.startsWith("/") || target.startsWith("../")) { SourceFileModule module = loadAsFile(rootDir, new File(dir, target)); if ...
public static sourcefilemodule resolve(file rootdir, file dir, string target) throws ioexception, jsonexception { if (target.startswith("./") || target.startswith("/") || target.startswith("../")) { sourcefilemodule module = loadasfile(rootdir, new file(dir, target)); if (module != null) return module; module = loadasd...
semantic-graph/js2graph
[ 1, 0, 0, 0 ]
22,463
private String prepareHeadersAndBodyForService(HttpServletRequest request, String method, String url, List<String> clientRequestHeaders, Interactor.Interaction interaction, String clientRequestContentType, ...
private String prepareHeadersAndBodyForService(HttpServletRequest request, String method, String url, List<String> clientRequestHeaders, Interactor.Interaction interaction, String clientRequestContentType, ...
private string prepareheadersandbodyforservice(httpservletrequest request, string method, string url, list<string> clientrequestheaders, interactor.interaction interaction, string clientrequestcontenttype, interactionmanipulations interactionmanipulations) throws ioexception { enumeration<string> hdrs = request.gethead...
rogerfsg/servirtium
[ 1, 0, 0, 0 ]
14,278
private void doWelcome(Session session) { if (! session.isInteractive()) { return; } File confDir = getConfigDirectory(); File welcomeFile = new File(confDir, ".welcome"); if (welcomeFile.exists()) { return; } /* * Create the welco...
private void doWelcome(Session session) { if (! session.isInteractive()) { return; } File confDir = getConfigDirectory(); File welcomeFile = new File(confDir, ".welcome"); if (welcomeFile.exists()) { return; } try { welc...
private void dowelcome(session session) { if (! session.isinteractive()) { return; } file confdir = getconfigdirectory(); file welcomefile = new file(confdir, ".welcome"); if (welcomefile.exists()) { return; } try { welcomefile.createnewfile(); } catch (ioexception e) { system.err.println("warning: failed to create " +...
scottwakeling/jsqsh
[ 1, 0, 0, 0 ]
14,375
private void networkNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_networkNameMouseClicked // TODO add your handling code here: // jTextField1.setText(""); }
private void networkNameMouseClicked(java.awt.event.MouseEvent evt) { }
private void networknamemouseclicked(java.awt.event.mouseevent evt) { }
rohit-khokle/Medicare
[ 0, 1, 0, 0 ]
22,631
public static ExchangeUnitAuxiliaryInputStatistics getAuxiliaryStatisticsWithVPra(KepProblemData<ExchangeUnit,DonorEdge> kepProblemData){ AuxiliaryInputStatistics<ExchangeUnit,DonorEdge> regular = getAuxiliaryStatistics(kepProblemData); List<Donor> donors = new ArrayList<Donor>(); List<Receiver> receivers = new A...
public static ExchangeUnitAuxiliaryInputStatistics getAuxiliaryStatisticsWithVPra(KepProblemData<ExchangeUnit,DonorEdge> kepProblemData){ AuxiliaryInputStatistics<ExchangeUnit,DonorEdge> regular = getAuxiliaryStatistics(kepProblemData); List<Donor> donors = new ArrayList<Donor>(); List<Receiver> receivers = new A...
public static exchangeunitauxiliaryinputstatistics getauxiliarystatisticswithvpra(kepproblemdata<exchangeunit,donoredge> kepproblemdata){ auxiliaryinputstatistics<exchangeunit,donoredge> regular = getauxiliarystatistics(kepproblemdata); list<donor> donors = new arraylist<donor>(); list<receiver> receivers = new arrayli...
rma350/kidneyExchange
[ 1, 0, 0, 0 ]
14,588
public void testSolve() { RealMatrixImpl m = new RealMatrixImpl(testData); RealMatrix mInv = new RealMatrixImpl(testDataInv); // being a bit slothful here -- actually testing that X = A^-1 * B assertClose("inverse-operate",mInv.operate(testVector), m.solve(testVector),normTol...
public void testSolve() { RealMatrixImpl m = new RealMatrixImpl(testData); RealMatrix mInv = new RealMatrixImpl(testDataInv); assertClose("inverse-operate",mInv.operate(testVector), m.solve(testVector),normTolerance); try { m.solve(testVector2); ...
public void testsolve() { realmatriximpl m = new realmatriximpl(testdata); realmatrix minv = new realmatriximpl(testdatainv); assertclose("inverse-operate",minv.operate(testvector), m.solve(testvector),normtolerance); try { m.solve(testvector2); fail("expecting illegalargumentexception"); } catch (illegalargumentexcept...
svenpopping/acfl-replication-package
[ 1, 0, 0, 0 ]
31,003
public static CompositeValue create(ICPPClassType classType, IASTNode point, int nestingLevel) { Set<ICPPClassType> recursionProtectionSet = fCreateInProgress.get(); if (!recursionProtectionSet.add(classType)) { return new CompositeValue(null, ICPPEvaluation.EMPTY_ARRAY); } try { if (sDEBUG && nestingLeve...
public static CompositeValue create(ICPPClassType classType, IASTNode point, int nestingLevel) { Set<ICPPClassType> recursionProtectionSet = fCreateInProgress.get(); if (!recursionProtectionSet.add(classType)) { return new CompositeValue(null, ICPPEvaluation.EMPTY_ARRAY); } try { if (sDEBUG && nestingLeve...
public static compositevalue create(icppclasstype classtype, iastnode point, int nestinglevel) { set<icppclasstype> recursionprotectionset = fcreateinprogress.get(); if (!recursionprotectionset.add(classtype)) { return new compositevalue(null, icppevaluation.empty_array); } try { if (sdebug && nestinglevel > 0) { syste...
seemoo-lab/polypyus_pdom
[ 0, 0, 1, 0 ]
22,978
private void checkPins(List<X509Certificate> chain) throws CertificateException { PinSet pinSet = mNetworkSecurityConfig.getPins(); if (pinSet.pins.isEmpty() || System.currentTimeMillis() > pinSet.expirationTime || !isPinningEnforced(chain)) { return; ...
private void checkPins(List<X509Certificate> chain) throws CertificateException { PinSet pinSet = mNetworkSecurityConfig.getPins(); if (pinSet.pins.isEmpty() || System.currentTimeMillis() > pinSet.expirationTime || !isPinningEnforced(chain)) { return; ...
private void checkpins(list<x509certificate> chain) throws certificateexception { pinset pinset = mnetworksecurityconfig.getpins(); if (pinset.pins.isempty() || system.currenttimemillis() > pinset.expirationtime || !ispinningenforced(chain)) { return; } set<string> pinalgorithms = pinset.getpinalgorithms(); map<string,...
rio-31/android_frameworks_base-1
[ 0, 1, 0, 0 ]
23,034
private static boolean isOnline(){ try{ new URL("http://74.125.230.174").openConnection().connect(); //Confused? Copy the URL and paste it in your browser. return true; }catch (IOException e) { return false; } }
private static boolean isOnline(){ try{ new URL("http://74.125.230.174").openConnection().connect(); return true; }catch (IOException e) { return false; } }
private static boolean isonline(){ try{ new url("http://74.125.230.174").openconnection().connect(); return true; }catch (ioexception e) { return false; } }
scottkillen-vault/Bunyan
[ 1, 0, 0, 0 ]
31,253
private void verifyAllComponents() { // check root component has no generics if (!this.components.get(this.topname).getGenerics().isEmpty()) genericError(String.format("top component %s cannot contain generics", this.topname)); // verify all components for (Component comp...
private void verifyAllComponents() { if (!this.components.get(this.topname).getGenerics().isEmpty()) genericError(String.format("top component %s cannot contain generics", this.topname)); for (Component component : this.components.values()) { this.curr...
private void verifyallcomponents() { if (!this.components.get(this.topname).getgenerics().isempty()) genericerror(string.format("top component %s cannot contain generics", this.topname)); for (component component : this.components.values()) { this.currentcomponent = component.name; this.verifyportarch(component.ast); t...
reed-foster/cdl
[ 0, 1, 0, 0 ]
23,074
public void testJ5_32_speculative() throws Exception { CppCompositeType J5_struct = createJ5_struct32(vbtManager32); J5_struct.createLayout(classLayoutChoice, vbtManager32, TaskMonitor.DUMMY); Composite composite = J5_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ5_32(), ...
public void testJ5_32_speculative() throws Exception { CppCompositeType J5_struct = createJ5_struct32(vbtManager32); J5_struct.createLayout(classLayoutChoice, vbtManager32, TaskMonitor.DUMMY); Composite composite = J5_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ5_32(), ...
public void testj5_32_speculative() throws exception { cppcompositetype j5_struct = createj5_struct32(vbtmanager32); j5_struct.createlayout(classlayoutchoice, vbtmanager32, taskmonitor.dummy); composite composite = j5_struct.getcomposite(); compositetestutils.assertexpectedcomposite(this, getspeculatedj5_32(), composit...
sigurasg/ghidra
[ 1, 0, 0, 0 ]
23,075
public void testJ5_64_speculative() throws Exception { CppCompositeType J5_struct = createJ5_struct64(vbtManager64); J5_struct.createLayout(classLayoutChoice, vbtManager64, TaskMonitor.DUMMY); Composite composite = J5_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ5_64(), ...
public void testJ5_64_speculative() throws Exception { CppCompositeType J5_struct = createJ5_struct64(vbtManager64); J5_struct.createLayout(classLayoutChoice, vbtManager64, TaskMonitor.DUMMY); Composite composite = J5_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ5_64(), ...
public void testj5_64_speculative() throws exception { cppcompositetype j5_struct = createj5_struct64(vbtmanager64); j5_struct.createlayout(classlayoutchoice, vbtmanager64, taskmonitor.dummy); composite composite = j5_struct.getcomposite(); compositetestutils.assertexpectedcomposite(this, getspeculatedj5_64(), composit...
sigurasg/ghidra
[ 1, 0, 0, 0 ]
23,076
public void testJ6_32_speculative() throws Exception { CppCompositeType J6_struct = createJ6_struct32(vbtManager32); J6_struct.createLayout(classLayoutChoice, vbtManager32, TaskMonitor.DUMMY); Composite composite = J6_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ6_32(), ...
public void testJ6_32_speculative() throws Exception { CppCompositeType J6_struct = createJ6_struct32(vbtManager32); J6_struct.createLayout(classLayoutChoice, vbtManager32, TaskMonitor.DUMMY); Composite composite = J6_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ6_32(), ...
public void testj6_32_speculative() throws exception { cppcompositetype j6_struct = createj6_struct32(vbtmanager32); j6_struct.createlayout(classlayoutchoice, vbtmanager32, taskmonitor.dummy); composite composite = j6_struct.getcomposite(); compositetestutils.assertexpectedcomposite(this, getspeculatedj6_32(), composit...
sigurasg/ghidra
[ 1, 0, 0, 0 ]
23,077
public void testJ6_64_speculative() throws Exception { CppCompositeType J6_struct = createJ6_struct64(vbtManager64); J6_struct.createLayout(classLayoutChoice, vbtManager64, TaskMonitor.DUMMY); Composite composite = J6_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ6_64(), ...
public void testJ6_64_speculative() throws Exception { CppCompositeType J6_struct = createJ6_struct64(vbtManager64); J6_struct.createLayout(classLayoutChoice, vbtManager64, TaskMonitor.DUMMY); Composite composite = J6_struct.getComposite(); CompositeTestUtils.assertExpectedComposite(this, getSpeculatedJ6_64(), ...
public void testj6_64_speculative() throws exception { cppcompositetype j6_struct = createj6_struct64(vbtmanager64); j6_struct.createlayout(classlayoutchoice, vbtmanager64, taskmonitor.dummy); composite composite = j6_struct.getcomposite(); compositetestutils.assertexpectedcomposite(this, getspeculatedj6_64(), composit...
sigurasg/ghidra
[ 1, 0, 0, 0 ]
31,319
public List<HeatConsumption> findHeatConsumptions() throws IOException { // TODO convert into model that contains electricity info also return heatRepository.findAll(); }
public List<HeatConsumption> findHeatConsumptions() throws IOException { return heatRepository.findAll(); }
public list<heatconsumption> findheatconsumptions() throws ioexception { return heatrepository.findall(); }
renanpelicari/java-kata
[ 0, 1, 0, 0 ]
31,329
public static Document parse(String text, int windowSize, JSONArray spacyEntities, JSONArray dbpediaEntities) { Document result = new Document(); result._originaltext = text; result._sentences = new java.util.ArrayList<Sentence>(); List<String> splitSentences = StanfordNLP.splitSentences(text); int lastFou...
public static Document parse(String text, int windowSize, JSONArray spacyEntities, JSONArray dbpediaEntities) { Document result = new Document(); result._originaltext = text; result._sentences = new java.util.ArrayList<Sentence>(); List<String> splitSentences = StanfordNLP.splitSentences(text); int lastFou...
public static document parse(string text, int windowsize, jsonarray spacyentities, jsonarray dbpediaentities) { document result = new document(); result._originaltext = text; result._sentences = new java.util.arraylist<sentence>(); list<string> splitsentences = stanfordnlp.splitsentences(text); int lastfoundposition = ...
slankas/OSKE
[ 0, 0, 0, 0 ]
31,468
public static boolean isProvidedUserChoicesForNodeInstance(Map<String, List<Parameter<?>>> userChoices, String nodeInstanceName) { if (userChoices == null || userChoices.isEmpty()) return false; List<Parameter<?>> paramsForNodeInstance = userChoices.get(nodeInstanceName); if (paramsForNodeInstance == ...
public static boolean isProvidedUserChoicesForNodeInstance(Map<String, List<Parameter<?>>> userChoices, String nodeInstanceName) { if (userChoices == null || userChoices.isEmpty()) return false; List<Parameter<?>> paramsForNodeInstance = userChoices.get(nodeInstanceName); if (paramsForNodeInstance == ...
public static boolean isprovideduserchoicesfornodeinstance(map<string, list<parameter<?>>> userchoices, string nodeinstancename) { if (userchoices == null || userchoices.isempty()) return false; list<parameter<?>> paramsfornodeinstance = userchoices.get(nodeinstancename); if (paramsfornodeinstance == null || paramsforn...
slipstream/cimi-mf2c
[ 1, 0, 0, 0 ]
15,468
private void handleUpload(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException, WsException { checkPermission(WebswingAction.file_upload); try { String uuid = request.getParameter("uuid"); if (uuid != null) { SwingInstance instance = manager.findInstanceBySessionId(uu...
private void handleUpload(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException, WsException { checkPermission(WebswingAction.file_upload); try { String uuid = request.getParameter("uuid"); if (uuid != null) { SwingInstance instance = manager.findInstanceBySessionId(uu...
private void handleupload(httpservletrequest request, httpservletresponse resp) throws servletexception, ioexception, wsexception { checkpermission(webswingaction.file_upload); try { string uuid = request.getparameter("uuid"); if (uuid != null) { swinginstance instance = manager.findinstancebysessionid(uuid); if (insta...
swing-fly/webswing
[ 0, 0, 0, 0 ]
15,624
@Override public void enableSupportForSerializationIfApplicable(CancelIndicator cancelIndicator) { if (!IterableExtensions.isNullOrEmpty(targetConfig.protoFiles)) { // Enable support for proto serialization enabledSerializers.add(SupportedSerializers.PROTO); } for (S...
@Override public void enableSupportForSerializationIfApplicable(CancelIndicator cancelIndicator) { if (!IterableExtensions.isNullOrEmpty(targetConfig.protoFiles)) { enabledSerializers.add(SupportedSerializers.PROTO); } for (SupportedSerializers serialization : enable...
@override public void enablesupportforserializationifapplicable(cancelindicator cancelindicator) { if (!iterableextensions.isnullorempty(targetconfig.protofiles)) { enabledserializers.add(supportedserializers.proto); } for (supportedserializers serialization : enabledserializers) { switch (serialization) { case native:...
soerendomroes/lingua-franca
[ 0, 1, 0, 0 ]
15,626
@Override public void writeDockerFile(File dockerComposeDir, String dockerFileName, String federateName) { if (mainDef == null) { return; } Path srcGenPath = fileConfig.getSrcGenPath(); String dockerFile = srcGenPath + File.separator + dockerFileName; CodeBuilder...
@Override public void writeDockerFile(File dockerComposeDir, String dockerFileName, String federateName) { if (mainDef == null) { return; } Path srcGenPath = fileConfig.getSrcGenPath(); String dockerFile = srcGenPath + File.separator + dockerFileName; CodeBuilder...
@override public void writedockerfile(file dockercomposedir, string dockerfilename, string federatename) { if (maindef == null) { return; } path srcgenpath = fileconfig.getsrcgenpath(); string dockerfile = srcgenpath + file.separator + dockerfilename; codebuilder contents = new codebuilder(); contents.pr(pythondockerge...
soerendomroes/lingua-franca
[ 0, 0, 0, 0 ]
32,106
@Test public void testMakePaymentForSavingsAccountOnDeposit() throws Exception { savingsBO = createClientSavingsAccount(); String deposit = "400"; CustomerDto clientDto = new CustomerDto(); clientDto.setCustomerId(client.getCustomerId()); //FIXME why one day in future payment...
@Test public void testMakePaymentForSavingsAccountOnDeposit() throws Exception { savingsBO = createClientSavingsAccount(); String deposit = "400"; CustomerDto clientDto = new CustomerDto(); clientDto.setCustomerId(client.getCustomerId()); LocalDate paymentDate = new L...
@test public void testmakepaymentforsavingsaccountondeposit() throws exception { savingsbo = createclientsavingsaccount(); string deposit = "400"; customerdto clientdto = new customerdto(); clientdto.setcustomerid(client.getcustomerid()); localdate paymentdate = new localdate().plusdays(1); localdate receiptdate = new ...
sureshkrishnamoorthy/suresh-mifos
[ 1, 0, 0, 0 ]
32,149
public static int raiseTo(int n, int p) { if (n == 0) { return 0; } if (p == 0) { return 1; } if (n == 1) { return n; } long result = n; int counter = 1; while (counter < p) { if (result * n >= Integer.MAX_VALUE) { return Integer.MAX_VALUE; } ...
public static int raiseTo(int n, int p) { if (n == 0) { return 0; } if (p == 0) { return 1; } if (n == 1) { return n; } long result = n; int counter = 1; while (counter < p) { if (result * n >= Integer.MAX_VALUE) { return Integer.MAX_VALUE; } ...
public static int raiseto(int n, int p) { if (n == 0) { return 0; } if (p == 0) { return 1; } if (n == 1) { return n; } long result = n; int counter = 1; while (counter < p) { if (result * n >= integer.max_value) { return integer.max_value; } result *= n; counter++; } return (int) result; }
sachinlala/JavaPerfTests
[ 1, 0, 0, 0 ]
24,068
public static String assignShard(DocCollection collection, Integer numShards) { if (numShards == null) { numShards = 1; } String returnShardId = null; Map<String, Slice> sliceMap = collection != null ? collection.getActiveSlicesMap() : null; // TODO: now that we create shards ahead of time, is...
public static String assignShard(DocCollection collection, Integer numShards) { if (numShards == null) { numShards = 1; } String returnShardId = null; Map<String, Slice> sliceMap = collection != null ? collection.getActiveSlicesMap() : null; if (sliceMap == null) { return "shard1"; ...
public static string assignshard(doccollection collection, integer numshards) { if (numshards == null) { numshards = 1; } string returnshardid = null; map<string, slice> slicemap = collection != null ? collection.getactiveslicesmap() : null; if (slicemap == null) { return "shard1"; } list<string> shardidnames = new arr...
robin850/solr
[ 1, 0, 0, 0 ]
24,102
@Test @MediumTest public void testAppButtonExitsVoiceInput() throws InterruptedException { Runnable exitAction = () -> { NativeUiUtils.clickAppButton(UserFriendlyElementName.CURRENT_POSITION, new PointF()); }; testExitVoiceInputImpl(exitAction); }
@Test @MediumTest public void testAppButtonExitsVoiceInput() throws InterruptedException { Runnable exitAction = () -> { NativeUiUtils.clickAppButton(UserFriendlyElementName.CURRENT_POSITION, new PointF()); }; testExitVoiceInputImpl(exitAction); }
@test @mediumtest public void testappbuttonexitsvoiceinput() throws interruptedexception { runnable exitaction = () -> { nativeuiutils.clickappbutton(userfriendlyelementname.current_position, new pointf()); }; testexitvoiceinputimpl(exitaction); }
sarang-apps/darshan_browser
[ 0, 0, 0, 1 ]
15,921
public static Map<String, List<Object>> parseAttributes(String samlResponse, Set<String> attributes) throws ServletException { Map<String, List<Object>> parsedResult = new HashMap<>(); // TODO - Using a library for managing collections if (attributes == null || attributes.isEmpty()) { return par...
public static Map<String, List<Object>> parseAttributes(String samlResponse, Set<String> attributes) throws ServletException { Map<String, List<Object>> parsedResult = new HashMap<>(); if (attributes == null || attributes.isEmpty()) { return parsedResult; } byte[] samlAssertionDecoded = ...
public static map<string, list<object>> parseattributes(string samlresponse, set<string> attributes) throws servletexception { map<string, list<object>> parsedresult = new hashmap<>(); if (attributes == null || attributes.isempty()) { return parsedresult; } byte[] samlassertiondecoded = new byte[0]; try { samlassertion...
sharad-oss/knox
[ 0, 1, 0, 0 ]
16,008
@Override public void makeMove() { // TODO Not just randomly select a tile to mark while (true) { try { List<Tile> tiles = getGameLogic().getTerritory().getTiles(); Tile tile = tiles.get(GameLogic.RANDOM.nextInt(tiles.size())); tile.setMarkedPlayer(this); getGameLogic().endMove(); return; ...
@Override public void makeMove() { while (true) { try { List<Tile> tiles = getGameLogic().getTerritory().getTiles(); Tile tile = tiles.get(GameLogic.RANDOM.nextInt(tiles.size())); tile.setMarkedPlayer(this); getGameLogic().endMove(); return; } catch (TileAreadyMarkedException e) { } ...
@override public void makemove() { while (true) { try { list<tile> tiles = getgamelogic().getterritory().gettiles(); tile tile = tiles.get(gamelogic.random.nextint(tiles.size())); tile.setmarkedplayer(this); getgamelogic().endmove(); return; } catch (tileareadymarkedexception e) { } } }
sengerts/tic-tac-toe
[ 1, 0, 0, 0 ]
16,106
public static String getData() { Future<String> f = getInstance().startupFuture.get(); if (f == null) { // FIXME haven't even started yet... need to busy-wait, perhaps } try { String data = f.get(30, TimeUnit.SECONDS); return data; } catch (Int...
public static String getData() { Future<String> f = getInstance().startupFuture.get(); if (f == null) { } try { String data = f.get(30, TimeUnit.SECONDS); return data; } catch (InterruptedException | ExecutionException e) { ...
public static string getdata() { future<string> f = getinstance().startupfuture.get(); if (f == null) { } try { string data = f.get(30, timeunit.seconds); return data; } catch (interruptedexception | executionexception e) { throw new illegalstateexception(e); } catch (timeoutexception e) { throw new illegalstateexcepti...
seemikehack/synchronized-startup
[ 0, 0, 1, 0 ]
8,111
public synchronized void start() throws IOException, InterruptedException { final AtomicBoolean bound = new AtomicBoolean(); running.set(true); Thread t = new Thread(new Runnable() { @Override public void run() { try { ServerSocket ss =...
public synchronized void start() throws IOException, InterruptedException { final AtomicBoolean bound = new AtomicBoolean(); running.set(true); Thread t = new Thread(new Runnable() { @Override public void run() { try { ServerSocket ss =...
public synchronized void start() throws ioexception, interruptedexception { final atomicboolean bound = new atomicboolean(); running.set(true); thread t = new thread(new runnable() { @override public void run() { try { serversocket ss = new serversocket(port); synchronized (bound) { bound.set(true); bound.notifyall(); ...
srinivas491/AsterixDB
[ 1, 0, 0, 0 ]
16,343
@Override public void registerDefaults() { // @formatter:off /////////////////// /// Air /// /////////////////// register(0, builder() .properties(PropertyProviderCollections.DEFAULT_GAS) .translation("tile.air.name") ...
@Override public void registerDefaults() { register(0, builder() .properties(PropertyProviderCollections.DEFAULT_GAS) .translation("tile.air.name") .build("minecraft", "air")); ...
@override public void registerdefaults() { register(0, builder() .properties(propertyprovidercollections.default_gas) .translation("tile.air.name") .build("minecraft", "air")); register(1, simplebuilder() .trait(lanternenumtraits.stone_type) .defaultstate(state -> state.withtrait(lanternenumtraits.stone_type, lanternst...
shisheng-1/Lantern
[ 1, 1, 0, 0 ]
24,672
public String getJavaName() { return service.getName(); //TODO Capitalize first char?? }
public String getJavaName() { return service.getName(); }
public string getjavaname() { return service.getname(); }
timfel/netbeans
[ 0, 1, 0, 0 ]
32,867
@Override public boolean defineLock(String name, ClusteredLockConfiguration configuration) { // TODO: Configuration is not used because we don't support any other mode for now. For that : ISPN-8413 CacheHolder cacheHolder = extractCacheHolder(cacheHolderFuture); cache = cacheHolder.getClusteredLock...
@Override public boolean defineLock(String name, ClusteredLockConfiguration configuration) { CacheHolder cacheHolder = extractCacheHolder(cacheHolderFuture); cache = cacheHolder.getClusteredLockCache(); ClusteredLockKey key = new ClusteredLockKey(ByteString.fromString(name)); ClusteredL...
@override public boolean definelock(string name, clusteredlockconfiguration configuration) { cacheholder cacheholder = extractcacheholder(cacheholderfuture); cache = cacheholder.getclusteredlockcache(); clusteredlockkey key = new clusteredlockkey(bytestring.fromstring(name)); clusteredlockvalue clusteredlockvalue = cac...
tqrg-bot/infinispan
[ 1, 0, 0, 0 ]