nus-yam/ex-repair huggingface dataset:
Program: 51789
Project: 51789
Buggy source:
/** 
 * Configure the FML logger
 */
private static void configureLogging(){
  LogManager.getLogManager().reset();
  Logger globalLogger=Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
  globalLogger.setLevel(Level.OFF);
  log.myLog=Logger.getLogger("String_Node_Str");
  Logger stdOut=Logger.getLogger("String_Node_Str");
  stdOut.setParent(log.myLog);
  Logger stdErr=Logger.getLogger("String_Node_Str");
  stdErr.setParent(log.myLog);
  FMLLogFormatter formatter=new FMLLogFormatter();
  log.myLog.setUseParentHandlers(false);
  log.myLog.addHandler(new ConsoleLogWrapper());
  consoleLogThread=new Thread(new ConsoleLogThread());
  consoleLogThread.start();
  ConsoleLogThread.wrappedHandler.setLevel(Level.parse(System.getProperty("String_Node_Str","String_Node_Str")));
  ConsoleLogThread.wrappedHandler.setFormatter(formatter);
  log.myLog.setLevel(Level.ALL);
  try {
    File logPath=new File(minecraftHome,FMLRelauncher.logFileNamePattern);
    FileHandler fileHandler=new FileHandler(logPath.getPath(),0,3);
    fileHandler.setFormatter(formatter);
    fileHandler.setLevel(Level.ALL);
    log.myLog.addHandler(fileHandler);
  }
 catch (  Exception e) {
  }
  System.setOut(new PrintStream(new LoggingOutStream(stdOut),true));
  System.setErr(new PrintStream(new LoggingOutStream(stdErr),true));
  configured=true;
}

Fixed version (ground truth):
/** 
 * Configure the FML logger
 */
private static void configureLogging(){
  LogManager.getLogManager().reset();
  Logger globalLogger=Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
  globalLogger.setLevel(Level.OFF);
  log.myLog=Logger.getLogger("String_Node_Str");
  Logger stdOut=Logger.getLogger("String_Node_Str");
  stdOut.setParent(log.myLog);
  Logger stdErr=Logger.getLogger("String_Node_Str");
  stdErr.setParent(log.myLog);
  FMLLogFormatter formatter=new FMLLogFormatter();
  log.myLog.setUseParentHandlers(false);
  log.myLog.addHandler(new ConsoleLogWrapper());
  consoleLogThread=new Thread(new ConsoleLogThread());
  consoleLogThread.start();
  ConsoleLogThread.wrappedHandler.setLevel(Level.parse(System.getProperty("String_Node_Str","String_Node_Str")));
  ConsoleLogThread.wrappedHandler.setFormatter(formatter);
  log.myLog.setLevel(Level.ALL);
  try {
    File logPath=new File(minecraftHome,FMLRelauncher.logFileNamePattern);
    FileHandler fileHandler=new FileHandler(logPath.getPath(),0,3);
    fileHandler.setFormatter(formatter);
    fileHandler.setLevel(Level.ALL);
    log.myLog.addHandler(fileHandler);
  }
 catch (  Exception e) {
  }
  errCache=System.err;
  System.setOut(new PrintStream(new LoggingOutStream(stdOut),true));
  System.setErr(new PrintStream(new LoggingOutStream(stdErr),true));
  configured=true;
}
Program: 51790
Project: 51790
Buggy source:
@Override public void adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket packet){
  Entity ent=client.field_71441_e.func_73024_a(packet.entityId);
  if (ent != null) {
    ent.field_70118_ct=packet.serverX;
    ent.field_70117_cu=packet.serverY;
    ent.field_70116_cv=packet.serverZ;
  }
 else {
    FMLLog.fine("String_Node_Str",packet.entityId);
  }
}

Fixed version (ground truth):
@Override public void adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket packet){
  Entity ent=client.field_71441_e.func_73045_a(packet.entityId);
  if (ent != null) {
    ent.field_70118_ct=packet.serverX;
    ent.field_70117_cu=packet.serverY;
    ent.field_70116_cv=packet.serverZ;
  }
 else {
    FMLLog.fine("String_Node_Str",packet.entityId);
  }
}
Program: 51792
Project: 51792
Buggy source:
/** 
 * Return the effective side for the context in the game. This is dependent on thread analysis to try and determine whether the code is running in the server or not. Use at your own risk
 */
public Side getEffectiveSide(){
  Thread thr=Thread.currentThread();
  if ((thr instanceof ThreadServerApplication) || (thr instanceof ServerListenThread)) {
    return Side.SERVER;
  }
  return Side.CLIENT;
}

Fixed version (ground truth):
/** 
 * Return the effective side for the context in the game. This is dependent on thread analysis to try and determine whether the code is running in the server or not. Use at your own risk
 */
public Side getEffectiveSide(){
  Thread thr=Thread.currentThread();
  return Side.CLIENT;
}
Program: 51793
Project: 51793
Buggy source:
private void handleClientConnection(NetLoginHandler netLoginHandler,MinecraftServer server,SocketAddress address,String userName){
  if (!loginStates.containsKey(netLoginHandler)) {
    if (handleVanillaLoginKick(netLoginHandler,server,address,userName)) {
      FMLLog.fine("String_Node_Str",userName);
      netLoginHandler.completeConnection("String_Node_Str");
      return;
    }
  }
switch (loginStates.get(netLoginHandler)) {
case LOGIN_RECEIVED:
    String modKick=NetworkRegistry.instance().connectionReceived(netLoginHandler,netLoginHandler.field_72538_b);
  if (modKick != null) {
    netLoginHandler.completeConnection(modKick);
    loginStates.remove(netLoginHandler);
    return;
  }
if (!handleVanillaLoginKick(netLoginHandler,server,address,userName)) {
  loginStates.remove(netLoginHandler);
  return;
}
NetLoginHandler.func_72531_a(netLoginHandler,false);
netLoginHandler.field_72538_b.func_74429_a(getModListRequestPacket());
loginStates.put(netLoginHandler,CONNECTION_VALID);
break;
case CONNECTION_VALID:
netLoginHandler.completeConnection(null);
loginStates.remove(netLoginHandler);
break;
case MISSING_MODS_OR_VERSIONS:
netLoginHandler.completeConnection("String_Node_Str");
loginStates.remove(netLoginHandler);
break;
case FML_OUT_OF_DATE:
netLoginHandler.completeConnection("String_Node_Str");
loginStates.remove(netLoginHandler);
break;
default :
netLoginHandler.completeConnection("String_Node_Str");
loginStates.remove(netLoginHandler);
break;
}
}

