buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void testLoadNewIndexDir() throws IOException, ParserConfigurationException, SAXException {
//add a doc in original index dir
assertU(adoc("id", String.valueOf(1),
"name", "name"+String.valueOf(1)));
//create a new index dir and index.properties file
File idxprops = new File(h.getCore()... | public void testLoadNewIndexDir() throws IOException, ParserConfigurationException, SAXException {
//add a doc in original index dir
assertU(adoc("id", String.valueOf(1),
"name", "name"+String.valueOf(1)));
//create a new index dir and index.properties file
File idxprops = new File(h.getCore()... |
public void run() {
try {
while (operations.decrementAndGet() >= 0) {
// bias toward a recently changed doc
int id = rand.nextInt(100) < 25 ? lastId : rand.nextInt(ndocs);
// when indexing, we update the index, then the model
// so w... | public void run() {
try {
while (operations.decrementAndGet() >= 0) {
// bias toward a recently changed doc
int id = rand.nextInt(100) < 25 ? lastId : rand.nextInt(ndocs);
// when indexing, we update the index, then the model
// so w... |
public void testAlternateLocation() throws Exception {
String[] ALT_DOCS = new String[]{
"jumpin jack flash",
"Sargent Peppers Lonely Hearts Club Band",
"Born to Run",
"Thunder Road",
"Londons Burning",
"A Horse with No Name",
"Sw... | public void testAlternateLocation() throws Exception {
String[] ALT_DOCS = new String[]{
"jumpin jack flash",
"Sargent Peppers Lonely Hearts Club Band",
"Born to Run",
"Thunder Road",
"Londons Burning",
"A Horse with No Name",
"Sw... |
private void loadExternalFileDictionary(SolrCore core, SolrIndexSearcher searcher) {
try {
IndexSchema schema = null == searcher ? core.getLatestSchema() : searcher.getSchema();
// Get the field's analyzer
if (fieldTypeName != null && schema.getFieldTypeNoEx(fieldTypeName) != null) {
Fie... | private void loadExternalFileDictionary(SolrCore core, SolrIndexSearcher searcher) {
try {
IndexSchema schema = null == searcher ? core.getLatestSchema() : searcher.getSchema();
// Get the field's analyzer
if (fieldTypeName != null && schema.getFieldTypeNoEx(fieldTypeName) != null) {
Fie... |
public void closeWriter(IndexWriter writer) throws IOException {
boolean clearRequestInfo = false;
solrCoreState.getCommitLock().lock();
try {
SolrQueryRequest req = new LocalSolrQueryRequest(core, new ModifiableSolrParams());
SolrQueryResponse rsp = new SolrQueryResponse();
if (SolrRequ... | public void closeWriter(IndexWriter writer) throws IOException {
boolean clearRequestInfo = false;
solrCoreState.getCommitLock().lock();
try {
SolrQueryRequest req = new LocalSolrQueryRequest(core, new ModifiableSolrParams());
SolrQueryResponse rsp = new SolrQueryResponse();
if (SolrRequ... |
public void split() throws IOException {
List<AtomicReaderContext> leaves = searcher.getTopReaderContext().leaves();
List<FixedBitSet[]> segmentDocSets = new ArrayList<>(leaves.size());
log.info("SolrIndexSplitter: partitions=" + numPieces + " segments="+leaves.size());
for (AtomicReaderContext rea... | public void split() throws IOException {
List<AtomicReaderContext> leaves = searcher.getTopReaderContext().leaves();
List<FixedBitSet[]> segmentDocSets = new ArrayList<>(leaves.size());
log.info("SolrIndexSplitter: partitions=" + numPieces + " segments="+leaves.size());
for (AtomicReaderContext rea... |
public static void SYSCS_BULK_INSERT(
String schemaName,
String tableName,
String vtiName,
String vtiArg
)
throws SQLException
{
Connection conn = getDefaultConn();
String entityName = (schemaName == null ? tableName : schemaName + "." + tableName);
String binsertSql =
"insert ... | public static void SYSCS_BULK_INSERT(
String schemaName,
String tableName,
String vtiName,
String vtiArg
)
throws SQLException
{
Connection conn = getDefaultConn();
String entityName = (schemaName == null ? tableName : schemaName + "." + tableName);
String binsertSql =
"insert ... |
public StorageService()
{
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
try
{
mbs.registerMBean(this, new ObjectName("org.apache.cassandra.service:type=StorageService"));
}
catch (Exception e)
{
throw new RuntimeException(e)... | public StorageService()
{
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
try
{
mbs.registerMBean(this, new ObjectName("org.apache.cassandra.service:type=StorageService"));
}
catch (Exception e)
{
throw new RuntimeException(e)... |
public void testKeyCacheLoad() throws Exception
{
CompactionManager.instance.disableAutoCompaction();
ColumnFamilyStore store = Table.open(TABLE1).getColumnFamilyStore(COLUMN_FAMILY3);
// empty the cache
store.invalidateKeyCache();
assert store.getKeyCacheSize() == 0;
... | public void testKeyCacheLoad() throws Exception
{
CompactionManager.instance.disableAutoCompaction();
ColumnFamilyStore store = Table.open(TABLE1).getColumnFamilyStore(COLUMN_FAMILY3);
// empty the cache
store.invalidateKeyCache();
assert store.getKeyCacheSize() == 0;
... |
public float tf(int freq) {
return hyperbolicTf(freq);
}
};
} | public float tf(float freq) {
return hyperbolicTf(freq);
}
};
} |
// private Boolean exprN()
// {
// return <<restriction.generate(ps)>>;
// }
// static Method exprN = method pointer to exprN;
// Map the result columns to the source columns
int[] mapArray = resultColumns.mapSourceColumns();
int mapArrayItem = acb.addItem(new ReferencedColumnsDescri... | // private Boolean exprN()
// {
// return <<restriction.generate(ps)>>;
// }
// static Method exprN = method pointer to exprN;
// Map the result columns to the source columns
int[] mapArray = resultColumns.mapSourceColumns();
int mapArrayItem = acb.addItem(new ReferencedColumnsDescri... |
private static BloomFilter createColumnBloomFilter(Collection<IColumn> columns)
{
int columnCount = 0;
for (IColumn column : columns)
{
columnCount += column.getObjectCount();
}
BloomFilter bf = new BloomFilter(columnCount, 4);
for (IColumn column : c... | private static BloomFilter createColumnBloomFilter(Collection<IColumn> columns)
{
int columnCount = 0;
for (IColumn column : columns)
{
columnCount += column.getObjectCount();
}
BloomFilter bf = BloomFilter.getFilter(columnCount, 4);
for (IColumn colu... |
public SSTableWriter(String filename, long keyCount, IPartitioner partitioner) throws IOException
{
super(filename, partitioner);
dataFile = new BufferedRandomAccessFile(path, "rw", (int)(DatabaseDescriptor.getFlushDataBufferSizeInMB() * 1024 * 1024));
indexFile = new BufferedRandomAcces... | public SSTableWriter(String filename, long keyCount, IPartitioner partitioner) throws IOException
{
super(filename, partitioner);
dataFile = new BufferedRandomAccessFile(path, "rw", (int)(DatabaseDescriptor.getFlushDataBufferSizeInMB() * 1024 * 1024));
indexFile = new BufferedRandomAcces... |
public void finishStage(ResponseBuilder rb) {
if (rb.isDebug() && rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {
NamedList info = null;
NamedList explain = new SimpleOrderedMap();
Object[] arr = new Object[rb.resultIds.size() * 2];
for (ShardRequest sreq : rb.finished) {
if ((sr... | public void finishStage(ResponseBuilder rb) {
if (rb.isDebug() && rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {
NamedList info = null;
NamedList explain = new SimpleOrderedMap();
Object[] arr = new Object[rb.resultIds.size() * 2];
for (ShardRequest sreq : rb.finished) {
if ((sr... |
public void finishStage(ResponseBuilder rb) {
if (rb.doHighlights && rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {
NamedList hlResult = new SimpleOrderedMap();
Object[] arr = new Object[rb.resultIds.size() * 2];
// TODO: make a generic routine to do automatic merging of id keyed data
f... | public void finishStage(ResponseBuilder rb) {
if (rb.doHighlights && rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {
NamedList hlResult = new SimpleOrderedMap();
Object[] arr = new Object[rb.resultIds.size() * 2];
// TODO: make a generic routine to do automatic merging of id keyed data
f... |
public String toString() {
return super.toString() + " lockFactory=" + getLockFactory();
}
/**
* Copies the file <i>src</i> to {@link Directory} <i>to</i> under the new
* file name <i>dest</i>.
* <p>
* If you want to copy the entire source directory to the destination one, you
* can do so like... | public String toString() {
return getClass().getSimpleName() + '@' + Integer.toHexString(hashCode()) + " lockFactory=" + getLockFactory();
}
/**
* Copies the file <i>src</i> to {@link Directory} <i>to</i> under the new
* file name <i>dest</i>.
* <p>
* If you want to copy the entire source directo... |
public void removeToken(String tokenString)
{
InetAddress myAddress = FBUtilities.getLocalAddress();
Token localToken = tokenMetadata_.getToken(myAddress);
Token token = partitioner_.getTokenFactory().fromString(tokenString);
InetAddress endpoint = tokenMetadata_.getEndpoint(toke... | public void removeToken(String tokenString)
{
InetAddress myAddress = FBUtilities.getLocalAddress();
Token localToken = tokenMetadata_.getToken(myAddress);
Token token = partitioner_.getTokenFactory().fromString(tokenString);
InetAddress endpoint = tokenMetadata_.getEndpoint(toke... |
private void printLayout(String zkHost) throws Exception {
SolrZkClient zkClient = new SolrZkClient(
zkHost, AbstractZkTestCase.TIMEOUT);
zkClient.printLayoutToStdOut();
zkClient.close();
}
| public void tearDown() throws Exception {
if (VERBOSE) {
printLayout(zkServer.getZkHost());
}
container1.shutdown();
container2.shutdown();
container3.shutdown();
zkServer.shutdown();
super.tearDown();
System.clearProperty("zkClientTimeout");
System.clearProperty("zkHost");
... |
protected void setup(Context context) throws IOException, InterruptedException {
super.setup(context);
Configuration job = context.getConfiguration();
clusterer = new FuzzyKMeansClusterer(job);
log.info("In Mapper Configure:");
String clusterPath = job.get(FuzzyKMeansConfigKeys.CLUSTER_P... | protected void setup(Context context) throws IOException, InterruptedException {
super.setup(context);
Configuration job = context.getConfiguration();
clusterer = new FuzzyKMeansClusterer(job);
log.info("In Mapper Configure:");
String clusterPath = job.get(FuzzyKMeansConfigKeys.CLUSTER_P... |
public void visitMethodInsn(int opcode, String owner, String name, String desc) {
System.out.println("### " + opcode + ": " + owner + "#" + name + "#" + desc);
WeavingData wd = findWeavingData(owner, name, desc);
if (opcode == INVOKESTATIC... | public void visitMethodInsn(int opcode, String owner, String name, String desc) {
System.out.println("### " + opcode + ": " + owner + "#" + name + "#" + desc);
WeavingData wd = findWeavingData(owner, name, desc);
if (opcode == INVOKESTATIC... |
private void makeSUT() {
BundleTrackerCustomizer customizer = Skeleton.newMock(BundleTrackerCustomizer.class);
sut = new InternalRecursiveBundleTracker(context,
Bundle.INSTALLED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING, customizer);
sut.open();
}
| private void makeSUT() {
BundleTrackerCustomizer customizer = Skeleton.newMock(BundleTrackerCustomizer.class);
sut = new InternalRecursiveBundleTracker(context,
Bundle.INSTALLED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING, customizer, true);
sut.open();
... |
public void save(DataOutput out) throws IOException {
if (startNode == -1) {
throw new IllegalStateException("call finish first");
}
if (nodeAddress != null) {
throw new IllegalStateException("cannot save an FST pre-packed FST; it must first be packed");
}
if (packed && !(nodeRefToAddr... | public void save(DataOutput out) throws IOException {
if (startNode == -1) {
throw new IllegalStateException("call finish first");
}
if (nodeAddress != null) {
throw new IllegalStateException("cannot save an FST pre-packed FST; it must first be packed");
}
if (packed && !(nodeRefToAddr... |
public void uncaughtException(Thread t, Throwable e)
{
logger.error("Fatal exception in thread " + t, e);
if (e instanceof OutOfMemoryError)
{
System.exit(100);
}
}
});
// initialize ... | public void uncaughtException(Thread t, Throwable e)
{
logger.error("Fatal exception in thread " + t, e);
if (e instanceof OutOfMemoryError)
{
System.exit(100);
}
}
});
// initialize ... |
public CassandraServer()
{
storageService = StorageService.instance();
}
| public CassandraServer()
{
storageService = StorageService.instance;
}
|
public static void maybeScheduleRepairs(ColumnFamily resolved, String table, String key, List<ColumnFamily> versions, List<InetAddress> endPoints)
{
for (int i = 0; i < versions.size(); i++)
{
ColumnFamily diffCf = ColumnFamily.diff(versions.get(i), resolved);
if (diffCf ... | public static void maybeScheduleRepairs(ColumnFamily resolved, String table, String key, List<ColumnFamily> versions, List<InetAddress> endPoints)
{
for (int i = 0; i < versions.size(); i++)
{
ColumnFamily diffCf = ColumnFamily.diff(versions.get(i), resolved);
if (diffCf ... |
private synchronized void loadEndPoints(TokenMetadata metadata) throws IOException
{
endPointSnitch = (DatacenterEndPointSnitch) StorageService.instance().getEndPointSnitch();
this.tokens = new ArrayList<Token>(tokens);
String localDC = endPointSnitch.getLocation(InetAddress.getLocalHost... | private synchronized void loadEndPoints(TokenMetadata metadata) throws IOException
{
endPointSnitch = (DatacenterEndPointSnitch) StorageService.instance.getEndPointSnitch();
this.tokens = new ArrayList<Token>(tokens);
String localDC = endPointSnitch.getLocation(InetAddress.getLocalHost()... |
public ArrayList<InetAddress> getNaturalEndpoints(Token token, TokenMetadata metadata)
{
int startIndex;
ArrayList<InetAddress> endpoints = new ArrayList<InetAddress>();
boolean bDataCenter = false;
boolean bOtherRack = false;
int foundCount = 0;
List tokens = met... | public ArrayList<InetAddress> getNaturalEndpoints(Token token, TokenMetadata metadata)
{
int startIndex;
ArrayList<InetAddress> endpoints = new ArrayList<InetAddress>();
boolean bDataCenter = false;
boolean bOtherRack = false;
int foundCount = 0;
List tokens = met... |
public Map<String, ApplicationState> getApplicationStateMap()
{
return applicationState_;
}
void addApplicationState(String key, ApplicationState appState)
{
assert !StorageService.instance().isClientMode();
applicationState_.put(key, appState);
}
| public Map<String, ApplicationState> getApplicationStateMap()
{
return applicationState_;
}
void addApplicationState(String key, ApplicationState appState)
{
assert !StorageService.instance.isClientMode();
applicationState_.put(key, appState);
}
|
public void testTransferTable() throws Exception
{
StorageService.instance().initServer();
// write a temporary SSTable, but don't register it
Set<String> content = new HashSet<String>();
content.add("key");
SSTableReader sstable = SSTableUtils.writeSSTable(content);
... | public void testTransferTable() throws Exception
{
StorageService.instance.initServer();
// write a temporary SSTable, but don't register it
Set<String> content = new HashSet<String>();
content.add("key");
SSTableReader sstable = SSTableUtils.writeSSTable(content);
... |
long numberOfColumns);
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* ... | long numberOfColumns);
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* ... |
protected double doComputeResult(int rowA,
int rowB,
Iterable<Cooccurrence> cooccurrences,
double weightOfVectorA,
double weightOfVectorB,
int ... | protected double doComputeResult(int rowA,
int rowB,
Iterable<Cooccurrence> cooccurrences,
double weightOfVectorA,
double weightOfVectorB,
long... |
protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, int numberOfColumns) {
double n = 0.0;
double sumXYdiff2 = 0.0;
for (Cooccurrence cooccurrence : cooccurrences) {
double diff = cooccurrence.getValueA() ... | protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, long numberOfColumns) {
double n = 0.0;
double sumXYdiff2 = 0.0;
for (Cooccurrence cooccurrence : cooccurrences) {
double diff = cooccurrence.getValueA()... |
protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, int numberOfColumns) {
double sumXY = 0.0;
for (Cooccurrence cooccurrence : cooccurrences) {
sumXY += cooccurrence.getValueA() * cooccurrence.getValueB();
... | protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, long numberOfColumns) {
double sumXY = 0.0;
for (Cooccurrence cooccurrence : cooccurrences) {
sumXY += cooccurrence.getValueA() * cooccurrence.getValueB();
... |
protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, int numberOfColumns) {
int count = 0;
double sumX = 0.0;
double sumY = 0.0;
double sumXY = 0.0;
double sumX2 = 0.0;
double sumY2 = 0.0;
for (Co... | protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, long numberOfColumns) {
int count = 0;
double sumX = 0.0;
double sumY = 0.0;
double sumXY = 0.0;
double sumX2 = 0.0;
double sumY2 = 0.0;
for (C... |
protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, int numberOfColumns) {
double cooccurrenceCount = countElements(cooccurrences);
if (cooccurrenceCount == 0) {
return Double.NaN;
}
return cooccurrenceC... | protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, long numberOfColumns) {
double cooccurrenceCount = countElements(cooccurrences);
if (cooccurrenceCount == 0) {
return Double.NaN;
}
return cooccurrence... |
public double similarity(int rowA,
int rowB,
Iterable<Cooccurrence> cooccurrences,
double weightOfVectorA,
double weightOfVectorB,
int numberOfColumns) {
return AbstractDistribute... | public double similarity(int rowA,
int rowB,
Iterable<Cooccurrence> cooccurrences,
double weightOfVectorA,
double weightOfVectorB,
long numberOfColumns) {
return AbstractDistribut... |
protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, int numberOfColumns) {
int n = 0;
double sumXY = 0.0;
double sumX2 = 0.0;
double sumY2 = 0.0;
for (Cooccurrence cooccurrence : cooccurrences) {
d... | protected double doComputeResult(int rowA, int rowB, Iterable<Cooccurrence> cooccurrences, double weightOfVectorA,
double weightOfVectorB, long numberOfColumns) {
int n = 0;
double sumXY = 0.0;
double sumX2 = 0.0;
double sumY2 = 0.0;
for (Cooccurrence cooccurrence : cooccurrences) {
... |
private void validateNameSort(Table table, int N) throws IOException
{
for (int i = 0; i < N; ++i)
{
String key = Integer.toString(i);
ColumnFamily cf;
cf = table.get(key, "Standard1");
Collection<IColumn> columns = cf.getAllColumns();
... | private void validateNameSort(Table table, int N) throws IOException
{
for (int i = 0; i < N; ++i)
{
String key = Integer.toString(i);
ColumnFamily cf;
cf = table.get(key, "Standard1");
Collection<IColumn> columns = cf.getAllColumns();
... |
protected boolean requiresDocScores() {
return getAggregator().requiresDocScores();
}
} | public boolean requiresDocScores() {
return getAggregator().requiresDocScores();
}
} |
protected boolean requiresDocScores() {
return false;
}
} | public boolean requiresDocScores() {
return false;
}
} |
public PHPSerializedWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp, boolean CESU8) {
super(writer, req, rsp);
this.CESU8 = CESU8;
this.utf8 = CESU8 ? null : new BytesRef(10);
// never indent serialized PHP data
doIndent = false;
}
| public PHPSerializedWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp, boolean CESU8) {
super(writer, req, rsp);
this.CESU8 = CESU8;
this.utf8 = CESU8 ? null : new BytesRef();
// never indent serialized PHP data
doIndent = false;
}
|
public static byte[] compressString(String value, int compressionLevel) {
BytesRef result = new BytesRef(10);
UnicodeUtil.UTF16toUTF8(value, 0, value.length(), result);
return compress(result.bytes, 0, result.length, compressionLevel);
}
| public static byte[] compressString(String value, int compressionLevel) {
BytesRef result = new BytesRef();
UnicodeUtil.UTF16toUTF8(value, 0, value.length(), result);
return compress(result.bytes, 0, result.length, compressionLevel);
}
|
public InputStream convert (IDirectory parentEba, IFile fileInEba) throws ConversionException;
} | public BundleConversion convert (IDirectory parentEba, IFile fileInEba) throws ConversionException;
} |
public Shape getBoxShape(double latitude, double longitude, double miles)
{
if (miles < MILES_FLOOR) {
miles = MILES_FLOOR;
}
LLRect box1 = LLRect.createBox( new FloatLatLng( latitude, longitude ), miles, miles );
LatLng lowerLeft = box1.getLowerLeft();
LatLng upperRight = box1.getUpperR... | public Shape getBoxShape(double latitude, double longitude, double miles)
{
if (miles < MILES_FLOOR) {
miles = MILES_FLOOR;
}
LLRect box1 = LLRect.createBox( new FloatLatLng( latitude, longitude ), miles, miles );
LatLng lowerLeft = box1.getLowerLeft();
LatLng upperRight = box1.getUpperR... |
public Map<Token, Float> describeOwnership(List<Token> sortedTokens)
{
Map<Token, Float> ownerships = new HashMap<Token, Float>();
Iterator i = sortedTokens.iterator();
// 0-case
if (!i.hasNext()) { throw new RuntimeException("No nodes present in the cluster. How did you call th... | public Map<Token, Float> describeOwnership(List<Token> sortedTokens)
{
Map<Token, Float> ownerships = new HashMap<Token, Float>();
Iterator i = sortedTokens.iterator();
// 0-case
if (!i.hasNext()) { throw new RuntimeException("No nodes present in the cluster. How did you call th... |
public void assureSufficientLiveNodes() throws UnavailableException
{
Map<String, AtomicInteger> dcEndpoints = new HashMap<String, AtomicInteger>();
for (String dc: strategy.getDatacenters())
dcEndpoints.put(dc, new AtomicInteger());
for (InetAddress destination : hintedEndpoint... | public void assureSufficientLiveNodes() throws UnavailableException
{
Map<String, AtomicInteger> dcEndpoints = new HashMap<String, AtomicInteger>();
for (String dc: strategy.getDatacenters())
dcEndpoints.put(dc, new AtomicInteger());
for (InetAddress destination : hintedEndpoint... |
public void test_errorcode() throws Exception
{
ResultSet rs = null;
Statement s = createStatement();
s.executeUpdate(
"create table t(i int, s smallint)");
s.executeUpdate(
"insert into t values (1,2)");
s.executeUpdate("insert i... | public void test_errorcode() throws Exception
{
ResultSet rs = null;
Statement s = createStatement();
s.executeUpdate(
"create table t(i int, s smallint)");
s.executeUpdate(
"insert into t values (1,2)");
s.executeUpdate("insert i... |
public QueryTreeNode bind() throws StandardException
{
privileges = (PrivilegeNode) privileges.bind( new HashMap());
return this;
} // end of bind
| public QueryTreeNode bind() throws StandardException
{
privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees);
return this;
} // end of bind
|
public QueryTreeNode bind() throws StandardException
{
privileges = (PrivilegeNode) privileges.bind( new HashMap());
return this;
} // end of bind
| public QueryTreeNode bind() throws StandardException
{
privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees);
return this;
} // end of bind
|
protected IColumn getReduced()
{
ColumnFamily purged = PrecompactedRow.removeDeletedAndOldShards(shouldPurge, controller, container);
if (purged == null || !purged.iterator().hasNext())
{
container.clear();
return null;
}
... | protected IColumn getReduced()
{
ColumnFamily purged = PrecompactedRow.removeDeletedAndOldShards(key, shouldPurge, controller, container);
if (purged == null || !purged.iterator().hasNext())
{
container.clear();
return null;
... |
private ExecAggregator cachedAggregator;
/**
* Constructor:
*
* @param aggInfo information about the user aggregate
* @param cf the class factory.
*/
GenericAggregator
(
AggregatorInfo aggInfo,
ClassFactory cf
)
{
this.aggInfo = aggInfo;
aggregatorColumnId = aggInfo.getAggregatorColNum();
... | private ExecAggregator cachedAggregator;
/**
* Constructor:
*
* @param aggInfo information about the user aggregate
* @param cf the class factory.
*/
GenericAggregator
(
AggregatorInfo aggInfo,
ClassFactory cf
)
{
this.aggInfo = aggInfo;
aggregatorColumnId = aggInfo.getAggregatorColNum();
... |
protected Lucene45DocValuesProducer(SegmentReadState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException {
String metaName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, metaExtension);
// read in the entries from the metadat... | protected Lucene45DocValuesProducer(SegmentReadState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException {
String metaName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, metaExtension);
// read in the entries from the metadat... |
public void start(BundleContext context) {
LOGGER.debug("Starting blueprint extender...");
this.context = context;
eventDispatcher = new BlueprintEventDispatcher(context);
handlers = new NamespaceHandlerRegistryImpl(context);
executors = Executors.newScheduledThreadPool(3);
... | public void start(BundleContext context) {
LOGGER.debug("Starting blueprint extender...");
this.context = context;
eventDispatcher = new BlueprintEventDispatcher(context, executors);
handlers = new NamespaceHandlerRegistryImpl(context);
executors = Executors.newScheduledThre... |
protected void visitSubScorers(Query parent, Occur relationship, ScorerVisitor<Query, Query, Scorer> visitor) {
super.visitSubScorers(parent, relationship, visitor);
final Query q = weight.getQuery();
for (Scorer s : optionalScorers) {
s.visitSubScorers(q, Occur.SHOULD, visitor);
}
for (Scor... | public void visitSubScorers(Query parent, Occur relationship, ScorerVisitor<Query, Query, Scorer> visitor) {
super.visitSubScorers(parent, relationship, visitor);
final Query q = weight.getQuery();
for (Scorer s : optionalScorers) {
s.visitSubScorers(q, Occur.SHOULD, visitor);
}
for (Scorer ... |
protected void visitSubScorers(Query parent, Occur relationship,
ScorerVisitor<Query, Query, Scorer> visitor) {
if (weight == null)
throw new UnsupportedOperationException();
final Query q = weight.getQuery();
switch (relationship) {
case MUST:
visitor.visitRequired(parent, q, this)... | public void visitSubScorers(Query parent, Occur relationship,
ScorerVisitor<Query, Query, Scorer> visitor) {
if (weight == null)
throw new UnsupportedOperationException();
final Query q = weight.getQuery();
switch (relationship) {
case MUST:
visitor.visitRequired(parent, q, this);
... |
protected void visitSubScorers(Query parent, Occur relationship, ScorerVisitor<Query, Query, Scorer> visitor) {
super.visitSubScorers(parent, relationship, visitor);
final Query q = weight.getQuery();
SubScorer sub = scorers;
while(sub != null) {
// TODO: re-enable this if BQ ever sends us requi... | public void visitSubScorers(Query parent, Occur relationship, ScorerVisitor<Query, Query, Scorer> visitor) {
super.visitSubScorers(parent, relationship, visitor);
final Query q = weight.getQuery();
SubScorer sub = scorers;
while(sub != null) {
// TODO: re-enable this if BQ ever sends us required... |
public void testAddIndexes() throws Exception {
boolean optimize = false;
Directory dir1 = new MockRAMDirectory();
IndexWriter writer = new IndexWriter(dir1, new WhitespaceAnalyzer(),
IndexWriter.MaxFieldLength.LIMITED);
writer.setInfoStream(infoStream);
// create the index
createInde... | public void testAddIndexes() throws Exception {
boolean optimize = false;
Directory dir1 = new MockRAMDirectory();
IndexWriter writer = new IndexWriter(dir1, new WhitespaceAnalyzer(),
IndexWriter.MaxFieldLength.LIMITED);
writer.setInfoStream(infoStream);
// create the index
createInde... |
public void optimize(boolean doWait) throws CorruptIndexException, IOException {
optimize(1, true);
}
| public void optimize(boolean doWait) throws CorruptIndexException, IOException {
optimize(1, doWait);
}
|
public String getColumnsString(Collection<IColumn> columns)
{
StringBuilder builder = new StringBuilder();
for (IColumn column : columns)
{
builder.append(getString(column.name())).append(",");
}
return builder.toString();
}
| public String getColumnsString(Collection<IColumn> columns)
{
StringBuilder builder = new StringBuilder();
for (IColumn column : columns)
{
builder.append(column.getString(this)).append(",");
}
return builder.toString();
}
|
public void delete(ColumnFamily cf2)
{
FBUtilities.atomicSetMax(localDeletionTime, cf2.getLocalDeletionTime());
FBUtilities.atomicSetMax(markedForDeleteAt, cf2.getMarkedForDeleteAt());
}
| public void delete(ColumnFamily cf2)
{
FBUtilities.atomicSetMax(localDeletionTime, cf2.getLocalDeletionTime()); // do this first so we won't have a column that's "deleted" but has no local deletion time
FBUtilities.atomicSetMax(markedForDeleteAt, cf2.getMarkedForDeleteAt());
}
|
public String getDescription() {
return "GapFragmenter";
}
| public String getDescription() {
return "HtmlFormatter";
}
|
public long maxTimestamp()
{
throw new UnsupportedOperationException();
}
| public long maxTimestamp()
{
return Long.MIN_VALUE;
}
|
public BoostingQuery(Query match, Query context, float boost) {
this.match = match;
this.context = (Query)context.clone(); // clone before boost
this.boost = boost;
context.setBoost(0.0f); // ignore context-only matches
}
| public BoostingQuery(Query match, Query context, float boost) {
this.match = match;
this.context = (Query)context.clone(); // clone before boost
this.boost = boost;
this.context.setBoost(0.0f); // ignore context-only matches
}
|
public Method getDestroyMethod(Object instance) throws ComponentDefinitionException {
Method method = null;
if (destroyMethod != null && destroyMethod.length() > 0) {
method = ReflectionUtils.getLifecycleMethod(instance.getClass(), destroyMethod);
if (method == null) ... | public Method getDestroyMethod(Object instance) throws ComponentDefinitionException {
Method method = null;
if (instance != null && destroyMethod != null && destroyMethod.length() > 0) {
method = ReflectionUtils.getLifecycleMethod(instance.getClass(), destroyMethod);
... |
public void onJoin(InetAddress endpoint, EndpointState epState)
{
for (Map.Entry<String,ApplicationState> entry : epState.getSortedApplicationStates())
{
onChange(endpoint, entry.getKey(), entry.getValue());
}
}
| public void onJoin(InetAddress endpoint, EndpointState epState)
{
for (Map.Entry<String,ApplicationState> entry : epState.getApplicationStateMap().entrySet())
{
onChange(endpoint, entry.getKey(), entry.getValue());
}
}
|
public JettySolrRunner getRandomJetty(String slice, boolean aggressivelyKillLeaders) throws KeeperException, InterruptedException {
// get latest cloud state
zkStateReader.updateCloudState(true);
Slice theShards = zkStateReader.getCloudState().getSlices(collection)
.get(slice);
int n... | public JettySolrRunner getRandomJetty(String slice, boolean aggressivelyKillLeaders) throws KeeperException, InterruptedException {
// get latest cloud state
zkStateReader.updateCloudState(true);
Slice theShards = zkStateReader.getCloudState().getSlices(collection)
.get(slice);
int n... |
protected void retryDelay(int attemptCount) {
if (attemptCount > 0) {
try {
Thread.sleep(Math.min(10000, attemptCount * retryDelay));
} catch (InterruptedException e) {
LOG.debug("Failed to sleep: " + e, e);
}
}
}
| protected void retryDelay(int attemptCount) {
if (attemptCount > 0) {
try {
Thread.sleep(Math.max(10000, attemptCount * retryDelay));
} catch (InterruptedException e) {
LOG.debug("Failed to sleep: " + e, e);
}
}
}
|
public Object lookup(String name) throws NamingException
{
Object result = null;
result = ServiceHelper.getService(parentName.getInterface(), parentName.getFilter(), parentName.getServiceName(), name, false, env);
if (result == null) {
throw new NameNotFoundException(name.toString());
... | public Object lookup(String name) throws NamingException
{
Object result = null;
result = ServiceHelper.getService(parentName, name, false, env);
if (result == null) {
throw new NameNotFoundException(name.toString());
}
return result;
}
|
public String getStringProperty(String propertyName)
{
if (propertyName.equals("cluster name"))
{
return DatabaseDescriptor.getClusterName();
}
else if (propertyName.equals("config file"))
{
String filename = DatabaseDescriptor.getConfigFileName();... | public String getStringProperty(String propertyName)
{
if (propertyName.equals("cluster name"))
{
return DatabaseDescriptor.getClusterName();
}
else if (propertyName.equals("config file"))
{
String filename = DatabaseDescriptor.getConfigFileName();... |
protected int hashForProbe(String originalForm, Vector data, String name, int i) {
return hash(name, i, data.size());
}
| protected int hashForProbe(String originalForm, Vector data, String name, int i) {
return hash(name, originalForm, WORD_LIKE_VALUE_HASH_SEED + i, data.size());
}
|
public void run()
{
activelyMeasuring = Memtable.this;
long start = System.currentTimeMillis();
// ConcurrentSkipListMap has cycles, so measureDeep will have to track a reference to EACH object it visits.
// So to reduce the memory... | public void run()
{
activelyMeasuring = Memtable.this;
long start = System.currentTimeMillis();
// ConcurrentSkipListMap has cycles, so measureDeep will have to track a reference to EACH object it visits.
// So to reduce the memory... |
protected void setCollationUsingCompilationSchema(int collationDerivation)
throws StandardException {
dataTypeServices.setCollationType(
getSchemaDescriptor(null).getCollationType());
dataTypeServices.setCollationDerivation(collationDerivation);
}
| protected void setCollationUsingCompilationSchema(int collationDerivation)
throws StandardException {
dataTypeServices.setCollationType(
getSchemaDescriptor(null, false).getCollationType());
dataTypeServices.setCollationDerivation(collationDerivation);
}
|
public void startNext()
{
if (files.size() > 0)
{
File file = new File(files.get(0).getFilename());
if (logger.isDebugEnabled())
logger.debug("Streaming " + file.length() + " length file " + file + " ...");
MessagingService.instance.stream(file.g... | public void startNext()
{
if (files.size() > 0)
{
File file = new File(files.get(0).getFilename());
if (logger.isDebugEnabled())
logger.debug("Streaming " + file.length() + " length file " + file + " ...");
MessagingService.instance.stream(file.g... |
public static void usage() {
System.err.println("This tool processes OSGi Bundles that use java.util.ServiceLoader.load() to");
System.err.println("obtain implementations via META-INF/services. The byte code in the bundles is");
System.err.println("modified so that the ThreadContextClassLoad... | public static void usage() {
System.err.println("This tool processes OSGi Bundles that use java.util.ServiceLoader.load() to");
System.err.println("obtain implementations via META-INF/services. The byte code in the bundles is");
System.err.println("modified so that the ThreadContextClassLoad... |
private static RequestSchedulerOptions requestSchedulerOptions;
/**
* Inspect the classpath to find storage configuration file
*/
static URL getStorageConfigURL() throws ConfigurationException
{
String configUrl = System.getProperty("cassandra.config");
if (configUrl == null)
... | private static RequestSchedulerOptions requestSchedulerOptions;
/**
* Inspect the classpath to find storage configuration file
*/
static URL getStorageConfigURL() throws ConfigurationException
{
String configUrl = System.getProperty("cassandra.config");
if (configUrl == null)
... |
public void close() {
try {
defaultClient.getConnectionManager().shutdown();
} catch (Throwable e) {
SolrException.log(log, e);
}
try {
loadbalancer.shutdown();
} catch (Throwable e) {
SolrException.log(log, e);
}
try {
ExecutorUtil.shutdownAndAwaitTermination... | public void close() {
try {
defaultClient.getConnectionManager().shutdown();
} catch (Throwable e) {
SolrException.log(log, e);
}
try {
loadbalancer.shutdown();
} catch (Throwable e) {
SolrException.log(log, e);
}
try {
ExecutorUtil.shutdownNowAndAwaitTerminat... |
public ZkNodeProps getLeaderProps(String collection, String shard, int timeout) throws InterruptedException {
long timeoutAt = System.currentTimeMillis() + timeout;
while (System.currentTimeMillis() < timeoutAt) {
if (clusterState != null) {
final ZkNodeProps nodeProps = clusterState.getLead... | public ZkNodeProps getLeaderProps(String collection, String shard, int timeout) throws InterruptedException {
long timeoutAt = System.currentTimeMillis() + timeout;
while (System.currentTimeMillis() < timeoutAt) {
if (clusterState != null) {
final ZkNodeProps nodeProps = clusterState.getLead... |
private static final String [] IGNORED_INVARIANT_PROPERTIES = {
"user.timezone"
};
| private static final String [] IGNORED_INVARIANT_PROPERTIES = {
"user.timezone", "java.rmi.server.randomIDs"
};
|
protected void runTest(String[] args) throws Exception {
// Check the returned type of the JDBC Connections.
ij.getPropertyArg(args);
Connection dmc = ij.startJBMS();
dmc.createStatement().executeUpdate("create table y(i int)");
dmc.createStatement().executeUpdate(
"create procedure checkC... | protected void runTest(String[] args) throws Exception {
// Check the returned type of the JDBC Connections.
ij.getPropertyArg(args);
Connection dmc = ij.startJBMS();
dmc.createStatement().executeUpdate("create table y(i int)");
dmc.createStatement().executeUpdate(
"create procedure checkC... |
public static boolean skipIt(String listFileName, String testName)
throws Exception
{
boolean answer = false;
InputStream is =
RunTest.loadTestResource("suites" + '/' + listFileName);
if (is == null)
{
System.out.println("File not found: " + listFileName);
... | public static boolean skipIt(String listFileName, String testName)
throws Exception
{
boolean answer = false;
InputStream is =
RunTest.loadTestResource("suites" + '/' + listFileName);
if (is == null)
{
System.out.println("File not found: " + listFileName);
... |
private static void runSuites(Vector suitesToRun)
throws ClassNotFoundException,
FileNotFoundException, IOException, Exception
{
// For each suite, locate its properties and runall files
// which should be in the "suites" dir or user.dir
String suiteName = "";
use... | private static void runSuites(Vector suitesToRun)
throws ClassNotFoundException,
FileNotFoundException, IOException, Exception
{
// For each suite, locate its properties and runall files
// which should be in the "suites" dir or user.dir
String suiteName = "";
use... |
private void doWork(File srcFile, File dstFile, InputStream is, Vector deleteLines,
Vector searchStrings, Vector subStrings, InputStream isSed, boolean isI18N)
throws IOException
{
boolean lineDeleted = false;
PatternMatcher matcher;
Perl5Compiler pcompiler;
P... | private void doWork(File srcFile, File dstFile, InputStream is, Vector deleteLines,
Vector searchStrings, Vector subStrings, InputStream isSed, boolean isI18N)
throws IOException
{
boolean lineDeleted = false;
PatternMatcher matcher;
Perl5Compiler pcompiler;
P... |
private void doTrace(Throwable t) {
if (util.getSystemProperty("ij.exceptionTrace") != null) {
t.printStackTrace(out);
}
out.flush();
}
void newInput(String fileName) {
FileInputStream newFile = null;
try {
newFile = new FileInputStream(fileName);
} catch (FileNotFoundException e) {
... | private void doTrace(Throwable t) {
if (util.getSystemProperty("ij.exceptionTrace") != null) {
t.printStackTrace(out);
}
out.flush();
}
void newInput(String fileName) {
FileInputStream newFile = null;
try {
newFile = new FileInputStream(fileName);
} catch (FileNotFoundException e) {
... |
public SortField getSortField(SchemaField field, boolean top) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Sorting not suported on PointType " + field.getName());
}
| public SortField getSortField(SchemaField field, boolean top) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Sorting not supported on PointType " + field.getName());
}
|
public void init(FilterConfig config) throws ServletException
{
log.info("SolrDispatchFilter.init()");
boolean abortOnConfigurationError = true;
CoreContainer.Initializer init = createInitializer();
try {
// web.xml configuration
this.pathPrefix = config.getInitParameter( "path-prefix" ... | public void init(FilterConfig config) throws ServletException
{
log.info("SolrDispatchFilter.init()");
boolean abortOnConfigurationError = true;
CoreContainer.Initializer init = createInitializer();
try {
// web.xml configuration
this.pathPrefix = config.getInitParameter( "path-prefix" ... |
public void testBlobCreateLocatorSP() throws SQLException {
//initialize the locator to a default value.
int locator = -1;
//call the stored procedure to return the created locator.
CallableStatement cs = prepareCall
("? = CALL SYSIBM.BLOBCREATELOCATOR()");
cs.re... | public void testBlobCreateLocatorSP() throws SQLException {
//initialize the locator to a default value.
int locator = -1;
//call the stored procedure to return the created locator.
CallableStatement cs = prepareCall
("? = CALL SYSIBM.BLOBCREATELOCATOR()");
cs.re... |
public void run()
{
try
{
Thread.sleep(DatabaseDescriptor.getRpcTimeout());
}
catch (InterruptedException e)
{
throw new AssertionError(e);
}
Sy... | public void run()
{
try
{
Thread.sleep(DatabaseDescriptor.getRpcTimeout());
}
catch (InterruptedException e)
{
throw new AssertionError(e);
}
Sy... |
public final float score(BasicStats stats, float tfn) {
float lambda = (float)stats.getTotalTermFreq() / stats.getNumberOfDocuments();
return (float)(tfn * log2(tfn / lambda)
+ (lambda + 1 / (12 * tfn) - tfn) * LOG2_E
+ 0.5 * log2(2 * Math.PI * tfn));
}
| public final float score(BasicStats stats, float tfn) {
float lambda = (float)(stats.getTotalTermFreq()+1) / (stats.getNumberOfDocuments()+1);
return (float)(tfn * log2(tfn / lambda)
+ (lambda + 1 / (12 * tfn) - tfn) * LOG2_E
+ 0.5 * log2(2 * Math.PI * tfn));
}
|
public float tfn(BasicStats stats, float tf, float len) {
return (tf + mu * (stats.getTotalTermFreq() / (float)stats.getNumberOfFieldTokens())) / (len + mu) * mu;
}
| public float tfn(BasicStats stats, float tf, float len) {
return (tf + mu * ((stats.getTotalTermFreq()+1F) / (stats.getNumberOfFieldTokens()+1F))) / (len + mu) * mu;
}
|
private void extractFacetInfo( NamedList<Object> info )
{
// Parse the queries
_facetQuery = new HashMap<String, Integer>();
NamedList<Integer> fq = (NamedList<Integer>) info.get( "facet_queries" );
if (fq != null) {
for( Map.Entry<String, Integer> entry : fq ) {
_facetQuery.put( entry... | private void extractFacetInfo( NamedList<Object> info )
{
// Parse the queries
_facetQuery = new LinkedHashMap<String, Integer>();
NamedList<Integer> fq = (NamedList<Integer>) info.get( "facet_queries" );
if (fq != null) {
for( Map.Entry<String, Integer> entry : fq ) {
_facetQuery.put(... |
public Session(String[] arguments) throws IllegalArgumentException
{
float STDev = 0.1f;
CommandLineParser parser = new PosixParser();
try
{
CommandLine cmd = parser.parse(availableOptions, arguments);
if (cmd.hasOption("h"))
throw new Il... | public Session(String[] arguments) throws IllegalArgumentException
{
float STDev = 0.1f;
CommandLineParser parser = new PosixParser();
try
{
CommandLine cmd = parser.parse(availableOptions, arguments);
if (cmd.hasOption("h"))
throw new Il... |
public static final String fileNameFromGeneration(String base, String extension, long gen) {
if (gen == -1) {
return null;
} else if (gen == 0) {
return base + extension;
} else {
return base + "_" + Long.toString(gen, Character.MAX_RADIX) + extension;
}
}
| static final String fileNameFromGeneration(String base, String extension, long gen) {
package org.apache.lucene.index;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding co... |
public SegmentInfo(Directory dir, int format, IndexInput input) throws IOException {
this.dir = dir;
name = input.readString();
docCount = input.readInt();
if (format <= SegmentInfos.FORMAT_LOCKLESS) {
delGen = input.readLong();
if (format <= SegmentInfos.FORMAT_SINGLE_NORM_FILE) {
... | public SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile) {
this(name, docCount, dir);
this.isCompoundFile = (byte) (isCompoundFile ? 1 : -1);
this.hasSingleNormFile = hasSingleNormFile;
preLockless = false;
}
/**
* Copy everything from sr... |
private IMutation mutationForKey(String keyspace, ByteBuffer key, CFMetaData metadata, Long timestamp, ClientState clientState) throws InvalidRequestException
{
AbstractType<?> comparator = getComparator(keyspace);
// if true we need to wrap RowMutation into CounterMutation
boolean hasC... | private IMutation mutationForKey(String keyspace, ByteBuffer key, CFMetaData metadata, Long timestamp, ClientState clientState) throws InvalidRequestException
{
AbstractType<?> comparator = getComparator(keyspace);
// if true we need to wrap RowMutation into CounterMutation
boolean hasC... |
public String toString() {
return "<matchAllDocs field='*' term='*'>";
}
| public String toString() {
return "<matchAllDocs field='*' term='*'/>";
}
|
public void setField(String name, Object value)
{
if( value instanceof Object[] ) {
value = Arrays.asList( (Object[])value );
}
else if( value instanceof Collection ) {
// nothing
}
else if( value instanceof Iterable ) {
ArrayList<Object> lst = new ArrayList<Object>();
f... | public void setField(String name, Object value)
{
if( value instanceof Object[] ) {
value = new ArrayList(Arrays.asList( (Object[])value ));
}
else if( value instanceof Collection ) {
// nothing
}
else if( value instanceof Iterable ) {
ArrayList<Object> lst = new ArrayList<Obj... |
public IndexOutput createOutput(String name) throws IOException {
ensureOpen();
RAMFile file = new RAMFile(this);
synchronized (this) {
RAMFile existing = fileMap.get(name);
if (existing!=null) {
sizeInBytes.addAndGet(existing.sizeInBytes);
existing.directory = null;
}
... | public IndexOutput createOutput(String name) throws IOException {
ensureOpen();
RAMFile file = new RAMFile(this);
synchronized (this) {
RAMFile existing = fileMap.get(name);
if (existing!=null) {
sizeInBytes.addAndGet(-existing.sizeInBytes);
existing.directory = null;
}
... |
public static DefaultOptionBuilder inputOption() {
return new DefaultOptionBuilder().withLongName("input").withRequired(false).withShortName("i").withArgument(
new ArgumentBuilder().withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
"Path to job input directory. Must be a S... | public static DefaultOptionBuilder inputOption() {
return new DefaultOptionBuilder().withLongName("input").withRequired(false).withShortName("i").withArgument(
new ArgumentBuilder().withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
"Path to job input directory.");
}
|
protected boolean lessThan(SegFacet a, SegFacet b) {
return a.tempBR.compareTo(b.tempBR) < 0;
}
};
boolean hasMissingCount=false;
int missingCount=0;
for (int i=0; i<leaves.length; i++) {
SegFacet seg = null;
try {
Future<SegFacet> future = completionService.ta... | protected boolean lessThan(SegFacet a, SegFacet b) {
return a.tempBR.compareTo(b.tempBR) < 0;
}
};
boolean hasMissingCount=false;
int missingCount=0;
for (int i=0; i<leaves.length; i++) {
SegFacet seg = null;
try {
Future<SegFacet> future = completionService.ta... |
public void testGetFilterHandleNumericParseError() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(false);
String xml = "<NumericRangeFilter fieldName='AGE' type='int' lowerTerm='-1' upperTerm='NaN'/>";
Document doc = getDocume... | public void testGetFilterHandleNumericParseError() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(false);
String xml = "<NumericRangeFilter fieldName='AGE' type='int' lowerTerm='-1' upperTerm='NaN'/>";
Document doc = getDocume... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.