id int64 22 34.9k | comment_id int64 0 328 | comment stringlengths 2 2.55k | code stringlengths 31 107k | classification stringclasses 6
values | isFinished bool 1
class | code_context_2 stringlengths 21 27.3k | code_context_10 stringlengths 29 27.3k | code_context_20 stringlengths 29 27.3k |
|---|---|---|---|---|---|---|---|---|
24,804 | 2 | // 判断签字是否存在
// 打印签字信息 | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | NONSATD | true | childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) {
// 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字 | childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
if (signObj == null) {
signObj = signObjVaccid;
}
logger.info("signObjFinal-->" + (signObj == null));
if (signObj != null) {
String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinate... | + childVaccinaterecord.getVaccineid());
Object signObjVaccid = CacheUtils.get(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getNid().substring(0, 2));
logger.info("signObjVaccid-->" + (signObjVaccid == null));
CacheUtils.remove(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChild... |
24,804 | 3 | // base64 转换签字 | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | NONSATD | true | // 打印签字信息
code.put("sign", signStr);
// base64 转换签字
BASE64Decoder decoder = new BASE64Decoder();
try { | }
logger.info("signObjFinal-->" + (signObj == null));
if (signObj != null) {
String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) {
// 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字
BASE64Decoder decod... | logger.info("signObjVaccid-->" + (signObjVaccid == null));
CacheUtils.remove(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getNid().substring(0, 2));
Object signObj = CacheUtils.get(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid... |
24,804 | 4 | // 查询该记录签字是否存在 | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | NONSATD | true | childVaccinaterecord.setSignatureData(sign);
childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
// 查询该记录签字是否存在
int count = childVaccinaterecordService.querySignature(childVaccinaterecord);
if (count == 0) { | // 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] sign = decoder.decodeBuffer(signStr);
if (null != sign && sign.length > 0) {
childVaccinaterecord.setSignatureData(sign);
childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
//... | childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
if (signObj == null) {
signObj = signObjVaccid;
}
logger.info("signObjFinal-->" + (signObj == null));
if (signObj != null) {
String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinate... |
24,804 | 5 | // 新增签字 | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | NONSATD | true | int count = childVaccinaterecordService.querySignature(childVaccinaterecord);
if (count == 0) {
// 新增签字
childVaccinaterecordService.insertSignatures(childVaccinaterecord);
} | // base64 转换签字
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] sign = decoder.decodeBuffer(signStr);
if (null != sign && sign.length > 0) {
childVaccinaterecord.setSignatureData(sign);
childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
// 查询该记录签字是否存在
int count = childVaccinaterecordServ... | }
logger.info("signObjFinal-->" + (signObj == null));
if (signObj != null) {
String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) {
// 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字
BASE64Decoder decod... |
24,804 | 6 | // 修改签字状态 | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | NONSATD | true | childVaccinaterecordService.insertSignatures(childVaccinaterecord);
}
// 修改签字状态
childVaccinaterecord.setSignature(ChildVaccinaterecord.SIGNATURE_YES);
childVaccinaterecordService.updateSignatures(childVaccinaterecord); | byte[] sign = decoder.decodeBuffer(signStr);
if (null != sign && sign.length > 0) {
childVaccinaterecord.setSignatureData(sign);
childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
// 查询该记录签字是否存在
int count = childVaccinaterecordService.querySignature(childVaccinaterecord);
if (count == 0) {
// 新增签... | String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) {
// 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] sign = decoder.decodeBuffer(signStr);
... |
24,804 | 7 | // 签字状态 | @SuppressWarnings("restriction")
private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
Map<String, Object> code) {
logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = Cache... | NONSATD | true | logger.error("微信签字base64转bytes失败", e.getMessage());
}
// 签字状态
}
maplist.put("success", true); | // 新增签字
childVaccinaterecordService.insertSignatures(childVaccinaterecord);
}
// 修改签字状态
childVaccinaterecord.setSignature(ChildVaccinaterecord.SIGNATURE_YES);
childVaccinaterecordService.updateSignatures(childVaccinaterecord);
}
} catch (Exception e) {
logger.error("微信签字base64转bytes失败", e.getMessage());
}
// 签字状态
}
map... | // base64 转换签字
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] sign = decoder.decodeBuffer(signStr);
if (null != sign && sign.length > 0) {
childVaccinaterecord.setSignatureData(sign);
childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
// 查询该记录签字是否存在
int count = childVaccinaterecordServ... |
8,421 | 0 | // Validate boolean preferences | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean pr... | NONSATD | true | return;
Object newValue = null;
// Validate boolean preferences
String[] booleanPrefs = {"advanced-mode", "allow-anonymous-usage-tracking", "fs-reverse"};
if (Arrays.asList(booleanPrefs).contains(preferenceName)){ | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean preferences
String[] booleanPref... | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean preferences
String[] booleanPref... |
8,421 | 1 | // Validate edit mode | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean pr... | NONSATD | true | this.isAllowAnonymousTracking = (Boolean) newValue;
}
// Validate edit mode
else if (preferenceName.equals("edit-mode")){
String[] validModes = {"vim", "emacs", "default"}; | newValue = Boolean.FALSE;
break;
default:
return;
}
if (preferenceName.equals("advanced-mode"))
this.isUseAdvancedMode = (Boolean) newValue;
else if (preferenceName == "allow")
this.isAllowAnonymousTracking = (Boolean) newValue;
}
// Validate edit mode
else if (preferenceName.equals("edit-mode")){
String[] validModes =... | return;
Object newValue = null;
// Validate boolean preferences
String[] booleanPrefs = {"advanced-mode", "allow-anonymous-usage-tracking", "fs-reverse"};
if (Arrays.asList(booleanPrefs).contains(preferenceName)){
switch (preferenceValue){
case "true":
newValue = Boolean.TRUE;
break;
case "false":
newValue = Boolean.FA... |
8,421 | 2 | // Validate edit mode | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean pr... | NONSATD | true | this.isAllowAnonymousTracking = (Boolean) newValue;
}
// Validate edit mode
else if (preferenceName.equals("edit-mode")){
String[] validModes = {"vim", "emacs", "default"}; | newValue = Boolean.FALSE;
break;
default:
return;
}
if (preferenceName.equals("advanced-mode"))
this.isUseAdvancedMode = (Boolean) newValue;
else if (preferenceName == "allow")
this.isAllowAnonymousTracking = (Boolean) newValue;
}
// Validate edit mode
else if (preferenceName.equals("edit-mode")){
String[] validModes =... | return;
Object newValue = null;
// Validate boolean preferences
String[] booleanPrefs = {"advanced-mode", "allow-anonymous-usage-tracking", "fs-reverse"};
if (Arrays.asList(booleanPrefs).contains(preferenceName)){
switch (preferenceValue){
case "true":
newValue = Boolean.TRUE;
break;
case "false":
newValue = Boolean.FA... |
8,421 | 3 | // TODO, assume the url is a file path for now.
// System.out.println(preferenceFileUrl + " url!!!!\n");
// Use a temporary for atomic writing | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean pr... | DESIGN | true | }
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
// System.out.println(preferenceFileUrl + " url!!!!\n");
// Use a temporary for atomic writing
java.nio.file.Path preferenceFileTmp = Paths.get(preferenceFileUrl + ".tmp");
java.nio.file.Path prefere... | }
}
// Validate edit mode
else if (preferenceName.equals("fs-order-by")){
String[] validModes = {"uri", "modified"};
if (Arrays.asList(validModes).contains(preferenceValue)){
newValue = preferenceValue;
}
}
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for... | this.isUseAdvancedMode = (Boolean) newValue;
else if (preferenceName == "allow")
this.isAllowAnonymousTracking = (Boolean) newValue;
}
// Validate edit mode
else if (preferenceName.equals("edit-mode")){
String[] validModes = {"vim", "emacs", "default"};
if (Arrays.asList(validModes).contains(preferenceValue)){
newValue... |
8,421 | 4 | // If value changed, write it to the file too | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean pr... | NONSATD | true | Map<String, Object> prefs = om.readValue(preferenceFile.toFile(), readType);
Object oldValue = (Object) prefs.get(preferenceName);
// If value changed, write it to the file too
if (!Objects.equals(newValue, oldValue)) {
Files.deleteIfExists(preferenceFileTmp); | // System.out.println(preferenceFileUrl + " url!!!!\n");
// Use a temporary for atomic writing
java.nio.file.Path preferenceFileTmp = Paths.get(preferenceFileUrl + ".tmp");
java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl);
try {
ObjectMapper om = new ObjectMapper();
TypeReference readType = new TypeRefe... | }
// Validate edit mode
else if (preferenceName.equals("fs-order-by")){
String[] validModes = {"uri", "modified"};
if (Arrays.asList(validModes).contains(preferenceValue)){
newValue = preferenceValue;
}
}
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for n... |
8,421 | 5 | // Move tmp to normal | @POST
@Path("setPreference")
public synchronized void setPreference(
@FormParam("preferencename") String preferenceName,
@FormParam("preferencevalue") String preferenceValue) {
if ((preferenceName == null) || (preferenceValue == null))
return;
Object newValue = null;
// Validate boolean pr... | NONSATD | true | prefs.put(preferenceName, newValue);
om.writerWithDefaultPrettyPrinter().writeValue(preferenceFileTmp.toFile(), prefs);
// Move tmp to normal
Files.move(preferenceFileTmp, preferenceFile, REPLACE_EXISTING);
} | ObjectMapper om = new ObjectMapper();
TypeReference readType = new TypeReference<HashMap<String, Object>>() {
};
Map<String, Object> prefs = om.readValue(preferenceFile.toFile(), readType);
Object oldValue = (Object) prefs.get(preferenceName);
// If value changed, write it to the file too
if (!Objects.equals(newValue, ... | newValue = preferenceValue;
}
}
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
// System.out.println(preferenceFileUrl + " url!!!!\n");
// Use a temporary for atomic writing
java.nio.file.Path preferenceFileTmp = Paths.get(preferenceFileUrl + ".tmp... |
8,420 | 0 | // TODO, assume the url is a file path for now. | private void resetConfig() {
final String configFileUrl = this.bkConfig.getConfigFileUrl();
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path configFile = Paths.get(configFileUrl);
java.nio.file.Path preferenceFi... | DESIGN | true | final String configFileUrl = this.bkConfig.getConfigFileUrl();
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path configFile = Paths.get(configFileUrl);
java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl); | private void resetConfig() {
final String configFileUrl = this.bkConfig.getConfigFileUrl();
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path configFile = Paths.get(configFileUrl);
java.nio.file.Path preferenceFile = Paths.get(prefe... | private void resetConfig() {
final String configFileUrl = this.bkConfig.getConfigFileUrl();
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path configFile = Paths.get(configFileUrl);
java.nio.file.Path preferenceFile = Paths.get(prefe... |
24,810 | 0 | // TODO: use sane arg parsing | public static void main(String args[]) throws FileNotFoundException {
// TODO: use sane arg parsing
if (args.length != 2) {
throw new RuntimeException("usage: AnalyzeMethodEntry trace-in trace-out");
}
String inFileName = args[0];
String outFileName = args[1];
... | IMPLEMENTATION | true | public static void main(String args[]) throws FileNotFoundException {
// TODO: use sane arg parsing
if (args.length != 2) {
throw new RuntimeException("usage: AnalyzeMethodEntry trace-in trace-out"); | public static void main(String args[]) throws FileNotFoundException {
// TODO: use sane arg parsing
if (args.length != 2) {
throw new RuntimeException("usage: AnalyzeMethodEntry trace-in trace-out");
}
String inFileName = args[0];
String outFileName = args[1];
Deserializer<TraceEvent> d
= Deserializer.getDeserializer(n... | public static void main(String args[]) throws FileNotFoundException {
// TODO: use sane arg parsing
if (args.length != 2) {
throw new RuntimeException("usage: AnalyzeMethodEntry trace-in trace-out");
}
String inFileName = args[0];
String outFileName = args[1];
Deserializer<TraceEvent> d
= Deserializer.getDeserializer(n... |
8,431 | 0 | /** GETTER
* TODO: Write general description for this method
*/ | @JsonGetter("amount")
public int getAmount ( ) {
return this.amount;
} | DOCUMENTATION | true | @JsonGetter("amount")
public int getAmount ( ) {
return this.amount;
} | @JsonGetter("amount")
public int getAmount ( ) {
return this.amount;
} | @JsonGetter("amount")
public int getAmount ( ) {
return this.amount;
} |
8,432 | 0 | /** SETTER
* TODO: Write general description for this method
*/ | @JsonSetter("amount")
public void setAmount (int value) {
this.amount = value;
} | DOCUMENTATION | true | @JsonSetter("amount")
public void setAmount (int value) {
this.amount = value;
} | @JsonSetter("amount")
public void setAmount (int value) {
this.amount = value;
} | @JsonSetter("amount")
public void setAmount (int value) {
this.amount = value;
} |
8,433 | 0 | /** GETTER
* TODO: Write general description for this method
*/ | @JsonGetter("description")
public String getDescription ( ) {
return this.description;
} | DOCUMENTATION | true | @JsonGetter("description")
public String getDescription ( ) {
return this.description;
} | @JsonGetter("description")
public String getDescription ( ) {
return this.description;
} | @JsonGetter("description")
public String getDescription ( ) {
return this.description;
} |
8,434 | 0 | /** SETTER
* TODO: Write general description for this method
*/ | @JsonSetter("description")
public void setDescription (String value) {
this.description = value;
} | DOCUMENTATION | true | @JsonSetter("description")
public void setDescription (String value) {
this.description = value;
} | @JsonSetter("description")
public void setDescription (String value) {
this.description = value;
} | @JsonSetter("description")
public void setDescription (String value) {
this.description = value;
} |
8,435 | 0 | /** GETTER
* TODO: Write general description for this method
*/ | @JsonGetter("quantity")
public int getQuantity ( ) {
return this.quantity;
} | DOCUMENTATION | true | @JsonGetter("quantity")
public int getQuantity ( ) {
return this.quantity;
} | @JsonGetter("quantity")
public int getQuantity ( ) {
return this.quantity;
} | @JsonGetter("quantity")
public int getQuantity ( ) {
return this.quantity;
} |
8,436 | 0 | /** SETTER
* TODO: Write general description for this method
*/ | @JsonSetter("quantity")
public void setQuantity (int value) {
this.quantity = value;
} | DOCUMENTATION | true | @JsonSetter("quantity")
public void setQuantity (int value) {
this.quantity = value;
} | @JsonSetter("quantity")
public void setQuantity (int value) {
this.quantity = value;
} | @JsonSetter("quantity")
public void setQuantity (int value) {
this.quantity = value;
} |
8,437 | 0 | /** GETTER
* TODO: Write general description for this method
*/ | @JsonGetter("category")
public String getCategory ( ) {
return this.category;
} | DOCUMENTATION | true | @JsonGetter("category")
public String getCategory ( ) {
return this.category;
} | @JsonGetter("category")
public String getCategory ( ) {
return this.category;
} | @JsonGetter("category")
public String getCategory ( ) {
return this.category;
} |
8,438 | 0 | /** SETTER
* TODO: Write general description for this method
*/ | @JsonSetter("category")
public void setCategory (String value) {
this.category = value;
} | DOCUMENTATION | true | @JsonSetter("category")
public void setCategory (String value) {
this.category = value;
} | @JsonSetter("category")
public void setCategory (String value) {
this.category = value;
} | @JsonSetter("category")
public void setCategory (String value) {
this.category = value;
} |
16,627 | 0 | //TODO: This could fail if an equals number of additions and removals happened within one second. | public void checkList()
{
if(observed.size() != cachedSize)
{
cachedSize = observed.size();
listUpdated();
}
} | DEFECT | true | public void checkList()
{
if(observed.size() != cachedSize)
{
cachedSize = observed.size();
listUpdated();
}
} | public void checkList()
{
if(observed.size() != cachedSize)
{
cachedSize = observed.size();
listUpdated();
}
} | public void checkList()
{
if(observed.size() != cachedSize)
{
cachedSize = observed.size();
listUpdated();
}
} |
24,825 | 0 | /**************************************************************************
* Drawing the image of the world and assign on the ImageViewer in the GUI
* not very fast, can be improved...
**************************************************************************/ | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).... | DESIGN | true | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... |
24,825 | 1 | //for each cells | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).... | NONSATD | true | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0; | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... |
24,825 | 2 | //test is colorized | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).... | NONSATD | true | for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&"); | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... |
24,825 | 3 | //System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this color | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).... | NONSATD | true | //test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this color
wimgWorld.getPixelWriter().setColor(x, y, world.getLocation().get((WIDTH*y)+x).getColorS());
if (world.getLocation().get((WIDTH*y)+x).getName().compareTo(ANT1)==0){... | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... |
24,825 | 4 | //no draw a black point | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).... | NONSATD | true | else
{
//no draw a black point
wimgWorld.getPixelWriter().setColor(x, y, javafx.scene.paint.Color.BLACK);
} | //System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this color
wimgWorld.getPixelWriter().setColor(x, y, world.getLocation().get((WIDTH*y)+x).getColorS());
if (world.getLocation().get((WIDTH*y)+x).getName().compareTo(ANT1)==0){ant1nbCells++;}
if (world.getLocation().get((WIDTH*y)+x).getName().compareTo(... | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this... |
24,825 | 5 | //show me the result on scsreen | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).... | NONSATD | true | }
}
imgWorld.setImage(wimgWorld); //show me the result on scsreen
//refresh counters
lbTotalCellsNb.setText(nbTotalCells+" cells"); | if (world.getLocation().get((WIDTH*y)+x).getName().compareTo(ANT3)==0){ant3nbCells++;}
if (world.getLocation().get((WIDTH*y)+x).getName().compareTo(ANT4)==0){ant4nbCells++;}
}
else
{
//no draw a black point
wimgWorld.getPixelWriter().setColor(x, y, javafx.scene.paint.Color.BLACK);
}
}
}
imgWorld.setImage(wimgWorld); //... | ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this color
wimgWorld.getPixelWriter().setColor(x, y, world.getLocation().get((WIDTH*y)+x).getColorS());
i... |
24,825 | 6 | //refresh counters | public synchronized void draw_World(){
//for each cells
ant1nbCells=0;
ant2nbCells=0;
ant3nbCells=0;
ant4nbCells=0;
for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).... | NONSATD | true | }
imgWorld.setImage(wimgWorld); //show me the result on scsreen
//refresh counters
lbTotalCellsNb.setText(nbTotalCells+" cells");
lbAnt1CellsNb.setText(ant1nbCells+" cells ("+formatter.format(((double)ant1nbCells/nbTotalCells)*100)+"%)"); | if (world.getLocation().get((WIDTH*y)+x).getName().compareTo(ANT4)==0){ant4nbCells++;}
}
else
{
//no draw a black point
wimgWorld.getPixelWriter().setColor(x, y, javafx.scene.paint.Color.BLACK);
}
}
}
imgWorld.setImage(wimgWorld); //show me the result on scsreen
//refresh counters
lbTotalCellsNb.setText(nbTotalCells+" ... | for (int x=0;x<WIDTH;x++){
for (int y=0;y<HEIGHT;y++){
//test is colorized
if (world.getLocation().get((WIDTH*y)+x).isColorized()){
//System.out.print("(x,y)=("+x+","+y+")&");
//yes draw a point with this color
wimgWorld.getPixelWriter().setColor(x, y, world.getLocation().get((WIDTH*y)+x).getColorS());
if (world.getLoc... |
33,024 | 0 | // TODO All following Node inherited methods will be apply under full versioning | public Node addNode(String s) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException {
return null;
} | IMPLEMENTATION | true | public Node addNode(String s) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException {
return null;
} | public Node addNode(String s) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException {
return null;
} | public Node addNode(String s) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException {
return null;
} |
8,457 | 0 | /**
* Start this processor. The processor will open an event stream on its message source in a new thread using {@link
* StreamableMessageSource#openStream(TrackingToken)}. The {@link TrackingToken} used to open the stream will be
* fetched from the {@link TokenStore}.
* <p>
* Upon start up of ... | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
... | NONSATD | true | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw ne... | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw ne... | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw ne... |
8,457 | 1 | // then it's ok. It's already running | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
... | NONSATD | true | if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else { | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw ne... | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw ne... |
8,457 | 2 | // this is problematic. There are still active threads pending a shutdown. | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
... | DEFECT | true | return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw new IllegalStateException("Cannot start this processor. It is pending shutdown...");
} | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw ne... | @Override
@StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS)
public void start() {
if (activeProcessorThreads() > 0 || workLauncherRunning.get()) {
if (state.get().isRunning()) {
// then it's ok. It's already running
return;
} else {
// this is problematic. There are still active threads pending a shutdown.
throw ne... |
275 | 0 | // arg is Event | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all e... | NONSATD | true | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return; | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... |
275 | 1 | // check the event function against the functions we have notifications watching for | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all e... | NONSATD | true | return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... |
275 | 2 | //we err on the side of caution here in checking all events that might invalidate the data in the cache -DH | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all e... | NONSATD | true | // check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH
if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UP... | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... |
275 | 3 | //we need the userId | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all e... | NONSATD | true | if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN_PASSWORD.equals(function)
|| UserDirectoryService.SECURE_UPDATE_USER_ANY.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN.equals(function)) {
//we need the userId
Reference ref = entityManager.newRefe... | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... |
275 | 4 | // look for group reference. Need to replace it with parent site reference | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all e... | NONSATD | true | //we need the userId
Reference ref = entityManager.newReference(event.getResource());
// look for group reference. Need to replace it with parent site reference
String refId = ref.getId();
try { | if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH
if (UserDirectoryService.SE... | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that migh... |
275 | 5 | //not sure how we'd end up here | public void update(Observable arg0, Object arg) {
// arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all e... | DESIGN | true | userCache.remove(UserDirectoryService.EIDCACHE + refId);
} catch (UserNotDefinedException e) {
//not sure how we'd end up here
log.warn(e.getMessage(), e);
} | Reference ref = entityManager.newReference(event.getResource());
// look for group reference. Need to replace it with parent site reference
String refId = ref.getId();
try {
String eid = userDirectoryService.getUserEid(refId);
log.debug("removing " + eid + " from cache");
authenticationCache.removeAuthentification(eid)... | // arg is Event
if (!(arg instanceof Event))
return;
Event event = (Event) arg;
// check the event function against the functions we have notifications watching for
String function = event.getEvent();
//we err on the side of caution here in checking all events that might invalidate the data in the cache -DH
if (UserDir... |
8,468 | 0 | // If there is a exactly one of each of RemoteGrpcPortWriteOperation and
// RegisterAndProcessBundleOperation we know they have the right topology. | private ProgressTracker createProgressTracker() {
ReadOperation readOperation;
RemoteGrpcPortWriteOperation grpcWriteOperation;
RegisterAndProcessBundleOperation bundleProcessOperation;
try {
readOperation = getReadOperation();
} catch (Exception exn) {
readOperation = null;
LOG.in... | NONSATD | true | return new NullProgressTracker();
}
// If there is a exactly one of each of RemoteGrpcPortWriteOperation and
// RegisterAndProcessBundleOperation we know they have the right topology.
try {
grpcWriteOperation = | ReadOperation readOperation;
RemoteGrpcPortWriteOperation grpcWriteOperation;
RegisterAndProcessBundleOperation bundleProcessOperation;
try {
readOperation = getReadOperation();
} catch (Exception exn) {
readOperation = null;
LOG.info("Unable to get read operation.", exn);
return new NullProgressTracker();
}
// If ther... | private ProgressTracker createProgressTracker() {
ReadOperation readOperation;
RemoteGrpcPortWriteOperation grpcWriteOperation;
RegisterAndProcessBundleOperation bundleProcessOperation;
try {
readOperation = getReadOperation();
} catch (Exception exn) {
readOperation = null;
LOG.info("Unable to get read operation.", ex... |
8,468 | 1 | // TODO: Handle more than one sdk worker processing a single bundle. | private ProgressTracker createProgressTracker() {
ReadOperation readOperation;
RemoteGrpcPortWriteOperation grpcWriteOperation;
RegisterAndProcessBundleOperation bundleProcessOperation;
try {
readOperation = getReadOperation();
} catch (Exception exn) {
readOperation = null;
LOG.in... | IMPLEMENTATION | true | Iterables.filter(operations, RegisterAndProcessBundleOperation.class));
} catch (IllegalArgumentException | NoSuchElementException exn) {
// TODO: Handle more than one sdk worker processing a single bundle.
grpcWriteOperation = null;
bundleProcessOperation = null; | // If there is a exactly one of each of RemoteGrpcPortWriteOperation and
// RegisterAndProcessBundleOperation we know they have the right topology.
try {
grpcWriteOperation =
Iterables.getOnlyElement(
Iterables.filter(operations, RemoteGrpcPortWriteOperation.class));
bundleProcessOperation =
Iterables.getOnlyElement(
I... | ReadOperation readOperation;
RemoteGrpcPortWriteOperation grpcWriteOperation;
RegisterAndProcessBundleOperation bundleProcessOperation;
try {
readOperation = getReadOperation();
} catch (Exception exn) {
readOperation = null;
LOG.info("Unable to get read operation.", exn);
return new NullProgressTracker();
}
// If ther... |
16,664 | 0 | //TODO: Make Firefox subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: Make IE subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 1 | //TODO: Make IE subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: Make IE subclass
case Edge:
return null; //TODO: Make Edge subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 2 | //TODO: Make Edge subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make IE subclass
case Edge:
return null; //TODO: Make Edge subclass
case Opera:
return null; //TODO: Make Opera subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 3 | //TODO: Make Opera subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make Edge subclass
case Opera:
return null; //TODO: Make Opera subclass
case Safari:
return null; //TODO: Make Safari subclass | switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: Make IE subclass
case Edge:
return null; //TODO: Make Edge subclass
case Opera:
return n... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 4 | //TODO: Make Safari subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make Opera subclass
case Safari:
return null; //TODO: Make Safari subclass
case iOS_iPhone:
return null; //TODO: Make iOS_iPhone subclass | return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: Make IE subclass
case Edge:
return null; //TODO: Make Edge subclass
case Opera:
return null; //TODO: Make Opera subclass
c... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 5 | //TODO: Make iOS_iPhone subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make Safari subclass
case iOS_iPhone:
return null; //TODO: Make iOS_iPhone subclass
case iOS_iPad:
return null; //TODO: Make iOS_iPad subclass | return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: Make IE subclass
case Edge:
return null; //TODO: Make Edge subclass
case Opera:
return null; //TODO: Make Opera subclass
case Safari:
return null; //TODO: Make Safari subclass
case iOS_iPhone:
return null; //TODO: Make iOS_iPhone subclass
case iOS... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 6 | //TODO: Make iOS_iPad subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make iOS_iPhone subclass
case iOS_iPad:
return null; //TODO: Make iOS_iPad subclass
case Android:
return null; //TODO: Make Android subclass | return null; //TODO: Make IE subclass
case Edge:
return null; //TODO: Make Edge subclass
case Opera:
return null; //TODO: Make Opera subclass
case Safari:
return null; //TODO: Make Safari subclass
case iOS_iPhone:
return null; //TODO: Make iOS_iPhone subclass
case iOS_iPad:
return null; //TODO: Make iOS_iPad subclass
c... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 7 | //TODO: Make Android subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make iOS_iPad subclass
case Android:
return null; //TODO: Make Android subclass
case HtmlUnit:
return null; //TODO: Make HtmlUnit subclass | return null; //TODO: Make Edge subclass
case Opera:
return null; //TODO: Make Opera subclass
case Safari:
return null; //TODO: Make Safari subclass
case iOS_iPhone:
return null; //TODO: Make iOS_iPhone subclass
case iOS_iPad:
return null; //TODO: Make iOS_iPad subclass
case Android:
return null; //TODO: Make Android su... | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: M... |
16,664 | 8 | //TODO: Make HtmlUnit subclass | private NiceWebDriver getNiceWebDriverInstance(DriverType driverType, Object[] oArgs){
switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
... | IMPLEMENTATION | true | return null; //TODO: Make Android subclass
case HtmlUnit:
return null; //TODO: Make HtmlUnit subclass
default:
return null; | return null; //TODO: Make Opera subclass
case Safari:
return null; //TODO: Make Safari subclass
case iOS_iPhone:
return null; //TODO: Make iOS_iPhone subclass
case iOS_iPad:
return null; //TODO: Make iOS_iPad subclass
case Android:
return null; //TODO: Make Android subclass
case HtmlUnit:
return null; //TODO: Make Html... | switch(driverType) {
case Chrome:
return new NiceChrome().UnderloadedNiceWebDriverConstructor(oArgs).getThisWithVerbositySetTo(outputIsVerbose);
case Firefox:
return null; //TODO: Make Firefox subclass
case IE:
return null; //TODO: Make IE subclass
case Edge:
return null; //TODO: Make Edge subclass
case Opera:
return n... |
16,665 | 0 | /**
* Use the 'nzsession' program to clear out any persistent sessions.
* This is a hack; somehow, the Connection.close() call occurring in
* tearDown() is not actually closing the open netezza sessions. After
* 32 connections open like this, subsequent tests will deadlock.
* This method terminates the s... | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSessio... | DESIGN | true | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession);
args.add("-host");
a... | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession);
args.add("-host");
a... | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession);
args.add("-host");
a... |
16,665 | 1 | // Run nzsession and capture a list of open transactions. | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSessio... | NONSATD | true | String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession); | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession);
args.add("-host");
a... | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession);
args.add("-host");
a... |
16,665 | 2 | // Wait for the process to end. | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSessio... | NONSATD | true | LineBufferingAsyncSink sink = new LineBufferingAsyncSink();
sink.processStream(is);
// Wait for the process to end.
int result = p.waitFor();
if (0 != result) { | args.add("-host");
args.add(NETEZZA_HOST);
args.add("-u");
args.add(ADMIN_USER);
args.add("-pw");
args.add(ADMIN_PASS);
Process p = Runtime.getRuntime().exec(args.toArray(new String[0]));
InputStream is = p.getInputStream();
LineBufferingAsyncSink sink = new LineBufferingAsyncSink();
sink.processStream(is);
// Wait for... | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession);
args.add("-host");
a... |
16,665 | 3 | // Collect all the stdout, and parse the output.
// If the third whitespace-delimited token is the sqooptest user,
// the the first token is the nzsession id. We should kill that id. | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSessio... | NONSATD | true | throw new IOException("Session list command terminated with " + result);
}
// Collect all the stdout, and parse the output.
// If the third whitespace-delimited token is the sqooptest user,
// the the first token is the nzsession id. We should kill that id.
sink.join();
List<String> processList = sink.getLines(); | args.add(ADMIN_PASS);
Process p = Runtime.getRuntime().exec(args.toArray(new String[0]));
InputStream is = p.getInputStream();
LineBufferingAsyncSink sink = new LineBufferingAsyncSink();
sink.processStream(is);
// Wait for the process to end.
int result = p.waitFor();
if (0 != result) {
throw new IOException("Session l... | String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSession);
args.add("-host");
args.add(NETEZZA_HOST);
args.add("-u");
args.add(ADMIN_USER);
args.add("-p... |
16,665 | 4 | // Ignore empty lines. | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSessio... | NONSATD | true | for (String processLine : processList) {
if (null == processLine || processLine.length() == 0) {
continue; // Ignore empty lines.
}
String [] tokens = processLine.split(" +"); | if (0 != result) {
throw new IOException("Session list command terminated with " + result);
}
// Collect all the stdout, and parse the output.
// If the third whitespace-delimited token is the sqooptest user,
// the the first token is the nzsession id. We should kill that id.
sink.join();
List<String> processList = sin... | args.add("-u");
args.add(ADMIN_USER);
args.add("-pw");
args.add(ADMIN_PASS);
Process p = Runtime.getRuntime().exec(args.toArray(new String[0]));
InputStream is = p.getInputStream();
LineBufferingAsyncSink sink = new LineBufferingAsyncSink();
sink.processStream(is);
// Wait for the process to end.
int result = p.waitFor... |
16,665 | 5 | // Not enough tokens on this line. | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSessio... | NONSATD | true | String [] tokens = processLine.split(" +");
if (tokens.length < 3) {
continue; // Not enough tokens on this line.
}
if (tokens[2].equalsIgnoreCase(NETEZZA_USER)) { | // If the third whitespace-delimited token is the sqooptest user,
// the the first token is the nzsession id. We should kill that id.
sink.join();
List<String> processList = sink.getLines();
for (String processLine : processList) {
if (null == processLine || processLine.length() == 0) {
continue; // Ignore empty lines.... | Process p = Runtime.getRuntime().exec(args.toArray(new String[0]));
InputStream is = p.getInputStream();
LineBufferingAsyncSink sink = new LineBufferingAsyncSink();
sink.processStream(is);
// Wait for the process to end.
int result = p.waitFor();
if (0 != result) {
throw new IOException("Session list command terminated... |
16,665 | 6 | // Found a match. | public void clearNzSessions() throws IOException, InterruptedException {
String pathToNzSession = System.getProperty(
NZ_SESSION_PATH_KEY, DEFAULT_NZ_SESSION_PATH);
// Run nzsession and capture a list of open transactions.
ArrayList<String> args = new ArrayList<String>();
args.add(pathToNzSessio... | NONSATD | true | }
if (tokens[2].equalsIgnoreCase(NETEZZA_USER)) {
// Found a match.
killSession(tokens[0]);
} | List<String> processList = sink.getLines();
for (String processLine : processList) {
if (null == processLine || processLine.length() == 0) {
continue; // Ignore empty lines.
}
String [] tokens = processLine.split(" +");
if (tokens.length < 3) {
continue; // Not enough tokens on this line.
}
if (tokens[2].equalsIgnoreCa... | sink.processStream(is);
// Wait for the process to end.
int result = p.waitFor();
if (0 != result) {
throw new IOException("Session list command terminated with " + result);
}
// Collect all the stdout, and parse the output.
// If the third whitespace-delimited token is the sqooptest user,
// the the first token is the... |
286 | 0 | /**
* Get the path to the 32-bit app_process binary.<br>
* <br>
* It is unlikely you will need to call this method.
*
* @see #getAppProcess()
* @see #getAppProcess32Bit(boolean)
*
* @return Path to 32-bit app_process or app_process with unspecified bits or null
*/ | public static String getAppProcess32Bit() {
return getAppProcess32Bit(true);
} | NONSATD | true | public static String getAppProcess32Bit() {
return getAppProcess32Bit(true);
} | public static String getAppProcess32Bit() {
return getAppProcess32Bit(true);
} | public static String getAppProcess32Bit() {
return getAppProcess32Bit(true);
} |
16,671 | 0 | //TODO - Could we also check if the elevator is up and limit speed? | @Override
public void execute() {
double y = -Constants.joystick.getY();
double z = Constants.joystick.getZ();
//TODO - Could we also check if the elevator is up and limit speed?
if(y < Constants.REVERSE_MAX_SPEED) {
y = Constants.REVERSE_MAX_SPEED;
}
if(z... | IMPLEMENTATION | true | double y = -Constants.joystick.getY();
double z = Constants.joystick.getZ();
//TODO - Could we also check if the elevator is up and limit speed?
if(y < Constants.REVERSE_MAX_SPEED) {
y = Constants.REVERSE_MAX_SPEED; | @Override
public void execute() {
double y = -Constants.joystick.getY();
double z = Constants.joystick.getZ();
//TODO - Could we also check if the elevator is up and limit speed?
if(y < Constants.REVERSE_MAX_SPEED) {
y = Constants.REVERSE_MAX_SPEED;
}
if(z < Constants.LEFT_MAX_SPEED ) {
z = Constants.LEFT_MAX_SPEED;
} ... | @Override
public void execute() {
double y = -Constants.joystick.getY();
double z = Constants.joystick.getZ();
//TODO - Could we also check if the elevator is up and limit speed?
if(y < Constants.REVERSE_MAX_SPEED) {
y = Constants.REVERSE_MAX_SPEED;
}
if(z < Constants.LEFT_MAX_SPEED ) {
z = Constants.LEFT_MAX_SPEED;
} ... |
8,485 | 0 | // not called | private void updateCartCount(int count){
if (txtItemCount != null) {
txtItemCount.setText(String.valueOf(count));
}
} | DESIGN | true | private void updateCartCount(int count){
if (txtItemCount != null) {
txtItemCount.setText(String.valueOf(count));
}
} | private void updateCartCount(int count){
if (txtItemCount != null) {
txtItemCount.setText(String.valueOf(count));
}
} | private void updateCartCount(int count){
if (txtItemCount != null) {
txtItemCount.setText(String.valueOf(count));
}
} |
33,065 | 0 | /**
* TODO implement me
*/ | private List<DataPoint> getIntersectedSetUsingQuadTree(List<DataPoint> dataset, Rectangle rect) {
throw new UnsupportedOperationException("Not Yet Implemented");
} | IMPLEMENTATION | true | private List<DataPoint> getIntersectedSetUsingQuadTree(List<DataPoint> dataset, Rectangle rect) {
throw new UnsupportedOperationException("Not Yet Implemented");
} | private List<DataPoint> getIntersectedSetUsingQuadTree(List<DataPoint> dataset, Rectangle rect) {
throw new UnsupportedOperationException("Not Yet Implemented");
} | private List<DataPoint> getIntersectedSetUsingQuadTree(List<DataPoint> dataset, Rectangle rect) {
throw new UnsupportedOperationException("Not Yet Implemented");
} |
8,490 | 0 | //FIXME this line break is doubled - is this correct?? | private static String getSampleWithLineBreak(){
StringBuilder sb = new StringBuilder();
sb.append("[");
for(int i = 1; i < 4; i++){
sb.append(getTypicalElement(i));
sb.append(",");
}
sb.append("{\"id\" : 4," +
"\"author\" : \"With line\\n b... | DEFECT | true | }
sb.append("{\"id\" : 4," +
"\"author\" : \"With line\\n break\"," + //FIXME this line break is doubled - is this correct??
"\"title\" : \"Book title 4\"," +
"\"publish_date\" : \"2010-05-26\"" + | private static String getSampleWithLineBreak(){
StringBuilder sb = new StringBuilder();
sb.append("[");
for(int i = 1; i < 4; i++){
sb.append(getTypicalElement(i));
sb.append(",");
}
sb.append("{\"id\" : 4," +
"\"author\" : \"With line\\n break\"," + //FIXME this line break is doubled - is this correct??
"\"title\" : \... | private static String getSampleWithLineBreak(){
StringBuilder sb = new StringBuilder();
sb.append("[");
for(int i = 1; i < 4; i++){
sb.append(getTypicalElement(i));
sb.append(",");
}
sb.append("{\"id\" : 4," +
"\"author\" : \"With line\\n break\"," + //FIXME this line break is doubled - is this correct??
"\"title\" : \... |
8,492 | 0 | /* A WeakKey is equal to another WeakKey iff they both refer to objects
that are, in turn, equal according to their own equals methods */ | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
... | NONSATD | true | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.clas... | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.clas... | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.clas... |
8,492 | 1 | // never happens | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
... | NONSATD | true | @Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type, | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.clas... | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.clas... |
8,492 | 2 | // This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false; | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
... | DESIGN | true | if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.class))) return false;
Object t = this.get(); | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.clas... | @Pure
@Override
public boolean equals(@Nullable Object o) {
if (o == null) return false; // never happens
if (this == o) return true;
// This test is illegal because WeakKey is a generic type,
// so use the getClass hack below instead.
// if (!(o instanceof WeakKey)) return false;
if (!(o.getClass().equals(WeakKey.clas... |
16,687 | 0 | /**
* Reads the GPS configuration and inserts GPS overlay on map, if it is enabled.
*/ | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gp... | NONSATD | true | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gpsSettingController.getGPSLocationState()... | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gpsSettingController.getGPSLocationState()... | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gpsSettingController.getGPSLocationState()... |
16,687 | 1 | // verify if GPS enable on device | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gp... | NONSATD | true | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext()); | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gpsSettingController.getGPSLocationState()... | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gpsSettingController.getGPSLocationState()... |
16,687 | 2 | // TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar? | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gp... | IMPLEMENTATION | true | }
}else {
// TODO: notify user when the state of the GPS resource is disabled. use one icon on action bar?
}
} | Boolean showGPSLocation = gpsSettingController.getGPSLocationState();
Boolean showGPSLocationOnCenter = gpsSettingController.getGPSCenterState();
if (showGPSLocation != null)
if (showGPSLocation) {
MainActivity mainActivity = (MainActivity) context;
GPSOverlayController gpsOverlayController = mainActivity.getMainContro... | public void applyGPSSetting() {
// verify if GPS enable on device
if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) {
GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext());
Boolean showGPSLocation = gpsSettingController.getGPSLocationState()... |
33,071 | 0 | /** Tests matching of built-in operator names. */ | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always c... | NONSATD | true | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("sel... | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("sel... | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("sel... |
33,071 | 1 | // TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java. | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always c... | TEST | true | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER) | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("sel... | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("sel... |
33,071 | 2 | // Built-in functions are always case-insensitive. | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always c... | NONSATD | true | .withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("select count(*), sum(deptno), floor(2.5) from dept").ok();
oracle.sql("select COUNT(*), FLOOR(2.5) from dept").ok(); | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("sel... | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always case-insensitive.
oracle.sql("sel... |
24,886 | 0 | //TODO this should return a list of what? | @Test
public void testAuthRequest() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(session);
HttpServletResponse re... | DESIGN | true | HttpServletResponse resp = createMockResponse();
AuthRequest authRequest = createMockAuthRequest();
//TODO this should return a list of what?
expect(mockManager.discover(eq("discover"))).andReturn(Lists.newArrayList());
expect(mockManager.associate(anyObject(List.class))).andReturn(info); | @Test
public void testAuthRequest() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(session);
HttpServletResponse resp = createMockRes... | @Test
public void testAuthRequest() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(session);
HttpServletResponse resp = createMockRes... |
24,887 | 0 | //TODO this should return a list of what? | @Test(expected = RuntimeException.class)
public void testAuthRequestIOException() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMo... | DESIGN | true | HttpServletResponse resp = createMockResponse();
AuthRequest authRequest = createMockAuthRequest();
//TODO this should return a list of what?
expect(mockManager.discover(eq("discover"))).andThrow(new IOException());
expect(mockManager.associate(anyObject(List.class))).andReturn(info); | @Test(expected = RuntimeException.class)
public void testAuthRequestIOException() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(sess... | @Test(expected = RuntimeException.class)
public void testAuthRequestIOException() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(sess... |
24,888 | 0 | //TODO this should return a list of what? | @Test
public void testVerifyResponse() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, true, true, true);
HttpServletRequest req = createMockRequest(session);
... | DESIGN | true | Identifier id = createMockIdentifier();
VerificationResult result = createMockVerificationResult(id, authSuccess);
//TODO this should return a list of what?
expect(mockManager.discover(eq("discover"))).andReturn(Lists.newArrayList());
expect(mockManager.associate(anyObject(List.class))).andReturn(info); | @Test
public void testVerifyResponse() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, true, true, true);
HttpServletRequest req = createMockRequest(session);
AuthRequest authR... | @Test
public void testVerifyResponse() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, true, true, true);
HttpServletRequest req = createMockRequest(session);
AuthRequest authR... |
24,889 | 0 | //TODO this should return a list of what? | @Test
public void testVerifyResponseNullIdentifier() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockReque... | DESIGN | true | true, true);
VerificationResult result = createMockVerificationResult(null, authSuccess);
//TODO this should return a list of what?
expect(mockManager.discover(eq("discover"))).andReturn(Lists.newArrayList());
expect(mockManager.associate(anyObject(List.class))).andReturn(info); | @Test
public void testVerifyResponseNullIdentifier() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(session);
A... | @Test
public void testVerifyResponseNullIdentifier() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(session);
A... |
24,890 | 0 | //TODO this should return a list of what? | @Test
public void testVerifyResponseNoEmail() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, false);
HttpServletRequest req = createMockRequest(ses... | DESIGN | true | Identifier id = createMockIdentifier();
VerificationResult result = createMockVerificationResult(id, authSuccess);
//TODO this should return a list of what?
expect(mockManager.discover(eq("discover"))).andReturn(Lists.newArrayList());
expect(mockManager.associate(anyObject(List.class))).andReturn(info); | @Test
public void testVerifyResponseNoEmail() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, false);
HttpServletRequest req = createMockRequest(session);
AuthReq... | @Test
public void testVerifyResponseNoEmail() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, false);
HttpServletRequest req = createMockRequest(session);
AuthReq... |
8,514 | 0 | // TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access | public Object getTarget() {
try {
checkPermission(READ);
} catch (AccessDeniedException e) {
String rest = Stapler.getCurrentRequest().getRestOfPath();
for (String name : ALWAYS_READABLE_PATHS) {
if (rest.startsWith(name)) {
return ... | DESIGN | true | }
}
// TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access
if (rest.matches("/computer/[^/]+/slave-agent[.]jnlp")
&& "true".equals(Stapler.getCurrentRequest().getParameter("encrypt"))) { | for (String name : ALWAYS_READABLE_PATHS) {
if (rest.startsWith(name)) {
return this;
}
}
for (String name : getUnprotectedRootActions()) {
if (rest.startsWith("/" + name + "/") || rest.equals("/" + name)) {
return this;
}
}
// TODO SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected ac... | public Object getTarget() {
try {
checkPermission(READ);
} catch (AccessDeniedException e) {
String rest = Stapler.getCurrentRequest().getRestOfPath();
for (String name : ALWAYS_READABLE_PATHS) {
if (rest.startsWith(name)) {
return this;
}
}
for (String name : getUnprotectedRootActions()) {
if (rest.startsWith("/" + na... |
325 | 0 | // This cast is horrid but we can't fix everything at once. | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
... | DESIGN | true | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions(); | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
// empty panel, just add the tracks
panel.addTracks(tracks);
... | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
// empty panel, just add the tracks
panel.addTracks(tracks);
... |
325 | 1 | // empty panel, just add the tracks | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
... | NONSATD | true | List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
// empty panel, just add the tracks
panel.addTracks(tracks);
} else { | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
// empty panel, just add the tracks
panel.addTracks(tracks);
... | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
// empty panel, just add the tracks
panel.addTracks(tracks);
... |
325 | 2 | // Find the regions containing the startPoint and point | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
... | NONSATD | true | panel.addTracks(tracks);
} else {
// Find the regions containing the startPoint and point
boolean before = true;
MouseableRegion dropRegion = null; | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
// empty panel, just add the tracks
panel.addTracks(tracks);
... | void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) {
// This cast is horrid but we can't fix everything at once.
TrackPanel panel = ((TrackPanel) getParent());
List<MouseableRegion> regions = getMouseRegions();
if (regions.isEmpty()) {
// empty panel, just add the tracks
panel.addTracks(tracks);
... |
24,911 | 0 | // bug in junit csvsource parsing - it does a trim, using a manual parsing as workaround | @ParameterizedTest
@MethodSource("data") // bug in junit csvsource parsing - it does a trim, using a manual parsing as workaround
void parse(final String csv) {
final String[] parts = csv.split(",");
parse(parser, parts[0], parseInt(parts[1]), parseBoolean(parts[2]), null, parseInt(parts[3]));
... | DEFECT | true | @ParameterizedTest
@MethodSource("data") // bug in junit csvsource parsing - it does a trim, using a manual parsing as workaround
void parse(final String csv) {
final String[] parts = csv.split(","); | @ParameterizedTest
@MethodSource("data") // bug in junit csvsource parsing - it does a trim, using a manual parsing as workaround
void parse(final String csv) {
final String[] parts = csv.split(",");
parse(parser, parts[0], parseInt(parts[1]), parseBoolean(parts[2]), null, parseInt(parts[3]));
} | @ParameterizedTest
@MethodSource("data") // bug in junit csvsource parsing - it does a trim, using a manual parsing as workaround
void parse(final String csv) {
final String[] parts = csv.split(",");
parse(parser, parts[0], parseInt(parts[1]), parseBoolean(parts[2]), null, parseInt(parts[3]));
} |
343 | 0 | //todo issue #232 fix increment topic partition name for tests on multi jvm | @AfterMethod
public void cleanupResources() throws SQLException {
TEST_NUMBER++;
//todo issue #232 fix increment topic partition name for tests on multi jvm
ALL_RESOURCES.cleanUpClusters();
DB_RESOURCE.executeResource(JDBCUtil.DROP_TABLE_SQL_RESOURCE);
} | DEFECT | true | public void cleanupResources() throws SQLException {
TEST_NUMBER++;
//todo issue #232 fix increment topic partition name for tests on multi jvm
ALL_RESOURCES.cleanUpClusters();
DB_RESOURCE.executeResource(JDBCUtil.DROP_TABLE_SQL_RESOURCE); | @AfterMethod
public void cleanupResources() throws SQLException {
TEST_NUMBER++;
//todo issue #232 fix increment topic partition name for tests on multi jvm
ALL_RESOURCES.cleanUpClusters();
DB_RESOURCE.executeResource(JDBCUtil.DROP_TABLE_SQL_RESOURCE);
} | @AfterMethod
public void cleanupResources() throws SQLException {
TEST_NUMBER++;
//todo issue #232 fix increment topic partition name for tests on multi jvm
ALL_RESOURCES.cleanUpClusters();
DB_RESOURCE.executeResource(JDBCUtil.DROP_TABLE_SQL_RESOURCE);
} |
24,924 | 0 | /**
* TODO implement any common functionality here so that your
* heuristics can reuse them!
* E.g. you may want to implement the swapping of two delivery locations here!
*/ | public ObjectiveFunctionInterface getObjectiveFunction(){
return this.oObjectiveFunction;
} | IMPLEMENTATION | true | public ObjectiveFunctionInterface getObjectiveFunction(){
return this.oObjectiveFunction;
} | public ObjectiveFunctionInterface getObjectiveFunction(){
return this.oObjectiveFunction;
} | public ObjectiveFunctionInterface getObjectiveFunction(){
return this.oObjectiveFunction;
} |
24,925 | 0 | // Already scheduled | private void scheduleCleanup() {
if (cleanupRegistration != null) {
// Already scheduled
return;
}
cleanupRegistration = ui.beforeClientResponse(ui, ignore -> {
cleanupRegistration = null;
pendingCleanup = false;
// TODO Avoid copying b... | NONSATD | true | private void scheduleCleanup() {
if (cleanupRegistration != null) {
// Already scheduled
return;
} | private void scheduleCleanup() {
if (cleanupRegistration != null) {
// Already scheduled
return;
}
cleanupRegistration = ui.beforeClientResponse(ui, ignore -> {
cleanupRegistration = null;
pendingCleanup = false;
// TODO Avoid copying by using Iterator.remove()
properties.keySet().stream().filter(property -> !lastUsed.... | private void scheduleCleanup() {
if (cleanupRegistration != null) {
// Already scheduled
return;
}
cleanupRegistration = ui.beforeClientResponse(ui, ignore -> {
cleanupRegistration = null;
pendingCleanup = false;
// TODO Avoid copying by using Iterator.remove()
properties.keySet().stream().filter(property -> !lastUsed.... |
24,925 | 1 | // TODO Avoid copying by using Iterator.remove() | private void scheduleCleanup() {
if (cleanupRegistration != null) {
// Already scheduled
return;
}
cleanupRegistration = ui.beforeClientResponse(ui, ignore -> {
cleanupRegistration = null;
pendingCleanup = false;
// TODO Avoid copying b... | IMPLEMENTATION | true | cleanupRegistration = null;
pendingCleanup = false;
// TODO Avoid copying by using Iterator.remove()
properties.keySet().stream().filter(property -> !lastUsed.contains(property)).collect(Collectors.toList())
.forEach(unused -> properties.remove(unused).unregister()); | private void scheduleCleanup() {
if (cleanupRegistration != null) {
// Already scheduled
return;
}
cleanupRegistration = ui.beforeClientResponse(ui, ignore -> {
cleanupRegistration = null;
pendingCleanup = false;
// TODO Avoid copying by using Iterator.remove()
properties.keySet().stream().filter(property -> !lastUsed.... | private void scheduleCleanup() {
if (cleanupRegistration != null) {
// Already scheduled
return;
}
cleanupRegistration = ui.beforeClientResponse(ui, ignore -> {
cleanupRegistration = null;
pendingCleanup = false;
// TODO Avoid copying by using Iterator.remove()
properties.keySet().stream().filter(property -> !lastUsed.... |
8,547 | 0 | /** Deletes all items in the given path list followed by all bucket items. */ | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before thei... | NONSATD | true | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// N... | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// N... | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// N... |
8,547 | 1 | // TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// Note: we modify the input list, which is ok for current usage.
// We should make a copy in case that changes in ... | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before thei... | DESIGN | true | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// N... | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// N... | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// N... |
8,547 | 2 | // TODO(b/110833109): populate generation ID in StorageResourceId when listing infos? | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before thei... | IMPLEMENTATION | true | List<StorageResourceId> objectsToDelete = new ArrayList<>(itemsToDelete.size());
for (FileInfo fileInfo : itemsToDelete) {
// TODO(b/110833109): populate generation ID in StorageResourceId when listing infos?
objectsToDelete.add(
new StorageResourceId( | // TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// Note: we modify the input list, which is ok for current usage.
// We should make a copy in case that changes in ... | private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before their parents.
//
// N... |
8,549 | 0 | /**
* Returns an Observable that emits items that are the result of applying a specified function to pairs of
* values, one each from the source ObservableSource and another specified ObservableSource.
* <p>
* The operator subscribes to its sources in order they are specified and completes eagerly i... | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper) {
ObjectHelper.requireNonNull(other, "other is null");
return zip(this, other, zipper);
... | NONSATD | true | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper) {
ObjectHelper.requireNonNull(other, "other is null");
return zip(this, other, zipper);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper) {
ObjectHelper.requireNonNull(other, "other is null");
return zip(this, other, zipper);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper) {
ObjectHelper.requireNonNull(other, "other is null");
return zip(this, other, zipper);
} |
8,550 | 0 | /**
* Returns an Observable that emits items that are the result of applying a specified function to pairs of
* values, one each from the source ObservableSource and another specified ObservableSource.
* <p>
* The operator subscribes to its sources in order they are specified and completes eagerly i... | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError) {
return zip(this, other, zipper, delayError);
} | NONSATD | true | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError) {
return zip(this, other, zipper, delayError);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError) {
return zip(this, other, zipper, delayError);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError) {
return zip(this, other, zipper, delayError);
} |
8,551 | 0 | /**
* Returns an Observable that emits items that are the result of applying a specified function to pairs of
* values, one each from the source ObservableSource and another specified ObservableSource.
* <p>
* The operator subscribes to its sources in order they are specified and completes eagerly i... | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError, int bufferSize) {
return zip(this, other, zipper, delayError, bufferSize);
} | NONSATD | true | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError, int bufferSize) {
return zip(this, other, zipper, delayError, bufferSize);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError, int bufferSize) {
return zip(this, other, zipper, delayError, bufferSize);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError, int bufferSize) {
return zip(this, other, zipper, delayError, bufferSize);
} |
24,936 | 0 | // TODO: get path while TextPath is set. | @Override
protected Path getPath(Canvas canvas, Paint paint) {
Path path = new Path();
String text = formatText();
if (text == null) {
return path;
}
// TODO: get path while TextPath is set.
if (setupFillPaint(paint, 1.0f, getBox(paint, text))) {
... | IMPLEMENTATION | true | return path;
}
// TODO: get path while TextPath is set.
if (setupFillPaint(paint, 1.0f, getBox(paint, text))) {
applyTextPropertiesToPaint(paint); | @Override
protected Path getPath(Canvas canvas, Paint paint) {
Path path = new Path();
String text = formatText();
if (text == null) {
return path;
}
// TODO: get path while TextPath is set.
if (setupFillPaint(paint, 1.0f, getBox(paint, text))) {
applyTextPropertiesToPaint(paint);
paint.getTextPath(text, 0, text.length... | @Override
protected Path getPath(Canvas canvas, Paint paint) {
Path path = new Path();
String text = formatText();
if (text == null) {
return path;
}
// TODO: get path while TextPath is set.
if (setupFillPaint(paint, 1.0f, getBox(paint, text))) {
applyTextPropertiesToPaint(paint);
paint.getTextPath(text, 0, text.length... |
16,754 | 0 | /**
* Attach element identify name to class of "use" usage
*
* @param psiElement PhpClass used in "use" statement
*/ | @Override
public boolean isReferenceTo(PsiElement psiElement) {
if(!(psiElement instanceof PhpNamedElement)) {
return false;
}
String text = getElement().getText();
if(StringUtils.isBlank(text)) {
return false;
}
... | NONSATD | true | @Override
public boolean isReferenceTo(PsiElement psiElement) {
if(!(psiElement instanceof PhpNamedElement)) {
return false;
}
String text = getElement().getText();
if(StringUtils.isBlank(text)) {
return false;
}
PsiElement namespace = element.getPrevSibling();
if(PhpPsiUtil.isOfType(namespace, PhpDocTokenTypes.DOC_NAM... | @Override
public boolean isReferenceTo(PsiElement psiElement) {
if(!(psiElement instanceof PhpNamedElement)) {
return false;
}
String text = getElement().getText();
if(StringUtils.isBlank(text)) {
return false;
}
PsiElement namespace = element.getPrevSibling();
if(PhpPsiUtil.isOfType(namespace, PhpDocTokenTypes.DOC_NAM... | @Override
public boolean isReferenceTo(PsiElement psiElement) {
if(!(psiElement instanceof PhpNamedElement)) {
return false;
}
String text = getElement().getText();
if(StringUtils.isBlank(text)) {
return false;
}
PsiElement namespace = element.getPrevSibling();
if(PhpPsiUtil.isOfType(namespace, PhpDocTokenTypes.DOC_NAM... |
16,754 | 1 | // @TODO: namespace not supported | @Override
public boolean isReferenceTo(PsiElement psiElement) {
if(!(psiElement instanceof PhpNamedElement)) {
return false;
}
String text = getElement().getText();
if(StringUtils.isBlank(text)) {
return false;
}
... | IMPLEMENTATION | true | PsiElement namespace = element.getPrevSibling();
if(PhpPsiUtil.isOfType(namespace, PhpDocTokenTypes.DOC_NAMESPACE)) {
// @TODO: namespace not supported
return false;
} | public boolean isReferenceTo(PsiElement psiElement) {
if(!(psiElement instanceof PhpNamedElement)) {
return false;
}
String text = getElement().getText();
if(StringUtils.isBlank(text)) {
return false;
}
PsiElement namespace = element.getPrevSibling();
if(PhpPsiUtil.isOfType(namespace, PhpDocTokenTypes.DOC_NAMESPACE)) {... | @Override
public boolean isReferenceTo(PsiElement psiElement) {
if(!(psiElement instanceof PhpNamedElement)) {
return false;
}
String text = getElement().getText();
if(StringUtils.isBlank(text)) {
return false;
}
PsiElement namespace = element.getPrevSibling();
if(PhpPsiUtil.isOfType(namespace, PhpDocTokenTypes.DOC_NAM... |
16,761 | 0 | // TODO(qinmin): May need to report the error to the caller. crbug.com/356498. | @CalledByNative
protected void releaseOutputBuffer(int index, boolean render) {
try {
mMediaCodec.releaseOutputBuffer(index, render);
} catch (IllegalStateException e) {
// TODO(qinmin): May need to report the error to the caller. crbug.com/356498.
Log.e(TAG, "Fai... | IMPLEMENTATION | true | mMediaCodec.releaseOutputBuffer(index, render);
} catch (IllegalStateException e) {
// TODO(qinmin): May need to report the error to the caller. crbug.com/356498.
Log.e(TAG, "Failed to release output buffer", e);
} | @CalledByNative
protected void releaseOutputBuffer(int index, boolean render) {
try {
mMediaCodec.releaseOutputBuffer(index, render);
} catch (IllegalStateException e) {
// TODO(qinmin): May need to report the error to the caller. crbug.com/356498.
Log.e(TAG, "Failed to release output buffer", e);
}
} | @CalledByNative
protected void releaseOutputBuffer(int index, boolean render) {
try {
mMediaCodec.releaseOutputBuffer(index, render);
} catch (IllegalStateException e) {
// TODO(qinmin): May need to report the error to the caller. crbug.com/356498.
Log.e(TAG, "Failed to release output buffer", e);
}
} |
16,764 | 0 | // TODO(dalecurtis): We may want to drop transient errors here. | @Override
public void onError(MediaCodec codec, MediaCodec.CodecException e) {
// TODO(dalecurtis): We may want to drop transient errors here.
Log.e(TAG, "MediaCodec.onError: %s", e.getDiagnosticInfo());
mMediaCodecBridge.onError(e);
} | IMPLEMENTATION | true | @Override
public void onError(MediaCodec codec, MediaCodec.CodecException e) {
// TODO(dalecurtis): We may want to drop transient errors here.
Log.e(TAG, "MediaCodec.onError: %s", e.getDiagnosticInfo());
mMediaCodecBridge.onError(e); | @Override
public void onError(MediaCodec codec, MediaCodec.CodecException e) {
// TODO(dalecurtis): We may want to drop transient errors here.
Log.e(TAG, "MediaCodec.onError: %s", e.getDiagnosticInfo());
mMediaCodecBridge.onError(e);
} | @Override
public void onError(MediaCodec codec, MediaCodec.CodecException e) {
// TODO(dalecurtis): We may want to drop transient errors here.
Log.e(TAG, "MediaCodec.onError: %s", e.getDiagnosticInfo());
mMediaCodecBridge.onError(e);
} |
8,573 | 0 | //TODO: translate code | public void translate() {
//TODO: translate code
} | IMPLEMENTATION | true | public void translate() {
//TODO: translate code
} | public void translate() {
//TODO: translate code
} | public void translate() {
//TODO: translate code
} |
33,149 | 0 | //HACK: Need to have padding at the end of the tag, or Winamp won't see the last frame (at least 6 bytes seem to be required). | private void tag()
throws Exception
{
String[] asFilename = (String[])m_oCmdLineMap.get("filenames");
for (int i=0; i < asFilename.length; i++)
{
File oSourceFile = new File(asFilename[i]);
MP3File oMP3File = new MP3File(oSourceFile);
if (m_oCmdLin... | DESIGN | true | {
ID3V2_3_0Tag oID3V2_3_0Tag = new ID3V2_3_0Tag();
//HACK: Need to have padding at the end of the tag, or Winamp won't see the last frame (at least 6 bytes seem to be required).
oID3V2_3_0Tag.setPaddingLength(16);
if (m_oCmdLineMap.containsKey("album")) | }
if (m_oCmdLineMap.containsKey("track"))
{
oID3V1_1Tag.setAlbumTrack(((Integer)m_oCmdLineMap.get("track")).intValue());
}
oMP3File.setID3Tag(oID3V1_1Tag);
}
if (m_oCmdLineMap.containsKey("2"))
{
ID3V2_3_0Tag oID3V2_3_0Tag = new ID3V2_3_0Tag();
//HACK: Need to have padding at the end of the tag, or Winamp won't see the... | String sGenre = (String)m_oCmdLineMap.get("genre");
oID3V1_1Tag.setGenre(ID3V1Tag.Genre.lookupGenre(sGenre));
}
if (m_oCmdLineMap.containsKey("title"))
{
oID3V1_1Tag.setTitle((String)m_oCmdLineMap.get("title"));
}
if (m_oCmdLineMap.containsKey("year"))
{
oID3V1_1Tag.setYear(((Integer)m_oCmdLineMap.get("year")).toString... |
16,767 | 0 | // Iterate on the messages | @Override
public Runnable getConsumer(final KafkaSynchronizedConsumerPool pool, final KafkaStream<byte[], byte[]> stream) {
return new Runnable() {
@Override
public void run() {
ConsumerIterator<byte[],byte[]> iter = stream.iterator();
byte[] sipHashKe... | NONSATD | true | byte[] sipHashKey = frontend.keystore.getKey(KeyStore.SIPHASH_KAFKA_PLASMA_FRONTEND_IN);
byte[] aesKey = frontend.keystore.getKey(KeyStore.AES_KAFKA_PLASMA_FRONTEND_IN);
// Iterate on the messages
TDeserializer deserializer = new TDeserializer(new TCompactProtocol.Factory());
KafkaOffsetCounters counters = pool.getCoun... | @Override
public Runnable getConsumer(final KafkaSynchronizedConsumerPool pool, final KafkaStream<byte[], byte[]> stream) {
return new Runnable() {
@Override
public void run() {
ConsumerIterator<byte[],byte[]> iter = stream.iterator();
byte[] sipHashKey = frontend.keystore.getKey(KeyStore.SIPHASH_KAFKA_PLASMA_FRONTEND_... | @Override
public Runnable getConsumer(final KafkaSynchronizedConsumerPool pool, final KafkaStream<byte[], byte[]> stream) {
return new Runnable() {
@Override
public void run() {
ConsumerIterator<byte[],byte[]> iter = stream.iterator();
byte[] sipHashKey = frontend.keystore.getKey(KeyStore.SIPHASH_KAFKA_PLASMA_FRONTEND_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.