Fixed version (ground truth):
private void handleClientConnection(NetLoginHandler netLoginHandler,MinecraftServer server,SocketAddress address,String userName){
  if (!loginStates.containsKey(netLoginHandler)) {
    if (handleVanillaLoginKick(netLoginHandler,server,address,userName)) {
      FMLLog.fine("String_Node_Str",userName);
      netLoginHandler.completeConnection("String_Node_Str");
      return;
    }
 else {
      FMLLog.fine("String_Node_Str",userName);
      return;
    }
  }
switch (loginStates.get(netLoginHandler)) {
case LOGIN_RECEIVED:
    String modKick=NetworkRegistry.instance().connectionReceived(netLoginHandler,netLoginHandler.field_72538_b);
  if (modKick != null) {
    netLoginHandler.completeConnection(modKick);
    loginStates.remove(netLoginHandler);
    return;
  }
if (!handleVanillaLoginKick(netLoginHandler,server,address,userName)) {
  loginStates.remove(netLoginHandler);
  return;
}
NetLoginHandler.func_72531_a(netLoginHandler,false);
netLoginHandler.field_72538_b.func_74429_a(getModListRequestPacket());
loginStates.put(netLoginHandler,CONNECTION_VALID);
break;
case CONNECTION_VALID:
netLoginHandler.completeConnection(null);
loginStates.remove(netLoginHandler);
break;
case MISSING_MODS_OR_VERSIONS:
netLoginHandler.completeConnection("String_Node_Str");
loginStates.remove(netLoginHandler);
break;
case FML_OUT_OF_DATE:
netLoginHandler.completeConnection("String_Node_Str");
loginStates.remove(netLoginHandler);
break;
default :
netLoginHandler.completeConnection("String_Node_Str");
loginStates.remove(netLoginHandler);
break;
}
}
Program: 51794
Project: 51794
Buggy source:
/** 
 * Override if you wish to perform some action other than just dispensing the item from the dispenser
 * @param world
 * @param x
 * @param y
 * @param z
 * @param xVel
 * @param zVel
 * @param item
 * @return
 */
@Override public int dispenseEntity(World world,ItemStack item,Random rnd,double x,double y,double z,int xVel,int zVel,double entX,double entY,double entZ){
  return -1;
}

Fixed version (ground truth):
/** 
 * Override if you wish to perform some action other than just dispensing the item from the dispenser
 * @param world
 * @param x
 * @param y
 * @param z
 * @param xVel
 * @param zVel
 * @param item
 * @return
 */
@Override public int dispenseEntity(World world,ItemStack item,Random rnd,int x,int y,int z,int xVel,int zVel,double entX,double entY,double entZ){
  return -1;
}
Program: 51795
Project: 51795
Buggy source:
/** 
 * Return -1 if you don't want to dispense anything. the other values seem to have specific meanings to blockdispenser.
 * @param x
 * @param y
 * @param z
 * @param xVelocity
 * @param zVelocity
 * @param world
 * @param item
 * @param random
 * @param entX
 * @param entY
 * @param entZ
 * @return
 */
int dispense(double x,double y,double z,int xVelocity,int zVelocity,World world,ItemStack item,Random random,double entX,double entY,double entZ);

Fixed version (ground truth):
/** 
 * Return -1 if you don't want to dispense anything. the other values seem to have specific meanings to blockdispenser.
 * @param x
 * @param y
 * @param z
 * @param xVelocity
 * @param zVelocity
 * @param world
 * @param item
 * @param random
 * @param entX
 * @param entY
 * @param entZ
 * @return
 */
@Deprecated int dispense(double x,double y,double z,int xVelocity,int zVelocity,World world,ItemStack item,Random random,double entX,double entY,double entZ);
Program: 51796
Project: 51796
Buggy source:
public abstract int dispenseEntity(World world,ItemStack item,Random rnd,double x,double y,double z,int xVel,int zVel,double entX,double entY,double entZ);

Fixed version (ground truth):
public abstract int dispenseEntity(World world,ItemStack item,Random rnd,int x,int y,int z,int xVel,int zVel,double entX,double entY,double entZ);
Program: 51797
Project: 51797
Buggy source:
@Override public int dispense(double x,double y,double z,int xVelocity,int zVelocity,World world,ItemStack item,Random random,double entX,double entY,double entZ){
  return mod.dispenseEntity(world,item,random,x,y,z,xVelocity,zVelocity,entX,entY,entZ);
}

Fixed version (ground truth):
@Override public int dispense(int x,int y,int z,int xVelocity,int zVelocity,World world,ItemStack item,Random random,double entX,double entY,double entZ){
  int ret=mod.dispenseEntity(world,item,random,x,y,z,xVelocity,zVelocity,entX,entY,entZ);
  return ret == 0 ? -1 : ret;
}
Program: 51798
Project: 51798
Buggy source:
public static IDispenseHandler buildDispenseHelper(BaseModProxy mod){
  return new ModLoaderDispenseHelper(mod);
}

Fixed version (ground truth):
public static IDispenserHandler buildDispenseHelper(BaseModProxy mod){
  return new ModLoaderDispenseHelper(mod);
}
Program: 51799
Project: 51799
Buggy source:
/** 
 * Register a handler for dispensers
 * @param handler
 */
public static void registerDispenserHandler(IDispenseHandler handler){
  dispenserHandlers.add(handler);
}

Fixed version (ground truth):
/** 
 * Register a handler for dispensers
 * @param handler
 */
@Deprecated public static void registerDispenserHandler(final IDispenseHandler handler){
  registerDispenserHandler(new IDispenserHandler(){
    @Override public int dispense(    int x,    int y,    int z,    int xVelocity,    int zVelocity,    World world,    ItemStack item,    Random random,    double entX,    double entY,    double entZ){
      return handler.dispense(x,y,z,xVelocity,zVelocity,world,item,random,entX,entY,entZ);
    }
  }
);
}
Program: 51800
Project: 51800
Buggy source:
/** 
 * Callback hook for dispenser activities - if you add a block and want mods to be able to extend their dispenser related activities to it call this
 * @param world
 * @param x
 * @param y
 * @param z
 * @param xVelocity
 * @param zVelocity
 * @param item
 * @return
 */
