nus-yam/ex-repair huggingface dataset:
Program: 82719
Project: 82719
Buggy source:
/** 
 * Blacklists the current node, so that a new resolve process won't ever consider this node as available in the repository. <p> This is useful in combination with   {@link RestartResolveProcess} for conflict managerimplementation which use a best effort strategy to find compatible dependency set, like {@link LatestCompatibleConflictManager}</p>
 * @param rootModuleConf the root module configuration in which the node should be blacklisted
 */
public void blacklist(IvyNodeBlacklist bdata){
  if (data.getSettings().logResolvedRevision()) {
    Message.info("String_Node_Str" + bdata);
  }
 else {
    Message.verbose("String_Node_Str" + bdata);
  }
  clearEvictionDataInAllCallers(bdata.getRootModuleConf(),this);
  blacklisted.put(bdata.getRootModuleConf(),bdata);
  data.blacklist(this);
}

Fixed version (ground truth):
/** 
 * Blacklists the current node, so that a new resolve process won't ever consider this node as available in the repository. <p> This is useful in combination with   {@link RestartResolveProcess} for conflict managerimplementation which use a best effort strategy to find compatible dependency set, like {@link LatestCompatibleConflictManager}</p>
 * @param rootModuleConf the root module configuration in which the node should be blacklisted
 */
public void blacklist(IvyNodeBlacklist bdata){
  if (data.getSettings().logResolvedRevision()) {
    Message.info("String_Node_Str" + bdata);
  }
 else {
    Message.verbose("String_Node_Str" + bdata);
  }
  Stack callerStack=new Stack();
  callerStack.push(this);
  clearEvictionDataInAllCallers(bdata.getRootModuleConf(),callerStack);
  blacklisted.put(bdata.getRootModuleConf(),bdata);
  data.blacklist(this);
}
Program: 82720
Project: 82720
Buggy source:
private void clearEvictionDataInAllCallers(String rootModuleConf,IvyNode node){
  Caller[] callers=node.getCallers(rootModuleConf);
  for (int i=0; i < callers.length; i++) {
    IvyNode callerNode=findNode(callers[i].getModuleRevisionId());
    if (callerNode != null) {
      callerNode.eviction=new IvyNodeEviction(callerNode);
      clearEvictionDataInAllCallers(rootModuleConf,callerNode);
    }
  }
}

Fixed version (ground truth):
private void clearEvictionDataInAllCallers(String rootModuleConf,Stack callerStack){
  IvyNode node=(IvyNode)callerStack.peek();
  Caller[] callers=node.getCallers(rootModuleConf);
  for (int i=0; i < callers.length; i++) {
    IvyNode callerNode=findNode(callers[i].getModuleRevisionId());
    if (callerNode != null) {
      callerNode.eviction=new IvyNodeEviction(callerNode);
      if (!callerStack.contains(callerNode)) {
        callerStack.push(callerNode);
        clearEvictionDataInAllCallers(rootModuleConf,callerStack);
        callerStack.pop();
      }
    }
  }
}
Program: 82721
Project: 82721
Buggy source:
private void blackListIncompatibleCallerAndRestartResolveIfPossible(IvySettings settings,IvyNode parent,IvyNode selected,IvyNode evicted){
  final Collection toBlacklist=blackListIncompatibleCaller(settings.getVersionMatcher(),parent,selected,evicted,evicted);
  if (toBlacklist != null) {
    final StringBuffer blacklisted=new StringBuffer();
    for (Iterator iterator=toBlacklist.iterator(); iterator.hasNext(); ) {
      IvyNodeBlacklist blacklist=(IvyNodeBlacklist)iterator.next();
      blacklist.getBlacklistedNode().blacklist(blacklist);
      blacklisted.append(blacklist.getBlacklistedNode());
      if (iterator.hasNext()) {
        blacklisted.append("String_Node_Str");
      }
    }
    String rootModuleConf=parent.getData().getReport().getConfiguration();
    evicted.markEvicted(new EvictionData(rootModuleConf,parent,this,Collections.singleton(selected),"String_Node_Str" + blacklisted));
    if (settings.debugConflictResolution()) {
      Message.debug("String_Node_Str" + evicted + "String_Node_Str"+ evicted.getEvictedData(rootModuleConf));
    }
    throw new RestartResolveProcess("String_Node_Str" + selected + "String_Node_Str"+ evicted);
  }
}

Fixed version (ground truth):
private void blackListIncompatibleCallerAndRestartResolveIfPossible(IvySettings settings,IvyNode parent,IvyNode selected,IvyNode evicted){
  Stack callerStack=new Stack();
  callerStack.push(evicted);
  final Collection toBlacklist=blackListIncompatibleCaller(settings.getVersionMatcher(),parent,selected,evicted,callerStack);
  if (toBlacklist != null) {
    final StringBuffer blacklisted=new StringBuffer();
    for (Iterator iterator=toBlacklist.iterator(); iterator.hasNext(); ) {
      IvyNodeBlacklist blacklist=(IvyNodeBlacklist)iterator.next();
      blacklist.getBlacklistedNode().blacklist(blacklist);
      blacklisted.append(blacklist.getBlacklistedNode());
      if (iterator.hasNext()) {
        blacklisted.append("String_Node_Str");
      }
    }
    String rootModuleConf=parent.getData().getReport().getConfiguration();
    evicted.markEvicted(new EvictionData(rootModuleConf,parent,this,Collections.singleton(selected),"String_Node_Str" + blacklisted));
    if (settings.debugConflictResolution()) {
      Message.debug("String_Node_Str" + evicted + "String_Node_Str"+ evicted.getEvictedData(rootModuleConf));
    }
    throw new RestartResolveProcess("String_Node_Str" + selected + "String_Node_Str"+ evicted);
  }
}
Program: 82723
Project: 82723
Buggy source:
protected String getDestination(String pattern,Artifact artifact,ModuleRevisionId mrid){
  if (supportTransaction() && !overwriteTransaction) {
    return IvyPatternHelper.substitute(pattern,ModuleRevisionId.newInstance(mrid,mrid.getRevision() + TRANSACTION_DESTINATION_SUFFIX),artifact);
  }
 else {
    return super.getDestination(pattern,artifact,mrid);
  }
}

