method
stringlengths 13
441k
| clean_method
stringlengths 7
313k
| doc
stringlengths 17
17.3k
| comment
stringlengths 3
1.42k
| method_name
stringlengths 1
273
| extra
dict | imports
sequence | imports_info
stringlengths 19
34.8k
| cluster_imports_info
stringlengths 15
3.66k
| libraries
sequence | libraries_info
stringlengths 6
661
| id
int64 0
2.92M
|
---|---|---|---|---|---|---|---|---|---|---|---|
public static Locale toLocale(Locale locale) {
if (locale != null) {
String code = localeToLanguageCode(locale);
if (code != null && isValid(code)) {
return Locale.forLanguageTag(code);
}
}
return null;
} | static Locale function(Locale locale) { if (locale != null) { String code = localeToLanguageCode(locale); if (code != null && isValid(code)) { return Locale.forLanguageTag(code); } } return null; } | /**
* Returns a UMS supported {@link java.util.Locale} from the given
* <code>Local</code> if it can be found (<code>en</code> is translated to
* <code>en-US</code>, <code>zh</code> to <code>zh-Hant</code> etc.).
* Returns <code>null</code> if a valid <code>Locale</code> cannot be found.
* @param locale Source {@link java.util.Locale}.
* @return Resulting {@link java.util.Locale}.
*/ | Returns a UMS supported <code>java.util.Locale</code> from the given <code>Local</code> if it can be found (<code>en</code> is translated to <code>en-US</code>, <code>zh</code> to <code>zh-Hant</code> etc.). Returns <code>null</code> if a valid <code>Locale</code> cannot be found | toLocale | {
"repo_name": "mindwarper/UniversalMediaServer",
"path": "src/main/java/net/pms/util/Languages.java",
"license": "gpl-2.0",
"size": 8858
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,296,144 |
public List<T> list() {
List<T> list = new ArrayList<T>();
SQLiteDatabase db = dbHelper.getReadableDatabase();
Cursor cursor = null;
try {
cursor = db.query(table, null, null, null, null, null, null);
while (cursor.moveToNext()) {
list.add(newInstance(cursor));
}
} catch (SQLiteException e) {
e.printStackTrace();
} finally {
if (cursor != null)
cursor.close();
db.close();
}
return list;
}
/**
* Query the given table, returning a {@link java.util.List} over the result
* set. This method is quite like
* {@link android.database.sqlite.SQLiteDatabase#query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) }
| List<T> function() { List<T> list = new ArrayList<T>(); SQLiteDatabase db = dbHelper.getReadableDatabase(); Cursor cursor = null; try { cursor = db.query(table, null, null, null, null, null, null); while (cursor.moveToNext()) { list.add(newInstance(cursor)); } } catch (SQLiteException e) { e.printStackTrace(); } finally { if (cursor != null) cursor.close(); db.close(); } return list; } /** * Query the given table, returning a {@link java.util.List} over the result * set. This method is quite like * {@link android.database.sqlite.SQLiteDatabase#query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) } | /**
* List all of the objects in the table.
*
* @return A {@link java.util.List} of objects typed T. If there is no
* records in the table, a List of size 0 will be returned.
*/ | List all of the objects in the table | list | {
"repo_name": "Steven-Luo/AnnotationDao",
"path": "AnnotationDao_src/src/com/cn/naive/library/dao/AbstractDao.java",
"license": "apache-2.0",
"size": 12940
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"android.database.sqlite.SQLiteException",
"java.util.ArrayList",
"java.util.List"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import java.util.ArrayList; import java.util.List; | import android.database.*; import android.database.sqlite.*; import java.util.*; | [
"android.database",
"java.util"
] | android.database; java.util; | 1,058,802 |
private void awaitStopped(long time, TimeUnit unit) throws InterruptedException {
assertTrue(terminalLatch.await(time, unit));
} | void function(long time, TimeUnit unit) throws InterruptedException { assertTrue(terminalLatch.await(time, unit)); } | /**
* Wait for the service to reach a terminal state without calling stop.
*/ | Wait for the service to reach a terminal state without calling stop | awaitStopped | {
"repo_name": "cmelchior/caliper",
"path": "old/caliper/test/java/com/google/caliper/runner/StreamServiceTest.java",
"license": "apache-2.0",
"size": 9475
} | [
"java.util.concurrent.TimeUnit",
"org.junit.Assert"
] | import java.util.concurrent.TimeUnit; import org.junit.Assert; | import java.util.concurrent.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 413,370 |
public void commitTransaction() throws DatabaseException;
| void function() throws DatabaseException; | /**
* Commits all the database operation since {@link #beginTransaction()} is invoked.
* @throws DatabaseException
*/ | Commits all the database operation since <code>#beginTransaction()</code> is invoked | commitTransaction | {
"repo_name": "ivanceras/orm",
"path": "src/main/java/com/ivanceras/db/api/IDatabase.java",
"license": "apache-2.0",
"size": 7952
} | [
"com.ivanceras.db.shared.exception.DatabaseException"
] | import com.ivanceras.db.shared.exception.DatabaseException; | import com.ivanceras.db.shared.exception.*; | [
"com.ivanceras.db"
] | com.ivanceras.db; | 2,278,275 |
public void startEntity(String name,
XMLResourceIdentifier identifier,
String encoding, Augmentations augs) throws XNIException {
// keep track of this entity before fEntityDepth is increased
if (fEntityDepth == fEntityStack.length) {
int[] entityarray = new int[fEntityStack.length * 2];
System.arraycopy(fEntityStack, 0, entityarray, 0, fEntityStack.length);
fEntityStack = entityarray;
}
fEntityStack[fEntityDepth] = fMarkupDepth;
super.startEntity(name, identifier, encoding, augs);
// WFC: entity declared in external subset in standalone doc
if(fStandalone && fEntityManager.isEntityDeclInExternalSubset(name)) {
reportFatalError("MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE",
new Object[]{name});
}
// call handler
if (fDocumentHandler != null && !fScanningAttribute) {
if (!name.equals("[xml]")) {
fDocumentHandler.startGeneralEntity(name, identifier, encoding, augs);
}
}
} // startEntity(String,XMLResourceIdentifier,String) | void function(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException { if (fEntityDepth == fEntityStack.length) { int[] entityarray = new int[fEntityStack.length * 2]; System.arraycopy(fEntityStack, 0, entityarray, 0, fEntityStack.length); fEntityStack = entityarray; } fEntityStack[fEntityDepth] = fMarkupDepth; super.startEntity(name, identifier, encoding, augs); if(fStandalone && fEntityManager.isEntityDeclInExternalSubset(name)) { reportFatalError(STR, new Object[]{name}); } if (fDocumentHandler != null && !fScanningAttribute) { if (!name.equals("[xml]")) { fDocumentHandler.startGeneralEntity(name, identifier, encoding, augs); } } } | /**
* This method notifies of the start of an entity. The DTD has the
* pseudo-name of "[dtd]" parameter entity names start with '%'; and
* general entities are just specified by their name.
*
* @param name The name of the entity.
* @param identifier The resource identifier.
* @param encoding The auto-detected IANA encoding name of the entity
* stream. This value will be null in those situations
* where the entity encoding is not auto-detected (e.g.
* internal entities or a document entity that is
* parsed from a java.io.Reader).
* @param augs Additional information that may include infoset augmentations
*
* @throws XNIException Thrown by handler to signal an error.
*/ | This method notifies of the start of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name | startEntity | {
"repo_name": "ronsigal/xerces",
"path": "src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java",
"license": "apache-2.0",
"size": 69892
} | [
"org.apache.xerces.xni.Augmentations",
"org.apache.xerces.xni.XMLResourceIdentifier",
"org.apache.xerces.xni.XNIException"
] | import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.XMLResourceIdentifier; import org.apache.xerces.xni.XNIException; | import org.apache.xerces.xni.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 1,309,502 |
public boolean isModified() {
String oldValue = PreferenceManager.getString(key, defaultValue);
String newValue = (String) combo.getSelectedItem();
return !oldValue.equals(newValue);
} | boolean function() { String oldValue = PreferenceManager.getString(key, defaultValue); String newValue = (String) combo.getSelectedItem(); return !oldValue.equals(newValue); } | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | isModified | {
"repo_name": "tonivade/tedit",
"path": "src/tk/tomby/tedit/gui/editors/FontEditor.java",
"license": "gpl-2.0",
"size": 4396
} | [
"tk.tomby.tedit.services.PreferenceManager"
] | import tk.tomby.tedit.services.PreferenceManager; | import tk.tomby.tedit.services.*; | [
"tk.tomby.tedit"
] | tk.tomby.tedit; | 256,767 |
//@Test
public void dateString() {
try {
Expression expression = getExpressionWithFunctionContext("date_str(date_parse(123456789), DATE_MEDIUM, DATE_SHOW_DATE_AND_TIME)");
assertEquals(ExpressionType.STRING, expression.getExpressionType());
assertEquals("Jan 2, 1970 11:17:36 AM", expression.evaluateNominal());
} catch (ExpressionException e) {
fail(e.getMessage());
}
} | try { Expression expression = getExpressionWithFunctionContext(STR); assertEquals(ExpressionType.STRING, expression.getExpressionType()); assertEquals(STR, expression.evaluateNominal()); } catch (ExpressionException e) { fail(e.getMessage()); } } | /**
* DateString tests
*/ | DateString tests | dateString | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/test/java/com/rapidminer/tools/expression/internal/function/AntlrParserConversionTest.java",
"license": "gpl-3.0",
"size": 34902
} | [
"com.rapidminer.tools.expression.Expression",
"com.rapidminer.tools.expression.ExpressionException",
"com.rapidminer.tools.expression.ExpressionType",
"org.junit.Assert"
] | import com.rapidminer.tools.expression.Expression; import com.rapidminer.tools.expression.ExpressionException; import com.rapidminer.tools.expression.ExpressionType; import org.junit.Assert; | import com.rapidminer.tools.expression.*; import org.junit.*; | [
"com.rapidminer.tools",
"org.junit"
] | com.rapidminer.tools; org.junit; | 2,746,077 |
public static Map<String, List<String>> getSupervisorHostIdMapping(ClusterSummary summary) {
Map<String, List<String>> result = new HashMap<String, List<String>>();
List<SupervisorSummary> supervisors = summary.get_supervisors();
for (int s = 0; s < summary.get_supervisors_size(); s++) {
SupervisorSummary supervisor = supervisors.get(s);
String host = supervisor.get_host();
List<String> tmp = result.get(host);
if (null == tmp) {
tmp = new ArrayList<String>();
result.put(host, tmp);
}
tmp.add(supervisor.get_supervisor_id());
}
return result;
}
| static Map<String, List<String>> function(ClusterSummary summary) { Map<String, List<String>> result = new HashMap<String, List<String>>(); List<SupervisorSummary> supervisors = summary.get_supervisors(); for (int s = 0; s < summary.get_supervisors_size(); s++) { SupervisorSummary supervisor = supervisors.get(s); String host = supervisor.get_host(); List<String> tmp = result.get(host); if (null == tmp) { tmp = new ArrayList<String>(); result.put(host, tmp); } tmp.add(supervisor.get_supervisor_id()); } return result; } | /**
* Returns the mapping of supervisor host names to supervisor ids.
*
* @param summary the cluster summary
* @return the mapping (a host may run multiple supervisors and then we return them in the sequence given
* by thrift)
*/ | Returns the mapping of supervisor host names to supervisor ids | getSupervisorHostIdMapping | {
"repo_name": "QualiMaster/Infrastructure",
"path": "StormCommons/src/eu/qualimaster/common/signal/ThriftConnection.java",
"license": "apache-2.0",
"size": 14564
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 487,817 |
@Test(expected = NumberFormatException.class)
public void testConvertWithText() throws Exception {
getConverter().convert("foo");
} | @Test(expected = NumberFormatException.class) void function() throws Exception { getConverter().convert("foo"); } | /**
* Tests that converting an arbitrary text throws a NumberFormatException.
* @throws NumberFormatException Expected exception that's thrown if the test case is successful.
* @throws Exception In case of unexpected errors.
*/ | Tests that converting an arbitrary text throws a NumberFormatException | testConvertWithText | {
"repo_name": "christianhujer/japi",
"path": "historic2/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java",
"license": "lgpl-3.0",
"size": 3855
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,571,552 |
public Date getLastModified(); | Date function(); | /**
* Returns the last modified.
*
* @return the last modified
*/ | Returns the last modified | getLastModified | {
"repo_name": "WestCoastInformatics/ihtsdo-refset-tool",
"path": "model/src/main/java/org/ihtsdo/otf/refset/helpers/HasLastModified.java",
"license": "apache-2.0",
"size": 769
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,753,406 |
public Any get_any()
throws TypeMismatch, InvalidValue
{
return focused().get_any();
} | Any function() throws TypeMismatch, InvalidValue { return focused().get_any(); } | /**
* Return the second (enclosed any) that is stored in the wrapped Any.
*/ | Return the second (enclosed any) that is stored in the wrapped Any | get_any | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/CORBA/DynAn/DivideableAny.java",
"license": "gpl-2.0",
"size": 12656
} | [
"org.omg.CORBA",
"org.omg.DynamicAny"
] | import org.omg.CORBA; import org.omg.DynamicAny; | import org.omg.*; | [
"org.omg"
] | org.omg; | 959,671 |
@SuppressWarnings("unchecked")
private Map<String, Object> fromJson(String json)
{
Map<String, Object> map = (HashMap<String, Object>) gson.fromJson(json, HashMap.class);
return map;
} | @SuppressWarnings(STR) Map<String, Object> function(String json) { Map<String, Object> map = (HashMap<String, Object>) gson.fromJson(json, HashMap.class); return map; } | /**
* Helper to convert Json to map for quick testing of values
*/ | Helper to convert Json to map for quick testing of values | fromJson | {
"repo_name": "AlfrescoBenchmark/alfresco-benchmark",
"path": "server/src/test/java/org/alfresco/bm/api/v1/RestAPITest.java",
"license": "lgpl-3.0",
"size": 52929
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,203,296 |
public BufferedImage getImage()
{
return getImage(false);
} | BufferedImage function() { return getImage(false); } | /**
* Returns an image of this Sprite.
*
* @param trans Whether color 0 should be transparent
* @return A BufferedImage of what this Sprite looks like.
* @see #setImage(BufferedImage)
*/ | Returns an image of this Sprite | getImage | {
"repo_name": "dperelman/jhack",
"path": "src/net/starmen/pkhack/eb/SpriteEditor.java",
"license": "gpl-3.0",
"size": 53554
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 710,935 |
private boolean skipCellVersion(Cell cell) {
return skipColumn != null
&& CellUtil.matchingRow(cell, skipColumn.getRowArray(), skipColumn.getRowOffset(),
skipColumn.getRowLength())
&& CellUtil.matchingFamily(cell, skipColumn.getFamilyArray(), skipColumn.getFamilyOffset(),
skipColumn.getFamilyLength())
&& CellUtil.matchingQualifier(cell, skipColumn.getQualifierArray(), skipColumn.getQualifierOffset(),
skipColumn.getQualifierLength());
} | boolean function(Cell cell) { return skipColumn != null && CellUtil.matchingRow(cell, skipColumn.getRowArray(), skipColumn.getRowOffset(), skipColumn.getRowLength()) && CellUtil.matchingFamily(cell, skipColumn.getFamilyArray(), skipColumn.getFamilyOffset(), skipColumn.getFamilyLength()) && CellUtil.matchingQualifier(cell, skipColumn.getQualifierArray(), skipColumn.getQualifierOffset(), skipColumn.getQualifierLength()); } | /**
* Determines whether the current cell should be skipped. The cell will be skipped
* if the previous keyvalue had the same key as the current cell. This means filter already responded
* for the previous keyvalue with ReturnCode.NEXT_COL or ReturnCode.INCLUDE_AND_NEXT_COL.
* @param cell the {@link Cell} to be tested for skipping
* @return true is current cell should be skipped, false otherwise
*/ | Determines whether the current cell should be skipped. The cell will be skipped if the previous keyvalue had the same key as the current cell. This means filter already responded for the previous keyvalue with ReturnCode.NEXT_COL or ReturnCode.INCLUDE_AND_NEXT_COL | skipCellVersion | {
"repo_name": "cdapio/tephra",
"path": "tephra-hbase-compat-1.0-cdh/src/main/java/co/cask/tephra/hbase10cdh/coprocessor/CellSkipFilter.java",
"license": "apache-2.0",
"size": 4910
} | [
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellUtil"
] | import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,293,664 |
@Override
protected void init() {
super.init();
setPreferredSize(new Dimension(JSS_HANDLE_SIZE, JSS_HANDLE_SIZE));
// Initialize the color only once
if (JSS_OVERLAP_COLOR == null) {
float baseColor = new Float(Math.tan(Math.toRadians(120.0)));
JSS_OVERLAP_COLOR = CreateColor(baseColor);
baseColor = new Float(Math.tan(Math.toRadians(0.0)));
JSS_COVER_COLOR = CreateColor(baseColor);
baseColor = new Float(Math.tan(Math.toRadians(30.0)));
JSS_FOCUSED_COLOR = CreateColor(baseColor);
baseColor = new Float(Math.tan(Math.toRadians(0.0)));
Color[] result = { Color.getHSBColor(baseColor, 0.2f, 0.3f), Color.getHSBColor(baseColor, 0.05f, 0.3f),
Color.getHSBColor(baseColor, 0.05f, 0.6f) };
JSS_NOT_FOCUSED_COLOR = result;
}
} | void function() { super.init(); setPreferredSize(new Dimension(JSS_HANDLE_SIZE, JSS_HANDLE_SIZE)); if (JSS_OVERLAP_COLOR == null) { float baseColor = new Float(Math.tan(Math.toRadians(120.0))); JSS_OVERLAP_COLOR = CreateColor(baseColor); baseColor = new Float(Math.tan(Math.toRadians(0.0))); JSS_COVER_COLOR = CreateColor(baseColor); baseColor = new Float(Math.tan(Math.toRadians(30.0))); JSS_FOCUSED_COLOR = CreateColor(baseColor); baseColor = new Float(Math.tan(Math.toRadians(0.0))); Color[] result = { Color.getHSBColor(baseColor, 0.2f, 0.3f), Color.getHSBColor(baseColor, 0.05f, 0.3f), Color.getHSBColor(baseColor, 0.05f, 0.6f) }; JSS_NOT_FOCUSED_COLOR = result; } } | /**
* Initializes the handle.
*/ | Initializes the handle | init | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio/src/com/jaspersoft/studio/editor/gef/selection/ColoredSquareHandles.java",
"license": "lgpl-3.0",
"size": 7433
} | [
"java.awt.Color",
"org.eclipse.draw2d.geometry.Dimension"
] | import java.awt.Color; import org.eclipse.draw2d.geometry.Dimension; | import java.awt.*; import org.eclipse.draw2d.geometry.*; | [
"java.awt",
"org.eclipse.draw2d"
] | java.awt; org.eclipse.draw2d; | 1,520,802 |
public void collect(Collection<T> collection) {
Collector visitor = new Collector(collection);
visitFwd(visitor);
}
| void function(Collection<T> collection) { Collector visitor = new Collector(collection); visitFwd(visitor); } | /**
* Add all elements to collection.
* @param collection target
*/ | Add all elements to collection | collect | {
"repo_name": "bobfoster/keyedset",
"path": "src/main/java/org/genantics/set/KeyedSet.java",
"license": "mit",
"size": 30729
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,167,101 |
public Point getAnalogDisplacement( int xLocation, int yLocation )
{
if( analogBackImage == null )
return new Point( 0, 0 );
// Distance from center along x-axis
int dX = xLocation - ( analogBackImage.x + (int) ( analogBackImage.hWidth * scale ) );
// Distance from center along y-axis
int dY = yLocation - ( analogBackImage.y + (int) ( analogBackImage.hHeight * scale ) );
return new Point( dX, dY );
} | Point function( int xLocation, int yLocation ) { if( analogBackImage == null ) return new Point( 0, 0 ); int dX = xLocation - ( analogBackImage.x + (int) ( analogBackImage.hWidth * scale ) ); int dY = yLocation - ( analogBackImage.y + (int) ( analogBackImage.hHeight * scale ) ); return new Point( dX, dY ); } | /**
* Gets the N64 analog stick displacement.
*
* @param xLocation The x-coordinate of the touch, in pixels.
* @param yLocation The y-coordinate of the touch, in pixels.
*
* @return The analog displacement, in pixels.
*/ | Gets the N64 analog stick displacement | getAnalogDisplacement | {
"repo_name": "paulscode/mupen64plus-ae",
"path": "src/paulscode/android/mupen64plusae/input/map/TouchMap.java",
"license": "gpl-3.0",
"size": 18631
} | [
"android.graphics.Point"
] | import android.graphics.Point; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 847,444 |
public void updateClusterGroupsFromGossiper() {
long highestVersionSeen = this.clusterService.state().metaData().version();
for (Entry<InetAddress, EndpointState> entry : Gossiper.instance.getEndpointStates()) {
EndpointState state = entry.getValue();
InetAddress endpoint = entry.getKey();
if (!state.getStatus().equals(VersionedValue.STATUS_NORMAL) && !state.getStatus().equals(VersionedValue.SHUTDOWN)) {
logger.info("Ignoring node state={}", state);
continue;
}
DiscoveryNodeStatus status = (isNormal(state)) ? DiscoveryNode.DiscoveryNodeStatus.ALIVE : DiscoveryNode.DiscoveryNodeStatus.DEAD;
if (isLocal(endpoint)) {
VersionedValue vv = state.getApplicationState(ApplicationState.HOST_ID);
if (vv != null) {
String hostId = vv.value;
if (!this.localNode().getId().equals(hostId)) {
clusterGroup.update(hostId,
endpoint,
InetAddresses.forString(state.getApplicationState(ApplicationState.INTERNAL_IP).value),
InetAddresses.forString(state.getApplicationState(ApplicationState.RPC_ADDRESS).value),
status);
}
if (ElassandraDaemon.hasWorkloadColumn && (state.getApplicationState(ApplicationState.X1) != null || state.getApplicationState(ApplicationState.X2) !=null)) {
SystemKeyspace.updatePeerInfo(endpoint, "workload", "elasticsearch", StageManager.getStage(Stage.MUTATION));
}
// initialize the remoteShardRoutingStateMap from gossip states
if (state.getApplicationState(ApplicationState.X1) != null) {
VersionedValue x1 = state.getApplicationState(ApplicationState.X1);
if (!this.localNode().getId().equals(hostId)) {
Map<String, ShardRoutingState> shardsStateMap;
try {
shardsStateMap = jsonMapper.readValue(x1.value, indexShardStateTypeReference);
this.remoteShardRoutingStateMap.put(Gossiper.instance.getHostId(endpoint), shardsStateMap);
} catch (IOException e) {
logger.error("Failed to parse X1 for node [{}]", hostId);
}
}
}
}
}
if (isMember(endpoint)) {
if (state.getApplicationState(ApplicationState.X2) != null) {
highestVersionSeen = Long.max(highestVersionSeen, getMetadataVersion(state.getApplicationState(ApplicationState.X2)));
}
}
}
updateMetadata("discovery-refresh", highestVersionSeen);
} | void function() { long highestVersionSeen = this.clusterService.state().metaData().version(); for (Entry<InetAddress, EndpointState> entry : Gossiper.instance.getEndpointStates()) { EndpointState state = entry.getValue(); InetAddress endpoint = entry.getKey(); if (!state.getStatus().equals(VersionedValue.STATUS_NORMAL) && !state.getStatus().equals(VersionedValue.SHUTDOWN)) { logger.info(STR, state); continue; } DiscoveryNodeStatus status = (isNormal(state)) ? DiscoveryNode.DiscoveryNodeStatus.ALIVE : DiscoveryNode.DiscoveryNodeStatus.DEAD; if (isLocal(endpoint)) { VersionedValue vv = state.getApplicationState(ApplicationState.HOST_ID); if (vv != null) { String hostId = vv.value; if (!this.localNode().getId().equals(hostId)) { clusterGroup.update(hostId, endpoint, InetAddresses.forString(state.getApplicationState(ApplicationState.INTERNAL_IP).value), InetAddresses.forString(state.getApplicationState(ApplicationState.RPC_ADDRESS).value), status); } if (ElassandraDaemon.hasWorkloadColumn && (state.getApplicationState(ApplicationState.X1) != null state.getApplicationState(ApplicationState.X2) !=null)) { SystemKeyspace.updatePeerInfo(endpoint, STR, STR, StageManager.getStage(Stage.MUTATION)); } if (state.getApplicationState(ApplicationState.X1) != null) { VersionedValue x1 = state.getApplicationState(ApplicationState.X1); if (!this.localNode().getId().equals(hostId)) { Map<String, ShardRoutingState> shardsStateMap; try { shardsStateMap = jsonMapper.readValue(x1.value, indexShardStateTypeReference); this.remoteShardRoutingStateMap.put(Gossiper.instance.getHostId(endpoint), shardsStateMap); } catch (IOException e) { logger.error(STR, hostId); } } } } } if (isMember(endpoint)) { if (state.getApplicationState(ApplicationState.X2) != null) { highestVersionSeen = Long.max(highestVersionSeen, getMetadataVersion(state.getApplicationState(ApplicationState.X2))); } } } updateMetadata(STR, highestVersionSeen); } | /**
* Update cluster group members from cassandra topology (should only be triggered by IEndpointStateChangeSubscriber events).
* This should trigger re-sharding of index for new nodes (when token distribution change).
*/ | Update cluster group members from cassandra topology (should only be triggered by IEndpointStateChangeSubscriber events). This should trigger re-sharding of index for new nodes (when token distribution change) | updateClusterGroupsFromGossiper | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elassandra/discovery/CassandraDiscovery.java",
"license": "apache-2.0",
"size": 44177
} | [
"java.io.IOException",
"java.net.InetAddress",
"java.util.Map",
"org.apache.cassandra.concurrent.Stage",
"org.apache.cassandra.concurrent.StageManager",
"org.apache.cassandra.db.SystemKeyspace",
"org.apache.cassandra.gms.ApplicationState",
"org.apache.cassandra.gms.EndpointState",
"org.apache.cassandra.gms.Gossiper",
"org.apache.cassandra.gms.VersionedValue",
"org.apache.cassandra.service.ElassandraDaemon",
"org.elasticsearch.cluster.node.DiscoveryNode",
"org.elasticsearch.cluster.routing.ShardRoutingState",
"org.elasticsearch.common.network.InetAddresses"
] | import java.io.IOException; import java.net.InetAddress; import java.util.Map; import org.apache.cassandra.concurrent.Stage; import org.apache.cassandra.concurrent.StageManager; import org.apache.cassandra.db.SystemKeyspace; import org.apache.cassandra.gms.ApplicationState; import org.apache.cassandra.gms.EndpointState; import org.apache.cassandra.gms.Gossiper; import org.apache.cassandra.gms.VersionedValue; import org.apache.cassandra.service.ElassandraDaemon; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.common.network.InetAddresses; | import java.io.*; import java.net.*; import java.util.*; import org.apache.cassandra.concurrent.*; import org.apache.cassandra.db.*; import org.apache.cassandra.gms.*; import org.apache.cassandra.service.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.network.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.cassandra",
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | java.io; java.net; java.util; org.apache.cassandra; org.elasticsearch.cluster; org.elasticsearch.common; | 552,389 |
public static void enable() {
manager = new PermissionsDependency();
final PluginManager pluginManager = Mythr.plugin().getServer().getPluginManager();
Plugin plugin = null;
// Commands map:
manager.commandMap = new CommandsManager<Player>() { | static void function() { manager = new PermissionsDependency(); final PluginManager pluginManager = Mythr.plugin().getServer().getPluginManager(); Plugin plugin = null; manager.commandMap = new CommandsManager<Player>() { | /**
* Enables the manager.
*
*/ | Enables the manager | enable | {
"repo_name": "andfRa/Mythr",
"path": "src/org/andfRa/mythr/dependencies/PermissionsDependency.java",
"license": "gpl-3.0",
"size": 4034
} | [
"org.bukkit.entity.Player",
"org.bukkit.plugin.Plugin",
"org.bukkit.plugin.PluginManager",
"org.sk89q.CommandsManager"
] | import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; import org.sk89q.CommandsManager; | import org.bukkit.entity.*; import org.bukkit.plugin.*; import org.sk89q.*; | [
"org.bukkit.entity",
"org.bukkit.plugin",
"org.sk89q"
] | org.bukkit.entity; org.bukkit.plugin; org.sk89q; | 967,120 |
EReference getODExposedEntityType_EntityType();
| EReference getODExposedEntityType_EntityType(); | /**
* Returns the meta object for the reference '{@link edm.ODExposedEntityType#getEntityType <em>Entity Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Entity Type</em>'.
* @see edm.ODExposedEntityType#getEntityType()
* @see #getODExposedEntityType()
* @generated
*/ | Returns the meta object for the reference '<code>edm.ODExposedEntityType#getEntityType Entity Type</code>'. | getODExposedEntityType_EntityType | {
"repo_name": "SOM-Research/odata-generator",
"path": "metamodel/som.odata.metamodel/src/edm/EdmPackage.java",
"license": "epl-1.0",
"size": 93631
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,599,372 |
@Override
protected void onPostExecute(BitmapDrawable value) {
//BEGIN_INCLUDE(complete_background_work)
// if cancel was called on this task or the "exit early" flag is set then we're done
if (isCancelled() || mExitTasksEarly) {
value = null;
}
final ImageView imageView = getAttachedImageView();
if (value != null && imageView != null) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "onPostExecute - setting bitmap");
}
setImageDrawable(imageView, value);
}
//END_INCLUDE(complete_background_work)
}
| void function(BitmapDrawable value) { if (isCancelled() mExitTasksEarly) { value = null; } final ImageView imageView = getAttachedImageView(); if (value != null && imageView != null) { if (BuildConfig.DEBUG) { Log.d(TAG, STR); } setImageDrawable(imageView, value); } } | /**
* Once the image is processed, associates it to the imageView
*/ | Once the image is processed, associates it to the imageView | onPostExecute | {
"repo_name": "cf0566/CarMarket",
"path": "src/com/easemob/chatuidemo/video/util/ImageWorker.java",
"license": "apache-2.0",
"size": 16946
} | [
"android.graphics.drawable.BitmapDrawable",
"android.util.Log",
"android.widget.ImageView",
"com.cpic.carmarket.BuildConfig"
] | import android.graphics.drawable.BitmapDrawable; import android.util.Log; import android.widget.ImageView; import com.cpic.carmarket.BuildConfig; | import android.graphics.drawable.*; import android.util.*; import android.widget.*; import com.cpic.carmarket.*; | [
"android.graphics",
"android.util",
"android.widget",
"com.cpic.carmarket"
] | android.graphics; android.util; android.widget; com.cpic.carmarket; | 583,630 |
public void init(Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5,
Object arg6,
Object arg7,
Object arg8,
Object arg9,
Object arg10,
Object arg11,
Object arg12) throws StandardException
{
if (SanityManager.DEBUG)
{
SanityManager.THROWASSERT("Twelve-argument init() not implemented for " + getClass().getName());
}
} | void function(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException { if (SanityManager.DEBUG) { SanityManager.THROWASSERT(STR + getClass().getName()); } } | /**
* Initialize a query tree node.
*
* @exception StandardException Thrown on error
*/ | Initialize a query tree node | init | {
"repo_name": "kavin256/Derby",
"path": "java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java",
"license": "apache-2.0",
"size": 52644
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.services.sanity.SanityManager"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.sanity.SanityManager; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 984,123 |
void setPersistenceSnapshotWeight(float weight) throws RemoteException;
| void setPersistenceSnapshotWeight(float weight) throws RemoteException; | /**
* Change the weight factor applied by the lookup discovery service
* to the snapshot size during the test to determine whether or not
* to take a "snapshot" of the system state.
*
* @param weight weight factor for snapshot size
*
* @throws java.rmi.RemoteException typically, this exception occurs when
* there is a communication failure between the client and the
* lookup discovery service. When this exception does occur, the
* weight factor may or may not have been changed successfully.
*/ | Change the weight factor applied by the lookup discovery service to the snapshot size during the test to determine whether or not to take a "snapshot" of the system state | setPersistenceSnapshotWeight | {
"repo_name": "pfirmstone/river-internet",
"path": "JGDMS/jgdms-lib-dl/src/main/java/org/apache/river/admin/FiddlerAdmin.java",
"license": "apache-2.0",
"size": 11654
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 698,484 |
static public String getDateToString(Date date) {
if (date == null)
return "";
else {
SimpleDateFormat f = new SimpleDateFormat();
f.setLenient(false);
return f.format(date);
}
}
| static String function(Date date) { if (date == null) return ""; else { SimpleDateFormat f = new SimpleDateFormat(); f.setLenient(false); return f.format(date); } } | /**
* Devuelve la fecha en formato dd/MM/yyyy.
* @return String
*/ | Devuelve la fecha en formato dd/MM/yyyy | getDateToString | {
"repo_name": "rranz/meccano4j_vaadin",
"path": "javalego/javalego_util/src/main/java/com/javalego/util/DateUtils.java",
"license": "gpl-3.0",
"size": 47778
} | [
"java.text.SimpleDateFormat",
"java.util.Date"
] | import java.text.SimpleDateFormat; import java.util.Date; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 2,546,803 |
public Set<Group> memberships(String memberId) {
ImmutableSet.Builder<Group> set = ImmutableSet.<Group>builder();
try {
Authorizable a = session.getUserManager().getAuthorizable(memberId);
Iterator<Group> iter = a.declaredMemberOf();
while (iter.hasNext()) {
set.add(iter.next());
}
} catch (RepositoryException e) {
throw new RuntimeException(e);
}
return set.build();
} | Set<Group> function(String memberId) { ImmutableSet.Builder<Group> set = ImmutableSet.<Group>builder(); try { Authorizable a = session.getUserManager().getAuthorizable(memberId); Iterator<Group> iter = a.declaredMemberOf(); while (iter.hasNext()) { set.add(iter.next()); } } catch (RepositoryException e) { throw new RuntimeException(e); } return set.build(); } | /**
* Get groups to which this authorizable ID belongs. Most often used to find
* groups for a particular user.
*
* @param memberId
* @return Set of Groups
*/ | Get groups to which this authorizable ID belongs. Most often used to find groups for a particular user | memberships | {
"repo_name": "uq-eresearch/aorra",
"path": "app/models/GroupManager.java",
"license": "mit",
"size": 4452
} | [
"com.google.common.collect.ImmutableSet",
"java.util.Iterator",
"java.util.Set",
"javax.jcr.RepositoryException",
"org.apache.jackrabbit.api.security.user.Authorizable",
"org.apache.jackrabbit.api.security.user.Group"
] | import com.google.common.collect.ImmutableSet; import java.util.Iterator; import java.util.Set; import javax.jcr.RepositoryException; import org.apache.jackrabbit.api.security.user.Authorizable; import org.apache.jackrabbit.api.security.user.Group; | import com.google.common.collect.*; import java.util.*; import javax.jcr.*; import org.apache.jackrabbit.api.security.user.*; | [
"com.google.common",
"java.util",
"javax.jcr",
"org.apache.jackrabbit"
] | com.google.common; java.util; javax.jcr; org.apache.jackrabbit; | 2,593,413 |
public void setIdentityEventService(IdentityEventService identityEventService) {
this.identityEventService = identityEventService;
} | void function(IdentityEventService identityEventService) { this.identityEventService = identityEventService; } | /**
* Set instance of IdentityEventService.
*
* @param identityEventService Instance of IdentityEventService.
*/ | Set instance of IdentityEventService | setIdentityEventService | {
"repo_name": "wso2/carbon-identity-framework",
"path": "components/role-mgt/org.wso2.carbon.identity.role.mgt.core/src/main/java/org/wso2/carbon/identity/role/mgt/core/internal/RoleManagementServiceComponentHolder.java",
"license": "apache-2.0",
"size": 2108
} | [
"org.wso2.carbon.identity.event.services.IdentityEventService"
] | import org.wso2.carbon.identity.event.services.IdentityEventService; | import org.wso2.carbon.identity.event.services.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 786,902 |
public static IntValuedEnum<LiblasLibrary.LASError > LASVLR_SetRecordLength(LiblasLibrary.LASVLRH hVLR, short value) {
return FlagSet.fromValue(LASVLR_SetRecordLength(Pointer.getPeer(hVLR), value), LiblasLibrary.LASError.class);
} | static IntValuedEnum<LiblasLibrary.LASError > function(LiblasLibrary.LASVLRH hVLR, short value) { return FlagSet.fromValue(LASVLR_SetRecordLength(Pointer.getPeer(hVLR), value), LiblasLibrary.LASError.class); } | /**
* Sets the record length of the data stored in the VLR<br>
* @param hVLR the LASVLRH instance<br>
* @param value the length to set for the VLR data length<br>
* @return LASErrorEnum<br>
* Original signature : <code>LASError LASVLR_SetRecordLength(LASVLRH, unsigned short)</code><br>
* <i>native declaration : liblas.h:1085</i>
*/ | Sets the record length of the data stored in the VLR | LASVLR_SetRecordLength | {
"repo_name": "petvana/las-bridj",
"path": "src/main/java/com/github/petvana/liblas/jna/LiblasLibrary.java",
"license": "bsd-3-clause",
"size": 116212
} | [
"org.bridj.FlagSet",
"org.bridj.IntValuedEnum",
"org.bridj.Pointer"
] | import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer; | import org.bridj.*; | [
"org.bridj"
] | org.bridj; | 1,558,149 |
public Replicant createReplicant(DSBitSet prefix,
DSBitSet owner)
throws AuraException, RemoteException; | Replicant function(DSBitSet prefix, DSBitSet owner) throws AuraException, RemoteException; | /**
* Creates a fully functional new replicant. The replicant will be
* returned once the process has started and is ready. It will be for
* use within a cluster with the given prefix.
*
* @param prefix the prefix of the cluster this replicant will be used with
* @param owner prefix of the partition managing the partition of this replicant
* @return the fully created replicant.
* @throws com.sun.labs.aura.util.AuraException
* @throws java.rmi.RemoteException
*/ | Creates a fully functional new replicant. The replicant will be returned once the process has started and is ready. It will be for use within a cluster with the given prefix | createReplicant | {
"repo_name": "SunLabsAST/AURA",
"path": "aura/src/com/sun/labs/aura/datastore/impl/ProcessManager.java",
"license": "gpl-2.0",
"size": 3815
} | [
"com.sun.labs.aura.util.AuraException",
"java.rmi.RemoteException"
] | import com.sun.labs.aura.util.AuraException; import java.rmi.RemoteException; | import com.sun.labs.aura.util.*; import java.rmi.*; | [
"com.sun.labs",
"java.rmi"
] | com.sun.labs; java.rmi; | 1,100,548 |
InputStream inputStream;
Path pathUserProperties;
Path pathToolProperties;
Path pathModel;
try {
IntegrationTestSuite.printTestCategoryHeader("ExecContextManagerTool");
IntegrationTestSuite.resetTestWorkspace();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool");
try {
ExecContextManagerTool.main(new String[] {});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --help");
try {
ExecContextManagerTool.main(new String[] {"--help"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool release (with URL_MODEL not set)");
try {
ExecContextManagerTool.main(new String[] {"release"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --user-properties=dummy-user.properties release (with dummy URL_MODEL)");
try {
inputStream = IntegrationTestSuite.class.getResourceAsStream("/dummy-user.properties");
pathUserProperties = IntegrationTestSuite.pathTestWorkspace.resolve("dummy-user.properties");
Files.copy(inputStream, pathUserProperties, StandardCopyOption.REPLACE_EXISTING);
inputStream.close();
ExecContextManagerTool.main(new String[] {"--user-properties=" + pathUserProperties, "release"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
try {
inputStream = IntegrationTestSuite.class.getResourceAsStream("/simple-user.properties");
pathUserProperties = IntegrationTestSuite.pathTestWorkspace.resolve("simple-user.properties");
Files.copy(inputStream, pathUserProperties, StandardCopyOption.REPLACE_EXISTING);
inputStream.close();
inputStream = IntegrationTestSuite.class.getResourceAsStream("/simple-tool.properties");
pathToolProperties = IntegrationTestSuite.pathTestWorkspace.resolve("simple-tool.properties");
Files.copy(inputStream, pathToolProperties, StandardCopyOption.REPLACE_EXISTING);
inputStream.close();
pathModel = IntegrationTestSuite.pathTestWorkspace.resolve("simple-model.xml");
inputStream = IntegrationTestSuite.class.getResourceAsStream("/simple-model.xml");
Files.copy(inputStream, pathModel, StandardCopyOption.REPLACE_EXISTING);
inputStream.close();
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
System.setProperty("org.azyva.dragom.init-property.URL_MODEL" , pathModel.toUri().toString());
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace force-unlock");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "force-unlock"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace set-property NAME");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "set-property", "NAME"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace set-property NAME VALUE extra");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "set-property", "NAME", "VALUE", "extra"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace set-property NAME VALUE");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "set-property", "NAME", "VALUE"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-properties (with IND_IGNORE_CACHED_EXEC_CONTEXT and IND_IGNORE_CACHED_MODEL)");
try {
System.setProperty("org.azyva.dragom.init-property.IND_IGNORE_CACHED_EXEC_CONTEXT" , "true");
System.setProperty("org.azyva.dragom.init-property.IND_IGNORE_CACHED_MODEL" , "true");
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-properties"});
System.getProperties().remove("org.azyva.dragom.init-property.IND_IGNORE_CACHED_EXEC_CONTEXT");
System.getProperties().remove("org.azyva.dragom.init-property.IND_IGNORE_CACHED_MODEL");
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-properties NA extra");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-properties", "NA", "extra"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-properties NA");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-properties", "NA"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-properties NB");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-properties", "NB"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-property");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-property"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-property NAME extra");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-property", "NAME", "extra"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-property NB");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-property", "NB"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace get-property NAME");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-property", "NAME"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace remove-property");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "remove-property"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace remove-property NAME extra");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "remove-property", "NAME", "extra"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace remove-property NA");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "remove-property", "NA"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace remove-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "remove-properties"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace remove-properties NA extra");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "remove-properties", "NA", "extra"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace remove-properties NB");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "remove-properties", "NB"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace remove-properties NA");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "remove-properties", "NA"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace set-properties-from-tool-properties extra");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "set-properties-from-tool-properties", "extra"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace set-properties-from-tool-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "set-properties-from-tool-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace -DNAME=VALUE set-properties-from-tool-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "-DNAME=VALUE", "set-properties-from-tool-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace -DNAME=VALUE -DNAME2=VALUE2 set-properties-from-tool-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "-DNAME=VALUE", "-DNAME2=VALUE2", "set-properties-from-tool-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace -DNAME=VALUE --tool-properties=simple-tool.properties set-properties-from-tool-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "-DNAME=VALUE", "--tool-properties=" + pathToolProperties, "set-properties-from-tool-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --user-properties=simple-user.properties --workspace=workspace get-init-property");
try {
ExecContextManagerTool.main(new String[] {"--user-properties=" + pathUserProperties, "--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-init-property"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --user-properties=simple-user.properties --workspace=workspace get-init-property NAME extra");
try {
ExecContextManagerTool.main(new String[] {"--user-properties=" + pathUserProperties, "--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-init-property", "NAME", "extra"});
} catch (Exception e) {
IntegrationTestSuite.exception = e;
}
IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1);
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --user-properties=simple-user.properties --workspace=workspace get-init-property NB");
try {
ExecContextManagerTool.main(new String[] {"--user-properties=" + pathUserProperties, "--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-init-property", "NB"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --user-properties=simple-user.properties --workspace=workspace get-init-property NAME4");
try {
ExecContextManagerTool.main(new String[] {"--user-properties=" + pathUserProperties, "--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "get-init-property", "NAME4"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace --no-confirm get-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "--no-confirm", "get-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
// ###############################################################################
IntegrationTestSuite.printTestHeader("ExecContextManagerTool --workspace=workspace --no-confirm-context=A --no-confirm-context=B get-properties");
try {
ExecContextManagerTool.main(new String[] {"--workspace=" + IntegrationTestSuite.pathTestWorkspace.resolve("workspace"), "--no-confirm-context=A", "--no-confirm-context=B", "get-properties"});
} catch (Exception e) {
IntegrationTestSuite.validateExitException(e, 0);
}
IntegrationTestSuite.printTestFooter();
System.getProperties().remove("org.azyva.dragom.init-property.URL_MODEL");
} catch (Exception e) {
e.printStackTrace();
}
} | InputStream inputStream; Path pathUserProperties; Path pathToolProperties; Path pathModel; try { IntegrationTestSuite.printTestCategoryHeader(STR); IntegrationTestSuite.resetTestWorkspace(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { inputStream = IntegrationTestSuite.class.getResourceAsStream(STR); pathUserProperties = IntegrationTestSuite.pathTestWorkspace.resolve(STR); Files.copy(inputStream, pathUserProperties, StandardCopyOption.REPLACE_EXISTING); inputStream.close(); ExecContextManagerTool.main(new String[] {STR + pathUserProperties, STR}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); try { inputStream = IntegrationTestSuite.class.getResourceAsStream(STR); pathUserProperties = IntegrationTestSuite.pathTestWorkspace.resolve(STR); Files.copy(inputStream, pathUserProperties, StandardCopyOption.REPLACE_EXISTING); inputStream.close(); inputStream = IntegrationTestSuite.class.getResourceAsStream(STR); pathToolProperties = IntegrationTestSuite.pathTestWorkspace.resolve(STR); Files.copy(inputStream, pathToolProperties, StandardCopyOption.REPLACE_EXISTING); inputStream.close(); pathModel = IntegrationTestSuite.pathTestWorkspace.resolve(STR); inputStream = IntegrationTestSuite.class.getResourceAsStream(STR); Files.copy(inputStream, pathModel, StandardCopyOption.REPLACE_EXISTING); inputStream.close(); } catch (IOException ioe) { throw new RuntimeException(ioe); } System.setProperty(STR , pathModel.toUri().toString()); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME", "VALUE", "extra"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME", "VALUE"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { System.setProperty(STR , "true"); System.setProperty(STR , "true"); ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); System.getProperties().remove(STR); System.getProperties().remove(STR); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NA", "extra"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NA"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NB"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME", "extra"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NB"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME", "extra"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NA"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NA", "extra"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NB"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NA"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "extra"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, STR, STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, STR + pathToolProperties, STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + pathUserProperties, STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + pathUserProperties, STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME", "extra"}); } catch (Exception e) { IntegrationTestSuite.exception = e; } IntegrationTestSuite.validateExitException(IntegrationTestSuite.exception, 1); IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + pathUserProperties, STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NB"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + pathUserProperties, STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, "NAME4"}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); IntegrationTestSuite.printTestHeader(STR); try { ExecContextManagerTool.main(new String[] {STR + IntegrationTestSuite.pathTestWorkspace.resolve(STR), STR, STR, STR}); } catch (Exception e) { IntegrationTestSuite.validateExitException(e, 0); } IntegrationTestSuite.printTestFooter(); System.getProperties().remove(STR); } catch (Exception e) { e.printStackTrace(); } } | /*********************************************************************************
* Tests ExecContextManagerTool.
*********************************************************************************/ | Tests ExecContextManagerTool | testExecContextManagerTool | {
"repo_name": "azyva/dragom-cli-tools",
"path": "dragom-cli-tools/src/test/java/org/azyva/dragom/test/integration/IntegrationTestSuiteExecContextManagerTool.java",
"license": "agpl-3.0",
"size": 23711
} | [
"java.io.IOException",
"java.io.InputStream",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.StandardCopyOption",
"org.azyva.dragom.tool.ExecContextManagerTool"
] | import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; import org.azyva.dragom.tool.ExecContextManagerTool; | import java.io.*; import java.nio.file.*; import org.azyva.dragom.tool.*; | [
"java.io",
"java.nio",
"org.azyva.dragom"
] | java.io; java.nio; org.azyva.dragom; | 1,311,216 |
public KpiResourceFormatInner withEntityType(EntityTypes entityType) {
this.entityType = entityType;
return this;
} | KpiResourceFormatInner function(EntityTypes entityType) { this.entityType = entityType; return this; } | /**
* Set the entityType value.
*
* @param entityType the entityType value to set
* @return the KpiResourceFormatInner object itself.
*/ | Set the entityType value | withEntityType | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/KpiResourceFormatInner.java",
"license": "mit",
"size": 12464
} | [
"com.microsoft.azure.management.customerinsights.EntityTypes"
] | import com.microsoft.azure.management.customerinsights.EntityTypes; | import com.microsoft.azure.management.customerinsights.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,028,377 |
public char[] getCharValues() throws TypeMismatchException; | char[] function() throws TypeMismatchException; | /**
* Gets the values of this object as a {@code char} value.
*
* @return the values of this object as a {@code char} array; or an empty
* array if this object has no value.
* @throws TypeMismatchException
* if the type of this object is not {@link Type#CHAR}.
*/ | Gets the values of this object as a char value | getCharValues | {
"repo_name": "Haixing-Hu/commons",
"path": "src/main/java/com/github/haixing_hu/util/value/MultiValues.java",
"license": "apache-2.0",
"size": 81305
} | [
"com.github.haixing_hu.lang.TypeMismatchException"
] | import com.github.haixing_hu.lang.TypeMismatchException; | import com.github.haixing_hu.lang.*; | [
"com.github.haixing_hu"
] | com.github.haixing_hu; | 2,409,755 |
public synchronized Instant getSynchronizedProcessingOutputTime() {
latestSynchronizedOutputWm = INSTANT_ORDERING.max(
latestSynchronizedOutputWm,
INSTANT_ORDERING.min(clock.now(), synchronizedProcessingOutputWatermark.get()));
return latestSynchronizedOutputWm;
} | synchronized Instant function() { latestSynchronizedOutputWm = INSTANT_ORDERING.max( latestSynchronizedOutputWm, INSTANT_ORDERING.min(clock.now(), synchronizedProcessingOutputWatermark.get())); return latestSynchronizedOutputWm; } | /**
* Returns the synchronized processing output time of the {@link AppliedPTransform}.
*
* <p>The returned value is guaranteed to be monotonically increasing, and outside of the
* presence of holds, will increase as the system time progresses.
*/ | Returns the synchronized processing output time of the <code>AppliedPTransform</code>. The returned value is guaranteed to be monotonically increasing, and outside of the presence of holds, will increase as the system time progresses | getSynchronizedProcessingOutputTime | {
"repo_name": "shakamunyi/beam",
"path": "runners/direct-java/src/main/java/org/apache/beam/runners/direct/InMemoryWatermarkManager.java",
"license": "apache-2.0",
"size": 55449
} | [
"org.joda.time.Instant"
] | import org.joda.time.Instant; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,605,321 |
public static double calcAccurateMonthAge(Date birthDate) {
Calendar cur = GregorianCalendar.getInstance();
double curTime = (double) cur.get(Calendar.YEAR) * 12d + (double) cur.get(Calendar.MONTH) + (double) (cur.get(Calendar.DAY_OF_MONTH) - 1) / (double) cur.getActualMaximum(Calendar.DAY_OF_MONTH);
Calendar birth = GregorianCalendar.getInstance();
birth.setTime(birthDate);
double birthTime = (double) birth.get(Calendar.YEAR) * 12d + (double) birth.get(Calendar.MONTH) + (double) (birth.get(Calendar.DAY_OF_MONTH) - 1) / (double) birth.getActualMaximum(Calendar.DAY_OF_MONTH);
return curTime - birthTime;
} | static double function(Date birthDate) { Calendar cur = GregorianCalendar.getInstance(); double curTime = (double) cur.get(Calendar.YEAR) * 12d + (double) cur.get(Calendar.MONTH) + (double) (cur.get(Calendar.DAY_OF_MONTH) - 1) / (double) cur.getActualMaximum(Calendar.DAY_OF_MONTH); Calendar birth = GregorianCalendar.getInstance(); birth.setTime(birthDate); double birthTime = (double) birth.get(Calendar.YEAR) * 12d + (double) birth.get(Calendar.MONTH) + (double) (birth.get(Calendar.DAY_OF_MONTH) - 1) / (double) birth.getActualMaximum(Calendar.DAY_OF_MONTH); return curTime - birthTime; } | /**
* Wylicza dokladny wiek w miesiacach, od urodzenia do teraz
*
* @param birthDate data narodzin
* @return wiek podany w double
*/ | Wylicza dokladny wiek w miesiacach, od urodzenia do teraz | calcAccurateMonthAge | {
"repo_name": "Semantive/hiqual",
"path": "src/main/java/com/semantive/commons/SemantiveDateTimeUtils.java",
"license": "apache-2.0",
"size": 3710
} | [
"java.util.Calendar",
"java.util.Date",
"java.util.GregorianCalendar"
] | import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 99,986 |
private static void handleEvent(Object listener, Object event) {
RxAnnotatedHandlerFinder.handleEvent(listener, event);
}
/**
* It will retrieve an {@link ObserverWrapper} of the object passed by parameter
* This method store the wrapper inside an internal cache.
* It should be used in pair with {@code RxEventProcessor.removeWrapper(...)} | static void function(Object listener, Object event) { RxAnnotatedHandlerFinder.handleEvent(listener, event); } /** * It will retrieve an {@link ObserverWrapper} of the object passed by parameter * This method store the wrapper inside an internal cache. * It should be used in pair with {@code RxEventProcessor.removeWrapper(...)} | /**
* This method is used to call the event on listener, it use reflection to know what method call on listener object.
*
* @param listener
* @param event
*/ | This method is used to call the event on listener, it use reflection to know what method call on listener object | handleEvent | {
"repo_name": "SysdataItaliaSpA/EventDispatcher",
"path": "baseandroid-rxeventdispatcher/src/main/java/com/baseandroid/events/rx/RxEventProcessor.java",
"license": "apache-2.0",
"size": 11155
} | [
"com.baseandroid.events.rx.annotations.RxAnnotatedHandlerFinder"
] | import com.baseandroid.events.rx.annotations.RxAnnotatedHandlerFinder; | import com.baseandroid.events.rx.annotations.*; | [
"com.baseandroid.events"
] | com.baseandroid.events; | 1,323,465 |
@Column(name = "description", length = 1024)
public String getDescription(); | @Column(name = STR, length = 1024) String function(); | /**
* Getter for <code>cattle.user_preference.description</code>.
*/ | Getter for <code>cattle.user_preference.description</code> | getDescription | {
"repo_name": "vincent99/cattle",
"path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/UserPreference.java",
"license": "apache-2.0",
"size": 4782
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 814,948 |
public void setTransactionTimeout(Period timeout)
{
_transactionTimeout = timeout.getPeriod();
} | void function(Period timeout) { _transactionTimeout = timeout.getPeriod(); } | /**
* Sets the transaction timeout.
*/ | Sets the transaction timeout | setTransactionTimeout | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/ejb/cfg/EjbBean.java",
"license": "gpl-2.0",
"size": 47328
} | [
"com.caucho.config.types.Period"
] | import com.caucho.config.types.Period; | import com.caucho.config.types.*; | [
"com.caucho.config"
] | com.caucho.config; | 1,407,716 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> reapplyAsync(String resourceGroupName, String vmName, Context context) {
return beginReapplyAsync(resourceGroupName, vmName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String vmName, Context context) { return beginReapplyAsync(resourceGroupName, vmName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* The operation to reapply a virtual machine's state.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ApiErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
*/ | The operation to reapply a virtual machine's state | reapplyAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java",
"license": "mit",
"size": 333925
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 902,675 |
@EventHandler(priority = EventPriority.LOW, ignoreCancelled=true)
public void onWorldExit(final PlayerChangedWorldEvent event) {
// Exiting Beaconz world
if (event.getFrom().equals((getBeaconzWorld()))) {
// Remove player from map and remove his scoreboard
BeaconProtectionListener.getStandingOn().remove(event.getPlayer().getUniqueId());
event.getPlayer().setScoreboard(Bukkit.getServer().getScoreboardManager().getNewScoreboard());
// Remove any potion effects
//TODO: Save and restore potion effects to keep player from getting rid of them by quickly jumping off-world and back. Same with Lobby.
for (PotionEffect effect : event.getPlayer().getActivePotionEffects())
event.getPlayer().removePotionEffect(effect.getType());
}
} | @EventHandler(priority = EventPriority.LOW, ignoreCancelled=true) void function(final PlayerChangedWorldEvent event) { if (event.getFrom().equals((getBeaconzWorld()))) { BeaconProtectionListener.getStandingOn().remove(event.getPlayer().getUniqueId()); event.getPlayer().setScoreboard(Bukkit.getServer().getScoreboardManager().getNewScoreboard()); for (PotionEffect effect : event.getPlayer().getActivePotionEffects()) event.getPlayer().removePotionEffect(effect.getType()); } } | /**
* Removes the scoreboard from the player, resets other world-specific items
* @param event
*/ | Removes the scoreboard from the player, resets other world-specific items | onWorldExit | {
"repo_name": "ebaldino/beaconz",
"path": "src/main/java/com/wasteofplastic/beaconz/listeners/PlayerTeleportListener.java",
"license": "mit",
"size": 12373
} | [
"org.bukkit.Bukkit",
"org.bukkit.event.EventHandler",
"org.bukkit.event.EventPriority",
"org.bukkit.event.player.PlayerChangedWorldEvent",
"org.bukkit.potion.PotionEffect"
] | import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.potion.PotionEffect; | import org.bukkit.*; import org.bukkit.event.*; import org.bukkit.event.player.*; import org.bukkit.potion.*; | [
"org.bukkit",
"org.bukkit.event",
"org.bukkit.potion"
] | org.bukkit; org.bukkit.event; org.bukkit.potion; | 1,562,611 |
public BytecodeNode generateCall(String name, ScalarFunctionImplementation function, List<BytecodeNode> arguments)
{
Optional<BytecodeNode> instance = Optional.empty();
if (function.getInstanceFactory().isPresent()) {
FieldDefinition field = cachedInstanceBinder.getCachedInstance(function.getInstanceFactory().get());
instance = Optional.of(scope.getThis().getField(field));
}
return generateInvocation(scope, name, function, instance, arguments, callSiteBinder);
} | BytecodeNode function(String name, ScalarFunctionImplementation function, List<BytecodeNode> arguments) { Optional<BytecodeNode> instance = Optional.empty(); if (function.getInstanceFactory().isPresent()) { FieldDefinition field = cachedInstanceBinder.getCachedInstance(function.getInstanceFactory().get()); instance = Optional.of(scope.getThis().getField(field)); } return generateInvocation(scope, name, function, instance, arguments, callSiteBinder); } | /**
* Generates a function call with null handling, automatic binding of session parameter, etc.
*/ | Generates a function call with null handling, automatic binding of session parameter, etc | generateCall | {
"repo_name": "youngwookim/presto",
"path": "presto-main/src/main/java/io/prestosql/sql/gen/BytecodeGeneratorContext.java",
"license": "apache-2.0",
"size": 3544
} | [
"io.airlift.bytecode.BytecodeNode",
"io.airlift.bytecode.FieldDefinition",
"io.prestosql.operator.scalar.ScalarFunctionImplementation",
"io.prestosql.sql.gen.BytecodeUtils",
"java.util.List",
"java.util.Optional"
] | import io.airlift.bytecode.BytecodeNode; import io.airlift.bytecode.FieldDefinition; import io.prestosql.operator.scalar.ScalarFunctionImplementation; import io.prestosql.sql.gen.BytecodeUtils; import java.util.List; import java.util.Optional; | import io.airlift.bytecode.*; import io.prestosql.operator.scalar.*; import io.prestosql.sql.gen.*; import java.util.*; | [
"io.airlift.bytecode",
"io.prestosql.operator",
"io.prestosql.sql",
"java.util"
] | io.airlift.bytecode; io.prestosql.operator; io.prestosql.sql; java.util; | 2,517,830 |
public void setWith(@Nonnull List<BaseComponent> components) {
Checks.notNull(components, "components");
Checks.noNullElements(components, "components");
for(BaseComponent component : components){
component.parent = this;
}
with = components;
} | void function(@Nonnull List<BaseComponent> components) { Checks.notNull(components, STR); Checks.noNullElements(components, STR); for(BaseComponent component : components){ component.parent = this; } with = components; } | /**
* Sets the translation substitutions to be used in this component. Removes
* any previously set substitutions
*
* @param components the components to substitute
*/ | Sets the translation substitutions to be used in this component. Removes any previously set substitutions | setWith | {
"repo_name": "nailed/nailed-api",
"path": "src/main/java/jk_5/nailed/api/chat/TranslatableComponent.java",
"license": "mit",
"size": 7353
} | [
"java.util.List",
"javax.annotation.Nonnull"
] | import java.util.List; import javax.annotation.Nonnull; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,046,350 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> createOrderNoteClient(com.mozu.api.contracts.commerceruntime.orders.OrderNote orderNote, String orderId, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.orders.OrderNoteUrl.createOrderNoteUrl(orderId, responseFields);
String verb = "POST";
Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.OrderNote.class;
MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote>) MozuClientFactory.getInstance(clz);
mozuClient.setVerb(verb);
mozuClient.setResourceUrl(url);
mozuClient.setBody(orderNote);
return mozuClient;
} | static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> function(com.mozu.api.contracts.commerceruntime.orders.OrderNote orderNote, String orderId, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.orders.OrderNoteUrl.createOrderNoteUrl(orderId, responseFields); String verb = "POST"; Class<?> clz = com.mozu.api.contracts.commerceruntime.orders.OrderNote.class; MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> mozuClient = (MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote>) MozuClientFactory.getInstance(clz); mozuClient.setVerb(verb); mozuClient.setResourceUrl(url); mozuClient.setBody(orderNote); return mozuClient; } | /**
* Creates a new merchant note for the specified order.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderNote> mozuClient=CreateOrderNoteClient( orderNote, orderId, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* OrderNote orderNote = client.Result();
* </code></pre></p>
* @param orderId Unique identifier of the order.
* @param responseFields Use this field to include those fields which are not included by default.
* @param orderNote Properties of an order note for a merchant, which is internal only for administrative purposes and not available to the shopper.
* @return Mozu.Api.MozuClient <com.mozu.api.contracts.commerceruntime.orders.OrderNote>
* @see com.mozu.api.contracts.commerceruntime.orders.OrderNote
* @see com.mozu.api.contracts.commerceruntime.orders.OrderNote
*/ | Creates a new merchant note for the specified order. <code><code> MozuClient mozuClient=CreateOrderNoteClient( orderNote, orderId, responseFields); client.setBaseAddress(url); client.executeRequest(); OrderNote orderNote = client.Result(); </code></code> | createOrderNoteClient | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/orders/OrderNoteClient.java",
"license": "mit",
"size": 10313
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,112,676 |
public void ifNonNull(final Label label) {
mv.visitJumpInsn(Opcodes.IFNONNULL, label);
} | void function(final Label label) { mv.visitJumpInsn(Opcodes.IFNONNULL, label); } | /**
* Generates the instruction to jump to the given label if the top stack
* value is not null.
*
* @param label
* where to jump if the condition is <tt>true</tt>.
*/ | Generates the instruction to jump to the given label if the top stack value is not null | ifNonNull | {
"repo_name": "Omnicrola/EssenJava",
"path": "test.lib/asm-4.2/asm-4.2/src/org/objectweb/asm/commons/GeneratorAdapter.java",
"license": "apache-2.0",
"size": 50570
} | [
"org.objectweb.asm.Label",
"org.objectweb.asm.Opcodes"
] | import org.objectweb.asm.Label; import org.objectweb.asm.Opcodes; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 1,674,110 |
public static <T> void equalsVerifier(Class<T> clazz) throws Exception {
T domainObject1 = clazz.getConstructor().newInstance();
assertThat(domainObject1.toString()).isNotNull();
assertThat(domainObject1).isEqualTo(domainObject1);
assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode());
// Test with an instance of another class
Object testOtherObject = new Object();
assertThat(domainObject1).isNotEqualTo(testOtherObject);
assertThat(domainObject1).isNotEqualTo(null);
// Test with an instance of the same class
T domainObject2 = clazz.getConstructor().newInstance();
assertThat(domainObject1).isNotEqualTo(domainObject2);
// HashCodes are equals because the objects are not persisted yet
assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode());
} | static <T> void function(Class<T> clazz) throws Exception { T domainObject1 = clazz.getConstructor().newInstance(); assertThat(domainObject1.toString()).isNotNull(); assertThat(domainObject1).isEqualTo(domainObject1); assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); Object testOtherObject = new Object(); assertThat(domainObject1).isNotEqualTo(testOtherObject); assertThat(domainObject1).isNotEqualTo(null); T domainObject2 = clazz.getConstructor().newInstance(); assertThat(domainObject1).isNotEqualTo(domainObject2); assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode()); } | /**
* Verifies the equals/hashcode contract on the domain object.
*/ | Verifies the equals/hashcode contract on the domain object | equalsVerifier | {
"repo_name": "Niky4000/UsefulUtils",
"path": "projects/tutorials-master/tutorials-master/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/TestUtil.java",
"license": "gpl-3.0",
"size": 5158
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 2,504,030 |
public void processRecord(final Record record) {
switch (record.getSid()) {
// the BOFRecord can represent either the beginning of a sheet or the workbook
case BOFRecord.sid:
final BOFRecord bof = (BOFRecord) record;
if (bof.getType() == BOFRecord.TYPE_WORKBOOK) {
LOG.debug("Encountered workbook");
// assigned to the class level member
} else if (bof.getType() == BOFRecord.TYPE_WORKSHEET) {
LOG.debug("Encountered sheet reference");
}
break;
case BoundSheetRecord.sid:
final BoundSheetRecord bsr = (BoundSheetRecord) record;
LOG.debug("New sheet named: " + bsr.getSheetname());
break;
case RowRecord.sid:
final RowRecord rowrec = (RowRecord) record;
// counts for all rows
LOG.debug("Row at " + rowrec.getRowNumber() + " found, first column at " + rowrec.getFirstCol()
+ " last column at " + rowrec.getLastCol() + ". Total number of columns: "
+ rowrec.getRecordSize());
break;
case NumberRecord.sid:
// cells with numbers
final NumberRecord numrec = (NumberRecord) record;
if (getLastrow() < numrec.getRow()) { // start of a new record / row
if (numrec.getRow() > 0) { // put the old record / row into result
// make a copy, because the reference will be reused
final ArrayList<String> copy = new ArrayList<String>();
setLastcol(-1); // reset column count
copy.addAll(rowcontent);
result.add(copy);
}
rowcontent = new ArrayList<String>();
}
// set current row number
setLastrow(numrec.getRow());
// add empty cell contents for the missing cells
addEmptyCells(numrec.getColumn() - getLastcol());
// set current column number
setLastcol(numrec.getColumn());
// add cell content into rowcontent...
if (numrec.getColumn() == 3 || numrec.getColumn() == 4) {
//... with possible float point numbers for Location Name (3) and Shelfmark (4)...
rowcontent.add(String.valueOf(numrec.getValue()));
} else {
//.. and without float point numbers for all other cells...
rowcontent.add(String.valueOf(new Double(numrec.getValue()).longValue()));
}
break;
// SSTRecords store a array of unique strings used in Excel.
case SSTRecord.sid:
sstrec = (SSTRecord) record;
for (int k = 0; k < sstrec.getNumUniqueStrings(); k++) {
LOG.debug("String table value " + k + " = " + sstrec.getString(k));
}
break;
case LabelSSTRecord.sid:
// cells with strings
final LabelSSTRecord lrec = (LabelSSTRecord) record;
if (getLastrow() < lrec.getRow()) { // start of a new record / row
if (lrec.getRow() > 0) { // put the old record / row into result
// make a copy, because the reference will be reused
final ArrayList<String> copy = new ArrayList<String>();
setLastcol(-1); // reset column count
copy.addAll(rowcontent);
result.add(copy);
}
rowcontent = new ArrayList<String>();
}
// set current row number
setLastrow(lrec.getRow());
// add empty cell contents for the missing cells
addEmptyCells(lrec.getColumn() - getLastcol());
// set current column number
setLastcol(lrec.getColumn());
// add cell content into rowcontent
rowcontent.add(sstrec.getString(lrec.getSSTIndex()).toString());
break;
}
} | void function(final Record record) { switch (record.getSid()) { case BOFRecord.sid: final BOFRecord bof = (BOFRecord) record; if (bof.getType() == BOFRecord.TYPE_WORKBOOK) { LOG.debug(STR); } else if (bof.getType() == BOFRecord.TYPE_WORKSHEET) { LOG.debug(STR); } break; case BoundSheetRecord.sid: final BoundSheetRecord bsr = (BoundSheetRecord) record; LOG.debug(STR + bsr.getSheetname()); break; case RowRecord.sid: final RowRecord rowrec = (RowRecord) record; LOG.debug(STR + rowrec.getRowNumber() + STR + rowrec.getFirstCol() + STR + rowrec.getLastCol() + STR + rowrec.getRecordSize()); break; case NumberRecord.sid: final NumberRecord numrec = (NumberRecord) record; if (getLastrow() < numrec.getRow()) { if (numrec.getRow() > 0) { final ArrayList<String> copy = new ArrayList<String>(); setLastcol(-1); copy.addAll(rowcontent); result.add(copy); } rowcontent = new ArrayList<String>(); } setLastrow(numrec.getRow()); addEmptyCells(numrec.getColumn() - getLastcol()); setLastcol(numrec.getColumn()); if (numrec.getColumn() == 3 numrec.getColumn() == 4) { rowcontent.add(String.valueOf(numrec.getValue())); } else { rowcontent.add(String.valueOf(new Double(numrec.getValue()).longValue())); } break; case SSTRecord.sid: sstrec = (SSTRecord) record; for (int k = 0; k < sstrec.getNumUniqueStrings(); k++) { LOG.debug(STR + k + STR + sstrec.getString(k)); } break; case LabelSSTRecord.sid: final LabelSSTRecord lrec = (LabelSSTRecord) record; if (getLastrow() < lrec.getRow()) { if (lrec.getRow() > 0) { final ArrayList<String> copy = new ArrayList<String>(); setLastcol(-1); copy.addAll(rowcontent); result.add(copy); } rowcontent = new ArrayList<String>(); } setLastrow(lrec.getRow()); addEmptyCells(lrec.getColumn() - getLastcol()); setLastcol(lrec.getColumn()); rowcontent.add(sstrec.getString(lrec.getSSTIndex()).toString()); break; } } | /**
* This method listens for incoming records and handles them as required.
*
* @param record
*/ | This method listens for incoming records and handles them as required | processRecord | {
"repo_name": "gbv/doctor-doc",
"path": "source/util/XLSReader.java",
"license": "gpl-2.0",
"size": 8878
} | [
"java.util.ArrayList",
"org.apache.poi.hssf.record.BOFRecord",
"org.apache.poi.hssf.record.BoundSheetRecord",
"org.apache.poi.hssf.record.LabelSSTRecord",
"org.apache.poi.hssf.record.NumberRecord",
"org.apache.poi.hssf.record.Record",
"org.apache.poi.hssf.record.RowRecord",
"org.apache.poi.hssf.record.SSTRecord"
] | import java.util.ArrayList; import org.apache.poi.hssf.record.BOFRecord; import org.apache.poi.hssf.record.BoundSheetRecord; import org.apache.poi.hssf.record.LabelSSTRecord; import org.apache.poi.hssf.record.NumberRecord; import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.RowRecord; import org.apache.poi.hssf.record.SSTRecord; | import java.util.*; import org.apache.poi.hssf.record.*; | [
"java.util",
"org.apache.poi"
] | java.util; org.apache.poi; | 326,587 |
static void markCompleted(JobID id) throws IOException {
fileManager.moveToDone(id);
} | static void markCompleted(JobID id) throws IOException { fileManager.moveToDone(id); } | /**
* Move the completed job into the completed folder.
* This assumes that the jobhistory file is closed and all operations on the
* jobhistory file is complete.
* This *should* be the last call to jobhistory for a given job.
*/ | Move the completed job into the completed folder. This assumes that the jobhistory file is closed and all operations on the jobhistory file is complete. This *should* be the last call to jobhistory for a given job | markCompleted | {
"repo_name": "leonhong/hadoop-20-warehouse",
"path": "src/mapred/org/apache/hadoop/mapred/JobHistory.java",
"license": "apache-2.0",
"size": 81651
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,349,966 |
public MultiValueMap<String, String> getTargetRequestParams() {
return this.targetRequestParams;
} | MultiValueMap<String, String> function() { return this.targetRequestParams; } | /**
* Return the parameters identifying the target request, or an empty map.
*/ | Return the parameters identifying the target request, or an empty map | getTargetRequestParams | {
"repo_name": "leogoing/spring_jeesite",
"path": "spring-webmvc-4.0/org/springframework/web/servlet/FlashMap.java",
"license": "apache-2.0",
"size": 5234
} | [
"org.springframework.util.MultiValueMap"
] | import org.springframework.util.MultiValueMap; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 2,201,233 |
public List getAllMatches(PointerTargetTreeNodeList.Operation opr) {
List list = new ArrayList();
if (opr.execute(getRootNode()) != null)
list.add(getRootNode());
if (getRootNode().hasValidChildTreeList())
getRootNode().getChildTreeList().getAllMatches(opr, list);
return list;
} | List function(PointerTargetTreeNodeList.Operation opr) { List list = new ArrayList(); if (opr.execute(getRootNode()) != null) list.add(getRootNode()); if (getRootNode().hasValidChildTreeList()) getRootNode().getChildTreeList().getAllMatches(opr, list); return list; } | /**
* Walk the tree and perform the operation <code>opr</code> on each node.
* Searchs the tree exhaustively and returns a List containing all nodes that
* are returned by <code>opr</code>.
*/ | Walk the tree and perform the operation <code>opr</code> on each node. Searchs the tree exhaustively and returns a List containing all nodes that are returned by <code>opr</code> | getAllMatches | {
"repo_name": "cqx931/RiTa",
"path": "java/rita/wordnet/jwnl/wndata/list/PointerTargetTree.java",
"license": "gpl-3.0",
"size": 4758
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 378,122 |
public void setFilterConfig(FilterConfig filterConfig) {
this.filterConfig = filterConfig;
} | void function(FilterConfig filterConfig) { this.filterConfig = filterConfig; } | /**
* Set the filter configuration object for this filter.
*
* @param filterConfig The filter configuration object
*/ | Set the filter configuration object for this filter | setFilterConfig | {
"repo_name": "engcardso/TinyAgenda",
"path": "src/java/com/tinyagenda/filters/SavingEvt.java",
"license": "gpl-3.0",
"size": 7092
} | [
"javax.servlet.FilterConfig"
] | import javax.servlet.FilterConfig; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 1,894,418 |
@Override
public User getUserInformation(String sessionId) {
// This is a little evil here. We are fetching the User object
// *and* side effecting it by storing the sessionId
// A more pedagotically correct way would be to do the store
// in a separate RPC. But that would add another round trip.
User user = userInfoProvider.getUser();
user.setSessionId(sessionId); // Store local copy
// Store it in the data store
storageIo.setUserSessionId(userInfoProvider.getUserId(), sessionId);
return user;
} | User function(String sessionId) { User user = userInfoProvider.getUser(); user.setSessionId(sessionId); storageIo.setUserSessionId(userInfoProvider.getUserId(), sessionId); return user; } | /**
* Returns user information.
*
* (obsoleted by getSystemConfig())
*
* @return user information record
*/ | Returns user information. (obsoleted by getSystemConfig()) | getUserInformation | {
"repo_name": "codimeo/codi-studio",
"path": "appinventor/appengine/src/com/google/appinventor/server/UserInfoServiceImpl.java",
"license": "apache-2.0",
"size": 5481
} | [
"com.google.appinventor.shared.rpc.user.User"
] | import com.google.appinventor.shared.rpc.user.User; | import com.google.appinventor.shared.rpc.user.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,517,986 |
public void queueJob(ObdCommandJob job) {
queueCounter++;
Log.d(TAG, "Adding job[" + queueCounter + "] to queue..");
job.setId(queueCounter);
try {
jobsQueue.put(job);
Log.d(TAG, "Job queued successfully.");
} catch (InterruptedException e) {
job.setState(ObdCommandJob.ObdCommandJobState.QUEUE_ERROR);
Log.e(TAG, "Failed to queue job.");
}
} | void function(ObdCommandJob job) { queueCounter++; Log.d(TAG, STR + queueCounter + STR); job.setId(queueCounter); try { jobsQueue.put(job); Log.d(TAG, STR); } catch (InterruptedException e) { job.setState(ObdCommandJob.ObdCommandJobState.QUEUE_ERROR); Log.e(TAG, STR); } } | /**
* This method will add a job to the queue while setting its ID to the
* internal queue counter.
*
* @param job the job to queue.
*/ | This method will add a job to the queue while setting its ID to the internal queue counter | queueJob | {
"repo_name": "Mohammad2416/android-obd-reader-master",
"path": "src/main/java/com/ahmadi/android/obd/reader/io/AbstractGatewayService.java",
"license": "apache-2.0",
"size": 4249
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,536,453 |
public MapList getMapResult() {
return mapResult;
} | MapList function() { return mapResult; } | /**
*
* Get a map of annotations
*
**/ | Get a map of annotations | getMapResult | {
"repo_name": "TsangLab/Proxiris",
"path": "java/src/csfg/TextMiningPipeline.java",
"license": "mit",
"size": 4939
} | [
"org.wikifier.MapList"
] | import org.wikifier.MapList; | import org.wikifier.*; | [
"org.wikifier"
] | org.wikifier; | 1,237,807 |
private Network buildScaleFreeNetwork() {
// Object to build the graph in the Barabasi algorithm implementation.
Factory<Graph<User, Link>> graphFactory = new Factory<Graph<User, Link>>() { | Network function() { Factory<Graph<User, Link>> graphFactory = new Factory<Graph<User, Link>>() { | /**
* Build a scale free network using simulation parameters.
*
* @return
*/ | Build a scale free network using simulation parameters | buildScaleFreeNetwork | {
"repo_name": "gsi-upm/TwitterSimulator",
"path": "src/es/upm/dit/gsi/sim/twitter/TwitterSimulation.java",
"license": "gpl-2.0",
"size": 22901
} | [
"edu.uci.ics.jung.graph.Graph",
"es.upm.dit.gsi.sim.twitter.model.user.Link",
"es.upm.dit.gsi.sim.twitter.model.user.User",
"org.apache.commons.collections15.Factory"
] | import edu.uci.ics.jung.graph.Graph; import es.upm.dit.gsi.sim.twitter.model.user.Link; import es.upm.dit.gsi.sim.twitter.model.user.User; import org.apache.commons.collections15.Factory; | import edu.uci.ics.jung.graph.*; import es.upm.dit.gsi.sim.twitter.model.user.*; import org.apache.commons.collections15.*; | [
"edu.uci.ics",
"es.upm.dit",
"org.apache.commons"
] | edu.uci.ics; es.upm.dit; org.apache.commons; | 30,721 |
@Override
public boolean isUsernameIndex(String[] args, int index)
{
if(index > 0 && args.length > 1)
{
ICommand cmd = getCommandMap().get(args[0]);
if(cmd != null)
{
return cmd.isUsernameIndex(shiftArgs(args), index - 1);
}
}
return false;
} | boolean function(String[] args, int index) { if(index > 0 && args.length > 1) { ICommand cmd = getCommandMap().get(args[0]); if(cmd != null) { return cmd.isUsernameIndex(shiftArgs(args), index - 1); } } return false; } | /**
* Return whether the specified command parameter index is a username parameter.
*/ | Return whether the specified command parameter index is a username parameter | isUsernameIndex | {
"repo_name": "F1r3w477/CustomWorldGen",
"path": "build/tmp/recompileMc/sources/net/minecraftforge/server/command/CommandTreeBase.java",
"license": "lgpl-3.0",
"size": 4586
} | [
"net.minecraft.command.ICommand"
] | import net.minecraft.command.ICommand; | import net.minecraft.command.*; | [
"net.minecraft.command"
] | net.minecraft.command; | 1,731,790 |
public String getClassName() {
return ansField.getClass().getName();
}
private class SaveDefaultAction extends AbstractAction {
public SaveDefaultAction() {
super("set as default");
} | String function() { return ansField.getClass().getName(); } private class SaveDefaultAction extends AbstractAction { public SaveDefaultAction() { super(STR); } | /**
* Gets the class name for the answer field that this entry describes.
* @return the class name for the answer field that this entry describes.
*/ | Gets the class name for the answer field that this entry describes | getClassName | {
"repo_name": "tectronics/ingatan",
"path": "src/org/ingatan/component/librarymanager/EditAnswerFieldsDialog.java",
"license": "gpl-3.0",
"size": 29304
} | [
"javax.swing.AbstractAction"
] | import javax.swing.AbstractAction; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 873,321 |
public boolean checkNoSpoofing(ProtocolSubmitAction submitAction) {
boolean isValid = true;
List<ProtocolReviewerBean> submittedReviewers = (List) submitAction.getReviewers();
if (null != submittedReviewers && submittedReviewers.size() > 0) {
if (StringUtils.isBlank(submitAction.getCommitteeId())) {
isValid = false;
}
else {
List<CommitteeMembership> actualReviewers = (List) submitAction.getProtocol().filterOutProtocolPersonnel(
getCommitteeService().getAvailableMembers(submitAction.getCommitteeId(), submitAction.getScheduleId()));
for (int i = 0; i < submittedReviewers.size(); i++) {
ProtocolReviewerBean reviewer = submittedReviewers.get(i);
if (!isReviewerInList(reviewer, actualReviewers, i)) {
isValid = false;
}
}
}
}
return isValid;
} | boolean function(ProtocolSubmitAction submitAction) { boolean isValid = true; List<ProtocolReviewerBean> submittedReviewers = (List) submitAction.getReviewers(); if (null != submittedReviewers && submittedReviewers.size() > 0) { if (StringUtils.isBlank(submitAction.getCommitteeId())) { isValid = false; } else { List<CommitteeMembership> actualReviewers = (List) submitAction.getProtocol().filterOutProtocolPersonnel( getCommitteeService().getAvailableMembers(submitAction.getCommitteeId(), submitAction.getScheduleId())); for (int i = 0; i < submittedReviewers.size(); i++) { ProtocolReviewerBean reviewer = submittedReviewers.get(i); if (!isReviewerInList(reviewer, actualReviewers, i)) { isValid = false; } } } } return isValid; } | /**
*
* This method checks to make sure that the reviewers list submitted is actually the same as that made available for that
* protocol, committee and schedule, i.e. no spoofing of hidden input fields has taken place.
*
* @param submitAction
* @return
*/ | This method checks to make sure that the reviewers list submitted is actually the same as that made available for that protocol, committee and schedule, i.e. no spoofing of hidden input fields has taken place | checkNoSpoofing | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/irb/actions/submit/ProtocolSubmitActionRule.java",
"license": "apache-2.0",
"size": 18580
} | [
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.kuali.kra.committee.bo.CommitteeMembership"
] | import java.util.List; import org.apache.commons.lang3.StringUtils; import org.kuali.kra.committee.bo.CommitteeMembership; | import java.util.*; import org.apache.commons.lang3.*; import org.kuali.kra.committee.bo.*; | [
"java.util",
"org.apache.commons",
"org.kuali.kra"
] | java.util; org.apache.commons; org.kuali.kra; | 1,569,934 |
void defineSlot(Node n, Node parent, JSType type, boolean inferred) {
Preconditions.checkArgument(inferred || type != null);
// Only allow declarations of NAMEs and qualfied names.
boolean shouldDeclareOnGlobalThis = false;
if (n.getType() == Token.NAME) {
Preconditions.checkArgument(
parent.getType() == Token.FUNCTION ||
parent.getType() == Token.VAR ||
parent.getType() == Token.LP ||
parent.getType() == Token.CATCH);
shouldDeclareOnGlobalThis = scope.isGlobal() &&
(parent.getType() == Token.VAR ||
parent.getType() == Token.FUNCTION);
} else {
Preconditions.checkArgument(
n.getType() == Token.GETPROP &&
(parent.getType() == Token.ASSIGN ||
parent.getType() == Token.EXPR_RESULT));
}
String variableName = n.getQualifiedName();
Preconditions.checkArgument(!variableName.isEmpty());
// If n is a property, then we should really declare it in the
// scope where the root object appears. This helps out people
// who declare "global" names in an anonymous namespace.
Scope scopeToDeclareIn = scope;
if (n.getType() == Token.GETPROP && !scope.isGlobal() &&
isQnameRootedInGlobalScope(n)) {
Scope globalScope = scope.getGlobalScope();
// don't try to declare in the global scope if there's
// already a symbol there with this name.
if (!globalScope.isDeclared(variableName, false)) {
scopeToDeclareIn = scope.getGlobalScope();
}
}
// declared in closest scope?
if (scopeToDeclareIn.isDeclared(variableName, false)) {
Var oldVar = scopeToDeclareIn.getVar(variableName);
validator.expectUndeclaredVariable(
sourceName, n, parent, oldVar, variableName, type);
} else {
if (!inferred) {
setDeferredType(n, type);
}
CompilerInput input = compiler.getInput(sourceName);
boolean isExtern = input.isExtern();
Var newVar =
scopeToDeclareIn.declare(variableName, n, type, input, inferred);
if (shouldDeclareOnGlobalThis) {
ObjectType globalThis =
typeRegistry.getNativeObjectType(JSTypeNative.GLOBAL_THIS);
if (inferred) {
globalThis.defineInferredProperty(variableName,
type == null ?
getNativeType(JSTypeNative.NO_TYPE) :
type,
isExtern, n);
} else {
globalThis.defineDeclaredProperty(variableName, type, isExtern, n);
}
}
// We need to do some additional work for constructors and interfaces.
if (type instanceof FunctionType &&
// We don't want to look at empty function types.
!type.isEmptyType()) {
FunctionType fnType = (FunctionType) type;
if ((fnType.isConstructor() || fnType.isInterface()) &&
!fnType.equals(getNativeType(U2U_CONSTRUCTOR_TYPE))) {
// Declare var.prototype in the scope chain.
FunctionType superClassCtor = fnType.getSuperClassConstructor();
scopeToDeclareIn.declare(variableName + ".prototype", n,
fnType.getPrototype(), input,
superClassCtor == null ||
superClassCtor.getInstanceType().equals(
getNativeType(OBJECT_TYPE)));
// Make sure the variable is initialized to something if
// it constructs itself.
if (newVar.getInitialValue() == null &&
!isExtern &&
// We want to make sure that when we declare a new instance
// type (with @constructor) that there's actually a ctor for it.
// This doesn't apply to structural constructors
// (like function(new:Array). Checking the constructed
// type against the variable name is a sufficient check for
// this.
variableName.equals(
fnType.getInstanceType().getReferenceName())) {
compiler.report(
JSError.make(sourceName, n,
fnType.isConstructor() ?
CTOR_INITIALIZER : IFACE_INITIALIZER,
variableName));
}
}
}
}
} | void defineSlot(Node n, Node parent, JSType type, boolean inferred) { Preconditions.checkArgument(inferred type != null); boolean shouldDeclareOnGlobalThis = false; if (n.getType() == Token.NAME) { Preconditions.checkArgument( parent.getType() == Token.FUNCTION parent.getType() == Token.VAR parent.getType() == Token.LP parent.getType() == Token.CATCH); shouldDeclareOnGlobalThis = scope.isGlobal() && (parent.getType() == Token.VAR parent.getType() == Token.FUNCTION); } else { Preconditions.checkArgument( n.getType() == Token.GETPROP && (parent.getType() == Token.ASSIGN parent.getType() == Token.EXPR_RESULT)); } String variableName = n.getQualifiedName(); Preconditions.checkArgument(!variableName.isEmpty()); Scope scopeToDeclareIn = scope; if (n.getType() == Token.GETPROP && !scope.isGlobal() && isQnameRootedInGlobalScope(n)) { Scope globalScope = scope.getGlobalScope(); if (!globalScope.isDeclared(variableName, false)) { scopeToDeclareIn = scope.getGlobalScope(); } } if (scopeToDeclareIn.isDeclared(variableName, false)) { Var oldVar = scopeToDeclareIn.getVar(variableName); validator.expectUndeclaredVariable( sourceName, n, parent, oldVar, variableName, type); } else { if (!inferred) { setDeferredType(n, type); } CompilerInput input = compiler.getInput(sourceName); boolean isExtern = input.isExtern(); Var newVar = scopeToDeclareIn.declare(variableName, n, type, input, inferred); if (shouldDeclareOnGlobalThis) { ObjectType globalThis = typeRegistry.getNativeObjectType(JSTypeNative.GLOBAL_THIS); if (inferred) { globalThis.defineInferredProperty(variableName, type == null ? getNativeType(JSTypeNative.NO_TYPE) : type, isExtern, n); } else { globalThis.defineDeclaredProperty(variableName, type, isExtern, n); } } if (type instanceof FunctionType && !type.isEmptyType()) { FunctionType fnType = (FunctionType) type; if ((fnType.isConstructor() fnType.isInterface()) && !fnType.equals(getNativeType(U2U_CONSTRUCTOR_TYPE))) { FunctionType superClassCtor = fnType.getSuperClassConstructor(); scopeToDeclareIn.declare(variableName + STR, n, fnType.getPrototype(), input, superClassCtor == null superClassCtor.getInstanceType().equals( getNativeType(OBJECT_TYPE))); if (newVar.getInitialValue() == null && !isExtern && variableName.equals( fnType.getInstanceType().getReferenceName())) { compiler.report( JSError.make(sourceName, n, fnType.isConstructor() ? CTOR_INITIALIZER : IFACE_INITIALIZER, variableName)); } } } } } | /**
* Defines a typed variable. The defining node will be annotated with the
* variable's type of {@link JSTypeNative#UNKNOWN_TYPE} if its type is
* inferred.
*
* Slots may be any variable or any qualified name in the global scope.
*
* @param n the defining NAME or GETPROP node.
* @param parent the {@code n}'s parent.
* @param type the variable's type. It may be {@code null} if
* {@code inferred} is {@code true}.
*/ | Defines a typed variable. The defining node will be annotated with the variable's type of <code>JSTypeNative#UNKNOWN_TYPE</code> if its type is inferred. Slots may be any variable or any qualified name in the global scope | defineSlot | {
"repo_name": "jayli/kissy",
"path": "tools/module-compiler/src/com/google/javascript/jscomp/TypedScopeCreator.java",
"license": "mit",
"size": 59987
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.jscomp.Scope",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token",
"com.google.javascript.rhino.jstype.FunctionType",
"com.google.javascript.rhino.jstype.JSType",
"com.google.javascript.rhino.jstype.JSTypeNative",
"com.google.javascript.rhino.jstype.ObjectType"
] | import com.google.common.base.Preconditions; import com.google.javascript.jscomp.Scope; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.JSTypeNative; import com.google.javascript.rhino.jstype.ObjectType; | import com.google.common.base.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,054,204 |
@Override
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
ConnectionControl info = (ConnectionControl) o;
super.looseMarshal(wireFormat, o, dataOut);
dataOut.writeBoolean(info.isClose());
dataOut.writeBoolean(info.isExit());
dataOut.writeBoolean(info.isFaultTolerant());
dataOut.writeBoolean(info.isResume());
dataOut.writeBoolean(info.isSuspend());
} | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConnectionControl info = (ConnectionControl) o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeBoolean(info.isClose()); dataOut.writeBoolean(info.isExit()); dataOut.writeBoolean(info.isFaultTolerant()); dataOut.writeBoolean(info.isResume()); dataOut.writeBoolean(info.isSuspend()); } | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | looseMarshal | {
"repo_name": "tabish121/OpenWire",
"path": "openwire-core/src/main/java/io/openwire/codec/v1/ConnectionControlMarshaller.java",
"license": "apache-2.0",
"size": 4740
} | [
"io.openwire.codec.OpenWireFormat",
"io.openwire.commands.ConnectionControl",
"java.io.DataOutput",
"java.io.IOException"
] | import io.openwire.codec.OpenWireFormat; import io.openwire.commands.ConnectionControl; import java.io.DataOutput; import java.io.IOException; | import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*; | [
"io.openwire.codec",
"io.openwire.commands",
"java.io"
] | io.openwire.codec; io.openwire.commands; java.io; | 2,613,256 |
private double findUpperBound(final UnivariateFunction f,
final double a, final double h) {
final double yA = f.value(a);
double yB = yA;
for (double step = h; step < Double.MAX_VALUE; step *= FastMath.max(2, yA / yB)) {
final double b = a + step;
yB = f.value(b);
if (yA * yB <= 0) {
return b;
}
}
throw new MathIllegalStateException(LocalizedFormats.UNABLE_TO_BRACKET_OPTIMUM_IN_LINE_SEARCH);
}
public static class IdentityPreconditioner implements Preconditioner { | double function(final UnivariateFunction f, final double a, final double h) { final double yA = f.value(a); double yB = yA; for (double step = h; step < Double.MAX_VALUE; step *= FastMath.max(2, yA / yB)) { final double b = a + step; yB = f.value(b); if (yA * yB <= 0) { return b; } } throw new MathIllegalStateException(LocalizedFormats.UNABLE_TO_BRACKET_OPTIMUM_IN_LINE_SEARCH); } public static class IdentityPreconditioner implements Preconditioner { | /**
* Find the upper bound b ensuring bracketing of a root between a and b.
*
* @param f function whose root must be bracketed.
* @param a lower bound of the interval.
* @param h initial step to try.
* @return b such that f(a) and f(b) have opposite signs.
* @throws MathIllegalStateException if no bracket can be found.
*/ | Find the upper bound b ensuring bracketing of a root between a and b | findUpperBound | {
"repo_name": "happyjack27/autoredistrict",
"path": "src/org/apache/commons/math3/optimization/general/NonLinearConjugateGradientOptimizer.java",
"license": "gpl-3.0",
"size": 12220
} | [
"org.apache.commons.math3.analysis.UnivariateFunction",
"org.apache.commons.math3.exception.MathIllegalStateException",
"org.apache.commons.math3.exception.util.LocalizedFormats",
"org.apache.commons.math3.util.FastMath"
] | import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.exception.MathIllegalStateException; import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.util.FastMath; | import org.apache.commons.math3.analysis.*; import org.apache.commons.math3.exception.*; import org.apache.commons.math3.exception.util.*; import org.apache.commons.math3.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,340,738 |
public List<String> disabledAlerts() {
return this.disabledAlerts;
} | List<String> function() { return this.disabledAlerts; } | /**
* Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are:
* Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly.
*
* @return the disabledAlerts value.
*/ | Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly | disabledAlerts | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/postgresql/azure-resourcemanager-postgresql/src/main/java/com/azure/resourcemanager/postgresql/fluent/models/SecurityAlertPolicyProperties.java",
"license": "mit",
"size": 7715
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,909,452 |
@Converter(allowNull = true)
public Node toDOMNode(Source source) throws TransformerException, ParserConfigurationException, IOException, SAXException {
DOMSource domSrc = toDOMSource(source);
return domSrc != null ? domSrc.getNode() : null;
} | @Converter(allowNull = true) Node function(Source source) throws TransformerException, ParserConfigurationException, IOException, SAXException { DOMSource domSrc = toDOMSource(source); return domSrc != null ? domSrc.getNode() : null; } | /**
* Converts the given TRaX Source into a W3C DOM node
*/ | Converts the given TRaX Source into a W3C DOM node | toDOMNode | {
"repo_name": "FingolfinTEK/camel",
"path": "camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java",
"license": "apache-2.0",
"size": 48386
} | [
"java.io.IOException",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.transform.Source",
"javax.xml.transform.TransformerException",
"javax.xml.transform.dom.DOMSource",
"org.apache.camel.Converter",
"org.w3c.dom.Node",
"org.xml.sax.SAXException"
] | import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Source; import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMSource; import org.apache.camel.Converter; import org.w3c.dom.Node; import org.xml.sax.SAXException; | import java.io.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import org.apache.camel.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.apache.camel",
"org.w3c.dom",
"org.xml.sax"
] | java.io; javax.xml; org.apache.camel; org.w3c.dom; org.xml.sax; | 2,408,557 |
public void testPasteNonMergedCells2MergedCells( ) throws Exception
{
openDesign( fileName );
TableHandle copyTable = (TableHandle) designHandle
.findElement( "CopyTable1" ); //$NON-NLS-1$
assertNotNull( copyTable );
TableHandle pasteTable = (TableHandle) designHandle
.findElement( "PasteTable1" ); //$NON-NLS-1$
assertNotNull( pasteTable );
SlotHandle detail = pasteTable.getDetail( );
RowHandle row1 = (RowHandle) detail.get( 0 );
RowHandle row2 = (RowHandle) detail.get( 1 );
assertEquals( 2, row1.getCells( ).getCount( ) );
assertEquals( 1, row2.getCells( ).getCount( ) );
CellHandle cell1 = (CellHandle) row1.getCells( ).get( 0 );
assertEquals( 2, cell1.getRowSpan( ) );
SlotHandle columns = pasteTable.getColumns( );
assertEquals( 2, columns.getCount( ) );
ColumnHandle column2 = (ColumnHandle) columns.get( 1 );
assertEquals( IColorConstants.RED, column2
.getStringProperty( Style.COLOR_PROP ) );
ColumnBandData data = copyTable.copyColumn( 1 );
// different layout, the exception is thrown.
assertFalse( pasteTable.canPasteColumn( data, 1, false ) );
try
{
pasteTable.pasteColumn( data, 1, false );
fail( );
}
catch ( SemanticException e )
{
assertEquals(
SemanticError.DESIGN_EXCEPTION_COLUMN_PASTE_DIFFERENT_LAYOUT,
e.getErrorCode( ) );
}
// paste cells in force.
// verify the layout of the pasted table.
pasteTable.pasteColumn( data, 1, true );
detail = pasteTable.getDetail( );
assertEquals( 2, detail.getCount( ) );
row1 = (RowHandle) detail.get( 0 );
row2 = (RowHandle) detail.get( 1 );
assertEquals( 2, row1.getCells( ).getCount( ) );
assertEquals( 2, row2.getCells( ).getCount( ) );
cell1 = (CellHandle) row1.getCells( ).get( 0 );
assertEquals( 1, cell1.getRowSpan( ) );
columns = pasteTable.getColumns( );
assertEquals( 2, columns.getCount( ) );
// verify column information
column2 = (ColumnHandle) columns.get( 0 );
assertEquals( IColorConstants.AQUA, column2
.getStringProperty( Style.COLOR_PROP ) );
assertEquals( 1, column2.getRepeatCount( ) );
ColumnHandle column1 = (ColumnHandle) columns.get( 1 );
assertEquals( IColorConstants.RED, column1
.getStringProperty( Style.COLOR_PROP ) );
assertEquals( 1, column2.getRepeatCount( ) );
} | void function( ) throws Exception { openDesign( fileName ); TableHandle copyTable = (TableHandle) designHandle .findElement( STR ); assertNotNull( copyTable ); TableHandle pasteTable = (TableHandle) designHandle .findElement( STR ); assertNotNull( pasteTable ); SlotHandle detail = pasteTable.getDetail( ); RowHandle row1 = (RowHandle) detail.get( 0 ); RowHandle row2 = (RowHandle) detail.get( 1 ); assertEquals( 2, row1.getCells( ).getCount( ) ); assertEquals( 1, row2.getCells( ).getCount( ) ); CellHandle cell1 = (CellHandle) row1.getCells( ).get( 0 ); assertEquals( 2, cell1.getRowSpan( ) ); SlotHandle columns = pasteTable.getColumns( ); assertEquals( 2, columns.getCount( ) ); ColumnHandle column2 = (ColumnHandle) columns.get( 1 ); assertEquals( IColorConstants.RED, column2 .getStringProperty( Style.COLOR_PROP ) ); ColumnBandData data = copyTable.copyColumn( 1 ); assertFalse( pasteTable.canPasteColumn( data, 1, false ) ); try { pasteTable.pasteColumn( data, 1, false ); fail( ); } catch ( SemanticException e ) { assertEquals( SemanticError.DESIGN_EXCEPTION_COLUMN_PASTE_DIFFERENT_LAYOUT, e.getErrorCode( ) ); } pasteTable.pasteColumn( data, 1, true ); detail = pasteTable.getDetail( ); assertEquals( 2, detail.getCount( ) ); row1 = (RowHandle) detail.get( 0 ); row2 = (RowHandle) detail.get( 1 ); assertEquals( 2, row1.getCells( ).getCount( ) ); assertEquals( 2, row2.getCells( ).getCount( ) ); cell1 = (CellHandle) row1.getCells( ).get( 0 ); assertEquals( 1, cell1.getRowSpan( ) ); columns = pasteTable.getColumns( ); assertEquals( 2, columns.getCount( ) ); column2 = (ColumnHandle) columns.get( 0 ); assertEquals( IColorConstants.AQUA, column2 .getStringProperty( Style.COLOR_PROP ) ); assertEquals( 1, column2.getRepeatCount( ) ); ColumnHandle column1 = (ColumnHandle) columns.get( 1 ); assertEquals( IColorConstants.RED, column1 .getStringProperty( Style.COLOR_PROP ) ); assertEquals( 1, column2.getRepeatCount( ) ); } | /**
* Copies non-merged cells in the source table to another table with merged
* cells.
*
* @throws Exception
*/ | Copies non-merged cells in the source table to another table with merged cells | testPasteNonMergedCells2MergedCells | {
"repo_name": "rrimmana/birt-1",
"path": "model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/TableColumnBandTest.java",
"license": "epl-1.0",
"size": 48243
} | [
"org.eclipse.birt.report.model.api.activity.SemanticException",
"org.eclipse.birt.report.model.api.elements.SemanticError",
"org.eclipse.birt.report.model.api.metadata.IColorConstants",
"org.eclipse.birt.report.model.elements.Style"
] | import org.eclipse.birt.report.model.api.activity.SemanticException; import org.eclipse.birt.report.model.api.elements.SemanticError; import org.eclipse.birt.report.model.api.metadata.IColorConstants; import org.eclipse.birt.report.model.elements.Style; | import org.eclipse.birt.report.model.api.activity.*; import org.eclipse.birt.report.model.api.elements.*; import org.eclipse.birt.report.model.api.metadata.*; import org.eclipse.birt.report.model.elements.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 1,489,106 |
private void generateKeys() {
entries.getReadWriteLock().writeLock().lock();
try {
BibDatabase database;
MetaData localMetaData;
// Relate to existing database, if any:
if (panel == null) {
database = new BibDatabase();
localMetaData = new MetaData();
} else {
database = panel.getDatabase();
localMetaData = panel.getBibDatabaseContext().getMetaData();
}
List<Optional<String>> keys = new ArrayList<>(entries.size());
// Iterate over the entries, add them to the database we are working
// with,
// and generate unique keys:
for (BibEntry entry : entries) {
entry.setId(IdGenerator.next());
database.insertEntry(entry);
BibtexKeyPatternUtil.makeAndSetLabel(
localMetaData.getCiteKeyPattern(Globals.prefs.getBibtexKeyPatternPreferences().getKeyPattern()),
database, entry,
Globals.prefs.getBibtexKeyPatternPreferences());
// Add the generated key to our list: -- TODO: Why??
keys.add(entry.getCiteKeyOptional());
}
preview.update();
preview.repaint();
// Remove the entries from the database again, since they are not
// supposed to
// added yet. They only needed to be in it while we generated the keys,
// to keep
// control over key uniqueness.
for (BibEntry entry : entries) {
database.removeEntry(entry);
}
} finally {
entries.getReadWriteLock().writeLock().unlock();
}
glTable.repaint();
} | void function() { entries.getReadWriteLock().writeLock().lock(); try { BibDatabase database; MetaData localMetaData; if (panel == null) { database = new BibDatabase(); localMetaData = new MetaData(); } else { database = panel.getDatabase(); localMetaData = panel.getBibDatabaseContext().getMetaData(); } List<Optional<String>> keys = new ArrayList<>(entries.size()); for (BibEntry entry : entries) { entry.setId(IdGenerator.next()); database.insertEntry(entry); BibtexKeyPatternUtil.makeAndSetLabel( localMetaData.getCiteKeyPattern(Globals.prefs.getBibtexKeyPatternPreferences().getKeyPattern()), database, entry, Globals.prefs.getBibtexKeyPatternPreferences()); keys.add(entry.getCiteKeyOptional()); } preview.update(); preview.repaint(); for (BibEntry entry : entries) { database.removeEntry(entry); } } finally { entries.getReadWriteLock().writeLock().unlock(); } glTable.repaint(); } | /**
* Generate keys for all entries. All keys will be unique with respect to
* one another, and, if they are destined for an existing database, with
* respect to existing keys in the database.
*/ | Generate keys for all entries. All keys will be unique with respect to one another, and, if they are destined for an existing database, with respect to existing keys in the database | generateKeys | {
"repo_name": "prepilef/DC-UFSCar-ES2-201701-Grupo595136",
"path": "src/main/java/org/jabref/gui/importer/ImportInspectionDialog.java",
"license": "mit",
"size": 60059
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Optional",
"org.jabref.Globals",
"org.jabref.logic.bibtexkeypattern.BibtexKeyPatternUtil",
"org.jabref.model.database.BibDatabase",
"org.jabref.model.entry.BibEntry",
"org.jabref.model.entry.IdGenerator",
"org.jabref.model.metadata.MetaData"
] | import java.util.ArrayList; import java.util.List; import java.util.Optional; import org.jabref.Globals; import org.jabref.logic.bibtexkeypattern.BibtexKeyPatternUtil; import org.jabref.model.database.BibDatabase; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.IdGenerator; import org.jabref.model.metadata.MetaData; | import java.util.*; import org.jabref.*; import org.jabref.logic.bibtexkeypattern.*; import org.jabref.model.database.*; import org.jabref.model.entry.*; import org.jabref.model.metadata.*; | [
"java.util",
"org.jabref",
"org.jabref.logic",
"org.jabref.model"
] | java.util; org.jabref; org.jabref.logic; org.jabref.model; | 989,895 |
public void setFunctionalId(String functionalId) {
if ((this.functionalId == null)) {
if ((functionalId == null)) {
return;
}
this.functionalId = new FunctionalIdentifier();
}
this.functionalId.setValue(functionalId);
}
| void function(String functionalId) { if ((this.functionalId == null)) { if ((functionalId == null)) { return; } this.functionalId = new FunctionalIdentifier(); } this.functionalId.setValue(functionalId); } | /**
* Functional ID of the Code
*
* @param functionalId the String.
*/ | Functional ID of the Code | setFunctionalId | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/code/Code.java",
"license": "epl-1.0",
"size": 11619
} | [
"org.nabucco.framework.base.facade.datatype.FunctionalIdentifier"
] | import org.nabucco.framework.base.facade.datatype.FunctionalIdentifier; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,012,043 |
StackSize getStackSize(); | StackSize getStackSize(); | /**
* Returns the size of the type described by this instance.
*
* @return The size of the type described by this instance.
*/ | Returns the size of the type described by this instance | getStackSize | {
"repo_name": "PascalSchumacher/byte-buddy",
"path": "byte-buddy-dep/src/main/java/net/bytebuddy/description/type/TypeDescription.java",
"license": "apache-2.0",
"size": 44988
} | [
"net.bytebuddy.implementation.bytecode.StackSize"
] | import net.bytebuddy.implementation.bytecode.StackSize; | import net.bytebuddy.implementation.bytecode.*; | [
"net.bytebuddy.implementation"
] | net.bytebuddy.implementation; | 2,651,073 |
@WebMethod(operationName = "registerRfidEvent")
@WebResult(name = "rfidEventInfo")
public RfidEventInfo registerRfidEvent(
@WebParam(name = "rfid") final String rfid,
@WebParam(name = "stationMac") final String stationMac,
@WebParam(name = "deviceIndex") final Integer deviceIndex) {
return masterEventRegisterManager.registerRfidEvent(rfid, stationMac,
deviceIndex);
}
| @WebMethod(operationName = STR) @WebResult(name = STR) RfidEventInfo function( @WebParam(name = "rfid") final String rfid, @WebParam(name = STR) final String stationMac, @WebParam(name = STR) final Integer deviceIndex) { return masterEventRegisterManager.registerRfidEvent(rfid, stationMac, deviceIndex); } | /**
* Registers a RFID event.
*/ | Registers a RFID event | registerRfidEvent | {
"repo_name": "bitzware/2m",
"path": "exm/mserver/src/main/java/com/bitzware/exm/ws/MasterServer.java",
"license": "gpl-2.0",
"size": 5575
} | [
"com.bitzware.exm.model.RfidEventInfo",
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.jws.WebResult"
] | import com.bitzware.exm.model.RfidEventInfo; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; | import com.bitzware.exm.model.*; import javax.jws.*; | [
"com.bitzware.exm",
"javax.jws"
] | com.bitzware.exm; javax.jws; | 2,028,274 |
public PacketType getPacketType(String itemName); | PacketType function(String itemName); | /**
* Returns item packet type to the given <code>itemName</code>.
*
* @param itemName
* the item for which to find a packet type.
*
* @return the corresponding packet type to the given <code>itemName</code>.
*/ | Returns item packet type to the given <code>itemName</code> | getPacketType | {
"repo_name": "watou/openhab",
"path": "bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/RFXComBindingProvider.java",
"license": "epl-1.0",
"size": 2559
} | [
"org.openhab.binding.rfxcom.internal.messages.RFXComBaseMessage"
] | import org.openhab.binding.rfxcom.internal.messages.RFXComBaseMessage; | import org.openhab.binding.rfxcom.internal.messages.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 819,008 |
public SearchSourceBuilder scriptField(String name, Script script) {
if (scriptFields == null) {
scriptFields = new ArrayList<>();
}
scriptFields.add(new ScriptField(name, script));
return this;
} | SearchSourceBuilder function(String name, Script script) { if (scriptFields == null) { scriptFields = new ArrayList<>(); } scriptFields.add(new ScriptField(name, script)); return this; } | /**
* Adds a script field under the given name with the provided script.
*
* @param name
* The name of the field
* @param script
* The script
*/ | Adds a script field under the given name with the provided script | scriptField | {
"repo_name": "vingupta3/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java",
"license": "apache-2.0",
"size": 27060
} | [
"java.util.ArrayList",
"org.elasticsearch.script.Script"
] | import java.util.ArrayList; import org.elasticsearch.script.Script; | import java.util.*; import org.elasticsearch.script.*; | [
"java.util",
"org.elasticsearch.script"
] | java.util; org.elasticsearch.script; | 1,020,077 |
public void setValueExpression(String name, ValueExpression binding) {
name = BsfUtils.snakeCaseToCamelCase(name);
super.setValueExpression(name, binding);
}
protected enum PropertyKeys {
accesskey,
binding,
colLg,
colMd,
colSm,
colXs,
dir,
disabled,
dismiss,
display,
fragment,
hidden,
icon,
iconAlign,
iconAwesome,
iconFlip,
iconRotate,
iconSize,
iconSpin,
immediate,
lang,
largeScreen,
look,
mediumScreen,
offset,
offsetLg,
offsetMd,
offsetSm,
offsetXs,
onblur,
onchange,
onclick,
ondblclick,
onfocus,
onkeydown,
onkeypress,
onkeyup,
onmousedown,
onmousemove,
onmouseout,
onmouseover,
onmouseup,
onselect,
outcome,
size,
smallScreen,
span,
style,
styleClass,
tabindex,
tinyScreen,
title,
tooltip,
tooltipContainer,
tooltipDelay,
tooltipDelayHide,
tooltipDelayShow,
tooltipPosition,
visible;
String toString;
PropertyKeys(String toString) {
this.toString = toString;
}
PropertyKeys() {
} | void function(String name, ValueExpression binding) { name = BsfUtils.snakeCaseToCamelCase(name); super.setValueExpression(name, binding); } protected enum PropertyKeys { accesskey, binding, colLg, colMd, colSm, colXs, dir, disabled, dismiss, display, fragment, hidden, icon, iconAlign, iconAwesome, iconFlip, iconRotate, iconSize, iconSpin, immediate, lang, largeScreen, look, mediumScreen, offset, offsetLg, offsetMd, offsetSm, offsetXs, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, outcome, size, smallScreen, span, style, styleClass, tabindex, tinyScreen, title, tooltip, tooltipContainer, tooltipDelay, tooltipDelayHide, tooltipDelayShow, tooltipPosition, visible; String toString; PropertyKeys(String toString) { this.toString = toString; } PropertyKeys() { } | /**
* Manage EL-expression for snake-case attributes
*/ | Manage EL-expression for snake-case attributes | setValueExpression | {
"repo_name": "asterd/BootsFaces-OSP",
"path": "src/main/java/net/bootsfaces/component/button/Button.java",
"license": "apache-2.0",
"size": 40275
} | [
"javax.el.ValueExpression",
"net.bootsfaces.utils.BsfUtils"
] | import javax.el.ValueExpression; import net.bootsfaces.utils.BsfUtils; | import javax.el.*; import net.bootsfaces.utils.*; | [
"javax.el",
"net.bootsfaces.utils"
] | javax.el; net.bootsfaces.utils; | 2,842,983 |
public void runInBackground(ISchedulingRule rule, Object jobFamily) {
if (jobFamily == null) {
runInBackground(rule, (Object[]) null);
} else {
runInBackground(rule, new Object[] { jobFamily });
}
} | void function(ISchedulingRule rule, Object jobFamily) { if (jobFamily == null) { runInBackground(rule, (Object[]) null); } else { runInBackground(rule, new Object[] { jobFamily }); } } | /**
* Run the action in the background rather than with the progress dialog.
*
* @param rule
* The rule to apply to the background job or <code>null</code>
* if there isn't one.
* @param jobFamily
* a single family that the job should belong to or
* <code>null</code> if none.
*
* @since 3.1
*/ | Run the action in the background rather than with the progress dialog | runInBackground | {
"repo_name": "gama-platform/gama.cloud",
"path": "cict.gama.web.wrapper/src/org/eclipse/ui/actions/WorkspaceAction.java",
"license": "agpl-3.0",
"size": 15473
} | [
"org.eclipse.core.runtime.jobs.ISchedulingRule"
] | import org.eclipse.core.runtime.jobs.ISchedulingRule; | import org.eclipse.core.runtime.jobs.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 19,143 |
return tileColors.get(tile.getType());
}
static {
tileColors = new HashMap<TileType, QColor>();
tileColors.put(TileType.BBSTERM, QColor.darkGray);
tileColors.put(TileType.BBTERM, QColor.darkGray);
tileColors.put(TileType.BCLKTERM012, QColor.darkGray);
tileColors.put(TileType.BCLKTERM123, QColor.darkGray);
tileColors.put(TileType.BCLKTERM2, QColor.darkGray);
tileColors.put(TileType.BCLKTERM3, QColor.darkGray);
tileColors.put(TileType.BGCLKVTERM, QColor.darkGray);
tileColors.put(TileType.BGIGABIT, QColor.black);
tileColors.put(TileType.BGIGABIT10, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT0, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT1, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT2, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT3, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT4, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT5, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT6, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT7, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT8, QColor.black);
tileColors.put(TileType.BGIGABIT10_INT_TERM, QColor.black);
tileColors.put(TileType.BGIGABIT10_IOI_TERM, QColor.black);
tileColors.put(TileType.BGIGABIT10_TERM, QColor.black);
tileColors.put(TileType.BGIGABIT_INT0, QColor.black);
tileColors.put(TileType.BGIGABIT_INT1, QColor.black);
tileColors.put(TileType.BGIGABIT_INT2, QColor.black);
tileColors.put(TileType.BGIGABIT_INT3, QColor.black);
tileColors.put(TileType.BGIGABIT_INT4, QColor.black);
tileColors.put(TileType.BGIGABIT_INT_TERM, QColor.black);
tileColors.put(TileType.BGIGABIT_IOI_TERM, QColor.black);
tileColors.put(TileType.BGIGABIT_TERM, QColor.black);
tileColors.put(TileType.BIBUFS, QColor.darkGreen);
tileColors.put(TileType.BIOB, QColor.darkGreen);
tileColors.put(TileType.BIOB_SINGLE, QColor.darkGreen);
tileColors.put(TileType.BIOB_SINGLE_ALT, QColor.darkGreen);
tileColors.put(TileType.BIOIB, QColor.darkGreen);
tileColors.put(TileType.BIOIS, QColor.darkGreen);
tileColors.put(TileType.BIOI_INNER, QColor.darkGreen);
tileColors.put(TileType.BIOI_INNER_UNUSED, QColor.darkGreen);
tileColors.put(TileType.BIOI_OUTER, QColor.darkGreen);
tileColors.put(TileType.BIOI_OUTER_UNUSED, QColor.darkGreen);
tileColors.put(TileType.BL_DLLIOB, QColor.darkGreen);
tileColors.put(TileType.BOT, QColor.darkGreen);
tileColors.put(TileType.BPPC_X0Y0_INT, QColor.black);
tileColors.put(TileType.BPPC_X1Y0_INT, QColor.black);
tileColors.put(TileType.BRAM, QColor.darkMagenta);
tileColors.put(TileType.BRAM0, QColor.darkMagenta);
tileColors.put(TileType.BRAM0_SMALL, QColor.darkMagenta);
tileColors.put(TileType.BRAM0_SMALL_BOT, QColor.darkMagenta);
tileColors.put(TileType.BRAM1, QColor.darkMagenta);
tileColors.put(TileType.BRAM1_SMALL, QColor.darkMagenta);
tileColors.put(TileType.BRAM2, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_DN_GCLKH_FEEDTHRU, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_DN_GCLKH_FEEDTHRUA, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_FEEDTHRU, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_FEEDTHRUH, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_FEEDTHRUH_50A, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_FEEDTHRU_BRK, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_GCLKH_FEEDTHRU, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_GCLKH_FEEDTHRUA, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_MID_GCLKH_FEEDTHRU, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_MID_GCLKH_FEEDTHRUA, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_SMALL, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_UP_GCLKH_FEEDTHRU, QColor.darkMagenta);
tileColors.put(TileType.BRAM2_UP_GCLKH_FEEDTHRUA, QColor.darkMagenta);
tileColors.put(TileType.BRAM3, QColor.darkMagenta);
tileColors.put(TileType.BRAM3_SMALL, QColor.darkMagenta);
tileColors.put(TileType.BRAM3_SMALL_BRK, QColor.darkMagenta);
tileColors.put(TileType.BRAM3_SMALL_TOP, QColor.darkMagenta);
tileColors.put(TileType.BRAMS2E_BOT_NOGCLK, QColor.darkMagenta);
tileColors.put(TileType.BRAMS2E_CLKH, QColor.darkMagenta);
tileColors.put(TileType.BRAMS2E_TOP_NOGCLK, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2H, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2H_50A, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_3M, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_3M_BOT, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_3M_BRK, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_3M_TOP, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_BOT, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_BRK, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_DN_GCLKH, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_DUMMY, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_GCLKH, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_MID_GCLKH, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_TOP, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE2_UP_GCLKH, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITEH, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_GCLKH, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_IOIS, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_PPC_X0Y0_INT, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_PPC_X1Y0_INT, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_PTERMB, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_PTERMT, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_RPPC_X0Y0_INT, QColor.darkMagenta);
tileColors.put(TileType.BRAMSITE_RPPC_X1Y0_INT, QColor.darkMagenta);
tileColors.put(TileType.BRAM_BOT, QColor.darkMagenta);
tileColors.put(TileType.BRAM_BOT_BTERM_L, QColor.darkMagenta);
tileColors.put(TileType.BRAM_BOT_BTERM_R, QColor.darkMagenta);
tileColors.put(TileType.BRAM_BOT_GCLK, QColor.darkMagenta);
tileColors.put(TileType.BRAM_BOT_NOGCLK, QColor.darkMagenta);
tileColors.put(TileType.BRAM_CLKH, QColor.darkRed);
tileColors.put(TileType.BRAM_HCLK_FEEDTHRU, QColor.cyan);
tileColors.put(TileType.BRAM_HCLK_FEEDTHRU_FOLD, QColor.cyan);
tileColors.put(TileType.BRAM_HCLK_FEEDTHRU_INTER, QColor.cyan);
tileColors.put(TileType.BRAM_HCLK_FEEDTHRU_INTER_FOLD, QColor.cyan);
tileColors.put(TileType.BRAM_INTER_BTERM, QColor.darkMagenta);
tileColors.put(TileType.BRAM_INTER_TTERM, QColor.darkMagenta);
tileColors.put(TileType.BRAM_INT_INTERFACE_BOT, QColor.darkMagenta);
tileColors.put(TileType.BRAM_INT_INTERFACE_TOP, QColor.darkMagenta);
tileColors.put(TileType.BRAM_IOIS, QColor.darkMagenta);
tileColors.put(TileType.BRAM_IOIS_NODCM, QColor.darkMagenta);
tileColors.put(TileType.BRAM_REGH_FEEDTHRU, QColor.darkMagenta);
tileColors.put(TileType.BRAM_REGH_FEEDTHRU_INTER, QColor.darkMagenta);
tileColors.put(TileType.BRAM_TOP, QColor.darkMagenta);
tileColors.put(TileType.BRAM_TOP_GCLK, QColor.darkMagenta);
tileColors.put(TileType.BRAM_TOP_NOGCLK, QColor.darkMagenta);
tileColors.put(TileType.BRAM_TOP_TTERM_L, QColor.darkMagenta);
tileColors.put(TileType.BRAM_TOP_TTERM_R, QColor.darkMagenta);
tileColors.put(TileType.BRKH, QColor.darkBlue);
tileColors.put(TileType.BRKH_BRAM, QColor.darkBlue);
tileColors.put(TileType.BRKH_BUFGCTRL, QColor.darkBlue);
tileColors.put(TileType.BRKH_B_TERM_INT, QColor.darkBlue);
tileColors.put(TileType.BRKH_CLB, QColor.darkBlue);
tileColors.put(TileType.BRKH_CMT, QColor.darkBlue);
tileColors.put(TileType.BRKH_DCM, QColor.darkBlue);
tileColors.put(TileType.BRKH_DSP, QColor.darkBlue);
tileColors.put(TileType.BRKH_DUMMY, QColor.darkBlue);
tileColors.put(TileType.BRKH_GT3, QColor.darkBlue);
tileColors.put(TileType.BRKH_GTH, QColor.darkBlue);
tileColors.put(TileType.BRKH_GTX, QColor.darkBlue);
tileColors.put(TileType.BRKH_GTX_EMP, QColor.darkBlue);
tileColors.put(TileType.BRKH_GTX_L, QColor.darkBlue);
tileColors.put(TileType.BRKH_GTX_LEFT, QColor.darkBlue);
tileColors.put(TileType.BRKH_INT, QColor.darkBlue);
tileColors.put(TileType.BRKH_INT_INTERFACE, QColor.darkBlue);
tileColors.put(TileType.BRKH_IOB, QColor.darkBlue);
tileColors.put(TileType.BRKH_IOI, QColor.darkBlue);
tileColors.put(TileType.BRKH_IOIS, QColor.darkBlue);
tileColors.put(TileType.BRKH_MGT, QColor.darkBlue);
tileColors.put(TileType.BRKH_MGT11CLK_L, QColor.darkBlue);
tileColors.put(TileType.BRKH_MGT11CLK_R, QColor.darkBlue);
tileColors.put(TileType.BRKH_MGT_R, QColor.darkBlue);
tileColors.put(TileType.BRKH_PPC, QColor.darkBlue);
tileColors.put(TileType.BRKH_T_TERM_INT, QColor.darkBlue);
tileColors.put(TileType.BRKH_VBRK, QColor.darkBlue);
tileColors.put(TileType.BR_DLLIOB, QColor.darkGreen);
tileColors.put(TileType.BTERM, QColor.darkGray);
tileColors.put(TileType.BTERM010, QColor.darkGray);
tileColors.put(TileType.BTERM012, QColor.darkGray);
tileColors.put(TileType.BTERM1, QColor.darkGray);
tileColors.put(TileType.BTERM123, QColor.darkGray);
tileColors.put(TileType.BTERM1_MACC, QColor.darkGray);
tileColors.put(TileType.BTERM2, QColor.darkGray);
tileColors.put(TileType.BTERM2CLK, QColor.darkGray);
tileColors.put(TileType.BTERM3, QColor.darkGray);
tileColors.put(TileType.BTERM323, QColor.darkGray);
tileColors.put(TileType.BTERM4, QColor.darkGray);
tileColors.put(TileType.BTERM4CLK, QColor.darkGray);
tileColors.put(TileType.BTERM4_BRAM2, QColor.darkGray);
tileColors.put(TileType.BTERMCLK, QColor.darkGray);
tileColors.put(TileType.BTERMCLKA, QColor.darkGray);
tileColors.put(TileType.BTERMCLKB, QColor.darkGray);
tileColors.put(TileType.BTTERM, QColor.darkGray);
tileColors.put(TileType.B_TERM_DSP, QColor.darkGray);
tileColors.put(TileType.B_TERM_INT, QColor.darkGray);
tileColors.put(TileType.B_TERM_INT_D, QColor.darkGray);
tileColors.put(TileType.CCM, QColor.black);
tileColors.put(TileType.CENTER, QColor.blue);
tileColors.put(TileType.CENTER_SMALL, QColor.blue);
tileColors.put(TileType.CENTER_SMALL_BRK, QColor.blue);
tileColors.put(TileType.CENTER_SPACE1, QColor.blue);
tileColors.put(TileType.CENTER_SPACE2, QColor.blue);
tileColors.put(TileType.CENTER_SPACE_HCLK1, QColor.blue);
tileColors.put(TileType.CENTER_SPACE_HCLK2, QColor.blue);
tileColors.put(TileType.CFG_CENTER, QColor.darkBlue);
tileColors.put(TileType.CFG_CENTER_0, QColor.darkBlue);
tileColors.put(TileType.CFG_CENTER_1, QColor.darkBlue);
tileColors.put(TileType.CFG_CENTER_2, QColor.darkBlue);
tileColors.put(TileType.CFG_CENTER_3, QColor.darkBlue);
tileColors.put(TileType.CFG_HCLK_INTERFACE, QColor.cyan);
tileColors.put(TileType.CFG_PPC_DL_BUFS, QColor.darkBlue);
tileColors.put(TileType.CFG_PPC_R_VBRK, QColor.darkBlue);
tileColors.put(TileType.CFG_PPC_VBRK, QColor.darkBlue);
tileColors.put(TileType.CFG_VBRK, QColor.darkBlue);
tileColors.put(TileType.CFG_VBRK_FRAME, QColor.darkBlue);
tileColors.put(TileType.CIOB, QColor.darkGreen);
tileColors.put(TileType.CLB, QColor.blue);
tileColors.put(TileType.CLBLL, QColor.blue);
tileColors.put(TileType.CLBLM, QColor.blue);
tileColors.put(TileType.CLB_BUFFER, QColor.blue);
tileColors.put(TileType.CLB_EMP_BTERM, QColor.blue);
tileColors.put(TileType.CLB_INT_BTERM, QColor.blue);
tileColors.put(TileType.CLEXL, QColor.blue);
tileColors.put(TileType.CLEXL_DUMMY, QColor.blue);
tileColors.put(TileType.CLEXM, QColor.blue);
tileColors.put(TileType.CLEXM_DUMMY, QColor.blue);
tileColors.put(TileType.CLKB, QColor.darkRed);
tileColors.put(TileType.CLKB_2DLL, QColor.darkRed);
tileColors.put(TileType.CLKB_4DLL, QColor.darkRed);
tileColors.put(TileType.CLKB_LL, QColor.darkRed);
tileColors.put(TileType.CLKC, QColor.darkRed);
tileColors.put(TileType.CLKC_50A, QColor.darkRed);
tileColors.put(TileType.CLKC_LL, QColor.darkRed);
tileColors.put(TileType.CLKH, QColor.darkRed);
tileColors.put(TileType.CLKH_50A, QColor.darkRed);
tileColors.put(TileType.CLKH_DCM_CC, QColor.darkRed);
tileColors.put(TileType.CLKH_DCM_FT, QColor.darkRed);
tileColors.put(TileType.CLKH_DCM_LL, QColor.darkRed);
tileColors.put(TileType.CLKH_LL, QColor.darkRed);
tileColors.put(TileType.CLKL, QColor.darkRed);
tileColors.put(TileType.CLKLH_DCM, QColor.darkRed);
tileColors.put(TileType.CLKLH_DCM_LL, QColor.darkRed);
tileColors.put(TileType.CLKL_IOIS, QColor.darkRed);
tileColors.put(TileType.CLKL_IOIS_50A, QColor.darkRed);
tileColors.put(TileType.CLKL_IOIS_LL, QColor.darkRed);
tileColors.put(TileType.CLKR, QColor.darkRed);
tileColors.put(TileType.CLKRH_DCM, QColor.darkRed);
tileColors.put(TileType.CLKRH_DCM_LL, QColor.darkRed);
tileColors.put(TileType.CLKR_IOIS, QColor.darkRed);
tileColors.put(TileType.CLKR_IOIS_50A, QColor.darkRed);
tileColors.put(TileType.CLKR_IOIS_LL, QColor.darkRed);
tileColors.put(TileType.CLKT, QColor.darkRed);
tileColors.put(TileType.CLKT_2DLL, QColor.darkRed);
tileColors.put(TileType.CLKT_4DLL, QColor.darkRed);
tileColors.put(TileType.CLKT_LL, QColor.darkRed);
tileColors.put(TileType.CLKV, QColor.darkRed);
tileColors.put(TileType.CLKVC, QColor.darkRed);
tileColors.put(TileType.CLKVCU1, QColor.darkRed);
tileColors.put(TileType.CLKVCU2, QColor.darkRed);
tileColors.put(TileType.CLKVC_LL, QColor.darkRed);
tileColors.put(TileType.CLKVD1, QColor.darkRed);
tileColors.put(TileType.CLKVD2, QColor.darkRed);
tileColors.put(TileType.CLKVU1, QColor.darkRed);
tileColors.put(TileType.CLKVU2, QColor.darkRed);
tileColors.put(TileType.CLKV_DCM, QColor.darkRed);
tileColors.put(TileType.CLKV_DCM_B, QColor.darkRed);
tileColors.put(TileType.CLKV_DCM_LL, QColor.darkRed);
tileColors.put(TileType.CLKV_DCM_T, QColor.darkRed);
tileColors.put(TileType.CLKV_LL, QColor.darkRed);
tileColors.put(TileType.CLKV_MC, QColor.darkRed);
tileColors.put(TileType.CLK_BUFGCTRL_B, QColor.darkRed);
tileColors.put(TileType.CLK_BUFGCTRL_T, QColor.darkRed);
tileColors.put(TileType.CLK_BUFGMUX, QColor.darkRed);
tileColors.put(TileType.CLK_CMT_BOT, QColor.darkRed);
tileColors.put(TileType.CLK_CMT_BOT_MGT, QColor.darkRed);
tileColors.put(TileType.CLK_CMT_TOP, QColor.darkRed);
tileColors.put(TileType.CLK_CMT_TOP_MGT, QColor.darkRed);
tileColors.put(TileType.CLK_HROW, QColor.darkRed);
tileColors.put(TileType.CLK_HROW_MGT, QColor.darkRed);
tileColors.put(TileType.CLK_IOB_B, QColor.darkRed);
tileColors.put(TileType.CLK_IOB_T, QColor.darkRed);
tileColors.put(TileType.CLK_MGT_BOT, QColor.darkRed);
tileColors.put(TileType.CLK_MGT_BOT_MGT, QColor.darkRed);
tileColors.put(TileType.CLK_MGT_TOP, QColor.darkRed);
tileColors.put(TileType.CLK_MGT_TOP_MGT, QColor.darkRed);
tileColors.put(TileType.CLK_TERM_B, QColor.darkRed);
tileColors.put(TileType.CLK_TERM_BOT, QColor.darkRed);
tileColors.put(TileType.CLK_TERM_T, QColor.darkRed);
tileColors.put(TileType.CLK_TERM_TOP, QColor.darkRed);
tileColors.put(TileType.CMT_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_BUFG_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_BUFG_TOP, QColor.darkRed);
tileColors.put(TileType.CMT_CAP, QColor.darkRed);
tileColors.put(TileType.CMT_DCM2_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_DCM2_TOP, QColor.darkRed);
tileColors.put(TileType.CMT_DCM_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_DCM_TOP, QColor.darkRed);
tileColors.put(TileType.CMT_HCLK_BOT25, QColor.darkRed);
tileColors.put(TileType.CMT_PLL1_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_PLL2_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_PLL2_TOP, QColor.darkRed);
tileColors.put(TileType.CMT_PLL3_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_PLL3_TOP, QColor.darkRed);
tileColors.put(TileType.CMT_PLL_BOT, QColor.darkRed);
tileColors.put(TileType.CMT_PLL_TOP, QColor.darkRed);
tileColors.put(TileType.CMT_PMVA, QColor.darkRed);
tileColors.put(TileType.CMT_PMVA_BELOW, QColor.darkRed);
tileColors.put(TileType.CMT_PMVB, QColor.darkRed);
tileColors.put(TileType.CMT_PMVB_BUF_ABOVE, QColor.darkRed);
tileColors.put(TileType.CMT_PMVB_BUF_BELOW, QColor.darkRed);
tileColors.put(TileType.CMT_TOP, QColor.darkRed);
tileColors.put(TileType.CNR_BR_BTERM, QColor.darkGray);
tileColors.put(TileType.CNR_BTERM, QColor.darkGray);
tileColors.put(TileType.CNR_LBTERM, QColor.darkGray);
tileColors.put(TileType.CNR_LTERM, QColor.darkGray);
tileColors.put(TileType.CNR_LTTERM, QColor.darkGray);
tileColors.put(TileType.CNR_RBTERM, QColor.darkGray);
tileColors.put(TileType.CNR_RTERM, QColor.darkGray);
tileColors.put(TileType.CNR_RTTERM, QColor.darkGray);
tileColors.put(TileType.CNR_TL_LTERM, QColor.darkGray);
tileColors.put(TileType.CNR_TR_RTERM, QColor.darkGray);
tileColors.put(TileType.CNR_TR_TTERM, QColor.darkGray);
tileColors.put(TileType.CNR_TTERM, QColor.darkGray);
tileColors.put(TileType.COB_NO_TERM, QColor.darkGray);
tileColors.put(TileType.COB_TERM_B, QColor.darkGray);
tileColors.put(TileType.COB_TERM_T, QColor.darkGray);
tileColors.put(TileType.DCM, QColor.darkRed);
tileColors.put(TileType.DCMAUX_BL_CENTER, QColor.darkRed);
tileColors.put(TileType.DCMAUX_TL_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_BGAP, QColor.darkRed);
tileColors.put(TileType.DCM_BL_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_BL_TERM, QColor.darkRed);
tileColors.put(TileType.DCM_BOT, QColor.darkRed);
tileColors.put(TileType.DCM_BR_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_H_BL_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_H_BR_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_H_BR_TERM, QColor.darkRed);
tileColors.put(TileType.DCM_H_TL_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_H_TR_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_H_TR_TERM, QColor.darkRed);
tileColors.put(TileType.DCM_SPLY, QColor.darkRed);
tileColors.put(TileType.DCM_TERM, QColor.darkRed);
tileColors.put(TileType.DCM_TERM_MULT, QColor.darkRed);
tileColors.put(TileType.DCM_TERM_NOMEM, QColor.darkRed);
tileColors.put(TileType.DCM_TL_CENTER, QColor.darkRed);
tileColors.put(TileType.DCM_TL_TERM, QColor.darkRed);
tileColors.put(TileType.DCM_TR_CENTER, QColor.darkRed);
tileColors.put(TileType.DSP, QColor.darkCyan);
tileColors.put(TileType.DSP_BOT_BTERM_L, QColor.darkCyan);
tileColors.put(TileType.DSP_BOT_BTERM_R, QColor.darkCyan);
tileColors.put(TileType.DSP_CLB_HCLK_FEEDTHRU, QColor.darkCyan);
tileColors.put(TileType.DSP_CLB_HCLK_FEEDTHRU_FOLD, QColor.darkCyan);
tileColors.put(TileType.DSP_EMP_BOT, QColor.darkCyan);
tileColors.put(TileType.DSP_EMP_TEMP, QColor.darkCyan);
tileColors.put(TileType.DSP_EMP_TOP, QColor.darkCyan);
tileColors.put(TileType.DSP_HCLK_FEEDTHRU_TOP, QColor.cyan);
tileColors.put(TileType.DSP_HCLK_GCLK_FOLD, QColor.cyan);
tileColors.put(TileType.DSP_HCLK_GCLK_NOFOLD, QColor.cyan);
tileColors.put(TileType.DSP_INTER_TTERM, QColor.darkCyan);
tileColors.put(TileType.DSP_INT_BTERM, QColor.darkCyan);
tileColors.put(TileType.DSP_INT_EMP_BOT, QColor.darkCyan);
tileColors.put(TileType.DSP_INT_EMP_TOP, QColor.darkCyan);
tileColors.put(TileType.DSP_INT_HCLK_FEEDTHRU, QColor.cyan);
tileColors.put(TileType.DSP_INT_HCLK_FEEDTHRU_FOLD, QColor.darkCyan);
tileColors.put(TileType.DSP_INT_TTERM, QColor.darkCyan);
tileColors.put(TileType.DSP_TOP_TTERM_L, QColor.darkCyan);
tileColors.put(TileType.DSP_TOP_TTERM_R, QColor.darkCyan);
tileColors.put(TileType.EMAC, QColor.black);
tileColors.put(TileType.EMAC_DUMMY, QColor.black);
tileColors.put(TileType.EMAC_INT_INTERFACE, QColor.black);
tileColors.put(TileType.EMPTY, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY0X2, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY0X22, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY0X3, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY0X4, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY0X64, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY16X2, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY16X4, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY64X76, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY80X22, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY80X64, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_BIOI, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_BRAM, QColor.black);
tileColors.put(TileType.EMPTY_BRAM_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_BRKH, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_BTERM, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CCM, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CFG_CENTER, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLB, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLB_BUFFER, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKC, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKC_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKC_LLTB, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKH_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKL_IOIS_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKL_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKR_IOIS_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKR_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLKV_DCM, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLK_BUFGCTRL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CLK_IOB, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CNR, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_CORNER, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_DCM, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_DCM_TERM, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_DSP, QColor.black);
tileColors.put(TileType.EMPTY_EDGE_BRAM, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_EDGE_CONFIG, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_EDGE_DSP, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_EDGE_MGT, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_GCLKH, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_GCLKVML_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_GCLKVMR_LL, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_HCLK, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_HCLK_MGT, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_IOIS, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_MACC, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_MGT, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_MONITOR, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_PPC, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_TIOI, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_TTERM, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMPTY_VBRK, QColor.fromRgb(240, 141, 45));
tileColors.put(TileType.EMP_LIOB, QColor.darkGreen);
tileColors.put(TileType.EMP_RIOB, QColor.darkGreen);
tileColors.put(TileType.GBRKB, QColor.darkBlue);
tileColors.put(TileType.GBRKC, QColor.darkBlue);
tileColors.put(TileType.GBRKT, QColor.darkBlue);
tileColors.put(TileType.GBRKV, QColor.darkBlue);
tileColors.put(TileType.GCLKB, QColor.darkBlue);
tileColors.put(TileType.GCLKC, QColor.darkBlue);
tileColors.put(TileType.GCLKH, QColor.darkBlue);
tileColors.put(TileType.GCLKHL_50A, QColor.darkBlue);
tileColors.put(TileType.GCLKHR_50A, QColor.darkBlue);
tileColors.put(TileType.GCLKH_PCI_CE_N, QColor.darkBlue);
tileColors.put(TileType.GCLKH_PCI_CE_S, QColor.darkBlue);
tileColors.put(TileType.GCLKH_PCI_CE_S_50A, QColor.darkBlue);
tileColors.put(TileType.GCLKT, QColor.darkBlue);
tileColors.put(TileType.GCLKV, QColor.darkBlue);
tileColors.put(TileType.GCLKVC, QColor.darkBlue);
tileColors.put(TileType.GCLKVM, QColor.darkBlue);
tileColors.put(TileType.GCLKVML, QColor.darkBlue);
tileColors.put(TileType.GCLKVMR, QColor.darkBlue);
tileColors.put(TileType.GCLKV_IOIS, QColor.darkBlue);
tileColors.put(TileType.GCLKV_IOISL, QColor.darkBlue);
tileColors.put(TileType.GCLKV_IOISR, QColor.darkBlue);
tileColors.put(TileType.GIGABIT10_IOI, QColor.black);
tileColors.put(TileType.GIGABIT_IOI, QColor.black);
tileColors.put(TileType.GT3, QColor.black);
tileColors.put(TileType.GTH_BOT, QColor.black);
tileColors.put(TileType.GTH_L_BOT, QColor.black);
tileColors.put(TileType.GTH_L_TOP, QColor.black);
tileColors.put(TileType.GTH_TOP, QColor.black);
tileColors.put(TileType.GTPDUAL_BOT, QColor.black);
tileColors.put(TileType.GTPDUAL_BOT_UNUSED, QColor.black);
tileColors.put(TileType.GTPDUAL_CLB_FEEDTHRU, QColor.black);
tileColors.put(TileType.GTPDUAL_DSP_FEEDTHRU, QColor.black);
tileColors.put(TileType.GTPDUAL_INT_FEEDTHRU, QColor.black);
tileColors.put(TileType.GTPDUAL_LEFT_CLB_FEEDTHRU, QColor.black);
tileColors.put(TileType.GTPDUAL_LEFT_DSP_FEEDTHRU, QColor.black);
tileColors.put(TileType.GTPDUAL_LEFT_INT_FEEDTHRU, QColor.black);
tileColors.put(TileType.GTPDUAL_TOP, QColor.black);
tileColors.put(TileType.GTPDUAL_TOP_UNUSED, QColor.black);
tileColors.put(TileType.GTP_INT_INTERFACE, QColor.black);
tileColors.put(TileType.GTX, QColor.black);
tileColors.put(TileType.GTX_DUMMY, QColor.black);
tileColors.put(TileType.GTX_INT_INTERFACE, QColor.black);
tileColors.put(TileType.GTX_LEFT, QColor.black);
tileColors.put(TileType.GTX_LEFT_INT_INTERFACE, QColor.black);
tileColors.put(TileType.GTX_L_TERM_INT, QColor.black);
tileColors.put(TileType.GT_INT_INTERFACE_TERM, QColor.black);
tileColors.put(TileType.GT_L_INT_INTERFACE, QColor.black);
tileColors.put(TileType.HCLK, QColor.cyan);
tileColors.put(TileType.HCLK_BRAM, QColor.cyan);
tileColors.put(TileType.HCLK_BRAM_FEEDTHRU, QColor.cyan);
tileColors.put(TileType.HCLK_BRAM_FEEDTHRU_FOLD, QColor.cyan);
tileColors.put(TileType.HCLK_BRAM_FX, QColor.cyan);
tileColors.put(TileType.HCLK_BRAM_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_BRAM_MGT_LEFT, QColor.cyan);
tileColors.put(TileType.HCLK_CENTER, QColor.cyan);
tileColors.put(TileType.HCLK_CENTER_ABOVE_CFG, QColor.cyan);
tileColors.put(TileType.HCLK_CLB, QColor.cyan);
tileColors.put(TileType.HCLK_CLBLL, QColor.cyan);
tileColors.put(TileType.HCLK_CLBLM, QColor.cyan);
tileColors.put(TileType.HCLK_CLBLM_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_CLBLM_MGT_LEFT, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XL_CLE, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XL_CLE_FOLD, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XL_INT, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XL_INT_FOLD, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XM_CLE, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XM_CLE_FOLD, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XM_INT, QColor.cyan);
tileColors.put(TileType.HCLK_CLB_XM_INT_FOLD, QColor.cyan);
tileColors.put(TileType.HCLK_CMT_BOT, QColor.cyan);
tileColors.put(TileType.HCLK_CMT_CMT, QColor.cyan);
tileColors.put(TileType.HCLK_CMT_CMT_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_CMT_IOI, QColor.cyan);
tileColors.put(TileType.HCLK_CMT_TOP, QColor.cyan);
tileColors.put(TileType.HCLK_DCM, QColor.cyan);
tileColors.put(TileType.HCLK_DCMIOB, QColor.cyan);
tileColors.put(TileType.HCLK_DSP, QColor.cyan);
tileColors.put(TileType.HCLK_FT, QColor.cyan);
tileColors.put(TileType.HCLK_GT3, QColor.cyan);
tileColors.put(TileType.HCLK_GTH, QColor.cyan);
tileColors.put(TileType.HCLK_GTH_LEFT, QColor.cyan);
tileColors.put(TileType.HCLK_GTX, QColor.cyan);
tileColors.put(TileType.HCLK_GTX_DUMMY, QColor.cyan);
tileColors.put(TileType.HCLK_GTX_LEFT, QColor.cyan);
tileColors.put(TileType.HCLK_GT_EMP, QColor.cyan);
tileColors.put(TileType.HCLK_INNER_IOI, QColor.cyan);
tileColors.put(TileType.HCLK_INT_INTERFACE, QColor.cyan);
tileColors.put(TileType.HCLK_IOB, QColor.cyan);
tileColors.put(TileType.HCLK_IOBDCM, QColor.cyan);
tileColors.put(TileType.HCLK_IOB_CMT_BOT, QColor.cyan);
tileColors.put(TileType.HCLK_IOB_CMT_BOT_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_IOB_CMT_MID, QColor.cyan);
tileColors.put(TileType.HCLK_IOB_CMT_MID_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_IOB_CMT_TOP, QColor.cyan);
tileColors.put(TileType.HCLK_IOB_CMT_TOP_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_IOI, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_BOT_DN, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_BOT_SPLIT, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_BOT_UP, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_EMP, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_INT, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_INT_FOLD, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_TOP_DN, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_TOP_SPLIT, QColor.cyan);
tileColors.put(TileType.HCLK_IOIL_TOP_UP, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_BOT_DN, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_BOT_SPLIT, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_BOT_UP, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_EMP, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_INT, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_INT_FOLD, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_TOP_DN, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_TOP_SPLIT, QColor.cyan);
tileColors.put(TileType.HCLK_IOIR_TOP_UP, QColor.cyan);
tileColors.put(TileType.HCLK_IOIS_DCI, QColor.cyan);
tileColors.put(TileType.HCLK_IOIS_LVDS, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_BOTCEN, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_BOTCEN_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_CENTER, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_CMT, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_CMT_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_LTERM, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_LTERM_BOT25, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_RTERM, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_RTERM_BOT25, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_TOPCEN, QColor.cyan);
tileColors.put(TileType.HCLK_IOI_TOPCEN_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_LIOB, QColor.cyan);
tileColors.put(TileType.HCLK_MGT, QColor.cyan);
tileColors.put(TileType.HCLK_OUTER_IOI, QColor.cyan);
tileColors.put(TileType.HCLK_PCIE_BRAM, QColor.cyan);
tileColors.put(TileType.HCLK_PPC, QColor.cyan);
tileColors.put(TileType.HCLK_PPC_TERM, QColor.cyan);
tileColors.put(TileType.HCLK_QBUF_L, QColor.cyan);
tileColors.put(TileType.HCLK_QBUF_R, QColor.cyan);
tileColors.put(TileType.HCLK_TERM, QColor.cyan);
tileColors.put(TileType.HCLK_TERM_L, QColor.cyan);
tileColors.put(TileType.HCLK_TERM_R, QColor.cyan);
tileColors.put(TileType.HCLK_VBRK, QColor.cyan);
tileColors.put(TileType.HCLK_VBRK_R, QColor.cyan);
tileColors.put(TileType.HCLK_VFRAME, QColor.cyan);
tileColors.put(TileType.INT, QColor.darkYellow);
tileColors.put(TileType.INT_BRAM, QColor.darkYellow);
tileColors.put(TileType.INT_BRAM_BRK, QColor.darkYellow);
tileColors.put(TileType.INT_BRK, QColor.darkYellow);
tileColors.put(TileType.INT_BUFS_L, QColor.darkYellow);
tileColors.put(TileType.INT_BUFS_R, QColor.darkYellow);
tileColors.put(TileType.INT_BUFS_R_MON, QColor.darkYellow);
tileColors.put(TileType.INT_GCLK, QColor.darkYellow);
tileColors.put(TileType.INT_HCLK_BUFS, QColor.cyan);
tileColors.put(TileType.INT_INTERFACE, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_CARRY, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_IOI, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_IOI_DCMBOT, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_LTERM, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_REGC, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_RTERM, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_TERM, QColor.darkYellow);
tileColors.put(TileType.INT_LTERM, QColor.darkYellow);
tileColors.put(TileType.INT_RTERM, QColor.darkYellow);
tileColors.put(TileType.INT_SO, QColor.darkYellow);
tileColors.put(TileType.INT_SO_DCM0, QColor.darkYellow);
tileColors.put(TileType.INT_TERM, QColor.darkYellow);
tileColors.put(TileType.INT_TERM_BRK, QColor.darkYellow);
tileColors.put(TileType.IOI, QColor.darkGreen);
tileColors.put(TileType.IOIS_LC, QColor.darkGreen);
tileColors.put(TileType.IOIS_LC_L, QColor.darkGreen);
tileColors.put(TileType.IOIS_NC, QColor.darkGreen);
tileColors.put(TileType.IOIS_NC_L, QColor.darkGreen);
tileColors.put(TileType.IOI_BTERM, QColor.darkGreen);
tileColors.put(TileType.IOI_BTERM_BUFPLL, QColor.darkGreen);
tileColors.put(TileType.IOI_BTERM_CLB, QColor.darkGreen);
tileColors.put(TileType.IOI_BTERM_REGB, QColor.darkGreen);
tileColors.put(TileType.IOI_INT, QColor.darkYellow);
tileColors.put(TileType.IOI_LTERM, QColor.darkGreen);
tileColors.put(TileType.IOI_LTERM_LOWER_BOT, QColor.darkGreen);
tileColors.put(TileType.IOI_LTERM_LOWER_TOP, QColor.darkGreen);
tileColors.put(TileType.IOI_LTERM_UPPER_BOT, QColor.darkGreen);
tileColors.put(TileType.IOI_LTERM_UPPER_TOP, QColor.darkGreen);
tileColors.put(TileType.IOI_L_INT_INTERFACE, QColor.darkGreen);
tileColors.put(TileType.IOI_L_INT_INTERFACE_TERM, QColor.darkGreen);
tileColors.put(TileType.IOI_PCI_CE_LEFT, QColor.darkGreen);
tileColors.put(TileType.IOI_PCI_CE_RIGHT, QColor.darkGreen);
tileColors.put(TileType.IOI_RTERM, QColor.darkGreen);
tileColors.put(TileType.IOI_RTERM_LOWER_BOT, QColor.darkGreen);
tileColors.put(TileType.IOI_RTERM_LOWER_TOP, QColor.darkGreen);
tileColors.put(TileType.IOI_RTERM_UPPER_BOT, QColor.darkGreen);
tileColors.put(TileType.IOI_RTERM_UPPER_TOP, QColor.darkGreen);
tileColors.put(TileType.IOI_TTERM, QColor.darkGreen);
tileColors.put(TileType.IOI_TTERM_BUFPLL, QColor.darkGreen);
tileColors.put(TileType.IOI_TTERM_CLB, QColor.darkGreen);
tileColors.put(TileType.IOI_TTERM_REGT, QColor.darkGreen);
tileColors.put(TileType.LBPPC, QColor.black);
tileColors.put(TileType.LBRAM, QColor.darkMagenta);
tileColors.put(TileType.LBRAMS2E_BOTP, QColor.darkMagenta);
tileColors.put(TileType.LBRAMS2E_TOPP, QColor.darkMagenta);
tileColors.put(TileType.LBRAM_BOTP, QColor.darkMagenta);
tileColors.put(TileType.LBRAM_BOTS, QColor.darkMagenta);
tileColors.put(TileType.LBRAM_BOTS_GCLK, QColor.darkMagenta);
tileColors.put(TileType.LBRAM_TOPP, QColor.darkMagenta);
tileColors.put(TileType.LBRAM_TOPS, QColor.darkMagenta);
tileColors.put(TileType.LBRAM_TOPS_GCLK, QColor.darkMagenta);
tileColors.put(TileType.LEFT, QColor.darkGreen);
tileColors.put(TileType.LEFT_PCI_BOT, QColor.darkBlue);
tileColors.put(TileType.LEFT_PCI_TOP, QColor.darkBlue);
tileColors.put(TileType.LEMPTY0X2, QColor.black);
tileColors.put(TileType.LEMPTY16X4, QColor.black);
tileColors.put(TileType.LIBUFS, QColor.darkGreen);
tileColors.put(TileType.LIBUFS_CLK_PCI, QColor.darkGreen);
tileColors.put(TileType.LIBUFS_PCI, QColor.darkGreen);
tileColors.put(TileType.LIOB, QColor.darkGreen);
tileColors.put(TileType.LIOB_FT, QColor.darkGreen);
tileColors.put(TileType.LIOB_MON, QColor.darkGreen);
tileColors.put(TileType.LIOB_PCI, QColor.darkGreen);
tileColors.put(TileType.LIOB_RDY, QColor.darkGreen);
tileColors.put(TileType.LIOI, QColor.darkGreen);
tileColors.put(TileType.LIOIS, QColor.darkGreen);
tileColors.put(TileType.LIOIS_BRK, QColor.darkGreen);
tileColors.put(TileType.LIOIS_CLK_PCI, QColor.darkGreen);
tileColors.put(TileType.LIOIS_CLK_PCI_BRK, QColor.darkGreen);
tileColors.put(TileType.LIOIS_PCI, QColor.darkGreen);
tileColors.put(TileType.LIOI_BRK, QColor.darkGreen);
tileColors.put(TileType.LIOI_INT, QColor.darkYellow);
tileColors.put(TileType.LIOI_INT_BRK, QColor.darkYellow);
tileColors.put(TileType.LL, QColor.black);
tileColors.put(TileType.LLPPC_X0Y0_INT, QColor.black);
tileColors.put(TileType.LLPPC_X1Y0_INT, QColor.black);
tileColors.put(TileType.LPPC_X0Y0_INT, QColor.black);
tileColors.put(TileType.LPPC_X1Y0_INT, QColor.black);
tileColors.put(TileType.LR, QColor.black);
tileColors.put(TileType.LR_BRKH, QColor.black);
tileColors.put(TileType.LR_CLKH, QColor.black);
tileColors.put(TileType.LR_GCLKH, QColor.black);
tileColors.put(TileType.LR_IOIS, QColor.darkGreen);
tileColors.put(TileType.LR_LOWER, QColor.black);
tileColors.put(TileType.LR_UPPER, QColor.black);
tileColors.put(TileType.LTERM, QColor.darkGray);
tileColors.put(TileType.LTERM010, QColor.darkGray);
tileColors.put(TileType.LTERM1, QColor.darkGray);
tileColors.put(TileType.LTERM2, QColor.darkGray);
tileColors.put(TileType.LTERM210, QColor.darkGray);
tileColors.put(TileType.LTERM210_PCI, QColor.darkGray);
tileColors.put(TileType.LTERM3, QColor.darkGray);
tileColors.put(TileType.LTERM321, QColor.darkGray);
tileColors.put(TileType.LTERM323, QColor.darkGray);
tileColors.put(TileType.LTERM323_PCI, QColor.darkGray);
tileColors.put(TileType.LTERM4, QColor.darkGray);
tileColors.put(TileType.LTERM4B, QColor.darkGray);
tileColors.put(TileType.LTERM4CLK, QColor.darkGray);
tileColors.put(TileType.LTERMCLK, QColor.darkGray);
tileColors.put(TileType.LTERMCLKA, QColor.darkGray);
tileColors.put(TileType.L_TERM_INT, QColor.darkGray);
tileColors.put(TileType.L_TERM_PPC, QColor.darkGray);
tileColors.put(TileType.L_TERM_PPC_EXT, QColor.darkGray);
tileColors.put(TileType.MACC0_SMALL, QColor.darkCyan);
tileColors.put(TileType.MACC0_SMALL_BOT, QColor.darkCyan);
tileColors.put(TileType.MACC1_SMALL, QColor.darkCyan);
tileColors.put(TileType.MACC2_FEEDTHRUH, QColor.darkCyan);
tileColors.put(TileType.MACC2_GCLKH_FEEDTHRUA, QColor.darkCyan);
tileColors.put(TileType.MACC2_SMALL, QColor.darkCyan);
tileColors.put(TileType.MACC3_SMALL, QColor.darkCyan);
tileColors.put(TileType.MACC3_SMALL_BRK, QColor.darkCyan);
tileColors.put(TileType.MACC3_SMALL_TOP, QColor.darkCyan);
tileColors.put(TileType.MACCSITE2, QColor.darkCyan);
tileColors.put(TileType.MACCSITE2_BOT, QColor.darkCyan);
tileColors.put(TileType.MACCSITE2_BRK, QColor.darkCyan);
tileColors.put(TileType.MACCSITE2_DUMMY, QColor.darkCyan);
tileColors.put(TileType.MACCSITE2_TOP, QColor.darkCyan);
tileColors.put(TileType.MBRAM, QColor.darkMagenta);
tileColors.put(TileType.MBRAMS2E, QColor.darkMagenta);
tileColors.put(TileType.MCB_CAP_CLKPN, QColor.black);
tileColors.put(TileType.MCB_CAP_INT, QColor.black);
tileColors.put(TileType.MCB_CAP_INT_BRK, QColor.black);
tileColors.put(TileType.MCB_CNR_TOP, QColor.black);
tileColors.put(TileType.MCB_DUMMY, QColor.black);
tileColors.put(TileType.MCB_HCLK, QColor.cyan);
tileColors.put(TileType.MCB_INT, QColor.black);
tileColors.put(TileType.MCB_INT_BOT, QColor.black);
tileColors.put(TileType.MCB_INT_BOT25, QColor.black);
tileColors.put(TileType.MCB_INT_DQI, QColor.black);
tileColors.put(TileType.MCB_INT_DUMMY, QColor.black);
tileColors.put(TileType.MCB_INT_ULDM, QColor.black);
tileColors.put(TileType.MCB_L, QColor.black);
tileColors.put(TileType.MCB_L_BOT, QColor.black);
tileColors.put(TileType.MCB_MUI0R, QColor.black);
tileColors.put(TileType.MCB_MUI0W, QColor.black);
tileColors.put(TileType.MCB_MUI1R, QColor.black);
tileColors.put(TileType.MCB_MUI1W, QColor.black);
tileColors.put(TileType.MCB_MUI2, QColor.black);
tileColors.put(TileType.MCB_MUI3, QColor.black);
tileColors.put(TileType.MCB_MUI4, QColor.black);
tileColors.put(TileType.MCB_MUI5, QColor.black);
tileColors.put(TileType.MCB_MUI_DUMMY, QColor.black);
tileColors.put(TileType.MCB_REGH, QColor.black);
tileColors.put(TileType.MGT_AL, QColor.black);
tileColors.put(TileType.MGT_AL_BOT, QColor.black);
tileColors.put(TileType.MGT_AL_MID, QColor.black);
tileColors.put(TileType.MGT_AR, QColor.black);
tileColors.put(TileType.MGT_AR_BOT, QColor.black);
tileColors.put(TileType.MGT_AR_MID, QColor.black);
tileColors.put(TileType.MGT_BL, QColor.black);
tileColors.put(TileType.MGT_BR, QColor.black);
tileColors.put(TileType.MGT_R, QColor.black);
tileColors.put(TileType.MK_B_IOIS, QColor.black);
tileColors.put(TileType.MK_CLKB, QColor.black);
tileColors.put(TileType.MK_CLKT, QColor.black);
tileColors.put(TileType.MK_T_IOIS, QColor.black);
tileColors.put(TileType.ML_BCLKTERM012, QColor.black);
tileColors.put(TileType.ML_BCLKTERM123, QColor.black);
tileColors.put(TileType.ML_BRAMSITE_IOIS, QColor.black);
tileColors.put(TileType.ML_BRAM_IOIS, QColor.black);
tileColors.put(TileType.ML_CLKB, QColor.black);
tileColors.put(TileType.ML_CLKH, QColor.black);
tileColors.put(TileType.ML_CLKT, QColor.black);
tileColors.put(TileType.ML_CNR_BTERM, QColor.black);
tileColors.put(TileType.ML_LR_CLKH, QColor.black);
tileColors.put(TileType.ML_TBS_IOIS, QColor.black);
tileColors.put(TileType.ML_TB_IOIS, QColor.black);
tileColors.put(TileType.ML_TCLKTERM210, QColor.black);
tileColors.put(TileType.ML_TTERM010, QColor.black);
tileColors.put(TileType.NULL, QColor.black);
tileColors.put(TileType.PB, QColor.black);
tileColors.put(TileType.PCIE, QColor.black);
tileColors.put(TileType.PCIE_B, QColor.black);
tileColors.put(TileType.PCIE_BRAM, QColor.black);
tileColors.put(TileType.PCIE_BRKH, QColor.black);
tileColors.put(TileType.PCIE_INT_INTERFACE, QColor.black);
tileColors.put(TileType.PCIE_INT_INTERFACE_L, QColor.black);
tileColors.put(TileType.PCIE_INT_INTERFACE_R, QColor.black);
tileColors.put(TileType.PCIE_T, QColor.black);
tileColors.put(TileType.PCIE_TOP, QColor.black);
tileColors.put(TileType.PCIE_TOP_CLB_FEEDTHRU, QColor.black);
tileColors.put(TileType.PCIE_TOP_INT_FEEDTHRU, QColor.black);
tileColors.put(TileType.PCIE_TOP_UNUSED, QColor.black);
tileColors.put(TileType.PPC_B, QColor.black);
tileColors.put(TileType.PPC_BR, QColor.black);
tileColors.put(TileType.PPC_BRAM_B, QColor.black);
tileColors.put(TileType.PPC_BRAM_T, QColor.black);
tileColors.put(TileType.PPC_B_PB, QColor.black);
tileColors.put(TileType.PPC_B_TERM, QColor.black);
tileColors.put(TileType.PPC_L_INT_INTERFACE, QColor.black);
tileColors.put(TileType.PPC_R, QColor.black);
tileColors.put(TileType.PPC_R_INT_INTERFACE, QColor.black);
tileColors.put(TileType.PPC_R_PB, QColor.black);
tileColors.put(TileType.PPC_R_PT, QColor.black);
tileColors.put(TileType.PPC_T, QColor.black);
tileColors.put(TileType.PPC_TR, QColor.black);
tileColors.put(TileType.PPC_T_PT, QColor.black);
tileColors.put(TileType.PPC_T_TERM, QColor.black);
tileColors.put(TileType.PT, QColor.black);
tileColors.put(TileType.PTERMB, QColor.black);
tileColors.put(TileType.PTERMBR, QColor.black);
tileColors.put(TileType.PTERMR, QColor.black);
tileColors.put(TileType.PTERMT, QColor.black);
tileColors.put(TileType.PTERMTR, QColor.black);
tileColors.put(TileType.RAMB_BOT, QColor.black);
tileColors.put(TileType.RAMB_BOT_BTERM, QColor.black);
tileColors.put(TileType.RAMB_TOP, QColor.black);
tileColors.put(TileType.RAMB_TOP_TTERM, QColor.black);
tileColors.put(TileType.RBPPC, QColor.black);
tileColors.put(TileType.RBRAM, QColor.darkMagenta);
tileColors.put(TileType.RBRAMS2E_BOTP, QColor.darkMagenta);
tileColors.put(TileType.RBRAMS2E_TOPP, QColor.darkMagenta);
tileColors.put(TileType.RBRAM_BOTP, QColor.darkMagenta);
tileColors.put(TileType.RBRAM_BOTS, QColor.darkMagenta);
tileColors.put(TileType.RBRAM_BOTS_GCLK, QColor.darkMagenta);
tileColors.put(TileType.RBRAM_TOPP, QColor.darkMagenta);
tileColors.put(TileType.RBRAM_TOPS, QColor.darkMagenta);
tileColors.put(TileType.RBRAM_TOPS_GCLK, QColor.darkMagenta);
tileColors.put(TileType.REGC_CLE, QColor.darkBlue);
tileColors.put(TileType.REGC_INT, QColor.darkBlue);
tileColors.put(TileType.REGH_BRAM_FEEDTHRU, QColor.darkBlue);
tileColors.put(TileType.REGH_BRAM_FEEDTHRU_L_GCLK, QColor.darkBlue);
tileColors.put(TileType.REGH_BRAM_FEEDTHRU_R_GCLK, QColor.darkBlue);
tileColors.put(TileType.REGH_CLEXL_CLE, QColor.darkBlue);
tileColors.put(TileType.REGH_CLEXL_INT, QColor.darkBlue);
tileColors.put(TileType.REGH_CLEXL_INT_CLK, QColor.darkBlue);
tileColors.put(TileType.REGH_CLEXM_CLE, QColor.darkBlue);
tileColors.put(TileType.REGH_CLEXM_INT, QColor.darkBlue);
tileColors.put(TileType.REGH_CLEXM_INT_GCLKL, QColor.darkBlue);
tileColors.put(TileType.REGH_DSP_CLB, QColor.darkBlue);
tileColors.put(TileType.REGH_DSP_INT, QColor.darkBlue);
tileColors.put(TileType.REGH_DSP_L, QColor.darkBlue);
tileColors.put(TileType.REGH_DSP_L_NOCLK, QColor.darkBlue);
tileColors.put(TileType.REGH_DSP_R, QColor.darkBlue);
tileColors.put(TileType.REGH_IOI, QColor.darkBlue);
tileColors.put(TileType.REGH_IOI_BOT25, QColor.darkBlue);
tileColors.put(TileType.REGH_IOI_LTERM, QColor.darkBlue);
tileColors.put(TileType.REGH_IOI_RTERM, QColor.darkBlue);
tileColors.put(TileType.REGH_LIOI_INT, QColor.darkBlue);
tileColors.put(TileType.REGH_LIOI_INT_BOT25, QColor.darkBlue);
tileColors.put(TileType.REGH_RIOI, QColor.darkBlue);
tileColors.put(TileType.REGH_RIOI_BOT25, QColor.darkBlue);
tileColors.put(TileType.REGH_RIOI_INT, QColor.darkBlue);
tileColors.put(TileType.REGH_RIOI_INT_BOT25, QColor.darkBlue);
tileColors.put(TileType.REG_B, QColor.darkBlue);
tileColors.put(TileType.REG_B_BTERM, QColor.darkBlue);
tileColors.put(TileType.REG_C_CMT, QColor.darkBlue);
tileColors.put(TileType.REG_L, QColor.darkBlue);
tileColors.put(TileType.REG_LB, QColor.darkBlue);
tileColors.put(TileType.REG_R, QColor.darkBlue);
tileColors.put(TileType.REG_RB, QColor.darkBlue);
tileColors.put(TileType.REG_T, QColor.darkBlue);
tileColors.put(TileType.REG_T_TTERM, QColor.darkBlue);
tileColors.put(TileType.REG_V, QColor.darkBlue);
tileColors.put(TileType.REG_V_BRK, QColor.darkBlue);
tileColors.put(TileType.REG_V_BTERM, QColor.darkBlue);
tileColors.put(TileType.REG_V_HCLK, QColor.darkBlue);
tileColors.put(TileType.REG_V_HCLKBUF_BOT, QColor.darkBlue);
tileColors.put(TileType.REG_V_HCLKBUF_TOP, QColor.darkBlue);
tileColors.put(TileType.REG_V_HCLK_BOT25, QColor.darkBlue);
tileColors.put(TileType.REG_V_MEMB_BOT, QColor.darkBlue);
tileColors.put(TileType.REG_V_MEMB_TOP, QColor.darkBlue);
tileColors.put(TileType.REG_V_MIDBUF_BOT, QColor.darkBlue);
tileColors.put(TileType.REG_V_MIDBUF_TOP, QColor.darkBlue);
tileColors.put(TileType.REG_V_TTERM, QColor.darkBlue);
tileColors.put(TileType.REMPTY0X2, QColor.black);
tileColors.put(TileType.REMPTY16X4, QColor.black);
tileColors.put(TileType.RIBUFS, QColor.darkGreen);
tileColors.put(TileType.RIBUFS_BRK, QColor.darkGreen);
tileColors.put(TileType.RIBUFS_CLK_PCI, QColor.darkGreen);
tileColors.put(TileType.RIBUFS_CLK_PCI_BRK, QColor.darkGreen);
tileColors.put(TileType.RIBUFS_PCI, QColor.darkGreen);
tileColors.put(TileType.RIGHT, QColor.darkGreen);
tileColors.put(TileType.RIGHT_PCI_BOT, QColor.darkBlue);
tileColors.put(TileType.RIGHT_PCI_TOP, QColor.darkBlue);
tileColors.put(TileType.RIOB, QColor.darkGreen);
tileColors.put(TileType.RIOB_PCI, QColor.darkGreen);
tileColors.put(TileType.RIOB_RDY, QColor.darkGreen);
tileColors.put(TileType.RIOI, QColor.darkGreen);
tileColors.put(TileType.RIOIS, QColor.darkGreen);
tileColors.put(TileType.RIOIS_CLK_PCI, QColor.darkGreen);
tileColors.put(TileType.RIOIS_PCI, QColor.darkGreen);
tileColors.put(TileType.RIOI_BRK, QColor.darkGreen);
tileColors.put(TileType.RPPC_X0Y0_INT, QColor.black);
tileColors.put(TileType.RPPC_X1Y0_INT, QColor.black);
tileColors.put(TileType.RTERM, QColor.darkGray);
tileColors.put(TileType.RTERM010, QColor.darkGray);
tileColors.put(TileType.RTERM1, QColor.darkGray);
tileColors.put(TileType.RTERM2, QColor.darkGray);
tileColors.put(TileType.RTERM210, QColor.darkGray);
tileColors.put(TileType.RTERM210_PCI, QColor.darkGray);
tileColors.put(TileType.RTERM3, QColor.darkGray);
tileColors.put(TileType.RTERM321, QColor.darkGray);
tileColors.put(TileType.RTERM323, QColor.darkGray);
tileColors.put(TileType.RTERM323_PCI, QColor.darkGray);
tileColors.put(TileType.RTERM4, QColor.darkGray);
tileColors.put(TileType.RTERM4B, QColor.darkGray);
tileColors.put(TileType.RTERM4CLK, QColor.darkGray);
tileColors.put(TileType.RTERM4CLKB, QColor.darkGray);
tileColors.put(TileType.RTERMCLKA, QColor.darkGray);
tileColors.put(TileType.RTERMCLKB, QColor.darkGray);
tileColors.put(TileType.R_TERM_INT, QColor.darkGray);
tileColors.put(TileType.R_TERM_INT_D, QColor.darkGray);
tileColors.put(TileType.R_TERM_PPC, QColor.darkGray);
tileColors.put(TileType.SITE_FEEDTHRU, QColor.black);
tileColors.put(TileType.SYS_MON, QColor.black);
tileColors.put(TileType.TBSTERM, QColor.darkGray);
tileColors.put(TileType.TB_IOIS, QColor.darkGreen);
tileColors.put(TileType.TCLKTERM2, QColor.darkGray);
tileColors.put(TileType.TCLKTERM210, QColor.darkGray);
tileColors.put(TileType.TCLKTERM3, QColor.darkGray);
tileColors.put(TileType.TCLKTERM321, QColor.darkGray);
tileColors.put(TileType.TGCLKVTERM, QColor.darkGray);
tileColors.put(TileType.TGIGABIT, QColor.black);
tileColors.put(TileType.TGIGABIT10, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT0, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT1, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT2, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT3, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT4, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT5, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT6, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT7, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT8, QColor.black);
tileColors.put(TileType.TGIGABIT10_INT_TERM, QColor.black);
tileColors.put(TileType.TGIGABIT10_IOI_TERM, QColor.black);
tileColors.put(TileType.TGIGABIT10_TERM, QColor.black);
tileColors.put(TileType.TGIGABIT_INT0, QColor.black);
tileColors.put(TileType.TGIGABIT_INT1, QColor.black);
tileColors.put(TileType.TGIGABIT_INT2, QColor.black);
tileColors.put(TileType.TGIGABIT_INT3, QColor.black);
tileColors.put(TileType.TGIGABIT_INT4, QColor.black);
tileColors.put(TileType.TGIGABIT_INT_TERM, QColor.black);
tileColors.put(TileType.TGIGABIT_IOI_TERM, QColor.black);
tileColors.put(TileType.TGIGABIT_TERM, QColor.black);
tileColors.put(TileType.TIBUFS, QColor.darkGreen);
tileColors.put(TileType.TIOB, QColor.darkGreen);
tileColors.put(TileType.TIOB_SINGLE, QColor.darkGreen);
tileColors.put(TileType.TIOIB, QColor.darkGreen);
tileColors.put(TileType.TIOIS, QColor.darkGreen);
tileColors.put(TileType.TIOI_INNER, QColor.darkGreen);
tileColors.put(TileType.TIOI_INNER_UNUSED, QColor.darkGreen);
tileColors.put(TileType.TIOI_OUTER, QColor.darkGreen);
tileColors.put(TileType.TL_DLLIOB, QColor.darkGreen);
tileColors.put(TileType.TOP, QColor.darkGreen);
tileColors.put(TileType.TPPC_X0Y0_INT, QColor.black);
tileColors.put(TileType.TPPC_X1Y0_INT, QColor.black);
tileColors.put(TileType.TR_DLLIOB, QColor.darkGreen);
tileColors.put(TileType.TTERM, QColor.darkGray);
tileColors.put(TileType.TTERM010, QColor.darkGray);
tileColors.put(TileType.TTERM1, QColor.darkGray);
tileColors.put(TileType.TTERM1_MACC, QColor.darkGray);
tileColors.put(TileType.TTERM2, QColor.darkGray);
tileColors.put(TileType.TTERM210, QColor.darkGray);
tileColors.put(TileType.TTERM2CLK, QColor.darkGray);
tileColors.put(TileType.TTERM3, QColor.darkGray);
tileColors.put(TileType.TTERM321, QColor.darkGray);
tileColors.put(TileType.TTERM323, QColor.darkGray);
tileColors.put(TileType.TTERM4, QColor.darkGray);
tileColors.put(TileType.TTERM4CLK, QColor.darkGray);
tileColors.put(TileType.TTERM4_BRAM2, QColor.darkGray);
tileColors.put(TileType.TTERMCLK, QColor.darkGray);
tileColors.put(TileType.TTERMCLKA, QColor.darkGray);
tileColors.put(TileType.T_TERM_DSP, QColor.darkGray);
tileColors.put(TileType.T_TERM_INT, QColor.darkGray);
tileColors.put(TileType.T_TERM_INT_D, QColor.darkGray);
tileColors.put(TileType.UL, QColor.black);
tileColors.put(TileType.ULPPC_X0Y0_INT, QColor.black);
tileColors.put(TileType.ULPPC_X1Y0_INT, QColor.black);
tileColors.put(TileType.UR, QColor.black);
tileColors.put(TileType.UR_LOWER, QColor.black);
tileColors.put(TileType.UR_UPPER, QColor.black);
tileColors.put(TileType.VBRK, QColor.darkBlue);
tileColors.put(TileType.VFRAME, QColor.black);
tileColors.put(TileType.VFRAME_NOMON, QColor.black);
// Virtex 7, Kintex 7
tileColors.put(TileType.BRAM_INT_INTERFACE_L, QColor.darkYellow);
tileColors.put(TileType.BRAM_INT_INTERFACE_R, QColor.darkYellow);
tileColors.put(TileType.BRAM_L, QColor.darkMagenta);
tileColors.put(TileType.BRAM_L_FLY, QColor.black);
tileColors.put(TileType.BRAM_R, QColor.darkMagenta);
tileColors.put(TileType.BRKH_CLK, QColor.darkBlue);
tileColors.put(TileType.BRKH_DSP_L, QColor.darkBlue);
tileColors.put(TileType.BRKH_DSP_R, QColor.darkBlue);
tileColors.put(TileType.BRKH_TERM_INT, QColor.darkBlue);
tileColors.put(TileType.B_TERM_INT_NOUTURN, QColor.black);
tileColors.put(TileType.B_TERM_INT_SLV, QColor.black);
tileColors.put(TileType.CFG_CENTER_BOT, QColor.black);
tileColors.put(TileType.CFG_CENTER_MID, QColor.black);
tileColors.put(TileType.CFG_CENTER_MID_SLAVE, QColor.black);
tileColors.put(TileType.CFG_CENTER_TOP, QColor.black);
tileColors.put(TileType.CFG_CENTER_TOP_SLAVE, QColor.black);
tileColors.put(TileType.CLBLL_L, QColor.blue);
tileColors.put(TileType.CLBLL_R, QColor.blue);
tileColors.put(TileType.CLBLM_L, QColor.blue);
tileColors.put(TileType.CLBLM_R, QColor.blue);
tileColors.put(TileType.CLK_BALI_REBUF, QColor.black);
tileColors.put(TileType.CLK_BUFG_BOT_R, QColor.black);
tileColors.put(TileType.CLK_BUFG_REBUF, QColor.black);
tileColors.put(TileType.CLK_BUFG_TOP_R, QColor.black);
tileColors.put(TileType.CLK_FEED, QColor.black);
tileColors.put(TileType.CLK_HROW_BOT_R, QColor.black);
tileColors.put(TileType.CLK_HROW_TOP_R, QColor.black);
tileColors.put(TileType.CLK_PMV, QColor.black);
tileColors.put(TileType.CLK_TERM, QColor.black);
tileColors.put(TileType.CMT_FIFO_L, QColor.black);
tileColors.put(TileType.CMT_FIFO_R, QColor.black);
tileColors.put(TileType.CMT_PMV, QColor.black);
tileColors.put(TileType.CMT_PMV_L, QColor.black);
tileColors.put(TileType.CMT_TOP_L_LOWER_B, QColor.black);
tileColors.put(TileType.CMT_TOP_L_LOWER_T, QColor.black);
tileColors.put(TileType.CMT_TOP_L_UPPER_B, QColor.black);
tileColors.put(TileType.CMT_TOP_L_UPPER_T, QColor.black);
tileColors.put(TileType.CMT_TOP_R_LOWER_B, QColor.black);
tileColors.put(TileType.CMT_TOP_R_LOWER_T, QColor.black);
tileColors.put(TileType.CMT_TOP_R_UPPER_B, QColor.black);
tileColors.put(TileType.CMT_TOP_R_UPPER_T, QColor.black);
tileColors.put(TileType.DSP_L, QColor.darkCyan);
tileColors.put(TileType.DSP_R, QColor.darkCyan);
tileColors.put(TileType.GTX_CHANNEL_0, QColor.black);
tileColors.put(TileType.GTX_CHANNEL_1, QColor.black);
tileColors.put(TileType.GTX_CHANNEL_2, QColor.black);
tileColors.put(TileType.GTX_CHANNEL_3, QColor.black);
tileColors.put(TileType.GTX_COMMON, QColor.black);
tileColors.put(TileType.GTX_INT_INTERFACE_L, QColor.black);
tileColors.put(TileType.HCLK_CMT, QColor.cyan);
tileColors.put(TileType.HCLK_CMT_L, QColor.cyan);
tileColors.put(TileType.HCLK_DSP_L, QColor.cyan);
tileColors.put(TileType.HCLK_DSP_R, QColor.cyan);
tileColors.put(TileType.HCLK_FEEDTHRU_1, QColor.cyan);
tileColors.put(TileType.HCLK_FEEDTHRU_2, QColor.cyan);
tileColors.put(TileType.HCLK_FIFO_L, QColor.cyan);
tileColors.put(TileType.HCLK_IOI3, QColor.cyan);
tileColors.put(TileType.HCLK_L, QColor.cyan);
tileColors.put(TileType.HCLK_L_BOT_UTURN, QColor.cyan);
tileColors.put(TileType.HCLK_L_SLV, QColor.cyan);
tileColors.put(TileType.HCLK_R, QColor.cyan);
tileColors.put(TileType.HCLK_R_BOT_UTURN, QColor.cyan);
tileColors.put(TileType.HCLK_R_SLV, QColor.cyan);
tileColors.put(TileType.HCLK_TERM_GTX, QColor.cyan);
tileColors.put(TileType.INT_FEEDTHRU_1, QColor.darkYellow);
tileColors.put(TileType.INT_FEEDTHRU_2, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_L, QColor.darkYellow);
tileColors.put(TileType.INT_INTERFACE_R, QColor.darkYellow);
tileColors.put(TileType.INT_L, QColor.darkYellow);
tileColors.put(TileType.INT_L_SLV, QColor.darkYellow);
tileColors.put(TileType.INT_L_SLV_FLY, QColor.darkYellow);
tileColors.put(TileType.INT_R, QColor.darkYellow);
tileColors.put(TileType.INT_R_SLV, QColor.darkYellow);
tileColors.put(TileType.INT_R_SLV_FLY, QColor.darkYellow);
tileColors.put(TileType.IO_INT_INTERFACE_L, QColor.darkYellow);
tileColors.put(TileType.IO_INT_INTERFACE_R, QColor.darkYellow);
tileColors.put(TileType.LIOB18, QColor.black);
tileColors.put(TileType.LIOB18_SING, QColor.black);
tileColors.put(TileType.LIOB33, QColor.black);
tileColors.put(TileType.LIOB33_SING, QColor.black);
tileColors.put(TileType.LIOI3, QColor.black);
tileColors.put(TileType.LIOI3_SING, QColor.black);
tileColors.put(TileType.LIOI3_TBYTESRC, QColor.black);
tileColors.put(TileType.LIOI3_TBYTETERM, QColor.black);
tileColors.put(TileType.LIOI_SING, QColor.black);
tileColors.put(TileType.LIOI_TBYTESRC, QColor.black);
tileColors.put(TileType.LIOI_TBYTETERM, QColor.black);
tileColors.put(TileType.MONITOR_BOT, QColor.black);
tileColors.put(TileType.MONITOR_BOT_FUJI2, QColor.black);
tileColors.put(TileType.MONITOR_BOT_SLAVE, QColor.black);
tileColors.put(TileType.MONITOR_MID, QColor.black);
tileColors.put(TileType.MONITOR_MID_FUJI2, QColor.black);
tileColors.put(TileType.MONITOR_TOP, QColor.black);
tileColors.put(TileType.MONITOR_TOP_FUJI2, QColor.black);
tileColors.put(TileType.PCIE_BOT, QColor.black);
tileColors.put(TileType.PCIE_BOT_LEFT, QColor.black);
tileColors.put(TileType.PCIE_INT_INTERFACE_LEFT_L, QColor.black);
tileColors.put(TileType.PCIE_NULL, QColor.black);
tileColors.put(TileType.PCIE_TOP_LEFT, QColor.black);
tileColors.put(TileType.RIOB18, QColor.black);
tileColors.put(TileType.RIOB18_SING, QColor.black);
tileColors.put(TileType.RIOI_SING, QColor.black);
tileColors.put(TileType.RIOI_TBYTESRC, QColor.black);
tileColors.put(TileType.RIOI_TBYTETERM, QColor.black);
tileColors.put(TileType.R_TERM_INT_GTX, QColor.black);
tileColors.put(TileType.TERM_CMT, QColor.black);
tileColors.put(TileType.T_TERM_INT_NOUTURN, QColor.black);
tileColors.put(TileType.T_TERM_INT_SLV, QColor.black);
tileColors.put(TileType.VBRK_EXT, QColor.black);
} | return tileColors.get(tile.getType()); } static { tileColors = new HashMap<TileType, QColor>(); tileColors.put(TileType.BBSTERM, QColor.darkGray); tileColors.put(TileType.BBTERM, QColor.darkGray); tileColors.put(TileType.BCLKTERM012, QColor.darkGray); tileColors.put(TileType.BCLKTERM123, QColor.darkGray); tileColors.put(TileType.BCLKTERM2, QColor.darkGray); tileColors.put(TileType.BCLKTERM3, QColor.darkGray); tileColors.put(TileType.BGCLKVTERM, QColor.darkGray); tileColors.put(TileType.BGIGABIT, QColor.black); tileColors.put(TileType.BGIGABIT10, QColor.black); tileColors.put(TileType.BGIGABIT10_INT0, QColor.black); tileColors.put(TileType.BGIGABIT10_INT1, QColor.black); tileColors.put(TileType.BGIGABIT10_INT2, QColor.black); tileColors.put(TileType.BGIGABIT10_INT3, QColor.black); tileColors.put(TileType.BGIGABIT10_INT4, QColor.black); tileColors.put(TileType.BGIGABIT10_INT5, QColor.black); tileColors.put(TileType.BGIGABIT10_INT6, QColor.black); tileColors.put(TileType.BGIGABIT10_INT7, QColor.black); tileColors.put(TileType.BGIGABIT10_INT8, QColor.black); tileColors.put(TileType.BGIGABIT10_INT_TERM, QColor.black); tileColors.put(TileType.BGIGABIT10_IOI_TERM, QColor.black); tileColors.put(TileType.BGIGABIT10_TERM, QColor.black); tileColors.put(TileType.BGIGABIT_INT0, QColor.black); tileColors.put(TileType.BGIGABIT_INT1, QColor.black); tileColors.put(TileType.BGIGABIT_INT2, QColor.black); tileColors.put(TileType.BGIGABIT_INT3, QColor.black); tileColors.put(TileType.BGIGABIT_INT4, QColor.black); tileColors.put(TileType.BGIGABIT_INT_TERM, QColor.black); tileColors.put(TileType.BGIGABIT_IOI_TERM, QColor.black); tileColors.put(TileType.BGIGABIT_TERM, QColor.black); tileColors.put(TileType.BIBUFS, QColor.darkGreen); tileColors.put(TileType.BIOB, QColor.darkGreen); tileColors.put(TileType.BIOB_SINGLE, QColor.darkGreen); tileColors.put(TileType.BIOB_SINGLE_ALT, QColor.darkGreen); tileColors.put(TileType.BIOIB, QColor.darkGreen); tileColors.put(TileType.BIOIS, QColor.darkGreen); tileColors.put(TileType.BIOI_INNER, QColor.darkGreen); tileColors.put(TileType.BIOI_INNER_UNUSED, QColor.darkGreen); tileColors.put(TileType.BIOI_OUTER, QColor.darkGreen); tileColors.put(TileType.BIOI_OUTER_UNUSED, QColor.darkGreen); tileColors.put(TileType.BL_DLLIOB, QColor.darkGreen); tileColors.put(TileType.BOT, QColor.darkGreen); tileColors.put(TileType.BPPC_X0Y0_INT, QColor.black); tileColors.put(TileType.BPPC_X1Y0_INT, QColor.black); tileColors.put(TileType.BRAM, QColor.darkMagenta); tileColors.put(TileType.BRAM0, QColor.darkMagenta); tileColors.put(TileType.BRAM0_SMALL, QColor.darkMagenta); tileColors.put(TileType.BRAM0_SMALL_BOT, QColor.darkMagenta); tileColors.put(TileType.BRAM1, QColor.darkMagenta); tileColors.put(TileType.BRAM1_SMALL, QColor.darkMagenta); tileColors.put(TileType.BRAM2, QColor.darkMagenta); tileColors.put(TileType.BRAM2_DN_GCLKH_FEEDTHRU, QColor.darkMagenta); tileColors.put(TileType.BRAM2_DN_GCLKH_FEEDTHRUA, QColor.darkMagenta); tileColors.put(TileType.BRAM2_FEEDTHRU, QColor.darkMagenta); tileColors.put(TileType.BRAM2_FEEDTHRUH, QColor.darkMagenta); tileColors.put(TileType.BRAM2_FEEDTHRUH_50A, QColor.darkMagenta); tileColors.put(TileType.BRAM2_FEEDTHRU_BRK, QColor.darkMagenta); tileColors.put(TileType.BRAM2_GCLKH_FEEDTHRU, QColor.darkMagenta); tileColors.put(TileType.BRAM2_GCLKH_FEEDTHRUA, QColor.darkMagenta); tileColors.put(TileType.BRAM2_MID_GCLKH_FEEDTHRU, QColor.darkMagenta); tileColors.put(TileType.BRAM2_MID_GCLKH_FEEDTHRUA, QColor.darkMagenta); tileColors.put(TileType.BRAM2_SMALL, QColor.darkMagenta); tileColors.put(TileType.BRAM2_UP_GCLKH_FEEDTHRU, QColor.darkMagenta); tileColors.put(TileType.BRAM2_UP_GCLKH_FEEDTHRUA, QColor.darkMagenta); tileColors.put(TileType.BRAM3, QColor.darkMagenta); tileColors.put(TileType.BRAM3_SMALL, QColor.darkMagenta); tileColors.put(TileType.BRAM3_SMALL_BRK, QColor.darkMagenta); tileColors.put(TileType.BRAM3_SMALL_TOP, QColor.darkMagenta); tileColors.put(TileType.BRAMS2E_BOT_NOGCLK, QColor.darkMagenta); tileColors.put(TileType.BRAMS2E_CLKH, QColor.darkMagenta); tileColors.put(TileType.BRAMS2E_TOP_NOGCLK, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2H, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2H_50A, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_3M, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_3M_BOT, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_3M_BRK, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_3M_TOP, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_BOT, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_BRK, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_DN_GCLKH, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_DUMMY, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_GCLKH, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_MID_GCLKH, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_TOP, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE2_UP_GCLKH, QColor.darkMagenta); tileColors.put(TileType.BRAMSITEH, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_GCLKH, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_IOIS, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_PPC_X0Y0_INT, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_PPC_X1Y0_INT, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_PTERMB, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_PTERMT, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_RPPC_X0Y0_INT, QColor.darkMagenta); tileColors.put(TileType.BRAMSITE_RPPC_X1Y0_INT, QColor.darkMagenta); tileColors.put(TileType.BRAM_BOT, QColor.darkMagenta); tileColors.put(TileType.BRAM_BOT_BTERM_L, QColor.darkMagenta); tileColors.put(TileType.BRAM_BOT_BTERM_R, QColor.darkMagenta); tileColors.put(TileType.BRAM_BOT_GCLK, QColor.darkMagenta); tileColors.put(TileType.BRAM_BOT_NOGCLK, QColor.darkMagenta); tileColors.put(TileType.BRAM_CLKH, QColor.darkRed); tileColors.put(TileType.BRAM_HCLK_FEEDTHRU, QColor.cyan); tileColors.put(TileType.BRAM_HCLK_FEEDTHRU_FOLD, QColor.cyan); tileColors.put(TileType.BRAM_HCLK_FEEDTHRU_INTER, QColor.cyan); tileColors.put(TileType.BRAM_HCLK_FEEDTHRU_INTER_FOLD, QColor.cyan); tileColors.put(TileType.BRAM_INTER_BTERM, QColor.darkMagenta); tileColors.put(TileType.BRAM_INTER_TTERM, QColor.darkMagenta); tileColors.put(TileType.BRAM_INT_INTERFACE_BOT, QColor.darkMagenta); tileColors.put(TileType.BRAM_INT_INTERFACE_TOP, QColor.darkMagenta); tileColors.put(TileType.BRAM_IOIS, QColor.darkMagenta); tileColors.put(TileType.BRAM_IOIS_NODCM, QColor.darkMagenta); tileColors.put(TileType.BRAM_REGH_FEEDTHRU, QColor.darkMagenta); tileColors.put(TileType.BRAM_REGH_FEEDTHRU_INTER, QColor.darkMagenta); tileColors.put(TileType.BRAM_TOP, QColor.darkMagenta); tileColors.put(TileType.BRAM_TOP_GCLK, QColor.darkMagenta); tileColors.put(TileType.BRAM_TOP_NOGCLK, QColor.darkMagenta); tileColors.put(TileType.BRAM_TOP_TTERM_L, QColor.darkMagenta); tileColors.put(TileType.BRAM_TOP_TTERM_R, QColor.darkMagenta); tileColors.put(TileType.BRKH, QColor.darkBlue); tileColors.put(TileType.BRKH_BRAM, QColor.darkBlue); tileColors.put(TileType.BRKH_BUFGCTRL, QColor.darkBlue); tileColors.put(TileType.BRKH_B_TERM_INT, QColor.darkBlue); tileColors.put(TileType.BRKH_CLB, QColor.darkBlue); tileColors.put(TileType.BRKH_CMT, QColor.darkBlue); tileColors.put(TileType.BRKH_DCM, QColor.darkBlue); tileColors.put(TileType.BRKH_DSP, QColor.darkBlue); tileColors.put(TileType.BRKH_DUMMY, QColor.darkBlue); tileColors.put(TileType.BRKH_GT3, QColor.darkBlue); tileColors.put(TileType.BRKH_GTH, QColor.darkBlue); tileColors.put(TileType.BRKH_GTX, QColor.darkBlue); tileColors.put(TileType.BRKH_GTX_EMP, QColor.darkBlue); tileColors.put(TileType.BRKH_GTX_L, QColor.darkBlue); tileColors.put(TileType.BRKH_GTX_LEFT, QColor.darkBlue); tileColors.put(TileType.BRKH_INT, QColor.darkBlue); tileColors.put(TileType.BRKH_INT_INTERFACE, QColor.darkBlue); tileColors.put(TileType.BRKH_IOB, QColor.darkBlue); tileColors.put(TileType.BRKH_IOI, QColor.darkBlue); tileColors.put(TileType.BRKH_IOIS, QColor.darkBlue); tileColors.put(TileType.BRKH_MGT, QColor.darkBlue); tileColors.put(TileType.BRKH_MGT11CLK_L, QColor.darkBlue); tileColors.put(TileType.BRKH_MGT11CLK_R, QColor.darkBlue); tileColors.put(TileType.BRKH_MGT_R, QColor.darkBlue); tileColors.put(TileType.BRKH_PPC, QColor.darkBlue); tileColors.put(TileType.BRKH_T_TERM_INT, QColor.darkBlue); tileColors.put(TileType.BRKH_VBRK, QColor.darkBlue); tileColors.put(TileType.BR_DLLIOB, QColor.darkGreen); tileColors.put(TileType.BTERM, QColor.darkGray); tileColors.put(TileType.BTERM010, QColor.darkGray); tileColors.put(TileType.BTERM012, QColor.darkGray); tileColors.put(TileType.BTERM1, QColor.darkGray); tileColors.put(TileType.BTERM123, QColor.darkGray); tileColors.put(TileType.BTERM1_MACC, QColor.darkGray); tileColors.put(TileType.BTERM2, QColor.darkGray); tileColors.put(TileType.BTERM2CLK, QColor.darkGray); tileColors.put(TileType.BTERM3, QColor.darkGray); tileColors.put(TileType.BTERM323, QColor.darkGray); tileColors.put(TileType.BTERM4, QColor.darkGray); tileColors.put(TileType.BTERM4CLK, QColor.darkGray); tileColors.put(TileType.BTERM4_BRAM2, QColor.darkGray); tileColors.put(TileType.BTERMCLK, QColor.darkGray); tileColors.put(TileType.BTERMCLKA, QColor.darkGray); tileColors.put(TileType.BTERMCLKB, QColor.darkGray); tileColors.put(TileType.BTTERM, QColor.darkGray); tileColors.put(TileType.B_TERM_DSP, QColor.darkGray); tileColors.put(TileType.B_TERM_INT, QColor.darkGray); tileColors.put(TileType.B_TERM_INT_D, QColor.darkGray); tileColors.put(TileType.CCM, QColor.black); tileColors.put(TileType.CENTER, QColor.blue); tileColors.put(TileType.CENTER_SMALL, QColor.blue); tileColors.put(TileType.CENTER_SMALL_BRK, QColor.blue); tileColors.put(TileType.CENTER_SPACE1, QColor.blue); tileColors.put(TileType.CENTER_SPACE2, QColor.blue); tileColors.put(TileType.CENTER_SPACE_HCLK1, QColor.blue); tileColors.put(TileType.CENTER_SPACE_HCLK2, QColor.blue); tileColors.put(TileType.CFG_CENTER, QColor.darkBlue); tileColors.put(TileType.CFG_CENTER_0, QColor.darkBlue); tileColors.put(TileType.CFG_CENTER_1, QColor.darkBlue); tileColors.put(TileType.CFG_CENTER_2, QColor.darkBlue); tileColors.put(TileType.CFG_CENTER_3, QColor.darkBlue); tileColors.put(TileType.CFG_HCLK_INTERFACE, QColor.cyan); tileColors.put(TileType.CFG_PPC_DL_BUFS, QColor.darkBlue); tileColors.put(TileType.CFG_PPC_R_VBRK, QColor.darkBlue); tileColors.put(TileType.CFG_PPC_VBRK, QColor.darkBlue); tileColors.put(TileType.CFG_VBRK, QColor.darkBlue); tileColors.put(TileType.CFG_VBRK_FRAME, QColor.darkBlue); tileColors.put(TileType.CIOB, QColor.darkGreen); tileColors.put(TileType.CLB, QColor.blue); tileColors.put(TileType.CLBLL, QColor.blue); tileColors.put(TileType.CLBLM, QColor.blue); tileColors.put(TileType.CLB_BUFFER, QColor.blue); tileColors.put(TileType.CLB_EMP_BTERM, QColor.blue); tileColors.put(TileType.CLB_INT_BTERM, QColor.blue); tileColors.put(TileType.CLEXL, QColor.blue); tileColors.put(TileType.CLEXL_DUMMY, QColor.blue); tileColors.put(TileType.CLEXM, QColor.blue); tileColors.put(TileType.CLEXM_DUMMY, QColor.blue); tileColors.put(TileType.CLKB, QColor.darkRed); tileColors.put(TileType.CLKB_2DLL, QColor.darkRed); tileColors.put(TileType.CLKB_4DLL, QColor.darkRed); tileColors.put(TileType.CLKB_LL, QColor.darkRed); tileColors.put(TileType.CLKC, QColor.darkRed); tileColors.put(TileType.CLKC_50A, QColor.darkRed); tileColors.put(TileType.CLKC_LL, QColor.darkRed); tileColors.put(TileType.CLKH, QColor.darkRed); tileColors.put(TileType.CLKH_50A, QColor.darkRed); tileColors.put(TileType.CLKH_DCM_CC, QColor.darkRed); tileColors.put(TileType.CLKH_DCM_FT, QColor.darkRed); tileColors.put(TileType.CLKH_DCM_LL, QColor.darkRed); tileColors.put(TileType.CLKH_LL, QColor.darkRed); tileColors.put(TileType.CLKL, QColor.darkRed); tileColors.put(TileType.CLKLH_DCM, QColor.darkRed); tileColors.put(TileType.CLKLH_DCM_LL, QColor.darkRed); tileColors.put(TileType.CLKL_IOIS, QColor.darkRed); tileColors.put(TileType.CLKL_IOIS_50A, QColor.darkRed); tileColors.put(TileType.CLKL_IOIS_LL, QColor.darkRed); tileColors.put(TileType.CLKR, QColor.darkRed); tileColors.put(TileType.CLKRH_DCM, QColor.darkRed); tileColors.put(TileType.CLKRH_DCM_LL, QColor.darkRed); tileColors.put(TileType.CLKR_IOIS, QColor.darkRed); tileColors.put(TileType.CLKR_IOIS_50A, QColor.darkRed); tileColors.put(TileType.CLKR_IOIS_LL, QColor.darkRed); tileColors.put(TileType.CLKT, QColor.darkRed); tileColors.put(TileType.CLKT_2DLL, QColor.darkRed); tileColors.put(TileType.CLKT_4DLL, QColor.darkRed); tileColors.put(TileType.CLKT_LL, QColor.darkRed); tileColors.put(TileType.CLKV, QColor.darkRed); tileColors.put(TileType.CLKVC, QColor.darkRed); tileColors.put(TileType.CLKVCU1, QColor.darkRed); tileColors.put(TileType.CLKVCU2, QColor.darkRed); tileColors.put(TileType.CLKVC_LL, QColor.darkRed); tileColors.put(TileType.CLKVD1, QColor.darkRed); tileColors.put(TileType.CLKVD2, QColor.darkRed); tileColors.put(TileType.CLKVU1, QColor.darkRed); tileColors.put(TileType.CLKVU2, QColor.darkRed); tileColors.put(TileType.CLKV_DCM, QColor.darkRed); tileColors.put(TileType.CLKV_DCM_B, QColor.darkRed); tileColors.put(TileType.CLKV_DCM_LL, QColor.darkRed); tileColors.put(TileType.CLKV_DCM_T, QColor.darkRed); tileColors.put(TileType.CLKV_LL, QColor.darkRed); tileColors.put(TileType.CLKV_MC, QColor.darkRed); tileColors.put(TileType.CLK_BUFGCTRL_B, QColor.darkRed); tileColors.put(TileType.CLK_BUFGCTRL_T, QColor.darkRed); tileColors.put(TileType.CLK_BUFGMUX, QColor.darkRed); tileColors.put(TileType.CLK_CMT_BOT, QColor.darkRed); tileColors.put(TileType.CLK_CMT_BOT_MGT, QColor.darkRed); tileColors.put(TileType.CLK_CMT_TOP, QColor.darkRed); tileColors.put(TileType.CLK_CMT_TOP_MGT, QColor.darkRed); tileColors.put(TileType.CLK_HROW, QColor.darkRed); tileColors.put(TileType.CLK_HROW_MGT, QColor.darkRed); tileColors.put(TileType.CLK_IOB_B, QColor.darkRed); tileColors.put(TileType.CLK_IOB_T, QColor.darkRed); tileColors.put(TileType.CLK_MGT_BOT, QColor.darkRed); tileColors.put(TileType.CLK_MGT_BOT_MGT, QColor.darkRed); tileColors.put(TileType.CLK_MGT_TOP, QColor.darkRed); tileColors.put(TileType.CLK_MGT_TOP_MGT, QColor.darkRed); tileColors.put(TileType.CLK_TERM_B, QColor.darkRed); tileColors.put(TileType.CLK_TERM_BOT, QColor.darkRed); tileColors.put(TileType.CLK_TERM_T, QColor.darkRed); tileColors.put(TileType.CLK_TERM_TOP, QColor.darkRed); tileColors.put(TileType.CMT_BOT, QColor.darkRed); tileColors.put(TileType.CMT_BUFG_BOT, QColor.darkRed); tileColors.put(TileType.CMT_BUFG_TOP, QColor.darkRed); tileColors.put(TileType.CMT_CAP, QColor.darkRed); tileColors.put(TileType.CMT_DCM2_BOT, QColor.darkRed); tileColors.put(TileType.CMT_DCM2_TOP, QColor.darkRed); tileColors.put(TileType.CMT_DCM_BOT, QColor.darkRed); tileColors.put(TileType.CMT_DCM_TOP, QColor.darkRed); tileColors.put(TileType.CMT_HCLK_BOT25, QColor.darkRed); tileColors.put(TileType.CMT_PLL1_BOT, QColor.darkRed); tileColors.put(TileType.CMT_PLL2_BOT, QColor.darkRed); tileColors.put(TileType.CMT_PLL2_TOP, QColor.darkRed); tileColors.put(TileType.CMT_PLL3_BOT, QColor.darkRed); tileColors.put(TileType.CMT_PLL3_TOP, QColor.darkRed); tileColors.put(TileType.CMT_PLL_BOT, QColor.darkRed); tileColors.put(TileType.CMT_PLL_TOP, QColor.darkRed); tileColors.put(TileType.CMT_PMVA, QColor.darkRed); tileColors.put(TileType.CMT_PMVA_BELOW, QColor.darkRed); tileColors.put(TileType.CMT_PMVB, QColor.darkRed); tileColors.put(TileType.CMT_PMVB_BUF_ABOVE, QColor.darkRed); tileColors.put(TileType.CMT_PMVB_BUF_BELOW, QColor.darkRed); tileColors.put(TileType.CMT_TOP, QColor.darkRed); tileColors.put(TileType.CNR_BR_BTERM, QColor.darkGray); tileColors.put(TileType.CNR_BTERM, QColor.darkGray); tileColors.put(TileType.CNR_LBTERM, QColor.darkGray); tileColors.put(TileType.CNR_LTERM, QColor.darkGray); tileColors.put(TileType.CNR_LTTERM, QColor.darkGray); tileColors.put(TileType.CNR_RBTERM, QColor.darkGray); tileColors.put(TileType.CNR_RTERM, QColor.darkGray); tileColors.put(TileType.CNR_RTTERM, QColor.darkGray); tileColors.put(TileType.CNR_TL_LTERM, QColor.darkGray); tileColors.put(TileType.CNR_TR_RTERM, QColor.darkGray); tileColors.put(TileType.CNR_TR_TTERM, QColor.darkGray); tileColors.put(TileType.CNR_TTERM, QColor.darkGray); tileColors.put(TileType.COB_NO_TERM, QColor.darkGray); tileColors.put(TileType.COB_TERM_B, QColor.darkGray); tileColors.put(TileType.COB_TERM_T, QColor.darkGray); tileColors.put(TileType.DCM, QColor.darkRed); tileColors.put(TileType.DCMAUX_BL_CENTER, QColor.darkRed); tileColors.put(TileType.DCMAUX_TL_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_BGAP, QColor.darkRed); tileColors.put(TileType.DCM_BL_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_BL_TERM, QColor.darkRed); tileColors.put(TileType.DCM_BOT, QColor.darkRed); tileColors.put(TileType.DCM_BR_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_H_BL_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_H_BR_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_H_BR_TERM, QColor.darkRed); tileColors.put(TileType.DCM_H_TL_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_H_TR_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_H_TR_TERM, QColor.darkRed); tileColors.put(TileType.DCM_SPLY, QColor.darkRed); tileColors.put(TileType.DCM_TERM, QColor.darkRed); tileColors.put(TileType.DCM_TERM_MULT, QColor.darkRed); tileColors.put(TileType.DCM_TERM_NOMEM, QColor.darkRed); tileColors.put(TileType.DCM_TL_CENTER, QColor.darkRed); tileColors.put(TileType.DCM_TL_TERM, QColor.darkRed); tileColors.put(TileType.DCM_TR_CENTER, QColor.darkRed); tileColors.put(TileType.DSP, QColor.darkCyan); tileColors.put(TileType.DSP_BOT_BTERM_L, QColor.darkCyan); tileColors.put(TileType.DSP_BOT_BTERM_R, QColor.darkCyan); tileColors.put(TileType.DSP_CLB_HCLK_FEEDTHRU, QColor.darkCyan); tileColors.put(TileType.DSP_CLB_HCLK_FEEDTHRU_FOLD, QColor.darkCyan); tileColors.put(TileType.DSP_EMP_BOT, QColor.darkCyan); tileColors.put(TileType.DSP_EMP_TEMP, QColor.darkCyan); tileColors.put(TileType.DSP_EMP_TOP, QColor.darkCyan); tileColors.put(TileType.DSP_HCLK_FEEDTHRU_TOP, QColor.cyan); tileColors.put(TileType.DSP_HCLK_GCLK_FOLD, QColor.cyan); tileColors.put(TileType.DSP_HCLK_GCLK_NOFOLD, QColor.cyan); tileColors.put(TileType.DSP_INTER_TTERM, QColor.darkCyan); tileColors.put(TileType.DSP_INT_BTERM, QColor.darkCyan); tileColors.put(TileType.DSP_INT_EMP_BOT, QColor.darkCyan); tileColors.put(TileType.DSP_INT_EMP_TOP, QColor.darkCyan); tileColors.put(TileType.DSP_INT_HCLK_FEEDTHRU, QColor.cyan); tileColors.put(TileType.DSP_INT_HCLK_FEEDTHRU_FOLD, QColor.darkCyan); tileColors.put(TileType.DSP_INT_TTERM, QColor.darkCyan); tileColors.put(TileType.DSP_TOP_TTERM_L, QColor.darkCyan); tileColors.put(TileType.DSP_TOP_TTERM_R, QColor.darkCyan); tileColors.put(TileType.EMAC, QColor.black); tileColors.put(TileType.EMAC_DUMMY, QColor.black); tileColors.put(TileType.EMAC_INT_INTERFACE, QColor.black); tileColors.put(TileType.EMPTY, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY0X2, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY0X22, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY0X3, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY0X4, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY0X64, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY16X2, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY16X4, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY64X76, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY80X22, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY80X64, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_BIOI, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_BRAM, QColor.black); tileColors.put(TileType.EMPTY_BRAM_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_BRKH, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_BTERM, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CCM, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CFG_CENTER, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLB, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLB_BUFFER, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKC, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKC_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKC_LLTB, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKH_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKL_IOIS_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKL_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKR_IOIS_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKR_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLKV_DCM, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLK_BUFGCTRL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CLK_IOB, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CNR, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_CORNER, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_DCM, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_DCM_TERM, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_DSP, QColor.black); tileColors.put(TileType.EMPTY_EDGE_BRAM, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_EDGE_CONFIG, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_EDGE_DSP, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_EDGE_MGT, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_GCLKH, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_GCLKVML_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_GCLKVMR_LL, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_HCLK, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_HCLK_MGT, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_IOIS, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_MACC, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_MGT, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_MONITOR, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_PPC, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_TIOI, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_TTERM, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMPTY_VBRK, QColor.fromRgb(240, 141, 45)); tileColors.put(TileType.EMP_LIOB, QColor.darkGreen); tileColors.put(TileType.EMP_RIOB, QColor.darkGreen); tileColors.put(TileType.GBRKB, QColor.darkBlue); tileColors.put(TileType.GBRKC, QColor.darkBlue); tileColors.put(TileType.GBRKT, QColor.darkBlue); tileColors.put(TileType.GBRKV, QColor.darkBlue); tileColors.put(TileType.GCLKB, QColor.darkBlue); tileColors.put(TileType.GCLKC, QColor.darkBlue); tileColors.put(TileType.GCLKH, QColor.darkBlue); tileColors.put(TileType.GCLKHL_50A, QColor.darkBlue); tileColors.put(TileType.GCLKHR_50A, QColor.darkBlue); tileColors.put(TileType.GCLKH_PCI_CE_N, QColor.darkBlue); tileColors.put(TileType.GCLKH_PCI_CE_S, QColor.darkBlue); tileColors.put(TileType.GCLKH_PCI_CE_S_50A, QColor.darkBlue); tileColors.put(TileType.GCLKT, QColor.darkBlue); tileColors.put(TileType.GCLKV, QColor.darkBlue); tileColors.put(TileType.GCLKVC, QColor.darkBlue); tileColors.put(TileType.GCLKVM, QColor.darkBlue); tileColors.put(TileType.GCLKVML, QColor.darkBlue); tileColors.put(TileType.GCLKVMR, QColor.darkBlue); tileColors.put(TileType.GCLKV_IOIS, QColor.darkBlue); tileColors.put(TileType.GCLKV_IOISL, QColor.darkBlue); tileColors.put(TileType.GCLKV_IOISR, QColor.darkBlue); tileColors.put(TileType.GIGABIT10_IOI, QColor.black); tileColors.put(TileType.GIGABIT_IOI, QColor.black); tileColors.put(TileType.GT3, QColor.black); tileColors.put(TileType.GTH_BOT, QColor.black); tileColors.put(TileType.GTH_L_BOT, QColor.black); tileColors.put(TileType.GTH_L_TOP, QColor.black); tileColors.put(TileType.GTH_TOP, QColor.black); tileColors.put(TileType.GTPDUAL_BOT, QColor.black); tileColors.put(TileType.GTPDUAL_BOT_UNUSED, QColor.black); tileColors.put(TileType.GTPDUAL_CLB_FEEDTHRU, QColor.black); tileColors.put(TileType.GTPDUAL_DSP_FEEDTHRU, QColor.black); tileColors.put(TileType.GTPDUAL_INT_FEEDTHRU, QColor.black); tileColors.put(TileType.GTPDUAL_LEFT_CLB_FEEDTHRU, QColor.black); tileColors.put(TileType.GTPDUAL_LEFT_DSP_FEEDTHRU, QColor.black); tileColors.put(TileType.GTPDUAL_LEFT_INT_FEEDTHRU, QColor.black); tileColors.put(TileType.GTPDUAL_TOP, QColor.black); tileColors.put(TileType.GTPDUAL_TOP_UNUSED, QColor.black); tileColors.put(TileType.GTP_INT_INTERFACE, QColor.black); tileColors.put(TileType.GTX, QColor.black); tileColors.put(TileType.GTX_DUMMY, QColor.black); tileColors.put(TileType.GTX_INT_INTERFACE, QColor.black); tileColors.put(TileType.GTX_LEFT, QColor.black); tileColors.put(TileType.GTX_LEFT_INT_INTERFACE, QColor.black); tileColors.put(TileType.GTX_L_TERM_INT, QColor.black); tileColors.put(TileType.GT_INT_INTERFACE_TERM, QColor.black); tileColors.put(TileType.GT_L_INT_INTERFACE, QColor.black); tileColors.put(TileType.HCLK, QColor.cyan); tileColors.put(TileType.HCLK_BRAM, QColor.cyan); tileColors.put(TileType.HCLK_BRAM_FEEDTHRU, QColor.cyan); tileColors.put(TileType.HCLK_BRAM_FEEDTHRU_FOLD, QColor.cyan); tileColors.put(TileType.HCLK_BRAM_FX, QColor.cyan); tileColors.put(TileType.HCLK_BRAM_MGT, QColor.cyan); tileColors.put(TileType.HCLK_BRAM_MGT_LEFT, QColor.cyan); tileColors.put(TileType.HCLK_CENTER, QColor.cyan); tileColors.put(TileType.HCLK_CENTER_ABOVE_CFG, QColor.cyan); tileColors.put(TileType.HCLK_CLB, QColor.cyan); tileColors.put(TileType.HCLK_CLBLL, QColor.cyan); tileColors.put(TileType.HCLK_CLBLM, QColor.cyan); tileColors.put(TileType.HCLK_CLBLM_MGT, QColor.cyan); tileColors.put(TileType.HCLK_CLBLM_MGT_LEFT, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XL_CLE, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XL_CLE_FOLD, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XL_INT, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XL_INT_FOLD, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XM_CLE, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XM_CLE_FOLD, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XM_INT, QColor.cyan); tileColors.put(TileType.HCLK_CLB_XM_INT_FOLD, QColor.cyan); tileColors.put(TileType.HCLK_CMT_BOT, QColor.cyan); tileColors.put(TileType.HCLK_CMT_CMT, QColor.cyan); tileColors.put(TileType.HCLK_CMT_CMT_MGT, QColor.cyan); tileColors.put(TileType.HCLK_CMT_IOI, QColor.cyan); tileColors.put(TileType.HCLK_CMT_TOP, QColor.cyan); tileColors.put(TileType.HCLK_DCM, QColor.cyan); tileColors.put(TileType.HCLK_DCMIOB, QColor.cyan); tileColors.put(TileType.HCLK_DSP, QColor.cyan); tileColors.put(TileType.HCLK_FT, QColor.cyan); tileColors.put(TileType.HCLK_GT3, QColor.cyan); tileColors.put(TileType.HCLK_GTH, QColor.cyan); tileColors.put(TileType.HCLK_GTH_LEFT, QColor.cyan); tileColors.put(TileType.HCLK_GTX, QColor.cyan); tileColors.put(TileType.HCLK_GTX_DUMMY, QColor.cyan); tileColors.put(TileType.HCLK_GTX_LEFT, QColor.cyan); tileColors.put(TileType.HCLK_GT_EMP, QColor.cyan); tileColors.put(TileType.HCLK_INNER_IOI, QColor.cyan); tileColors.put(TileType.HCLK_INT_INTERFACE, QColor.cyan); tileColors.put(TileType.HCLK_IOB, QColor.cyan); tileColors.put(TileType.HCLK_IOBDCM, QColor.cyan); tileColors.put(TileType.HCLK_IOB_CMT_BOT, QColor.cyan); tileColors.put(TileType.HCLK_IOB_CMT_BOT_MGT, QColor.cyan); tileColors.put(TileType.HCLK_IOB_CMT_MID, QColor.cyan); tileColors.put(TileType.HCLK_IOB_CMT_MID_MGT, QColor.cyan); tileColors.put(TileType.HCLK_IOB_CMT_TOP, QColor.cyan); tileColors.put(TileType.HCLK_IOB_CMT_TOP_MGT, QColor.cyan); tileColors.put(TileType.HCLK_IOI, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_BOT_DN, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_BOT_SPLIT, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_BOT_UP, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_EMP, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_INT, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_INT_FOLD, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_TOP_DN, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_TOP_SPLIT, QColor.cyan); tileColors.put(TileType.HCLK_IOIL_TOP_UP, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_BOT_DN, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_BOT_SPLIT, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_BOT_UP, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_EMP, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_INT, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_INT_FOLD, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_TOP_DN, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_TOP_SPLIT, QColor.cyan); tileColors.put(TileType.HCLK_IOIR_TOP_UP, QColor.cyan); tileColors.put(TileType.HCLK_IOIS_DCI, QColor.cyan); tileColors.put(TileType.HCLK_IOIS_LVDS, QColor.cyan); tileColors.put(TileType.HCLK_IOI_BOTCEN, QColor.cyan); tileColors.put(TileType.HCLK_IOI_BOTCEN_MGT, QColor.cyan); tileColors.put(TileType.HCLK_IOI_CENTER, QColor.cyan); tileColors.put(TileType.HCLK_IOI_CMT, QColor.cyan); tileColors.put(TileType.HCLK_IOI_CMT_MGT, QColor.cyan); tileColors.put(TileType.HCLK_IOI_LTERM, QColor.cyan); tileColors.put(TileType.HCLK_IOI_LTERM_BOT25, QColor.cyan); tileColors.put(TileType.HCLK_IOI_RTERM, QColor.cyan); tileColors.put(TileType.HCLK_IOI_RTERM_BOT25, QColor.cyan); tileColors.put(TileType.HCLK_IOI_TOPCEN, QColor.cyan); tileColors.put(TileType.HCLK_IOI_TOPCEN_MGT, QColor.cyan); tileColors.put(TileType.HCLK_LIOB, QColor.cyan); tileColors.put(TileType.HCLK_MGT, QColor.cyan); tileColors.put(TileType.HCLK_OUTER_IOI, QColor.cyan); tileColors.put(TileType.HCLK_PCIE_BRAM, QColor.cyan); tileColors.put(TileType.HCLK_PPC, QColor.cyan); tileColors.put(TileType.HCLK_PPC_TERM, QColor.cyan); tileColors.put(TileType.HCLK_QBUF_L, QColor.cyan); tileColors.put(TileType.HCLK_QBUF_R, QColor.cyan); tileColors.put(TileType.HCLK_TERM, QColor.cyan); tileColors.put(TileType.HCLK_TERM_L, QColor.cyan); tileColors.put(TileType.HCLK_TERM_R, QColor.cyan); tileColors.put(TileType.HCLK_VBRK, QColor.cyan); tileColors.put(TileType.HCLK_VBRK_R, QColor.cyan); tileColors.put(TileType.HCLK_VFRAME, QColor.cyan); tileColors.put(TileType.INT, QColor.darkYellow); tileColors.put(TileType.INT_BRAM, QColor.darkYellow); tileColors.put(TileType.INT_BRAM_BRK, QColor.darkYellow); tileColors.put(TileType.INT_BRK, QColor.darkYellow); tileColors.put(TileType.INT_BUFS_L, QColor.darkYellow); tileColors.put(TileType.INT_BUFS_R, QColor.darkYellow); tileColors.put(TileType.INT_BUFS_R_MON, QColor.darkYellow); tileColors.put(TileType.INT_GCLK, QColor.darkYellow); tileColors.put(TileType.INT_HCLK_BUFS, QColor.cyan); tileColors.put(TileType.INT_INTERFACE, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_CARRY, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_IOI, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_IOI_DCMBOT, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_LTERM, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_REGC, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_RTERM, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_TERM, QColor.darkYellow); tileColors.put(TileType.INT_LTERM, QColor.darkYellow); tileColors.put(TileType.INT_RTERM, QColor.darkYellow); tileColors.put(TileType.INT_SO, QColor.darkYellow); tileColors.put(TileType.INT_SO_DCM0, QColor.darkYellow); tileColors.put(TileType.INT_TERM, QColor.darkYellow); tileColors.put(TileType.INT_TERM_BRK, QColor.darkYellow); tileColors.put(TileType.IOI, QColor.darkGreen); tileColors.put(TileType.IOIS_LC, QColor.darkGreen); tileColors.put(TileType.IOIS_LC_L, QColor.darkGreen); tileColors.put(TileType.IOIS_NC, QColor.darkGreen); tileColors.put(TileType.IOIS_NC_L, QColor.darkGreen); tileColors.put(TileType.IOI_BTERM, QColor.darkGreen); tileColors.put(TileType.IOI_BTERM_BUFPLL, QColor.darkGreen); tileColors.put(TileType.IOI_BTERM_CLB, QColor.darkGreen); tileColors.put(TileType.IOI_BTERM_REGB, QColor.darkGreen); tileColors.put(TileType.IOI_INT, QColor.darkYellow); tileColors.put(TileType.IOI_LTERM, QColor.darkGreen); tileColors.put(TileType.IOI_LTERM_LOWER_BOT, QColor.darkGreen); tileColors.put(TileType.IOI_LTERM_LOWER_TOP, QColor.darkGreen); tileColors.put(TileType.IOI_LTERM_UPPER_BOT, QColor.darkGreen); tileColors.put(TileType.IOI_LTERM_UPPER_TOP, QColor.darkGreen); tileColors.put(TileType.IOI_L_INT_INTERFACE, QColor.darkGreen); tileColors.put(TileType.IOI_L_INT_INTERFACE_TERM, QColor.darkGreen); tileColors.put(TileType.IOI_PCI_CE_LEFT, QColor.darkGreen); tileColors.put(TileType.IOI_PCI_CE_RIGHT, QColor.darkGreen); tileColors.put(TileType.IOI_RTERM, QColor.darkGreen); tileColors.put(TileType.IOI_RTERM_LOWER_BOT, QColor.darkGreen); tileColors.put(TileType.IOI_RTERM_LOWER_TOP, QColor.darkGreen); tileColors.put(TileType.IOI_RTERM_UPPER_BOT, QColor.darkGreen); tileColors.put(TileType.IOI_RTERM_UPPER_TOP, QColor.darkGreen); tileColors.put(TileType.IOI_TTERM, QColor.darkGreen); tileColors.put(TileType.IOI_TTERM_BUFPLL, QColor.darkGreen); tileColors.put(TileType.IOI_TTERM_CLB, QColor.darkGreen); tileColors.put(TileType.IOI_TTERM_REGT, QColor.darkGreen); tileColors.put(TileType.LBPPC, QColor.black); tileColors.put(TileType.LBRAM, QColor.darkMagenta); tileColors.put(TileType.LBRAMS2E_BOTP, QColor.darkMagenta); tileColors.put(TileType.LBRAMS2E_TOPP, QColor.darkMagenta); tileColors.put(TileType.LBRAM_BOTP, QColor.darkMagenta); tileColors.put(TileType.LBRAM_BOTS, QColor.darkMagenta); tileColors.put(TileType.LBRAM_BOTS_GCLK, QColor.darkMagenta); tileColors.put(TileType.LBRAM_TOPP, QColor.darkMagenta); tileColors.put(TileType.LBRAM_TOPS, QColor.darkMagenta); tileColors.put(TileType.LBRAM_TOPS_GCLK, QColor.darkMagenta); tileColors.put(TileType.LEFT, QColor.darkGreen); tileColors.put(TileType.LEFT_PCI_BOT, QColor.darkBlue); tileColors.put(TileType.LEFT_PCI_TOP, QColor.darkBlue); tileColors.put(TileType.LEMPTY0X2, QColor.black); tileColors.put(TileType.LEMPTY16X4, QColor.black); tileColors.put(TileType.LIBUFS, QColor.darkGreen); tileColors.put(TileType.LIBUFS_CLK_PCI, QColor.darkGreen); tileColors.put(TileType.LIBUFS_PCI, QColor.darkGreen); tileColors.put(TileType.LIOB, QColor.darkGreen); tileColors.put(TileType.LIOB_FT, QColor.darkGreen); tileColors.put(TileType.LIOB_MON, QColor.darkGreen); tileColors.put(TileType.LIOB_PCI, QColor.darkGreen); tileColors.put(TileType.LIOB_RDY, QColor.darkGreen); tileColors.put(TileType.LIOI, QColor.darkGreen); tileColors.put(TileType.LIOIS, QColor.darkGreen); tileColors.put(TileType.LIOIS_BRK, QColor.darkGreen); tileColors.put(TileType.LIOIS_CLK_PCI, QColor.darkGreen); tileColors.put(TileType.LIOIS_CLK_PCI_BRK, QColor.darkGreen); tileColors.put(TileType.LIOIS_PCI, QColor.darkGreen); tileColors.put(TileType.LIOI_BRK, QColor.darkGreen); tileColors.put(TileType.LIOI_INT, QColor.darkYellow); tileColors.put(TileType.LIOI_INT_BRK, QColor.darkYellow); tileColors.put(TileType.LL, QColor.black); tileColors.put(TileType.LLPPC_X0Y0_INT, QColor.black); tileColors.put(TileType.LLPPC_X1Y0_INT, QColor.black); tileColors.put(TileType.LPPC_X0Y0_INT, QColor.black); tileColors.put(TileType.LPPC_X1Y0_INT, QColor.black); tileColors.put(TileType.LR, QColor.black); tileColors.put(TileType.LR_BRKH, QColor.black); tileColors.put(TileType.LR_CLKH, QColor.black); tileColors.put(TileType.LR_GCLKH, QColor.black); tileColors.put(TileType.LR_IOIS, QColor.darkGreen); tileColors.put(TileType.LR_LOWER, QColor.black); tileColors.put(TileType.LR_UPPER, QColor.black); tileColors.put(TileType.LTERM, QColor.darkGray); tileColors.put(TileType.LTERM010, QColor.darkGray); tileColors.put(TileType.LTERM1, QColor.darkGray); tileColors.put(TileType.LTERM2, QColor.darkGray); tileColors.put(TileType.LTERM210, QColor.darkGray); tileColors.put(TileType.LTERM210_PCI, QColor.darkGray); tileColors.put(TileType.LTERM3, QColor.darkGray); tileColors.put(TileType.LTERM321, QColor.darkGray); tileColors.put(TileType.LTERM323, QColor.darkGray); tileColors.put(TileType.LTERM323_PCI, QColor.darkGray); tileColors.put(TileType.LTERM4, QColor.darkGray); tileColors.put(TileType.LTERM4B, QColor.darkGray); tileColors.put(TileType.LTERM4CLK, QColor.darkGray); tileColors.put(TileType.LTERMCLK, QColor.darkGray); tileColors.put(TileType.LTERMCLKA, QColor.darkGray); tileColors.put(TileType.L_TERM_INT, QColor.darkGray); tileColors.put(TileType.L_TERM_PPC, QColor.darkGray); tileColors.put(TileType.L_TERM_PPC_EXT, QColor.darkGray); tileColors.put(TileType.MACC0_SMALL, QColor.darkCyan); tileColors.put(TileType.MACC0_SMALL_BOT, QColor.darkCyan); tileColors.put(TileType.MACC1_SMALL, QColor.darkCyan); tileColors.put(TileType.MACC2_FEEDTHRUH, QColor.darkCyan); tileColors.put(TileType.MACC2_GCLKH_FEEDTHRUA, QColor.darkCyan); tileColors.put(TileType.MACC2_SMALL, QColor.darkCyan); tileColors.put(TileType.MACC3_SMALL, QColor.darkCyan); tileColors.put(TileType.MACC3_SMALL_BRK, QColor.darkCyan); tileColors.put(TileType.MACC3_SMALL_TOP, QColor.darkCyan); tileColors.put(TileType.MACCSITE2, QColor.darkCyan); tileColors.put(TileType.MACCSITE2_BOT, QColor.darkCyan); tileColors.put(TileType.MACCSITE2_BRK, QColor.darkCyan); tileColors.put(TileType.MACCSITE2_DUMMY, QColor.darkCyan); tileColors.put(TileType.MACCSITE2_TOP, QColor.darkCyan); tileColors.put(TileType.MBRAM, QColor.darkMagenta); tileColors.put(TileType.MBRAMS2E, QColor.darkMagenta); tileColors.put(TileType.MCB_CAP_CLKPN, QColor.black); tileColors.put(TileType.MCB_CAP_INT, QColor.black); tileColors.put(TileType.MCB_CAP_INT_BRK, QColor.black); tileColors.put(TileType.MCB_CNR_TOP, QColor.black); tileColors.put(TileType.MCB_DUMMY, QColor.black); tileColors.put(TileType.MCB_HCLK, QColor.cyan); tileColors.put(TileType.MCB_INT, QColor.black); tileColors.put(TileType.MCB_INT_BOT, QColor.black); tileColors.put(TileType.MCB_INT_BOT25, QColor.black); tileColors.put(TileType.MCB_INT_DQI, QColor.black); tileColors.put(TileType.MCB_INT_DUMMY, QColor.black); tileColors.put(TileType.MCB_INT_ULDM, QColor.black); tileColors.put(TileType.MCB_L, QColor.black); tileColors.put(TileType.MCB_L_BOT, QColor.black); tileColors.put(TileType.MCB_MUI0R, QColor.black); tileColors.put(TileType.MCB_MUI0W, QColor.black); tileColors.put(TileType.MCB_MUI1R, QColor.black); tileColors.put(TileType.MCB_MUI1W, QColor.black); tileColors.put(TileType.MCB_MUI2, QColor.black); tileColors.put(TileType.MCB_MUI3, QColor.black); tileColors.put(TileType.MCB_MUI4, QColor.black); tileColors.put(TileType.MCB_MUI5, QColor.black); tileColors.put(TileType.MCB_MUI_DUMMY, QColor.black); tileColors.put(TileType.MCB_REGH, QColor.black); tileColors.put(TileType.MGT_AL, QColor.black); tileColors.put(TileType.MGT_AL_BOT, QColor.black); tileColors.put(TileType.MGT_AL_MID, QColor.black); tileColors.put(TileType.MGT_AR, QColor.black); tileColors.put(TileType.MGT_AR_BOT, QColor.black); tileColors.put(TileType.MGT_AR_MID, QColor.black); tileColors.put(TileType.MGT_BL, QColor.black); tileColors.put(TileType.MGT_BR, QColor.black); tileColors.put(TileType.MGT_R, QColor.black); tileColors.put(TileType.MK_B_IOIS, QColor.black); tileColors.put(TileType.MK_CLKB, QColor.black); tileColors.put(TileType.MK_CLKT, QColor.black); tileColors.put(TileType.MK_T_IOIS, QColor.black); tileColors.put(TileType.ML_BCLKTERM012, QColor.black); tileColors.put(TileType.ML_BCLKTERM123, QColor.black); tileColors.put(TileType.ML_BRAMSITE_IOIS, QColor.black); tileColors.put(TileType.ML_BRAM_IOIS, QColor.black); tileColors.put(TileType.ML_CLKB, QColor.black); tileColors.put(TileType.ML_CLKH, QColor.black); tileColors.put(TileType.ML_CLKT, QColor.black); tileColors.put(TileType.ML_CNR_BTERM, QColor.black); tileColors.put(TileType.ML_LR_CLKH, QColor.black); tileColors.put(TileType.ML_TBS_IOIS, QColor.black); tileColors.put(TileType.ML_TB_IOIS, QColor.black); tileColors.put(TileType.ML_TCLKTERM210, QColor.black); tileColors.put(TileType.ML_TTERM010, QColor.black); tileColors.put(TileType.NULL, QColor.black); tileColors.put(TileType.PB, QColor.black); tileColors.put(TileType.PCIE, QColor.black); tileColors.put(TileType.PCIE_B, QColor.black); tileColors.put(TileType.PCIE_BRAM, QColor.black); tileColors.put(TileType.PCIE_BRKH, QColor.black); tileColors.put(TileType.PCIE_INT_INTERFACE, QColor.black); tileColors.put(TileType.PCIE_INT_INTERFACE_L, QColor.black); tileColors.put(TileType.PCIE_INT_INTERFACE_R, QColor.black); tileColors.put(TileType.PCIE_T, QColor.black); tileColors.put(TileType.PCIE_TOP, QColor.black); tileColors.put(TileType.PCIE_TOP_CLB_FEEDTHRU, QColor.black); tileColors.put(TileType.PCIE_TOP_INT_FEEDTHRU, QColor.black); tileColors.put(TileType.PCIE_TOP_UNUSED, QColor.black); tileColors.put(TileType.PPC_B, QColor.black); tileColors.put(TileType.PPC_BR, QColor.black); tileColors.put(TileType.PPC_BRAM_B, QColor.black); tileColors.put(TileType.PPC_BRAM_T, QColor.black); tileColors.put(TileType.PPC_B_PB, QColor.black); tileColors.put(TileType.PPC_B_TERM, QColor.black); tileColors.put(TileType.PPC_L_INT_INTERFACE, QColor.black); tileColors.put(TileType.PPC_R, QColor.black); tileColors.put(TileType.PPC_R_INT_INTERFACE, QColor.black); tileColors.put(TileType.PPC_R_PB, QColor.black); tileColors.put(TileType.PPC_R_PT, QColor.black); tileColors.put(TileType.PPC_T, QColor.black); tileColors.put(TileType.PPC_TR, QColor.black); tileColors.put(TileType.PPC_T_PT, QColor.black); tileColors.put(TileType.PPC_T_TERM, QColor.black); tileColors.put(TileType.PT, QColor.black); tileColors.put(TileType.PTERMB, QColor.black); tileColors.put(TileType.PTERMBR, QColor.black); tileColors.put(TileType.PTERMR, QColor.black); tileColors.put(TileType.PTERMT, QColor.black); tileColors.put(TileType.PTERMTR, QColor.black); tileColors.put(TileType.RAMB_BOT, QColor.black); tileColors.put(TileType.RAMB_BOT_BTERM, QColor.black); tileColors.put(TileType.RAMB_TOP, QColor.black); tileColors.put(TileType.RAMB_TOP_TTERM, QColor.black); tileColors.put(TileType.RBPPC, QColor.black); tileColors.put(TileType.RBRAM, QColor.darkMagenta); tileColors.put(TileType.RBRAMS2E_BOTP, QColor.darkMagenta); tileColors.put(TileType.RBRAMS2E_TOPP, QColor.darkMagenta); tileColors.put(TileType.RBRAM_BOTP, QColor.darkMagenta); tileColors.put(TileType.RBRAM_BOTS, QColor.darkMagenta); tileColors.put(TileType.RBRAM_BOTS_GCLK, QColor.darkMagenta); tileColors.put(TileType.RBRAM_TOPP, QColor.darkMagenta); tileColors.put(TileType.RBRAM_TOPS, QColor.darkMagenta); tileColors.put(TileType.RBRAM_TOPS_GCLK, QColor.darkMagenta); tileColors.put(TileType.REGC_CLE, QColor.darkBlue); tileColors.put(TileType.REGC_INT, QColor.darkBlue); tileColors.put(TileType.REGH_BRAM_FEEDTHRU, QColor.darkBlue); tileColors.put(TileType.REGH_BRAM_FEEDTHRU_L_GCLK, QColor.darkBlue); tileColors.put(TileType.REGH_BRAM_FEEDTHRU_R_GCLK, QColor.darkBlue); tileColors.put(TileType.REGH_CLEXL_CLE, QColor.darkBlue); tileColors.put(TileType.REGH_CLEXL_INT, QColor.darkBlue); tileColors.put(TileType.REGH_CLEXL_INT_CLK, QColor.darkBlue); tileColors.put(TileType.REGH_CLEXM_CLE, QColor.darkBlue); tileColors.put(TileType.REGH_CLEXM_INT, QColor.darkBlue); tileColors.put(TileType.REGH_CLEXM_INT_GCLKL, QColor.darkBlue); tileColors.put(TileType.REGH_DSP_CLB, QColor.darkBlue); tileColors.put(TileType.REGH_DSP_INT, QColor.darkBlue); tileColors.put(TileType.REGH_DSP_L, QColor.darkBlue); tileColors.put(TileType.REGH_DSP_L_NOCLK, QColor.darkBlue); tileColors.put(TileType.REGH_DSP_R, QColor.darkBlue); tileColors.put(TileType.REGH_IOI, QColor.darkBlue); tileColors.put(TileType.REGH_IOI_BOT25, QColor.darkBlue); tileColors.put(TileType.REGH_IOI_LTERM, QColor.darkBlue); tileColors.put(TileType.REGH_IOI_RTERM, QColor.darkBlue); tileColors.put(TileType.REGH_LIOI_INT, QColor.darkBlue); tileColors.put(TileType.REGH_LIOI_INT_BOT25, QColor.darkBlue); tileColors.put(TileType.REGH_RIOI, QColor.darkBlue); tileColors.put(TileType.REGH_RIOI_BOT25, QColor.darkBlue); tileColors.put(TileType.REGH_RIOI_INT, QColor.darkBlue); tileColors.put(TileType.REGH_RIOI_INT_BOT25, QColor.darkBlue); tileColors.put(TileType.REG_B, QColor.darkBlue); tileColors.put(TileType.REG_B_BTERM, QColor.darkBlue); tileColors.put(TileType.REG_C_CMT, QColor.darkBlue); tileColors.put(TileType.REG_L, QColor.darkBlue); tileColors.put(TileType.REG_LB, QColor.darkBlue); tileColors.put(TileType.REG_R, QColor.darkBlue); tileColors.put(TileType.REG_RB, QColor.darkBlue); tileColors.put(TileType.REG_T, QColor.darkBlue); tileColors.put(TileType.REG_T_TTERM, QColor.darkBlue); tileColors.put(TileType.REG_V, QColor.darkBlue); tileColors.put(TileType.REG_V_BRK, QColor.darkBlue); tileColors.put(TileType.REG_V_BTERM, QColor.darkBlue); tileColors.put(TileType.REG_V_HCLK, QColor.darkBlue); tileColors.put(TileType.REG_V_HCLKBUF_BOT, QColor.darkBlue); tileColors.put(TileType.REG_V_HCLKBUF_TOP, QColor.darkBlue); tileColors.put(TileType.REG_V_HCLK_BOT25, QColor.darkBlue); tileColors.put(TileType.REG_V_MEMB_BOT, QColor.darkBlue); tileColors.put(TileType.REG_V_MEMB_TOP, QColor.darkBlue); tileColors.put(TileType.REG_V_MIDBUF_BOT, QColor.darkBlue); tileColors.put(TileType.REG_V_MIDBUF_TOP, QColor.darkBlue); tileColors.put(TileType.REG_V_TTERM, QColor.darkBlue); tileColors.put(TileType.REMPTY0X2, QColor.black); tileColors.put(TileType.REMPTY16X4, QColor.black); tileColors.put(TileType.RIBUFS, QColor.darkGreen); tileColors.put(TileType.RIBUFS_BRK, QColor.darkGreen); tileColors.put(TileType.RIBUFS_CLK_PCI, QColor.darkGreen); tileColors.put(TileType.RIBUFS_CLK_PCI_BRK, QColor.darkGreen); tileColors.put(TileType.RIBUFS_PCI, QColor.darkGreen); tileColors.put(TileType.RIGHT, QColor.darkGreen); tileColors.put(TileType.RIGHT_PCI_BOT, QColor.darkBlue); tileColors.put(TileType.RIGHT_PCI_TOP, QColor.darkBlue); tileColors.put(TileType.RIOB, QColor.darkGreen); tileColors.put(TileType.RIOB_PCI, QColor.darkGreen); tileColors.put(TileType.RIOB_RDY, QColor.darkGreen); tileColors.put(TileType.RIOI, QColor.darkGreen); tileColors.put(TileType.RIOIS, QColor.darkGreen); tileColors.put(TileType.RIOIS_CLK_PCI, QColor.darkGreen); tileColors.put(TileType.RIOIS_PCI, QColor.darkGreen); tileColors.put(TileType.RIOI_BRK, QColor.darkGreen); tileColors.put(TileType.RPPC_X0Y0_INT, QColor.black); tileColors.put(TileType.RPPC_X1Y0_INT, QColor.black); tileColors.put(TileType.RTERM, QColor.darkGray); tileColors.put(TileType.RTERM010, QColor.darkGray); tileColors.put(TileType.RTERM1, QColor.darkGray); tileColors.put(TileType.RTERM2, QColor.darkGray); tileColors.put(TileType.RTERM210, QColor.darkGray); tileColors.put(TileType.RTERM210_PCI, QColor.darkGray); tileColors.put(TileType.RTERM3, QColor.darkGray); tileColors.put(TileType.RTERM321, QColor.darkGray); tileColors.put(TileType.RTERM323, QColor.darkGray); tileColors.put(TileType.RTERM323_PCI, QColor.darkGray); tileColors.put(TileType.RTERM4, QColor.darkGray); tileColors.put(TileType.RTERM4B, QColor.darkGray); tileColors.put(TileType.RTERM4CLK, QColor.darkGray); tileColors.put(TileType.RTERM4CLKB, QColor.darkGray); tileColors.put(TileType.RTERMCLKA, QColor.darkGray); tileColors.put(TileType.RTERMCLKB, QColor.darkGray); tileColors.put(TileType.R_TERM_INT, QColor.darkGray); tileColors.put(TileType.R_TERM_INT_D, QColor.darkGray); tileColors.put(TileType.R_TERM_PPC, QColor.darkGray); tileColors.put(TileType.SITE_FEEDTHRU, QColor.black); tileColors.put(TileType.SYS_MON, QColor.black); tileColors.put(TileType.TBSTERM, QColor.darkGray); tileColors.put(TileType.TB_IOIS, QColor.darkGreen); tileColors.put(TileType.TCLKTERM2, QColor.darkGray); tileColors.put(TileType.TCLKTERM210, QColor.darkGray); tileColors.put(TileType.TCLKTERM3, QColor.darkGray); tileColors.put(TileType.TCLKTERM321, QColor.darkGray); tileColors.put(TileType.TGCLKVTERM, QColor.darkGray); tileColors.put(TileType.TGIGABIT, QColor.black); tileColors.put(TileType.TGIGABIT10, QColor.black); tileColors.put(TileType.TGIGABIT10_INT0, QColor.black); tileColors.put(TileType.TGIGABIT10_INT1, QColor.black); tileColors.put(TileType.TGIGABIT10_INT2, QColor.black); tileColors.put(TileType.TGIGABIT10_INT3, QColor.black); tileColors.put(TileType.TGIGABIT10_INT4, QColor.black); tileColors.put(TileType.TGIGABIT10_INT5, QColor.black); tileColors.put(TileType.TGIGABIT10_INT6, QColor.black); tileColors.put(TileType.TGIGABIT10_INT7, QColor.black); tileColors.put(TileType.TGIGABIT10_INT8, QColor.black); tileColors.put(TileType.TGIGABIT10_INT_TERM, QColor.black); tileColors.put(TileType.TGIGABIT10_IOI_TERM, QColor.black); tileColors.put(TileType.TGIGABIT10_TERM, QColor.black); tileColors.put(TileType.TGIGABIT_INT0, QColor.black); tileColors.put(TileType.TGIGABIT_INT1, QColor.black); tileColors.put(TileType.TGIGABIT_INT2, QColor.black); tileColors.put(TileType.TGIGABIT_INT3, QColor.black); tileColors.put(TileType.TGIGABIT_INT4, QColor.black); tileColors.put(TileType.TGIGABIT_INT_TERM, QColor.black); tileColors.put(TileType.TGIGABIT_IOI_TERM, QColor.black); tileColors.put(TileType.TGIGABIT_TERM, QColor.black); tileColors.put(TileType.TIBUFS, QColor.darkGreen); tileColors.put(TileType.TIOB, QColor.darkGreen); tileColors.put(TileType.TIOB_SINGLE, QColor.darkGreen); tileColors.put(TileType.TIOIB, QColor.darkGreen); tileColors.put(TileType.TIOIS, QColor.darkGreen); tileColors.put(TileType.TIOI_INNER, QColor.darkGreen); tileColors.put(TileType.TIOI_INNER_UNUSED, QColor.darkGreen); tileColors.put(TileType.TIOI_OUTER, QColor.darkGreen); tileColors.put(TileType.TL_DLLIOB, QColor.darkGreen); tileColors.put(TileType.TOP, QColor.darkGreen); tileColors.put(TileType.TPPC_X0Y0_INT, QColor.black); tileColors.put(TileType.TPPC_X1Y0_INT, QColor.black); tileColors.put(TileType.TR_DLLIOB, QColor.darkGreen); tileColors.put(TileType.TTERM, QColor.darkGray); tileColors.put(TileType.TTERM010, QColor.darkGray); tileColors.put(TileType.TTERM1, QColor.darkGray); tileColors.put(TileType.TTERM1_MACC, QColor.darkGray); tileColors.put(TileType.TTERM2, QColor.darkGray); tileColors.put(TileType.TTERM210, QColor.darkGray); tileColors.put(TileType.TTERM2CLK, QColor.darkGray); tileColors.put(TileType.TTERM3, QColor.darkGray); tileColors.put(TileType.TTERM321, QColor.darkGray); tileColors.put(TileType.TTERM323, QColor.darkGray); tileColors.put(TileType.TTERM4, QColor.darkGray); tileColors.put(TileType.TTERM4CLK, QColor.darkGray); tileColors.put(TileType.TTERM4_BRAM2, QColor.darkGray); tileColors.put(TileType.TTERMCLK, QColor.darkGray); tileColors.put(TileType.TTERMCLKA, QColor.darkGray); tileColors.put(TileType.T_TERM_DSP, QColor.darkGray); tileColors.put(TileType.T_TERM_INT, QColor.darkGray); tileColors.put(TileType.T_TERM_INT_D, QColor.darkGray); tileColors.put(TileType.UL, QColor.black); tileColors.put(TileType.ULPPC_X0Y0_INT, QColor.black); tileColors.put(TileType.ULPPC_X1Y0_INT, QColor.black); tileColors.put(TileType.UR, QColor.black); tileColors.put(TileType.UR_LOWER, QColor.black); tileColors.put(TileType.UR_UPPER, QColor.black); tileColors.put(TileType.VBRK, QColor.darkBlue); tileColors.put(TileType.VFRAME, QColor.black); tileColors.put(TileType.VFRAME_NOMON, QColor.black); tileColors.put(TileType.BRAM_INT_INTERFACE_L, QColor.darkYellow); tileColors.put(TileType.BRAM_INT_INTERFACE_R, QColor.darkYellow); tileColors.put(TileType.BRAM_L, QColor.darkMagenta); tileColors.put(TileType.BRAM_L_FLY, QColor.black); tileColors.put(TileType.BRAM_R, QColor.darkMagenta); tileColors.put(TileType.BRKH_CLK, QColor.darkBlue); tileColors.put(TileType.BRKH_DSP_L, QColor.darkBlue); tileColors.put(TileType.BRKH_DSP_R, QColor.darkBlue); tileColors.put(TileType.BRKH_TERM_INT, QColor.darkBlue); tileColors.put(TileType.B_TERM_INT_NOUTURN, QColor.black); tileColors.put(TileType.B_TERM_INT_SLV, QColor.black); tileColors.put(TileType.CFG_CENTER_BOT, QColor.black); tileColors.put(TileType.CFG_CENTER_MID, QColor.black); tileColors.put(TileType.CFG_CENTER_MID_SLAVE, QColor.black); tileColors.put(TileType.CFG_CENTER_TOP, QColor.black); tileColors.put(TileType.CFG_CENTER_TOP_SLAVE, QColor.black); tileColors.put(TileType.CLBLL_L, QColor.blue); tileColors.put(TileType.CLBLL_R, QColor.blue); tileColors.put(TileType.CLBLM_L, QColor.blue); tileColors.put(TileType.CLBLM_R, QColor.blue); tileColors.put(TileType.CLK_BALI_REBUF, QColor.black); tileColors.put(TileType.CLK_BUFG_BOT_R, QColor.black); tileColors.put(TileType.CLK_BUFG_REBUF, QColor.black); tileColors.put(TileType.CLK_BUFG_TOP_R, QColor.black); tileColors.put(TileType.CLK_FEED, QColor.black); tileColors.put(TileType.CLK_HROW_BOT_R, QColor.black); tileColors.put(TileType.CLK_HROW_TOP_R, QColor.black); tileColors.put(TileType.CLK_PMV, QColor.black); tileColors.put(TileType.CLK_TERM, QColor.black); tileColors.put(TileType.CMT_FIFO_L, QColor.black); tileColors.put(TileType.CMT_FIFO_R, QColor.black); tileColors.put(TileType.CMT_PMV, QColor.black); tileColors.put(TileType.CMT_PMV_L, QColor.black); tileColors.put(TileType.CMT_TOP_L_LOWER_B, QColor.black); tileColors.put(TileType.CMT_TOP_L_LOWER_T, QColor.black); tileColors.put(TileType.CMT_TOP_L_UPPER_B, QColor.black); tileColors.put(TileType.CMT_TOP_L_UPPER_T, QColor.black); tileColors.put(TileType.CMT_TOP_R_LOWER_B, QColor.black); tileColors.put(TileType.CMT_TOP_R_LOWER_T, QColor.black); tileColors.put(TileType.CMT_TOP_R_UPPER_B, QColor.black); tileColors.put(TileType.CMT_TOP_R_UPPER_T, QColor.black); tileColors.put(TileType.DSP_L, QColor.darkCyan); tileColors.put(TileType.DSP_R, QColor.darkCyan); tileColors.put(TileType.GTX_CHANNEL_0, QColor.black); tileColors.put(TileType.GTX_CHANNEL_1, QColor.black); tileColors.put(TileType.GTX_CHANNEL_2, QColor.black); tileColors.put(TileType.GTX_CHANNEL_3, QColor.black); tileColors.put(TileType.GTX_COMMON, QColor.black); tileColors.put(TileType.GTX_INT_INTERFACE_L, QColor.black); tileColors.put(TileType.HCLK_CMT, QColor.cyan); tileColors.put(TileType.HCLK_CMT_L, QColor.cyan); tileColors.put(TileType.HCLK_DSP_L, QColor.cyan); tileColors.put(TileType.HCLK_DSP_R, QColor.cyan); tileColors.put(TileType.HCLK_FEEDTHRU_1, QColor.cyan); tileColors.put(TileType.HCLK_FEEDTHRU_2, QColor.cyan); tileColors.put(TileType.HCLK_FIFO_L, QColor.cyan); tileColors.put(TileType.HCLK_IOI3, QColor.cyan); tileColors.put(TileType.HCLK_L, QColor.cyan); tileColors.put(TileType.HCLK_L_BOT_UTURN, QColor.cyan); tileColors.put(TileType.HCLK_L_SLV, QColor.cyan); tileColors.put(TileType.HCLK_R, QColor.cyan); tileColors.put(TileType.HCLK_R_BOT_UTURN, QColor.cyan); tileColors.put(TileType.HCLK_R_SLV, QColor.cyan); tileColors.put(TileType.HCLK_TERM_GTX, QColor.cyan); tileColors.put(TileType.INT_FEEDTHRU_1, QColor.darkYellow); tileColors.put(TileType.INT_FEEDTHRU_2, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_L, QColor.darkYellow); tileColors.put(TileType.INT_INTERFACE_R, QColor.darkYellow); tileColors.put(TileType.INT_L, QColor.darkYellow); tileColors.put(TileType.INT_L_SLV, QColor.darkYellow); tileColors.put(TileType.INT_L_SLV_FLY, QColor.darkYellow); tileColors.put(TileType.INT_R, QColor.darkYellow); tileColors.put(TileType.INT_R_SLV, QColor.darkYellow); tileColors.put(TileType.INT_R_SLV_FLY, QColor.darkYellow); tileColors.put(TileType.IO_INT_INTERFACE_L, QColor.darkYellow); tileColors.put(TileType.IO_INT_INTERFACE_R, QColor.darkYellow); tileColors.put(TileType.LIOB18, QColor.black); tileColors.put(TileType.LIOB18_SING, QColor.black); tileColors.put(TileType.LIOB33, QColor.black); tileColors.put(TileType.LIOB33_SING, QColor.black); tileColors.put(TileType.LIOI3, QColor.black); tileColors.put(TileType.LIOI3_SING, QColor.black); tileColors.put(TileType.LIOI3_TBYTESRC, QColor.black); tileColors.put(TileType.LIOI3_TBYTETERM, QColor.black); tileColors.put(TileType.LIOI_SING, QColor.black); tileColors.put(TileType.LIOI_TBYTESRC, QColor.black); tileColors.put(TileType.LIOI_TBYTETERM, QColor.black); tileColors.put(TileType.MONITOR_BOT, QColor.black); tileColors.put(TileType.MONITOR_BOT_FUJI2, QColor.black); tileColors.put(TileType.MONITOR_BOT_SLAVE, QColor.black); tileColors.put(TileType.MONITOR_MID, QColor.black); tileColors.put(TileType.MONITOR_MID_FUJI2, QColor.black); tileColors.put(TileType.MONITOR_TOP, QColor.black); tileColors.put(TileType.MONITOR_TOP_FUJI2, QColor.black); tileColors.put(TileType.PCIE_BOT, QColor.black); tileColors.put(TileType.PCIE_BOT_LEFT, QColor.black); tileColors.put(TileType.PCIE_INT_INTERFACE_LEFT_L, QColor.black); tileColors.put(TileType.PCIE_NULL, QColor.black); tileColors.put(TileType.PCIE_TOP_LEFT, QColor.black); tileColors.put(TileType.RIOB18, QColor.black); tileColors.put(TileType.RIOB18_SING, QColor.black); tileColors.put(TileType.RIOI_SING, QColor.black); tileColors.put(TileType.RIOI_TBYTESRC, QColor.black); tileColors.put(TileType.RIOI_TBYTETERM, QColor.black); tileColors.put(TileType.R_TERM_INT_GTX, QColor.black); tileColors.put(TileType.TERM_CMT, QColor.black); tileColors.put(TileType.T_TERM_INT_NOUTURN, QColor.black); tileColors.put(TileType.T_TERM_INT_SLV, QColor.black); tileColors.put(TileType.VBRK_EXT, QColor.black); } | /**
* Gets a suggested color based on the tile's tileType.
*
* @param tile The tile for which to get the color suggestion.
* @return A suggested color, or null if none exists.
*/ | Gets a suggested color based on the tile's tileType | getSuggestedTileColor | {
"repo_name": "ComputerArchitectureGroupPWr/JGenerilo",
"path": "src/main/java/edu/byu/ece/rapidSmith/gui/TileColors.java",
"license": "mit",
"size": 66881
} | [
"com.trolltech.qt.gui.QColor",
"edu.byu.ece.rapidSmith.device.TileType",
"java.util.HashMap"
] | import com.trolltech.qt.gui.QColor; import edu.byu.ece.rapidSmith.device.TileType; import java.util.HashMap; | import com.trolltech.qt.gui.*; import edu.byu.ece.*; import java.util.*; | [
"com.trolltech.qt",
"edu.byu.ece",
"java.util"
] | com.trolltech.qt; edu.byu.ece; java.util; | 1,155,079 |
public static PyObject newInstance(String className) {
PyObject pyClass = JythonUtils.getInterpreter().get(className);
PyObject pyObject = pyClass.__call__();
return pyObject;
} | static PyObject function(String className) { PyObject pyClass = JythonUtils.getInterpreter().get(className); PyObject pyObject = pyClass.__call__(); return pyObject; } | /**
* Instantiate new instance of the Jython class
*
* @param className Jython class name
* @return new instance of class
*/ | Instantiate new instance of the Jython class | newInstance | {
"repo_name": "basio/graph",
"path": "giraph-core/src/main/java/org/apache/giraph/jython/JythonUtils.java",
"license": "apache-2.0",
"size": 3227
} | [
"org.python.core.PyObject"
] | import org.python.core.PyObject; | import org.python.core.*; | [
"org.python.core"
] | org.python.core; | 2,452,330 |
public int getSettlementIndex(Settlement settlement) {
if (containsSettlement(settlement))
return settlements.indexOf(settlement);
else
return -1;
}
| int function(Settlement settlement) { if (containsSettlement(settlement)) return settlements.indexOf(settlement); else return -1; } | /**
* Gets the index a given settlement is at.
*
* @param settlement the settlement to check for.
* @return the index for the settlement or -1 if not in list.
*/ | Gets the index a given settlement is at | getSettlementIndex | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/tool/mission/SettlementListModel.java",
"license": "gpl-3.0",
"size": 5056
} | [
"org.mars_sim.msp.core.structure.Settlement"
] | import org.mars_sim.msp.core.structure.Settlement; | import org.mars_sim.msp.core.structure.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 175,601 |
public final Iterator<InstructionHandle[]> search( String pattern, InstructionHandle from ) {
return search(pattern, from, null);
} | final Iterator<InstructionHandle[]> function( String pattern, InstructionHandle from ) { return search(pattern, from, null); } | /**
* Start search beginning from `from'.
*
* @param pattern
* the instruction pattern to search for, where case is ignored
* @param from
* where to start the search in the instruction list
* @return iterator of matches where e.nextElement() returns an array of
* instruction handles describing the matched area
*/ | Start search beginning from `from' | search | {
"repo_name": "Maccimo/commons-bcel",
"path": "src/main/java/org/apache/bcel/util/InstructionFinder.java",
"license": "apache-2.0",
"size": 20554
} | [
"java.util.Iterator",
"org.apache.bcel.generic.InstructionHandle"
] | import java.util.Iterator; import org.apache.bcel.generic.InstructionHandle; | import java.util.*; import org.apache.bcel.generic.*; | [
"java.util",
"org.apache.bcel"
] | java.util; org.apache.bcel; | 1,139,663 |
FieldMap putAll(Map<String, Field> fieldMap); | FieldMap putAll(Map<String, Field> fieldMap); | /**
* Add or update all fields in the given map.
*
* @param fieldMap
* @return
*/ | Add or update all fields in the given map | putAll | {
"repo_name": "gentics/mesh",
"path": "rest-model/src/main/java/com/gentics/mesh/core/rest/node/FieldMap.java",
"license": "apache-2.0",
"size": 7605
} | [
"com.gentics.mesh.core.rest.node.field.Field",
"java.util.Map"
] | import com.gentics.mesh.core.rest.node.field.Field; import java.util.Map; | import com.gentics.mesh.core.rest.node.field.*; import java.util.*; | [
"com.gentics.mesh",
"java.util"
] | com.gentics.mesh; java.util; | 2,278,851 |
protected Cluster findCluster(String name) {
Cluster cluster = null;
try {
cluster = name == null ? null : getCluster(name);
} catch (AmbariException e) {
// do nothing
}
return cluster;
} | Cluster function(String name) { Cluster cluster = null; try { cluster = name == null ? null : getCluster(name); } catch (AmbariException e) { } return cluster; } | /**
* Find the cluster for the given name.
*
* @param name the cluster name
*
* @return the cluster for the given name; null if the cluster can not be found
*/ | Find the cluster for the given name | findCluster | {
"repo_name": "zouzhberk/ambaridemo",
"path": "demo-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java",
"license": "apache-2.0",
"size": 29800
} | [
"org.apache.ambari.server.AmbariException",
"org.apache.ambari.server.state.Cluster"
] | import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.state.Cluster; | import org.apache.ambari.server.*; import org.apache.ambari.server.state.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 341,264 |
static ByteBuffer stashIntN(ByteBuffer target, @N int value) {
if (value < 0)
throw new IllegalArgumentException("@N int value must be positive, but it is " + value);
while (value > Byte.MAX_VALUE) {
target.put((byte) (0x80 | (value & 0x7F)));
value >>>= 7;
}
return target.put((byte) value);
} | static ByteBuffer stashIntN(ByteBuffer target, @N int value) { if (value < 0) throw new IllegalArgumentException(STR + value); while (value > Byte.MAX_VALUE) { target.put((byte) (0x80 (value & 0x7F))); value >>>= 7; } return target.put((byte) value); } | /**
* Write a positive (and small) int value.
*
* @param target buffer to write to
* @param value int >= 0 to be written
*/ | Write a positive (and small) int value | stashIntN | {
"repo_name": "sormuras/stash",
"path": "com.github.sormuras.stash/main/java/com/github/sormuras/stash/Stashable.java",
"license": "apache-2.0",
"size": 11354
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,052,821 |
@Override protected void failed() {
final Locale locale = getLocale();
setErrorMessage(Resources.forLocale(locale).getString(Resources.Keys.CanNotUseRefSys_1,
IdentifiedObjects.getDisplayName(crs, locale)), getException());
selectedSystem.set(format.getDefaultCRS());
resetPositionCRS(Styles.ERROR_TEXT);
}
@Override protected Class<?> getCallerClass() {return StatusBar.class;} | @Override void function() { final Locale locale = getLocale(); setErrorMessage(Resources.forLocale(locale).getString(Resources.Keys.CanNotUseRefSys_1, IdentifiedObjects.getDisplayName(crs, locale)), getException()); selectedSystem.set(format.getDefaultCRS()); resetPositionCRS(Styles.ERROR_TEXT); } @Override protected Class<?> getCallerClass() {return StatusBar.class;} | /**
* Invoked in JavaFX thread on failure. The previous CRS is kept unchanged but
* the coordinates will appear in red for telling user that there is a problem.
*/ | Invoked in JavaFX thread on failure. The previous CRS is kept unchanged but the coordinates will appear in red for telling user that there is a problem | failed | {
"repo_name": "apache/sis",
"path": "application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java",
"license": "apache-2.0",
"size": 63362
} | [
"java.util.Locale",
"org.apache.sis.internal.gui.Resources",
"org.apache.sis.internal.gui.Styles",
"org.apache.sis.referencing.IdentifiedObjects"
] | import java.util.Locale; import org.apache.sis.internal.gui.Resources; import org.apache.sis.internal.gui.Styles; import org.apache.sis.referencing.IdentifiedObjects; | import java.util.*; import org.apache.sis.internal.gui.*; import org.apache.sis.referencing.*; | [
"java.util",
"org.apache.sis"
] | java.util; org.apache.sis; | 237,748 |
@ServiceMethod(returns = ReturnType.SINGLE)
EventSourceResourceInner update(
String resourceGroupName,
String environmentName,
String eventSourceName,
EventSourceUpdateParameters eventSourceUpdateParameters); | @ServiceMethod(returns = ReturnType.SINGLE) EventSourceResourceInner update( String resourceGroupName, String environmentName, String eventSourceName, EventSourceUpdateParameters eventSourceUpdateParameters); | /**
* Updates the event source with the specified name in the specified subscription, resource group, and environment.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param environmentName The name of the Time Series Insights environment associated with the specified resource
* group.
* @param eventSourceName The name of the Time Series Insights event source associated with the specified
* environment.
* @param eventSourceUpdateParameters Request object that contains the updated information for the event source.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return an environment receives data from one or more event sources.
*/ | Updates the event source with the specified name in the specified subscription, resource group, and environment | update | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/timeseriesinsights/azure-resourcemanager-timeseriesinsights/src/main/java/com/azure/resourcemanager/timeseriesinsights/fluent/EventSourcesClient.java",
"license": "mit",
"size": 11625
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.timeseriesinsights.fluent.models.EventSourceResourceInner",
"com.azure.resourcemanager.timeseriesinsights.models.EventSourceUpdateParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.timeseriesinsights.fluent.models.EventSourceResourceInner; import com.azure.resourcemanager.timeseriesinsights.models.EventSourceUpdateParameters; | import com.azure.core.annotation.*; import com.azure.resourcemanager.timeseriesinsights.fluent.models.*; import com.azure.resourcemanager.timeseriesinsights.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 925,329 |
public Iterator<IGroupMember> getAllMembers() throws GroupsException; | Iterator<IGroupMember> function() throws GroupsException; | /**
* Returns an <code>Iterator</code> over the <code>Set</code> of recursively-retrieved
* <code>IGroupMembers</code> that are members of <code>this</code>.
* @return java.util.Iterator
*/ | Returns an <code>Iterator</code> over the <code>Set</code> of recursively-retrieved <code>IGroupMembers</code> that are members of <code>this</code> | getAllMembers | {
"repo_name": "UW-Madison-DoIT/portal-abstraction-api",
"path": "src/main/java/edu/wisc/my/apilayer/groups/IGroupMember.java",
"license": "bsd-3-clause",
"size": 9462
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 943,221 |
protected StructuredDocumentEvent checkForComments() {
StructuredDocumentEvent result = checkForCriticalKey(""); //$NON-NLS-1$
}
return result != null ? result : super.checkForComments();
}
| StructuredDocumentEvent function() { StructuredDocumentEvent result = checkForCriticalKey(""); } return result != null ? result : super.checkForComments(); } | /**
* Adding the support to php comments
*/ | Adding the support to php comments | checkForComments | {
"repo_name": "angelozerr/eclipse-wtp-freemarker",
"path": "org.eclipse.freemarker.core/src/org/eclipse/freemarker/internal/core/documentModel/parser/FMStructuredDocumentReParser.java",
"license": "mit",
"size": 3102
} | [
"org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent"
] | import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent; | import org.eclipse.wst.sse.core.internal.provisional.events.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 1,440,316 |
public void freeSlots(Collection<WorkerSlot> slots) {
if (slots != null) {
for (WorkerSlot slot : slots) {
freeSlot(slot);
}
}
} | void function(Collection<WorkerSlot> slots) { if (slots != null) { for (WorkerSlot slot : slots) { freeSlot(slot); } } } | /**
* free the slots.
*
* @param slots multiple slots to free
*/ | free the slots | freeSlots | {
"repo_name": "ujfjhz/storm",
"path": "storm-server/src/main/java/org/apache/storm/scheduler/Cluster.java",
"license": "apache-2.0",
"size": 39397
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 820,084 |
public void execute() {
if (postRequest != null) {
postRequest.execute();
} else {
openLoginDialog();
}
}
private PostRequestCallback loginDialogPostRequestListener = new PostRequestCallback() { | void function() { if (postRequest != null) { postRequest.execute(); } else { openLoginDialog(); } } private PostRequestCallback loginDialogPostRequestListener = new PostRequestCallback() { | /**
* Tries to execute the post request with the given authentication token. If
* it wasn't given in the constructor, the login dialog is opened immediately.
*/ | Tries to execute the post request with the given authentication token. If it wasn't given in the constructor, the login dialog is opened immediately | execute | {
"repo_name": "nilewapp/BokBytarAppen",
"path": "src/com/mooo/nilewapps/bokbytarappen/server/LoginPostRequest.java",
"license": "apache-2.0",
"size": 4371
} | [
"com.mooo.nilewapps.bokbytarappen.server.PostRequest"
] | import com.mooo.nilewapps.bokbytarappen.server.PostRequest; | import com.mooo.nilewapps.bokbytarappen.server.*; | [
"com.mooo.nilewapps"
] | com.mooo.nilewapps; | 2,259,887 |
public List<ShardRouting> assignedShards() {
return this.assignedShards;
} | List<ShardRouting> function() { return this.assignedShards; } | /**
* Returns a {@link List} of assigned shards
*
* @return a {@link List} of shards
*/ | Returns a <code>List</code> of assigned shards | assignedShards | {
"repo_name": "strapdata/elassandra-test",
"path": "core/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java",
"license": "apache-2.0",
"size": 25832
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,445,756 |
public IndicatorData getIndicatorData() {
return new IndicatorData();
} | IndicatorData function() { return new IndicatorData(); } | /** Get indicator data INDICATOR exporter
*
* @return indicator data for INDICATOR exporter
*/ | Get indicator data INDICATOR exporter | getIndicatorData | {
"repo_name": "nextreports/nextreports-engine",
"path": "src/ro/nextreports/engine/chart/ChartRunner.java",
"license": "apache-2.0",
"size": 14930
} | [
"ro.nextreports.engine.exporter.util.IndicatorData"
] | import ro.nextreports.engine.exporter.util.IndicatorData; | import ro.nextreports.engine.exporter.util.*; | [
"ro.nextreports.engine"
] | ro.nextreports.engine; | 67,344 |
public static void info(Object msg) {
log(msg, Level.INFO);
} | static void function(Object msg) { log(msg, Level.INFO); } | /**
* Indicates a certain point has been reached successfully and may <br />
* print state information. <br />
* <br />
* This is the Level that should be generally used in normal cases. <br />
*
* @param msg
*/ | Indicates a certain point has been reached successfully and may print state information. This is the Level that should be generally used in normal cases. | info | {
"repo_name": "Matt529/Argus-Installer2",
"path": "src/com/mattc/argus2/util/Console.java",
"license": "gpl-3.0",
"size": 14327
} | [
"org.apache.log4j.Level"
] | import org.apache.log4j.Level; | import org.apache.log4j.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 1,029,921 |
public static <T> T getBean(ServletContext servletContext,Class<T> requiredType){
WebApplicationContext webApplicationContext = getWebApplicationContext(servletContext);
return getBean(webApplicationContext, requiredType);
}
//--------------------------------------------------------------- | static <T> T function(ServletContext servletContext,Class<T> requiredType){ WebApplicationContext webApplicationContext = getWebApplicationContext(servletContext); return getBean(webApplicationContext, requiredType); } | /**
* Gets the bean.
*
* @param <T>
* the generic type
* @param servletContext
* the servlet context
* @param requiredType
* the required type
* @return the bean
*/ | Gets the bean | getBean | {
"repo_name": "venusdrogon/feilong-spring",
"path": "feilong-spring-web/src/main/java/com/feilong/spring/web/util/WebSpringUtil.java",
"license": "apache-2.0",
"size": 14600
} | [
"javax.servlet.ServletContext",
"org.springframework.web.context.WebApplicationContext"
] | import javax.servlet.ServletContext; import org.springframework.web.context.WebApplicationContext; | import javax.servlet.*; import org.springframework.web.context.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 2,236,433 |
@Test
public void testExpiredRenewableTicket() throws Exception
{
// Get the mutable ticket part.
KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
EncTicketPart encTicketPart = getTicketArchetype( clientPrincipal );
// Make changes to test.
encTicketPart.setFlag( TicketFlag.RENEWABLE );
encTicketPart.setRenewTill( new KerberosTime( 0 ) );
// Seal the ticket for the server.
KerberosPrincipal serverPrincipal = new KerberosPrincipal( "ldap/ldap.example.com@EXAMPLE.COM" );
String passPhrase = "randomKey";
EncryptionKey serverKey = getEncryptionKey( serverPrincipal, passPhrase );
Ticket tgt = getTicket( encTicketPart, serverPrincipal, serverKey );
KdcReqBody kdcReqBody = new KdcReqBody();
kdcReqBody.setSName( getPrincipalName( "ldap/ldap.example.com@EXAMPLE.COM" ) );
kdcReqBody.setRealm( "EXAMPLE.COM" );
kdcReqBody.setEType( config.getEncryptionTypes() );
kdcReqBody.setNonce( random.nextInt() );
KdcOptions kdcOptions = new KdcOptions();
kdcOptions.set( KdcOptions.RENEW );
kdcReqBody.setKdcOptions( kdcOptions );
long now = System.currentTimeMillis();
KerberosTime requestedEndTime = new KerberosTime( now + KerberosTime.DAY );
kdcReqBody.setTill( requestedEndTime );
KdcReq message = getKdcRequest( tgt, kdcReqBody );
handler.messageReceived( session, message );
Object msg = session.getMessage();
assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
KrbError error = ( KrbError ) msg;
assertEquals( "Ticket expired", ErrorType.KRB_AP_ERR_TKT_EXPIRED, error.getErrorCode() );
} | void function() throws Exception { KerberosPrincipal clientPrincipal = new KerberosPrincipal( STR ); EncTicketPart encTicketPart = getTicketArchetype( clientPrincipal ); encTicketPart.setFlag( TicketFlag.RENEWABLE ); encTicketPart.setRenewTill( new KerberosTime( 0 ) ); KerberosPrincipal serverPrincipal = new KerberosPrincipal( STR ); String passPhrase = STR; EncryptionKey serverKey = getEncryptionKey( serverPrincipal, passPhrase ); Ticket tgt = getTicket( encTicketPart, serverPrincipal, serverKey ); KdcReqBody kdcReqBody = new KdcReqBody(); kdcReqBody.setSName( getPrincipalName( STR ) ); kdcReqBody.setRealm( STR ); kdcReqBody.setEType( config.getEncryptionTypes() ); kdcReqBody.setNonce( random.nextInt() ); KdcOptions kdcOptions = new KdcOptions(); kdcOptions.set( KdcOptions.RENEW ); kdcReqBody.setKdcOptions( kdcOptions ); long now = System.currentTimeMillis(); KerberosTime requestedEndTime = new KerberosTime( now + KerberosTime.DAY ); kdcReqBody.setTill( requestedEndTime ); KdcReq message = getKdcRequest( tgt, kdcReqBody ); handler.messageReceived( session, message ); Object msg = session.getMessage(); assertEquals( STR, KrbError.class, msg.getClass() ); KrbError error = ( KrbError ) msg; assertEquals( STR, ErrorType.KRB_AP_ERR_TKT_EXPIRED, error.getErrorCode() ); } | /**
* As is the case for all application servers, expired tickets are not accepted
* by the TGS, so once a renewable or TGT expires, the client must use a separate
* exchange to obtain valid tickets.
*
* @throws Exception
*/ | As is the case for all application servers, expired tickets are not accepted by the TGS, so once a renewable or TGT expires, the client must use a separate exchange to obtain valid tickets | testExpiredRenewableTicket | {
"repo_name": "drankye/directory-server",
"path": "protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java",
"license": "apache-2.0",
"size": 81600
} | [
"javax.security.auth.kerberos.KerberosPrincipal",
"org.apache.directory.shared.kerberos.KerberosTime",
"org.apache.directory.shared.kerberos.codec.options.KdcOptions",
"org.apache.directory.shared.kerberos.components.EncTicketPart",
"org.apache.directory.shared.kerberos.components.EncryptionKey",
"org.apache.directory.shared.kerberos.components.KdcReq",
"org.apache.directory.shared.kerberos.components.KdcReqBody",
"org.apache.directory.shared.kerberos.exceptions.ErrorType",
"org.apache.directory.shared.kerberos.flags.TicketFlag",
"org.apache.directory.shared.kerberos.messages.KrbError",
"org.apache.directory.shared.kerberos.messages.Ticket",
"org.junit.Assert"
] | import javax.security.auth.kerberos.KerberosPrincipal; import org.apache.directory.shared.kerberos.KerberosTime; import org.apache.directory.shared.kerberos.codec.options.KdcOptions; import org.apache.directory.shared.kerberos.components.EncTicketPart; import org.apache.directory.shared.kerberos.components.EncryptionKey; import org.apache.directory.shared.kerberos.components.KdcReq; import org.apache.directory.shared.kerberos.components.KdcReqBody; import org.apache.directory.shared.kerberos.exceptions.ErrorType; import org.apache.directory.shared.kerberos.flags.TicketFlag; import org.apache.directory.shared.kerberos.messages.KrbError; import org.apache.directory.shared.kerberos.messages.Ticket; import org.junit.Assert; | import javax.security.auth.kerberos.*; import org.apache.directory.shared.kerberos.*; import org.apache.directory.shared.kerberos.codec.options.*; import org.apache.directory.shared.kerberos.components.*; import org.apache.directory.shared.kerberos.exceptions.*; import org.apache.directory.shared.kerberos.flags.*; import org.apache.directory.shared.kerberos.messages.*; import org.junit.*; | [
"javax.security",
"org.apache.directory",
"org.junit"
] | javax.security; org.apache.directory; org.junit; | 894,498 |
void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException; | void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException; | /**
* Check for validity of the output-specification for the job.
*
* <p>This is to validate the output specification for the job when it is
* a job is submitted. Typically checks that it does not already exist,
* throwing an exception when it already exists, so that output is not
* overwritten.</p>
*
* @param ignored
* @param job job configuration.
* @throws IOException when output should not be attempted
*/ | Check for validity of the output-specification for the job. This is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten | checkOutputSpecs | {
"repo_name": "mammothcm/mammoth",
"path": "src/org/apache/hadoop/mapred/OutputFormat.java",
"license": "apache-2.0",
"size": 2662
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 357,135 |
@Override
public int read() throws IOException {
if (closed) {
throw new FileItemStream.ItemSkippedException();
}
if (available() == 0) {
if (makeAvailable() == 0) {
return -1;
}
}
++total;
int b = buffer[head++];
if (b >= 0) {
return b;
}
return b + BYTE_POSITIVE_OFFSET;
} | int function() throws IOException { if (closed) { throw new FileItemStream.ItemSkippedException(); } if (available() == 0) { if (makeAvailable() == 0) { return -1; } } ++total; int b = buffer[head++]; if (b >= 0) { return b; } return b + BYTE_POSITIVE_OFFSET; } | /**
* Returns the next byte in the stream.
* @return The next byte in the stream, as a non-negative
* integer, or -1 for EOF.
* @throws IOException An I/O error occurred.
*/ | Returns the next byte in the stream | read | {
"repo_name": "chvrga/outdoor-explorer",
"path": "java/play-1.4.4/framework/src/play/data/parsing/MultipartStream.java",
"license": "mit",
"size": 32498
} | [
"java.io.IOException",
"org.apache.commons.fileupload.FileItemStream"
] | import java.io.IOException; import org.apache.commons.fileupload.FileItemStream; | import java.io.*; import org.apache.commons.fileupload.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 177,828 |
public static String gensalt(int log_rounds) {
return gensalt(log_rounds, new SecureRandom());
} | static String function(int log_rounds) { return gensalt(log_rounds, new SecureRandom()); } | /**
* Generate a salt for use with the BCrypt.hashpw() method
* @param log_rounds the log2 of the number of rounds of
* hashing to apply - the work factor therefore increases as
* 2**log_rounds.
* @return an encoded salt value
*/ | Generate a salt for use with the BCrypt.hashpw() method | gensalt | {
"repo_name": "paylogic/ScanwareLitev2",
"path": "src/com/paylogic/scanwarelite/security/BCrypt.java",
"license": "mit",
"size": 27246
} | [
"java.security.SecureRandom"
] | import java.security.SecureRandom; | import java.security.*; | [
"java.security"
] | java.security; | 675,036 |
public void setOperationAttributeDefaults()
{
if (operationAttributes == null)
operationAttributes = new HashAttributeSet();
operationAttributes.add(AttributesCharset.UTF8);
operationAttributes.add(AttributesNaturalLanguage.EN);
} | void function() { if (operationAttributes == null) operationAttributes = new HashAttributeSet(); operationAttributes.add(AttributesCharset.UTF8); operationAttributes.add(AttributesNaturalLanguage.EN); } | /**
* Adds the default values for the operation
* attributes "attributes-charset" and
* "attributes-natural-language"
*/ | Adds the default values for the operation attributes "attributes-charset" and "attributes-natural-language" | setOperationAttributeDefaults | {
"repo_name": "embecosm/avr32-gcc",
"path": "libjava/classpath/gnu/javax/print/ipp/IppRequest.java",
"license": "gpl-2.0",
"size": 30898
} | [
"gnu.javax.print.ipp.attribute.job.AttributesCharset",
"gnu.javax.print.ipp.attribute.job.AttributesNaturalLanguage",
"javax.print.attribute.HashAttributeSet"
] | import gnu.javax.print.ipp.attribute.job.AttributesCharset; import gnu.javax.print.ipp.attribute.job.AttributesNaturalLanguage; import javax.print.attribute.HashAttributeSet; | import gnu.javax.print.ipp.attribute.job.*; import javax.print.attribute.*; | [
"gnu.javax.print",
"javax.print"
] | gnu.javax.print; javax.print; | 1,977,698 |
public static void addColumn(Database database, String tableName, String columnName,
Type type)
throws SQLException {
Connection connection = database.getConnection();
if (DatabaseUtil.tableExists(connection, tableName)) {
try {
addColumn(connection, tableName, columnName, type);
} finally {
connection.close();
}
}
} | static void function(Database database, String tableName, String columnName, Type type) throws SQLException { Connection connection = database.getConnection(); if (DatabaseUtil.tableExists(connection, tableName)) { try { addColumn(connection, tableName, columnName, type); } finally { connection.close(); } } } | /**
* Add a column in the table specified in input. A connection is obtained to the database
* and automatically released after the addition of the column.
* @param database the database to use
* @param tableName the table where to add the column
* @param columnName the column to add
* @param type the type
* @throws SQLException if there is a database problem
*/ | Add a column in the table specified in input. A connection is obtained to the database and automatically released after the addition of the column | addColumn | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/objectstore/main/src/org/intermine/sql/DatabaseUtil.java",
"license": "lgpl-2.1",
"size": 34017
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 889,835 |
public Resource nextResource() throws XMLDBException {
return getResource(pos++);
}
}
| Resource function() throws XMLDBException { return getResource(pos++); } } | /**
* Description of the Method
*
*@return Description of the Return Value
*@exception XMLDBException Description of the Exception
*/ | Description of the Method | nextResource | {
"repo_name": "NCIP/cadsr-cgmdr-nci-uk",
"path": "src/org/exist/xmldb/LocalResourceSet.java",
"license": "bsd-3-clause",
"size": 8860
} | [
"org.xmldb.api.base.Resource",
"org.xmldb.api.base.XMLDBException"
] | import org.xmldb.api.base.Resource; import org.xmldb.api.base.XMLDBException; | import org.xmldb.api.base.*; | [
"org.xmldb.api"
] | org.xmldb.api; | 2,043,903 |
private RealModeAddress getMode2Address() throws MemoryException {
switch (m_memIndex) {
case 0:
return new RealModeAddress(m_state.getDS(),
(short)(m_state.getBX() + m_state.getSI() + m_fetcher.nextWord()));
case 1:
return new RealModeAddress(m_state.getDS(),
(short)(m_state.getBX() + m_state.getDI() + m_fetcher.nextWord()));
case 2:
return new RealModeAddress(m_state.getSS(),
(short)(m_state.getBP() + m_state.getSI() + m_fetcher.nextWord()));
case 3:
return new RealModeAddress(m_state.getSS(),
(short)(m_state.getBP() + m_state.getDI() + m_fetcher.nextWord()));
case 4:
return new RealModeAddress(m_state.getDS(),
(short)(m_state.getSI() + m_fetcher.nextWord()));
case 5:
return new RealModeAddress(m_state.getDS(),
(short)(m_state.getDI() + m_fetcher.nextWord()));
case 6:
return new RealModeAddress(m_state.getSS(),
(short)(m_state.getBP() + m_fetcher.nextWord()));
case 7:
return new RealModeAddress(m_state.getDS(),
(short)(m_state.getBX() + m_fetcher.nextWord()));
default:
throw new RuntimeException();
}
}
| RealModeAddress function() throws MemoryException { switch (m_memIndex) { case 0: return new RealModeAddress(m_state.getDS(), (short)(m_state.getBX() + m_state.getSI() + m_fetcher.nextWord())); case 1: return new RealModeAddress(m_state.getDS(), (short)(m_state.getBX() + m_state.getDI() + m_fetcher.nextWord())); case 2: return new RealModeAddress(m_state.getSS(), (short)(m_state.getBP() + m_state.getSI() + m_fetcher.nextWord())); case 3: return new RealModeAddress(m_state.getSS(), (short)(m_state.getBP() + m_state.getDI() + m_fetcher.nextWord())); case 4: return new RealModeAddress(m_state.getDS(), (short)(m_state.getSI() + m_fetcher.nextWord())); case 5: return new RealModeAddress(m_state.getDS(), (short)(m_state.getDI() + m_fetcher.nextWord())); case 6: return new RealModeAddress(m_state.getSS(), (short)(m_state.getBP() + m_fetcher.nextWord())); case 7: return new RealModeAddress(m_state.getDS(), (short)(m_state.getBX() + m_fetcher.nextWord())); default: throw new RuntimeException(); } } | /**
* Decodes the indirect-memory operand corresponding to mode #2.
* @return the real-mode address to which the indirect-memory operand
* refers to.
* @throws MemoryException on any error while reading from memory.
*/ | Decodes the indirect-memory operand corresponding to mode #2 | getMode2Address | {
"repo_name": "codeguru-il/corewars8086",
"path": "src/main/java/il/co/codeguru/corewars8086/cpu/IndirectAddressingDecoder.java",
"license": "apache-2.0",
"size": 12047
} | [
"il.co.codeguru.corewars8086.memory.MemoryException",
"il.co.codeguru.corewars8086.memory.RealModeAddress"
] | import il.co.codeguru.corewars8086.memory.MemoryException; import il.co.codeguru.corewars8086.memory.RealModeAddress; | import il.co.codeguru.corewars8086.memory.*; | [
"il.co.codeguru"
] | il.co.codeguru; | 1,041,074 |
@SideOnly(Side.CLIENT)
public ResourceLocation getBossBarTexture(); | @SideOnly(Side.CLIENT) ResourceLocation function(); | /**
* The ResourceLocation to bind for this boss's boss bar.
* You can use BotaniaAPI.internalMethodHandler.getDefaultBossBarTexture() to get
* the one used by botania bosses.
*/ | The ResourceLocation to bind for this boss's boss bar. You can use BotaniaAPI.internalMethodHandler.getDefaultBossBarTexture() to get the one used by botania bosses | getBossBarTexture | {
"repo_name": "Tombenpotter/Icarus",
"path": "src/main/java/vazkii/botania/api/boss/IBotaniaBoss.java",
"license": "gpl-3.0",
"size": 2155
} | [
"net.minecraft.util.ResourceLocation"
] | import net.minecraft.util.ResourceLocation; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,371,332 |
public MouseHandlerFX getMouseHandler(String id) {
for (MouseHandlerFX h: this.availableMouseHandlers) {
if (h.getID().equals(id)) {
return h;
}
}
for (MouseHandlerFX h: this.auxiliaryMouseHandlers) {
if (h.getID().equals(id)) {
return h;
}
}
return null;
} | MouseHandlerFX function(String id) { for (MouseHandlerFX h: this.availableMouseHandlers) { if (h.getID().equals(id)) { return h; } } for (MouseHandlerFX h: this.auxiliaryMouseHandlers) { if (h.getID().equals(id)) { return h; } } return null; } | /**
* Returns the mouse handler with the specified ID, or {@code null} if
* there is no handler with that ID. This method will look for handlers
* in both the regular and auxiliary handler lists.
*
* @param id the ID ({@code null} not permitted).
*
* @return The handler with the specified ID
*/ | Returns the mouse handler with the specified ID, or null if there is no handler with that ID. This method will look for handlers in both the regular and auxiliary handler lists | getMouseHandler | {
"repo_name": "jfree/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/fx/ChartCanvas.java",
"license": "lgpl-2.1",
"size": 23025
} | [
"org.jfree.chart.fx.interaction.MouseHandlerFX"
] | import org.jfree.chart.fx.interaction.MouseHandlerFX; | import org.jfree.chart.fx.interaction.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,987,842 |
public final SQLName getSQLName(DBStructureItem ancestor, boolean includeAncestor) {
final List<String> res = new ArrayList<String>();
SQLIdentifier current = this;
while (current != null && !current.isAlterEgoOf(ancestor)) {
res.add(0, current.getName());
current = current.getParent() instanceof SQLIdentifier ? (SQLIdentifier) current.getParent() : null;
}
if (current == null && ancestor != null)
throw new IllegalArgumentException(ancestor + " is not an ancestor of " + this);
if (includeAncestor && ancestor != null)
res.add(0, ancestor.getName());
return new SQLName(res);
}
| final SQLName function(DBStructureItem ancestor, boolean includeAncestor) { final List<String> res = new ArrayList<String>(); SQLIdentifier current = this; while (current != null && !current.isAlterEgoOf(ancestor)) { res.add(0, current.getName()); current = current.getParent() instanceof SQLIdentifier ? (SQLIdentifier) current.getParent() : null; } if (current == null && ancestor != null) throw new IllegalArgumentException(ancestor + STR + this); if (includeAncestor && ancestor != null) res.add(0, ancestor.getName()); return new SQLName(res); } | /**
* The name from <code>ancestor</code>.
*
* @param ancestor an ancestor of this, <code>null</code> meaning the root, eg base.
* @param includeAncestor whether to include <code>ancestor</code> in the name (if it's not
* <code>null</code>), eg <code>false</code>.
* @return the name relative to <code>ancestor</code>, eg table.field (base.table.field if
* <code>includeAncestor</code> is true).
* @throws IllegalArgumentException if <code>ancestor</code> is not an ancestor of this.
*/ | The name from <code>ancestor</code> | getSQLName | {
"repo_name": "mbshopM/openconcerto",
"path": "OpenConcerto/src/org/openconcerto/sql/model/SQLIdentifier.java",
"license": "gpl-3.0",
"size": 5369
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,970,887 |
TScreenFieldBean loadByParentAndIndex(Integer parentID,Integer row,Integer col);
| TScreenFieldBean loadByParentAndIndex(Integer parentID,Integer row,Integer col); | /**
* Loads field from parent on given position
* @param parentID
* @return
*/ | Loads field from parent on given position | loadByParentAndIndex | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/dao/ScreenFieldDAO.java",
"license": "gpl-3.0",
"size": 2060
} | [
"com.aurel.track.beans.TScreenFieldBean"
] | import com.aurel.track.beans.TScreenFieldBean; | import com.aurel.track.beans.*; | [
"com.aurel.track"
] | com.aurel.track; | 541,834 |
private void deallocate(final ResourceContainer container)
throws ServerNotAllocatedException {
if (this.allocatedServers.contains(container)) {
this.notAllocatedServers.add(container);
this.allocatedServers.remove(container);
LOG.info("Deallocate-Operation successfull");
} else {
throw new ServerNotAllocatedException();
}
} | void function(final ResourceContainer container) throws ServerNotAllocatedException { if (this.allocatedServers.contains(container)) { this.notAllocatedServers.add(container); this.allocatedServers.remove(container); LOG.info(STR); } else { throw new ServerNotAllocatedException(); } } | /**
* Method that represents the deallocation-operation of the
* ReconfigurationPlanMetaMode.
*
* @param container
* ResourceContainer which is after the execution of this method
* not longer available.
* @throws ServerNotAllocatedException
*/ | Method that represents the deallocation-operation of the ReconfigurationPlanMetaMode | deallocate | {
"repo_name": "SLAsticSPE/slastic",
"path": "src/plugins/kieker/tools/slastic/plugins/pcm/control/modelManager/ModelManager.java",
"license": "apache-2.0",
"size": 22462
} | [
"de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer"
] | import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer; | import de.uka.ipd.sdq.pcm.resourceenvironment.*; | [
"de.uka.ipd"
] | de.uka.ipd; | 2,907,789 |
@Test
public void testExpressionTemplateWithSimpleExpression()
{
ExpressionTemplate t = new ExpressionTemplate("${simple}");
assertEquals(StringUtils.createKey(0), t.getTemplate());
assertEquals(1, t.getEntities().size());
assertEquals("simple", t.getEntities().get(StringUtils.createKey(0)).getKey());
assertEquals("${simple}", t.getSubstitution());
assertEquals("", t.getValue());
} | void function() { ExpressionTemplate t = new ExpressionTemplate(STR); assertEquals(StringUtils.createKey(0), t.getTemplate()); assertEquals(1, t.getEntities().size()); assertEquals(STR, t.getEntities().get(StringUtils.createKey(0)).getKey()); assertEquals(STR, t.getSubstitution()); assertEquals("", t.getValue()); } | /**
* Checks ExpressionTemplate for a text with simple expression
*/ | Checks ExpressionTemplate for a text with simple expression | testExpressionTemplateWithSimpleExpression | {
"repo_name": "jandsu/ironjacamar",
"path": "testsuite/src/test/java/org/ironjacamar/common/metadata/common/ExpressionTemplateTestCase.java",
"license": "epl-1.0",
"size": 33024
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,959,544 |