public static int tryDispense(World world,double x,double y,double z,int xVelocity,int zVelocity,ItemStack item,Random random,double entX,double entY,double entZ){
  for (  IDispenseHandler handler : dispenserHandlers) {
    int dispensed=handler.dispense(x,y,z,xVelocity,zVelocity,world,item,random,entX,entY,entZ);
    if (dispensed > -1) {
      return dispensed;
    }
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * Callback hook for dispenser activities - if you add a block and want mods to be able to extend their dispenser related activities to it call this
 * @param world
 * @param x
 * @param y
 * @param z
 * @param xVelocity
 * @param zVelocity
 * @param item
 * @return
 */
public static int tryDispense(World world,int x,int y,int z,int xVelocity,int zVelocity,ItemStack item,Random random,double entX,double entY,double entZ){
  for (  IDispenserHandler handler : dispenserHandlers) {
    int dispensed=handler.dispense(x,y,z,xVelocity,zVelocity,world,item,random,entX,entY,entZ);
    if (dispensed > -1) {
      return dispensed;
    }
  }
  return -1;
}
Program: 51801
Project: 51801
Buggy source:
public static MetadataCollection from(InputStream inputStream,String sourceName){
  if (inputStream == null) {
    return new MetadataCollection();
  }
  InputStreamReader reader=new InputStreamReader(inputStream);
  try {
    JsonRootNode root=parser.parse(reader);
    if (root.hasElements()) {
      return parse10ModInfo(root);
    }
 else {
      return parseModInfo(root);
    }
  }
 catch (  InvalidSyntaxException e) {
    FMLLog.log(Level.SEVERE,e,"String_Node_Str",sourceName);
    return null;
  }
catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
public static MetadataCollection from(InputStream inputStream,String sourceName){
  if (inputStream == null) {
    return new MetadataCollection();
  }
  InputStreamReader reader=new InputStreamReader(inputStream);
  try {
    JsonRootNode root=parser.parse(reader);
    if (root.hasElements()) {
      return parse10ModInfo(root);
    }
 else {
      return parseModInfo(root);
    }
  }
 catch (  InvalidSyntaxException e) {
    FMLLog.log(Level.SEVERE,e,"String_Node_Str",sourceName);
    return new MetadataCollection();
  }
catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}
Program: 51802
Project: 51802
Buggy source:
public void bindNetworkId(String key,Integer value){
  Map<String,ModContainer> mods=Loader.instance().getIndexedModList();
  NetworkModHandler handler=findNetworkModHandler(mods.get(key));
  handler.setNetworkId(value);
  networkIdLookup.put(value,handler);
}

Fixed version (ground truth):
public void bindNetworkId(String key,Integer value){
  Map<String,ModContainer> mods=Loader.instance().getIndexedModList();
  NetworkModHandler handler=findNetworkModHandler(mods.get(key));
  if (handler != null) {
    handler.setNetworkId(value);
    networkIdLookup.put(value,handler);
  }
}
Program: 51803
Project: 51803
Buggy source:
public void onInitializationComplete(){
  if (modsMissing != null) {
    ModsMissingGuiScreen err=new ModsMissingGuiScreen();
    err.setList(modsMissing);
    client.func_71373_a(err);
  }
 else {
    TextureFXManager.instance().loadTextures(client.field_71418_C.func_77292_e());
  }
}

Fixed version (ground truth):
public void onInitializationComplete(){
  if (modsMissing != null) {
    client.func_71373_a(new GuiModsMissing(modsMissing));
  }
 else {
    TextureFXManager.instance().loadTextures(client.field_71418_C.func_77292_e());
  }
}
Program: 51805
Project: 51805
Buggy source:
public ImmutableBiMap<ModContainer,Object> buildModObjectList(){
  ImmutableBiMap.Builder<ModContainer,Object> builder=ImmutableBiMap.<ModContainer,Object>builder();
  for (  ModContainer mc : activeModList) {
    if (!mc.isImmutable() && mc.getMod() != null) {
      builder.put(mc,mc.getMod());
    }
    if (mc.getMod() == null) {
      FMLLog.severe("String_Node_Str",mc.getModId());
      if (state != LoaderState.CONSTRUCTING) {
        this.errorOccurred(mc,new RuntimeException());
      }
    }
  }
  return builder.build();
}

Fixed version (ground truth):
public ImmutableBiMap<ModContainer,Object> buildModObjectList(){
  ImmutableBiMap.Builder<ModContainer,Object> builder=ImmutableBiMap.<ModContainer,Object>builder();
  for (  ModContainer mc : activeModList) {
    if (!mc.isImmutable() && mc.getMod() != null) {
      builder.put(mc,mc.getMod());
    }
    if (mc.getMod() == null && !mc.isImmutable()) {
      FMLLog.severe("String_Node_Str",mc.getModId());
      if (state != LoaderState.CONSTRUCTING) {
        this.errorOccurred(mc,new RuntimeException());
      }
    }
  }
  return builder.build();
}
Program: 51806
Project: 51806
Buggy source:
@Subscribe public void propogateStateMessage(FMLStateEvent stateEvent){
  for (  Map.Entry<String,EventBus> entry : eventChannels.entrySet()) {
    activeContainer=entry.getKey();
    stateEvent.applyModContainer(activeContainer());
    FMLLog.finer("String_Node_Str",stateEvent,entry.getKey());
    entry.getValue().post(stateEvent);
    FMLLog.finer("String_Node_Str",stateEvent,entry.getKey());
    activeContainer=null;
    if (!errors.containsKey(entry.getKey())) {
      modStates.put(entry.getKey(),stateEvent.getModState());
    }
 else {
      modStates.put(entry.getKey(),ModState.ERRORED);
    }
  }
  if (stateEvent instanceof FMLConstructionEvent) {
    buildModObjectList();
  }
}

Fixed version (ground truth):
@Subscribe public void propogateStateMessage(FMLStateEvent stateEvent){
  if (stateEvent instanceof FMLPreInitializationEvent) {
    buildModObjectList();
  }
  for (  Map.Entry<String,EventBus> entry : eventChannels.entrySet()) {
    activeContainer=entry.getKey();
    stateEvent.applyModContainer(activeContainer());
    FMLLog.finer("String_Node_Str",stateEvent,entry.getKey());
    entry.getValue().post(stateEvent);
    FMLLog.finer("String_Node_Str",stateEvent,entry.getKey());
    activeContainer=null;
    if (!errors.containsKey(entry.getKey())) {
      modStates.put(entry.getKey(),stateEvent.getModState());
    }
 else {
      modStates.put(entry.getKey(),ModState.ERRORED);
    }
  }
}
Program: 51807
Project: 51807
Buggy source:
public void buildModObjectList(){
  ImmutableBiMap.Builder<ModContainer,Object> builder=ImmutableBiMap.<ModContainer,Object>builder();
  for (  ModContainer mc : activeModList) {
    builder.put(mc,mc.getMod());
  }
  modObjectList=builder.build();
}

Fixed version (ground truth):
public void buildModObjectList(){
  ImmutableBiMap.Builder<ModContainer,Object> builder=ImmutableBiMap.<ModContainer,Object>builder();
  for (  ModContainer mc : activeModList) {
    if (!mc.isImmutable()) {
      builder.put(mc,mc.getMod());
    }
  }
  modObjectList=builder.build();
}
Program: 51808
Project: 51808
Buggy source:
private void readMapFile(String rulesFile) throws IOException {
  URL rulesResource=Resources.getResource(rulesFile);
  Resources.readLines(rulesResource,Charsets.UTF_8,new LineProcessor<Void>(){
    @Override public Void getResult(){
      return null;
    }
    @Override public boolean processLine(    String input) throws IOException {
      String line=Iterables.getFirst(Splitter.on('#').limit(2).split(input),"String_Node_Str").trim();
      if (line.length() == 0) {
        return true;
      }
      List<String> parts=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(line));
      if (parts.size() > 2 || parts.get(1).indexOf('.') == -1) {
        throw new RuntimeException("String_Node_Str" + input);
      }
      Modifier m=new Modifier();
      m.setTargetAccess(parts.get(0));
      List<String> descriptor=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(parts.get(1)));
      List<String> method=Lists.newArrayList(Splitter.on(CharMatcher.anyOf("String_Node_Str")).omitEmptyStrings().trimResults().split(descriptor.get(1)));
      if (method.size() == 2) {
        m.desc=method.get(1);
      }
      m.name=method.get(0);
      modifiers.put(descriptor.get(0),m);
      return true;
    }
  }
);
}

Fixed version (ground truth):
private void readMapFile(String rulesFile) throws IOException {
  File file=new File(rulesFile);
  URL rulesResource;
  if (file.exists()) {
    rulesResource=file.toURI().toURL();
  }
 else {
    rulesResource=Resources.getResource(rulesFile);
  }
  Resources.readLines(rulesResource,Charsets.UTF_8,new LineProcessor<Void>(){
    @Override public Void getResult(){
      return null;
    }
    @Override public boolean processLine(    String input) throws IOException {
      String line=Iterables.getFirst(Splitter.on('#').limit(2).split(input),"String_Node_Str").trim();
      if (line.length() == 0) {
        return true;
      }
      List<String> parts=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(line));
      if (parts.size() > 2 || parts.get(1).indexOf('.') == -1) {
        throw new RuntimeException("String_Node_Str" + input);
      }
      Modifier m=new Modifier();
      m.setTargetAccess(parts.get(0));
      List<String> descriptor=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(parts.get(1)));
      List<String> method=Lists.newArrayList(Splitter.on(CharMatcher.anyOf("String_Node_Str")).omitEmptyStrings().trimResults().split(descriptor.get(1)));
      if (method.size() == 3) {
        m.desc=String.format("String_Node_Str",method.get(1),method.get(2));
      }
      m.name=method.get(0);
      modifiers.put(descriptor.get(0),m);
      return true;
    }
  }
);
}
Program: 51809
Project: 51809
Buggy source:
public static void main(String[] args){
  if (args.length < 2) {
    System.out.println("String_Node_Str");
    return;
  }
  boolean hasTransformer=false;
  AccessTransformer[] trans=new AccessTransformer[args.length - 1];
  for (int x=1; x < args.length; x++) {
    try {
      trans[x - 1]=new AccessTransformer(args[x]);
      hasTransformer=true;
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str" + args[x]);
      e.printStackTrace();
    }
  }
  if (!hasTransformer) {
    System.out.println("String_Node_Str");
    return;
  }
  File orig=new File(args[0]);
  File temp=new File(args[0] + "String_Node_Str");
  if (!orig.exists() && !temp.exists()) {
    System.out.println("String_Node_Str" + orig);
    return;
  }
  if (temp.exists()) {
    if (orig.exists() && !orig.renameTo(new File(args[0] + (new SimpleDateFormat("String_Node_Str")).format(new Date())))) {
      System.out.println("String_Node_Str" + orig);
      return;
    }
    if (!temp.renameTo(orig)) {
      System.out.println("String_Node_Str" + temp);
      return;
    }
  }
  if (!orig.renameTo(temp)) {
    System.out.println("String_Node_Str" + orig + "String_Node_Str"+ temp);
    return;
  }
  try {
    processJar(temp,orig,trans);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  if (args.length < 2) {
    System.out.println("String_Node_Str");
    return;
  }
  boolean hasTransformer=false;
  AccessTransformer[] trans=new AccessTransformer[args.length - 1];
  for (int x=1; x < args.length; x++) {
    try {
      trans[x - 1]=new AccessTransformer(args[x]);
      hasTransformer=true;
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str" + args[x]);
      e.printStackTrace();
    }
  }
  if (!hasTransformer) {
    System.out.println("String_Node_Str");
    return;
  }
  File orig=new File(args[0]);
  File temp=new File(args[0] + "String_Node_Str");
  if (!orig.exists() && !temp.exists()) {
    System.out.println("String_Node_Str" + orig);
    return;
  }
  if (!orig.renameTo(temp)) {
    System.out.println("String_Node_Str" + orig + "String_Node_Str"+ temp);
    return;
  }
  try {
    processJar(temp,orig,trans);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  if (!temp.delete()) {
    System.out.println("String_Node_Str" + temp);
  }
}
Program: 51810
Project: 51810
Buggy source:
@Override public boolean processLine(String input) throws IOException {
  String line=Iterables.getFirst(Splitter.on('#').limit(2).split(input),"String_Node_Str").trim();
  if (line.length() == 0) {
    return true;
  }
  List<String> parts=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(line));
  if (parts.size() > 2 || parts.get(1).indexOf('.') == -1) {
    throw new RuntimeException("String_Node_Str" + input);
  }
  Modifier m=new Modifier();
  m.setTargetAccess(parts.get(0));
  List<String> descriptor=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(parts.get(1)));
  List<String> method=Lists.newArrayList(Splitter.on(CharMatcher.anyOf("String_Node_Str")).omitEmptyStrings().trimResults().split(descriptor.get(1)));
  if (method.size() == 2) {
    m.desc=method.get(1);
  }
  m.name=method.get(0);
  modifiers.put(descriptor.get(0),m);
  return true;
}