Fixed version (ground truth):
protected String getDestination(String pattern,Artifact artifact,ModuleRevisionId mrid){
  if (supportTransaction() && !overwriteTransaction) {
    String destPattern=(String)fullTransactionPatterns.get(pattern);
    if (destPattern == null) {
      throw new IllegalArgumentException("String_Node_Str" + pattern + "String_Node_Str"+ fullTransactionPatterns.keySet());
    }
    return IvyPatternHelper.substitute(destPattern,mrid,artifact);
  }
 else {
    return super.getDestination(pattern,artifact,mrid);
  }
}
Program: 82724
Project: 82724
Buggy source:
private void checkSupportTransaction(){
  if (supportTransaction == null) {
    List ivyPatterns=getIvyPatterns();
    List artifactPatterns=getArtifactPatterns();
    if (ivyPatterns.size() > 0) {
      String pattern=(String)ivyPatterns.get(0);
      Matcher m=TRANSACTION_PATTERN.matcher(pattern);
      if (!m.matches()) {
        unsupportedTransaction("String_Node_Str");
        return;
      }
 else {
        baseTransactionPattern=m.group(1);
      }
    }
    if (artifactPatterns.size() > 0) {
      String pattern=(String)artifactPatterns.get(0);
      Matcher m=TRANSACTION_PATTERN.matcher(pattern);
      if (!m.matches()) {
        unsupportedTransaction("String_Node_Str");
        return;
      }
 else       if (baseTransactionPattern != null) {
        if (!baseTransactionPattern.equals(m.group(1))) {
          unsupportedTransaction("String_Node_Str" + "String_Node_Str");
          return;
        }
      }
 else {
        baseTransactionPattern=m.group(1);
      }
    }
    supportTransaction=Boolean.TRUE;
  }
}