Fixed version (ground truth):
@Override public boolean processLine(String input) throws IOException {
  String line=Iterables.getFirst(Splitter.on('#').limit(2).split(input),"String_Node_Str").trim();
  if (line.length() == 0) {
    return true;
  }
  List<String> parts=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(line));
  if (parts.size() > 2 || parts.get(1).indexOf('.') == -1) {
    throw new RuntimeException("String_Node_Str" + input);
  }
  Modifier m=new Modifier();
  m.setTargetAccess(parts.get(0));
  List<String> descriptor=Lists.newArrayList(Splitter.on("String_Node_Str").trimResults().split(parts.get(1)));
  List<String> method=Lists.newArrayList(Splitter.on(CharMatcher.anyOf("String_Node_Str")).omitEmptyStrings().trimResults().split(descriptor.get(1)));
  if (method.size() == 3) {
    m.desc=String.format("String_Node_Str",method.get(1),method.get(2));
  }
  m.name=method.get(0);
  modifiers.put(descriptor.get(0),m);
  return true;
}
Program: 51811
Project: 51811
Buggy source:
@Override public void tickEnd(EnumSet<TickType> types,Object... tickData){
  tickBaseMod(ticks,true,tickData);
}

Fixed version (ground truth):
@Override public void tickEnd(EnumSet<TickType> types,Object... tickData){
  tickBaseMod(types,true,tickData);
}
Program: 51812
Project: 51812
Buggy source:
private void computeDependencies(){
  dependencies=new ArrayList<String>();
  preDependencies=new ArrayList<String>();
  postDependencies=new ArrayList<String>();
  if (mod.getPriorities() == null || mod.getPriorities().length() == 0) {
    return;
  }
  boolean parseFailure=false;
  StringTokenizer st=new StringTokenizer(mod.getPriorities(),"String_Node_Str");
  for (; st.hasMoreTokens(); ) {
    String dep=st.nextToken();
    String[] depparts=dep.split("String_Node_Str");
    if (depparts.length < 2) {
      parseFailure=true;
    }
 else     if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      if (!depparts[1].trim().equals("String_Node_Str")) {
        dependencies.add(depparts[1]);
      }
 else {
        parseFailure=true;
      }
    }
 else     if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      postDependencies.add(depparts[1]);
    }
 else     if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      preDependencies.add(depparts[1]);
    }
 else {
      parseFailure=true;
    }
  }
  if (parseFailure) {
    FMLCommonHandler.instance().getFMLLogger().warning(String.format("String_Node_Str",mod.getName(),mod.getPriorities()));
  }
}

Fixed version (ground truth):
private void computeDependencies(){
  dependencies=new ArrayList<String>();
  preDependencies=new ArrayList<String>();
  postDependencies=new ArrayList<String>();
  if (mod.getPriorities() == null || mod.getPriorities().length() == 0) {
    return;
  }
  boolean parseFailure=false;
  StringTokenizer st=new StringTokenizer(mod.getPriorities(),"String_Node_Str");
  for (; st.hasMoreTokens(); ) {
    String dep=st.nextToken();
    String[] depparts=dep.split("String_Node_Str");
    if (depparts.length < 2) {
      parseFailure=true;
      continue;
    }
 else     if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      if (!depparts[1].trim().equals("String_Node_Str")) {
        dependencies.add(depparts[1]);
      }
 else {
        parseFailure=true;
        continue;
      }
    }
    if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      postDependencies.add(depparts[1]);
    }
 else     if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      preDependencies.add(depparts[1]);
    }
 else {
      parseFailure=true;
    }
  }
  if (parseFailure) {
    FMLCommonHandler.instance().getFMLLogger().warning(String.format("String_Node_Str",mod.getName(),mod.getPriorities()));
  }
}
Program: 51813
Project: 51813
Buggy source:
public String format(LogRecord record){
  StringBuilder msg=new StringBuilder();
  msg.append(this.dateFormat.format(Long.valueOf(record.getMillis())));
  Level lvl=record.getLevel();
  if (lvl == Level.FINEST) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.FINER) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.FINE) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.INFO) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.WARNING) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.SEVERE) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.SEVERE) {
    msg.append("String_Node_Str" + lvl.getLocalizedName() + "String_Node_Str");
  }
  msg.append(record.getMessage());
  msg.append(System.lineSeparator());
  Throwable thr=record.getThrown();
  if (thr != null) {
    StringWriter thrDump=new StringWriter();
    thr.printStackTrace(new PrintWriter(thrDump));
    msg.append(thrDump.toString());
  }
  return msg.toString();
}

Fixed version (ground truth):
public String format(LogRecord record){
  StringBuilder msg=new StringBuilder();
  msg.append(this.dateFormat.format(Long.valueOf(record.getMillis())));
  Level lvl=record.getLevel();
  if (lvl == Level.FINEST) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.FINER) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.FINE) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.INFO) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.WARNING) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.SEVERE) {
    msg.append("String_Node_Str");
  }
 else   if (lvl == Level.SEVERE) {
    msg.append("String_Node_Str" + lvl.getLocalizedName() + "String_Node_Str");
  }
  msg.append(record.getMessage());
  msg.append(System.getProperty("String_Node_Str"));
  Throwable thr=record.getThrown();
  if (thr != null) {
    StringWriter thrDump=new StringWriter();
    thr.printStackTrace(new PrintWriter(thrDump));
    msg.append(thrDump.toString());
  }
  return msg.toString();
}
Program: 51814
Project: 51814
Buggy source:
/** 
 * Remove a biome from the list of generated biomes
 * @param biome
 */
public static void removeBiome(BiomeGenBase biome){
  FMLRegistry.removeBiome(biome);
}

Fixed version (ground truth):
/** 
 * Remove a biome from the list of generated biomes
 * @param biome
 */