Fixed version (ground truth):
private void checkSupportTransaction(){
  if (supportTransaction == null) {
    List ivyPatterns=getIvyPatterns();
    List artifactPatterns=getArtifactPatterns();
    if (ivyPatterns.size() > 0) {
      String pattern=(String)ivyPatterns.get(0);
      Matcher m=TRANSACTION_PATTERN.matcher(pattern);
      if (!m.matches()) {
        unsupportedTransaction("String_Node_Str");
        return;
      }
 else {
        baseTransactionPattern=m.group(1);
        fullTransactionPatterns.put(pattern,m.group(1) + TRANSACTION_DESTINATION_SUFFIX + m.group(2));
      }
    }
    if (artifactPatterns.size() > 0) {
      String pattern=(String)artifactPatterns.get(0);
      Matcher m=TRANSACTION_PATTERN.matcher(pattern);
      if (!m.matches()) {
        unsupportedTransaction("String_Node_Str");
        return;
      }
 else       if (baseTransactionPattern != null) {
        if (!baseTransactionPattern.equals(m.group(1))) {
          unsupportedTransaction("String_Node_Str" + "String_Node_Str");
          return;
        }
 else {
          fullTransactionPatterns.put(pattern,m.group(1) + TRANSACTION_DESTINATION_SUFFIX + m.group(2));
        }
      }
 else {
        baseTransactionPattern=m.group(1);
        fullTransactionPatterns.put(pattern,m.group(1) + TRANSACTION_DESTINATION_SUFFIX + m.group(2));
      }
    }
    supportTransaction=Boolean.TRUE;
  }
}
Program: 82725
Project: 82725
Buggy source:
public void testPublish() throws Exception {
  try {
    FileSystemResolver resolver=new FileSystemResolver();
    resolver.setName("String_Node_Str");
    resolver.setSettings(settings);
    assertEquals("String_Node_Str",resolver.getName());
    resolver.addIvyPattern("String_Node_Str" + FS + "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str");
    resolver.addArtifactPattern("String_Node_Str" + "String_Node_Str");
    ModuleRevisionId mrid=ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str");
    Artifact ivyArtifact=new DefaultArtifact(mrid,new Date(),"String_Node_Str","String_Node_Str","String_Node_Str");
    Artifact artifact=new DefaultArtifact(mrid,new Date(),"String_Node_Str","String_Node_Str","String_Node_Str");
    File src=new File("String_Node_Str");
    boolean successfullyPublished=false;
    resolver.beginPublishTransaction(mrid,false);
    try {
      resolver.publish(ivyArtifact,src,false);
      resolver.publish(artifact,src,false);
      resolver.commitPublishTransaction();
      successfullyPublished=true;
    }
  finally {
      if (!successfullyPublished)       resolver.abortPublishTransaction();
    }
    assertTrue(new File("String_Node_Str").exists());
    assertTrue(new File("String_Node_Str").exists());
  }
  finally {
    FileUtil.forceDelete(new File("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void testPublish() throws Exception {
  try {
    FileSystemResolver resolver=new FileSystemResolver();
    resolver.setName("String_Node_Str");
    resolver.setSettings(settings);
    assertEquals("String_Node_Str",resolver.getName());
    resolver.addIvyPattern("String_Node_Str" + FS + "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str"+ FS+ "String_Node_Str");
    resolver.addArtifactPattern("String_Node_Str" + "String_Node_Str");
    ModuleRevisionId mrid=ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str");
    Artifact ivyArtifact=new DefaultArtifact(mrid,new Date(),"String_Node_Str","String_Node_Str","String_Node_Str");
    Artifact artifact=new DefaultArtifact(mrid,new Date(),"String_Node_Str","String_Node_Str","String_Node_Str");
    File src=new File("String_Node_Str");
    resolver.beginPublishTransaction(mrid,false);
    resolver.publish(ivyArtifact,src,false);
    resolver.publish(artifact,src,false);
    resolver.commitPublishTransaction();
    assertTrue(new File("String_Node_Str").exists());
    assertTrue(new File("String_Node_Str").exists());
  }
  finally {
    FileUtil.forceDelete(new File("String_Node_Str"));
  }
}
Program: 82726
Project: 82726
Buggy source:
public void addDest(MRIDRule dest){
  if (dest != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.dest=dest;
}

Fixed version (ground truth):
public void addDest(MRIDRule dest){
  if (this.dest != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.dest=dest;
}
Program: 82727
Project: 82727
Buggy source:
public void addTosystem(MRIDTransformationRule toSystem){
  if (toSystem != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.toSystem=toSystem;
}

Fixed version (ground truth):
public void addTosystem(MRIDTransformationRule toSystem){
  if (this.toSystem != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.toSystem=toSystem;
}
Program: 82728
Project: 82728
Buggy source:
public void addFromsystem(MRIDTransformationRule fromSystem){
  if (fromSystem != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.fromSystem=fromSystem;
}

Fixed version (ground truth):
public void addFromsystem(MRIDTransformationRule fromSystem){
  if (this.fromSystem != null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.fromSystem=fromSystem;
}
Program: 82729
Project: 82729
Buggy source:
public void setXslfile(String xslFile){
  this.xslFile=xslFile;
}

Fixed version (ground truth):
public void setXslfile(File xslFile){
  this.xslFile=xslFile;
}
Program: 82730
Project: 82730
Buggy source:
private String getStylePath(File cache,String styleResourceName) throws IOException {
  File style=new File(cache,styleResourceName);
  FileUtil.copy(XmlReportOutputter.class.getResourceAsStream(styleResourceName),style,null);
  return style.getAbsolutePath();
}

Fixed version (ground truth):
private File getStylePath(File cache,String styleResourceName) throws IOException {
  File style=new File(cache,styleResourceName);
  FileUtil.copy(XmlReportOutputter.class.getResourceAsStream(styleResourceName),style,null);
  return style;
}
Program: 82732
Project: 82732
Buggy source:
public String getXslfile(){
  return xslFile;
}

Fixed version (ground truth):
public File getXslfile(){
  return xslFile;
}
Program: 82733
Project: 82733
Buggy source:
private String getReportStylePath(File cache) throws IOException {
  if (xslFile != null) {
    return xslFile;
  }
  File style=new File(cache,"String_Node_Str");
  FileUtil.copy(XmlReportOutputter.class.getResourceAsStream("String_Node_Str"),style,null);
  return style.getAbsolutePath();
}

Fixed version (ground truth):
private File getReportStylePath(File cache) throws IOException {
  if (xslFile != null) {
    return xslFile;
  }
  File style=new File(cache,"String_Node_Str");
  FileUtil.copy(XmlReportOutputter.class.getResourceAsStream("String_Node_Str"),style,null);
  return style;
}
Program: 82734
Project: 82734
Buggy source:
public void toIvyFile(InputStream is,Resource res,File destFile,ModuleDescriptor md) throws IOException, ParseException {
  try {
    Namespace ns=null;
    if (md instanceof DefaultModuleDescriptor) {
      DefaultModuleDescriptor dmd=(DefaultModuleDescriptor)md;
      ns=dmd.getNamespace();
    }
    XmlModuleDescriptorUpdater.update(null,is,destFile,Collections.EMPTY_MAP,md.getStatus(),md.getResolvedModuleRevisionId().getRevision(),md.getResolvedPublicationDate(),ns,false,null);
  }
 catch (  SAXException e) {
    ParseException ex=new ParseException("String_Node_Str" + res,0);
    ex.initCause(e);
    throw ex;
  }
 finally {
    if (is != null) {
      is.close();
    }
  }
}

Fixed version (ground truth):
public void toIvyFile(InputStream is,Resource res,File destFile,ModuleDescriptor md) throws IOException, ParseException {
  try {
    Namespace ns=null;
    if (md instanceof DefaultModuleDescriptor) {
      DefaultModuleDescriptor dmd=(DefaultModuleDescriptor)md;
      ns=dmd.getNamespace();
    }
    XmlModuleDescriptorUpdater.update(IvyContext.getContext().getSettings(),is,res,destFile,Collections.EMPTY_MAP,md.getStatus(),md.getResolvedModuleRevisionId().getRevision(),md.getResolvedPublicationDate(),ns,true,null);
  }
 catch (  SAXException e) {
    ParseException ex=new ParseException("String_Node_Str" + res,0);
    ex.initCause(e);
    throw ex;
  }
 finally {
    if (is != null) {
      is.close();
    }
  }
}
Program: 82735
Project: 82735
Buggy source:
public void setPrefix(String prefix){
  this.prefix=prefix;
  if (!prefix.endsWith("String_Node_Str")) {
    prefix+="String_Node_Str";
  }
}

Fixed version (ground truth):
public void setPrefix(String prefix){
  this.prefix=prefix;
  if (!prefix.endsWith("String_Node_Str")) {
    this.prefix+="String_Node_Str";
  }
}
Program: 82736
Project: 82736
Buggy source:
protected void ensureResolved(boolean haltOnFailure,boolean useOrigin,boolean transitive,String org,String module,String conf,String resolveId,File cache){
  ensureMessageInitialised();
  String[] confs=null;
  if (resolveId != null) {
    confs=getConfsToResolve(resolveId,conf);
  }
 else {
    confs=getConfsToResolve(org,module,conf,false);
  }
  if (confs.length > 0) {
    IvyResolve resolve=createResolve(haltOnFailure,useOrigin);
    resolve.setCache(cache);
    resolve.setTransitive(transitive);
    resolve.setConf(StringUtils.join(confs,"String_Node_Str"));
    resolve.setResolveId(resolveId);
    resolve.execute();
  }
}

Fixed version (ground truth):
protected void ensureResolved(boolean haltOnFailure,boolean useOrigin,boolean transitive,String org,String module,String conf,String resolveId,File cache){
  ensureMessageInitialised();
  String[] confs=null;
  if (resolveId != null) {
    confs=getConfsToResolve(resolveId,conf);
  }
 else {
    confs=getConfsToResolve(org,module,conf,false);
  }
  if (confs.length > 0) {
    IvyResolve resolve=createResolve(haltOnFailure,useOrigin);
    resolve.setFile(_file);
    resolve.setCache(cache);
    resolve.setTransitive(transitive);
    resolve.setConf(StringUtils.join(confs,"String_Node_Str"));
    resolve.setResolveId(resolveId);
    resolve.execute();
  }
}
Program: 82737
Project: 82737
Buggy source:
protected IvyResolve createResolve(boolean haltOnFailure,boolean useOrigin){
  Message.verbose("String_Node_Str");
  IvyResolve resolve=new IvyResolve();
  resolve.setProject(getProject());
  resolve.setHaltonfailure(haltOnFailure);
  resolve.setUseOrigin(useOrigin);
  resolve.setValidate(isValidate());
  resolve.setFile(_file);
  return resolve;
}

Fixed version (ground truth):
protected IvyResolve createResolve(boolean haltOnFailure,boolean useOrigin){
  Message.verbose("String_Node_Str");
  IvyResolve resolve=new IvyResolve();
  resolve.setProject(getProject());
  resolve.setHaltonfailure(haltOnFailure);
  resolve.setUseOrigin(useOrigin);
  resolve.setValidate(isValidate());
  return resolve;
}
Program: 82738
Project: 82738
Buggy source:
protected ResolveReport getResolvedReport(){
  return getResolvedReport(getOrganisation(),isInline() ? getModule() + "String_Node_Str" : getModule());
}

Fixed version (ground truth):
protected ResolveReport getResolvedReport(){
  return getResolvedReport(getOrganisation(),isInline() ? getModule() + "String_Node_Str" : getModule(),_resolveId);
}
Program: 82739
Project: 82739
Buggy source:
protected ResolveReport getResolvedReport(String org,String module,boolean strict){
  return (ResolveReport)getReference("String_Node_Str",org,module,strict);
}

Fixed version (ground truth):
protected ResolveReport getResolvedReport(String org,String module,String resolveId){
  ResolveReport result=null;
  if (resolveId == null) {
    result=(ResolveReport)getReference("String_Node_Str",org,module,false);
  }
 else {
    result=(ResolveReport)getReference("String_Node_Str" + resolveId,null,null,false);
  }
  return result;
}
Program: 82741
Project: 82741
Buggy source:
public List getAllProblemMessages(){
  List ret=new ArrayList(_problemMessages);
  for (Iterator iter=_confReports.values().iterator(); iter.hasNext(); ) {
    ConfigurationResolveReport r=(ConfigurationResolveReport)iter.next();
    IvyNode[] unresolved=r.getUnresolvedDependencies();
    for (int i=0; i < unresolved.length; i++) {
      Exception e=unresolved[i].getProblem();
      if (e != null) {
        ret.add("String_Node_Str" + unresolved[i].getId() + "String_Node_Str"+ (e instanceof RuntimeException ? e.getMessage() : e.toString()));
      }
 else {
        ret.add("String_Node_Str" + unresolved[i].getId());
      }
    }
    ArtifactDownloadReport[] adrs=r.getFailedArtifactsReports();
    for (int i=0; i < adrs.length; i++) {
      ret.add("String_Node_Str" + adrs[i].getArtifact());
    }
  }
  return ret;
}

Fixed version (ground truth):
public List getAllProblemMessages(){
  List ret=new ArrayList(_problemMessages);
  for (Iterator iter=_confReports.values().iterator(); iter.hasNext(); ) {
    ConfigurationResolveReport r=(ConfigurationResolveReport)iter.next();
    IvyNode[] unresolved=r.getUnresolvedDependencies();
    for (int i=0; i < unresolved.length; i++) {
      Exception e=unresolved[i].getProblem();
      if (e != null) {
        String errMsg=e instanceof RuntimeException ? e.getMessage() : e.toString();
        if (errMsg == null || errMsg.length() == 0 || "String_Node_Str".equals(errMsg)) {
          errMsg=e.getClass().getName() + "String_Node_Str" + e.getStackTrace()[0].toString();
        }
        ret.add("String_Node_Str" + unresolved[i].getId() + "String_Node_Str"+ errMsg);
      }
 else {
        ret.add("String_Node_Str" + unresolved[i].getId());
      }
    }
    ArtifactDownloadReport[] adrs=r.getFailedArtifactsReports();
    for (int i=0; i < adrs.length; i++) {
      ret.add("String_Node_Str" + adrs[i].getArtifact());
    }
  }
  return ret;
}
Program: 82743
Project: 82743
Buggy source:
public void run(){
  int c;
  try {
    while (_err != null && (c=_err.read()) != -1) {
      _errors.append((char)c);
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
public void run(){
  int c;
  try {
    while (_err != null && (c=_err.read()) != -1) {
      _errors.append((char)c);
      _errorsLastUpdateTime=System.currentTimeMillis();
    }
  }
 catch (  IOException e) {
  }
}
Program: 82744
Project: 82744
Buggy source:
protected String sendCommand(String command,boolean sendErrorAsResponse,boolean single,long timeout) throws IOException {
  single=false;
  checkInterrupted();
  _inCommand=true;
  if (!single || _in != null) {
    ensureConnectionOpened();
    Message.debug("String_Node_Str" + command + "String_Node_Str"+ getHost());
    updateLastCommandTime();
    _out.println(command);
    _out.flush();
  }
 else {
    sendSingleCommand(command);
  }
  try {
    return readResponse(sendErrorAsResponse,timeout);
  }
  finally {
    _inCommand=false;
    if (single) {
      closeConnection();
    }
  }
}

Fixed version (ground truth):
protected String sendCommand(String command,boolean sendErrorAsResponse,boolean single,long timeout) throws IOException {
  single=false;
  checkInterrupted();
  _inCommand=true;
  _errorsLastUpdateTime=0;
synchronized (this) {
    if (!single || _in != null) {
      ensureConnectionOpened();
      Message.debug("String_Node_Str" + command + "String_Node_Str"+ getHost());
      updateLastCommandTime();
      _out.println(command);
      _out.flush();
    }
 else {
      sendSingleCommand(command);
    }
  }
  try {
    return readResponse(sendErrorAsResponse,timeout);
  }
  finally {
    _inCommand=false;
    if (single) {
      closeConnection();
    }
  }
}
Program: 82745
Project: 82745
Buggy source:
private synchronized void closeConnection(){
  if (_connectionCleaner != null) {
    _connectionCleaner.interrupt();
  }
  if (_errorsReader != null) {
    _errorsReader.interrupt();
  }
  try {
    _process.destroy();
  }
 catch (  Exception ex) {
  }
  try {
    _in.close();
  }
 catch (  Exception e) {
  }
  try {
    _err.close();
  }
 catch (  Exception e) {
  }
  try {
    _out.close();
  }
 catch (  Exception e) {
  }
  _connectionCleaner=null;
  _errorsReader=null;
  _process=null;
  _in=null;
  _out=null;
  _err=null;
}

Fixed version (ground truth):
private synchronized void closeConnection(){
  if (_connectionCleaner != null) {
    _connectionCleaner.interrupt();
  }
  if (_errorsReader != null) {
    _errorsReader.interrupt();
  }
  try {
    _process.destroy();
  }
 catch (  Exception ex) {
  }
  try {
    _in.close();
  }
 catch (  Exception e) {
  }
  try {
    _err.close();
  }
 catch (  Exception e) {
  }
  try {
    _out.close();
  }
 catch (  Exception e) {
  }
  _connectionCleaner=null;
  _errorsReader=null;
  _process=null;
  _in=null;
  _out=null;
  _err=null;
  Message.debug("String_Node_Str" + getHost() + "String_Node_Str");
}
Program: 82746
Project: 82746
Buggy source:
private void exec(String command) throws IOException {
  Message.debug("String_Node_Str" + command + "String_Node_Str");
  _process=Runtime.getRuntime().exec(command);
  _in=new InputStreamReader(_process.getInputStream());
  _err=new InputStreamReader(_process.getErrorStream());
  _out=new PrintWriter(_process.getOutputStream());
  _errorsReader=new Thread(){
    public void run(){
      int c;
      try {
        while (_err != null && (c=_err.read()) != -1) {
          _errors.append((char)c);
        }
      }
 catch (      IOException e) {
      }
    }
  }
;
  _errorsReader.start();
}

Fixed version (ground truth):
private void exec(String command) throws IOException {
  Message.debug("String_Node_Str" + command + "String_Node_Str");
  _process=Runtime.getRuntime().exec(command);
  _in=new InputStreamReader(_process.getInputStream());
  _err=new InputStreamReader(_process.getErrorStream());
  _out=new PrintWriter(_process.getOutputStream());
  _errorsReader=new Thread(){
    public void run(){
      int c;
      try {
        while (_err != null && (c=_err.read()) != -1) {
          _errors.append((char)c);
          _errorsLastUpdateTime=System.currentTimeMillis();
        }
      }
 catch (      IOException e) {
      }
    }
  }
;
  _errorsReader.start();
}
Program: 82747
Project: 82747
Buggy source:
public ResolvedModuleRevision findModule(ModuleRevisionId id){
  DependencyResolver r=getResolver(id.getModuleId());
  if (r == null) {
    throw new IllegalStateException("String_Node_Str" + id.getModuleId());
  }
  DefaultModuleDescriptor md=genCallerMD(id,new String[]{"String_Node_Str"},false,false);
  try {
    return r.getDependency(new DefaultDependencyDescriptor(id,true),new ResolveData(this,getDefaultCache(),null,new ConfigurationResolveReport(this,md,"String_Node_Str",null,getDefaultCache()),false));
  }
 catch (  ParseException e) {
    throw new RuntimeException("String_Node_Str" + id + "String_Node_Str"+ e,e);
  }
}

Fixed version (ground truth):
public ResolvedModuleRevision findModule(ModuleRevisionId id){
  DependencyResolver r=getResolver(id.getModuleId());
  if (r == null) {
    throw new IllegalStateException("String_Node_Str" + id.getModuleId());
  }
  DefaultModuleDescriptor md=DefaultModuleDescriptor.newCallerInstance(id,new String[]{"String_Node_Str"},false,false);
  try {
    return r.getDependency(new DefaultDependencyDescriptor(id,true),new ResolveData(this,getDefaultCache(),null,new ConfigurationResolveReport(this,md,"String_Node_Str",null,getDefaultCache()),false));
  }
 catch (  ParseException e) {
    throw new RuntimeException("String_Node_Str" + id + "String_Node_Str"+ e,e);
  }
}
Program: 82748
Project: 82748
Buggy source:
/** 
 * @param rootModuleConf
 * @param mrid
 * @param callerConf
 * @param dependencyConfs '*' must have been resolved
 * @param dd the dependency revision id asked by the caller
 */
public void addCaller(String rootModuleConf,IvyNode node,String callerConf,String[] dependencyConfs,DependencyDescriptor dd){
  ModuleDescriptor md=node.getDescriptor();
  ModuleRevisionId mrid=md.getModuleRevisionId();
  if (mrid.getModuleId().equals(getId().getModuleId())) {
    throw new IllegalArgumentException("String_Node_Str" + getId());
  }
  Map callers=(Map)_callersByRootConf.get(rootModuleConf);
  if (callers == null) {
    callers=new HashMap();
    _callersByRootConf.put(rootModuleConf,callers);
  }
  Caller caller=(Caller)callers.get(mrid);
  if (caller == null) {
    caller=new Caller(md,mrid,dd,node.canExclude(rootModuleConf));
    callers.put(mrid,caller);
  }
  caller.addConfiguration(callerConf,dependencyConfs);
  IvyNode parent=node.getRealNode();
  for (Iterator iter=parent._allCallers.keySet().iterator(); iter.hasNext(); ) {
    ModuleId mid=(ModuleId)iter.next();
    _allCallers.put(mid,parent);
  }
  _allCallers.put(mrid.getModuleId(),node);
  _isCircular=_allCallers.keySet().contains(getId().getModuleId());
  if (_isCircular) {
    IvyContext.getContext().getCircularDependencyStrategy().handleCircularDependency(toMrids(findPath(getId().getModuleId()),this));
  }
}

Fixed version (ground truth):
/** 
 * @param rootModuleConf
 * @param mrid
 * @param callerConf
 * @param dependencyConfs '*' must have been resolved
 * @param dd the dependency revision id asked by the caller
 */
public void addCaller(String rootModuleConf,IvyNode node,String callerConf,String[] dependencyConfs,DependencyDescriptor dd){
  ModuleDescriptor md=node.getDescriptor();
  ModuleRevisionId mrid=node.getId();
  if (mrid.getModuleId().equals(getId().getModuleId())) {
    throw new IllegalArgumentException("String_Node_Str" + getId());
  }
  Map callers=(Map)_callersByRootConf.get(rootModuleConf);
  if (callers == null) {
    callers=new HashMap();
    _callersByRootConf.put(rootModuleConf,callers);
  }
  Caller caller=(Caller)callers.get(mrid);
  if (caller == null) {
    caller=new Caller(md,mrid,dd,node.canExclude(rootModuleConf));
    callers.put(mrid,caller);
  }
  caller.addConfiguration(callerConf,dependencyConfs);
  IvyNode parent=node.getRealNode();
  for (Iterator iter=parent._allCallers.keySet().iterator(); iter.hasNext(); ) {
    ModuleId mid=(ModuleId)iter.next();
    _allCallers.put(mid,parent);
  }
  _allCallers.put(mrid.getModuleId(),node);
  _isCircular=_allCallers.keySet().contains(getId().getModuleId());
  if (_isCircular) {
    IvyContext.getContext().getCircularDependencyStrategy().handleCircularDependency(toMrids(findPath(getId().getModuleId()),this));
  }
}
Program: 82750
Project: 82750
Buggy source:
protected void setResolved(ResolveReport report,boolean keep){
  ModuleDescriptor md=report.getModuleDescriptor();
  if (keep) {
    getProject().addReference("String_Node_Str",report);
    getProject().addReference("String_Node_Str",md);
  }
  String suffix=md.getModuleRevisionId().getModuleId().getOrganisation() + "String_Node_Str" + md.getModuleRevisionId().getModuleId().getName();
  getProject().addReference("String_Node_Str" + suffix,report);
  getProject().addReference("String_Node_Str" + suffix,md);
}

Fixed version (ground truth):
protected void setResolved(ResolveReport report,boolean keep){
  ModuleDescriptor md=report.getModuleDescriptor();
  String[] confs=report.getConfigurations();
  if (keep) {
    getProject().addReference("String_Node_Str",report);
    getProject().addReference("String_Node_Str",confs);
    getProject().addReference("String_Node_Str",md);
  }
  String suffix=md.getModuleRevisionId().getModuleId().getOrganisation() + "String_Node_Str" + md.getModuleRevisionId().getModuleId().getName();
  getProject().addReference("String_Node_Str" + suffix,report);
  getProject().addReference("String_Node_Str" + suffix,md);
  getProject().addReference("String_Node_Str" + suffix,confs);
}
Program: 82751
Project: 82751
Buggy source:
protected void ensureResolved(boolean haltOnFailure,boolean transitive,String org,String module){
  ensureMessageInitialised();
  if (org != null && module != null) {
    return;
  }
  Object reference=getResolvedDescriptor(org,module);
  if (reference == null) {
    IvyResolve resolve=createResolve(haltOnFailure);
    resolve.setTransitive(transitive);
    resolve.execute();
  }
}

Fixed version (ground truth):
protected void ensureResolved(boolean haltOnFailure,boolean transitive,String org,String module,String conf){
  ensureMessageInitialised();
  if (org != null && module != null) {
    return;
  }
  String[] confs=getConfsToResolve(org,module,conf,false);
  if (confs.length > 0) {
    IvyResolve resolve=createResolve(haltOnFailure);
    resolve.setTransitive(transitive);
    resolve.setConf(StringUtils.join(confs,"String_Node_Str"));
    resolve.execute();
  }
}
Program: 82753
Project: 82753
Buggy source:
private Class classForName(String className,boolean silentFail){
  try {
    return getClassLoader().loadClass(className);
  }
 catch (  ClassNotFoundException e) {
    if (silentFail) {
      Message.warn("String_Node_Str" + className + "String_Node_Str"+ _classpathURLs+ "String_Node_Str");
      return null;
    }
 else {
      throw new RuntimeException("String_Node_Str" + className + "String_Node_Str"+ _classpathURLs+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private Class classForName(String className,boolean silentFail){
  try {
    return getClassLoader().loadClass(className);
  }
 catch (  ClassNotFoundException e) {
    if (silentFail) {
      Message.info("String_Node_Str" + className + "String_Node_Str"+ _classpathURLs+ "String_Node_Str");
      return null;
    }
 else {
      throw new RuntimeException("String_Node_Str" + className + "String_Node_Str"+ _classpathURLs+ "String_Node_Str");
    }
  }
}
Program: 82754
Project: 82754
Buggy source:
public static void sumupProblems(){
  if (_problems.length() > 0) {
    info("String_Node_Str");
    info(_problems.toString());
    info("String_Node_Str");
    _problems=new StringBuffer();
  }
}

Fixed version (ground truth):
public static void sumupProblems(){
  if (_problems.size() > 0) {
    info("String_Node_Str");
    for (Iterator iter=_problems.iterator(); iter.hasNext(); ) {
      String msg=(String)iter.next();
      info("String_Node_Str" + msg + "String_Node_Str");
    }
    info("String_Node_Str");
    _problems.clear();
  }
}
Program: 82755
Project: 82755
Buggy source:
public static void error(String msg){
  if (_impl != null) {
    _impl.log("String_Node_Str" + msg,MSG_VERBOSE);
  }
 else {
    System.err.println(msg);
  }
  _problems.append("String_Node_Str" + msg).append("String_Node_Str");
}

Fixed version (ground truth):
public static void error(String msg){
  if (_impl != null) {
    _impl.log("String_Node_Str" + msg,MSG_VERBOSE);
  }
 else {
    System.err.println(msg);
  }
  _problems.add("String_Node_Str" + msg);
}
Program: 82756
Project: 82756
Buggy source:
public static void warn(String msg){
  if (_impl != null) {
    _impl.log("String_Node_Str" + msg,MSG_VERBOSE);
  }
 else {
    System.err.println(msg);
  }
  _problems.append("String_Node_Str" + msg).append("String_Node_Str");
}

Fixed version (ground truth):
public static void warn(String msg){
  if (_impl != null) {
    _impl.log("String_Node_Str" + msg,MSG_VERBOSE);
  }
 else {
    System.err.println(msg);
  }
  _problems.add("String_Node_Str" + msg);
}
Program: 82757
Project: 82757
Buggy source:
public FileContent getContent() throws IOException {
  if ((_content == null) && _isAvailable) {
    try {
      _content=_resourceImpl.getContent();
    }
 catch (    FileSystemException e) {
      IOException error=new IOException(e.getLocalizedMessage());
      error.initCause(e);
      throw error;
    }
  }
  return _content;
}

Fixed version (ground truth):
public FileContent getContent() throws IOException {
  if (_content == null) {
    try {
      _content=_resourceImpl.getContent();
    }
 catch (    FileSystemException e) {
      IOException error=new IOException(e.getLocalizedMessage());
      error.initCause(e);
      throw error;
    }
  }
  return _content;
}
Program: 82759
Project: 82759
Buggy source:
protected DependencyDescriptor getDefaultConfMappingDescriptor(){
  if (_defaultConfMappingDescriptor == null) {
    _defaultConfMappingDescriptor=new DefaultDependencyDescriptor(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),false);
    parseDepsConfs(_defaultConfMapping,_defaultConfMappingDescriptor,false);
  }
  return _defaultConfMappingDescriptor;
}

Fixed version (ground truth):
protected DependencyDescriptor getDefaultConfMappingDescriptor(){
  if (_defaultConfMappingDescriptor == null) {
    _defaultConfMappingDescriptor=new DefaultDependencyDescriptor(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),false);
    parseDepsConfs(_defaultConfMapping,_defaultConfMappingDescriptor,false,false);
  }
  return _defaultConfMappingDescriptor;
}
Program: 82760
Project: 82760
Buggy source:
public void removeSavedArtifactOrigin(File cache,Artifact artifact){
  PropertiesFile cdf=getCachedDataFile(cache,artifact.getModuleRevisionId());
  cdf.remove("String_Node_Str" + artifact.getName() + "String_Node_Str");
  cdf.remove("String_Node_Str" + artifact.getName() + "String_Node_Str");
  cdf.save();
}

Fixed version (ground truth):
public void removeSavedArtifactOrigin(File cache,Artifact artifact){
  PropertiesFile cdf=getCachedDataFile(cache,artifact.getModuleRevisionId());
  cdf.remove("String_Node_Str" + artifact.getName() + "String_Node_Str"+ artifact.getExt()+ "String_Node_Str");
  cdf.remove("String_Node_Str" + artifact.getName() + "String_Node_Str"+ artifact.getExt()+ "String_Node_Str");
  cdf.save();
}
Program: 82761
Project: 82761
Buggy source:
public ArtifactOrigin getSavedArtifactOrigin(File cache,Artifact artifact){
  PropertiesFile cdf=getCachedDataFile(cache,artifact.getModuleRevisionId());
  String location=cdf.getProperty("String_Node_Str" + artifact.getName() + "String_Node_Str");
  boolean isLocal=Boolean.valueOf(cdf.getProperty("String_Node_Str" + artifact.getName() + "String_Node_Str")).booleanValue();
  if (location == null) {
    return null;
  }
  return new ArtifactOrigin(isLocal,location);
}

Fixed version (ground truth):
public ArtifactOrigin getSavedArtifactOrigin(File cache,Artifact artifact){
  PropertiesFile cdf=getCachedDataFile(cache,artifact.getModuleRevisionId());
  String location=cdf.getProperty("String_Node_Str" + artifact.getName() + "String_Node_Str"+ artifact.getExt()+ "String_Node_Str");
  boolean isLocal=Boolean.valueOf(cdf.getProperty("String_Node_Str" + artifact.getName() + "String_Node_Str"+ artifact.getExt()+ "String_Node_Str")).booleanValue();
  if (location == null) {
    return null;
  }
  return new ArtifactOrigin(isLocal,location);
}
Program: 82762
Project: 82762
Buggy source:
public void saveArtifactOrigin(File cache,Artifact artifact,ArtifactOrigin origin){
  PropertiesFile cdf=getCachedDataFile(cache,artifact.getModuleRevisionId());
  cdf.setProperty("String_Node_Str" + artifact.getName() + "String_Node_Str",String.valueOf(origin.isLocal()));
  cdf.setProperty("String_Node_Str" + artifact.getName() + "String_Node_Str",origin.getLocation());
  cdf.save();
}

Fixed version (ground truth):
public void saveArtifactOrigin(File cache,Artifact artifact,ArtifactOrigin origin){
  PropertiesFile cdf=getCachedDataFile(cache,artifact.getModuleRevisionId());
  cdf.setProperty("String_Node_Str" + artifact.getName() + "String_Node_Str"+ artifact.getExt()+ "String_Node_Str",String.valueOf(origin.isLocal()));
  cdf.setProperty("String_Node_Str" + artifact.getName() + "String_Node_Str"+ artifact.getExt()+ "String_Node_Str",origin.getLocation());
  cdf.save();
}
Program: 82763
Project: 82763
Buggy source:
public String encodeToString(){
  StringBuffer buf=new StringBuffer();
  Map attributes=getAttributes();
  for (Iterator iter=attributes.keySet().iterator(); iter.hasNext(); ) {
    String attName=(String)iter.next();
    buf.append(attName).append(ENCODE_SEPARATOR).append(attributes.get(attName)).append(ENCODE_SEPARATOR);
  }
  return buf.toString();
}

Fixed version (ground truth):
public String encodeToString(){
  StringBuffer buf=new StringBuffer();
  Map attributes=getAttributes();
  for (Iterator iter=attributes.keySet().iterator(); iter.hasNext(); ) {
    String attName=(String)iter.next();
    buf.append(ENCODE_PREFIX).append(attName).append(ENCODE_SEPARATOR).append(ENCODE_PREFIX).append(attributes.get(attName)).append(ENCODE_SEPARATOR);
  }
  return buf.toString();
}
Program: 82764
Project: 82764
Buggy source:
public static ModuleRevisionId decode(String encoded){
  String[] parts=encoded.split(ENCODE_SEPARATOR);
  if (parts.length % 2 != 0) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  Map attributes=new HashMap();
  for (int i=0; i < parts.length; i+=2) {
    String attName=parts[i];
    String attValue=parts[i + 1];
    attributes.put(attName,attValue);
  }
  String org=(String)attributes.remove(IvyPatternHelper.ORGANISATION_KEY);
  String mod=(String)attributes.remove(IvyPatternHelper.MODULE_KEY);
  String rev=(String)attributes.remove(IvyPatternHelper.REVISION_KEY);
  if (org == null) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  if (mod == null) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  if (rev == null) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  return newInstance(org,mod,rev,attributes);
}

Fixed version (ground truth):
public static ModuleRevisionId decode(String encoded){
  String[] parts=encoded.split(ENCODE_SEPARATOR);
  if (parts.length % 2 != 0) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  Map attributes=new HashMap();
  for (int i=0; i < parts.length; i+=2) {
    String attName=parts[i];
    if (!attName.startsWith(ENCODE_PREFIX)) {
      throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str"+ attName+ "String_Node_Str"+ ENCODE_PREFIX);
    }
 else {
      attName=attName.substring(1);
    }
    String attValue=parts[i + 1];
    if (!attValue.startsWith(ENCODE_PREFIX)) {
      throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str"+ attValue+ "String_Node_Str"+ ENCODE_PREFIX);
    }
 else {
      attValue=attValue.substring(1);
    }
    attributes.put(attName,attValue);
  }
  String org=(String)attributes.remove(IvyPatternHelper.ORGANISATION_KEY);
  String mod=(String)attributes.remove(IvyPatternHelper.MODULE_KEY);
  String rev=(String)attributes.remove(IvyPatternHelper.REVISION_KEY);
  if (org == null) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  if (mod == null) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  if (rev == null) {
    throw new IllegalArgumentException("String_Node_Str" + encoded + "String_Node_Str");
  }
  return newInstance(org,mod,rev,attributes);
}
Program: 82768
Project: 82768
Buggy source:
public void setResolvedNodes(ModuleId moduleId,String rootModuleConf,Collection resolved){
  _selectedDeps.put(new ModuleIdConf(moduleId,rootModuleConf),new HashSet(resolved));
}

Fixed version (ground truth):
public void setResolvedNodes(ModuleId moduleId,String rootModuleConf,Collection resolved){
  ModuleIdConf moduleIdConf=new ModuleIdConf(moduleId,rootModuleConf);
  _selectedDeps.put(moduleIdConf,new HashSet(resolved));
  Collection resolvedRevs=new HashSet();
  for (Iterator iter=resolved.iterator(); iter.hasNext(); ) {
    IvyNode node=(IvyNode)iter.next();
    resolvedRevs.add(node.getId());
    resolvedRevs.add(node.getResolvedId());
  }
  _selectedRevs.put(moduleIdConf,resolvedRevs);
}
Program: 82769
Project: 82769
Buggy source:
public Collection getEvictedRevisions(ModuleId mid,String rootModuleConf){
  Collection resolved=(Collection)_evictedDeps.get(new ModuleIdConf(mid,rootModuleConf));
  if (resolved == null) {
    return new HashSet();
  }
 else {
    Collection ret=new HashSet();
    for (Iterator iter=resolved.iterator(); iter.hasNext(); ) {
      IvyNode node=(IvyNode)iter.next();
      ret.add(node.getRealNode().getResolvedId());
    }
    return ret;
  }
}

Fixed version (ground truth):
public Collection getEvictedRevisions(ModuleId mid,String rootModuleConf){
  Collection evicted=(Collection)_evictedRevs.get(new ModuleIdConf(mid,rootModuleConf));
  if (evicted == null) {
    return new HashSet();
  }
 else {
    return new HashSet(evicted);
  }
}
Program: 82770
Project: 82770
Buggy source:
public void setEvictedNodes(ModuleId moduleId,String rootModuleConf,Collection evicted){
  _evictedDeps.put(new ModuleIdConf(moduleId,rootModuleConf),new HashSet(evicted));
}

Fixed version (ground truth):
public void setEvictedNodes(ModuleId moduleId,String rootModuleConf,Collection evicted){
  ModuleIdConf moduleIdConf=new ModuleIdConf(moduleId,rootModuleConf);
  _evictedDeps.put(moduleIdConf,new HashSet(evicted));
  Collection evictedRevs=new HashSet();
  for (Iterator iter=evicted.iterator(); iter.hasNext(); ) {
    IvyNode node=(IvyNode)iter.next();
    evictedRevs.add(node.getId());
    evictedRevs.add(node.getResolvedId());
  }
  _evictedRevs.put(moduleIdConf,evictedRevs);
}
Program: 82771
Project: 82771
Buggy source:
public Collection getResolvedRevisions(ModuleId mid,String rootModuleConf){
  Collection resolved=(Collection)_selectedDeps.get(new ModuleIdConf(mid,rootModuleConf));
  if (resolved == null) {
    return new HashSet();
  }
 else {
    Collection ret=new HashSet();
    for (Iterator iter=resolved.iterator(); iter.hasNext(); ) {
      IvyNode node=(IvyNode)iter.next();
      ret.add(node.getId());
      ret.add(node.getResolvedId());
    }
    return ret;
  }
}

Fixed version (ground truth):
public Collection getResolvedRevisions(ModuleId mid,String rootModuleConf){
  Collection resolved=(Collection)_selectedRevs.get(new ModuleIdConf(mid,rootModuleConf));
  if (resolved == null) {
    return new HashSet();
  }
 else {
    return new HashSet(resolved);
  }
}
Program: 82772
Project: 82772
Buggy source:
public void testTransformation(){
  MRIDTransformationRule r=new MRIDTransformationRule();
  r.addSrc(new MRIDRule("String_Node_Str","String_Node_Str",null));
  r.addDest(new MRIDRule("String_Node_Str","String_Node_Str",null));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  r=new MRIDTransformationRule();
  r.addSrc(new MRIDRule(null,"String_Node_Str",null));
  r.addDest(new MRIDRule("String_Node_Str","String_Node_Str",null));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
public void testTransformation(){
  MRIDTransformationRule r=new MRIDTransformationRule();
  r.addSrc(new MRIDRule("String_Node_Str","String_Node_Str",null));
  r.addDest(new MRIDRule("String_Node_Str","String_Node_Str",null));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  r=new MRIDTransformationRule();
  r.addSrc(new MRIDRule(null,"String_Node_Str",null));
  r.addDest(new MRIDRule("String_Node_Str","String_Node_Str",null));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  r=new MRIDTransformationRule();
  r.addSrc(new MRIDRule("String_Node_Str","String_Node_Str",null));
  r.addDest(new MRIDRule("String_Node_Str","String_Node_Str",null));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
  assertEquals(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str"),r.transform(ModuleRevisionId.newInstance("String_Node_Str","String_Node_Str","String_Node_Str")));
}