public static void removeBiome(BiomeGenBase biome){
  FMLServerHandler.instance().removeBiomeFromDefaultWorldGenerator(biome);
}
Program: 51815
Project: 51815
Buggy source:
private boolean attemptDirLoad(File modDir,String path,SourceType sourceType){
  if (path.length() == 0) {
    extendClassLoader(modDir);
  }
  boolean foundAModClass=false;
  File[] content=modDir.listFiles(new FileFilter(){
    @Override public boolean accept(    File file){
      return (file.isFile() && modClass.matcher(file.getName()).find()) || file.isDirectory();
    }
  }
);
  Arrays.sort(content);
  for (  File file : content) {
    if (file.isDirectory()) {
      log.finest(String.format("String_Node_Str",path + file.getName()));
      foundAModClass|=attemptDirLoad(file,path + file.getName() + "String_Node_Str",sourceType);
      continue;
    }
    Matcher fname=modClass.matcher(file.getName());
    if (!fname.find()) {
      continue;
    }
    String clazzName=path + fname.group(2);
    log.fine(String.format("String_Node_Str",clazzName,modDir.getName()));
    loadModClass(modDir,file.getName(),clazzName,sourceType);
    log.fine(String.format("String_Node_Str",file.getName()));
    foundAModClass=true;
  }
  return foundAModClass;
}

Fixed version (ground truth):
private boolean attemptDirLoad(File modDir,String path,SourceType sourceType){
  if (path.length() == 0) {
    extendClassLoader(modDir);
  }
  boolean foundAModClass=false;
  File[] content=modDir.listFiles(new FileFilter(){
    @Override public boolean accept(    File file){
      return (file.isFile() && modClass.matcher(file.getName()).find()) || file.isDirectory();
    }
  }
);
  Arrays.sort(content);
  for (  File file : content) {
    if (file.isDirectory()) {
      log.finest(String.format("String_Node_Str",path + file.getName()));
      foundAModClass|=attemptDirLoad(file,path + file.getName() + "String_Node_Str",sourceType);
      continue;
    }
    Matcher fname=modClass.matcher(file.getName());
    if (!fname.find()) {
      continue;
    }
    String clazzName=path + fname.group(2);
    try {
      log.fine(String.format("String_Node_Str",clazzName,modDir.getName()));
      loadModClass(modDir,file.getName(),clazzName,sourceType);
      log.fine(String.format("String_Node_Str",file.getName()));
      foundAModClass=true;
    }
 catch (    Exception e) {
      log.severe(String.format("String_Node_Str",file.getName()));
      log.throwing("String_Node_Str","String_Node_Str",e);
      state=State.ERRORED;
      capturedError=e;
    }
  }
  return foundAModClass;
}
Program: 51816
Project: 51816
Buggy source:
private void loadModClass(File classSource,String classFileName,String clazzName,SourceType sourceType){
  try {
    Class<?> clazz=Class.forName(clazzName,false,modClassLoader);
    ModContainer mod=null;
    if (clazz.isAnnotationPresent(Mod.class)) {
      log.severe("String_Node_Str");
      throw new LoaderException();
    }
 else     if (FMLCommonHandler.instance().isModLoaderMod(clazz)) {
      log.fine(String.format("String_Node_Str",clazzName));
      mod=FMLCommonHandler.instance().loadBaseModMod(clazz,classSource.getCanonicalFile());
      log.fine(String.format("String_Node_Str",clazzName));
    }
 else {
    }
    if (mod != null) {
      mod.setSourceType(sourceType);
      FMLCommonHandler.instance().loadMetadataFor(mod);
      mods.add(mod);
      mod.nextState();
    }
  }
 catch (  Throwable e) {
    log.warning(String.format("String_Node_Str",classFileName,classSource.getAbsoluteFile()));
    log.throwing("String_Node_Str","String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void loadModClass(File classSource,String classFileName,String clazzName,SourceType sourceType){
  try {
    Class<?> clazz=Class.forName(clazzName,false,modClassLoader);
    ModContainer mod=null;
    if (clazz.isAnnotationPresent(Mod.class)) {
      log.severe("String_Node_Str");
      throw new LoaderException();
    }
 else     if (FMLCommonHandler.instance().isModLoaderMod(clazz)) {
      log.fine(String.format("String_Node_Str",clazzName));
      mod=FMLCommonHandler.instance().loadBaseModMod(clazz,classSource.getCanonicalFile());
      log.fine(String.format("String_Node_Str",clazzName));
    }
 else {
    }
    if (mod != null) {
      mod.setSourceType(sourceType);
      FMLCommonHandler.instance().loadMetadataFor(mod);
      mods.add(mod);
      mod.nextState();
    }
  }
 catch (  Throwable e) {
    log.warning(String.format("String_Node_Str",classFileName,classSource.getAbsoluteFile()));
    log.throwing("String_Node_Str","String_Node_Str",e);
    throw new LoaderException(e);
  }
}
Program: 51817
Project: 51817
Buggy source:
/** 
 * @param keyHandler
 * @param allowRepeat
 */
public void addKeyHandler(IKeyHandler handler){
  if (keyHandlers == null) {
    keyHandlers=new ArrayList<IKeyHandler>();
  }
  keyHandlers.add(handler);
}

Fixed version (ground truth):
/** 
 * @param keyHandler
 * @param allowRepeat
 */
public void addKeyHandler(IKeyHandler handler){
  if (keyHandlers == null) {
    keyHandlers=new ArrayList<IKeyHandler>();
  }
  Iterator<IKeyHandler> itr=keyHandlers.iterator();
  while (itr.hasNext()) {
    IKeyHandler old=itr.next();
    if (old.getKeyBinding() == handler.getKeyBinding()) {
      itr.remove();
    }
  }
  keyHandlers.add(handler);
}
Program: 51818
Project: 51818
Buggy source:
@Override public String getVersion(){
  return mod != null ? mod.getVersion() : "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getVersion(){
  if (mod == null || mod.getVersion() == null) {
    return "String_Node_Str";
  }
  return mod.getVersion();
}
Program: 51819
Project: 51819
Buggy source:
/** 
 * Every tick just after world and other ticks occur
 */
public void onPostWorldTick(){
}

Fixed version (ground truth):
/** 
 * Every tick just after world and other ticks occur
 */
public void onPostWorldTick(){
  if (client.field_6324_e != null) {
    FMLCommonHandler.instance().worldTickEnd();
    if (client.field_6313_p != null) {
      FMLCommonHandler.instance().tickEnd(TickType.WORLDGUI,0.0f,client.field_6313_p);
    }
  }
}
Program: 51820
Project: 51820
Buggy source:
@Override public List<String> getPostDepends(){
  if (dependencies == null) {
    computeDependencies();
  }
  return preDependencies;
}

Fixed version (ground truth):
@Override public List<String> getPostDepends(){
  if (dependencies == null) {
    computeDependencies();
  }
  return postDependencies;
}
Program: 51821
Project: 51821
Buggy source:
private void computeDependencies(){
  dependencies=new ArrayList<String>();
  preDependencies=new ArrayList<String>();
  postDependencies=new ArrayList<String>();
  if (mod.getPriorities() == null || mod.getPriorities().length() == 0) {
    return;
  }
  StringTokenizer st=new StringTokenizer(mod.getPriorities(),"String_Node_Str");
  for (; st.hasMoreTokens(); ) {
    String dep=st.nextToken();
    String[] depparts=dep.split("String_Node_Str");
    if (depparts.length < 2) {
      throw new LoaderException();
    }
    if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      dependencies.add(depparts[1]);
    }
    if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      preDependencies.add(depparts[1]);
    }
    if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      postDependencies.add(depparts[1]);
    }
  }
}

Fixed version (ground truth):
private void computeDependencies(){
  dependencies=new ArrayList<String>();
  preDependencies=new ArrayList<String>();
  postDependencies=new ArrayList<String>();
  if (mod.getPriorities() == null || mod.getPriorities().length() == 0) {
    return;
  }
  StringTokenizer st=new StringTokenizer(mod.getPriorities(),"String_Node_Str");
  for (; st.hasMoreTokens(); ) {
    String dep=st.nextToken();
    String[] depparts=dep.split("String_Node_Str");
    if (depparts.length < 2) {
      throw new LoaderException();
    }
    if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      dependencies.add(depparts[1]);
    }
    if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      postDependencies.add(depparts[1]);
    }
    if ("String_Node_Str".equals(depparts[0]) || "String_Node_Str".equals(depparts[0])) {
      preDependencies.add(depparts[1]);
    }
  }
}
Program: 51822
Project: 51822
Buggy source:
@Override public List<String> getPreDepends(){
  if (dependencies == null) {
    computeDependencies();
  }
  return postDependencies;
}

Fixed version (ground truth):
@Override public List<String> getPreDepends(){
  if (dependencies == null) {
    computeDependencies();
  }
  return preDependencies;
}
Program: 51823
Project: 51823
Buggy source:
private DiscoverQuery buildCommonDiscoverQuery(Context context,DiscoveryConfiguration discoveryConfiguration,String query,List<SearchFilter> searchFilters,String dsoType) throws InvalidSearchFilterException, InvalidDSpaceObjectTypeException {
  DiscoverQuery queryArgs=buildBaseQueryForConfiguration(discoveryConfiguration);
  queryArgs.addFilterQueries(convertFilters(context,discoveryConfiguration,searchFilters));
  if (StringUtils.isNotBlank(query)) {
    queryArgs.setQuery(searchService.escapeQueryChars(query));
  }
  if (StringUtils.isNotBlank(dsoType)) {
    queryArgs.setDSpaceObjectFilter(getDsoTypeId(dsoType));
  }
  return queryArgs;
}

Fixed version (ground truth):
private DiscoverQuery buildCommonDiscoverQuery(Context context,DiscoveryConfiguration discoveryConfiguration,String query,List<SearchFilter> searchFilters,String dsoType) throws InvalidSearchFilterException, InvalidDSpaceObjectTypeException {
  DiscoverQuery queryArgs=buildBaseQueryForConfiguration(discoveryConfiguration);
  queryArgs.addFilterQueries(convertFilters(context,discoveryConfiguration,searchFilters));
  if (StringUtils.isNotBlank(query)) {
    queryArgs.setQuery("String_Node_Str" + searchService.escapeQueryChars(query) + "String_Node_Str");
  }
  if (StringUtils.isNotBlank(dsoType)) {
    queryArgs.setDSpaceObjectFilter(getDsoTypeId(dsoType));
  }
  return queryArgs;
}
Program: 51824
Project: 51824
Buggy source:
@Test public void testBuildFacetQuery() throws Exception {
  DiscoverQuery discoverQuery=queryBuilder.buildFacetQuery(context,scope,discoveryConfiguration,query,Arrays.asList(searchFilter),"String_Node_Str",page,"String_Node_Str");
  assertThat(discoverQuery.getFilterQueries(),containsInAnyOrder("String_Node_Str","String_Node_Str"));
  assertThat(discoverQuery.getQuery(),is(query));
  assertThat(discoverQuery.getDSpaceObjectFilter(),is(Constants.ITEM));
  assertThat(discoverQuery.getSortField(),isEmptyOrNullString());
  assertThat(discoverQuery.getMaxResults(),is(0));
  assertThat(discoverQuery.getStart(),is(0));
  assertThat(discoverQuery.getFacetMinCount(),is(1));
  assertThat(discoverQuery.getFacetOffset(),is(10));
  assertThat(discoverQuery.getFacetFields(),hasSize(1));
  assertThat(discoverQuery.getFacetFields(),contains(new ReflectionEquals(new DiscoverFacetField("String_Node_Str",DiscoveryConfigurationParameters.TYPE_TEXT,11,DiscoveryConfigurationParameters.SORT.COUNT))));
}

Fixed version (ground truth):
@Test public void testBuildFacetQuery() throws Exception {
  DiscoverQuery discoverQuery=queryBuilder.buildFacetQuery(context,scope,discoveryConfiguration,query,Arrays.asList(searchFilter),"String_Node_Str",page,"String_Node_Str");
  assertThat(discoverQuery.getFilterQueries(),containsInAnyOrder("String_Node_Str","String_Node_Str"));
  assertThat(discoverQuery.getQuery(),is("String_Node_Str" + query + "String_Node_Str"));
  assertThat(discoverQuery.getDSpaceObjectFilter(),is(Constants.ITEM));
  assertThat(discoverQuery.getSortField(),isEmptyOrNullString());
  assertThat(discoverQuery.getMaxResults(),is(0));
  assertThat(discoverQuery.getStart(),is(0));
  assertThat(discoverQuery.getFacetMinCount(),is(1));
  assertThat(discoverQuery.getFacetOffset(),is(10));
  assertThat(discoverQuery.getFacetFields(),hasSize(1));
  assertThat(discoverQuery.getFacetFields(),contains(new ReflectionEquals(new DiscoverFacetField("String_Node_Str",DiscoveryConfigurationParameters.TYPE_TEXT,11,DiscoveryConfigurationParameters.SORT.COUNT))));
}
Program: 51825
Project: 51825
Buggy source:
@Test public void testBuildQuery() throws Exception {
  DiscoverQuery discoverQuery=queryBuilder.buildQuery(context,scope,discoveryConfiguration,query,Arrays.asList(searchFilter),"String_Node_Str",page);
  assertThat(discoverQuery.getFilterQueries(),containsInAnyOrder("String_Node_Str","String_Node_Str"));
  assertThat(discoverQuery.getQuery(),is(query));
  assertThat(discoverQuery.getDSpaceObjectFilter(),is(Constants.ITEM));
  assertThat(discoverQuery.getSortField(),is("String_Node_Str"));
  assertThat(discoverQuery.getSortOrder(),is(DiscoverQuery.SORT_ORDER.asc));
  assertThat(discoverQuery.getMaxResults(),is(10));
  assertThat(discoverQuery.getStart(),is(10));
  assertThat(discoverQuery.getFacetMinCount(),is(1));
  assertThat(discoverQuery.getFacetOffset(),is(0));
  assertThat(discoverQuery.getFacetFields(),hasSize(2));
  assertThat(discoverQuery.getFacetFields(),containsInAnyOrder(new ReflectionEquals(new DiscoverFacetField("String_Node_Str",DiscoveryConfigurationParameters.TYPE_TEXT,6,DiscoveryConfigurationParameters.SORT.COUNT)),new ReflectionEquals(new DiscoverFacetField("String_Node_Str",DiscoveryConfigurationParameters.TYPE_HIERARCHICAL,8,DiscoveryConfigurationParameters.SORT.VALUE))));
  assertThat(discoverQuery.getHitHighlightingFields(),hasSize(2));
  assertThat(discoverQuery.getHitHighlightingFields(),containsInAnyOrder(new ReflectionEquals(new DiscoverHitHighlightingField("String_Node_Str",0,3)),new ReflectionEquals(new DiscoverHitHighlightingField("String_Node_Str",0,3))));
}

Fixed version (ground truth):
@Test public void testBuildQuery() throws Exception {
  DiscoverQuery discoverQuery=queryBuilder.buildQuery(context,scope,discoveryConfiguration,query,Arrays.asList(searchFilter),"String_Node_Str",page);
  assertThat(discoverQuery.getFilterQueries(),containsInAnyOrder("String_Node_Str","String_Node_Str"));
  assertThat(discoverQuery.getQuery(),is("String_Node_Str" + query + "String_Node_Str"));
  assertThat(discoverQuery.getDSpaceObjectFilter(),is(Constants.ITEM));
  assertThat(discoverQuery.getSortField(),is("String_Node_Str"));
  assertThat(discoverQuery.getSortOrder(),is(DiscoverQuery.SORT_ORDER.asc));
  assertThat(discoverQuery.getMaxResults(),is(10));
  assertThat(discoverQuery.getStart(),is(10));
  assertThat(discoverQuery.getFacetMinCount(),is(1));
  assertThat(discoverQuery.getFacetOffset(),is(0));
  assertThat(discoverQuery.getFacetFields(),hasSize(2));
  assertThat(discoverQuery.getFacetFields(),containsInAnyOrder(new ReflectionEquals(new DiscoverFacetField("String_Node_Str",DiscoveryConfigurationParameters.TYPE_TEXT,6,DiscoveryConfigurationParameters.SORT.COUNT)),new ReflectionEquals(new DiscoverFacetField("String_Node_Str",DiscoveryConfigurationParameters.TYPE_HIERARCHICAL,8,DiscoveryConfigurationParameters.SORT.VALUE))));
  assertThat(discoverQuery.getHitHighlightingFields(),hasSize(2));
  assertThat(discoverQuery.getHitHighlightingFields(),containsInAnyOrder(new ReflectionEquals(new DiscoverHitHighlightingField("String_Node_Str",0,3)),new ReflectionEquals(new DiscoverHitHighlightingField("String_Node_Str",0,3))));
}
Program: 51826
Project: 51826
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") @SuppressWarnings("String_Node_Str") public void getDSObyIdentifier(@PathVariable String prefix,@PathVariable String suffix,HttpServletResponse response,HttpServletRequest request) throws IOException, SQLException {
  DSpaceObject dso=null;
  Context context=ContextUtil.obtainContext(request);
  IdentifierService identifierService=IdentifierServiceFactory.getInstance().getIdentifierService();
  try {
    dso=identifierService.resolve(context,prefix + "String_Node_Str" + suffix);
    if (dso != null) {
      DSpaceObjectRest dsor=convertDSpaceObject(dso);
      URI link=linkTo(dsor.getController(),dsor.getCategory(),English.plural(dsor.getType())).slash(dsor.getId()).toUri();
      response.setStatus(HttpServletResponse.SC_FOUND);
      response.sendRedirect(link.toString());
    }
 else {
      response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    }
  }
 catch (  IdentifierNotFoundException e) {
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
  }
catch (  IdentifierNotResolvableException e) {
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
  }
 finally {
    log.info("String_Node_Str" + "String_Node_Str");
    context.abort();
  }
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str",params="String_Node_Str") @SuppressWarnings("String_Node_Str") public void getDSObyIdentifier(HttpServletRequest request,HttpServletResponse response,@RequestParam("String_Node_Str") String id) throws IOException, SQLException {
  DSpaceObject dso=null;
  Context context=ContextUtil.obtainContext(request);
  IdentifierService identifierService=IdentifierServiceFactory.getInstance().getIdentifierService();
  try {
    dso=identifierService.resolve(context,id);
    if (dso != null) {
      DSpaceObjectRest dsor=convertDSpaceObject(dso);
      URI link=linkTo(dsor.getController(),dsor.getCategory(),English.plural(dsor.getType())).slash(dsor.getId()).toUri();
      response.setStatus(HttpServletResponse.SC_FOUND);
      response.sendRedirect(link.toString());
    }
 else {
      response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    }
  }
 catch (  IdentifierNotFoundException e) {
    response.setStatus(HttpServletResponse.SC_NOT_FOUND);
  }
catch (  IdentifierNotResolvableException e) {
    response.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
  }
 finally {
    context.abort();
  }
}